Unreviewed, rolling out r207443.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-10-18  Commit Queue  <commit-queue@webkit.org>
2
3         Unreviewed, rolling out r207443.
4         https://bugs.webkit.org/show_bug.cgi?id=163616
5
6         "Caused 5% PLT regression" (Requested by krollin on #webkit).
7
8         Reverted changeset:
9
10         "Crash in ASCIICaseInsensitiveHash::hash() when a response has
11         a null MIME type"
12         https://bugs.webkit.org/show_bug.cgi?id=163476
13         http://trac.webkit.org/changeset/207443
14
15 2016-10-18  Megan Gardner  <megan_gardner@apple.com>
16
17         Fix build for platforms where HAVE(LINK_PREVIEW) is false
18         https://bugs.webkit.org/show_bug.cgi?id=163607
19
20         Reviewed by Tim Horton.
21
22         Added needed # for link preview
23
24         * UIProcess/ios/WKContentViewInteraction.mm:
25         (-[WKContentView _contentsOfUserInterfaceItem:]):
26
27 2016-10-18  Joseph Pecoraro  <pecoraro@apple.com>
28
29         Remote Web Inspector: Timeline UI not updating while recording
30         https://bugs.webkit.org/show_bug.cgi?id=163582
31         <rdar://problem/28766837>
32
33         Reviewed by Timothy Hatcher.
34
35         * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
36         (WebKit::RemoteWebInspectorUI::frontendLoaded):
37         Local inspector windows keep the web view alive and toggle the
38         WebInspector.visible state depending on whether or not an inspector is
39         open. Remote Inspector windows go away when closed, so they can always
40         be marked as open. This matches earlier remote inspector behavior.
41
42 2016-10-18  Eric Carlson  <eric.carlson@apple.com>
43
44         [MediaStream] Resolve constraints and enumerate devices in the UI process
45         https://bugs.webkit.org/show_bug.cgi?id=162147
46         <rdar://problem/28803569>
47
48         Reviewed by Darin Adler.
49         
50         Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device
51         access happens in the UI process.
52
53         * Scripts/webkit/messages.py:
54         (headers_for_type): Special case MediaConstraintsData.
55
56         * Shared/WebCoreArgumentCoders.cpp:
57         (IPC::encodeMediaTrackConstraintSetMap): MediaTrackConstraintSetMap encoder.
58         (IPC::ArgumentCoder<MediaConstraintsData>::encode): MediaConstraintsData encoder.
59         (IPC::decodeMediaTrackConstraintSetMap): MediaTrackConstraintSetMap decoder.
60         (IPC::ArgumentCoder<MediaConstraintsData>::decode): MediaConstraintsData decoder.
61         (IPC::ArgumentCoder<CaptureDevice>::encode): CaptureDevice enoder.
62         (IPC::ArgumentCoder<CaptureDevice>::decode): CaptureDevice decoder.
63         * Shared/WebCoreArgumentCoders.h:
64
65         * UIProcess/API/APIUIClient.h:  Remove UserMediaPermissionCheckProxy forward declaration.
66
67         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
68         (toWK): Translate UserMediaPermissionRequestDenialReason to UserMediaAccessDenialReason.
69         (WKUserMediaPermissionRequestDeny): Add "reason" parameter.
70         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
71
72         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
73         (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Invalidate pending device requests.
74         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Make private.
75         (WebKit::toWebCore): Map from UserMediaAccessDenialReason to MediaAccessDenialReason, cast to
76           uint64_t to pass to web process.
77         (WebKit::UserMediaPermissionRequestManagerProxy::denyRequest): Send to web process.
78         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Ditto.
79         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Validate
80           constraints and make sure gUM is enabled before prompting user.
81         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): New.
82         (WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Send 
83           results of device enumeration to web process.
84         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Deleted.
85         (WebKit::UserMediaPermissionRequestManagerProxy::createUserMediaPermissionCheck): Deleted.
86         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
87
88         * UIProcess/UserMediaPermissionRequestProxy.cpp:
89         (WebKit::UserMediaPermissionRequestProxy::allow):
90         (WebKit::UserMediaPermissionRequestProxy::deny): Take "reason" parameter.
91         * UIProcess/UserMediaPermissionRequestProxy.h:
92
93         * UIProcess/WebPageProxy.cpp:
94         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
95         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
96         (WebKit::WebPageProxy::checkUserMediaPermissionForFrame): Deleted.
97         * UIProcess/WebPageProxy.h:
98         * UIProcess/WebPageProxy.messages.in:
99
100         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
101         (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): userMediaAccessDenied -> deny.
102           Pass the audio and video constraints to the UI process.
103         (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted): 
104         (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasDenied):
105         (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices): Send the enumeration request
106           to the UI process.
107         (WebKit::UserMediaPermissionRequestManager::cancelMediaDevicesEnumeration):
108         (WebKit::UserMediaPermissionRequestManager::didCompleteMediaDeviceEnumeration):
109         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Deleted.
110         (WebKit::UserMediaPermissionRequestManager::startUserMediaPermissionCheck): Deleted.
111         (WebKit::UserMediaPermissionRequestManager::cancelUserMediaPermissionCheck): Deleted.
112         (WebKit::UserMediaPermissionRequestManager::didCompleteUserMediaPermissionCheck): Deleted.
113         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
114
115         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
116         (WebKit::WebUserMediaClient::enumerateMediaDevices): New.
117         (WebKit::WebUserMediaClient::cancelMediaDevicesEnumerationRequest): New.
118         (WebKit::WebUserMediaClient::checkUserMediaPermission): Deleted.
119         (WebKit::WebUserMediaClient::cancelUserMediaPermissionCheck): Deleted.
120         * WebProcess/WebCoreSupport/WebUserMediaClient.h:
121
122         * WebProcess/WebPage/WebPage.cpp:
123         (WebKit::WebPage::userMediaAccessWasGranted): New.
124         (WebKit::WebPage::userMediaAccessWasDenied): Ditto.
125         (WebKit::WebPage::didCompleteMediaDeviceEnumeration):
126         (WebKit::WebPage::didReceiveUserMediaPermissionDecision): Deleted.
127         (WebKit::WebPage::didCompleteUserMediaPermissionCheck): Deleted.
128         * WebProcess/WebPage/WebPage.h:
129         * WebProcess/WebPage/WebPage.messages.in:
130
131 2016-10-17  Antti Koivisto  <antti@apple.com>
132
133         Rename setNeedsStyleRecalc to invalidateStyle
134         https://bugs.webkit.org/show_bug.cgi?id=163542
135
136         Reviewed by Darin Adler.
137
138         * WebProcess/Plugins/PluginView.cpp:
139         (WebKit::PluginView::didInitializePlugin):
140         (WebKit::PluginView::pluginProcessCrashed):
141
142 2016-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
143
144         NetworkSession: PendingDownload is leaked if canceled before willDecidePendingDownloadDestination
145         https://bugs.webkit.org/show_bug.cgi?id=163545
146
147         Reviewed by Alex Christensen.
148
149         If a download started by DownloadManager::startDownload() is cancelled before
150         DownloadManager::willDecidePendingDownloadDestination() is called, DownloadManager::cancelDownload() does
151         nothing, because the Download hasn't been created yet and m_downloadsWaitingForDestination map doesn't contain
152         the download ID, and the PendingDownload is never removed from the m_pendingDownloads map.
153
154         * NetworkProcess/Downloads/DownloadManager.cpp:
155         (WebKit::DownloadManager::cancelDownload): Always take the PendingDownload from m_pendingDownloads map. Then, if
156         the download was already in m_downloadsWaitingForDestination map, get the network data task to properly cancel
157         it and then call the completion handler to ignore the request. Otherwise cancel the pending download if exists.
158         * NetworkProcess/Downloads/PendingDownload.cpp:
159         (WebKit::PendingDownload::cancel): Cancel the network load and notify the UI process that the download was canceled.
160         * NetworkProcess/Downloads/PendingDownload.h:
161
162 2016-10-17  Megan Gardner  <megan_gardner@apple.com>
163
164         Add test and infrastructure for link popover
165         https://bugs.webkit.org/show_bug.cgi?id=163406
166
167         Reviewed by Simon Fraser.
168
169         Add infrastructure to see when a link popover appears, and what URL it has loaded.
170
171         * UIProcess/API/Cocoa/WKWebView.mm:
172         (-[WKWebView didShowForcePressPreview]):
173         (-[WKWebView didDismissForcePressPreview]):
174         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
175         * UIProcess/ios/WKContentViewInteraction.mm:
176         (-[WKContentView _contentsOfUserInterfaceItem:]):
177         (-[WKContentView _presentedViewControllerForPreviewItemController:]):
178         (-[WKContentView _previewItemController:didDismissPreview:committing:]):
179         (-[WKContentView _previewItemControllerDidCancelPreview:]):
180
181 2016-10-17  Tim Horton  <timothy_horton@apple.com>
182
183         REGRESSION (r169805): WKWebView canGoBack returning YES when nothing is in the back-forward list after restoring session state
184         https://bugs.webkit.org/show_bug.cgi?id=163573
185         <rdar://problem/28744549>
186
187         Reviewed by Dan Bernstein.
188
189         * UIProcess/WebPageProxy.cpp:
190         (WebKit::WebPageProxy::restoreFromSessionState):
191         Update PageLoadState's canGoBack/canGoForward bits when restoring from
192         session state, because in the don't-navigate case, nothing else will make this happen,
193         and it will remain stale.
194
195 2016-10-17  Andy Estes  <aestes@apple.com>
196
197         Crash in ASCIICaseInsensitiveHash::hash() when a response has a null MIME type
198         https://bugs.webkit.org/show_bug.cgi?id=163476
199         <rdar://problem/26941395>
200
201         Reviewed by Tim Horton.
202
203         When custom content providers are registered and a response has a null MIME type, WebPage
204         will pass a null String to HashSet::contains(). This results in a null pointer dereference,
205         since the String hash functions do not support null Strings and unconditionally dereference
206         their StringImpls. Fixed by checking that Strings are non-null before calling
207         HashSet::contains() on m_mimeTypesWithCustomContentProviders.
208
209         Rearranging WebPage::shouldUseCustomContentProviderForResponse() to call
210         canPluginHandleResponse() before checking m_mimeTypesWithCustomContentProviders uncovered a
211         crash in existing layout tests where WebPage::m_mainFrame can be NULL during WebPage
212         construction (m_mainFrame isn't yet initialized). Fixed this by passing the main Frame to
213         canPluginHandleResponseInFrame() instead of relying on m_mainFrame.
214
215         New API test: WebKit2.LoadDataWithNilMIMEType.
216
217         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
218         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): Passed
219         m_frame->coreFrame() to shouldUseCustomContentProviderForResponse().
220         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Ditto.
221         * WebProcess/WebPage/WebPage.cpp:
222         (WebKit::WebPage::canPluginHandleResponse): Added a mainFrame parameter and used it instead
223         of m_mainFrame->coreFrame().
224         (WebKit::WebPage::shouldUseCustomContentProviderForResponse): Passed mainFrame to
225         canPluginHandleResponse(), and checked if mimeType is null before calling
226         m_mimeTypesWithCustomContentProviders.contains().
227         (WebKit::WebPage::canShowMIMEType): Checked if MIMEType is null before calling
228         m_mimeTypesWithCustomContentProviders.contains().
229         * WebProcess/WebPage/WebPage.h: Made canPluginHandleResponse() a private declaration.
230
231 2016-10-17  Chris Dumez  <cdumez@apple.com>
232
233         [WK2][NetworkCache] PendingFrameLoad objects are sometimes leaked
234         https://bugs.webkit.org/show_bug.cgi?id=163569
235         <rdar://problem/28810836>
236
237         Reviewed by Antti Koivisto.
238
239         PendingFrameLoad objects are created to track frame loads and added to
240         the m_pendingFrameLoads hash map. These objects are supposed to remove
241         themselves from the hash map once they detect that the page load has
242         finished by calling PendingFrameLoad::m_loadCompletionHandler().
243
244         PendingFrameLoad::m_loadCompletionHandler() is called from
245         markLoadAsCompleted() when we detect that the page load has finished
246         via the m_loadHysteresisActivity HysteresisActivity. We call impulse()
247         on the HysteresisActivity every time a subresource is loaded in the
248         frame. The issue is that if no subresource is ever loaded, then we
249         never call impulse() on the HysteresisActivity, which is therefore
250         never started. If it nevers starts, then it nevers stops and never
251         calls markLoadAsCompleted(). To address the problem, we now call
252         impulse() on the HysteresisActivity as soon as we construct it.
253
254         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
255
256 2016-10-17  Jeremy Jones  <jeremyj@apple.com>
257
258         Enable keyboard in fullscreen.
259         https://bugs.webkit.org/show_bug.cgi?id=163146
260
261         Reviewed by Jer Noble.
262
263         Allow keyboard in fullscreen.
264
265         * UIProcess/WebFullScreenManagerProxy.cpp:
266         (WebKit::WebFullScreenManagerProxy::supportsFullScreen):
267
268 2016-10-17  Chris Dumez  <cdumez@apple.com>
269
270         Move form.reportValidity() behind InteractiveFormValidation setting
271         https://bugs.webkit.org/show_bug.cgi?id=163550
272
273         Reviewed by Darin Adler.
274
275         Enable InteractiveFormValidation setting by default and link it to
276         RuntimeEnabledFeatures so we can use it in the IDL.
277
278         * UIProcess/API/C/WKPreferencesRefPrivate.h:
279         * WebProcess/WebPage/WebPage.cpp:
280         (WebKit::WebPage::updatePreferences):
281
282 2016-10-17  Gavin Barraclough  <barraclough@apple.com>
283
284         UIProcess should determine throttle state for WebContent process
285         https://bugs.webkit.org/show_bug.cgi?id=163556
286
287         Reviewed by Anders Carlsson.
288
289         This is a step towards merging page/process throttling code for mac & iOS.
290
291         Previously WebPage determined whether to start a UserActivity based on page activity,
292         visibility and the preference to disable. Now WebPage passes the activity state across
293         to WebPageProxy, which makes the decision & explicitly instructs WebPage to start/stop
294         the UserActivity.
295
296         * UIProcess/WebPageProxy.cpp:
297         (WebKit::WebPageProxy::WebPageProxy):
298             - updateActivityToken + updateProccessSuppressionState -> updateThrottleState
299         (WebKit::WebPageProxy::reattachToWebProcess):
300             - updateActivityToken -> updateThrottleState
301         (WebKit::WebPageProxy::dispatchViewStateChange):
302             - updateActivityToken -> updateThrottleState
303         (WebKit::WebPageProxy::setPageActivityState):
304             - Record activity state passed from WebPage, and update.
305         (WebKit::WebPageProxy::preferencesDidChange):
306             - updateProccessSuppressionState -> updateThrottleState
307         (WebKit::WebPageProxy::updateActivityToken): Deleted.
308         (WebKit::WebPageProxy::updateProccessSuppressionState): Deleted.
309         (WebKit::WebPageProxy::updateThrottleState):
310             - Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
311             - Compute whether page should be suppressed, and send SetPageSuppressed message accordingly.
312         * UIProcess/WebPageProxy.h:
313             - Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
314             - Added setPageActivityState/m_activityState to report/record page activity.
315             - Added m_pageSuppressed to prevent redundant message sends.
316         * UIProcess/WebPageProxy.messages.in:
317             - Expose SetPageActivityState message (called by WebPage).
318         * WebProcess/WebPage/WebPage.cpp:
319         (WebKit::WebPage::WebPage):
320             - removed m_processSuppressionEnabled
321             - updateUserActivity -> setPageSuppressed - explicitly set the page to not be suppressed, until WebPageProxy tells us to do so.
322         (WebKit::WebPage::setPageActivityState):
323             - post activity state on to WebPageProxy.
324         (WebKit::WebPage::setPageSuppressed):
325             - Start/stop USerActivity accordingly.
326         (WebKit::WebPage::setViewState):
327             - No longer need to monitor ViewState changes on the WebProcess side.
328         (WebKit::WebPage::updatePreferences):
329             - No longer need to monitor preference changes on the WebProcess side.
330         (WebKit::WebPage::updateUserActivity): Deleted.
331             - Only updated on reciept of setPageSuppressed message.
332         * WebProcess/WebPage/WebPage.h:
333             - Removed m_activityState, m_processSuppressionEnabled, updateUserActivity.
334             - Added setPageSuppressed message.
335         * WebProcess/WebPage/WebPage.messages.in:
336             - Added SetPageSuppressed message.
337
338 2016-10-17  Michael Catanzaro  <mcatanzaro@igalia.com>
339
340         REGRESSION(r206189): logs error statements when API::URLRequest is canceled
341         https://bugs.webkit.org/show_bug.cgi?id=163393
342
343         Reviewed by Antti Koivisto.
344
345         Print this case at normal logging level, not as an error.
346
347         * WebProcess/Network/WebLoaderStrategy.cpp:
348         (WebKit::WebLoaderStrategy::loadResource):
349
350 2016-10-17  Chris Dumez  <cdumez@apple.com>
351
352         [iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
353         https://bugs.webkit.org/show_bug.cgi?id=163547
354
355         Reviewed by Darin Adler.
356
357         Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
358         now that it is available in UIKit.
359
360         * Platform/spi/ios/UIKitSPI.h:
361         * Shared/ios/NativeWebTouchEventIOS.mm:
362         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
363
364 2016-10-17  Konstantin Tokarev  <annulen@yandex.ru>
365
366         Eleminate code duplication between ResourceRequest encoding/decoding implementations
367         https://bugs.webkit.org/show_bug.cgi?id=163507
368
369         Reviewed by Carlos Garcia Campos.
370
371         ResourceRequestBase::encodeWithoutPlatformData() and Soup implementation of
372         ArgumentCoder<ResourceRequest>::encodePlatformData() share most of the code,
373         ditto for decoding implementations.
374
375         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
376         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
377         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
378
379 2016-10-17  Michael Catanzaro  <mcatanzaro@igalia.com>
380
381         Move user agent quirks to cross-platform location
382         https://bugs.webkit.org/show_bug.cgi?id=163508
383
384         Reviewed by Carlos Garcia Campos.
385
386         #include <WebCore/UserAgent.h> instead of <WebCore/UserAgentGtk.h>.
387
388         * UIProcess/API/gtk/WebKitSettings.cpp:
389         * UIProcess/efl/WebPageProxyEfl.cpp:
390         * UIProcess/gtk/WebPageProxyGtk.cpp:
391         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
392
393 2016-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
394
395         [SOUP] Downloads should always sniff contents
396         https://bugs.webkit.org/show_bug.cgi?id=163538
397
398         Reviewed by Michael Catanzaro.
399
400         It's quite common that downloads have weird filenames with no extension, so it would be better if the loader
401         sniff the contents to guess the mime type.
402
403         * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
404         (WebKit::Download::startNetworkLoad): Pass true for shouldContentSniff parameter of ResourceHandle::create().
405
406 2016-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
407
408         [GTK] Switch to use API::DownloadClient instead of the C API client
409         https://bugs.webkit.org/show_bug.cgi?id=163537
410
411         Reviewed by Michael Catanzaro.
412
413         The code is simpler and we avoid all the toImpl/toAPI.
414
415         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
416         (attachDownloadClientToContext):
417         (didStart):
418         (didReceiveResponse):
419         (didReceiveData):
420         (decideDestinationWithSuggestedFilename):
421         (didCreateDestination):
422         (didFail):
423         (didCancel):
424         (didFinish):
425
426 2016-10-17  Manuel Rego Casasnovas  <rego@igalia.com>
427
428         [css-grid] Disable CSS Grid Layout runtime flag by default
429         https://bugs.webkit.org/show_bug.cgi?id=163432
430
431         Reviewed by Darin Adler.
432
433         It was enabled in r201042, but now Safari Technology Preview
434         has a UI to switch runtime flags so it doesn't need to be enabled
435         by default anymore.
436
437         * Shared/WebPreferencesDefinitions.h: Disable grid layout runtime flag
438         by default.
439
440 2016-10-16  Darin Adler  <darin@apple.com>
441
442         Move CSS classes from ExceptionCode to Exception
443         https://bugs.webkit.org/show_bug.cgi?id=163494
444
445         Reviewed by Sam Weinig.
446
447         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
448         (webkit_dom_css_rule_set_css_text): Updated for ExceptionOr.
449         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
450         (webkit_dom_css_style_declaration_remove_property): Ditto.
451         (webkit_dom_css_style_declaration_set_property): Ditto.
452         (webkit_dom_css_style_declaration_set_css_text): Ditto.
453         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
454         (webkit_dom_css_style_sheet_insert_rule): Ditto.
455         (webkit_dom_css_style_sheet_delete_rule): Ditto.
456         (webkit_dom_css_style_sheet_add_rule): Ditto.
457         (webkit_dom_css_style_sheet_remove_rule): Ditto.
458         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
459         (webkit_dom_css_value_set_css_text): Ditto.
460         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
461         (webkit_dom_media_list_delete_medium): Ditto.
462         (webkit_dom_media_list_append_medium): Ditto.
463         (webkit_dom_media_list_set_media_text): Ditto.
464
465 2016-10-16  Carlos Garcia Campos  <cgarcia@igalia.com>
466
467         [GTK] Default WebKitWebsiteDataManager is always leaked in WebKitWebContext
468         https://bugs.webkit.org/show_bug.cgi?id=163443
469
470         Reviewed by Michael Catanzaro.
471
472         Adopt the reference returned by webkitWebsiteDataManagerCreate().
473
474         * UIProcess/API/gtk/WebKitWebContext.cpp:
475         (webkitWebContextConstructed):
476
477 2016-10-16  Carlos Garcia Campos  <cgarcia@igalia.com>
478
479         [GTK] WebKitWebPage URI not updated after URI is modified by InjectedBundlePageResourceLoadClient::willSendRequestForFrame
480         https://bugs.webkit.org/show_bug.cgi?id=163389
481
482         Reviewed by Michael Catanzaro.
483
484         Update the page URI also when the load is committed.
485
486         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
487         (getDocumentLoaderURL):
488         (didStartProvisionalLoadForFrame):
489         (didReceiveServerRedirectForProvisionalLoadForFrame):
490         (didCommitLoadForFrame):
491         (webkitWebPageCreate):
492         (getProvisionalURLForFrame): Deleted.
493
494 2016-10-15  Simon Fraser  <simon.fraser@apple.com>
495
496         Sort the project file.
497
498         * WebKit2.xcodeproj/project.pbxproj:
499
500 2016-10-14  Anders Carlsson  <andersca@apple.com>
501
502         Fix Mac build.
503
504         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
505         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
506
507 2016-10-14  Anders Carlsson  <andersca@apple.com>
508
509         Pass on networking settings to the PKPaymentRequest
510         https://bugs.webkit.org/show_bug.cgi?id=163462
511         rdar://problem/28567629
512
513         Reviewed by Dan Bernstein.
514
515         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
516         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
517         (WebKit::toPKPaymentRequest):
518         * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
519         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
520
521 2016-10-14  Anders Carlsson  <andersca@apple.com>
522
523         Clean up BackForwardClient
524         https://bugs.webkit.org/show_bug.cgi?id=163454
525
526         Reviewed by Sam Weinig.
527
528         Remove empty iOS only stubs.
529
530         * WebKit2.xcodeproj/project.pbxproj:
531         * WebProcess/WebPage/WebBackForwardListProxy.h:
532         * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Removed.
533
534 2016-10-14  Brady Eidson  <beidson@apple.com>
535
536         Enable Gamepads by default in WK2.
537         https://bugs.webkit.org/show_bug.cgi?id=163447
538
539         Rubberstamped by Sam Weinig.
540
541         * Shared/WebPreferencesDefinitions.h:
542
543 2016-10-14  Gavin Barraclough  <barraclough@apple.com>
544
545         Add API to restrict WebKit processes to background priority
546         https://bugs.webkit.org/show_bug.cgi?id=163363
547
548         Reviewed by Anders Carlson.
549
550         Add API on _WKProcessPoolConfiguration to flag a process pool as 'alwaysRunsAtBackgroundPriority'.
551         WebContent and Networking processes associated with that pool will only run a background priority,
552         when they otherwise would have run at foreground priority.
553
554         * UIProcess/API/APIProcessPoolConfiguration.h:
555             - Add m_alwaysRunsAtBackgroundPriority flag to pool configuration object.
556         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
557         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
558         (-[_WKProcessPoolConfiguration alwaysRunsAtBackgroundPriority]):
559         (-[_WKProcessPoolConfiguration setAlwaysRunsAtBackgroundPriority:]):
560             - Expose new configuration property through API.
561         * UIProcess/Network/NetworkProcessProxy.cpp:
562         (WebKit::NetworkProcessProxy::alwaysRunsAtBackgroundPriority):
563         * UIProcess/Network/NetworkProcessProxy.h:
564             - Support ProcessThrottlerClient interface to check if alwaysRunsAtBackgroundPriority is set.
565         * UIProcess/ProcessThrottler.cpp:
566         (WebKit::ProcessThrottler::assertionState):
567             - When determining whether to take a foreground exception check alwaysRunsAtBackgroundPriority.
568         * UIProcess/ProcessThrottlerClient.h:
569             - Add interface to access alwaysRunsAtBackgroundPriority state of WebProcess of NetworkProcess.
570         * UIProcess/WebProcessPool.cpp:
571         (WebKit::WebProcessPool::WebProcessPool):
572         * UIProcess/WebProcessPool.h:
573             - Add m_alwaysRunsAtBackgroundPriority, set by configuration.
574         * UIProcess/WebProcessProxy.cpp:
575         (WebKit::WebProcessProxy::alwaysRunsAtBackgroundPriority):
576         * UIProcess/WebProcessProxy.h:
577             - Support ProcessThrottlerClient interface to check if alwaysRunsAtBackgroundPriority is set.
578
579 2016-10-14  Youenn Fablet  <youenn@apple.com>
580
581         Make NetworkCache aware of fetch cache mode
582         https://bugs.webkit.org/show_bug.cgi?id=163332
583
584         Reviewed by Antti Koivisto.
585
586         Adding explicit serialization of ResourceRequest cachePolicy since it does no longer map to platform request cache policy.
587
588         Added support for:
589         - Bypassing entirely the network cache in case cache mode is NoStore.
590         - requiring revalidation in case of cache hit and cache mode is NoCache.
591         - Not using any entry if cache mode is Reload (but cache can still be updated)
592
593         Also made sure that the ResourceRequest::cachePolicy remains the same throughout redirections.
594
595         * NetworkProcess/NetworkResourceLoader.cpp:
596         (WebKit::NetworkResourceLoader::canUseCache):
597         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
598         (WebKit::NetworkResourceLoader::continueWillSendRequest):
599         * NetworkProcess/cache/NetworkCache.cpp:
600         (WebKit::NetworkCache::cachePolicyAllowsExpired):
601         (WebKit::NetworkCache::makeRetrieveDecision):
602         * Shared/mac/WebCoreArgumentCodersMac.mm:
603         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
604         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
605
606 2016-10-13  Tim Horton  <timothy_horton@apple.com>
607
608         Rename the SPI added in r207292 due to post-landing review comments
609         https://bugs.webkit.org/show_bug.cgi?id=163364
610         <rdar://problem/28012494>
611
612         Reviewed by Simon Fraser.
613
614         * UIProcess/API/APIPageConfiguration.h:
615         (API::PageConfiguration::waitsForPaintAfterViewDidMoveToWindow):
616         (API::PageConfiguration::setWaitsForPaintAfterViewDidMoveToWindow):
617         (API::PageConfiguration::shouldWaitForPaintAfterViewDidMoveToWindow): Deleted.
618         (API::PageConfiguration::setShouldWaitForPaintAfterViewDidMoveToWindow): Deleted.
619         * UIProcess/API/Cocoa/WKWebView.mm:
620         (-[WKWebView _initializeWithConfiguration:]):
621         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
622         (-[WKWebViewConfiguration init]):
623         (-[WKWebViewConfiguration copyWithZone:]):
624         (-[WKWebViewConfiguration _waitsForPaintAfterViewDidMoveToWindow]):
625         (-[WKWebViewConfiguration _setWaitsForPaintAfterViewDidMoveToWindow:]):
626         (-[WKWebViewConfiguration _shouldWaitForPaintAfterViewDidMoveToWindow]): Deleted.
627         (-[WKWebViewConfiguration _setShouldWaitForPaintAfterViewDidMoveToWindow:]): Deleted.
628         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
629         * UIProcess/WebPageProxy.cpp:
630         (WebKit::WebPageProxy::WebPageProxy):
631         (WebKit::WebPageProxy::dispatchViewStateChange):
632         * UIProcess/WebPageProxy.h:
633
634 2016-10-13  Jonathan Bedard  <jbedard@apple.com>
635
636         GTK and EFL on Mac fail to compile WebTextChecker due to missing definition of WKTextCheckerClientBase
637         https://bugs.webkit.org/show_bug.cgi?id=163346
638
639         Reviewed by Daniel Bates.
640
641         * UIProcess/API/C/WKTextChecker.cpp: Fixed #ifdefs for GTK and EFL builds on Darwin machines.
642         * UIProcess/API/C/WKTextChecker.h: Ditto.
643
644 2016-10-13  Tim Horton  <timothy_horton@apple.com>
645
646         Expose SPI to disable synchronously blocking on painting after parenting a WKWebView
647         https://bugs.webkit.org/show_bug.cgi?id=163364
648         <rdar://problem/28012494>
649
650         Reviewed by Geoff Garen.
651
652         Some clients may not want the default WKWebView behavior where we synchronously
653         block on the Web process after the first time a WKWebView is re-added to the window,
654         because they are e.g. parenting re-used WKWebViews while scrolling.
655
656         * UIProcess/API/APIPageConfiguration.h:
657         (API::PageConfiguration::shouldSynchronizeInitialPaintAfterMovingToWindow):
658         (API::PageConfiguration::setShouldSynchronizeInitialPaintAfterMovingToWindow):
659         * UIProcess/API/Cocoa/WKWebView.mm:
660         (-[WKWebView _initializeWithConfiguration:]):
661         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
662         (-[WKWebViewConfiguration init]):
663         (-[WKWebViewConfiguration copyWithZone:]):
664         (-[WKWebViewConfiguration _shouldSynchronizeInitialPaintAfterMovingToWindow]):
665         (-[WKWebViewConfiguration _setShouldSynchronizeInitialPaintAfterMovingToWindow:]):
666         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
667         * UIProcess/WebPageProxy.h:
668         * UIProcess/WebPageProxy.cpp:
669         (WebKit::WebPageProxy::WebPageProxy):
670         Add and plumb a new WKWebView configuration parameter.
671
672         (WebKit::WebPageProxy::dispatchViewStateChange):
673         If the new configuration parameter is set, don't block the main thread when
674         a view is reparented.
675
676 2016-10-12  Chris Dumez  <cdumez@apple.com>
677
678         [Web IDL] Drop support for legacy [ConstructorConditional=*]
679         https://bugs.webkit.org/show_bug.cgi?id=163368
680
681         Reviewed by Ryosuke Niwa.
682
683         Drop ENABLE_DOM4_EVENTS_CONSTRUCTOR compiler flag.
684
685         * Configurations/FeatureDefines.xcconfig:
686
687 2016-10-12  Alex Christensen  <achristensen@webkit.org>
688
689         Fix assertion after switching to URLParser
690         https://bugs.webkit.org/show_bug.cgi?id=163350
691         rdar://problem/28739938
692
693         Reviewed by Brady Eidson.
694         
695         Covered by a new API test.
696
697         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
698         (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
699         The { } here is not understood by the compiler to mean WebCore::URL(), but rather the empty constructor for the enum ParsedURLStringTag.
700         We used to be unsafely trusting that the URL was valid and canonicalized, but with URLParser we are canonicalizing it,
701         and the assertion (url == m_string) in URL.cpp was failing.
702
703 2016-10-12  Anders Carlsson  <andersca@apple.com>
704
705         Remove an unused function
706         https://bugs.webkit.org/show_bug.cgi?id=163341
707
708         Reviewed by Dan Bernstein.
709
710         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
711         (WebKit::WebBackForwardListProxy::isActive): Deleted.
712         * WebProcess/WebPage/WebBackForwardListProxy.h:
713
714 2016-10-11  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>
715
716         [EFL] Update API tests which are passed or failed
717         https://bugs.webkit.org/show_bug.cgi?id=163322
718
719         Unreviewed, simple on/off API test.
720
721         *ewk_favicon_database_clear* has been crashed for a long time, however
722         *ewk_cookie_manager_permanent_storage* is fine now. So the passing test
723         is enabled again, and disable the failure tests.
724
725         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
726         (TEST_F):
727         * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
728         (TEST_F):
729
730 2016-10-11  Daniel Bates  <dabates@apple.com>
731
732         Attempt to fix the Apple Internal Mac build following r207159
733         (https://bugs.webkit.org/show_bug.cgi?id=163244)
734
735         * UIProcess/API/Cocoa/WKWebView.mm:
736         (shouldRequireUserGestureToLoadVideo):
737
738 2016-10-11  Anders Carlsson  <andersca@apple.com>
739
740         Clean up WebPageGroup somewhat
741         https://bugs.webkit.org/show_bug.cgi?id=163299
742
743         Reviewed by Tim Horton.
744
745         * Shared/API/c/WKDeprecatedFunctions.cpp:
746         (WKPageGroupCopyIdentifier):
747         Move this here from WKPageGroup.
748
749         (WKPageGroupAddUserContentFilter):
750         (WKPageGroupRemoveUserContentFilter):
751         (WKPageGroupRemoveAllUserContentFilters):
752         Just call directly into the user content controller.
753
754         * UIProcess/API/C/WKPageGroup.cpp:
755         (WKPageGroupAddUserStyleSheet):
756         (WKPageGroupRemoveAllUserStyleSheets):
757         (WKPageGroupAddUserScript):
758         (WKPageGroupRemoveAllUserScripts):
759         Just call directly into the user content controller.
760
761         * UIProcess/API/C/WKPageGroup.h:
762         * UIProcess/WebPageGroup.cpp:
763         (WebKit::WebPageGroup::addUserStyleSheet): Deleted.
764         (WebKit::WebPageGroup::addUserScript): Deleted.
765         (WebKit::WebPageGroup::removeAllUserStyleSheets): Deleted.
766         (WebKit::WebPageGroup::removeAllUserScripts): Deleted.
767         (WebKit::WebPageGroup::removeAllUserContent): Deleted.
768         (WebKit::WebPageGroup::addUserContentExtension): Deleted.
769         (WebKit::WebPageGroup::removeUserContentExtension): Deleted.
770         (WebKit::WebPageGroup::removeAllUserContentExtensions): Deleted.
771         Get rid of these, all their callers just call into the user content controller now.
772
773         * UIProcess/WebPageGroup.h:
774         (WebKit::WebPageGroup::identifier): Deleted.
775         (WebKit::WebPageGroup::sendToAllProcessesInGroup): Deleted.
776         Remove unused code.
777
778 2016-10-11  Daniel Bates  <dabates@apple.com>
779
780         [iOS] REGRESSION (r197953): User gesture required to load video in iOS 9-built apps
781         https://bugs.webkit.org/show_bug.cgi?id=163244
782         <rdar://problem/27250015>
783
784         Reviewed by Jer Noble.
785
786         Enable or disable the Setting::requiresUserGestureToLoadVideo() in WebKit depending on the
787         version of iOS SDK that the app was linked against. We require a user gesture to begin
788         loading a video as of iOS 10.
789
790         * Shared/WebPreferencesDefinitions.h:
791         * UIProcess/API/Cocoa/WKWebView.mm:
792         (shouldRequireUserGestureToLoadVideo): Added.
793         (-[WKWebView _initializeWithConfiguration:]): Set the requiresUserGestureToLoadVideo preference.
794         * WebProcess/WebPage/WebPage.cpp:
795         (WebKit::WebPage::updatePreferences): Modified to pass the WebKit requiresUserGestureToLoadVideo
796         preference to WebCore.
797
798 2016-10-11  Alex Christensen  <achristensen@webkit.org>
799
800         Remove dead networking code
801         https://bugs.webkit.org/show_bug.cgi?id=163263
802
803         Reviewed by Daniel Bates.
804
805         * NetworkProcess/Downloads/Download.h:
806         * NetworkProcess/Downloads/ios/DownloadIOS.mm: Removed.
807         * NetworkProcess/Downloads/mac/DownloadMac.mm:
808         * NetworkProcess/NetworkLoad.h:
809         * NetworkProcess/mac/NetworkLoadMac.mm:
810         (WebKit::NetworkLoad::willCacheResponseAsync): Deleted.
811         * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
812         (WebKit::AuthenticationManager::receivedCredential):
813         (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
814         (WebKit::AuthenticationManager::receivedCancellation):
815         (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
816         (WebKit::AuthenticationManager::receivedChallengeRejection):
817         * Shared/WebProcessCreationParameters.cpp:
818         (WebKit::WebProcessCreationParameters::encode):
819         (WebKit::WebProcessCreationParameters::decode):
820         * Shared/WebProcessCreationParameters.h:
821         * Shared/mac/WebCoreArgumentCodersMac.mm:
822         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
823         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
824         * WebKit2.xcodeproj/project.pbxproj:
825
826 2016-10-11  Anders Carlsson  <andersca@apple.com>
827
828         Move no longer used functions to WKDeprecatedFunctions.cpp
829         https://bugs.webkit.org/show_bug.cgi?id=163290
830
831         Reviewed by Dan Bernstein.
832
833         * Shared/API/c/WKDeprecatedFunctions.cpp:
834         (WKPageGroupAddUserContentFilter):
835         (WKPageGroupRemoveUserContentFilter):
836         (WKPageGroupRemoveAllUserContentFilters):
837         (WKContextSetProcessModel): Deleted.
838         * UIProcess/API/C/WKPageGroup.cpp:
839         (WKPageGroupRemoveAllUserScripts):
840         (WKPageGroupAddUserContentFilter): Deleted.
841         (WKPageGroupRemoveUserContentFilter): Deleted.
842         (WKPageGroupRemoveAllUserContentFilters): Deleted.
843         * UIProcess/API/C/WKPageGroup.h:
844
845 2016-10-11  Konstantin Tokarev  <annulen@yandex.ru>
846
847         Use modern for loops for iterating supplement maps
848         https://bugs.webkit.org/show_bug.cgi?id=163274
849
850         Reviewed by Alex Christensen.
851
852         * NetworkProcess/NetworkProcess.cpp:
853         (WebKit::NetworkProcess::initializeNetworkProcess):
854         (WebKit::NetworkProcess::initializeConnection):
855         * UIProcess/WebProcessPool.cpp:
856         (WebKit::WebProcessPool::~WebProcessPool):
857         (WebKit::WebProcessPool::networkProcessCrashed):
858         (WebKit::WebProcessPool::databaseProcessCrashed): Iterate by values()
859         like in other places.
860
861 2016-10-11  Wenson Hsieh  <wenson_hsieh@apple.com>
862
863         The "Input Events" experimental feature runtime flag should not be on by default
864         https://bugs.webkit.org/show_bug.cgi?id=163278
865
866         Reviewed by Zalan Bujtas.
867
868         This was intended to be off by default.
869
870         * Shared/WebPreferencesDefinitions.h:
871
872 2016-10-10  Zan Dobersek  <zdobersek@igalia.com>
873
874         Add ENABLE_ENCRYPTED_MEDIA configuration option
875         https://bugs.webkit.org/show_bug.cgi?id=163219
876
877         Reviewed by Darin Adler.
878
879         * Configurations/FeatureDefines.xcconfig:
880         Add the ENABLE_ENCRYPTED_MEDIA configuration option. It will be used
881         to enable or disable the new EME implementation at build-time.
882
883 2016-10-10  Carlos Garcia Campos  <cgarcia@igalia.com>
884
885         NetworkSession: NetworkDataTask is leaked if download finishes in didReceiveResponse completion handler
886         https://bugs.webkit.org/show_bug.cgi?id=163204
887
888         Reviewed by Alex Christensen.
889
890         After the completion handler a reference of the NetworkDataTask is saved in m_downloadsAfterDestinationDecided.
891         If the download failed or was canceled DownloadManager::dataTaskBecameDownloadTask is never called and the data
892         task is kept in the download manager forever. This patch exposes NSURLSessionTask state property in
893         NetworkDataTask, so that the download manager can check the task state after the completion handler and return
894         early if the download finished or was cancelled.
895
896         * NetworkProcess/Downloads/DownloadManager.cpp:
897         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
898         * NetworkProcess/NetworkDataTask.h:
899         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
900         (WebKit::NetworkDataTask::state):
901
902 2016-10-10  Konstantin Tokarev  <annulen@yandex.ru>
903
904         Added final specifier to WebInspectorServer and to its overridden methods
905         https://bugs.webkit.org/show_bug.cgi?id=163228
906
907         Reviewed by Darin Adler.
908
909         * UIProcess/InspectorServer/WebInspectorServer.h:
910
911 2016-10-10  Carlos Garcia Campos  <cgarcia@igalia.com>
912
913         [GTK] 2.14.0 Compile Errors: GTK 3.22.1
914         https://bugs.webkit.org/show_bug.cgi?id=163190
915
916         Reviewed by Alex Christensen.
917
918         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: Include gtk.h since we are using gtk_widget_queue_draw().
919
920 2016-10-10  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>
921
922         [EFL] ewk_context_preferred_languages has been failed since r206949
923         https://bugs.webkit.org/show_bug.cgi?id=163211
924
925         Reviewed by Chris Dumez.
926
927         r206949 changed to return value of navigator.language from en-us to en-US
928         in order to match other browsers and w3c spec. So ewk_context_preferred_languages
929         needs to change the expected result as well.
930
931         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
932         (TEST_F):
933
934 2016-10-10  Carlos Garcia Campos  <cgarcia@igalia.com>
935
936         NetworkSession: downloads started by startDownload() can fail before starting from the API point of view
937         https://bugs.webkit.org/show_bug.cgi?id=163107
938
939         Reviewed by Alex Christensen.
940
941         In the network process we use a PendingDownload in this case, but in the UI process we always have a single
942         download proxy. If an error happens before the pending download is converted inot a real download, the DidFail
943         messages is received in the download proxy before the DidStart one. This is problematic at least for the GTK+
944         API, because it's common to connect to the started signal and connect to all other signals from there, but in
945         this case the started signal is never emitted, and then the failed one is not handled. This is not a problem for
946         downloads started by convertTaskToDownload, because in that case those loads are not considered a download by
947         the UI process when those early errors happen, and then the web page handles them.
948
949         * NetworkProcess/Downloads/PendingDownload.cpp:
950         (WebKit::PendingDownload::PendingDownload): Send DidStart message right after the network load starts like the
951         non network session code does.
952         * NetworkProcess/NetworkLoad.cpp:
953         (WebKit::NetworkLoad::convertTaskToDownload): Send DidStart message now that the normal load has been converted
954         into a download.
955         * NetworkProcess/NetworkProcess.cpp:
956         (WebKit::NetworkProcess::findPendingDownloadLocation): Do not send DidStart message here.
957
958 2016-10-10  Carlos Garcia Campos  <cgarcia@igalia.com>
959
960         Network Session: PendingDownload is always nullptr in DownloadManager::dataTaskBecameDownloadTask
961         https://bugs.webkit.org/show_bug.cgi?id=163006
962
963         Reviewed by Alex Christensen.
964
965         In DownloadManager::dataTaskBecameDownloadTask() we are supposed to have either a pending download, or a network
966         data task depending on whether the download was started by startDownload() or convertTaskToDownload. However, in
967         both cases we do have a data task and never a pending download. In the case of startDownload() the pending
968         download is removed from m_pendingDownloads in willDecidePendingDownloadDestination(). The task is always
969         added to m_downloadsWaitingForDestination in willDecidePendingDownloadDestination() and to
970         m_downloadsAfterDestinationDecided in continueDecidePendingDownloadDestination() in both cases.
971
972         * NetworkProcess/Downloads/DownloadManager.cpp:
973         (WebKit::DownloadManager::dataTaskBecameDownloadTask): Add an ASSERT to ensure we don't have a pending download
974         at this point and that the download is not already in the map. Remove the download from the
975         m_downloadsAfterDestinationDecided map, but don't check its result because it might not bein that map if
976         dataTaskBecameDownloadTask is called synchronously from the didReceiveResponse completion handler.
977         (WebKit::DownloadManager::willDecidePendingDownloadDestination): Do not take the pending download here, wait
978         until didReceiveResponse completion handler is called.
979         (WebKit::DownloadManager::continueDecidePendingDownloadDestination): Take the pending download here ensuring
980         it's alive while the didReceiveResponse completion handler is called. Also remove invalid early return when
981         either networkDataTask or completionHandler are nullptr because we are using both unconditionally, we should
982         return early if both are nullptr to avoid crashes. However, we are checking that the download is in the
983         m_downloadsWaitingForDestination and in that case we should always have both, so better add asserts there. If
984         the download is already in the map after the completion handler it means that dataTaskBecameDownloadTask() has
985         alrady been called, so we can just return in that case.
986         * NetworkProcess/Downloads/DownloadManager.h:
987         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
988         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): Protect the NetworkDataTask that can
989         be deleted by dataTaskBecameDownloadTask().
990
991 2016-10-10  Tim Horton  <timothy_horton@apple.com>
992
993         Share more code between iOS and macOS ViewGestureController
994         https://bugs.webkit.org/show_bug.cgi?id=163158
995
996         Reviewed by Simon Fraser.
997
998         Share canSwipeInDirection() and the (unused on Mac) alternate back-forward list mechanism.
999         Make ViewGestureController operate in terms of WebPageProxy, not WKWebView,
1000         because it shouldn't know anything about WKWebView.
1001         Refactor scrollEventCanBecomeSwipe a bit to be less repetitive.
1002
1003         * UIProcess/API/Cocoa/WKWebView.mm:
1004         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
1005         * UIProcess/Cocoa/ViewGestureController.cpp:
1006         (WebKit::ViewGestureController::ViewGestureController):
1007         (WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
1008         (WebKit::ViewGestureController::canSwipeInDirection):
1009         (WebKit::ViewGestureController::gestureControllerForPage): Deleted.
1010         * UIProcess/Cocoa/ViewGestureController.h:
1011         * UIProcess/WebPageProxy.cpp:
1012         (WebKit::WebPageProxy::WebPageProxy):
1013         * UIProcess/WebPageProxy.h:
1014         (WebKit::WebPageProxy::createWeakPtr):
1015         * UIProcess/ios/ViewGestureControllerIOS.mm:
1016         (WebKit::ViewGestureController::beginSwipeGesture):
1017         (WebKit::ViewGestureController::setAlternateBackForwardListSourceView): Deleted.
1018         (WebKit::ViewGestureController::canSwipeInDirection): Deleted.
1019         * UIProcess/mac/ViewGestureControllerMac.mm:
1020         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
1021         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
1022         (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
1023
1024 2016-10-10  Tomas Popela  <tpopela@redhat.com>
1025
1026         [GTK] UIProcess crashes when using Japanese IM
1027         https://bugs.webkit.org/show_bug.cgi?id=163011
1028
1029         We have to reference the current GdkEventKey before we try process it
1030         as later when the lambda body is reached the event could be already
1031         freed.
1032
1033         Reviewed by Carlos Garcia Campos.
1034
1035         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1036         (webkitWebViewBaseKeyPressEvent):
1037         (webkitWebViewBaseKeyReleaseEvent):
1038         * UIProcess/gtk/InputMethodFilter.h:
1039         Use non-copyable Function so we can use WTFMove to pass the event to
1040         lambda.
1041
1042 2016-10-09  Wenson Hsieh  <wenson_hsieh@apple.com>
1043
1044         Support InputEvent.inputType for the new InputEvent spec
1045         https://bugs.webkit.org/show_bug.cgi?id=163025
1046         <rdar://problem/28658092>
1047
1048         Reviewed by Darin Adler.
1049
1050         Accounts for some changes to the EditAction enum in nameForEditAction. Some former edit
1051         actions, such as EditActionTyping, have been split out into its more specific subtypes,
1052         so we preserve shipping behavior by treating all of the new subtypes the same way as the
1053         original type.
1054
1055         * UIProcess/WebEditCommandProxy.cpp:
1056         (WebKit::WebEditCommandProxy::nameForEditAction):
1057
1058 2016-10-08  Emanuele Aina  <emanuele.aina@collabora.com>
1059
1060         [GTK] Drop redundant wl_display_flush_clients() call
1061         https://bugs.webkit.org/show_bug.cgi?id=161904
1062
1063         Reviewed by Michael Catanzaro.
1064
1065         The Wayland GSource::prepare() function already calls
1066         wl_display_flush_clients() at every mainloop iteration, so there's no
1067         need to further call it on Surface::commit().
1068
1069         * UIProcess/gtk/WaylandCompositor.cpp:
1070         (WebKit::WaylandCompositor::Surface::commit):
1071         * UIProcess/gtk/WaylandCompositor.h:
1072
1073 2016-10-06  Darin Adler  <darin@apple.com>
1074
1075         Next step on moving to modern way to return DOM exceptions
1076         https://bugs.webkit.org/show_bug.cgi?id=163016
1077
1078         Reviewed by Ryosuke Niwa.
1079
1080         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
1081         (webkit_dom_dom_implementation_create_document_type): Updated for name change
1082         from takeReturnValue to releaseReturnValue.
1083         (webkit_dom_dom_implementation_create_document): Ditto.
1084         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
1085         (webkit_dom_dom_selection_collapse_to_end): Use ExceptionOr instead of ExceptionCode.
1086         (webkit_dom_dom_selection_collapse_to_start): Ditto.
1087         (webkit_dom_dom_selection_extend): Ditto.
1088         (webkit_dom_dom_selection_get_range_at): Ditto.
1089
1090 2016-10-08  Commit Queue  <commit-queue@webkit.org>
1091
1092         Unreviewed, rolling out r206950.
1093         https://bugs.webkit.org/show_bug.cgi?id=163169
1094
1095         broke an API test (Requested by thorton on #webkit).
1096
1097         Reverted changeset:
1098
1099         "Share more code between iOS and macOS ViewGestureController"
1100         https://bugs.webkit.org/show_bug.cgi?id=163158
1101         http://trac.webkit.org/changeset/206950
1102
1103 2016-10-08  Tim Horton  <timothy_horton@apple.com>
1104
1105         Share more code between iOS and macOS ViewGestureController
1106         https://bugs.webkit.org/show_bug.cgi?id=163158
1107
1108         Reviewed by Simon Fraser.
1109
1110         Share canSwipeInDirection() and the (unused on Mac) alternate back-forward list mechanism.
1111         Make ViewGestureController operate in terms of WebPageProxy, not WKWebView,
1112         because it shouldn't know anything about WKWebView.
1113         Refactor scrollEventCanBecomeSwipe a bit to be less repetitive.
1114
1115         * UIProcess/API/Cocoa/WKWebView.mm:
1116         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
1117         * UIProcess/Cocoa/ViewGestureController.cpp:
1118         (WebKit::ViewGestureController::ViewGestureController):
1119         (WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
1120         (WebKit::ViewGestureController::canSwipeInDirection):
1121         (WebKit::ViewGestureController::gestureControllerForPage): Deleted.
1122         * UIProcess/Cocoa/ViewGestureController.h:
1123         * UIProcess/WebPageProxy.cpp:
1124         (WebKit::WebPageProxy::WebPageProxy):
1125         * UIProcess/WebPageProxy.h:
1126         (WebKit::WebPageProxy::createWeakPtr):
1127         * UIProcess/ios/ViewGestureControllerIOS.mm:
1128         (WebKit::ViewGestureController::beginSwipeGesture):
1129         (WebKit::ViewGestureController::setAlternateBackForwardListSourceView): Deleted.
1130         (WebKit::ViewGestureController::canSwipeInDirection): Deleted.
1131         * UIProcess/mac/ViewGestureControllerMac.mm:
1132         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
1133         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
1134         (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
1135
1136 2016-10-07  Anders Carlsson  <andersca@apple.com>
1137
1138         Get rid of API::Session and WKSessionRef
1139         https://bugs.webkit.org/show_bug.cgi?id=163140
1140
1141         Reviewed by Tim Horton.
1142
1143         This API is no longer used.
1144
1145         * CMakeLists.txt:
1146         * Shared/API/APIObject.h:
1147         * Shared/API/c/WKSharedAPICast.h:
1148         * UIProcess/API/APISession.cpp: Removed.
1149         (API::generateID): Deleted.
1150         (API::Session::defaultSession): Deleted.
1151         (API::Session::Session): Deleted.
1152         (API::Session::createEphemeral): Deleted.
1153         (API::Session::isEphemeral): Deleted.
1154         (API::Session::getID): Deleted.
1155         (API::Session::~Session): Deleted.
1156         * UIProcess/API/APISession.h: Removed.
1157         * UIProcess/API/C/WKPage.h:
1158         * UIProcess/API/C/WKSessionRef.cpp: Removed.
1159         (WKSessionCreate): Deleted.
1160         (WKSessionGetTypeID): Deleted.
1161         (WKSessionIsEphemeral): Deleted.
1162         * UIProcess/API/C/WKSessionRef.h: Removed.
1163         * UIProcess/WebPageProxy.h:
1164         * UIProcess/WebProcessProxy.h:
1165         * WebKit2.xcodeproj/project.pbxproj:
1166
1167 2016-10-07  Tim Horton  <timothy_horton@apple.com>
1168
1169         Move ViewGestureController files to more accurate locations
1170         https://bugs.webkit.org/show_bug.cgi?id=163141
1171
1172         Reviewed by Anders Carlsson.
1173
1174         * PlatformMac.cmake:
1175         * UIProcess/Cocoa/ViewGestureController.cpp: Renamed from UIProcess/ViewGestureController.cpp.
1176         * UIProcess/Cocoa/ViewGestureController.h: Renamed from UIProcess/mac/ViewGestureController.h.
1177         * UIProcess/Cocoa/ViewGestureController.messages.in: Renamed from UIProcess/mac/ViewGestureController.messages.in.
1178         * WebKit2.xcodeproj/project.pbxproj:
1179
1180 2016-10-07  Tim Horton  <timothy_horton@apple.com>
1181
1182         Adopt BlockPtr in ViewGestureController
1183         https://bugs.webkit.org/show_bug.cgi?id=163132
1184
1185         Reviewed by Anders Carlsson.
1186
1187         * UIProcess/Cocoa/WebViewImpl.h:
1188         * UIProcess/Cocoa/WebViewImpl.mm:
1189         (WebKit::WebViewImpl::setDidMoveSwipeSnapshotCallback):
1190         * UIProcess/ViewGestureController.cpp:
1191         (WebKit::ViewGestureController::SnapshotRemovalTracker::stopWaitingForEvent):
1192         * UIProcess/mac/ViewGestureController.h:
1193         (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
1194         (WebKit::ViewGestureController::m_didMoveSwipeSnapshotCallback): Deleted.
1195         * UIProcess/mac/ViewGestureControllerMac.mm:
1196         (WebKit::ViewGestureController::platformTeardown):
1197         (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback): Deleted.
1198
1199 2016-10-07  Anders Carlsson  <andersca@apple.com>
1200
1201         Get rid of WKPageSetSession
1202         https://bugs.webkit.org/show_bug.cgi?id=163129
1203
1204         Reviewed by Tim Horton.
1205
1206         This function is no longer used.
1207
1208         * UIProcess/API/C/WKPage.cpp:
1209         (WKPageSetSession): Deleted.
1210         * UIProcess/API/C/WKPage.h:
1211         * UIProcess/WebPageProxy.cpp:
1212         (WebKit::WebPageProxy::setSessionID): Deleted.
1213         * UIProcess/WebPageProxy.h:
1214         (WebKit::WebPageProxy::sessionID):
1215         * WebProcess/WebPage/WebPage.messages.in:
1216
1217 2016-10-07  Commit Queue  <commit-queue@webkit.org>
1218
1219         Unreviewed, rolling out r206909.
1220         https://bugs.webkit.org/show_bug.cgi?id=163116
1221
1222         Caused most of  GTK layout tests to crash (Requested by KaL on
1223         #webkit).
1224
1225         Reverted changeset:
1226
1227         "[GTK] UIProcess crashes when using Japanese IM"
1228         https://bugs.webkit.org/show_bug.cgi?id=163011
1229         http://trac.webkit.org/changeset/206909
1230
1231 2016-10-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1232
1233         Network Session: Allow NetworkDataTask decide what to do when override is allowed for a download
1234         https://bugs.webkit.org/show_bug.cgi?id=163010
1235
1236         Reviewed by Alex Christensen.
1237
1238         Current code always deletes the file before starting a download when allow override is True. In soup backend we
1239         use glib API that takes care of it and tries to ensure that the original file is not deleted if the new file
1240         creation fails for whatever reason.
1241
1242         * NetworkProcess/Downloads/DownloadManager.cpp:
1243         (WebKit::DownloadManager::continueDecidePendingDownloadDestination): Pass allowOverride to setPendingDownloadLocation().
1244         * NetworkProcess/NetworkDataTask.h:
1245         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1246         (WebKit::NetworkDataTask::setPendingDownloadLocation): Delete the destination file if exists and allowOverride
1247         is True.
1248
1249 2016-10-07  Tomas Popela  <tpopela@redhat.com>
1250
1251         [GTK] UIProcess crashes when using Japanese IM
1252         https://bugs.webkit.org/show_bug.cgi?id=163011
1253
1254         We have to reference the current GdkEventKey before we try process it
1255         as later when the lambda body is reached the event could be already
1256         freed.
1257
1258         Reviewed by Carlos Garcia Campos.
1259
1260         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1261         (webkitWebViewBaseKeyPressEvent):
1262         (webkitWebViewBaseKeyReleaseEvent):
1263         * UIProcess/gtk/InputMethodFilter.h:
1264         Use non-copyable Function so we can use WTFMove to pass the event to
1265         lambda.
1266
1267 2016-10-06  Michael Catanzaro  <mcatanzaro@igalia.com>
1268
1269         [GTK] Expose WebKitDOMHTMLInputElement APIs for form autofill
1270         https://bugs.webkit.org/show_bug.cgi?id=163082
1271
1272         Reviewed by Darin Adler.
1273
1274         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
1275         (webkit_dom_html_input_element_get_auto_filled): Added.
1276         (webkit_dom_html_input_element_set_auto_filled): Added.
1277         (webkit_dom_html_input_element_set_editing_value): Added.
1278         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
1279         * WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
1280
1281 2016-10-06  John Wilander  <wilander@apple.com>
1282
1283         Update Resource Load Statistics
1284         https://bugs.webkit.org/show_bug.cgi?id=162811
1285
1286         Reviewed by Alex Christensen.
1287
1288         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1289         (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics):
1290             Switched to vector-based classification.
1291         (WebKit::WebResourceLoadStatisticsStore::classifyResource):
1292             Simplified logic and moved the split between has and has
1293             no user interaction into ResourceLoadStatisticsStore.
1294         (WebKit::WebResourceLoadStatisticsStore::clearDataRecords):
1295             Added.
1296         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
1297             Updated to make use of the new functions.
1298         (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
1299             Removed stray whitespace.
1300         (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
1301             Removed stray whitespace.
1302         (WebKit::WebResourceLoadStatisticsStore::createDecoderFromDisk):
1303             Removed stray whitespace.
1304         (WebKit::hasPrevalentResourceCharacteristics): Deleted.
1305         (WebKit::classifyPrevalentResources): Deleted.
1306         * UIProcess/WebResourceLoadStatisticsStore.h:
1307             Added member variables for clearing of data records.
1308
1309 2016-10-06  Youenn Fablet  <youenn@apple.com>
1310
1311         [WK2] 304 revalidation on the network process does not update the validated response
1312         https://bugs.webkit.org/show_bug.cgi?id=162973
1313
1314         Reviewed by Darin Adler.
1315
1316         * NetworkProcess/NetworkResourceLoader.cpp: Updating cache entry with the revalidated one.
1317
1318 2016-10-05  Wenson Hsieh  <wenson_hsieh@apple.com>
1319
1320         Introduce InputEvent bindings in preparation for the input events spec
1321         https://bugs.webkit.org/show_bug.cgi?id=162954
1322
1323         Reviewed by Ryosuke Niwa.
1324
1325         Adds a new runtime switch for enabling InputEvents.
1326
1327         * Shared/WebPreferencesDefinitions.h:
1328         * WebProcess/WebPage/WebPage.cpp:
1329         (WebKit::WebPage::updatePreferences):
1330
1331 2016-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
1332
1333         Put variation fonts work behind a compile-time flag
1334         https://bugs.webkit.org/show_bug.cgi?id=162949
1335
1336         Reviewed by Simon Fraser.
1337
1338         * Configurations/FeatureDefines.xcconfig:
1339
1340 2016-10-05  Tim Horton  <timothy_horton@apple.com>
1341
1342         Fix the build.
1343
1344         * UIProcess/Cocoa/WebViewImpl.mm:
1345
1346 2016-10-05  Tim Horton  <timothy_horton@apple.com>
1347
1348         Avoid automatically re-taking snapshots for back-forward items that were never loaded into the view
1349         https://bugs.webkit.org/show_bug.cgi?id=162955
1350         <rdar://problem/27659173>
1351
1352         Reviewed by Simon Fraser.
1353
1354         Make it possible for clients to control the snapshot for back-forward
1355         items that are restored from session state without navigating to them,
1356         by ensuring that we won't stomp on the snapshot that they explicitly take,
1357         until a load occurs.
1358
1359         * UIProcess/WebBackForwardList.cpp:
1360         (WebKit::WebBackForwardList::addItem):
1361         (WebKit::WebBackForwardList::goToItem):
1362         * UIProcess/ios/ViewGestureControllerIOS.mm:
1363         (WebKit::ViewGestureController::beginSwipeGesture):
1364         * UIProcess/mac/ViewGestureControllerMac.mm:
1365         (WebKit::ViewGestureController::trackSwipeGesture):
1366         Disambiguate explicit API-driven snapshot recording from automatic,
1367         navigation-driven snapshot recording.
1368
1369         * UIProcess/Cocoa/WebViewImpl.mm:
1370         (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
1371         Get rid of the version of recordNavigationSnapshot() that doesn't take a
1372         back-forward list item, and grab the current item at the one remaining caller.
1373         
1374         * UIProcess/WebPageProxy.cpp:
1375         (WebKit::WebPageProxy::recordAutomaticNavigationSnapshot):
1376         (WebKit::WebPageProxy::recordNavigationSnapshot):
1377         (WebKit::WebPageProxy::restoreFromSessionState):
1378         (WebKit::WebPageProxy::didCommitLoadForFrame):
1379         * UIProcess/WebPageProxy.h:
1380         Rename m_suppressNavigationSnapshotting to m_suppressAutomaticNavigationSnapshotting,
1381         and make it be only about automatic (navigation-driven) snapshots; it won't have
1382         any impact on explicit snapshots forced by clients.
1383         
1384         Set m_suppressAutomaticNavigationSnapshotting unconditionally when restoring
1385         from session state, so that we won't start automatically snapshotting until
1386         something has loaded in the view.
1387
1388 2016-10-05  Tim Horton  <timothy_horton@apple.com>
1389
1390         Make it possible to test ViewSnapshotStore behaviors
1391         https://bugs.webkit.org/show_bug.cgi?id=162983
1392
1393         Reviewed by Simon Fraser.
1394
1395         Add two pieces of SPI to make it easier to test ViewSnapshotStore:
1396
1397         - [WKWebView _disableBackForwardSnapshotVolatilityForTesting]
1398             This makes it so that we don't make snapshots volatile after we
1399             take them, so that they won't get purged while the test is running
1400             and cause the test to be flaky.
1401
1402         - [WKBackForwardListItem _copySnapshotForTesting]
1403             This returns a CGImage with the content of the given back-forward
1404             item's current snapshot, if there is one.
1405
1406         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
1407         (-[WKBackForwardListItem _copySnapshotForTesting]):
1408         * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
1409         * UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Added.
1410         Add WKBackForwardListItem SPI to retrieve the snapshot for a given back-forward list item.
1411
1412         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1413         * UIProcess/API/Cocoa/WKWebView.mm:
1414         (-[WKWebView _disableBackForwardSnapshotVolatilityForTesting]):
1415         Add WKWebView SPI to disable volatility of snapshots, for testing purposes.
1416         
1417         * UIProcess/Cocoa/WebViewImpl.h:
1418         * UIProcess/Cocoa/WebViewImpl.mm:
1419         (WebKit::WebViewImpl::takeViewSnapshot):
1420         Adopt ViewSnapshot::setVolatile instead of reaching into the surface.
1421
1422         * UIProcess/mac/ViewGestureControllerMac.mm:
1423         (WebKit::ViewGestureController::removeSwipeSnapshot):
1424         Adopt ViewSnapshot::setVolatile instead of reaching into the surface.
1425
1426         * UIProcess/mac/ViewSnapshotStore.h:
1427         (WebKit::ViewSnapshotStore::setDisableSnapshotVolatilityForTesting):
1428         (WebKit::ViewSnapshotStore::disableSnapshotVolatilityForTesting):
1429         * UIProcess/mac/ViewSnapshotStore.mm:
1430         (WebKit::ViewSnapshotStore::ViewSnapshotStore):
1431         (WebKit::ViewSnapshot::setVolatile):
1432         (WebKit::ViewSnapshot::asLayerContents):
1433         Move all touching of snapshot volatility into the new setVolatile,
1434         and short-circuit if the testing-only m_disableSnapshotVolatility bit is set
1435
1436         (WebKit::ViewSnapshot::asImageForTesting):
1437         Make a CGImageRef for the aforementioned WKBackForwardListItem SPI.
1438         This is currently not implemented for the iOS Simulator, because we
1439         don't have access to the bits of the image in that case.
1440
1441 2016-10-05  Chris Dumez  <cdumez@apple.com>
1442
1443         KeyboardEvent.getModifierState() should support "CapsLock" modifier
1444         https://bugs.webkit.org/show_bug.cgi?id=162861
1445
1446         Reviewed by Darin Adler.
1447
1448         Add support for CapsLock modifier on events.
1449
1450         * Shared/API/c/WKEvent.h:
1451         * Shared/API/c/WKSharedAPICast.h:
1452         (WebKit::toAPI):
1453         * Shared/WebEventConversion.cpp:
1454         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
1455         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
1456         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
1457         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
1458         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
1459         * Shared/efl/WebEventFactory.cpp:
1460         (WebKit::toWebEventModifiers):
1461         * Shared/ios/WebIOSEventFactory.mm:
1462         (modifiersForEvent):
1463         * Shared/mac/WebEventFactory.mm:
1464         (WebKit::modifiersForEvent):
1465         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1466         (toNSEventModifierFlags):
1467         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
1468         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
1469
1470 2016-10-05  Zan Dobersek  <zdobersek@igalia.com>
1471
1472         Rename ENABLE_ENCRYPTED_MEDIA_V2 to ENABLE_LEGACY_ENCRYPTED_MEDIA
1473         https://bugs.webkit.org/show_bug.cgi?id=162903
1474
1475         Reviewed by Alex Christensen.
1476
1477         Rename build guards for the remaining implementation of the legacy EME API
1478         to ENABLE_LEGACY_ENCRYPTED_MEDIA. This will allow for the future implementation
1479         of the near-finished API to be guarded with the simple ENABLE_ENCRYPTED_MEDIA guards.
1480
1481         * Configurations/FeatureDefines.xcconfig:
1482         * WebProcess/WebPage/WebPage.cpp:
1483         (WebKit::m_userInterfaceLayoutDirection):
1484         * WebProcess/WebProcess.cpp:
1485         (WebKit::m_resourceLoadStatisticsStorage):
1486
1487 2016-10-05  Daniel Bates  <dabates@apple.com>
1488
1489         [WK2][NetworkSession] Ping requests should follow redirects if applicable
1490         https://bugs.webkit.org/show_bug.cgi?id=162580
1491         <rdar://problem/28631274>
1492
1493         Reviewed by Alex Christensen.
1494
1495         Implement support for following redirects, if applicable, of a ping request when using the
1496         Network Session (ENABLE(NETWORK_SESSION)) code path in WebKit2. For ping requests that are
1497         in response to hyperlink auditing (e.g. <a ping>) we should follow redirect responses.
1498         For Content Security Policy and XSS Auditor violation reports we should not follow redirect
1499         responses.
1500
1501         Currently we always ignore redirects for ping requests that are sent using the Network Session
1502         code path in WebKit2. This behavior disagrees with the behavior described in section
1503         "Hyperlink auditing" of the HTML standard, <https://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing> (27 September 2016),
1504         as well as the behavior in Legacy WebKit and WebKit2 with Network Session disabled. We should
1505         follow redirects for ping requests initiated as part of hyperlink auditing to more closely
1506         conform to the HTML standard and match the behavior in Legacy WebKit and WebKit2 with Network
1507         Session disabled.
1508
1509         * NetworkProcess/PingLoad.h:
1510
1511 2016-10-05  Daniel Bates  <dabates@apple.com>
1512
1513         Do not follow redirects when sending violation report
1514         https://bugs.webkit.org/show_bug.cgi?id=162520
1515         <rdar://problem/27957639>
1516
1517         Reviewed by Alex Christensen.
1518
1519         Update the non-Network Session WebKit2 implementation to follow redirect responses for a ping
1520         request, if applicable. I did not update the Network Session implementation at this time. I
1521         will fix it in <https://bugs.webkit.org/show_bug.cgi?id=162580>.
1522
1523         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1524         (WebKit::NetworkConnectionToWebProcess::loadPing): Tell PingHandle whether to follow redirects.
1525         * NetworkProcess/NetworkLoadParameters.h:
1526         * NetworkProcess/NetworkResourceLoadParameters.cpp:
1527         (WebKit::NetworkResourceLoadParameters::encode): Encode NetworkResourceLoadParameters::shouldFollowRedirects.
1528         (WebKit::NetworkResourceLoadParameters::decode): Decode NetworkResourceLoadParameters::shouldFollowRedirects.
1529         * NetworkProcess/PingLoad.h: Added FIXME comment to implement support for following redirects,
1530         if applicable (for hyperlink auditing). See <https://bugs.webkit.org/show_bug.cgi?id=162580>
1531         for more details.
1532         * WebProcess/Network/WebLoaderStrategy.cpp:
1533         (WebKit::WebLoaderStrategy::createPingHandle): Modified to take a boolean whether to follow
1534         redirects responses and set NetworkResourceLoadParameters::shouldFollowRedirects as appropriate.
1535         * WebProcess/Network/WebLoaderStrategy.h:
1536
1537 2016-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1538
1539         [SOUP] Move global TLS errors handling from ResourceHandle to SoupNetworkSession
1540         https://bugs.webkit.org/show_bug.cgi?id=162910
1541
1542         Reviewed by Alex Christensen.
1543
1544         Use SoupNetworkSession instead of ResourceHandle.
1545
1546         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1547         (WebKit::NetworkProcess::setIgnoreTLSErrors):
1548         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
1549
1550 2016-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1551
1552         Unreviewed. Fix GTK+ build with USE_REDIRECTED_XCOMPOSITE_WINDOW disabled.
1553
1554         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
1555         (WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
1556
1557 2016-10-04  Chris Dumez  <cdumez@apple.com>
1558
1559         Implement KeyboardEvent.code from the UI Event spec
1560         https://bugs.webkit.org/show_bug.cgi?id=149584
1561
1562         Reviewed by Darin Adler.
1563
1564         Add support for Keyboard.code attribute:
1565         - https://w3c.github.io/uievents/#dom-keyboardevent-code
1566         - https://w3c.github.io/uievents-code/
1567
1568         * Shared/WebEvent.h:
1569         (WebKit::WebKeyboardEvent::code):
1570         * Shared/WebEventConversion.cpp:
1571         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
1572         * Shared/WebKeyboardEvent.cpp:
1573         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
1574         (WebKit::WebKeyboardEvent::encode):
1575         (WebKit::WebKeyboardEvent::decode):
1576         * Shared/mac/WebEventFactory.mm:
1577         (WebKit::WebEventFactory::createWebKeyboardEvent):
1578
1579 2016-10-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
1580
1581         The dragged image should be the current frame only of the animated image
1582         https://bugs.webkit.org/show_bug.cgi?id=162109
1583
1584         Reviewed by Tim Horton.
1585
1586         * UIProcess/Cocoa/WebViewImpl.mm:
1587         (WebKit::WebViewImpl::provideDataForPasteboard): Call the Image function with its new name.
1588
1589 2016-10-04  Ryosuke Niwa  <rniwa@webkit.org>
1590
1591         Revert a change erroneously committed in r206795.
1592
1593         * WebProcess/WebPage/WebPage.cpp:
1594         (WebKit::WebPage::updatePreferences):
1595
1596 2016-10-04  Anders Carlsson  <andersca@apple.com>
1597
1598         Properly kill web processes in the launching state
1599         https://bugs.webkit.org/show_bug.cgi?id=162938
1600
1601         Reviewed by Tim Horton.
1602
1603         * UIProcess/Launcher/ProcessLauncher.h:
1604         Add m_xpcConnection member.
1605
1606         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1607         (WebKit::ProcessLauncher::launchProcess):
1608         Store the XPC connection in the m_xpcConnection member variable.
1609         In the reply handler, handle m_xpcConnection being null.
1610
1611         (WebKit::ProcessLauncher::platformInvalidate):
1612         Cancel and kill the connection.
1613
1614         * UIProcess/WebPageProxy.cpp:
1615         (WebKit::WebPageProxy::terminateProcess):
1616         Get rid of an assertion.
1617
1618         * UIProcess/WebProcessProxy.cpp:
1619         (WebKit::WebProcessProxy::requestTermination):
1620         Handle the launching state.
1621
1622 2016-10-04  Tim Horton  <timothy_horton@apple.com>
1623
1624         Fix the build.
1625
1626         * Shared/WebBackForwardListItem.cpp:
1627         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
1628         (WebKit::WebBackForwardListItem::highestUsedItemID):
1629
1630 2016-10-04  Tim Horton  <timothy_horton@apple.com>
1631
1632         Fix a typo in WebBackForwardListItem (highed->highest)
1633         https://bugs.webkit.org/show_bug.cgi?id=162935
1634
1635         Reviewed by Anders Carlsson.
1636
1637         * Shared/WebBackForwardListItem.cpp:
1638         (WebKit::WebBackForwardListItem::highestUsedItemID):
1639         (WebKit::WebBackForwardListItem::highedUsedItemID): Deleted.
1640         * Shared/WebBackForwardListItem.h:
1641         * UIProcess/WebPageProxy.cpp:
1642         (WebKit::WebPageProxy::creationParameters):
1643
1644 2016-10-04  Yusuke Suzuki  <utatane.tea@gmail.com>
1645
1646         [DOMJIT] Introduce DOMJIT::GetterSetter to tell JIT information
1647         https://bugs.webkit.org/show_bug.cgi?id=162916
1648
1649         Reviewed by Filip Pizlo.
1650
1651         * CMakeLists.txt:
1652
1653 2016-10-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1654
1655         [SOUP] Remove SSLPolicyFlags from SoupNetworkSession
1656         https://bugs.webkit.org/show_bug.cgi?id=162906
1657
1658         Reviewed by Michael Catanzaro.
1659
1660         * NetworkProcess/soup/NetworkProcessMainSoup.cpp:
1661         (WebKit::NetworkProcessMainUnix):
1662
1663 2016-10-04  Wenson Hsieh  <wenson_hsieh@apple.com>
1664
1665         Media controls are displayed in the incorrect state momentarily after switching between tabs playing media
1666         https://bugs.webkit.org/show_bug.cgi?id=162766
1667         <rdar://problem/28533523>
1668
1669         Reviewed by Jer Noble.
1670
1671         Plumbs some more Now Playing information from the web process to the UI process for testing purposes. See
1672         WebCore ChangeLog for more details.
1673
1674         * UIProcess/API/Cocoa/WKWebView.mm:
1675         (-[WKWebView _handleActiveNowPlayingSessionInfoResponse:title:duration:elapsedTime:]):
1676         (-[WKWebView _handleActiveNowPlayingSessionInfoResponse:]): Deleted.
1677         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1678         * UIProcess/PageClient.h:
1679         * UIProcess/WebPageProxy.cpp:
1680         (WebKit::WebPageProxy::handleActiveNowPlayingSessionInfoResponse):
1681         * UIProcess/WebPageProxy.h:
1682         * UIProcess/WebPageProxy.messages.in:
1683         * UIProcess/mac/PageClientImpl.h:
1684         * UIProcess/mac/PageClientImpl.mm:
1685         (WebKit::PageClientImpl::handleActiveNowPlayingSessionInfoResponse):
1686         * WebProcess/WebPage/mac/WebPageMac.mm:
1687         (WebKit::WebPage::requestActiveNowPlayingSessionInfo):
1688
1689 2016-10-04  Zan Dobersek  <zdobersek@igalia.com>
1690
1691         Unreviewed GTK+ build fix.
1692
1693         * UIProcess/API/C/WKPage.cpp:
1694         (WKPageSetPageNavigationClient): Guard the call to getDefaultWebCryptoMasterKey()
1695         with ENABLE(SUBTLE_CRYPTO), since the same guard is used for the definition. Fixes
1696         GTK+ production builds where the feature is disabled.
1697
1698 2016-10-03  Keith Rollin  <krollin@apple.com>
1699
1700         More logging to diagnose "WebKit encountered an internal error" messages
1701         https://bugs.webkit.org/show_bug.cgi?id=162754
1702
1703         Reviewed by Antti Koivisto.
1704
1705         Add more logging around calls to internalError, as well as some
1706         low-level logging around SharedMemory, and mach_vm_map in particular.
1707
1708         * NetworkProcess/NetworkResourceLoader.cpp:
1709         (WebKit::NetworkResourceLoader::startNetworkLoad):
1710         * Platform/Logging.h:
1711         * Platform/mac/SharedMemoryMac.cpp:
1712         (WebKit::SharedMemory::allocate):
1713         (WebKit::makeMemoryEntry):
1714         (WebKit::SharedMemory::map):
1715         (WebKit::SharedMemory::~SharedMemory):
1716         * WebProcess/Network/WebLoaderStrategy.cpp:
1717         (WebKit::WebLoaderStrategy::networkProcessCrashed):
1718         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
1719         * WebProcess/Network/WebResourceLoader.cpp:
1720         (WebKit::WebResourceLoader::didReceiveResource):
1721
1722 2016-10-03  Ryan Haddad  <ryanhaddad@apple.com>
1723
1724         Unreviewed, rolling out r206754.
1725
1726         This change broke the El Capitan and Yosemite debug builds.
1727
1728         Reverted changeset:
1729
1730         "More logging to diagnose "WebKit encountered an internal
1731         error" messages"
1732         https://bugs.webkit.org/show_bug.cgi?id=162754
1733         http://trac.webkit.org/changeset/206754
1734
1735 2016-10-03  Keith Rollin  <krollin@apple.com>
1736
1737         More logging to diagnose "WebKit encountered an internal error" messages
1738         https://bugs.webkit.org/show_bug.cgi?id=162754
1739
1740         Reviewed by Antti Koivisto.
1741
1742         Add more logging around calls to internalError, as well as some
1743         low-level logging around SharedMemory, and mach_vm_map in particular.
1744
1745         * NetworkProcess/NetworkResourceLoader.cpp:
1746         (WebKit::NetworkResourceLoader::startNetworkLoad):
1747         * Platform/Logging.h:
1748         * Platform/mac/SharedMemoryMac.cpp:
1749         (WebKit::SharedMemory::allocate):
1750         (WebKit::makeMemoryEntry):
1751         (WebKit::SharedMemory::map):
1752         (WebKit::SharedMemory::~SharedMemory):
1753         * WebProcess/Network/WebLoaderStrategy.cpp:
1754         (WebKit::WebLoaderStrategy::networkProcessCrashed):
1755         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
1756         * WebProcess/Network/WebResourceLoader.cpp:
1757         (WebKit::WebResourceLoader::didReceiveResource):
1758
1759 2016-10-03  Chris Dumez  <cdumez@apple.com>
1760
1761         Add support for KeyboardEvent.key attribute
1762         https://bugs.webkit.org/show_bug.cgi?id=36267
1763
1764         Reviewed by Darin Adler.
1765
1766         Add support for KeyboardEvent.key attribute.
1767
1768         * Shared/WebEvent.h:
1769         (WebKit::WebKeyboardEvent::key):
1770         (WebKit::WebKeyboardEvent::unmodifiedText): Deleted.
1771         * Shared/WebEventConversion.cpp:
1772         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
1773         * Shared/WebKeyboardEvent.cpp:
1774         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
1775         (WebKit::WebKeyboardEvent::encode):
1776         (WebKit::WebKeyboardEvent::decode):
1777         * Shared/mac/WebEventFactory.mm:
1778         (WebKit::WebEventFactory::createWebKeyboardEvent):
1779
1780 2016-10-03  Chris Dumez  <cdumez@apple.com>
1781
1782         Add support for KeyboardEvent.key attribute
1783         https://bugs.webkit.org/show_bug.cgi?id=36267
1784
1785         Reviewed by Darin Adler.
1786
1787         Add support for KeyboardEvent.key attribute.
1788
1789         * Shared/WebEvent.h:
1790         (WebKit::WebKeyboardEvent::key):
1791         (WebKit::WebKeyboardEvent::unmodifiedText): Deleted.
1792         * Shared/WebEventConversion.cpp:
1793         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
1794         * Shared/WebKeyboardEvent.cpp:
1795         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
1796         (WebKit::WebKeyboardEvent::encode):
1797         (WebKit::WebKeyboardEvent::decode):
1798         * Shared/mac/WebEventFactory.mm:
1799         (WebKit::WebEventFactory::createWebKeyboardEvent):
1800
1801 2016-10-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1802
1803         [SOUP] Cleanup persistent credential storage code
1804         https://bugs.webkit.org/show_bug.cgi?id=162777
1805
1806         Reviewed by Alex Christensen.
1807
1808         Use USE(LIBSECRET) instead of ENABLE(CREDENTIAL_STORAGE).
1809
1810         * UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
1811         (webkit_authentication_request_can_save_credentials):
1812
1813 2016-10-02  Ryan Haddad  <ryanhaddad@apple.com>
1814
1815         Unreviewed, rolling out r206683.
1816
1817         This change caused API test WebKit2.FindMatches to fail on
1818         Mac.
1819
1820         Reverted changeset:
1821
1822         "The dragged image should be the current frame only of the
1823         animated image"
1824         https://bugs.webkit.org/show_bug.cgi?id=162109
1825         http://trac.webkit.org/changeset/206683
1826
1827 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
1828
1829         Follow-up patch after r206701
1830         https://bugs.webkit.org/show_bug.cgi?id=162818
1831
1832         Unreviewed.
1833
1834         I missed one place required to enable an experimental feature by default.
1835
1836         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1837         (WebKit::registerUserDefaultsIfNeeded):
1838
1839 2016-09-30  Dan Bernstein  <mitz@apple.com>
1840
1841         [iOS] Editing menu omits the Share command if the selected text is longer than 200 characters
1842         https://bugs.webkit.org/show_bug.cgi?id=162821
1843         <rdar://problem/28409828>
1844
1845         Reviewed by Tim Horton.
1846
1847         * UIProcess/ios/WKContentViewInteraction.mm:
1848         (-[WKContentView canPerformAction:withSender:]): Changed to return YES for the _share:
1849           action even if the selection is longer than 200 characters. While Define should not have
1850           been available for longer selections, Share does not have such a limitation.
1851
1852 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
1853
1854         Turn variation fonts on by default
1855         https://bugs.webkit.org/show_bug.cgi?id=162818
1856
1857         Reviewed by Simon Fraser.
1858
1859         * Shared/WebPreferencesDefinitions.h:
1860
1861 2016-09-30  Brady Eidson  <beidson@apple.com>
1862
1863         REGRESSION (Safari 10 combined with WK changes): Unable to store WebCrypto keys in IndexedDB database.
1864         <rdar://problem/28334440> and https://bugs.webkit.org/show_bug.cgi?id=162554
1865
1866         Reviewed by Alexey Proskuryakov.
1867
1868         Safari 10 has a WKPageNavigation client but does not implement the "copyWebCryptoMasterKey" callback.
1869
1870         WebKit just fails in this case, instead of falling back to "getDefaultWebCryptoMasterKey".
1871         It should fall back.
1872
1873         Additionally there's a WKContextClient callback to get the crypto key, also, but it is completely unused.
1874         So it should be pulled.
1875
1876         * UIProcess/API/APILoaderClient.h:
1877         (API::LoaderClient::webCryptoMasterKey): Deleted.
1878         * UIProcess/API/C/WKContext.h:
1879
1880         * UIProcess/API/C/WKPage.cpp:
1881         (WKPageSetPageLoaderClient):
1882         (WKPageSetPageNavigationClient): If the client doesn't implement this method, fallback to getDefaultWebCryptoMasterKey.
1883
1884         * UIProcess/Cocoa/NavigationState.mm:
1885         (WebKit::NavigationState::NavigationClient::webCryptoMasterKey): If the client doesn't implement this method,
1886           fallback to getDefaultWebCryptoMasterKey.
1887
1888         * UIProcess/WebContextClient.cpp:
1889         (WebKit::WebContextClient::copyWebCryptoMasterKey): Deleted.
1890         * UIProcess/WebContextClient.h:
1891
1892         * UIProcess/WebPageProxy.cpp:
1893         (WebKit::WebPageProxy::wrapCryptoKey): Only ask the NavigationClient before falling back. Don't ask the loader client.
1894         (WebKit::WebPageProxy::unwrapCryptoKey): Ditto.
1895
1896 2016-09-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
1897
1898         The dragged image should be the current frame only of the animated image
1899         https://bugs.webkit.org/show_bug.cgi?id=162109
1900
1901         Reviewed by Tim Horton.
1902
1903         * UIProcess/Cocoa/WebViewImpl.mm:
1904         (WebKit::WebViewImpl::provideDataForPasteboard): Call the Image function with its new name.
1905
1906 2016-09-30  Anders Carlsson  <andersca@apple.com>
1907
1908         Second time going into fullscreen using silverlight, will hide the menu bar and dock for Safari
1909         https://bugs.webkit.org/show_bug.cgi?id=162805
1910         rdar://problem/28208495
1911
1912         Reviewed by Dan Bernstein.
1913
1914         Turns out that the WindowRef wrappers for full screen NSWindows can end up in the m_windows HashSet,
1915         and never go away. 
1916         
1917         Fix this by storing the canonical CGWindowIDs in the hash map instead.
1918
1919         * PluginProcess/mac/PluginProcessMac.mm:
1920         (WebKit::cgWindowID):
1921         (WebKit::windowCoversAnyScreen):
1922         (WebKit::FullscreenWindowTracker::windowShown):
1923         (WebKit::FullscreenWindowTracker::windowHidden):
1924
1925 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
1926
1927         Create runtime flag for variation font work
1928         https://bugs.webkit.org/show_bug.cgi?id=162780
1929
1930         Reviewed by Alex Christensen.
1931
1932         * Shared/WebPreferencesDefinitions.h:
1933         * WebProcess/WebPage/WebPage.cpp:
1934         (WebKit::WebPage::updatePreferences):
1935
1936 2016-09-30  Chris Dumez  <cdumez@apple.com>
1937
1938         [WK2][iOS] Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint
1939         https://bugs.webkit.org/show_bug.cgi?id=162787
1940         <rdar://problem/28554292>
1941
1942         Reviewed by Benjamin Poulain.
1943
1944         Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint.
1945
1946         * Platform/spi/ios/UIKitSPI.h:
1947         * Shared/WebEvent.h:
1948         (WebKit::WebPlatformTouchPoint::setRadiusX):
1949         (WebKit::WebPlatformTouchPoint::radiusX):
1950         (WebKit::WebPlatformTouchPoint::setRadiusY):
1951         (WebKit::WebPlatformTouchPoint::radiusY):
1952         (WebKit::WebPlatformTouchPoint::setRotationAngle):
1953         (WebKit::WebPlatformTouchPoint::rotationAngle):
1954         * Shared/WebEventConversion.cpp:
1955         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
1956         * Shared/ios/NativeWebTouchEventIOS.mm:
1957         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
1958         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1959         (WebKit::WebPlatformTouchPoint::encode):
1960         (WebKit::WebPlatformTouchPoint::decode):
1961
1962 2016-09-30  Megan Gardner  <megan_gardner@apple.com>
1963
1964         Make it possible to test web-related user-interface features
1965         https://bugs.webkit.org/show_bug.cgi?id=162657
1966
1967         Reviewed by Simon Fraser.
1968
1969         Added the ability to pull the strings from an Action Sheet and pass them to
1970         test scripts to make sure we are giving the correct available actions for
1971         the item we are interacting with.
1972         Added a test for long press on an image, and used the sheet scraping functionality
1973         to make sure that the correct actions were being displayed.
1974         Test for previous patch, Changeset 205915; Bug 161761
1975
1976         * UIProcess/API/Cocoa/WKWebView.mm:
1977         (-[WKWebView _contentsOfUserInterfaceItem:]):
1978         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1979         * UIProcess/ios/WKActionSheetAssistant.h:
1980         * UIProcess/ios/WKActionSheetAssistant.mm:
1981         (-[WKActionSheetAssistant currentAvailableActionStrings]):
1982         * UIProcess/ios/WKContentViewInteraction.h:
1983         * UIProcess/ios/WKContentViewInteraction.mm:
1984         (-[WKContentView _contentsOfUserInterfaceItem:]):
1985
1986 2016-09-27  Anders Carlsson  <andersca@apple.com>
1987
1988         Remove a couple of unused members from PlatformKeyboardEvent
1989         https://bugs.webkit.org/show_bug.cgi?id=162641
1990
1991         Reviewed by Tim Horton.
1992
1993         * Shared/WebEventConversion.cpp:
1994         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
1995
1996 2016-09-29  Nan Wang  <n_wang@apple.com>
1997
1998         AX: iOS: Tapping <input> in Safari zooms in a bit when page has max scale = 1
1999         https://bugs.webkit.org/show_bug.cgi?id=162471
2000
2001         Reviewed by Simon Fraser.
2002
2003         * Shared/AssistedNodeInformation.cpp:
2004         (WebKit::AssistedNodeInformation::encode):
2005         (WebKit::AssistedNodeInformation::decode):
2006         * Shared/AssistedNodeInformation.h:
2007         * UIProcess/ios/WKContentViewInteraction.mm:
2008         (-[WKContentView _displayFormNodeInputView]):
2009         * WebProcess/WebPage/WebPage.h:
2010         * WebProcess/WebPage/ios/WebPageIOS.mm:
2011         (WebKit::WebPage::maximumPageScaleFactorIgnoringAlwaysScalable):
2012         (WebKit::WebPage::getAssistedNodeInformation):
2013
2014 2016-09-29  Daniel Bates  <dabates@apple.com>
2015
2016         Mark NetworkLoad as final
2017         https://bugs.webkit.org/show_bug.cgi?id=162681
2018
2019         Reviewed by Alex Christensen.
2020
2021         Mark class NetworkLoad as final as we do not have any derived classes at the moment and it
2022         is unclear if it would make sense to subclass it. We can always unmark the class if it turns
2023         out that it makes sense to subclass it.
2024
2025         * NetworkProcess/NetworkLoad.h:
2026
2027 2016-09-29  Sam Weinig  <sam@webkit.org>
2028
2029         Allow overriding some NSURLSessionConfiguration properties on a per-NetworkProcess basis
2030         <rdar://problem/27648683>
2031         https://bugs.webkit.org/show_bug.cgi?id=162735
2032
2033         Reviewed by Dan Bernstein.
2034
2035         Add SPI for overriding the following NSURLSessionConfigurations properties:
2036             - _sourceApplicationBundleIdentifier
2037             - _sourceApplicationSecondaryIdentifier
2038             - _CTDataConnectionServiceType
2039
2040         * NetworkProcess/NetworkProcess.cpp:
2041         (WebKit::NetworkProcess::initializeNetworkProcess):
2042         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2043         (WebKit::NetworkProcessCreationParameters::encode):
2044         (WebKit::NetworkProcessCreationParameters::decode):
2045         * NetworkProcess/NetworkProcessCreationParameters.h:
2046         * NetworkProcess/NetworkSession.h:
2047         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2048         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2049         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2050         (WebKit::globalSourceApplicationBundleIdentifier):
2051         (WebKit::globalSourceApplicationSecondaryIdentifier):
2052         (WebKit::globalCTDataConnectionServiceType):
2053         (WebKit::NetworkSession::setCustomProtocolManager):
2054         (WebKit::NetworkSession::setSourceApplicationAuditTokenData):
2055         (WebKit::NetworkSession::setSourceApplicationBundleIdentifier):
2056         (WebKit::NetworkSession::setSourceApplicationSecondaryIdentifier):
2057         (WebKit::NetworkSession::setCTDataConnectionServiceType):
2058         (WebKit::NetworkSession::NetworkSession):
2059         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2060         (API::ProcessPoolConfiguration::copy):
2061         * UIProcess/API/APIProcessPoolConfiguration.h:
2062         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
2063         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
2064         (-[_WKProcessPoolConfiguration sourceApplicationBundleIdentifier]):
2065         (-[_WKProcessPoolConfiguration setSourceApplicationBundleIdentifier:]):
2066         (-[_WKProcessPoolConfiguration sourceApplicationSecondaryIdentifier]):
2067         (-[_WKProcessPoolConfiguration setSourceApplicationSecondaryIdentifier:]):
2068         (-[_WKProcessPoolConfiguration CTDataConnectionServiceType]):
2069         (-[_WKProcessPoolConfiguration setCTDataConnectionServiceType:]):
2070         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2071         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2072         * WebProcess/WebProcess.cpp:
2073         (WebKit::WebProcess::initializeWebProcess):
2074         * WebProcess/cocoa/WebProcessCocoa.mm:
2075         (WebKit::WebProcess::platformInitializeWebProcess):
2076
2077 2016-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2078
2079         NetworkSession: HTTP authentication doesn't work if PROTECTION_SPACE_AUTH_CALLBACK is not enabled
2080         https://bugs.webkit.org/show_bug.cgi?id=162724
2081
2082         Reviewed by Alex Christensen.
2083
2084         NetworkLoad always expects continueCanAuthenticateAgainstProtectionSpace() to be called to complete the
2085         authentication challenge, which is only defined when PROTECTION_SPACE_AUTH_CALLBACK is enabled.
2086         I've added missing #ifdefs for PROTECTION_SPACE_AUTH_CALLBACK.
2087
2088         * NetworkProcess/Downloads/DownloadManager.cpp:
2089         (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
2090         * NetworkProcess/Downloads/DownloadManager.h:
2091         * NetworkProcess/Downloads/PendingDownload.cpp:
2092         (WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
2093         * NetworkProcess/Downloads/PendingDownload.h:
2094         * NetworkProcess/NetworkLoad.cpp:
2095         (WebKit::NetworkLoad::~NetworkLoad):
2096         (WebKit::NetworkLoad::didReceiveChallenge): Call completeAuthenticationChallenge() instead of
2097         canAuthenticateAgainstProtectionSpaceAsync() when PROTECTION_SPACE_AUTH_CALLBACK is not enabled.
2098         (WebKit::NetworkLoad::completeAuthenticationChallenge): Moved common code to complete the authentication
2099         challenge from continueCanAuthenticateAgainstProtectionSpace().
2100         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace): Call completeAuthenticationChallenge().
2101         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
2102         * NetworkProcess/NetworkLoad.h:
2103         * NetworkProcess/NetworkLoadClient.h:
2104         * NetworkProcess/NetworkProcess.cpp:
2105         (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload):
2106         * NetworkProcess/NetworkProcess.h:
2107         * NetworkProcess/NetworkProcess.messages.in:
2108         * NetworkProcess/NetworkResourceLoader.cpp:
2109         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
2110         (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
2111         * NetworkProcess/NetworkResourceLoader.h:
2112         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
2113         * Shared/Authentication/AuthenticationManager.h:
2114         * UIProcess/Downloads/DownloadProxy.cpp:
2115         (WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
2116         * UIProcess/Downloads/DownloadProxy.h:
2117         * UIProcess/Downloads/DownloadProxy.messages.in:
2118
2119 2016-09-28  Joseph Pecoraro  <pecoraro@apple.com>
2120
2121         WKSharedAPICast should not warn about acceptable custom context menu tag values
2122         https://bugs.webkit.org/show_bug.cgi?id=162597
2123         <rdar://problem/28487627>
2124
2125         Reviewed by Tim Horton.
2126
2127         * Shared/API/c/WKSharedAPICast.h:
2128         (WebKit::toAPI):
2129         (WebKit::toImpl):
2130         Don't log an error when casting ContextMenu types if it is within
2131         the Custom ContextMenu tag range.
2132
2133 2016-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2134
2135         Adopt MediaRemote SPI to achieve desired Now Playing behavior
2136         https://bugs.webkit.org/show_bug.cgi?id=162658
2137         <rdar://problem/28499358>
2138
2139         Reviewed by Jer Noble.
2140
2141         Plumbs Now Playing session information (for now, this is just a flag indicating whether or not there is an
2142         active session) across from the web process to the UI process for testing in the form of asynchronous request/
2143         handle-response messages on the WebPage and its proxy in the UI process.
2144
2145         * UIProcess/API/Cocoa/WKWebView.mm:
2146         (-[WKWebView _requestActiveNowPlayingSessionInfo]):
2147         (-[WKWebView _handleActiveNowPlayingSessionInfoResponse:]):
2148         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2149         * UIProcess/PageClient.h:
2150         * UIProcess/WebPageProxy.cpp:
2151         (WebKit::WebPageProxy::requestActiveNowPlayingSessionInfo):
2152         (WebKit::WebPageProxy::handleActiveNowPlayingSessionInfoResponse):
2153         * UIProcess/WebPageProxy.h:
2154         * UIProcess/WebPageProxy.messages.in:
2155         * UIProcess/mac/PageClientImpl.h:
2156         * UIProcess/mac/PageClientImpl.mm:
2157         (WebKit::PageClientImpl::handleActiveNowPlayingSessionInfoResponse):
2158         * WebProcess/WebPage/WebPage.h:
2159         * WebProcess/WebPage/WebPage.messages.in:
2160         * WebProcess/WebPage/mac/WebPageMac.mm:
2161         (WebKit::WebPage::requestActiveNowPlayingSessionInfo):
2162
2163 2016-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2164
2165         [GTK] Switch to use GMenu internally in the context menu implementation
2166         https://bugs.webkit.org/show_bug.cgi?id=162603
2167
2168         Reviewed by Michael Catanzaro.
2169
2170         Switch to use GAction instead of GtkAction internally, but still keeping a GtkAction associated to the GAction,
2171         because our API depends on GtkAction.
2172
2173         * Shared/gtk/WebContextMenuItemGtk.cpp:
2174         (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk):
2175         (WebKit::WebContextMenuItemGtk::createActionIfNeeded): Create the GAction and the associated GtkAction. Ensure a
2176         unique name for the GAction, since the name now matters.
2177         * Shared/gtk/WebContextMenuItemGtk.h:
2178         (WebKit::WebContextMenuItemGtk::gtkAction):
2179         (WebKit::WebContextMenuItemGtk::gAction):
2180         (WebKit::WebContextMenuItemGtk::submenuItems): Deleted.
2181         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2182         (WebKit::contextMenuItemActivatedCallback): Use the GAction.
2183         (WebKit::WebContextMenuProxyGtk::append): Create a new GMenuItem for the GAction.
2184         (WebKit::WebContextMenuProxyGtk::buildMenu): Build a GMenu for the given items.
2185         (WebKit::WebContextMenuProxyGtk::populate): Create a GMenu and bind it ot the GtkMenu.
2186         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): Create the GActionGroup for the menu.
2187         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): Remove the action group from the GtkMenu.
2188         * UIProcess/gtk/WebContextMenuProxyGtk.h:
2189
2190 2016-09-27  Daniel Bates  <dabates@apple.com>
2191
2192         NetworkLoad and PingLoad should use private inheritance
2193         https://bugs.webkit.org/show_bug.cgi?id=162649
2194
2195         Reviewed by Alex Christensen.
2196
2197         Make NetworkLoad privately inherit from NetworkDataTaskClient and ResourceHandleClient,
2198         and make the client callbacks from these interfaces private as this class implements
2199         these interfaces.
2200
2201         Similarly, make PingLoad privately inherit from ResourceHandleClient.
2202
2203         * NetworkProcess/NetworkLoad.h:
2204         * NetworkProcess/PingLoad.h:
2205
2206 2016-09-20  Anders Carlsson  <andersca@apple.com>
2207
2208         PlatformEvent::m_modifiers should be an OptionSet
2209         https://bugs.webkit.org/show_bug.cgi?id=162326
2210
2211         Reviewed by Daniel Bates.
2212
2213         * Shared/WebEventConversion.cpp:
2214         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2215         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
2216         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
2217         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
2218
2219 2016-09-27  Dan Bernstein  <mitz@apple.com>
2220
2221         [iOS] REGRESSION (r182126): Selection highlight and handles aren’t visible with WKSelectionGranularityCharacter
2222         https://bugs.webkit.org/show_bug.cgi?id=162577
2223         <rdar://problem/28481984>
2224
2225         Reviewed by Simon Fraser.
2226
2227         * UIProcess/API/Cocoa/WKWebView.mm:
2228         (-[WKWebView _uiTextSelectionRectViews]): Added this method in the WKTesting category, which
2229           uses UIKit internals to get the views used for the selection highlight.
2230         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2231
2232         * UIProcess/ios/WKContentViewInteraction.mm:
2233         (-[WKContentView _selectionClipRect]): When selection is not confined to a form control or
2234           content-editable element, return the null rect to indicate no clipping, rather than
2235           clipping to the empty rect at the origin.
2236
2237 2016-09-27  Jer Noble  <jer.noble@apple.com>
2238
2239         Remove deprecated ENCRYPTED_MEDIA implementation.
2240         https://bugs.webkit.org/show_bug.cgi?id=161010
2241
2242         Reviewed by Eric Carlson.
2243
2244         Remove ENABLE_ENCRYPTED_MEDIA.
2245
2246         * Configurations/FeatureDefines.xcconfig:
2247
2248 2016-09-27  Chris Dumez  <cdumez@apple.com>
2249
2250         [WK2] Navigating to a Blob URL does not trigger a download
2251         https://bugs.webkit.org/show_bug.cgi?id=162574
2252
2253         Reviewed by Darin Adler.
2254
2255         Add support for converting Blob URL loads into downloads.
2256
2257         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
2258         (WebKit::BlobDownloadClient::didReceiveResponseAsync):
2259         Make sure we return a valid suggested filename because the client side (Safari)
2260         does not deal with empty suggested filenames. Use "unknown" by default to
2261         match the default suggested filename of non-Blob downloads.
2262
2263         * NetworkProcess/Downloads/Download.cpp:
2264         (WebKit::Download::startWithHandle):
2265         * NetworkProcess/Downloads/Download.h:
2266         * NetworkProcess/Downloads/DownloadManager.cpp:
2267         (WebKit::DownloadManager::convertHandleToDownload):
2268         * NetworkProcess/Downloads/DownloadManager.h:
2269         * NetworkProcess/Downloads/ios/DownloadIOS.mm:
2270         (WebKit::Download::startNetworkLoadWithHandle):
2271         * NetworkProcess/Downloads/mac/DownloadMac.mm:
2272         (WebKit::Download::startNetworkLoadWithHandle):
2273         * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
2274         (WebKit::Download::startNetworkLoadWithHandle):
2275         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2276         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
2277         * NetworkProcess/NetworkLoad.h:
2278         (WebKit::NetworkLoad::handle):
2279
2280 2016-09-27  Michael Catanzaro  <mcatanzaro@igalia.com>
2281
2282         [GTK] Unreviewed typo fix
2283
2284         * UIProcess/API/gtk/WebKitWebInspector.cpp:
2285         (webkit_web_inspector_class_init):
2286
2287 2016-09-27  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2288
2289         [GTK] Should check whether GDK can use GL before asking it to
2290         https://bugs.webkit.org/show_bug.cgi?id=162598
2291
2292         Reviewed by Michael Catanzaro.
2293
2294         gdk_cairo_draw_from_gl can fail even when WebKit itself has been able to use GL (its
2295         context creation code might be buggy, GL may have been disabled using GDK_GL=disable, …).
2296         Unfortunately it does not have any error reporting other than a warning printed to
2297         stderr, so we cannot fallback from it. We have to first check if GL can be used by GDK
2298         by trying to create a context.
2299
2300         See https://bugzilla.redhat.com/show_bug.cgi?id=1378987
2301
2302         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
2303         (WebKit::AcceleratedBackingStoreWayland::canGdkUseGL): decide whether GDK can use GL by
2304         trying to create a context for a GdkWindow.
2305         (WebKit::AcceleratedBackingStoreWayland::paint): fallback to glReadPixels if GDK cannot
2306         use GL.
2307         * UIProcess/gtk/AcceleratedBackingStoreWayland.h:
2308
2309 2016-09-26  Tim Horton  <timothy_horton@apple.com>
2310
2311         Delete some unused code from r202695
2312         https://bugs.webkit.org/show_bug.cgi?id=162595
2313         <rdar://problem/28343784>
2314
2315         Reviewed by Dan Bernstein.
2316
2317         * UIProcess/API/Cocoa/WKWebView.mm:
2318         (-[WKWebView _initializeWithConfiguration:]):
2319         (-[WKWebView _setIsBlankBeforeFirstNonEmptyLayout:]): Deleted.
2320         (-[WKWebView _didFirstVisuallyNonEmptyLayoutForMainFrame]): Deleted.
2321         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2322         * UIProcess/ios/PageClientImplIOS.mm:
2323         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
2324         We didn't end up needing this mechanism.
2325
2326 2016-09-26  Dan Bernstein  <mitz@apple.com>
2327
2328         -_webViewWebProcessDidBecomeUnresponsive: gets called when the Web process is stopped in the debugger
2329         https://bugs.webkit.org/show_bug.cgi?id=162234
2330
2331         Reviewed by Sam Weinig.
2332
2333         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
2334         (WebKit::WebProcessProxy::platformIsBeingDebugged): Use the KERN_PROC sysctl to get the
2335           process flags and check for P_TRACED.
2336
2337         * UIProcess/ResponsivenessTimer.cpp:
2338         (WebKit::ResponsivenessTimer::timerFired): Call the new client function
2339           mayBecomeUnresponsive. If it returns false, restart the timer and bail out without
2340           changing the responsiveness state.
2341
2342         * UIProcess/ResponsivenessTimer.h: Declared new client function mayBecomeUnresponsive.
2343
2344         * UIProcess/WebProcessProxy.cpp:
2345         (WebKit::WebProcessProxy::platformIsBeingDebugged): A generic implementation that always
2346           returns false.
2347         (WebKit::WebProcessProxy::mayBecomeUnresponsive): Implement this new
2348           ResponsivenessTimer::Client function to return true unless the process is being debugged.
2349         * UIProcess/WebProcessProxy.h:
2350
2351 2016-09-26  Chris Dumez  <cdumez@apple.com>
2352
2353         [WK2] BlobDownloadClient should use asynchronous IPC to decide destination path
2354         https://bugs.webkit.org/show_bug.cgi?id=162568
2355
2356         Reviewed by Alex Christensen.
2357
2358         Use DecideDestinationWithSuggestedFilenameAsync IPC to decide the destination
2359         path in the case of Blob downloads, instead of the synchronous alternative.
2360         To achieve this, BlobResourceHandle was updated in WebCore to properly support
2361         asynchronous callback and BlobDownloadClient was updated to use asynchronous
2362         callbacks. When BlobDownloadClient::didReceiveResponseAsync() is called, we
2363         now ask the WebContent process asynchronously to decide what the destination
2364         path should be. Then, when we later get the destination path back from the
2365         WebContent process, we create the file on disk and call
2366         continueDidReceiveResponse() on the BlobResourceHandle so we start getting the
2367         blob data to write.
2368
2369         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
2370         (WebKit::BlobDownloadClient::didReceiveResponseAsync):
2371         (WebKit::BlobDownloadClient::didDecideDownloadDestination):
2372         * NetworkProcess/Downloads/BlobDownloadClient.h:
2373         * NetworkProcess/Downloads/Download.cpp:
2374         (WebKit::Download::decideDestinationWithSuggestedFilenameAsync):
2375         (WebKit::Download::didDecideDownloadDestination):
2376         (WebKit::Download::continueDidReceiveResponse):
2377         (WebKit::Download::decideDestinationWithSuggestedFilename): Deleted.
2378         * NetworkProcess/Downloads/Download.h:
2379         * NetworkProcess/Downloads/DownloadManager.cpp:
2380         (WebKit::DownloadManager::willDecidePendingDownloadDestination):
2381         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
2382         (WebKit::DownloadManager::convertHandleToDownload): Deleted.
2383         * NetworkProcess/Downloads/DownloadManager.h:
2384         * NetworkProcess/NetworkLoad.cpp:
2385         (WebKit::NetworkLoad::continueDidReceiveResponse):
2386         * NetworkProcess/NetworkProcess.cpp:
2387         (WebKit::NetworkProcess::continueDecidePendingDownloadDestination):
2388         * NetworkProcess/NetworkProcess.h:
2389         * NetworkProcess/NetworkProcess.messages.in:
2390         * UIProcess/Downloads/DownloadProxy.cpp:
2391         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync): Deleted.
2392         * UIProcess/Downloads/DownloadProxy.h:
2393         * UIProcess/Downloads/DownloadProxy.messages.in:
2394
2395 2016-09-26  Daniel Bates  <dabates@apple.com>
2396
2397         Mark Ping{Handle, Load} as final
2398         https://bugs.webkit.org/show_bug.cgi?id=162576
2399
2400         Reviewed by Alex Christensen.
2401
2402         We should not support subclassing of a ping handle or overriding its NetworkDataTaskClient
2403         callbacks because there are security/privacy implications with a ping request. We should
2404         not encourage subclassing without careful consideration.
2405
2406         * NetworkProcess/PingLoad.h:
2407
2408 2016-09-26  Daniel Bates  <dabates@apple.com>
2409
2410         Rename IOS_TEXT_AUTOSIZING to TEXT_AUTOSIZING
2411         https://bugs.webkit.org/show_bug.cgi?id=162365
2412
2413         Reviewed by Simon Fraser.
2414
2415         * Configurations/FeatureDefines.xcconfig:
2416         * WebProcess/WebPage/WebPage.cpp:
2417         (WebKit::WebPage::updatePreferences):
2418
2419 2016-09-26  Michael Catanzaro  <mcatanzaro@igalia.com>
2420
2421         Fix -Wformat warnings in WebLoaderStrategy
2422         https://bugs.webkit.org/show_bug.cgi?id=162553
2423
2424         Reviewed by Alex Christensen.
2425
2426         Consistently use PRIu64 to print uint64_t
2427
2428         * NetworkProcess/Downloads/Download.cpp:
2429         (WebKit::Download::didReceiveResponse):
2430         (WebKit::Download::didReceiveData):
2431         (WebKit::Download::didFinish):
2432         (WebKit::Download::didFail):
2433         (WebKit::Download::didCancel):
2434         * NetworkProcess/NetworkResourceLoader.cpp:
2435         (WebKit::NetworkResourceLoader::start):
2436         (WebKit::NetworkResourceLoader::startNetworkLoad):
2437         (WebKit::NetworkResourceLoader::setDefersLoading):
2438         (WebKit::NetworkResourceLoader::abort):
2439         (WebKit::NetworkResourceLoader::didReceiveBuffer):
2440         (WebKit::NetworkResourceLoader::didFinishLoading):
2441         (WebKit::NetworkResourceLoader::didFailLoading):
2442         (WebKit::NetworkResourceLoader::continueWillSendRequest):
2443         * WebProcess/Network/WebLoaderStrategy.cpp:
2444         (WebKit::WebLoaderStrategy::scheduleLoad):
2445         * WebProcess/Network/WebResourceLoader.cpp:
2446         (WebKit::WebResourceLoader::willSendRequest):
2447         (WebKit::WebResourceLoader::didReceiveResponse):
2448         (WebKit::WebResourceLoader::didReceiveData):
2449         (WebKit::WebResourceLoader::didFinishResourceLoad):
2450         (WebKit::WebResourceLoader::didFailResourceLoad):
2451         (WebKit::WebResourceLoader::didReceiveResource):
2452
2453 == Rolled over to ChangeLog-2016-09-26 ==