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