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