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