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