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