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