[iOS WK2] Share some code with Mac for post-async-scroll state reconciliation
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-11-12  Simon Fraser  <simon.fraser@apple.com>
2
3         [iOS WK2] Share some code with Mac for post-async-scroll state reconciliation
4         https://bugs.webkit.org/show_bug.cgi?id=164694
5
6         Reviewed by Zalan Bujtas.
7
8         Rather than calling FrameView directly, call reconcileScrollingState() on the scrolling
9         coordinator.
10
11         * WebProcess/WebPage/ios/WebPageIOS.mm:
12         (WebKit::WebPage::updateVisibleContentRects):
13
14 2016-11-12  Brian Burg  <bburg@apple.com>
15
16         Web Automation: terminate the automation session if the web process crashes
17         https://bugs.webkit.org/show_bug.cgi?id=164671
18         <rdar://problem/29028964>
19
20         Reviewed by Joseph Pecoraro.
21
22         * UIProcess/Automation/WebAutomationSession.h:
23         * UIProcess/Automation/WebAutomationSession.cpp:
24         (WebKit::WebAutomationSession::disconnect):
25         (WebKit::WebAutomationSession::terminate):
26         Factor out code that disconnects the remote, unpairs, and notifies the client.
27         Then, expose terminate() which can be called without a FrontendChannel.
28         Calling this causes the _WKAutomationDelegate to clear the local-side session in the
29         browser, and disconnecting from the remote will hang up the remote-side session.
30
31         * UIProcess/WebPageProxy.cpp:
32         (WebKit::WebPageProxy::processDidCrash):
33         Terminate the session.
34
35 2016-11-11  Alex Christensen  <achristensen@webkit.org>
36
37         Use SecurityOriginData as keys in StorageManager
38         https://bugs.webkit.org/show_bug.cgi?id=159834
39         <rdar://problem/27346948>
40
41         Reviewed by Brady Eidson.
42
43         * Platform/IPC/HandleMessage.h:
44         (IPC::callMemberFunctionImpl):
45         Add a missing std::forward so we can use this callMemberFunctionImpl with rvalues.
46         * UIProcess/API/C/WKApplicationCacheManager.cpp:
47         (WKApplicationCacheManagerGetApplicationCacheOrigins):
48         (WKApplicationCacheManagerDeleteEntriesForOrigin):
49         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
50         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
51         (WKKeyValueStorageManagerDeleteEntriesForOrigin):
52         * UIProcess/API/C/WKResourceCacheManager.cpp:
53         (WKResourceCacheManagerGetCacheOrigins):
54         (WKResourceCacheManagerClearCacheForOrigin):
55         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
56         (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]):
57         * UIProcess/Databases/DatabaseProcessProxy.cpp:
58         (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
59         * UIProcess/Databases/DatabaseProcessProxy.h:
60         * UIProcess/Network/NetworkProcessProxy.cpp:
61         (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
62         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
63         * UIProcess/Network/NetworkProcessProxy.h:
64         * UIProcess/Storage/LocalStorageDatabase.cpp:
65         (WebKit::LocalStorageDatabase::create):
66         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
67         (WebKit::LocalStorageDatabase::openDatabase):
68         (WebKit::LocalStorageDatabase::close):
69         * UIProcess/Storage/LocalStorageDatabase.h:
70         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
71         (WebKit::LocalStorageDatabaseTracker::databasePath):
72         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
73         (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
74         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
75         (WebKit::LocalStorageDatabaseTracker::origins):
76         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
77         * UIProcess/Storage/StorageManager.cpp:
78         (WebKit::StorageManager::StorageArea::securityOrigin):
79         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
80         (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
81         (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
82         (WebKit::StorageManager::StorageArea::StorageArea):
83         (WebKit::StorageManager::StorageArea::clone):
84         (WebKit::StorageManager::StorageArea::items):
85         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
86         (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
87         (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
88         (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
89         (WebKit::StorageManager::SessionStorageNamespace::origins):
90         (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
91         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
92         (WebKit::StorageManager::getSessionStorageOrigins):
93         (WebKit::StorageManager::deleteSessionStorageOrigins):
94         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
95         (WebKit::StorageManager::getLocalStorageOrigins):
96         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
97         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
98         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
99         (WebKit::StorageManager::createLocalStorageMap):
100         (WebKit::StorageManager::createTransientLocalStorageMap):
101         (WebKit::StorageManager::createSessionStorageMap):
102         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
103         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
104         (WebKit::StorageManager::StorageArea::create): Deleted.
105         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea): Deleted.
106         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): Deleted.
107         * UIProcess/Storage/StorageManager.h:
108         * UIProcess/WebProcessProxy.cpp:
109         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
110         * UIProcess/WebProcessProxy.h:
111         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
112         (WebKit::WebsiteDataRecord::displayNameForOrigin):
113         (WebKit::WebsiteDataRecord::add):
114         * UIProcess/WebsiteData/WebsiteDataRecord.h:
115         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
116         (WebKit::WebsiteDataStore::fetchData):
117         (WebKit::WebsiteDataStore::removeData):
118         (WebKit::WebsiteDataStore::mediaKeyOrigins):
119         (WebKit::WebsiteDataStore::removeMediaKeys):
120         * UIProcess/WebsiteData/WebsiteDataStore.h:
121         Fewer SecurityOrigin uses in the UIProcess!  Hooray!
122
123 2016-11-11  Ryosuke Niwa  <rniwa@webkit.org>
124
125         Hovering over a slotted Text node clears hover state
126         https://bugs.webkit.org/show_bug.cgi?id=164002
127         <rdar://problem/29040471>
128
129         Reviewed by Simon Fraser.
130
131         * WebProcess/WebPage/WebPage.cpp:
132         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
133         * WebProcess/WebPage/mac/WebPageMac.mm:
134         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
135
136 2016-11-11  Wenson Hsieh  <wenson_hsieh@apple.com>
137
138         [WK2] autocorrect and autocapitalize attributes do not work in contenteditable elements
139         https://bugs.webkit.org/show_bug.cgi?id=164538
140         <rdar://problem/8418711>
141
142         Reviewed by Ryosuke Niwa.
143
144         Consult HTMLElement::autocorrect() and HTMLElement::autocapitalizeType() when assembling the assisted node
145         information for the currently assisted node.
146
147         * Shared/AssistedNodeInformation.h:
148         * UIProcess/ios/WKContentViewInteraction.mm:
149         (toUITextAutocapitalize):
150         * WebProcess/WebPage/ios/WebPageIOS.mm:
151         (WebKit::WebPage::getAssistedNodeInformation):
152
153 2016-11-11  Beth Dakin  <bdakin@apple.com>
154
155         Move to modern TouchBar methods
156         https://bugs.webkit.org/show_bug.cgi?id=164655
157         -and corresponding-
158         rdar://problem/29226911
159
160         Reviewed by Wenson Hsieh.
161
162         customizationDefaultItemIdentifiers -> defaultItemIdentifiers
163         itemIdentifiers -> defaultItemIdentifiers
164         defaultItems -> templateItems
165
166         * UIProcess/Cocoa/WebViewImpl.mm:
167         (WebKit::plainTextTouchBarDefaultItemIdentifiers):
168         (WebKit::richTextTouchBarDefaultItemIdentifiers):
169         (WebKit::WebViewImpl::setUpTextTouchBar):
170         (WebKit::WebViewImpl::updateTextTouchBar):
171         (WebKit::plainTextTouchBarCustomizationDefaultItemIdentifiers): Deleted.
172         (WebKit::richTextTouchBarCustomizationDefaultItemIdentifiers): Deleted.
173
174 2016-11-11  Brent Fulgham  <bfulgham@apple.com>
175
176         Get rid of old sandbox rules for OS's we no longer support
177         https://bugs.webkit.org/show_bug.cgi?id=164638
178
179         Reviewed by Simon Fraser.
180
181         Clean up the various sandbox profiles to get rid of rules that applied to operating system
182         versions we no longer support, or were added in support of bugs that have long since been
183         fixed.
184
185         This should introduce no change in behavior.
186
187         * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
188         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
189         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
190         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
191         * WebProcess/com.apple.WebProcess.sb.in:
192
193 2016-11-11  Brady Eidson  <beidson@apple.com>
194
195         IndexedDB 2.0: "close pending flag" and firing blocked events all need fixing.
196         https://bugs.webkit.org/show_bug.cgi?id=164641
197
198         Reviewed by Alex Christensen.
199
200         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
201         (WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):
202         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
203         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
204
205         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
206         (WebKit::WebIDBConnectionToServer::databaseConnectionPendingClose):
207         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
208
209 2016-11-11  Eric Carlson  <eric.carlson@apple.com>
210
211         [MediaStream] defer resolution of getUserMedia promise made in a background tab
212         https://bugs.webkit.org/show_bug.cgi?id=164643
213         <rdar://problem/29048317>
214
215         Reviewed by Brady Eidson.
216
217         Do not ask for user for access to capture devices when the document does not
218         allow media to play, wait until playback is allowed.
219
220         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
221         (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest):
222         (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
223         (WebKit::UserMediaPermissionRequestManager::mediaCanStart):
224         (WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension):
225         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
226         * WebProcess/Plugins/PluginView.cpp:
227         (WebKit::PluginView::mediaCanStart):
228         * WebProcess/Plugins/PluginView.h:
229
230 2016-11-11  Darin Adler  <darin@apple.com>
231
232         Move Node from ExceptionCode to ExceptionOr
233         https://bugs.webkit.org/show_bug.cgi?id=164515
234
235         Reviewed by Sam Weinig.
236
237         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
238         (webkit_dom_html_select_element_remove): Updated exception handling.
239         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
240         (webkit_dom_node_insert_before): Ditto.
241         (webkit_dom_node_replace_child): Ditto.
242         (webkit_dom_node_remove_child): Ditto.
243         (webkit_dom_node_append_child): Ditto.
244         (webkit_dom_node_clone_node_with_error): Ditto.
245         (webkit_dom_node_set_node_value): Ditto.
246         (webkit_dom_node_set_text_content): Ditto.
247         * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
248         (-[WKDOMNode insertNode:before:]): Ditto.
249         (-[WKDOMNode appendChild:]): Ditto.
250         (-[WKDOMNode removeChild:]): Ditto.
251
252         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
253         (WebKit::PDFPlugin::PDFPlugin): Removed unneeded ASSERT_NO_EXCEPTION.
254         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
255         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): Ditto.
256
257 2016-11-11  Megan Gardner  <megan_gardner@apple.com>
258
259         [Cocoa] Support wide gamut for Drag Image UI
260         https://bugs.webkit.org/show_bug.cgi?id=164490
261
262         Reviewed by Tim Horton.
263
264         Fixed an error in the gating for the new wide gamut support in ShareableBitmap.
265         We should always respect the flags straight out, and not make decisions later, it can lead to mismatched data and data storage.
266         Added support for wide gamut in createCGImage.
267
268         * Shared/cg/ShareableBitmapCG.cpp:
269         (WebKit::bitmapInfo):
270         (WebKit::colorSpace):
271         (WebKit::ShareableBitmap::createGraphicsContext):
272         (WebKit::ShareableBitmap::createCGImage):
273         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
274         (WebKit::convertImageToBitmap):
275         (WebKit::WebDragClient::startDrag):
276
277 2016-11-11  Beth Dakin  <bdakin@apple.com>
278
279         Get touch bar code building for open source builds
280         https://bugs.webkit.org/show_bug.cgi?id=164610
281
282         Reviewed by Wenson Hsieh.
283
284         * config.h:
285
286 2016-11-10  Brent Fulgham  <bfulgham@apple.com>
287
288         Remove unused FontService from sandbox profile
289         https://bugs.webkit.org/show_bug.cgi?id=164625
290         <rdar://problem/26899976>
291
292         Reviewed by Alex Christensen.
293
294         Part of some general sandbox profile gardening.
295
296         Convert the Plugin process sandbox into 
297
298         * Configurations/WebKit.xcconfig: Add exclude for com.apple.WebKit.plugin-common.sb.in.
299         * DerivedSources.make: Update to generate com.apple.WebKit.plugin-common.sb from .in file
300         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: Copied from Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb.
301         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Removed.
302         * WebKit2.xcodeproj/project.pbxproj: Update for new .in file.
303         * WebProcess/com.apple.WebProcess.sb.in: Remove com.apple.FontServer
304         from macOS Sierra and newer.
305
306 2016-11-10  Eric Carlson  <eric.carlson@apple.com>
307
308         [MediaStream] apply constraints passed to getUserMedia()
309         https://bugs.webkit.org/show_bug.cgi?id=164561
310
311         Reviewed by Youenn Fablet.
312         <rdar://problem/29191384>
313
314         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
315         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
316
317 2016-11-10  Alex Christensen  <achristensen@webkit.org>
318
319         Move SecurityOrigin::databaseIdentifier() to SecurityOriginData
320         https://bugs.webkit.org/show_bug.cgi?id=164573
321
322         Reviewed by Brady Eidson.
323
324         * Shared/API/c/WKSecurityOriginRef.cpp:
325         (WKSecurityOriginCopyDatabaseIdentifier):
326         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
327         (WebKit::LocalStorageDatabaseTracker::databasePath):
328         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
329         (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
330         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
331         (WebKit::WebsiteDataStore::removeMediaKeys):
332         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
333         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
334         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
335         (WKBundlePageCopyOriginsWithApplicationCache):
336         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
337         (WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectoryForOrigin):
338         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
339         (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest):
340         (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
341         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
342         (WebKit::WebChromeClient::exceededDatabaseQuota):
343         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
344
345 2016-11-10  Alex Christensen  <achristensen@webkit.org>
346
347         Remove unused CFURLCACHE code
348         https://bugs.webkit.org/show_bug.cgi?id=164551
349
350         Reviewed by Antti Koivisto.
351
352         WebKit2 doesn't use CFURLCache, but we still have some unused code that seems to use it.
353
354         * NetworkProcess/NetworkProcess.cpp:
355         (WebKit::fetchDiskCacheEntries):
356         (WebKit::clearDiskCacheEntries):
357         * NetworkProcess/NetworkProcess.h:
358         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
359         (WebKit::partitionName): Deleted.
360         (WebKit::NetworkProcess::cfURLCacheOrigins): Deleted.
361         (WebKit::NetworkProcess::clearCFURLCacheForOrigins): Deleted.
362
363 2016-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
364
365         [Linux] Memory process values shown by the WebMemorySampler in linux are wrong
366         https://bugs.webkit.org/show_bug.cgi?id=164591
367
368         Reviewed by Michael Catanzaro.
369
370         It's parsing /proc/self/statm, and returning the values as if they were bytes, but they are number of pages, so
371         to get the bytes we need to take the page size into account. In r208534 I added a method to get /proc/self/statm
372         values in bytes to Platform layer, so we can simply use that instead.
373
374         * Shared/linux/WebMemorySamplerLinux.cpp:
375         (WebKit::WebMemorySampler::sampleWebKit): Use currentProcessMemoryStatus() and update the descriptions to
376         clarify that values are in bytes.
377
378 2016-10-14  Carlos Garcia Campos  <cgarcia@igalia.com>
379
380         MemoryPressureHandler shouldn't know how to release WebCore memory
381         https://bugs.webkit.org/show_bug.cgi?id=160497
382
383         Reviewed by Michael Catanzaro.
384
385         Set the low memory handler before installing the memory pressure handler.
386
387         * WebProcess/WebProcess.cpp:
388         (WebKit::WebProcess::initializeWebProcess):
389         * WebProcess/cocoa/WebProcessCocoa.mm:
390         (WebKit::WebProcess::platformInitializeWebProcess):
391
392 2016-10-27  Sergio Villar Senin  <svillar@igalia.com>
393
394         [GTK] New API to notify about dynamically added forms
395         https://bugs.webkit.org/show_bug.cgi?id=164050
396
397         Reviewed by Carlos Garcia Campos.
398
399         This new API exports the WebCore event didAssociateFormControls through the web extension
400         mechanism. This will help clients (mainly web browsers) to implement robust auto filling
401         mechanisms. It deals nicely with dynamically created forms (and form controls) as many JS
402         frameworks do nowadays.
403
404         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Added a FormClient implementation of
405         API::InjectedBundle::FormClient.
406         (webkitWebPageFormControlsAssociated): Emit the new signal.
407         (webkit_web_page_class_init): Added the new signal "forms-controls-associated".
408         (webkitWebPageCreate): Set the WebPage as a FormClient.
409
410 2016-11-10  Carlos Alberto Lopez Perez  <clopez@igalia.com>
411
412         [GTK] Allow to use WebMemorySampler feature.
413         https://bugs.webkit.org/show_bug.cgi?id=164517
414
415         Reviewed by Carlos Garcia Campos.
416
417         Enable the WebMemorySampler with the environment variable WEBKIT_SAMPLE_MEMORY.
418
419         When enabled, it will dump the stats to /tmp each second.
420
421         * UIProcess/API/gtk/WebKitWebContext.cpp:
422         (webkitWebContextConstructed):
423
424 2016-11-10  Philippe Normand  <pnormand@igalia.com>
425
426         [WK2][GTK][GStreamer] Build fails when -plugins-base and -core headers are not installed in the same directory
427         https://bugs.webkit.org/show_bug.cgi?id=148894
428
429         Reviewed by Carlos Garcia Campos.
430
431         The pbutils (gst-plugins-base-utils) headers are needed in
432         WebKit2/GTK for the permission request API related with the
433         GStreamer codec installer. It builds fine in most cases without
434         explicitely requiring the pbutils include directory path because
435         usually all the GStreamer headers are installed in the same path,
436         excepted for some distributions, like NixOS.
437
438         * PlatformGTK.cmake: The GStreamer pbutils include directory was
439         missing in the header search path.
440
441 2016-11-09  Chris Dumez  <cdumez@apple.com>
442
443         [WK2][!NETWORK_SESSION] Add support for downloading file backed blobs
444         https://bugs.webkit.org/show_bug.cgi?id=164522
445
446         Reviewed by Alex Christensen.
447
448         Add support for downloading file backed blobs for the non-NETWORK_SESSION
449         code path of WebKit2, which is still use on pre-Sierra macOS.
450
451         * NetworkProcess/Downloads/Download.cpp:
452         (WebKit::Download::~Download):
453         * NetworkProcess/Downloads/Download.h:
454         (WebKit::Download::setBlobFileReferences):
455         * NetworkProcess/Downloads/DownloadManager.cpp:
456         (WebKit::DownloadManager::startDownload):
457         (WebKit::DownloadManager::convertNetworkLoadToDownload):
458         * NetworkProcess/Downloads/DownloadManager.h:
459         * NetworkProcess/NetworkResourceLoader.cpp:
460         (WebKit::NetworkResourceLoader::convertToDownload):
461
462 2016-11-09  Chris Dumez  <cdumez@apple.com>
463
464         [WK2][NETWORK_SESSION] Add support for downloading file backed blobs
465         https://bugs.webkit.org/show_bug.cgi?id=164458
466         <rdar://problem/28905514>
467
468         Reviewed by Darin Adler.
469
470         Add support for downloading file backed blobs on WebKit2.
471         It previously wasn't working because we weren't calling
472         BlobDataFileReference::prepareForFileAccess() for each blob file before
473         starting the download, similarly to what is done in NetworkResourceLoader's
474         consumeSandboxExtensions().
475
476         * NetworkProcess/Downloads/DownloadManager.cpp:
477         (WebKit::DownloadManager::startDownload):
478         * NetworkProcess/Downloads/DownloadManager.h:
479         (WebKit::DownloadManager::startDownload):
480         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
481         (WebKit::NetworkConnectionToWebProcess::startDownload):
482         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
483         * NetworkProcess/NetworkDataTask.cpp:
484         (WebKit::NetworkDataTask::create):
485         * NetworkProcess/NetworkDataTask.h:
486         * NetworkProcess/NetworkDataTaskBlob.cpp:
487         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
488         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
489         (WebKit::NetworkDataTaskBlob::download):
490         * NetworkProcess/NetworkDataTaskBlob.h:
491         * NetworkProcess/NetworkLoad.cpp:
492         (WebKit::NetworkLoad::NetworkLoad):
493         * NetworkProcess/NetworkLoadParameters.h:
494         * NetworkProcess/NetworkProcess.cpp:
495         (WebKit::NetworkProcess::downloadRequest):
496         * NetworkProcess/NetworkResourceLoader.cpp:
497         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
498         (WebKit::NetworkResourceLoader::startNetworkLoad):
499         * NetworkProcess/PingLoad.h:
500
501 2016-11-09  Carlos Garcia Campos  <cgarcia@igalia.com>
502
503         NetworkSession: Network process crash when converting main resource to download
504         https://bugs.webkit.org/show_bug.cgi?id=164220
505
506         Reviewed by Alex Christensen.
507
508         Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
509         sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
510         NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
511         download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
512         NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
513         having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
514         load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
515         NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
516         client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
517         created yet. That's not expected to happen and when the response completion handler is called in the
518         NetworkDataTask it tries to use either the client or the download and it crashes.
519         We need to cleanup and destroy the ResourceLoader as soon as it becomes a download, because that's the expected
520         behavior, but at the same time we need to keep the NetworkLoad alive until the NetworkDataTask finishes to become
521         a download. This patch creates a PendingDownload to take the ownership of the NetworkLoad, so that
522         ResourceLoader can be cleaned up and destroyed. The DownloadManager now will handle the PendingDownload as if it
523         was created by startDownload(), but ensuring it's deleted right before the final Download object is added to the
524         downloads map. That way NetworkDataTask will always have a valid client until the final Download is created,
525         first the ResourceLoader and then the PendingDownload. Since the DownloadManager is the owner of the
526         PendingDownload we no longer need the didBecomeDownload() callback to delete the NetworkLoad, because the
527         NetworkLoad will always be owned by the PendingDownload now that will be deleted by the DownloadManager.
528
529         * NetworkProcess/Downloads/DownloadManager.cpp:
530         (WebKit::DownloadManager::dataTaskBecameDownloadTask): Change the ASSERT because at this point we should always
531         have a PendingDownload, and then remove it from the map here before adding the final Download to the map.
532         (WebKit::DownloadManager::convertNetworkLoadToDownload): This replaces convertHandleToDownload, but it also now
533         used for the NetworkSession. It creates a PendingDownload for the given NetworkLoad.
534         (WebKit::DownloadManager::continueDecidePendingDownloadDestination): Do not take the PendingDownload from the
535         map here, just check it's present, because it will be removed from dataTaskBecameDownloadTask().
536         (WebKit::DownloadManager::convertHandleToDownload): Deleted.
537         * NetworkProcess/Downloads/DownloadManager.h:
538         * NetworkProcess/Downloads/PendingDownload.cpp:
539         (WebKit::PendingDownload::PendingDownload): Add a constructor that receives a NetworkLoad.
540         * NetworkProcess/Downloads/PendingDownload.h:
541         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
542         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Just ask the ResourceLoader to be
543         converted to a download.
544         * NetworkProcess/NetworkDataTask.h:
545         * NetworkProcess/NetworkDataTaskBlob.cpp:
546         (WebKit::NetworkDataTaskBlob::download): Do not call didBecomeDownload() and add an assert to ensure the client
547         has already been removed right after the final Download object is created.
548         * NetworkProcess/NetworkLoad.cpp:
549         (WebKit::NetworkLoad::NetworkLoad): Use a pointer for the client instead of a reference because now we need to
550         change the client when the load is converted to a download. We don't need to null check the client in any case
551         because the member is only updated internally and always from a passed reference.
552         (WebKit::NetworkLoad::sharedDidReceiveResponse):
553         (WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
554         (WebKit::NetworkLoad::convertTaskToDownload): This now receives a PendingDownload. It updates the client and no
555         longer sends DidStart, because the PendingDownload sends it now.
556         (WebKit::NetworkLoad::didReceiveChallenge):
557         (WebKit::NetworkLoad::didReceiveData):
558         (WebKit::NetworkLoad::didCompleteWithError):
559         (WebKit::NetworkLoad::didSendData):
560         (WebKit::NetworkLoad::wasBlocked):
561         (WebKit::NetworkLoad::cannotShowURL):
562         (WebKit::NetworkLoad::didReceiveBuffer):
563         (WebKit::NetworkLoad::didFinishLoading):
564         (WebKit::NetworkLoad::didFail):
565         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
566         (WebKit::NetworkLoad::didBecomeDownload): Deleted.
567         * NetworkProcess/NetworkLoad.h:
568         * NetworkProcess/NetworkLoadClient.h: Remove didBecomeDownload().
569         * NetworkProcess/NetworkResourceLoader.cpp:
570         (WebKit::NetworkResourceLoader::convertToDownload): This replaces didBecomeDownload() and
571         didConvertToDownload(). It transfers the NetworkLoad to the DownloadManager.
572         (WebKit::NetworkResourceLoader::abort): We don't need to check if the load was converted to a download here,
573         because m_networkLoad will always be null here in such case.
574         (WebKit::NetworkResourceLoader::didBecomeDownload): Deleted
575         (WebKit::NetworkResourceLoader::didConvertToDownload): Deleted
576         * NetworkProcess/NetworkResourceLoader.h:
577         * NetworkProcess/PingLoad.h: Remove didBecomeDownload().
578         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: Ditto.
579         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Ditto.
580         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: Ditto.
581         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
582         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): Do not call didBecomeDownload().
583         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
584         (WebKit::NetworkDataTaskSoup::download): Do not call didBecomeDownload() and add an assert to ensure the client
585         has already been removed right after the final Download object is created.
586
587 2016-11-09  Alex Christensen  <achristensen@webkit.org>
588
589         Unreviewed, rolling out r208438.
590
591         crashes
592
593         Reverted changeset:
594
595         "[WK2][NETWORK_SESSION] Add support for downloading file
596         backed blobs"
597         https://bugs.webkit.org/show_bug.cgi?id=164458
598         http://trac.webkit.org/changeset/208438
599
600 2016-11-04  Brent Fulgham  <bfulgham@apple.com>
601
602         Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked
603         https://bugs.webkit.org/show_bug.cgi?id=155185
604         <rdar://problem/11101440>
605
606         Reviewed by Brady Eidson.
607
608         Provide SPI to access the new quirk for localStorage. The quirk defaults to 'on'. When active, this
609         quirk says that localStorage access should be granted, without needing to grant universal file access.
610
611         If the quirk is turned off, then localStorage is blocked unless the WebKit client explicitly
612         grants universal file access.
613         
614         Tested by existing TestWebKitAPI tests and WebKit2.LocalStorageQuirkTest
615
616         * Shared/WebPreferencesDefinitions.h:
617         * UIProcess/API/C/WKPreferences.cpp:
618         (WKPreferencesSetNeedsLocalStorageQuirk): Added.
619         (WKPreferencesGetNeedsLocalStorageQuirk): Added.
620         * UIProcess/API/C/WKPreferencesRefPrivate.h:
621         * UIProcess/API/Cocoa/WKWebView.mm:
622         (-[WKWebView _initializeWithConfiguration:]): Honor the new localStorage quirk.
623         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
624         (-[WKWebViewConfiguration init]): Honor the new localStorage quirk flag.
625         (-[WKWebViewConfiguration copyWithZone:]): Ditto.
626         (-[WKWebViewConfiguration _needsLocalStorageQuirk]): Added.
627         (-[WKWebViewConfiguration _setNeedsLocalStorageQuirk:]): Added.
628         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
629         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
630         (WKBundleSetNeedsLocalStorageQuirk): Added.
631         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
632         * WebProcess/InjectedBundle/InjectedBundle.cpp:
633         (WebKit::InjectedBundle::setNeedsLocalStorageQuirk): Added.
634         * WebProcess/InjectedBundle/InjectedBundle.h:
635         * WebProcess/WebPage/WebPage.cpp:
636         (WebKit::WebPage::updatePreferences): Honor the new localStorage quirk flag.
637
638 2016-11-09  Simon Fraser  <simon.fraser@apple.com>
639
640         Implement visual-viewport based position:fixed handling for Mac async scrolling
641         https://bugs.webkit.org/show_bug.cgi?id=164495
642
643         Reviewed by Tim Horton.
644
645         Educate the scrolling tree about visual and layout viewports. This is runtime-switchable,
646         so we push the enable flag to via the root state node, then push the layout viewport,
647         and the min/max scroll position that contstrain it, through frame state nodes.
648
649         When a scroll happens, we compute a new layout viewport when the visual viewport hits
650         an edge, and push that down through setScrollLayerPosition() since it's used to position
651         fixed and sticky layers.
652
653         The iOS code is made to compile, but not work yet.
654
655         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
656         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
657         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
658         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
659         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
660         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
661         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
662         (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
663         * UIProcess/Scrolling/RemoteScrollingTree.h:
664         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
665         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
666         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition):
667         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
668         (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
669
670 2016-11-09  Beth Dakin  <bdakin@apple.com>
671
672         More attempted build fix.
673
674         * UIProcess/Cocoa/WebViewImpl.mm:
675
676 2016-11-09  Alex Christensen  <achristensen@webkit.org>
677
678         Clean up Storage code
679         https://bugs.webkit.org/show_bug.cgi?id=164562
680
681         Reviewed by Brady Eidson.
682
683         Use more Refs!
684
685         * NetworkProcess/CustomProtocols/CustomProtocolManager.h:
686         * Platform/IPC/Connection.cpp:
687         (IPC::Connection::addWorkQueueMessageReceiver):
688         * Platform/IPC/Connection.h:
689         * UIProcess/Storage/LocalStorageDatabase.cpp:
690         (WebKit::LocalStorageDatabase::create):
691         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
692         * UIProcess/Storage/LocalStorageDatabase.h:
693         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
694         (WebKit::LocalStorageDatabaseTracker::create):
695         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
696         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
697         * UIProcess/Storage/StorageManager.cpp:
698         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
699         (WebKit::StorageManager::StorageManager):
700         * UIProcess/Storage/StorageManager.h:
701         * UIProcess/WebResourceLoadStatisticsStore.cpp:
702         (WebKit::WebResourceLoadStatisticsStore::processWillOpenConnection):
703         * UIProcess/mac/SecItemShimProxy.cpp:
704         (WebKit::SecItemShimProxy::initializeConnection):
705         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
706         (WebKit::PluginProcessConnectionManager::initializeConnection):
707         * WebProcess/WebPage/EventDispatcher.cpp:
708         (WebKit::EventDispatcher::initializeConnection):
709         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
710         (WebKit::ViewUpdateDispatcher::initializeConnection):
711
712 2016-11-09  Beth Dakin  <bdakin@apple.com>
713
714         Another attempted build fix.
715
716         * UIProcess/Cocoa/WebViewImpl.mm:
717
718 2016-11-09  Michael Catanzaro  <mcatanzaro@igalia.com>
719
720         Experimental features should not be enabled by default
721         https://bugs.webkit.org/show_bug.cgi?id=164367
722
723         Reviewed by Darin Adler.
724
725         We have two classes of experimental features:
726
727         (1) Features that are unstable and should be off by default, except for the developers
728             currently working on them. This is straightforward to handle; the default value should
729             be false.
730         (2) Features that are still not ready for end users, but are stable enough for testing. We
731             want these features to be enabled in testing environments like the bots, MiniBrowser,
732             Safari Tech Preview, and so forth, but not in stable release builds.
733
734         Implement this. It is better than having all experimental features on unconditionally, and
735         expecting them to be disabled manually on release branches, which is not something we are
736         keen to do. An exception is Cocoa ports, which to my knowledge do not currently have any
737         concept of development builds. These ports seem happy to continue disabling features
738         manually in release branches, and should continue to do so at least for now.
739
740         We also have features that we wish to enumerate at runtime, yet have enabled by default
741         unconditionally. We do not currently have any infrastructure to support this and should not
742         abuse the experimental status for this purpose; it requires future work. All settings can
743         still be toggled at runtime by clients that know about them using the existing runtime
744         features API.
745
746         Lastly, the custom elements feature is ready to be enabled by default, so it's no longer
747         experimental and can graduate to the list of normal boolean features.
748
749         * Shared/WebPreferencesDefinitions.h:
750
751 2016-11-09  Beth Dakin  <bdakin@apple.com>
752
753         Build fix.
754
755         * UIProcess/Cocoa/WebViewImpl.mm:
756
757 2016-11-09  Brady Eidson  <beidson@apple.com>
758
759         IndexedDB 2.0: Encapsulate cursor iteration parameters for easy future expansion.
760         https://bugs.webkit.org/show_bug.cgi?id=164504
761
762         Reviewed by Darin Adler.
763
764         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
765         (WebKit::WebIDBConnectionToClient::iterateCursor):
766         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
767         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
768
769         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
770         (WebKit::WebIDBConnectionToServer::iterateCursor):
771         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
772
773 2016-11-09  Darin Adler  <darin@apple.com>
774
775         Move Range from ExceptionCode to ExceptionOr
776         https://bugs.webkit.org/show_bug.cgi?id=164457
777
778         Reviewed by Alex Christensen.
779
780         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
781         (webkit_dom_range_set_start): Updated exception handling.
782         (webkit_dom_range_set_end): Ditto.
783         (webkit_dom_range_set_start_before): Ditto.
784         (webkit_dom_range_set_start_after): Ditto.
785         (webkit_dom_range_set_end_before): Ditto.
786         (webkit_dom_range_set_end_after): Ditto.
787         (webkit_dom_range_select_node): Ditto.
788         (webkit_dom_range_select_node_contents): Ditto.
789         (webkit_dom_range_compare_boundary_points): Ditto.
790         (webkit_dom_range_delete_contents): Ditto.
791         (webkit_dom_range_extract_contents): Ditto.
792         (webkit_dom_range_clone_contents): Ditto.
793         (webkit_dom_range_insert_node): Ditto.
794         (webkit_dom_range_surround_contents): Ditto.
795         (webkit_dom_range_create_contextual_fragment): Ditto.
796         (webkit_dom_range_compare_node): Ditto.
797         (webkit_dom_range_intersects_node): Ditto.
798         (webkit_dom_range_compare_point): Ditto.
799         (webkit_dom_range_is_point_in_range): Ditto.
800         (webkit_dom_range_expand): Ditto.
801         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
802         (-[WKDOMRange setStart:offset:]): Ditto.
803         (-[WKDOMRange setEnd:offset:]): Ditto.
804         (-[WKDOMRange selectNode:]): Ditto.
805         (-[WKDOMRange selectNodeContents:]): Ditto.
806         * WebProcess/WebPage/WebFrame.cpp:
807         (WebKit::WebFrame::contentsAsString): Ditto.
808         * WebProcess/WebPage/ios/WebPageIOS.mm:
809         (WebKit::WebPage::rangeForWebSelectionAtPosition): Ditto.
810         (WebKit::WebPage::rangeForBlockAtPoint): Ditto.
811         (WebKit::WebPage::selectWithGesture): Ditto.
812         (WebKit::containsRange): Ditto.
813         (WebKit::unionDOMRanges): Ditto.
814         (WebKit::WebPage::switchToBlockSelectionAtPoint): Ditto.
815         (WebKit::WebPage::getPositionInformation): Ditto.
816
817
818 2016-11-09  Darin Adler  <darin@apple.com>
819
820         Move EventTarget from ExceptionCode to ExceptionOr
821         https://bugs.webkit.org/show_bug.cgi?id=164465
822
823         Reviewed by Youenn Fablet.
824
825         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
826         (webkit_dom_attr_dispatch_event): Updated exception handling.
827         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
828         (webkit_dom_cdata_section_dispatch_event): Ditto.
829         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
830         (webkit_dom_character_data_dispatch_event): Ditto.
831         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
832         (webkit_dom_comment_dispatch_event): Ditto.
833         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
834         (webkit_dom_dom_window_dispatch_event): Ditto.
835         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
836         (webkit_dom_document_dispatch_event): Ditto.
837         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
838         (webkit_dom_document_fragment_dispatch_event): Ditto.
839         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
840         (webkit_dom_document_type_dispatch_event): Ditto.
841         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
842         (webkit_dom_element_dispatch_event): Ditto.
843         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
844         (webkit_dom_html_anchor_element_dispatch_event): Ditto.
845         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
846         (webkit_dom_html_applet_element_dispatch_event): Ditto.
847         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
848         (webkit_dom_html_area_element_dispatch_event): Ditto.
849         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
850         (webkit_dom_html_br_element_dispatch_event): Ditto.
851         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
852         (webkit_dom_html_base_element_dispatch_event): Ditto.
853         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
854         (webkit_dom_html_body_element_dispatch_event): Ditto.
855         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
856         (webkit_dom_html_button_element_dispatch_event): Ditto.
857         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
858         (webkit_dom_html_canvas_element_dispatch_event): Ditto.
859         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
860         (webkit_dom_html_d_list_element_dispatch_event): Ditto.
861         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
862         (webkit_dom_html_directory_element_dispatch_event): Ditto.
863         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
864         (webkit_dom_html_div_element_dispatch_event): Ditto.
865         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
866         (webkit_dom_html_document_dispatch_event): Ditto.
867         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
868         (webkit_dom_html_element_dispatch_event): Ditto.
869         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
870         (webkit_dom_html_embed_element_dispatch_event): Ditto.
871         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
872         (webkit_dom_html_field_set_element_dispatch_event): Ditto.
873         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
874         (webkit_dom_html_font_element_dispatch_event): Ditto.
875         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
876         (webkit_dom_html_form_element_dispatch_event): Ditto.
877         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
878         (webkit_dom_html_frame_element_dispatch_event): Ditto.
879         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
880         (webkit_dom_html_frame_set_element_dispatch_event): Ditto.
881         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
882         (webkit_dom_html_hr_element_dispatch_event): Ditto.
883         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
884         (webkit_dom_html_heading_element_dispatch_event): Ditto.
885         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
886         (webkit_dom_html_head_element_dispatch_event): Ditto.
887         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
888         (webkit_dom_html_html_element_dispatch_event): Ditto.
889         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
890         (webkit_dom_html_iframe_element_dispatch_event): Ditto.
891         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
892         (webkit_dom_html_image_element_dispatch_event): Ditto.
893         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
894         (webkit_dom_html_input_element_dispatch_event): Ditto.
895         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
896         (webkit_dom_html_li_element_dispatch_event): Ditto.
897         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
898         (webkit_dom_html_label_element_dispatch_event): Ditto.
899         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
900         (webkit_dom_html_legend_element_dispatch_event): Ditto.
901         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
902         (webkit_dom_html_link_element_dispatch_event): Ditto.
903         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
904         (webkit_dom_html_map_element_dispatch_event): Ditto.
905         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
906         (webkit_dom_html_marquee_element_dispatch_event): Ditto.
907         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
908         (webkit_dom_html_menu_element_dispatch_event): Ditto.
909         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
910         (webkit_dom_html_meta_element_dispatch_event): Ditto.
911         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
912         (webkit_dom_html_mod_element_dispatch_event): Ditto.
913         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
914         (webkit_dom_html_o_list_element_dispatch_event): Ditto.
915         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
916         (webkit_dom_html_object_element_dispatch_event): Ditto.
917         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
918         (webkit_dom_html_opt_group_element_dispatch_event): Ditto.
919         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
920         (webkit_dom_html_option_element_dispatch_event): Ditto.
921         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
922         (webkit_dom_html_paragraph_element_dispatch_event): Ditto.
923         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
924         (webkit_dom_html_param_element_dispatch_event): Ditto.
925         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
926         (webkit_dom_html_pre_element_dispatch_event): Ditto.
927         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
928         (webkit_dom_html_quote_element_dispatch_event): Ditto.
929         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
930         (webkit_dom_html_script_element_dispatch_event): Ditto.
931         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
932         (webkit_dom_html_select_element_dispatch_event): Ditto.
933         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
934         (webkit_dom_html_style_element_dispatch_event): Ditto.
935         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
936         (webkit_dom_html_table_caption_element_dispatch_event): Ditto.
937         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
938         (webkit_dom_html_table_cell_element_dispatch_event): Ditto.
939         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
940         (webkit_dom_html_table_col_element_dispatch_event): Ditto.
941         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
942         (webkit_dom_html_table_element_dispatch_event): Ditto.
943         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
944         (webkit_dom_html_table_row_element_dispatch_event): Ditto.
945         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
946         (webkit_dom_html_table_section_element_dispatch_event): Ditto.
947         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
948         (webkit_dom_html_text_area_element_dispatch_event): Ditto.
949         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
950         (webkit_dom_html_title_element_dispatch_event): Ditto.
951         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
952         (webkit_dom_html_u_list_element_dispatch_event): Ditto.
953         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
954         (webkit_dom_node_dispatch_event): Ditto.
955         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
956         (webkit_dom_processing_instruction_dispatch_event): Ditto.
957         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
958         (webkit_dom_text_dispatch_event): Ditto.
959
960 2016-11-08  Dean Jackson  <dino@apple.com>
961
962         Rendering support for ExtendedColors
963         https://bugs.webkit.org/show_bug.cgi?id=164443
964         <rdar://problems/29123243>
965
966         Reviewed by Simon Fraser and Darin Adler.
967
968         Implement argument coders for Color.
969
970         * Shared/WebCoreArgumentCoders.cpp:
971         (IPC::ArgumentCoder<Color>::encode):
972         (IPC::ArgumentCoder<Color>::decode):
973         * Shared/WebCoreArgumentCoders.h:
974         * UIProcess/API/Cocoa/WKWebView.mm:
975         (-[WKWebView _updateScrollViewBackground]):
976
977 2016-11-09  Beth Dakin  <bdakin@apple.com>
978
979         Build fix.
980
981         * UIProcess/Cocoa/WebViewImpl.mm:
982         (WebKit::WebViewImpl::~WebViewImpl):
983
984 2016-11-09  Chris Dumez  <cdumez@apple.com>
985
986         [Mac] Stop using deprecated AppKit enumeration values
987         https://bugs.webkit.org/show_bug.cgi?id=164494
988
989         Reviewed by Darin Adler.
990
991         Stop using deprecated AppKit enumeration values.
992
993         * Shared/mac/ChildProcessMac.mm:
994         (WebKit::ChildProcess::stopNSAppRunLoop):
995         * Shared/mac/WebEventFactory.mm:
996         (WebKit::mouseButtonForEvent):
997         (WebKit::mouseEventTypeForEvent):
998         (WebKit::clickCountForEvent):
999         (WebKit::globalPointForEvent):
1000         (WebKit::pointForEvent):
1001         (WebKit::textFromEvent):
1002         (WebKit::unmodifiedTextFromEvent):
1003         (WebKit::isKeypadEvent):
1004         (WebKit::isKeyUpEvent):
1005         (WebKit::WebEventFactory::createWebKeyboardEvent):
1006         * UIProcess/Cocoa/WebViewImpl.mm:
1007         (WebKit::WebViewImpl::becomeFirstResponder):
1008         (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
1009         (WebKit::WebViewImpl::viewDidMoveToWindow):
1010         (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
1011         (WebKit::WebViewImpl::createFullScreenWindow):
1012         (WebKit::WebViewImpl::sendToolTipMouseExited):
1013         (WebKit::WebViewImpl::sendToolTipMouseEntered):
1014         (WebKit::applicationFlagsForDrag):
1015         (WebKit::WebViewImpl::setLastMouseDownEvent):
1016         (WebKit::WebViewImpl::doneWithKeyEvent):
1017         (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
1018         (WebKit::WebViewImpl::performKeyEquivalent):
1019         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1020         (WebKit::PluginProcessProxy::beginModal):
1021         * UIProcess/mac/WebContextMenuProxyMac.mm:
1022         (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
1023         * UIProcess/mac/WebInspectorProxyMac.mm:
1024         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1025         (WebKit::WebPopupMenuProxyMac::populate):
1026         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
1027         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
1028         (WebKit::modifierFlagsFromWebEvent):
1029         (WebKit::getEventTypeFromWebEvent):
1030         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
1031         (WebKit::cssAlignmentValueForNSTextAlignment):
1032         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1033         (WebKit::convertImageToBitmap):
1034
1035 2016-11-09  Beth Dakin  <bdakin@apple.com>
1036
1037         Support TouchBar in WebKit
1038         https://bugs.webkit.org/show_bug.cgi?id=164437
1039         -and corresponding-
1040         rdar://problem/28876524
1041
1042         Reviewed by Darin Adler.
1043
1044         * UIProcess/API/Cocoa/WKViewPrivate.h:
1045         * UIProcess/API/Cocoa/WKWebView.mm:
1046         (-[WKWebView makeTouchBar]):
1047         (-[WKWebView candidateListTouchBarItem]):
1048         (-[WKWebView _web_didAddMediaControlsManager:]):
1049         (-[WKWebView _web_didRemoveMediaControlsManager]):
1050         (-[WKWebView _interactWithMediaControlsForTesting]):
1051         (-[WKWebView _wantsMediaPlaybackControlsView]):
1052         (-[WKWebView _setWantsMediaPlaybackControlsView:]):
1053         (-[WKWebView _mediaPlaybackControlsView]):
1054         (-[WKWebView _addMediaPlaybackControlsView:]):
1055         (-[WKWebView _removeMediaPlaybackControlsView]):
1056         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1057         * UIProcess/API/mac/WKView.mm:
1058         (-[WKView makeTouchBar]):
1059         (-[WKView candidateListTouchBarItem]):
1060         (-[WKView _web_didAddMediaControlsManager:]):
1061         (-[WKView _web_didRemoveMediaControlsManager]):
1062         (-[WKView _wantsMediaPlaybackControlsView]):
1063         (-[WKView _setWantsMediaPlaybackControlsView:]):
1064         (-[WKView _mediaPlaybackControlsView]):
1065         (-[WKView _addMediaPlaybackControlsView:]):
1066         (-[WKView _removeMediaPlaybackControlsView]):
1067         * UIProcess/Cocoa/WebViewImpl.h:
1068         (WebKit::WebViewImpl::currentTouchBar):
1069         (WebKit::WebViewImpl::clientWantsMediaPlaybackControlsView):
1070         (WebKit::WebViewImpl::setClientWantsMediaPlaybackControlsView):
1071         (WebKit::WebViewImpl::setIsCustomizingTouchBar):
1072         * UIProcess/Cocoa/WebViewImpl.mm:
1073         (-[WKTextListTouchBarViewController initWithWebViewImpl:]):
1074         (-[WKTextListTouchBarViewController didDestroyView]):
1075         (-[WKTextListTouchBarViewController _selectList:]):
1076         (-[WKTextListTouchBarViewController setCurrentListType:]):
1077         (-[WKTextTouchBarItemController initWithWebViewImpl:]):
1078         (-[WKTextTouchBarItemController didDestroyView]):
1079         (-[WKTextTouchBarItemController touchBar:makeItemForIdentifier:]):
1080         (-[WKTextTouchBarItemController itemForIdentifier:]):
1081         (-[WKTextTouchBarItemController candidateListTouchBarItem:endSelectingCandidateAtIndex:]):
1082         (-[WKTextTouchBarItemController candidateListTouchBarItem:changedCandidateListVisibility:]):
1083         (-[WKTextTouchBarItemController textListTouchBarViewController]):
1084         (-[WKTextTouchBarItemController setTextIsBold:]):
1085         (-[WKTextTouchBarItemController setTextIsItalic:]):
1086         (-[WKTextTouchBarItemController setTextIsUnderlined:]):
1087         (-[WKTextTouchBarItemController _wkChangeTextStyle:]):
1088         (-[WKTextTouchBarItemController setCurrentTextAlignment:]):
1089         (-[WKTextTouchBarItemController _wkChangeTextAlignment:]):
1090         (-[WKTextTouchBarItemController textColor]):
1091         (-[WKTextTouchBarItemController setTextColor:]):
1092         (-[WKTextTouchBarItemController _wkChangeColor:]):
1093         (-[WKTextTouchBarItemController textListViewController]):
1094         (WebKit::WebViewImpl::makeTouchBar):
1095         (WebKit::WebViewImpl::candidateListTouchBarItem):
1096         (WebKit::WebViewImpl::mediaPlaybackControlsView):
1097         (WebKit::WebViewImpl::useMediaPlaybackControlsView):
1098         (WebKit::WebViewImpl::dismissTextTouchBarPopoverItemWithIdentifier):
1099         (WebKit::textTouchBarCustomizationAllowedIdentifiers):
1100         (WebKit::plainTextTouchBarCustomizationDefaultItemIdentifiers):
1101         (WebKit::richTextTouchBarCustomizationDefaultItemIdentifiers):
1102         (WebKit::touchBarDidExitCustomization):
1103         (WebKit::touchBarWillEnterCustomization):
1104         (WebKit::didChangeAutomaticTextCompletion):
1105         (WebKit::WebViewImpl::updateTouchBarAndRefreshTextBarIdentifiers):
1106         (WebKit::WebViewImpl::setUpTextTouchBar):
1107         (WebKit::WebViewImpl::isRichlyEditable):
1108         (WebKit::WebViewImpl::textTouchBar):
1109         (WebKit::WebViewImpl::updateTextTouchBar):
1110         (WebKit::WebViewImpl::updateMediaTouchBar):
1111         (WebKit::WebViewImpl::forceRequestCandidatesForTesting):
1112         (WebKit::WebViewImpl::updateTouchBar):
1113         (WebKit::WebViewImpl::shouldRequestCandidates):
1114         (WebKit::WebViewImpl::showCandidates):
1115         (WebKit::WebViewImpl::webViewImplAdditionsWillDestroyView):
1116         (WebKit::WebViewImpl::setEditableElementIsFocused):
1117         (WebKit::WebViewImpl::becomeFirstResponder):
1118         (WebKit::WebViewImpl::selectionDidChange):
1119         (WebKit::WebViewImpl::videoControlsManagerDidChange):
1120         (WebKit::WebViewImpl::updateWebViewImplAdditions): Deleted.
1121
1122 2016-11-09  Chris Dumez  <cdumez@apple.com>
1123
1124         [WK2][NETWORK_SESSION] Add support for downloading file backed blobs
1125         https://bugs.webkit.org/show_bug.cgi?id=164458
1126         <rdar://problem/28905514>
1127
1128         Reviewed by Darin Adler.
1129
1130         Add support for downloading file backed blobs on WebKit2.
1131         It previously wasn't working because we weren't calling
1132         BlobDataFileReference::prepareForFileAccess() for each blob file before
1133         starting the download, similarly to what is done in NetworkResourceLoader's
1134         consumeSandboxExtensions().
1135
1136         * NetworkProcess/Downloads/DownloadManager.cpp:
1137         (WebKit::DownloadManager::startDownload):
1138         * NetworkProcess/Downloads/DownloadManager.h:
1139         (WebKit::DownloadManager::startDownload):
1140         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1141         (WebKit::NetworkConnectionToWebProcess::startDownload):
1142         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1143         * NetworkProcess/NetworkDataTask.cpp:
1144         (WebKit::NetworkDataTask::create):
1145         * NetworkProcess/NetworkDataTask.h:
1146         * NetworkProcess/NetworkDataTaskBlob.cpp:
1147         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
1148         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
1149         (WebKit::NetworkDataTaskBlob::download):
1150         * NetworkProcess/NetworkDataTaskBlob.h:
1151         * NetworkProcess/NetworkLoad.cpp:
1152         (WebKit::NetworkLoad::NetworkLoad):
1153         * NetworkProcess/NetworkLoadParameters.h:
1154         * NetworkProcess/NetworkProcess.cpp:
1155         (WebKit::NetworkProcess::downloadRequest):
1156         * NetworkProcess/NetworkResourceLoader.cpp:
1157         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1158         (WebKit::NetworkResourceLoader::startNetworkLoad):
1159         * NetworkProcess/PingLoad.h:
1160
1161 2016-11-09  Chris Dumez  <cdumez@apple.com>
1162
1163         [WK2] Network cache speculative revalidation can cause loads to hang
1164         https://bugs.webkit.org/show_bug.cgi?id=164532
1165         <rdar://problem/28519331>
1166
1167         Reviewed by Alex Christensen.
1168
1169         Network cache speculative revalidation could cause loads to hang when HTTP
1170         authentication was involved because NetworkCacheSpeculativeLoad failed to
1171         call NetworkLoad::continueCanAuthenticateAgainstProtectionSpace() in its
1172         canAuthenticateAgainstProtectionSpaceAsync() callback.
1173
1174         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
1175         (WebKit::NetworkCache::SpeculativeLoad::canAuthenticateAgainstProtectionSpaceAsync):
1176         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
1177
1178 2016-11-09  Csaba Osztrogonác  <ossy@webkit.org>
1179
1180         URTBF after r208361.
1181
1182         * PlatformMac.cmake:
1183
1184 2016-11-09  Csaba Osztrogonác  <ossy@webkit.org>
1185
1186         Unreviewed typo fix after r160616 to fix the build on case sensitive file systems.
1187
1188         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1189
1190 2016-11-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1191
1192         [SOUP] Layout test http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html fails
1193         https://bugs.webkit.org/show_bug.cgi?id=139358
1194
1195         Reviewed by Michael Catanzaro.
1196
1197         Stop putting the credentials in the URL unconditionally and ensure we only do that when provided by the URL
1198         itself. Libsoup has its own cache of SoupAuth, so we don't need to pass user/pass in the URL for every single
1199         request, libsoup will authenticate those automatically.
1200
1201         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1202         (WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):
1203
1204 2016-11-04  Filip Pizlo  <fpizlo@apple.com>
1205
1206         WTF::ParkingLot should stop using std::chrono because std::chrono::duration casts are prone to overflows
1207         https://bugs.webkit.org/show_bug.cgi?id=152045
1208
1209         Reviewed by Andy Estes.
1210
1211         * Platform/IPC/Connection.cpp:
1212         (IPC::Connection::SyncMessageState::wait):
1213         (IPC::Connection::sendMessage):
1214         (IPC::Connection::timeoutRespectingIgnoreTimeoutsForTesting):
1215         (IPC::Connection::waitForMessage):
1216         (IPC::Connection::sendSyncMessage):
1217         (IPC::Connection::waitForSyncReply):
1218         * Platform/IPC/Connection.h:
1219         (IPC::Connection::sendSync):
1220         (IPC::Connection::waitForAndDispatchImmediately):
1221         * Platform/IPC/MessageSender.h:
1222         (IPC::MessageSender::sendSync):
1223         * UIProcess/ChildProcessProxy.h:
1224         (WebKit::ChildProcessProxy::sendSync):
1225         * UIProcess/Network/NetworkProcessProxy.cpp:
1226         (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
1227         * UIProcess/Storage/StorageManager.cpp:
1228         (WebKit::StorageManager::applicationWillTerminate):
1229         * UIProcess/WebProcessProxy.cpp:
1230         (WebKit::WebProcessProxy::sendProcessWillSuspendImminently):
1231         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1232         (WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):
1233         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1234         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1235         (-[WKOneShotDisplayLinkHandler displayLinkFired:]):
1236         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1237         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
1238         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
1239         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1240         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
1241         * UIProcess/mac/WKImmediateActionController.mm:
1242         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
1243         * UIProcess/mac/WebPageProxyMac.mm:
1244         (WebKit::WebPageProxy::stringSelectionForPasteboard):
1245         (WebKit::WebPageProxy::dataSelectionForPasteboard):
1246         (WebKit::WebPageProxy::readSelectionFromPasteboard):
1247         (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
1248         (WebKit::WebPageProxy::acceptsFirstMouse):
1249         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1250         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1251         (WebKit::WebChromeClient::runJavaScriptAlert):
1252         (WebKit::WebChromeClient::runJavaScriptConfirm):
1253         (WebKit::WebChromeClient::runJavaScriptPrompt):
1254         (WebKit::WebChromeClient::print):
1255         (WebKit::WebChromeClient::exceededDatabaseQuota):
1256         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
1257         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1258         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1259         * WebProcess/WebPage/WebPage.cpp:
1260         (WebKit::WebPage::postSynchronousMessageForTesting):
1261
1262 2016-11-04  Wenson Hsieh  <wenson_hsieh@apple.com>
1263
1264         Safari does not emit composition end if blurred for dead key / Japanese IME
1265         https://bugs.webkit.org/show_bug.cgi?id=164369
1266         <rdar://problem/29050439>
1267
1268         Reviewed by Ryosuke Niwa.
1269
1270         Split WebPage::discardedComposition into two steps, where we first discard marked text and then update the
1271         editor state. This allows the codepath where we cancel the composition early (before setting the selection) to
1272         discard marked text without also forcing an editor state update at the same time. The editor state is later
1273         updated in WebPage::didChangeSelection.
1274
1275         * UIProcess/WebPageProxy.cpp:
1276         (WebKit::WebPageProxy::compositionWasCanceled):
1277         * UIProcess/WebPageProxy.h:
1278         * UIProcess/WebPageProxy.messages.in:
1279         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1280         (WebKit::WebEditorClient::canceledComposition):
1281         * WebProcess/WebCoreSupport/WebEditorClient.h:
1282         * WebProcess/WebPage/WebPage.cpp:
1283         (WebKit::WebPage::didChangeSelection):
1284         (WebKit::WebPage::discardedComposition):
1285         (WebKit::WebPage::canceledComposition):
1286         * WebProcess/WebPage/WebPage.h:
1287
1288 2016-11-04  Alex Christensen  <achristensen@webkit.org>
1289
1290         Unreviewed, rolling out r208293.
1291
1292         asserts in API tests.
1293
1294         Reverted changeset:
1295
1296         "NetworkSession: Network process crash when converting main
1297         resource to download"
1298         https://bugs.webkit.org/show_bug.cgi?id=164220
1299         http://trac.webkit.org/changeset/208293
1300
1301 2016-11-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
1302
1303         Add a setting and preferences to enable/disable async image decoding
1304         https://bugs.webkit.org/show_bug.cgi?id=164417
1305
1306         Reviewed by Simon Fraser.
1307
1308         Hook up the asyncImageDecodingEnabled setting for WebKit2.
1309
1310         * Shared/WebPreferencesDefinitions.h:
1311         * UIProcess/API/Cocoa/WKPreferences.mm:
1312         (-[WKPreferences _asyncImageDecodingEnabled]):
1313         (-[WKPreferences _setAsyncImageDecodingEnabled:]):
1314         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1315         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1316         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1317         * WebProcess/WebPage/WebPage.cpp:
1318         (WebKit::WebPage::updatePreferences):
1319
1320 2016-11-04  Simon Fraser  <simon.fraser@apple.com>
1321
1322         Rename some ScrollingTree/Node-related functions to reduce the number of uses of "update"
1323         https://bugs.webkit.org/show_bug.cgi?id=164420
1324
1325         Reviewed by Tim Horton.
1326
1327         Rename:
1328             commitNewTreeState -> commitTreeState ("new" was redundant)
1329             updateBeforeChildren -> commitStateBeforeChildren
1330             updateAfterChildren -> commitStateAfterChildren
1331
1332
1333         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1334         (WebKit::RemoteScrollingCoordinatorProxy::commitScrollingTreeState):
1335         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Deleted.
1336         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1337         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1338         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1339         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
1340         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
1341         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren): Deleted.
1342         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Deleted.
1343         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1344         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1345
1346 2016-11-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1347
1348         NetworkSession: Add NetworkDataTask implementation for blobs
1349         https://bugs.webkit.org/show_bug.cgi?id=163939
1350
1351         Reviewed by Alex Christensen.
1352
1353         Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
1354         adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
1355         is enabled.
1356
1357         * CMakeLists.txt: Add new files to compilation.
1358         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1359         * NetworkProcess/Downloads/BlobDownloadClient.h:
1360         * NetworkProcess/Downloads/Download.cpp:
1361         (WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
1362         definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
1363         reveices a NetworkDataTask and is used by Soup backend and blobs.
1364         (WebKit::Download::~Download):
1365         (WebKit::Download::start):
1366         (WebKit::Download::startWithHandle):
1367         (WebKit::Download::cancel):
1368         (WebKit::Download::didReceiveAuthenticationChallenge):
1369         (WebKit::Download::didReceiveData):
1370         (WebKit::Download::didFinish):
1371         (WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
1372         this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.
1373         * NetworkProcess/Downloads/Download.h:
1374         (WebKit::Download::Download):
1375         (WebKit::Download::suggestedName):
1376         (WebKit::Download::request):
1377         * NetworkProcess/Downloads/DownloadManager.cpp:
1378         (WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
1379         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
1380         * NetworkProcess/Downloads/DownloadManager.h:
1381         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
1382         (WebKit::Download::platformCancelNetworkLoad):
1383         * NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
1384         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1385         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
1386         using NetworkSession.
1387         * NetworkProcess/NetworkDataTask.cpp:
1388         (WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.
1389         * NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
1390         * NetworkProcess/NetworkDataTaskBlob.cpp: Added.
1391         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
1392         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
1393         (WebKit::NetworkDataTaskBlob::clearStream):
1394         (WebKit::NetworkDataTaskBlob::resume):
1395         (WebKit::NetworkDataTaskBlob::suspend):
1396         (WebKit::NetworkDataTaskBlob::cancel):
1397         (WebKit::NetworkDataTaskBlob::invalidateAndCancel):
1398         (WebKit::NetworkDataTaskBlob::getSizeForNext):
1399         (WebKit::NetworkDataTaskBlob::didGetSize):
1400         (WebKit::NetworkDataTaskBlob::seek):
1401         (WebKit::NetworkDataTaskBlob::didReceiveResponse):
1402         (WebKit::NetworkDataTaskBlob::read):
1403         (WebKit::NetworkDataTaskBlob::readData):
1404         (WebKit::NetworkDataTaskBlob::readFile):
1405         (WebKit::NetworkDataTaskBlob::didOpen):
1406         (WebKit::NetworkDataTaskBlob::didRead):
1407         (WebKit::NetworkDataTaskBlob::consumeData):
1408         (WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
1409         (WebKit::NetworkDataTaskBlob::suggestedFilename):
1410         (WebKit::NetworkDataTaskBlob::download):
1411         (WebKit::NetworkDataTaskBlob::writeDownload):
1412         (WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
1413         (WebKit::NetworkDataTaskBlob::didFailDownload):
1414         (WebKit::NetworkDataTaskBlob::didFinishDownload):
1415         (WebKit::NetworkDataTaskBlob::didFail):
1416         (WebKit::NetworkDataTaskBlob::didFinish):
1417         * NetworkProcess/NetworkDataTaskBlob.h: Added.
1418         * NetworkProcess/NetworkLoad.cpp:
1419         (WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
1420         (WebKit::NetworkLoad::~NetworkLoad):
1421         (WebKit::NetworkLoad::setDefersLoading):
1422         (WebKit::NetworkLoad::cancel):
1423         (WebKit::NetworkLoad::continueWillSendRequest):
1424         (WebKit::NetworkLoad::continueDidReceiveResponse):
1425         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
1426         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
1427         * NetworkProcess/NetworkLoad.h:
1428         * NetworkProcess/NetworkSession.cpp:
1429         (WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.
1430         * NetworkProcess/NetworkSession.h:
1431         (WebKit::NetworkSession::registerNetworkDataTask): Ditto.
1432         (WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.
1433         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing
1434         because in Cocoa all tasks are invalidated and canceled by the network session.
1435         * NetworkProcess/mac/NetworkLoadMac.mm:
1436         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1437         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
1438         (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
1439         (WebKit::NetworkDataTaskSoup::download):
1440         * NetworkProcess/soup/NetworkDataTaskSoup.h:
1441         * NetworkProcess/soup/NetworkSessionSoup.cpp:
1442         * NetworkProcess/soup/NetworkSessionSoup.h:
1443         * PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
1444         * PlatformGTK.cmake: Ditto.
1445         * WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.
1446
1447 2016-11-03  Simon Fraser  <simon.fraser@apple.com>
1448
1449         Give all the geometry classes a single-argument scale() function for consistency
1450         https://bugs.webkit.org/show_bug.cgi?id=164400
1451
1452         Reviewed by Zalan Bujtas.
1453         
1454         Use single-argument scale() functions.
1455
1456         * PluginProcess/PluginControllerProxy.cpp:
1457         (WebKit::PluginControllerProxy::paint):
1458         * Shared/mac/RemoteLayerBackingStore.mm:
1459         (WebKit::RemoteLayerBackingStore::drawInContext):
1460         * UIProcess/API/Cocoa/WKWebView.mm:
1461         (-[WKWebView _didCommitLayerTree:]):
1462         (-[WKWebView _takeViewSnapshot]):
1463         (-[WKWebView _scrollToContentScrollPosition:scrollOrigin:]):
1464         (-[WKWebView _scrollByContentOffset:]):
1465         (-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
1466         * UIProcess/ios/WKContentView.mm:
1467         (-[WKContentView _didCommitLayerTree:]):
1468         * UIProcess/ios/WKContentViewInteraction.mm:
1469         (-[WKContentView _updateTapHighlight]):
1470         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1471         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
1472         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
1473         * UIProcess/mac/ViewGestureControllerMac.mm:
1474         (WebKit::ViewGestureController::scaledMagnificationOrigin):
1475         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1476         (WebKit::InjectedBundleRangeHandle::renderedImage):
1477         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1478         (WebKit::NetscapePlugin::snapshot):
1479         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1480         (WebKit::PDFPlugin::scrollToPoint):
1481         * WebProcess/WebPage/WebFrame.cpp:
1482         (WebKit::WebFrame::createSelectionSnapshot):
1483         * WebProcess/WebPage/WebPage.cpp:
1484         (WebKit::WebPage::scalePageInViewCoordinates):
1485         (WebKit::WebPage::scaleView):
1486         (WebKit::WebPage::snapshotAtSize):
1487         (WebKit::WebPage::snapshotNode):
1488         (WebKit::WebPage::drawRectToImage):
1489         * WebProcess/WebPage/ios/WebPageIOS.mm:
1490         (WebKit::WebPage::restorePageState):
1491
1492 2016-11-03  Chris Dumez  <cdumez@apple.com>
1493
1494         [WK2][Cocoa] Implement user interface for HTML form validation
1495         https://bugs.webkit.org/show_bug.cgi?id=164143
1496         <rdar://problem/28944652>
1497
1498         Reviewed by Simon Fraser.
1499
1500         Implement the ValidationMessageClient in WebKit2 and have it display
1501         a ValidationBubble on Cocoa. ValidationBubble is implemented using
1502         native popovers on both Mac and iOS. As a result, Mac and iOS WK2
1503         now use native popover for HTML form validation instead of the old
1504         Shadow DOM based UI in WebCore.
1505
1506         The native popover shows at the bottom (or top) of the input and it
1507         disapears as soon as the user starts typing or interacts with the
1508         view (e.g. tap / scroll / zoom).
1509
1510         The feature is still disabled at runtime.
1511
1512         * UIProcess/API/Cocoa/WKWebView.mm:
1513         (-[WKWebView _initializeWithConfiguration:]):
1514         (-[WKWebView _keyboardWillShow:]):
1515         (-[WKWebView _keyboardDidShow:]):
1516         (-[WKWebView _contentsOfUserInterfaceItem:]):
1517         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1518         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1519         * UIProcess/PageClient.h:
1520         * UIProcess/WebPageProxy.cpp:
1521         (WebKit::WebPageProxy::handleWheelEvent):
1522         (WebKit::WebPageProxy::setPageZoomFactor):
1523         (WebKit::WebPageProxy::setPageAndTextZoomFactors):
1524         (WebKit::WebPageProxy::pageDidScroll):
1525         (WebKit::WebPageProxy::resetState):
1526         (WebKit::WebPageProxy::hideValidationMessage):
1527         * UIProcess/WebPageProxy.h:
1528         (WebKit::WebPageProxy::validationBubble):
1529         (WebKit::WebPageProxy::setIsKeyboardAnimatingIn):
1530         * UIProcess/WebPageProxy.messages.in:
1531         * UIProcess/ios/PageClientImplIOS.h:
1532         * UIProcess/ios/PageClientImplIOS.mm:
1533         (WebKit::PageClientImpl::createValidationBubble):
1534         * UIProcess/ios/WKContentViewInteraction.mm:
1535         (-[WKContentView _willStartScrollingOrZooming]):
1536         (-[WKContentView scrollViewWillStartPanOrPinchGesture]):
1537         (-[WKContentView _didEndScrollingOrZooming]):
1538         * UIProcess/ios/WebPageProxyIOS.mm:
1539         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
1540         (WebKit::WebPageProxy::potentialTapAtPosition):
1541         (WebKit::WebPageProxy::showValidationMessage):
1542         (WebKit::WebPageProxy::setIsScrollingOrZooming):
1543         * UIProcess/mac/PageClientImpl.h:
1544         * UIProcess/mac/PageClientImpl.mm:
1545         (WebKit::PageClientImpl::createValidationBubble):
1546         * UIProcess/mac/WebPageProxyMac.mm:
1547         (WebKit::WebPageProxy::showValidationMessage):
1548         * WebKit2.xcodeproj/project.pbxproj:
1549         * WebProcess/WebCoreSupport/WebValidationMessageClient.cpp: Copied from Tools/DumpRenderTree/mac/UIScriptControllerMac.mm.
1550         (WebKit::WebValidationMessageClient::WebValidationMessageClient):
1551         (WebKit::WebValidationMessageClient::~WebValidationMessageClient):
1552         (WebKit::WebValidationMessageClient::showValidationMessage):
1553         (WebKit::WebValidationMessageClient::hideValidationMessage):
1554         (WebKit::WebValidationMessageClient::isValidationMessageVisible):
1555         * WebProcess/WebCoreSupport/WebValidationMessageClient.h: Copied from Tools/DumpRenderTree/mac/UIScriptControllerMac.mm.
1556         * WebProcess/WebPage/WebPage.cpp:
1557         (WebKit::m_userInterfaceLayoutDirection):
1558
1559 2016-11-03  Tim Horton  <timothy_horton@apple.com>
1560
1561         Printing to PDF should produce internal links when HTML has internal links
1562         https://bugs.webkit.org/show_bug.cgi?id=112081
1563         <rdar://problem/5955705>
1564
1565         Reviewed by Simon Fraser.
1566
1567         * UIProcess/mac/WKPrintingView.h:
1568         * UIProcess/mac/WKPrintingView.mm:
1569         (linkDestinationName):
1570         (-[WKPrintingView _drawPDFDocument:page:atPoint:]):
1571         Propagate link-to-destination annotations (and each page's destinations)
1572         into the printed PDF.
1573         Generate a unique destination name based on the page and position, because
1574         we have lost the fragment name information.
1575
1576         (-[WKPrintingView drawRect:]):
1577         Compute all of the destinations for every page, so that we can add them
1578         to the context as we paint the pages (we need the page CTM in order to add them).
1579
1580 2016-11-03  Alex Christensen  <achristensen@webkit.org>
1581
1582         Unreviewed, rolling out r208298.
1583         https://bugs.webkit.org/show_bug.cgi?id=163939
1584
1585         caused asan crashes
1586
1587         Reverted changeset:
1588
1589         "NetworkSession: Add NetworkDataTask implementation for blobs"
1590         https://bugs.webkit.org/show_bug.cgi?id=163939
1591         http://trac.webkit.org/changeset/208298
1592
1593 2016-11-03  Ryan Haddad  <ryanhaddad@apple.com>
1594
1595         Unreviewed, rolling out r208330.
1596
1597         This change appears to have caused two editing tests to fail
1598         on macOS.
1599
1600         Reverted changeset:
1601
1602         "Reduce PassRefPtr use in WebKit2"
1603         https://bugs.webkit.org/show_bug.cgi?id=164360
1604         http://trac.webkit.org/changeset/208330
1605
1606 2016-11-03  Dan Bernstein  <mitz@apple.com>
1607
1608         WKWebView’s _observedRenderingProgressEvents not restored after web process crash
1609         https://bugs.webkit.org/show_bug.cgi?id=164368
1610         <rdar://problem/29091954>
1611
1612         Reviewed by Anders Carlsson.
1613
1614         Test: TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm.
1615
1616         * Shared/WebPageCreationParameters.cpp:
1617         (WebKit::WebPageCreationParameters::encode): Encode new observedLayoutMilestones member.
1618         (WebKit::WebPageCreationParameters::decode): Decode it.
1619         * Shared/WebPageCreationParameters.h: Declared new observedLayoutMilestones member variable.
1620
1621         * UIProcess/WebPageProxy.cpp:
1622         (WebKit::WebPageProxy::WebPageProxy): Removed initializer for
1623           m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
1624         (WebKit::WebPageProxy::listenForLayoutMilestones): Update new m_observedLayoutMilestones
1625           member variable. Don’t update m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
1626         (WebKit::WebPageProxy::creationParameters): Set the observedLayoutMilestones member in the
1627           creation parameters.
1628
1629         * UIProcess/WebPageProxy.h: Declared new member variable, deleted
1630           m_wantsSessionRestorationRenderTreeSizeThresholdEvent declaration.
1631
1632         * UIProcess/ios/WebPageProxyIOS.mm:
1633         (WebKit::WebPageProxy::didCommitLayerTree): Rather than using
1634           m_wantsSessionRestorationRenderTreeSizeThresholdEvent, use m_observedLayoutMilestones.
1635
1636         * WebProcess/WebPage/WebPage.cpp:
1637         (WebKit::WebPage::WebPage): Add the observed layout milestones from the creation parameters.
1638
1639 2016-11-02  Alex Christensen  <achristensen@webkit.org>
1640
1641         Reduce PassRefPtr use in WebKit2
1642         https://bugs.webkit.org/show_bug.cgi?id=164360
1643
1644         Reviewed by Tim Horton.
1645
1646         * Shared/API/APISecurityOrigin.h:
1647         (API::SecurityOrigin::SecurityOrigin):
1648         * Shared/API/APISerializedScriptValue.h:
1649         (API::SerializedScriptValue::create):
1650         (API::SerializedScriptValue::SerializedScriptValue):
1651         * Shared/API/c/WKSharedAPICast.h:
1652         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
1653         (WebKit::toAPI):
1654         * Shared/APIWebArchive.h:
1655         * Shared/APIWebArchive.mm:
1656         (API::WebArchive::create):
1657         (API::WebArchive::WebArchive):
1658         * UIProcess/API/APIHitTestResult.cpp:
1659         (API::HitTestResult::create):
1660         * UIProcess/API/APIHitTestResult.h:
1661         * UIProcess/API/APIUIClient.h:
1662         (API::UIClient::createNewPage):
1663         * UIProcess/API/C/WKPage.cpp:
1664         (WebKit::RunBeforeUnloadConfirmPanelResultListener::create):
1665         (WebKit::RunBeforeUnloadConfirmPanelResultListener::RunBeforeUnloadConfirmPanelResultListener):
1666         (WebKit::RunJavaScriptAlertResultListener::create):
1667         (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
1668         (WebKit::RunJavaScriptConfirmResultListener::create):
1669         (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
1670         (WebKit::RunJavaScriptPromptResultListener::create):
1671         (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
1672         (WKPageSetPageUIClient):
1673         * UIProcess/API/Cocoa/WKWebView.mm:
1674         (-[WKWebView _takeViewSnapshot]):
1675         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1676         * UIProcess/Cocoa/UIDelegate.h:
1677         * UIProcess/Cocoa/UIDelegate.mm:
1678         (WebKit::UIDelegate::UIClient::createNewPage):
1679         * UIProcess/ios/WKGeolocationProviderIOS.mm:
1680         (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
1681         * UIProcess/mac/WKImmediateActionController.mm:
1682         (-[WKImmediateActionController _webHitTestResult]):
1683         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1684         (contextMenuItems):
1685         (WKBundlePageCopyContextMenuItems):
1686         (WKBundlePageCopyContextMenuAtPointInWindow):
1687         * WebProcess/UserContent/WebUserContentController.cpp:
1688         (WebKit::WebUserMessageHandlerDescriptorProxy::create):
1689         * WebProcess/WebPage/WebUndoStep.cpp:
1690         (WebKit::WebUndoStep::create):
1691         * WebProcess/WebPage/WebUndoStep.h:
1692         (WebKit::WebUndoStep::WebUndoStep):
1693
1694 2016-11-01  Gavin Barraclough  <barraclough@apple.com>
1695
1696         Remove PageThrottler & all related code
1697         https://bugs.webkit.org/show_bug.cgi?id=164302
1698
1699         Reviewed by Ryosuke Niwa.
1700
1701         All relevant information now available from the ActivityState.
1702
1703         * PluginProcess/PluginProcess.cpp:
1704         (WebKit::PluginProcess::PluginProcess):
1705         (WebKit::PluginProcess::createWebProcessConnection):
1706         (WebKit::PluginProcess::audioHardwareDidBecomeActive): Deleted.
1707         (WebKit::PluginProcess::audioHardwareDidBecomeInactive): Deleted.
1708         * PluginProcess/PluginProcess.h:
1709         (): Deleted.
1710         * PluginProcess/WebProcessConnection.cpp:
1711         (WebKit::WebProcessConnection::audioHardwareDidBecomeActive): Deleted.
1712         (WebKit::WebProcessConnection::audioHardwareDidBecomeInactive): Deleted.
1713         * PluginProcess/WebProcessConnection.h:
1714         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1715         (WebKit::NPRuntimeObjectMap::evaluate):
1716         * WebProcess/Plugins/Plugin.h:
1717         (WebKit::Plugin::audioHardwareActivity): Deleted.
1718         * WebProcess/Plugins/PluginProcessConnection.cpp:
1719         (WebKit::PluginProcessConnection::PluginProcessConnection):
1720         (WebKit::PluginProcessConnection::didReceiveMessage):
1721         (WebKit::PluginProcessConnection::audioHardwareDidBecomeActive): Deleted.
1722         (WebKit::PluginProcessConnection::audioHardwareDidBecomeInactive): Deleted.
1723         * WebProcess/Plugins/PluginProcessConnection.h:
1724         (WebKit::PluginProcessConnection::supportsAsynchronousPluginInitialization):
1725         (WebKit::PluginProcessConnection::audioHardwareActivity): Deleted.
1726         * WebProcess/Plugins/PluginProcessConnection.messages.in:
1727         * WebProcess/Plugins/PluginProxy.cpp:
1728         (WebKit::PluginProxy::audioHardwareActivity): Deleted.
1729         * WebProcess/Plugins/PluginProxy.h:
1730         * WebProcess/Plugins/PluginView.cpp:
1731         (WebKit::PluginView::audioHardwareActivity): Deleted.
1732         * WebProcess/Plugins/PluginView.h:
1733         * WebProcess/WebPage/WebPage.cpp:
1734
1735 2016-11-03  Dan Bernstein  <mitz@apple.com>
1736
1737         REGRESSION (r206247): Painting milestones can be delayed until the next layer flush
1738         https://bugs.webkit.org/show_bug.cgi?id=164340
1739         <rdar://problem/29074344>
1740
1741         Reviewed by Tim Horton.
1742
1743         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Declared new helper function.
1744         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1745         (WebKit::TiledCoreAnimationDrawingArea::sendPendingNewlyReachedLayoutMilestones): Helper
1746           function that sends the message to the UI process and resets
1747           m_pendingNewlyReachedLayoutMilestones.
1748         (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Wait until after the commit to get the
1749           pending milestones and send them to the UI process. This way we don’t miss milestones that
1750           fire during the commit.
1751
1752 2016-11-02  David Kilzer  <ddkilzer@apple.com>
1753
1754         Bug 164333: Add logging for "WebKit encountered an internal error" messages due to Network process crashes
1755         <https://webkit.org/b/164333>
1756         <rdar://problem/29072727>
1757
1758         Reviewed by Alex Christensen.
1759
1760         * WebProcess/WebProcess.cpp:
1761         (WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
1762         Add private method to log diagnostic message.
1763         (WebKit::WebProcess::networkProcessConnectionClosed):
1764         Call logDiagnosticMessageForNetworkProcessCrash().
1765         * WebProcess/WebProcess.h:
1766         (WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
1767         Declare new method.
1768
1769 2016-11-02  Alex Christensen  <achristensen@webkit.org>
1770
1771         Remove Battery Status API from the tree
1772         https://bugs.webkit.org/show_bug.cgi?id=164213
1773
1774         Reviewed by Sam Weinig.
1775
1776         * CMakeLists.txt:
1777         * PlatformEfl.cmake:
1778         * Shared/API/APIObject.h:
1779         * Shared/API/c/WKBase.h:
1780         * Shared/WebBatteryStatus.cpp: Removed.
1781         * Shared/WebBatteryStatus.h: Removed.
1782         * UIProcess/API/C/WKAPICast.h:
1783         * UIProcess/API/C/WKBatteryManager.cpp: Removed.
1784         * UIProcess/API/C/WKBatteryManager.h: Removed.
1785         * UIProcess/API/C/WKBatteryStatus.cpp: Removed.
1786         * UIProcess/API/C/WKBatteryStatus.h: Removed.
1787         * UIProcess/API/C/WKContext.cpp:
1788         (WKContextGetBatteryManager): Deleted.
1789         * UIProcess/API/C/WKContext.h:
1790         * UIProcess/API/efl/ewk_context.cpp:
1791         (EwkContext::EwkContext):
1792         * UIProcess/API/efl/ewk_context_private.h:
1793         * UIProcess/API/efl/ewk_main.cpp:
1794         (WebKit::EwkMain::initialize):
1795         (WebKit::EwkMain::finalize):
1796         (WebKit::EwkMain::shutdownInitializedEFLModules):
1797         * UIProcess/API/gtk/WebKitBatteryProvider.cpp: Removed.
1798         * UIProcess/API/gtk/WebKitBatteryProvider.h: Removed.
1799         * UIProcess/API/gtk/WebKitWebContext.cpp:
1800         (webkitWebContextConstructed):
1801         * UIProcess/WebBatteryManagerProxy.cpp: Removed.
1802         * UIProcess/WebBatteryManagerProxy.h: Removed.
1803         * UIProcess/WebBatteryManagerProxy.messages.in: Removed.
1804         * UIProcess/WebBatteryProvider.cpp: Removed.
1805         * UIProcess/WebBatteryProvider.h: Removed.
1806         * UIProcess/WebProcessPool.cpp:
1807         (WebKit::m_hiddenPageThrottlingTimer):
1808         * UIProcess/efl/BatteryProvider.cpp: Removed.
1809         * UIProcess/efl/BatteryProvider.h: Removed.
1810         * WebProcess/Battery: Removed.
1811         * WebProcess/Battery/WebBatteryManager.cpp: Removed.
1812         * WebProcess/Battery/WebBatteryManager.h: Removed.
1813         * WebProcess/Battery/WebBatteryManager.messages.in: Removed.
1814         * WebProcess/WebCoreSupport/WebBatteryClient.cpp: Removed.
1815         * WebProcess/WebCoreSupport/WebBatteryClient.h: Removed.
1816         * WebProcess/WebPage/WebPage.cpp:
1817         (WebKit::m_userInterfaceLayoutDirection):
1818         * WebProcess/WebProcess.cpp:
1819         (WebKit::m_resourceLoadStatisticsStorage):
1820
1821 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1822
1823         NetworkSession: Add NetworkDataTask implementation for blobs
1824         https://bugs.webkit.org/show_bug.cgi?id=163939
1825
1826         Reviewed by Alex Christensen.
1827
1828         Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
1829         adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
1830         is enabled.
1831
1832         * CMakeLists.txt: Add new files to compilation.
1833         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1834         * NetworkProcess/Downloads/BlobDownloadClient.h:
1835         * NetworkProcess/Downloads/Download.cpp:
1836         (WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
1837         definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
1838         reveices a NetworkDataTask and is used by Soup backend and blobs.
1839         (WebKit::Download::~Download):
1840         (WebKit::Download::start):
1841         (WebKit::Download::startWithHandle):
1842         (WebKit::Download::cancel):
1843         (WebKit::Download::didReceiveAuthenticationChallenge):
1844         (WebKit::Download::didReceiveData):
1845         (WebKit::Download::didFinish):
1846         (WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
1847         this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.
1848         * NetworkProcess/Downloads/Download.h:
1849         (WebKit::Download::Download):
1850         (WebKit::Download::suggestedName):
1851         (WebKit::Download::request):
1852         * NetworkProcess/Downloads/DownloadManager.cpp:
1853         (WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
1854         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
1855         * NetworkProcess/Downloads/DownloadManager.h:
1856         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
1857         (WebKit::Download::platformCancelNetworkLoad):
1858         * NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
1859         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1860         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
1861         using NetworkSession.
1862         * NetworkProcess/NetworkDataTask.cpp:
1863         (WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.
1864         * NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
1865         * NetworkProcess/NetworkDataTaskBlob.cpp: Added.
1866         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
1867         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
1868         (WebKit::NetworkDataTaskBlob::clearStream):
1869         (WebKit::NetworkDataTaskBlob::resume):
1870         (WebKit::NetworkDataTaskBlob::suspend):
1871         (WebKit::NetworkDataTaskBlob::cancel):
1872         (WebKit::NetworkDataTaskBlob::invalidateAndCancel):
1873         (WebKit::NetworkDataTaskBlob::getSizeForNext):
1874         (WebKit::NetworkDataTaskBlob::didGetSize):
1875         (WebKit::NetworkDataTaskBlob::seek):
1876         (WebKit::NetworkDataTaskBlob::didReceiveResponse):
1877         (WebKit::NetworkDataTaskBlob::read):
1878         (WebKit::NetworkDataTaskBlob::readData):
1879         (WebKit::NetworkDataTaskBlob::readFile):
1880         (WebKit::NetworkDataTaskBlob::didOpen):
1881         (WebKit::NetworkDataTaskBlob::didRead):
1882         (WebKit::NetworkDataTaskBlob::consumeData):
1883         (WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
1884         (WebKit::NetworkDataTaskBlob::suggestedFilename):
1885         (WebKit::NetworkDataTaskBlob::download):
1886         (WebKit::NetworkDataTaskBlob::writeDownload):
1887         (WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
1888         (WebKit::NetworkDataTaskBlob::didFailDownload):
1889         (WebKit::NetworkDataTaskBlob::didFinishDownload):
1890         (WebKit::NetworkDataTaskBlob::didFail):
1891         (WebKit::NetworkDataTaskBlob::didFinish):
1892         * NetworkProcess/NetworkDataTaskBlob.h: Added.
1893         * NetworkProcess/NetworkLoad.cpp:
1894         (WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
1895         (WebKit::NetworkLoad::~NetworkLoad):
1896         (WebKit::NetworkLoad::setDefersLoading):
1897         (WebKit::NetworkLoad::cancel):
1898         (WebKit::NetworkLoad::continueWillSendRequest):
1899         (WebKit::NetworkLoad::continueDidReceiveResponse):
1900         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
1901         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
1902         * NetworkProcess/NetworkLoad.h:
1903         * NetworkProcess/NetworkSession.cpp:
1904         (WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.
1905         * NetworkProcess/NetworkSession.h:
1906         (WebKit::NetworkSession::registerNetworkDataTask): Ditto.
1907         (WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.
1908         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing
1909         because in Cocoa all tasks are invalidated and canceled by the network session.
1910         * NetworkProcess/mac/NetworkLoadMac.mm:
1911         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1912         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
1913         (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
1914         (WebKit::NetworkDataTaskSoup::download):
1915         * NetworkProcess/soup/NetworkDataTaskSoup.h:
1916         * NetworkProcess/soup/NetworkSessionSoup.cpp:
1917         * NetworkProcess/soup/NetworkSessionSoup.h:
1918         * PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
1919         * PlatformGTK.cmake: Ditto.
1920         * WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.
1921
1922 2016-11-02  Andy Estes  <aestes@apple.com>
1923
1924         REGRESSION (r199558): File paths selected for upload are stored using the wrong string encoding
1925         https://bugs.webkit.org/show_bug.cgi?id=164311
1926         <rdar://problem/26995374>
1927
1928         Reviewed by Tim Horton.
1929
1930         -[NSURL fileSystemRepresentation] returns a char* in file system representation, which on
1931         iOS is UTF-8, but we were implicitly converting it to a String, which assumes a char* is
1932         Latin-1 encoded.
1933
1934         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1935         (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]): Changed to use fromUTF8() to
1936         convert fileURL.fileSystemRepresentation to a String.
1937
1938 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1939
1940         NetworkSession: Network process crash when converting main resource to download
1941         https://bugs.webkit.org/show_bug.cgi?id=164220
1942
1943         Reviewed by Alex Christensen.
1944
1945         Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
1946         sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
1947         NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
1948         download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
1949         NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
1950         having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
1951         load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
1952         NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
1953         client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
1954         created yet. That's not expected to happen and when the response completion handler is called in the
1955         NetworkDataTask it tries to use either the client or the download and it crashes.
1956
1957         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1958         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Update ASSERT, because abort doesn't cleanup the
1959         resource loader in case it's becoming a download.
1960         * NetworkProcess/NetworkResourceLoader.cpp:
1961         (WebKit::NetworkResourceLoader::didBecomeDownload): Call cleanup() instead of just deleting the network load.
1962         (WebKit::NetworkResourceLoader::isBecomingDownload): Helper method to check if the resource load was converted to a
1963         download, but didBecomeDownload() hasn't been called yet.
1964         (WebKit::NetworkResourceLoader::abort): If the resource load is becoming a download do not call cleanup()
1965         because it will be called by didBecomeDownload() later.
1966         * NetworkProcess/NetworkResourceLoader.h:
1967
1968 2016-11-02  David Kilzer  <ddkilzer@apple.com>
1969
1970         Add logging for "WebKit encountered an internal error" messages
1971         <https://webkit.org/b/164272>
1972         <rdar://problem/28546064>
1973
1974         Reviewed by Alex Christensen.
1975
1976         * NetworkProcess/NetworkResourceLoader.cpp:
1977         (WebKit::NetworkResourceLoader::startNetworkLoad):
1978         * WebProcess/Network/WebLoaderStrategy.cpp:
1979         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
1980         * WebProcess/Network/WebResourceLoader.cpp:
1981         (WebKit::WebResourceLoader::didReceiveResource):
1982         - Add logging for various internalError() events.
1983
1984 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1985
1986         [GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
1987         https://bugs.webkit.org/show_bug.cgi?id=164303
1988
1989         Reviewed by Michael Catanzaro.
1990
1991         This can happen if the web process exits before the UI process has cleaned up the accelerated surface. Trap
1992         BadDrawable and BadDamage X errors and ignore them, while still crashing for any other X error.
1993
1994         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
1995         (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
1996         (WebKit::AcceleratedBackingStoreX11::update):
1997
1998 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1999
2000         [GTK] Remove FileSystem::filenameToString() and use FileSystem::stringFromFileSystemRepresentation() everywhere instead
2001         https://bugs.webkit.org/show_bug.cgi?id=164315
2002
2003         Reviewed by Michael Catanzaro.
2004
2005         * Shared/gtk/ProcessExecutablePathGtk.cpp:
2006         (WebKit::getExecutablePath):
2007         (WebKit::findWebKitProcess):
2008         * UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp:
2009         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
2010         (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
2011         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
2012         * UIProcess/API/gtk/WebKitWebContext.cpp:
2013         (webkitWebContextConstructed):
2014         (webkit_web_context_set_favicon_database_directory):
2015         (webkit_web_context_set_additional_plugins_directory):
2016         (webkit_web_context_set_disk_cache_directory):
2017         * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
2018         (webkitWebsiteDataManagerGetDataStore):
2019         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
2020         (WebKit::PluginInfoCache::PluginInfoCache):
2021         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2022         (WebKit::WebProcessPool::platformDefaultIconDatabasePath):
2023         * WebProcess/gtk/WebGtkExtensionManager.cpp:
2024         (WebKit::parseUserData):
2025
2026 2016-11-02  Romain Bellessort  <romain.bellessort@crf.canon.fr>
2027
2028         [Readable Streams API] Enable creation of ReadableByteStreamController
2029         https://bugs.webkit.org/show_bug.cgi?id=164014
2030
2031         Reviewed by Youenn Fablet.
2032
2033         Added flag for the byte stream part of Readable Streams API.
2034
2035         * Configurations/FeatureDefines.xcconfig:
2036
2037 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2038
2039         PluginInfoStore::loadPluginsIfNecessary can still load plugins multiple times
2040         https://bugs.webkit.org/show_bug.cgi?id=164103
2041
2042         Reviewed by Michael Catanzaro.
2043
2044         Follow symlinks when scanning plugins to avoid duplicates.
2045
2046         * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Bump the cache version to ensure duplicated plugins are removed
2047         from the cache.
2048         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
2049         (WebKit::PluginInfoStore::pluginPathsInDirectory): Use realpath() to always return the actual file path.
2050
2051 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2052
2053         [GTK] Plugin process crash in WebKit::NetscapePluginX11::visibilityDidChange with evince browser plugin
2054         https://bugs.webkit.org/show_bug.cgi?id=164204
2055
2056         Reviewed by Michael Catanzaro.
2057
2058         Check the platform plugin widget is embedded before trying to get its socket window.
2059
2060         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2061         (WebKit::NetscapePluginX11::geometryDidChange):
2062         (WebKit::NetscapePluginX11::visibilityDidChange):
2063
2064 2016-11-01  Wenson Hsieh  <wenson_hsieh@apple.com>
2065
2066         Turn the Input Events runtime flag on by default
2067         https://bugs.webkit.org/show_bug.cgi?id=164297
2068
2069         Reviewed by Ryosuke Niwa.
2070
2071         * Shared/WebPreferencesDefinitions.h:
2072
2073 2016-11-01  Jaehun Lim  <ljaehun.lim@samsung.com>
2074
2075         Unreviewed, EFL build fix after r208225
2076
2077         Rename ViewState to ActivityState
2078
2079         * UIProcess/efl/WebView.cpp:
2080         (WebKit::WebView::setActive):
2081         (WebKit::WebView::setFocused):
2082         (WebKit::WebView::setVisible):
2083
2084 2016-11-01  Alex Christensen  <achristensen@webkit.org>
2085
2086         Fix CMake build.
2087
2088         * PlatformMac.cmake:
2089
2090 2016-11-01  Ryosuke Niwa  <rniwa@webkit.org>
2091
2092         Remove CUSTOM_ELEMENTS build flag
2093         https://bugs.webkit.org/show_bug.cgi?id=164267
2094
2095         Reviewed by Antti Koivisto.
2096
2097         Removed the build flag.
2098
2099         * Configurations/FeatureDefines.xcconfig:
2100         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2101         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2102         * WebProcess/WebPage/WebPage.cpp:
2103         (WebKit::WebPage::updatePreferences):
2104
2105 2016-11-01  Eric Carlson  <eric.carlson@apple.com>
2106
2107         [MediaStream] restrict media capture secure connections
2108         https://bugs.webkit.org/show_bug.cgi?id=164234
2109         <rdar://problem/28944906>
2110
2111         Reviewed by Alex Christensen.
2112
2113         * Shared/WebPreferencesDefinitions.h:
2114    
2115         * UIProcess/API/C/WKPreferences.cpp:
2116         (WKPreferencesSetMediaCaptureRequiresSecureConnection):
2117         (WKPreferencesGetMediaCaptureRequiresSecureConnection):
2118         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2119    
2120         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2121         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Drive by
2122          fix: remove some unused parameters in a lambda call.
2123
2124         * WebProcess/WebPage/WebPage.cpp:
2125         (WebKit::WebPage::updatePreferences):
2126
2127 2016-11-01  Gavin Barraclough  <barraclough@apple.com>
2128
2129         Add IsAudible, IsLoading to ActivityState
2130         https://bugs.webkit.org/show_bug.cgi?id=164286
2131
2132         Reviewed by Geoff Garen.
2133
2134         By computing these values in the UIProcess and passing them to WebContent we can
2135         more closely unify iOS & macOS throttling, and remove the PageThrottler class.
2136
2137         * UIProcess/WebPageProxy.cpp:
2138         (WebKit::WebPageProxy::updateActivityState):
2139             - Added update for IsAudible, IsLoading flags.
2140         (WebKit::WebPageProxy::updateThrottleState):
2141             - Read IsAudible, IsLoading flags from ActivityState.
2142         (WebKit::WebPageProxy::setMuted):
2143             - call activityStateDidChange to trigger update.
2144         (WebKit::WebPageProxy::isPlayingMediaDidChange):
2145             - call activityStateDidChange to trigger update.
2146         * UIProcess/WebPageProxy.h:
2147         (WebKit::WebPageProxy::isLoadingChanged):
2148             - call activityStateDidChange to trigger update.
2149
2150 2016-10-31  Gavin Barraclough  <barraclough@apple.com>
2151
2152         Rename ViewState to ActivityState
2153         https://bugs.webkit.org/show_bug.cgi?id=164254
2154
2155         Reviewed by Andreas Kling.
2156
2157         We plan to add a couple more flags to ViewState that aren't directly related to the view
2158         itself - whether there is an ongoing page load, and whether whether there is audio playback.
2159         This will allow viewState (now activityState) to fully drive throttling decisions.
2160
2161         Renaming this bitfield accordingly.
2162
2163         * Shared/WebPageCreationParameters.cpp:
2164         (WebKit::WebPageCreationParameters::encode):
2165         (WebKit::WebPageCreationParameters::decode):
2166         * Shared/WebPageCreationParameters.h:
2167         * UIProcess/API/Cocoa/WKWebView.mm:
2168         (-[WKWebView didMoveToWindow]):
2169         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2170         (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
2171         (_WebKitWebViewBasePrivate::updateActivityStateTimerFired):
2172         (webkitWebViewBaseScheduleUpdateActivityState):
2173         (toplevelWindowFocusInEvent):
2174         (toplevelWindowFocusOutEvent):
2175         (toplevelWindowStateEvent):
2176         (webkitWebViewBaseSetToplevelOnScreenWindow):
2177         (webkitWebViewBaseMap):
2178         (webkitWebViewBaseUnmap):
2179         (webkitWebViewBaseSetFocus):
2180         (webkitWebViewBaseIsInWindowActive):
2181         (webkitWebViewBaseIsFocused):
2182         (webkitWebViewBaseIsVisible):
2183         (webkitWebViewBaseIsInWindow):
2184         (_WebKitWebViewBasePrivate::updateViewStateTimerFired): Deleted.
2185         (webkitWebViewBaseScheduleUpdateViewState): Deleted.
2186         * UIProcess/Cocoa/WebViewImpl.mm:
2187         (WebKit::WebViewImpl::becomeFirstResponder):
2188         (WebKit::WebViewImpl::resignFirstResponder):
2189         (WebKit::WebViewImpl::windowDidOrderOffScreen):
2190         (WebKit::WebViewImpl::windowDidOrderOnScreen):
2191         (WebKit::WebViewImpl::windowDidBecomeKey):
2192         (WebKit::WebViewImpl::windowDidResignKey):
2193         (WebKit::WebViewImpl::windowDidMiniaturize):
2194         (WebKit::WebViewImpl::windowDidDeminiaturize):
2195         (WebKit::WebViewImpl::windowDidChangeOcclusionState):
2196         (WebKit::WebViewImpl::viewDidMoveToWindow):
2197         (WebKit::WebViewImpl::viewDidHide):
2198         (WebKit::WebViewImpl::viewDidUnhide):
2199         (WebKit::WebViewImpl::activeSpaceDidChange):
2200         (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
2201         (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
2202         (WebKit::WebViewImpl::prepareForMoveToWindow):
2203         * UIProcess/DrawingAreaProxy.h:
2204         (WebKit::DrawingAreaProxy::waitForDidUpdateActivityState):
2205         (WebKit::DrawingAreaProxy::waitForDidUpdateViewState): Deleted.
2206         * UIProcess/WebPageProxy.cpp:
2207         (WebKit::WebPageProxy::WebPageProxy):
2208         (WebKit::WebPageProxy::reattachToWebProcess):
2209         (WebKit::WebPageProxy::setSuppressVisibilityUpdates):
2210         (WebKit::WebPageProxy::updateActivityState):
2211         (WebKit::WebPageProxy::activityStateDidChange):
2212         (WebKit::WebPageProxy::dispatchActivityStateChange):
2213         (WebKit::WebPageProxy::updateThrottleState):
2214         (WebKit::WebPageProxy::waitForDidUpdateActivityState):
2215         (WebKit::WebPageProxy::creationParameters):
2216         (WebKit::WebPageProxy::installActivityStateChangeCompletionHandler):
2217         (WebKit::WebPageProxy::updateViewState): Deleted.
2218         (WebKit::WebPageProxy::viewStateDidChange): Deleted.
2219         (WebKit::WebPageProxy::dispatchViewStateChange): Deleted.
2220         (WebKit::WebPageProxy::waitForDidUpdateViewState): Deleted.
2221         (WebKit::WebPageProxy::installViewStateChangeCompletionHandler): Deleted.
2222         * UIProcess/WebPageProxy.h:
2223         (WebKit::WebPageProxy::isInWindow):
2224         (WebKit::WebPageProxy::didUpdateActivityState):
2225         (WebKit::WebPageProxy::isViewVisible):
2226         (WebKit::WebPageProxy::didUpdateViewState): Deleted.
2227         * UIProcess/WebPageProxy.messages.in:
2228         * UIProcess/WebProcessProxy.cpp:
2229         (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
2230         * UIProcess/efl/WebView.cpp:
2231         * UIProcess/ios/WKContentView.mm:
2232         (-[WKContentView _applicationDidEnterBackground]):
2233         (-[WKContentView _applicationWillEnterForeground]):
2234         * UIProcess/ios/WKPDFView.mm:
2235         (-[WKPDFView _applicationDidEnterBackground]):
2236         (-[WKPDFView _applicationWillEnterForeground]):
2237         * UIProcess/ios/WebPageProxyIOS.mm:
2238         (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
2239         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2240         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2241         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
2242         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
2243         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
2244         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2245         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2246         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
2247         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
2248         * WebProcess/Plugins/PluginView.cpp:
2249         (WebKit::PluginView::activityStateDidChange):
2250         (WebKit::PluginView::viewStateDidChange): Deleted.
2251         * WebProcess/Plugins/PluginView.h:
2252         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
2253         (WebKit::AcceleratedDrawingArea::activityStateDidChange):
2254         (WebKit::AcceleratedDrawingArea::viewStateDidChange): Deleted.
2255         * WebProcess/WebPage/AcceleratedDrawingArea.h:
2256         * WebProcess/WebPage/DrawingArea.h:
2257         (WebKit::DrawingArea::activityStateDidChange):
2258         (WebKit::DrawingArea::viewStateDidChange): Deleted.
2259         * WebProcess/WebPage/WebPage.cpp:
2260         (WebKit::m_userInterfaceLayoutDirection):
2261         (WebKit::WebPage::reinitializeWebPage):
2262         (WebKit::WebPage::updateIsInWindow):
2263         (WebKit::WebPage::setActivityState):
2264         (WebKit::WebPage::setViewState): Deleted.
2265         * WebProcess/WebPage/WebPage.h:
2266         (WebKit::WebPage::isVisible):
2267         (WebKit::WebPage::isVisibleOrOccluded):
2268         * WebProcess/WebPage/WebPage.messages.in:
2269         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2270         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2271         (WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):
2272         (WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange): Deleted.
2273         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2274         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2275         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2276         (WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):
2277         (WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired):
2278         (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange): Deleted.
2279         (WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired): Deleted.
2280
2281 2016-10-31  Jaehun Lim  <ljaehun.lim@samsung.com>
2282
2283         Unreviewed, CMake build fix
2284
2285         Adds #include <WebCore/IDBGetAllRecordsData.h>
2286
2287         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2288
2289 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
2290
2291         Add basic visual/layout viewport support for fixed position layout
2292         https://bugs.webkit.org/show_bug.cgi?id=164261
2293
2294         Reviewed by Dean Jackson.
2295
2296         Don't make visualViewportEnabled an experimental feature, because I don't want it enabled
2297         by default in WebKitTestRunner (and therefore mismatching DumpRenderTree).
2298
2299         * Shared/WebPreferencesDefinitions.h:
2300
2301 2016-10-29  Filip Pizlo  <fpizlo@apple.com>
2302
2303         JSC should support SharedArrayBuffer
2304         https://bugs.webkit.org/show_bug.cgi?id=163986
2305
2306         Reviewed by Keith Miller.
2307         
2308         Adds some small things we need for SharedArrayBuffer.
2309
2310         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2311         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2312         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2313         (WebKit::InjectedBundle::createWebDataFromUint8Array):
2314
2315 2016-10-31  Brady Eidson  <beidson@apple.com>
2316
2317         IndexedDB 2.0: Support IDBObjectStore getAll/getAllKeys.
2318         <rdar://problem/28806934> and https://bugs.webkit.org/show_bug.cgi?id=164097
2319
2320         Reviewed by Darin Adler.
2321
2322         - Handle moving "Get All" requests to and from the DatabaseProcess.
2323         - Handle the additional task of creating/passing Sandbox Extensions for
2324           referenced files when necessary. 
2325           
2326         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2327         (WebKit::WebIDBConnectionToClient::handleGetResult):
2328         (WebKit::WebIDBConnectionToClient::didGetAllRecords):
2329         (WebKit::WebIDBConnectionToClient::getAllRecords):
2330         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
2331         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
2332         
2333         * Shared/WebCoreArgumentCoders.h:
2334         
2335         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2336         (WebKit::WebIDBConnectionToServer::getAllRecords):
2337         (WebKit::preregisterSandboxExtensionsIfNecessary):
2338         (WebKit::WebIDBConnectionToServer::didGetAllRecords):
2339         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
2340         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
2341
2342 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
2343
2344         [WK1] Candidate visibility should not update as a result of selection during a dictionary lookup
2345         https://bugs.webkit.org/show_bug.cgi?id=164236
2346         <rdar://problem/28747712>
2347
2348         Reviewed by Beth Dakin.
2349
2350         See WebCore ChangeLog for more detail. Removes m_isGettingDictionaryPopupInfo from the WebPage in favor of
2351         keeping track of the same state in Editor, so that both the WK1 and WK2 cases can share the same codepath.
2352
2353         * WebProcess/WebPage/WebPage.cpp:
2354         (WebKit::WebPage::didChangeSelection):
2355         * WebProcess/WebPage/WebPage.h:
2356         * WebProcess/WebPage/mac/WebPageMac.mm:
2357         (WebKit::WebPage::dictionaryPopupInfoForRange):
2358
2359 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
2360
2361         Implement IntersectionObserver
2362         https://bugs.webkit.org/show_bug.cgi?id=159475
2363
2364         Reviewed by Ryosuke Niwa.
2365
2366         Add ENABLE_INTERSECTION_OBSERVER, enabled by default.
2367
2368         * Configurations/FeatureDefines.xcconfig:
2369
2370 2016-10-31  Ryan Haddad  <ryanhaddad@apple.com>
2371
2372         Unreviewed, rolling out r208154.
2373
2374         This change caused an assertion failure during API tests on
2375         macOS.
2376
2377         Reverted changeset:
2378
2379         "NetworkSession: Network process crash when converting main
2380         resource to download"
2381         https://bugs.webkit.org/show_bug.cgi?id=164220
2382         http://trac.webkit.org/changeset/208154
2383
2384 2016-10-28  Brent Fulgham  <bfulgham@apple.com>
2385
2386         Do a better job of protecting Frame objects in the context of JavaScript calls
2387         https://bugs.webkit.org/show_bug.cgi?id=164163
2388         <rdar://problem/28955249>
2389
2390         Reviewed by Darin Adler.
2391
2392         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
2393         (WebKit::InjectedBundleRangeHandle::renderedImage): Protected the Frame.
2394         * WebProcess/WebPage/WebPage.cpp:
2395         (WebKit::WebPage::insertTextAsync): Ditto.
2396         (WebKit::WebPage::setComposition): Ditto.
2397         * WebProcess/WebPage/mac/WebPageMac.mm:
2398         (WebKit::WebPage::insertDictatedTextAsync): Ditto.
2399
2400 2016-10-31  Carlos Garcia Campos  <cgarcia@igalia.com>
2401
2402         NetworkSession: Network process crash when converting main resource to download
2403         https://bugs.webkit.org/show_bug.cgi?id=164220
2404
2405         Reviewed by Alex Christensen.
2406
2407         Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
2408         sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
2409         NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
2410         download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
2411         NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
2412         having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
2413         load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
2414         NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
2415         client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
2416         created yet. That's not expected to happen and when the response completion handler is called in the
2417         NetworkDataTask it tries to use either the client or the download and it crashes.
2418
2419         * NetworkProcess/NetworkResourceLoader.cpp:
2420         (WebKit::NetworkResourceLoader::didBecomeDownload): Call cleanup() instead of just deleting the network load.
2421         (WebKit::NetworkResourceLoader::abort): If we still have a network load that was converted to a download, do not
2422         call cleanup() because it will be called by didBecomeDownload() later.
2423
2424 2016-10-31  Darin Adler  <darin@apple.com>
2425
2426         Move ChildNode and ParentNode from ExceptionCode to Exception, add support for ExceptionOr<T&>
2427         https://bugs.webkit.org/show_bug.cgi?id=164214
2428
2429         Reviewed by Alex Christensen.
2430
2431         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
2432         (webkit_dom_document_query_selector): Updated exception handling.
2433         (webkit_dom_document_query_selector_all): Ditto.
2434         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
2435         (webkit_dom_document_fragment_query_selector): Ditto.
2436         (webkit_dom_document_fragment_query_selector_all): Ditto.
2437         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
2438         (webkit_dom_element_query_selector): Ditto.
2439         (webkit_dom_element_query_selector_all): Ditto.
2440
2441 2016-10-31  Darin Adler  <darin@apple.com>
2442
2443         Convert Document from ExceptionCode to Exception
2444         https://bugs.webkit.org/show_bug.cgi?id=164212
2445
2446         Reviewed by Alex Christensen.
2447
2448         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
2449         (webkit_dom_document_create_element): Updated exception handling.
2450         (webkit_dom_document_create_cdata_section): Ditto.
2451         (webkit_dom_document_create_processing_instruction): Ditto.
2452         (webkit_dom_document_create_attribute): Ditto.
2453         (webkit_dom_document_import_node): Ditto.
2454         (webkit_dom_document_create_element_ns): Ditto.
2455         (webkit_dom_document_create_attribute_ns): Ditto.
2456         (webkit_dom_document_adopt_node): Ditto.
2457         (webkit_dom_document_create_event): Ditto.
2458         (webkit_dom_document_set_xml_version): Ditto.
2459         (webkit_dom_document_get_cookie): Ditto.
2460         (webkit_dom_document_set_cookie): Ditto.
2461         (webkit_dom_document_set_body): Ditto.
2462         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
2463         (-[WKDOMDocument createElement:]): Ditto.
2464
2465 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
2466
2467         Holding down a key to choose an accented character should fire "insertReplacementText" input events
2468         https://bugs.webkit.org/show_bug.cgi?id=164209
2469         <rdar://problem/29019305>
2470
2471         Reviewed by Darin Adler.
2472
2473         When replacing text, call Editor::insertText with the correct TextEventInputType so that WebCore will know to
2474         use EditActionInsertReplacement when creating and applying the corresponding TypingCommand. Additional minor
2475         changes in order to support testing replacement text insertion.
2476
2477         * UIProcess/API/Cocoa/WKWebView.mm:
2478         (-[WKWebView _insertText:replacementRange:]):
2479         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2480         * WebProcess/WebPage/WebPage.cpp:
2481         (WebKit::WebPage::insertTextAsync):
2482
2483 2016-10-30  Darin Adler  <darin@apple.com>
2484
2485         Move Element, NamedNodeMap, and DOMStringMap from ExceptionCode to Exception
2486         https://bugs.webkit.org/show_bug.cgi?id=164206
2487
2488         Reviewed by Chris Dumez.
2489
2490         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
2491         (webkit_dom_named_node_map_set_named_item): Updated exception handling.
2492         (webkit_dom_named_node_map_remove_named_item): Ditto.
2493         (webkit_dom_named_node_map_set_named_item_ns): Ditto.
2494         (webkit_dom_named_node_map_remove_named_item_ns): Ditto.
2495         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
2496         (webkit_dom_element_set_attribute): Ditto.
2497         (webkit_dom_element_set_attribute_node): Ditto.
2498         (webkit_dom_element_remove_attribute_node): Ditto.
2499         (webkit_dom_element_set_attribute_ns): Ditto.
2500         (webkit_dom_element_set_attribute_node_ns): Ditto.
2501         (webkit_dom_element_matches): Ditto.
2502         (webkit_dom_element_closest): Ditto.
2503         (webkit_dom_element_webkit_matches_selector): Ditto.
2504         (webkit_dom_element_insert_adjacent_element): Ditto.
2505         (webkit_dom_element_insert_adjacent_html): Ditto.
2506         (webkit_dom_element_insert_adjacent_text): Ditto.
2507         (webkit_dom_element_set_inner_html): Ditto.
2508         (webkit_dom_element_set_outer_html): Ditto.
2509         * WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
2510         (-[WKDOMElement setAttribute:value:]): Ditto.
2511
2512 2016-10-30  Yusuke Suzuki  <utatane.tea@gmail.com>
2513
2514         [DOM] Introduce WebCore::jsDynamicDowncast
2515         https://bugs.webkit.org/show_bug.cgi?id=164137
2516
2517         Reviewed by Darin Adler.
2518
2519         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
2520         (WebKit::WebAutomationSessionProxy::elementForNodeHandle):
2521
2522 2016-10-29  Darin Adler  <darin@apple.com>
2523
2524         Convert more of DOM from ExceptionCode to Exception
2525         https://bugs.webkit.org/show_bug.cgi?id=164173
2526
2527         Reviewed by Ryosuke Niwa.
2528
2529         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
2530         (webkit_dom_character_data_substring_data): Updated since this
2531         now uses ExceptionOr.
2532         (webkit_dom_character_data_insert_data): Ditto.
2533         (webkit_dom_character_data_delete_data): Ditto.
2534         (webkit_dom_character_data_replace_data): Ditto.
2535         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
2536         (webkit_dom_text_replace_whole_text): Ditto.
2537         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
2538         (webkit_dom_text_split_text): Ditto.
2539
2540 2016-10-28  Darin Adler  <darin@apple.com>
2541
2542         Move all classes in the HTML directory from ExceptionCode to Exception
2543         https://bugs.webkit.org/show_bug.cgi?id=163876
2544
2545         Reviewed by Sam Weinig.
2546
2547         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
2548         (webkit_dom_dom_token_list_add): Updated exception handling.
2549         (webkit_dom_dom_token_list_remove): Ditto.
2550         (webkit_dom_dom_token_list_toggle): Ditto.
2551         (webkit_dom_dom_token_list_replace): Ditto.
2552         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
2553         (webkit_dom_element_remove): Ditto.
2554         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
2555         (webkit_dom_html_element_set_inner_text): Ditto.
2556         (webkit_dom_html_element_set_outer_text): Ditto.
2557         (webkit_dom_html_element_set_content_editable): Ditto.
2558         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
2559         (webkit_dom_html_input_element_set_max_length): Ditto.
2560         (webkit_dom_html_input_element_set_size): Ditto.
2561         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
2562         (webkit_dom_html_select_element_set_length): Ditto.
2563         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
2564         (webkit_dom_html_table_element_insert_row): Ditto.
2565         (webkit_dom_html_table_element_delete_row): Ditto.
2566         (webkit_dom_html_table_element_set_caption): Ditto.
2567         (webkit_dom_html_table_element_set_t_head): Ditto.
2568         (webkit_dom_html_table_element_set_t_foot): Ditto.
2569         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
2570         (webkit_dom_html_table_row_element_insert_cell): Ditto.
2571         (webkit_dom_html_table_row_element_delete_cell): Ditto.
2572         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
2573         (webkit_dom_html_table_section_element_insert_row): Ditto.
2574         (webkit_dom_html_table_section_element_delete_row): Ditto.
2575
2576         * WebProcess/WebPage/WebPage.cpp:
2577         (WebKit::WebPage::editorState): Removed ASSERT_NO_EXCEPTION.
2578
2579         * WebProcess/WebPage/ios/WebPageIOS.mm:
2580         (WebKit::WebPage::setAssistedNodeValueAsNumber): Removed ASSERT_NO_EXCEPTION.
2581
2582         * WebProcess/cocoa/WebPlaybackSessionManager.mm:
2583         (WebKit::WebPlaybackSessionManager::seekableRangesChanged):
2584         Changed the code to use a different interface to TimeRange that does
2585         not involve exceptions.
2586
2587 2016-10-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2588
2589         iOS autocorrection does not trigger an input event of inputType "insertReplacementText"
2590         https://bugs.webkit.org/show_bug.cgi?id=164077
2591         <rdar://problem/28987810>
2592
2593         Reviewed by Simon Fraser.
2594
2595         Small tweak to mark text insertion when autocorrecting as such, as opposed to regular keyboard input.
2596
2597         * WebProcess/WebPage/ios/WebPageIOS.mm:
2598         (WebKit::WebPage::syncApplyAutocorrection):
2599
2600 2016-10-28  Megan Gardner  <megan_gardner@apple.com>
2601
2602         Rename SharedMemoryMac to SharedMemoryCocoa
2603         https://bugs.webkit.org/show_bug.cgi?id=164156
2604
2605         Reviewed by Alex Christensen.
2606
2607         Renamed SharedMemoryMac to SharedMemoryCocoa, as it runs on all cocoa platforms, not exclusively just mac, and
2608         thus should be named to reflect that reality.
2609
2610         * Platform/cocoa: Added.
2611         * Platform/cocoa/SharedMemoryCocoa.cpp: Copied from Source/WebKit2/Platform/mac/SharedMemoryMac.cpp.
2612         * Platform/mac/SharedMemoryMac.cpp: Removed.
2613         * WebKit2.xcodeproj/project.pbxproj:
2614
2615 2016-10-28  Antti Koivisto  <antti@apple.com>
2616
2617         Enable CFNetwork connection cache fast lane for WebKit2
2618         https://bugs.webkit.org/show_bug.cgi?id=164129
2619
2620         Reviewed by Andreas Kling.
2621
2622         The idea of this feature is keep a connection free for higher priority requests so low-priority
2623         image loads can't take all the available connections.
2624
2625         We have this enabled on WK1 but not on WK2. See what enabling it does for performance in bots.
2626
2627         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2628         (WebKit::initializeNetworkSettings):
2629
2630             Based on code inspection setting kHTTPMinimumFastLanePriority is not sufficient to enable this feature,
2631             kHTTPNumFastLanes needs also be set to a non-zero value. Use the same constants as WK1.
2632             Also enable this on Mac to unify behavior.
2633
2634 2016-10-27  Michael Catanzaro  <mcatanzaro@igalia.com>
2635
2636         [GTK] New stable DOM API headers should be included from webkitdom.h
2637         https://bugs.webkit.org/show_bug.cgi?id=164069
2638
2639         Reviewed by Carlos Garcia Campos.
2640
2641         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h:
2642
2643 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
2644
2645         Fix when building against the MacOSX10.12.sdk where "macos" is not recognized
2646         in the availability macros.
2647
2648         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2649
2650 2016-10-27  Megan Gardner  <megan_gardner@apple.com>
2651
2652         Add support for wide gamut for ShareableBitmap for image popovers
2653         https://bugs.webkit.org/show_bug.cgi?id=164001
2654
2655         Reviewed by Simon Fraser.
2656
2657         Added suppport for wide gamut in ShareableBitmap. SharableBitmaps now know the size of their pixels,
2658         and that data is passed back and forth between the processes. The callers of SharedBitmap will determine
2659         if their image should support wide gamut, but ShareableBitmap will override a set flag on a device that
2660         is incapbable of supporting a wide gamut image.
2661         This makes it possible to show wide gamut images in image popovers on iOS.
2662         This is currently untestable, so no tests added.
2663
2664         * Platform/IPC/Decoder.cpp:
2665         (IPC::Decoder::decode):
2666         * Platform/IPC/Decoder.h:
2667         * Platform/IPC/Encoder.cpp:
2668         (IPC::Encoder::encode):
2669         * Platform/IPC/Encoder.h:
2670         * Shared/ShareableBitmap.cpp:
2671         (WebKit::bytesPerPixel):
2672         (WebKit::ShareableBitmap::Handle::encode):
2673         (WebKit::ShareableBitmap::Handle::decode):
2674         (WebKit::ShareableBitmap::Handle::clear):
2675         (WebKit::ShareableBitmap::create):
2676         (WebKit::ShareableBitmap::createShareable):
2677         (WebKit::ShareableBitmap::createHandle):
2678         (WebKit::ShareableBitmap::ShareableBitmap):
2679         * Shared/ShareableBitmap.h:
2680         (WebKit::ShareableBitmap::numBytesForSize):
2681         (WebKit::ShareableBitmap::sizeInBytes):
2682         * Shared/cg/ShareableBitmapCG.cpp:
2683         (WebKit::bitmapInfo):
2684         (WebKit::ShareableBitmap::createGraphicsContext):
2685         (WebKit::ShareableBitmap::createCGImage):
2686         * WebProcess/WebPage/ios/WebPageIOS.mm:
2687         (WebKit::WebPage::getPositionInformation):
2688
2689 2016-10-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2690
2691         Support "insertFromDrop" and "deleteByDrag" for the InputEvent spec
2692         https://bugs.webkit.org/show_bug.cgi?id=163948
2693         <rdar://problem/28921433>
2694
2695         Reviewed by Darin Adler.
2696
2697         Add support for new drag and drop-related EditAction enum values.
2698
2699         * UIProcess/WebEditCommandProxy.cpp:
2700         (WebKit::WebEditCommandProxy::nameForEditAction):
2701
2702 2016-10-26  Chris Dumez  <cdumez@apple.com>
2703
2704         Replace IDBKeyPath with a WTF::Variant
2705         https://bugs.webkit.org/show_bug.cgi?id=163909
2706
2707         Reviewed by Darin Adler.
2708
2709         Add coders to encode / decode IDBKeyPath type for IPC.
2710
2711         * Shared/Databases/IndexedDB/WebIDBResult.cpp:
2712         * Shared/WebCoreArgumentCoders.cpp:
2713         (IPC::ArgumentCoder<IDBKeyPath>::encode):
2714         (IPC::ArgumentCoder<IDBKeyPath>::decode):
2715         * Shared/WebCoreArgumentCoders.h:
2716         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2717
2718 2016-10-26  Brian Burg  <bburg@apple.com>
2719
2720         Web Inspector: remove unused bool return value from FrontendChannel::sendMessageToFrontend
2721         https://bugs.webkit.org/show_bug.cgi?id=164046
2722
2723         Reviewed by Joseph Pecoraro.
2724
2725         * WebProcess/WebPage/WebInspector.cpp:
2726         (WebKit::WebInspector::sendMessageToFrontend):
2727         * WebProcess/WebPage/WebInspector.h:
2728
2729 2016-10-26  Eric Carlson  <eric.carlson@apple.com>
2730
2731         [MediaStream] Add "has capture device" bit to media state flags
2732         https://bugs.webkit.org/show_bug.cgi?id=163952
2733
2734         Unreviewed fix after r207839.
2735
2736         * WebProcess/WebPage/WebPage.cpp:
2737         (WebKit::WebPage::setMuted): Take an MutedStateFlags, not a bool.
2738         * WebProcess/WebPage/WebPage.h:
2739
2740 2016-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2741
2742         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.1 release.
2743
2744         * gtk/NEWS: Add release notes for 2.15.1.
2745
2746 2016-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2747
2748         REGRESSION(r206505) [GTK] Build broken with GTK+ 3.14
2749         https://bugs.webkit.org/show_bug.cgi?id=162776
2750
2751         Reviewed by Xabier Rodriguez-Calvar.
2752
2753         Do not use gtk_widget_get_action_group() when GTK+ < 3.16, use g_object_set instead to attach the action group
2754         to the menu widget.
2755
2756         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2757         (WebKit::WebContextMenuProxyGtk::append):
2758         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
2759         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
2760
2761 2016-10-25  Alex Christensen  <achristensen@webkit.org>
2762
2763         CMake build fix.
2764
2765         * PlatformMac.cmake:
2766         * Shared/WebHitTestResultData.cpp:
2767         (WebKit::WebHitTestResultData::WebHitTestResultData):
2768         Explicitly call AtomicString::string to make the String constructor no longer ambiguous.
2769         It couldn't decide whether to use operator const String& or operator NSString*.
2770
2771 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2772
2773         [SOUP] Network process assertion in NetworkDataTask::continueHTTPRedirection
2774         https://bugs.webkit.org/show_bug.cgi?id=163941
2775
2776         Reviewed by Michael Catanzaro.
2777
2778         equalLettersIgnoringASCIICase() expects the second argument to be the letters to compare in lowercase, so use
2779         "get" instead of "GET".
2780
2781         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2782         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
2783
2784 2016-10-25  Eric Carlson  <eric.carlson@apple.com>
2785
2786         [MediaStream] Add "has capture device" bit to media state flags
2787         https://bugs.webkit.org/show_bug.cgi?id=163952
2788
2789         Reviewed by Sam Weinig.
2790
2791         * UIProcess/API/C/WKPage.cpp:
2792         (WKPageGetMediaState): Support MediaProducer::HasMediaCaptureDevice.
2793         * UIProcess/API/C/WKPagePrivate.h: Define kWKMediaHasCaptureDevice.
2794
2795 2016-10-25  Commit Queue  <commit-queue@webkit.org>
2796
2797         Unreviewed, rolling out r207827 and r207828.
2798         https://bugs.webkit.org/show_bug.cgi?id=163965
2799
2800         Caused LayoutTest webaudio/web-audio-is-playing.html to time
2801         out on macOS. (Requested by ryanhaddad on #webkit).
2802
2803         Reverted changesets:
2804
2805         "[MediaStream] Add "has capture device" bit to media state
2806         flags"
2807         https://bugs.webkit.org/show_bug.cgi?id=163952
2808         http://trac.webkit.org/changeset/207827
2809
2810         "[MediaStream] Add "has capture device" bit to media state
2811         flags"
2812         https://bugs.webkit.org/show_bug.cgi?id=163952
2813         http://trac.webkit.org/changeset/207828
2814
2815 2016-10-25  Eric Carlson  <eric.carlson@apple.com>
2816
2817         [MediaStream] Add "has capture device" bit to media state flags
2818         https://bugs.webkit.org/show_bug.cgi?id=163952
2819
2820         Reviewed by Sam Weinig.
2821
2822         * UIProcess/API/C/WKPage.cpp:
2823         (WKPageGetMediaState): Support MediaProducer::HasMediaCaptureDevice.
2824         * UIProcess/API/C/WKPagePrivate.h: Define kWKMediaHasCaptureDevice.
2825
2826 2016-10-25  Chris Dumez  <cdumez@apple.com>
2827
2828         Unreviewed, rolling out r207494.
2829
2830         iOS SDK has been updated on the bots now so rollout the
2831         rollout
2832
2833         Reverted changeset:
2834
2835         "Unreviewed, rolling out r207413."
2836         https://bugs.webkit.org/show_bug.cgi?id=163547
2837         http://trac.webkit.org/changeset/207494
2838
2839 2016-10-25  Jonathan Bedard  <jbedard@apple.com>
2840
2841         Unreviewed build fix.
2842
2843         * UIProcess/API/Cocoa/WKWebView.mm:
2844         (-[WKWebView _fullscreenDelegate]): Removed unneeded parenthesis.
2845
2846 2016-10-19  Jer Noble  <jer.noble@apple.com>
2847
2848         Add WKWebView fullscreen delegate SPI
2849         https://bugs.webkit.org/show_bug.cgi?id=163674
2850
2851         Reviewed by Anders Carlsson.
2852
2853         Add a new SPI property to WKWebView allowing clients to be notified when fullscreen mode enters and exits.
2854
2855         * UIProcess/API/APIFullscreenClient.h: Added.
2856         (API::FullscreenClient::~FullscreenClient):
2857         (API::FullscreenClient::willEnterFullscreen):
2858         (API::FullscreenClient::didEnterFullscreen):
2859         (API::FullscreenClient::willExitFullscreen):
2860         (API::FullscreenClient::didExitFullscreen):
2861         * UIProcess/API/Cocoa/WKWebView.mm:
2862         (-[WKWebView _initializeWithConfiguration:]):
2863         (-[WKWebView _setFullscreenDelegate:]):
2864         (-[WKWebView _fullscreenDelegate]):
2865         (-[WKWebView _isInFullscreen]):
2866         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2867         * UIProcess/API/Cocoa/_WKFullscreenDelegate.h: Added.
2868         * UIProcess/Cocoa/FullscreenClient.h: Added.
2869         (WebKit::FullscreenClient::~FullscreenClient):
2870         * UIProcess/Cocoa/FullscreenClient.mm: Added.
2871         (WebKit::FullscreenClient::FullscreenClient):
2872         (WebKit::FullscreenClient::delegate):
2873         (WebKit::FullscreenClient::setDelegate):
2874         (WebKit::FullscreenClient::willEnterFullscreen):
2875         (WebKit::FullscreenClient::didEnterFullscreen):
2876         (WebKit::FullscreenClient::willExitFullscreen):
2877         (WebKit::FullscreenClient::didExitFullscreen):
2878         * UIProcess/WebFullScreenManagerProxy.cpp:
2879         (WebKit::WebFullScreenManagerProxy::willEnterFullScreen):
2880         (WebKit::WebFullScreenManagerProxy::didEnterFullScreen):
2881         (WebKit::WebFullScreenManagerProxy::willExitFullScreen):
2882         (WebKit::WebFullScreenManagerProxy::didExitFullScreen):
2883         * UIProcess/WebPageProxy.cpp:
2884         (WebKit::WebPageProxy::WebPageProxy):
2885         (WebKit::WebPageProxy::setFullscreenClient):
2886         (WebKit::WebPageProxy::fullScreenManager): Deleted.
2887         * UIProcess/WebPageProxy.h:
2888         (WebKit::WebPageProxy::fullscreenClient):
2889         * WebKit2.xcodeproj/project.pbxproj:
2890
2891 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2892
2893         Unreviewed. Fix timeouts in 12 GTK+ unit tests after r207812.
2894
2895         * NetworkProcess/NetworkProcessCreationParameters.h: Initialize loadThrottleLatency.
2896
2897 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2898
2899         Unreviewed. Fix Soup based ports debug build after r207813.
2900
2901         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2902         (WebKit::NetworkDataTaskSoup::authenticateCallback):
2903         (WebKit::NetworkDataTaskSoup::requestStartedCallback):
2904
2905 2016-10-25  Andreas Kling  <akling@apple.com>
2906
2907         More PassRefPtr purging in WebCore.
2908         <https://webkit.org/b/163895>
2909
2910         Reviewed by Antti Koivisto.
2911
2912         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
2913         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
2914         (WebKit::PDFPlugin::createScrollbar):
2915
2916 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2917
2918         NetworkSession: switch to use subclasses for NetworkSession and NetworkDataTask implementations
2919         https://bugs.webkit.org/show_bug.cgi?id=163777
2920
2921         Reviewed by Alex Christensen.
2922
2923         The subclass model allows us to choose the implementation at run time, so we could add other implementations
2924         like a mock network class to measure performance, and even one for blobs and finally get rid of ResourceHandle
2925         in WebKit2.
2926
2927         * CMakeLists.txt: Add new files to compilation.
2928         * NetworkProcess/NetworkDataTask.cpp: Added.
2929         (WebKit::NetworkDataTask::create): Create a NetworkDataTaskCocoa or NetworkDataTaskSoup.
2930         (WebKit::NetworkDataTask::NetworkDataTask): Move common code from NetworkDataTaskCocoa and NetworkDataTaskSoup
2931         here to handle the early failures.
2932         (WebKit::NetworkDataTask::~NetworkDataTask):
2933         (WebKit::NetworkDataTask::scheduleFailure):
2934         (WebKit::NetworkDataTask::failureTimerFired):
2935         * NetworkProcess/NetworkDataTask.h: Remove platform specific members.
2936         (WebKit::NetworkDataTask::setPendingDownloadLocation): Make it virtual and set the m_pendingDownloadLocation.
2937         (WebKit::NetworkDataTask::suggestedFilename): Make it virtual and const with a default implementation.
2938         (WebKit::NetworkDataTask::setSuggestedFilename): Ditto.
2939         (WebKit::NetworkDataTask::allowsSpecificHTTPSCertificateForHost): Ditto.
2940         * NetworkProcess/NetworkLoad.cpp: Include NetworkDataTaskCocoa.h.
2941         * NetworkProcess/NetworkLoad.h: Include NetworkDataTask.h instead of NetworkSession.h.
2942         * NetworkProcess/NetworkProcess.cpp:
2943         (WebKit::NetworkProcess::NetworkProcess): Use NetworkSessionCocoa.
2944         * NetworkProcess/NetworkSession.cpp:
2945         (WebKit::NetworkSession::create): Create a NetworkSessionCocoa or NetworkSessionSoup.
2946         (WebKit::NetworkSession::defaultSession): In case of cocoa use NetworkSessionCocoa::defaultSession() because of
2947         the custom protocol manager, otherwise simply create a default session.
2948         (WebKit::NetworkSession::networkStorageSession): Move common code from NetworkSessionCocoa and
2949         NetworkSessionSoup here.
2950         (WebKit::NetworkSession::NetworkSession):
2951         (WebKit::NetworkSession::~NetworkSession):
2952         * NetworkProcess/NetworkSession.h: Remove platform specific members.
2953         (WebKit::NetworkSession::invalidateAndCancel): Make it virtual.
2954         (WebKit::NetworkSession::clearCredentials): Ditto.
2955         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: Include NetworkSession.h.
2956         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Added.
2957         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2958         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
2959         (WebKit::NetworkDataTaskCocoa::~NetworkDataTaskCocoa):
2960         (WebKit::NetworkDataTaskCocoa::didSendData):
2961         (WebKit::NetworkDataTaskCocoa::didReceiveChallenge):
2962         (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
2963         (WebKit::NetworkDataTaskCocoa::didReceiveResponse):
2964         (WebKit::NetworkDataTaskCocoa::didReceiveData):
2965         (WebKit::NetworkDataTaskCocoa::didBecomeDownload):
2966         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
2967         (WebKit::NetworkDataTaskCocoa::setPendingDownloadLocation):
2968         (WebKit::NetworkDataTaskCocoa::tryPasswordBasedAuthentication):
2969         (WebKit::NetworkDataTaskCocoa::transferSandboxExtensionToDownload):
2970         (WebKit::NetworkDataTaskCocoa::allowsSpecificHTTPSCertificateForHost):
2971         (WebKit::NetworkDataTaskCocoa::suggestedFilename):
2972         (WebKit::NetworkDataTaskCocoa::cancel):
2973         (WebKit::NetworkDataTaskCocoa::resume):
2974         (WebKit::NetworkDataTaskCocoa::suspend):
2975         (WebKit::NetworkDataTaskCocoa::state):
2976         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2977         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2978         * NetworkProcess/cocoa/NetworkSessionCocoa.h: Added.
2979         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2980         (-[WKNetworkSessionDelegate initWithNetworkSession:withCredentials:]):
2981         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
2982         (WebKit::configurationForSessionID):
2983         (WebKit::NetworkSessionCocoa::setCustomProtocolManager):
2984         (WebKit::NetworkSessionCocoa::setSourceApplicationAuditTokenData):
2985         (WebKit::NetworkSessionCocoa::setSourceApplicationBundleIdentifier):
2986         (WebKit::NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier):
2987         (WebKit::NetworkSessionCocoa::setCTDataConnectionServiceType):
2988         (WebKit::NetworkSessionCocoa::create):
2989         (WebKit::NetworkSessionCocoa::defaultSession):
2990         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2991         (WebKit::NetworkSessionCocoa::~NetworkSessionCocoa):
2992         (WebKit::NetworkSessionCocoa::invalidateAndCancel):
2993         (WebKit::NetworkSessionCocoa::clearCredentials):
2994         (WebKit::NetworkSessionCocoa::dataTaskForIdentifier):
2995         (WebKit::NetworkSessionCocoa::addDownloadID):
2996         (WebKit::NetworkSessionCocoa::downloadID):
2997         (WebKit::NetworkSessionCocoa::takeDownloadID):
2998         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2999         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3000         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3001         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
3002         (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
3003         (WebKit::NetworkDataTaskSoup::suggestedFilename):
3004         (WebKit::NetworkDataTaskSoup::setPendingDownloadLocation):
3005         (WebKit::NetworkDataTaskSoup::createRequest):
3006         (WebKit::NetworkDataTaskSoup::clearRequest):
3007         (WebKit::NetworkDataTaskSoup::resume):
3008         (WebKit::NetworkDataTaskSoup::suspend):
3009         (WebKit::NetworkDataTaskSoup::cancel):
3010         (WebKit::NetworkDataTaskSoup::invalidateAndCancel):
3011         (WebKit::NetworkDataTaskSoup::state):
3012         (WebKit::NetworkDataTaskSoup::timeoutFired):
3013         (WebKit::NetworkDataTaskSoup::startTimeout):
3014         (WebKit::NetworkDataTaskSoup::stopTimeout):
3015         (WebKit::NetworkDataTaskSoup::sendRequestCallback):
3016         (WebKit::NetworkDataTaskSoup::didSendRequest):
3017         (WebKit::NetworkDataTaskSoup::didReceiveResponse):
3018         (WebKit::NetworkDataTaskSoup::tlsErrorsChangedCallback):
3019         (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
3020         (WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):
3021         (WebKit::NetworkDataTaskSoup::authenticateCallback):
3022         (WebKit::NetworkDataTaskSoup::authenticate):
3023         (WebKit::NetworkDataTaskSoup::continueAuthenticate):
3024         (WebKit::NetworkDataTaskSoup::skipInputStreamForRedirectionCallback):
3025         (WebKit::NetworkDataTaskSoup::skipInputStreamForRedirection):
3026         (WebKit::NetworkDataTaskSoup::didFinishSkipInputStreamForRedirection):
3027         (WebKit::NetworkDataTaskSoup::shouldStartHTTPRedirection):
3028         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
3029         (WebKit::NetworkDataTaskSoup::readCallback):
3030         (WebKit::NetworkDataTaskSoup::read):
3031         (WebKit::NetworkDataTaskSoup::didRead):
3032         (WebKit::NetworkDataTaskSoup::didFinishRead):
3033         (WebKit::NetworkDataTaskSoup::requestNextPartCallback):
3034         (WebKit::NetworkDataTaskSoup::requestNextPart):
3035         (WebKit::NetworkDataTaskSoup::didRequestNextPart):
3036         (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
3037         (WebKit::NetworkDataTaskSoup::gotHeadersCallback):
3038         (WebKit::NetworkDataTaskSoup::didGetHeaders):
3039         (WebKit::NetworkDataTaskSoup::wroteBodyDataCallback):
3040         (WebKit::NetworkDataTaskSoup::didWriteBodyData):
3041         (WebKit::NetworkDataTaskSoup::download):
3042         (WebKit::NetworkDataTaskSoup::writeDownloadCallback):
3043         (WebKit::NetworkDataTaskSoup::writeDownload):
3044         (WebKit::NetworkDataTaskSoup::didWriteDownload):
3045         (WebKit::NetworkDataTaskSoup::didFinishDownload):
3046         (WebKit::NetworkDataTaskSoup::didFailDownload):
3047         (WebKit::NetworkDataTaskSoup::cleanDownloadFiles):
3048         (WebKit::NetworkDataTaskSoup::didFail):
3049         (WebKit::NetworkDataTaskSoup::networkEventCallback):
3050         (WebKit::NetworkDataTaskSoup::networkEvent):
3051         (WebKit::NetworkDataTaskSoup::startingCallback):
3052         (WebKit::NetworkDataTaskSoup::requestStartedCallback):
3053         (WebKit::NetworkDataTaskSoup::didStartRequest):
3054         (WebKit::NetworkDataTaskSoup::restartedCallback):
3055         (WebKit::NetworkDataTaskSoup::didRestart):
3056         * NetworkProcess/soup/NetworkDataTaskSoup.h: Added.
3057         * NetworkProcess/soup/NetworkSessionSoup.cpp:
3058         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
3059         (WebKit::NetworkSessionSoup::~NetworkSessionSoup):
3060         (WebKit::NetworkSessionSoup::soupSession):
3061         (WebKit::NetworkSessionSoup::invalidateAndCancel):
3062         * NetworkProcess/soup/NetworkSessionSoup.h: Added.
3063         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
3064         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Update to new NetworkSession::create() API.
3065         * PlatformEfl.cmake: Add new files to compilation.
3066         * PlatformGTK.cmake: Ditto.
3067         * WebKit2.xcodeproj/project.pbxproj: Ditto.
3068         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3069         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Update to new NetworkSession::create() API.
3070         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3071         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Ditto.
3072
3073 2016-10-25  Antti Koivisto  <antti@apple.com>
3074
3075         Add support for introducing simulated latency in network process
3076         https://bugs.webkit.org/show_bug.cgi?id=163902
3077
3078         Reviewed by Alex Christensen.
3079
3080         For testing purposes it is useful to have a mechanism for simulating high latency.
3081         This patch adds a basic mechanism that introduces a delay to each response in network
3082         process. In Safari it can be used with
3083
3084              defaults write com.apple.Safari WebKitNetworkLoadThrottleLatencyMilliseconds 200
3085
3086         Setting the delay to 0 disables the feature.
3087
3088         * NetworkProcess/NetworkLoad.cpp:
3089         (WebKit::NetworkLoad::Throttle::Throttle):
3090         (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
3091         (WebKit::NetworkLoad::notifyDidReceiveResponse):
3092         (WebKit::NetworkLoad::didReceiveData):
3093         (WebKit::NetworkLoad::didCompleteWithError):
3094         (WebKit::NetworkLoad::throttleDelayCompleted):
3095         * NetworkProcess/NetworkLoad.h:
3096         * NetworkProcess/NetworkProcess.cpp:
3097         (WebKit::NetworkProcess::initializeNetworkProcess):
3098         * NetworkProcess/NetworkProcess.h:
3099         (WebKit::NetworkProcess::loadThrottleLatency):
3100         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3101         (WebKit::NetworkProcessCreationParameters::encode):
3102         (WebKit::NetworkProcessCreationParameters::decode):
3103         * NetworkProcess/NetworkProcessCreationParameters.h:
3104         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3105         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3106
3107 2016-10-24  Dan Bernstein  <mitz@apple.com>
3108
3109         REGRESSION (r206410): Sandbox violations beneath WebProcessProxy::platformIsBeingDebugged
3110         https://bugs.webkit.org/show_bug.cgi?id=163879
3111         <rdar://problem/28728735>
3112
3113         Reviewed by Darin Adler.
3114
3115         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
3116         (WebKit::WebProcessProxy::platformIsBeingDebugged): Check if the current process, which is
3117           the UI process, is sandboxed before trying to find out if the Web process is being
3118           debugged.
3119
3120 2016-10-21  Alex Christensen  <achristensen@webkit.org>
3121
3122         URL::port should return Optional<uint16_t>
3123         https://bugs.webkit.org/show_bug.cgi?id=163806
3124
3125         Reviewed by Darin Adler.
3126
3127         * NetworkProcess/mac/NetworkProcessMac.mm:
3128         (WebKit::overrideSystemProxies):
3129         * Shared/API/APISecurityOrigin.h:
3130         (API::SecurityOrigin::create):
3131         * Shared/API/APIURL.h:
3132         (API::URL::protocol):
3133         * Shared/API/c/WKSecurityOriginRef.cpp:
3134         (WKSecurityOriginGetPort):
3135         * UIProcess/API/Cocoa/WKSecurityOrigin.mm:
3136         (-[WKSecurityOrigin port]):
3137         * WebProcess/WebPage/WebPage.cpp:
3138         (WebKit::WebPage::canHandleRequest):
3139         * WebProcess/cocoa/WebProcessCocoa.mm:
3140         (WebKit::origin):
3141
3142 2016-10-24  Eric Carlson  <eric.carlson@apple.com>
3143
3144         [MediaStream] Separate media capture and audio playback muting
3145         https://bugs.webkit.org/show_bug.cgi?id=163855
3146         <rdar://problem/28827186>
3147
3148         Reviewed by Darin Adler.
3149
3150         * Shared/WebPageCreationParameters.h: Change 'muted' from bool to MutedStateFlags.
3151
3152         * UIProcess/API/C/WKPage.cpp: Change parameter from bool to WKMediaMutedState.
3153         (WKPageSetMuted):
3154         * UIProcess/API/C/WKPagePrivate.h: Define WKMediaMutedState.
3155
3156         * UIProcess/WebPageProxy.cpp:
3157         (WebKit::WebPageProxy::WebPageProxy):
3158         (WebKit::WebPageProxy::setMuted): m_muted -> m_mutedState.
3159         (WebKit::WebPageProxy::creationParameters): Ditto.
3160         * UIProcess/WebPageProxy.h:
3161
3162         * WebProcess/Plugins/PluginView.cpp:
3163         (WebKit::PluginView::isMuted): page.isMuted -> page.mutedState.
3164
3165         * WebProcess/WebPage/WebPage.messages.in: Change SetMuted parameter.
3166
3167 2016-10-24  Youenn Fablet  <youenn@apple.com>
3168
3169         Activate WEB_RTC compilation flags for Mac bots
3170         https://bugs.webkit.org/show_bug.cgi?id=163886
3171
3172         Reviewed by Eric Carlson.
3173
3174         * Configurations/FeatureDefines.xcconfig:
3175
3176 2016-10-24  Brady Eidson  <beidson@apple.com>
3177
3178         IndexedDB 2.0: Support IDBIndex name assignment.
3179         <rdar://problem/28806932> and https://bugs.webkit.org/show_bug.cgi?id=163805
3180
3181         Reviewed by Alex Christensen.
3182
3183         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
3184         (WebKit::WebIDBConnectionToClient::didRenameIndex):
3185         (WebKit::WebIDBConnectionToClient::renameIndex):
3186         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
3187         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
3188
3189         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3190         (WebKit::WebIDBConnectionToServer::renameIndex):
3191         (WebKit::WebIDBConnectionToServer::didRenameIndex):
3192         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
3193         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
3194
3195 2016-10-23  Michael Catanzaro  <mcatanzaro@igalia.com>
3196
3197         [GTK] Remove DO NOT MODIFY headers from files that are no longer autogenerated
3198         https://bugs.webkit.org/show_bug.cgi?id=163867
3199
3200         Reviewed by Darin Adler.
3201
3202         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
3203         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.h:
3204         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttrPrivate.h:
3205         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
3206         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h:
3207         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlobPrivate.h:
3208         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
3209         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h:
3210         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASectionPrivate.h:
3211         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h:
3212         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
3213         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h:
3214         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleListPrivate.h:
3215         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRulePrivate.h:
3216         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.h:
3217         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclarationPrivate.h:
3218         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.h:
3219         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheetPrivate.h:
3220         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.h:
3221         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValuePrivate.h:
3222         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
3223         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h:
3224         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterDataPrivate.h:
3225         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
3226         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h:
3227         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCommentPrivate.h:
3228         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.h:
3229         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementationPrivate.h:
3230         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
3231         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h:
3232         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelectionPrivate.h:
3233         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
3234         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h:
3235         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenListPrivate.h:
3236         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
3237         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h:
3238         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowPrivate.h:
3239         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowUnstable.h:
3240         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h:
3241         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
3242         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h:
3243         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragmentPrivate.h:
3244         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragmentUnstable.h:
3245         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentPrivate.h:
3246         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
3247         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.h:
3248         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentTypePrivate.h:
3249         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentUnstable.h:
3250         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
3251         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
3252         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementPrivate.h:
3253         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementUnstable.h:
3254         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
3255         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.h:
3256         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventPrivate.h:
3257         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
3258         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.h:
3259         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
3260         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.h:
3261         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileListPrivate.h:
3262         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFilePrivate.h:
3263         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
3264         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h:
3265         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElementPrivate.h:
3266         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
3267         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.h:
3268         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElementPrivate.h:
3269         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
3270         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h:
3271         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElementPrivate.h:
3272         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
3273         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.h:
3274         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElementPrivate.h:
3275         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
3276         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.h:
3277         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElementPrivate.h:
3278         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
3279         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.h:
3280         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElementPrivate.h:
3281         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
3282         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.h:
3283         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElementPrivate.h:
3284         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
3285         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.h:
3286         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElementPrivate.h:
3287         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
3288         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.h:
3289         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollectionPrivate.h:
3290         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
3291         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.h:
3292         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElementPrivate.h:
3293         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
3294         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.h:
3295         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElementPrivate.h:
3296         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
3297         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.h:
3298         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElementPrivate.h:
3299         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
3300         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.h:
3301         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocumentPrivate.h:
3302         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
3303         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h:
3304         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElementPrivate.h:
3305         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElementUnstable.h:
3306         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
3307         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.h:
3308         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElementPrivate.h:
3309         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
3310         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.h:
3311         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElementPrivate.h:
3312         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
3313         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.h:
3314         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElementPrivate.h:
3315         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
3316         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.h:
3317         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElementPrivate.h:
3318         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
3319         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.h:
3320         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElementPrivate.h:
3321         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
3322         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.h:
3323         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElementPrivate.h:
3324         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
3325         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.h:
3326         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElementPrivate.h:
3327         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
3328         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.h:
3329         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElementPrivate.h:
3330         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
3331         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.h:
3332         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElementPrivate.h:
3333         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
3334         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.h:
3335         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElementPrivate.h:
3336         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
3337         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.h:
3338         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElementPrivate.h:
3339         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
3340         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.h:
3341         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElementPrivate.h:
3342         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
3343         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
3344         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElementPrivate.h:
3345         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
3346         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.h:
3347         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElementPrivate.h:
3348         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
3349         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.h:
3350         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElementPrivate.h:
3351         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
3352         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.h:
3353         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElementPrivate.h:
3354         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
3355         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h:
3356         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElementPrivate.h:
3357         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
3358         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.h:
3359         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElementPrivate.h:
3360         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
3361         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.h:
3362         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElementPrivate.h:
3363         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
3364         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.h:
3365         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElementPrivate.h:
3366         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
3367         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.h:
3368         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElementPrivate.h:
3369         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
3370         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.h:
3371         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElementPrivate.h:
3372         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
3373         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.h:
3374         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElementPrivate.h:
3375         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
3376         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.h:
3377         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElementPrivate.h:
3378         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
3379         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.h:
3380         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElementPrivate.h:
3381         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
3382         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.h:
3383         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElementPrivate.h:
3384         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
3385         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.h:
3386         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollectionPrivate.h:
3387         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
3388         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.h:
3389         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElementPrivate.h:
3390         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
3391         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.h:
3392         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElementPrivate.h:
3393         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
3394         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.h:
3395         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElementPrivate.h:
3396         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp:
3397         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
3398         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.h:
3399         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElementPrivate.h:
3400         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
3401         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.h:
3402         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElementPrivate.h:
3403         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
3404         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.h:
3405         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElementPrivate.h:
3406         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
3407         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.h:
3408         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElementPrivate.h:
3409         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
3410         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.h:
3411         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElementPrivate.h:
3412         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
3413         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.h:
3414         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElementPrivate.h:
3415         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
3416         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.h:
3417         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElementPrivate.h:
3418         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
3419         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.h:
3420         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElementPrivate.h:
3421         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
3422         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.h:
3423         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElementPrivate.h:
3424         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
3425         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.h:
3426         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElementPrivate.h:
3427         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
3428         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.h:
3429         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElementPrivate.h:
3430         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
3431         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.h:
3432         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElementPrivate.h:
3433         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
3434         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.h:
3435         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElementPrivate.h:
3436         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
3437         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.h:
3438         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEventPrivate.h:
3439         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.h:
3440         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaListPrivate.h:
3441         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
3442         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.h:
3443         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEventPrivate.h:
3444         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
3445         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.h:
3446         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMapPrivate.h:
3447         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.h:
3448         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
3449         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.h:
3450         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIteratorPrivate.h:
3451         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
3452         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.h:
3453         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeListPrivate.h:
3454         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodePrivate.h:
3455         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
3456         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.h:
3457         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstructionPrivate.h:
3458         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
3459         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.h:
3460         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRangePrivate.h:
3461         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRangeUnstable.h:
3462         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
3463         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.h:
3464         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
3465         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.h:
3466         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetListPrivate.h:
3467         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetPrivate.h:
3468         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
3469         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.h:
3470         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextPrivate.h:
3471         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
3472         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.h:
3473         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalkerPrivate.h:
3474         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
3475         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.h:
3476         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEventPrivate.h:
3477         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
3478         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.h:
3479         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEventPrivate.h:
3480         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
3481         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.h:
3482         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpressionPrivate.h:
3483         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolverPrivate.h:
3484         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
3485         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.h:
3486         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResultPrivate.h:
3487         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h:
3488         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups.h:
3489         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h:
3490
3491 2016-10-23  Chris Dumez  <cdumez@apple.com>
3492
3493         Another unreviewed attempt to fix the WatchOS / TvOS build after r207585.
3494         <rdar://problem/28902292>
3495
3496         Disable USE_CFURLCONNECTION on newer WatchOS / TvOS.
3497
3498         * config.h:
3499
3500 2016-10-23  Chris Dumez  <cdumez@apple.com>
3501
3502         Unreviewed attempt to fix WatchOS / TvOS build after r207585.
3503         <rdar://problem/28902292>
3504
3505         Enable NETWORK_SESSION on those platforms.
3506
3507         * config.h:
3508
3509 2016-10-22  Dan Bernstein  <mitz@apple.com>
3510
3511         [iOS] _webViewWillEndNavigationGesture:withNavigationToBackForwardListItem: is never called
3512         https://bugs.webkit.org/show_bug.cgi?id=163758
3513
3514         Reviewed by Darin Adler.
3515
3516         * UIProcess/ios/ViewGestureControllerIOS.mm:
3517         (WebKit::ViewGestureController::beginSwipeGesture): Don’t reset the interactive update
3518           handler.
3519
3520 2016-10-21  David Kilzer  <ddkilzer@apple.com>
3521
3522         Bug 163762: IntSize::area() should used checked arithmetic
3523         <https://webkit.org/b/163762>
3524
3525         Reviewed by Darin Adler.
3526
3527         * Shared/ShareableBitmap.cpp:
3528         (WebKit::ShareableBitmap::create): Add overflow check and return
3529         nullptr on overflow.
3530         (WebKit::ShareableBitmap::createShareable): Ditto.
3531         (WebKit::ShareableBitmap::create): Change debug assert for
3532         adequate buffer size check into release check.
3533         * Shared/ShareableBitmap.h:
3534         (WebKit::ShareableBitmap::numBytesForSize): Change to return a
3535         Checked<unsigned, RecordOverflow> value.
3536         (WebKit::ShareableBitmap::sizeInBytes):
3537         * Shared/cairo/ShareableBitmapCairo.cpp:
3538         (WebKit::ShareableBitmap::numBytesForSize): Ditto.
3539         * UIProcess/API/Cocoa/WKWebView.mm:
3540         (-[WKWebView _takeViewSnapshot]): Call unsafeGet().
3541
3542 2016-10-21  Eric Carlson  <eric.carlson@apple.com>
3543
3544         [MediaStream] Dynamically generate media capture sandbox extensions
3545         https://bugs.webkit.org/show_bug.cgi?id=154861
3546         <rdar://problem/24909411>
3547
3548         Reviewed by Tim Horton.
3549
3550         * Shared/SandboxExtension.h:
3551         (WebKit::SandboxExtension::createHandleForGenericExtension):
3552         * Shared/mac/SandboxExtensionMac.mm:
3553         (WebKit::wkSandboxExtensionType): Add case for generic handle.
3554         (WebKit::SandboxExtension::createHandleForGenericExtension): New.
3555
3556         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3557         (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Clear the list of extensions granted.
3558         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Extend the web 
3559           process sandbox as necessary.
3560         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
3561
3562         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
3563         (WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Revoke all
3564           sandbox extensions.
3565         (WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Consume
3566           sandbox extensions.
3567         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
3568
3569         * WebProcess/WebPage/WebPage.cpp:
3570         (WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Pass-through to user media manager.
3571         * WebProcess/WebPage/WebPage.h:
3572
3573         * WebProcess/WebPage/WebPage.messages.in: Add GrantUserMediaDevicesSandboxExtension.
3574
3575         * WebProcess/com.apple.WebProcess.sb.in: Add rules, defines, and a macro to allow dynamic extensions
3576           for media capture devices.
3577
3578 2016-10-21  Gavin Barraclough  <barraclough@apple.com>
3579
3580         WebPageProxy should not need PageActivityState
3581         https://bugs.webkit.org/show_bug.cgi?id=163821
3582
3583         Reviewed by Geoff Garen.
3584
3585         The PageActivityState is currently plumbed back from WebCore up to the UI process, to
3586         determine whether to enabled process suppression. However the information it contains
3587         (whether a page load is ongoing, whether audio is playing) is already available via
3588         other means. Remove this use of PageActivityState.
3589
3590         * UIProcess/PageLoadState.cpp:
3591         (WebKit::PageLoadState::commitChanges):
3592             - PageLoadState notifies WebPageProxy when loading state changes.
3593         * UIProcess/WebPageProxy.cpp:
3594         (WebKit::WebPageProxy::updateThrottleState):
3595             - Now relies on info from PageLoadState, setMuted, isPlayingMediaDidChange.
3596         (WebKit::WebPageProxy::setMuted):
3597         (WebKit::WebPageProxy::isPlayingMediaDidChange):
3598             - If audio playback state changes we may need to update the throttle state.
3599         (WebKit::WebPageProxy::setPageActivityState): Deleted.
3600             - removed PageActivityState from WK2.
3601         * UIProcess/WebPageProxy.h:
3602         (WebKit::WebPageProxy::isLoadingChanged):
3603             - PageLoadState notifies WebPageProxy when loading state changes.
3604         * UIProcess/WebPageProxy.messages.in:
3605             - removed PageActivityState from WK2.
3606         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3607         (WebKit::WebChromeClient::setPageActivityState): Deleted.
3608             - removed PageActivityState from WK2.
3609         * WebProcess/WebCoreSupport/WebChromeClient.h:
3610             - removed PageActivityState from WK2.
3611         * WebProcess/WebPage/WebPage.cpp:
3612         (WebKit::WebPage::setPageActivityState): Deleted.
3613             - removed PageActivityState from WK2.
3614         * WebProcess/WebPage/WebPage.h:
3615             - removed PageActivityState from WK2.
3616
3617 2016-10-21  Gavin Barraclough  <barraclough@apple.com>
3618
3619         WebPage should take UserActivity directly for user input
3620         https://bugs.webkit.org/show_bug.cgi?id=163813
3621
3622         Reviewed by Anders Carlsson.
3623
3624         When we receive mouse/keyboard events in a page, we want to prevent AppNap. We currently do so
3625         via the PageThrottler. This patch is to just make the WebPage drive the UserActivity directly.
3626
3627         Two reasons to do so: (1) to cleanup & simplify for further refactoring. (2) The current code
3628         isn't really achieving the desired effect. The page setting the flag in the throttler to get
3629         the activity to be set is now a less effective way of achieving this goal, since the
3630         PageActivityState bounces back across to the UI process & then messages back to the WebContent
3631         process to take the UserActivity. These extra hops defeat the purpose of making sure the boost
3632         from the initial message isn't lost.
3633
3634         * WebProcess/WebPage/WebPage.cpp:
3635         (WebKit::m_userActivityHysteresis):
3636             - m_userActivityHysteresis triggers updateUserActivity.
3637         (WebKit::WebPage::setPageSuppressed):
3638             - setPageSuppressed starts/stops m_userActivityHysteresis.
3639         (WebKit::WebPage::updateUserActivity):
3640             - update UserActivity based on state of m_userActivityHysteresis.
3641         (WebKit::WebPage::mouseEvent):
3642         (WebKit::WebPage::wheelEvent):
3643         (WebKit::WebPage::keyEvent):
3644             - input events impulse m_userActivityHysteresis.
3645         * WebProcess/WebPage/WebPage.h:
3646
3647 2016-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
3648
3649         Support (insertFrom|deleteBy)Composition and (insert|delete)CompositionText inputTypes for InputEvents
3650         https://bugs.webkit.org/show_bug.cgi?id=163460
3651         <rdar://problem/28784142>
3652
3653         Reviewed by Darin Adler.
3654
3655         Handle new EditAction types for inserting/deleting pending/final compositions.
3656
3657         * UIProcess/WebEditCommandProxy.cpp:
3658         (WebKit::WebEditCommandProxy::nameForEditAction):
3659
3660 2016-10-21  Jeremy Jones  <jeremyj@apple.com>
3661
3662         Implement basic pointer lock behavior for WebKit and WebKit2.
3663         https://bugs.webkit.org/show_bug.cgi?id=162745
3664
3665         Reviewed by Simon Fraser.
3666
3667         Enable basic pointer lock functionality by plumbing requests through WebPage IPC.
3668         Pass through mouse movement deltas.
3669         Unlock pointer when view is no longer visible.
3670
3671         * Shared/WebEventConversion.cpp:
3672         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): Pass along mouse movement.
3673         * UIProcess/WebPageProxy.cpp:
3674         (WebKit::WebPageProxy::dispatchViewStateChange): Unlock pointer when page is not visible.
3675         (WebKit::WebPageProxy::requestPointerLock): Hide and disassociate pointer.
3676         (WebKit::WebPageProxy::requestPointerUnlock): Show and associate pointer.
3677         * UIProcess/WebPageProxy.h:
3678         * UIProcess/WebPageProxy.messages.in: Add methods.
3679         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3680         (WebKit::WebChromeClient::requestPointerLock): Pass along to web page.
3681         (WebKit::WebChromeClient::requestPointerUnlock): Ditto.
3682         * WebProcess/WebCoreSupport/WebChromeClient.h:
3683         * WebProcess/WebPage/WebPage.cpp:
3684         (WebKit::WebPage::didAcquirePointerLock): Forward to PointerLockController.
3685         (WebKit::WebPage::didNotAcquirePointerLock): Ditto.
3686         (WebKit::WebPage::didLosePointerLock): Ditto.
3687         * WebProcess/WebPage/WebPage.h:
3688         * WebProcess/WebPage/WebPage.messages.in: Add methods.
3689
3690 2016-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
3691
3692         Implement InputEvent.getTargetRanges() for the input events spec
3693         https://bugs.webkit.org/show_bug.cgi?id=162947
3694         <rdar://problem/28853079>
3695
3696         Reviewed by Darin Adler.
3697
3698         Boilerplate change to add a runtime guard for InputEvents-related IDL interfaces. See WebCore ChangeLog entry
3699         for more details.
3700
3701         * WebProcess/WebPage/WebPage.cpp:
3702         (WebKit::WebPage::updatePreferences):
3703
3704 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3705
3706         [GTK] Configures but fails to link with ENABLE_OPENGL=OFF
3707         https://bugs.webkit.org/show_bug.cgi?id=163449
3708
3709         Reviewed by Michael Catanzaro.
3710
3711         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3712         (webkitWebViewBaseRealize): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER and also ensure the current
3713         display is X11.
3714         (webkitWebViewBaseUnrealize): Ditto.
3715         (webkitWebViewBaseDidRelaunchWebProcess): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.
3716         (webkitWebViewBasePageClosed): Ditto.
3717         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
3718         (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState): Ditto.
3719         (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): Check EGL is enabled before
3720         trying to use the WaylandCompositor.
3721         * UIProcess/AcceleratedDrawingAreaProxy.h:
3722         * UIProcess/WebProcessPool.cpp:
3723         (WebKit::WebProcessPool::createNewWebProcess): Ditto.
3724         * UIProcess/gtk/AcceleratedBackingStore.cpp:
3725         (WebKit::AcceleratedBackingStore::create): Ditto.
3726         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
3727         * UIProcess/gtk/WaylandCompositor.cpp:
3728         * UIProcess/gtk/WaylandCompositor.h:
3729         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
3730         (WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.
3731         * WebProcess/WebPage/AcceleratedDrawingArea.h:
3732         * WebProcess/WebPage/DrawingArea.h:
3733         * WebProcess/WebPage/DrawingArea.messages.in:
3734         * WebProcess/WebPage/LayerTreeHost.h:
3735
3736 2016-10-20  Chris Dumez  <cdumez@apple.com>
3737
3738         "Download Linked File" context menu action should use 'download' attribute as suggested filename
3739         https://bugs.webkit.org/show_bug.cgi?id=163742
3740         <rdar://problem/28840734>
3741
3742         Reviewed by Darin Adler.
3743
3744         Update "Download Linked File" context menu action to use the anchor
3745         element's 'download' attribute as suggested filename for the download.
3746
3747         * NetworkProcess/NetworkProcess.cpp:
3748         (WebKit::NetworkProcess::downloadRequest):
3749         * NetworkProcess/NetworkProcess.h:
3750         * NetworkProcess/NetworkProcess.messages.in:
3751         * Shared/WebHitTestResultData.cpp:
3752         (WebKit::WebHitTestResultData::WebHitTestResultData):
3753         (WebKit::WebHitTestResultData::encode):
3754         (WebKit::WebHitTestResultData::decode):
3755         * Shared/WebHitTestResultData.h:
3756         * UIProcess/WebPageProxy.cpp:
3757         (WebKit::WebPageProxy::contextMenuItemSelected):
3758         * UIProcess/WebProcessPool.cpp:
3759         (WebKit::WebProcessPool::download):
3760         * UIProcess/WebProcessPool.h:
3761         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
3762         (WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):
3763
3764 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3765
3766         [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
3767         https://bugs.webkit.org/show_bug.cgi?id=163374
3768
3769         Reviewed by Darin Adler.
3770
3771         * Configurations/FeatureDefines.xcconfig:
3772
3773 2016-10-20  Brady Eidson  <beidson@apple.com>
3774
3775         IndexedDB 2.0: Support IDBObjectStore name assignment.
3776         <rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749
3777
3778         Reviewed by Alex Christensen.
3779
3780         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
3781         (WebKit::WebIDBConnectionToClient::didRenameObjectStore):
3782         (WebKit::WebIDBConnectionToClient::renameObjectStore):
3783         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
3784         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
3785
3786         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3787         (WebKit::WebIDBConnectionToServer::renameObjectStore):
3788         (WebKit::WebIDBConnectionToServer::didRenameObjectStore):
3789         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
3790         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
3791
3792 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3793
3794         [GTK] Avoid strstr() when checking (E)GL extensions
3795         https://bugs.webkit.org/show_bug.cgi?id=161958
3796
3797         Reviewed by Žan Doberšek.
3798
3799         Use GLContext::isExtensionSupported() instead of strstr().
3800
3801         * UIProcess/gtk/WaylandCompositor.cpp:
3802         (WebKit::WaylandCompositor::initializeEGL):
3803
3804 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3805
3806         Wrong use of EGL_DEPTH_SIZE
3807         https://bugs.webkit.org/show_bug.cgi?id=155536
3808
3809         Reviewed by Michael Catanzaro.
3810
3811         Use XErrorTrapper class instead of the custom XErrorHandler.
3812
3813         * PluginProcess/unix/PluginProcessMainUnix.cpp:
3814         (WebKit::PluginProcessMainUnix):
3815
3816 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3817
3818         [SOUP] Add NetworkSession implementation and switch to use it
3819         https://bugs.webkit.org/show_bug.cgi?id=163597
3820
3821         Reviewed by Alex Christensen.
3822
3823         Basically move the ResourceHandle implementation to the network process, but modernized, cleaned up, and adapted
3824         to the NetworkSession model.
3825
3826         * CMakeLists.txt: Add new files to compilation.
3827         * NetworkProcess/Downloads/Download.cpp:
3828         (WebKit::Download::Download): Use the same code for all ports using NetworkSession and add missing
3829         initialization of m_sessionID.
3830         * NetworkProcess/Downloads/Download.h:
3831         (WebKit::Download::Download): Define PlatformDownloadTaskRef on every platform to make the constructor common to
3832         all ports using NetworkSession.
3833         * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
3834         (WebKit::Download::cancelNetworkLoad):
3835         (WebKit::Download::platformDidFinish):
3836         * NetworkProcess/NetworkDataTask.h:
3837         (WebKit::NetworkDataTask::pendingDownloadID): Make const.
3838         (WebKit::NetworkDataTask::pendingDownload): Ditto.
3839         (WebKit::NetworkDataTask::pendingDownloadLocation): Ditto.
3840         (WebKit::NetworkDataTask::isDownload): Helper to check if the task is a download.
3841         * NetworkProcess/NetworkLoad.cpp:
3842         (WebKit::NetworkLoad::didReceiveResponseNetworkSession): Use NetworkDataTask::isDownload().
3843         * NetworkProcess/NetworkProcess.cpp:
3844         (WebKit::NetworkProcess::NetworkProcess): NetworkSession::setCustomProtocolManager() is Cocoa only.
3845         * NetworkProcess/NetworkSession.h:
3846         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3847         (WebKit::NetworkSession::networkStorageSession): Make const.
3848         * NetworkProcess/soup/NetworkDataTaskSoup.cpp: Added.
3849         (WebKit::NetworkDataTask::NetworkDataTask):
3850         (WebKit::NetworkDataTask::~NetworkDataTask):
3851         (WebKit::NetworkDataTask::scheduleFailure):
3852         (WebKit::NetworkDataTask::failureTimerFired):
3853         (WebKit::NetworkDataTask::suggestedFilename):
3854         (WebKit::NetworkDataTask::setSuggestedFilename):
3855         (WebKit::NetworkDataTask::setPendingDownloadLocation):
3856         (WebKit::NetworkDataTask::allowsSpecificHTTPSCertificateForHost):
3857         (WebKit::NetworkDataTask::createRequest):
3858         (WebKit::NetworkDataTask::clearRequest):
3859         (WebKit::NetworkDataTask::resume):
3860         (WebKit::NetworkDataTask::suspend):
3861         (WebKit::NetworkDataTask::cancel):
3862         (WebKit::NetworkDataTask::invalidateAndCancel):
3863         (WebKit::NetworkDataTask::state):
3864         (WebKit::NetworkDataTask::timeoutFired):
3865         (WebKit::NetworkDataTask::startTimeout):
3866         (WebKit::NetworkDataTask::stopTimeout):
3867         (WebKit::NetworkDataTask::sendRequestCallback):
3868         (WebKit::NetworkDataTask::didSendRequest):
3869         (WebKit::NetworkDataTask::didReceiveResponse):
3870         (WebKit::NetworkDataTask::tlsErrorsChangedCallback):
3871         (WebKit::NetworkDataTask::tlsErrorsChanged):
3872         (WebKit::NetworkDataTask::applyAuthenticationToRequest):
3873         (WebKit::NetworkDataTask::authenticateCallback):
3874         (WebKit::isAuthenticationFailureStatusCode):
3875         (WebKit::NetworkDataTask::authenticate):
3876         (WebKit::NetworkDataTask::continueAuthenticate):
3877         (WebKit::NetworkDataTask::skipInputStreamForRedirectionCallback):
3878         (WebKit::NetworkDataTask::skipInputStreamForRedirection):
3879         (WebKit::NetworkDataTask::didFinishSkipInputStreamForRedirection):
3880         (WebKit::shouldRedirectAsGET):
3881         (WebKit::NetworkDataTask::shouldStartHTTPRedirection):
3882         (WebKit::NetworkDataTask::continueHTTPRedirection):
3883         (WebKit::NetworkDataTask::readCallback):
3884         (WebKit::NetworkDataTask::read):
3885         (WebKit::NetworkDataTask::didRead):
3886         (WebKit::NetworkDataTask::didFinishRead):
3887         (WebKit::NetworkDataTask::requestNextPartCallback):
3888         (WebKit::NetworkDataTask::requestNextPart):
3889         (WebKit::NetworkDataTask::didRequestNextPart):
3890         (WebKit::NetworkDataTask::didFinishRequestNextPart):
3891         (WebKit::NetworkDataTask::gotHeadersCallback):
3892         (WebKit::NetworkDataTask::didGetHeaders):
3893         (WebKit::NetworkDataTask::wroteBodyDataCallback):
3894         (WebKit::NetworkDataTask::didWriteBodyData):
3895         (WebKit::NetworkDataTask::download):
3896         (WebKit::NetworkDataTask::writeDownloadCallback):
3897         (WebKit::NetworkDataTask::writeDownload):
3898         (WebKit::NetworkDataTask::didWriteDownload):
3899         (WebKit::NetworkDataTask::didFinishDownload):
3900         (WebKit::NetworkDataTask::didFailDownload):
3901         (WebKit::NetworkDataTask::cleanDownloadFiles):
3902         (WebKit::NetworkDataTask::didFail):
3903         (WebKit::NetworkDataTask::networkEventCallback):
3904         (WebKit::NetworkDataTask::networkEvent):
3905         (WebKit::NetworkDataTask::startingCallback):
3906         (WebKit::NetworkDataTask::requestStartedCallback):
3907         (WebKit::NetworkDataTask::didStartRequest):
3908         (WebKit::NetworkDataTask::restartedCallback):
3909         (WebKit::NetworkDataTask::didRestart):
3910         * NetworkProcess/soup/NetworkSessionSoup.cpp:
3911         (WebKit::NetworkSession::create):
3912         (WebKit::NetworkSession::defaultSession):
3913         (WebKit::NetworkSession::networkStorageSession):
3914         (WebKit::NetworkSession::NetworkSession):
3915         (WebKit::NetworkSession::~NetworkSession):
3916         (WebKit::NetworkSession::soupSession):
3917         (WebKit::NetworkSession::invalidateAndCancel):
3918         (WebKit::NetworkSession::clearCredentials):
3919         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
3920         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Add implementation matching
3921         WebFrameNetworkingContext::ensurePrivateBrowsingSession().
3922         (WebKit::RemoteNetworkingContext::storageSession): Do not always return the default session if the given one is
3923         in the global map.
3924         * PlatformEfl.cmake: Ad new files to compilation.
3925         * PlatformGTK.cmake: Ditto.
3926         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3927         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Also create a NetworkSession.
3928         * config.h: Enable NetworkSession unconditionally for Soup based ports.
3929
3930 2016-10-19  Alex Christensen  <achristensen@webkit.org>
3931
3932         Revert r207151
3933         https://bugs.webkit.org/show_bug.cgi?id=163675
3934
3935         Reviewed by Brent Fulgham.
3936
3937         * NetworkProcess/Downloads/Download.h:
3938         * NetworkProcess/Downloads/mac/DownloadMac.mm: