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