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