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