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