[Mac][WK2] Expand sandbox to support access to audio component registrar
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2017-03-07  Brent Fulgham  <bfulgham@apple.com>
2
3         [Mac][WK2] Expand sandbox to support access to audio component registrar
4         https://bugs.webkit.org/show_bug.cgi?id=169283
5         <rdar://problem/30793512>
6
7         Reviewed by Alexey Proskuryakov.
8
9         * WebProcess/com.apple.WebProcess.sb.in:
10
11 2017-03-07  Chris Dumez  <cdumez@apple.com>
12
13         Port DOMTimer from std::chrono::milliseconds to WTF::Seconds type
14         https://bugs.webkit.org/show_bug.cgi?id=169236
15
16         Reviewed by Simon Fraser.
17
18         * UIProcess/WebProcessPool.cpp:
19         (WebKit::WebProcessPool::updateHiddenPageThrottlingAutoIncreaseLimit):
20         * WebProcess/WebPage/WebPage.h:
21         (WebKit::WebPage::setHiddenPageDOMTimerThrottlingIncreaseLimit):
22         * WebProcess/WebProcess.cpp:
23         (WebKit::WebProcess::setHiddenPageDOMTimerThrottlingIncreaseLimit):
24         * WebProcess/WebProcess.h:
25         * WebProcess/WebProcess.messages.in:
26
27 2017-03-06  Aakash Jain  <aakash_jain@apple.com>
28
29         Enable SUPPORTS_TEXT_BASED_API in WebKit2 for iOS
30         https://bugs.webkit.org/show_bug.cgi?id=169233
31
32         Reviewed by Alexey Proskuryakov.
33
34         * Configurations/Base.xcconfig: Enable SUPPORTS_TEXT_BASED_API.
35         * Configurations/WebKit.xcconfig: Pass information to TAPI about reexporting WebKitLegacy and few extra headers.
36         * WebKit2.xcodeproj/project.pbxproj: Run scripts which are run for installhdrs phase for installapi phase as well.
37
38 2017-03-06  Dan Bernstein  <mitz@apple.com>
39
40         [Cocoa] Expose API::InjectedBundle::EditorClient::didChange via the Objective-C bundle SPI
41         https://bugs.webkit.org/show_bug.cgi?id=169223
42
43         Reviewed by Tim Horton.
44
45         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h: Declared new
46           delegate method -_webProcessPlugInBrowserContextControllerDidChangeByEditing:.
47         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
48         (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Added an override
49           of API::InjectedBundle::EditorClient::didChange that calls the new delegate method.
50
51 2017-03-06  Michael Saboff  <msaboff@apple.com>
52
53         Unreviewed build fix after r213492.
54
55         * Configurations/Base.xcconfig:
56
57 2017-03-06  Aakash Jain  <aakash_jain@apple.com>
58
59         Add WK_CLASS_AVAILABLE to _WKLinkIconParameters and _WKWebViewPrintFormatter
60         https://bugs.webkit.org/show_bug.cgi?id=169225
61
62         Reviewed by Tim Horton.
63
64         * UIProcess/API/Cocoa/_WKLinkIconParameters.h:
65         * UIProcess/_WKWebViewPrintFormatter.h:
66
67 2017-03-06  Michael Saboff  <msaboff@apple.com>
68
69         Unreviewed build fix after r213483.
70
71         * Configurations/Base.xcconfig:
72
73 2017-03-06  Brent Fulgham  <bfulgham@apple.com>
74
75         [Mac][WK2] Support new CoreMedia routing features
76         https://bugs.webkit.org/show_bug.cgi?id=169241
77         <rdar://problem/30077969>
78
79         Reviewed by Alexey Proskuryakov.
80
81         * WebProcess/com.apple.WebProcess.sb.in:
82
83 2017-03-06  Michael Saboff  <msaboff@apple.com>
84
85         Take advantage of fast permissions switching of JIT memory for devices that support it
86         https://bugs.webkit.org/show_bug.cgi?id=169155
87
88         Reviewed by Saam Barati.
89
90         Updated the Xcode config files to match what is in the JavaScriptCore ones.
91
92         * Configurations/FeatureDefines.xcconfig:
93
94 2017-03-06  Aakash Jain  <aakash_jain@apple.com>
95
96         Make WKMenuItemIdentifiersPrivate.h private header
97         https://bugs.webkit.org/show_bug.cgi?id=168981
98
99         Reviewed by Tim Horton.
100
101         * WebKit2.xcodeproj/project.pbxproj: Made WKMenuItemIdentifiersPrivate.h private.
102
103 2017-03-06  Alexey Proskuryakov  <ap@apple.com>
104
105         Replace -sub_umbrella linker flag with a build setting
106         https://bugs.webkit.org/show_bug.cgi?id=169146
107
108         Reviewed by Tim Horton.
109
110         * Configurations/WebKit.xcconfig:
111
112 2017-03-03  Matt Rajca  <mrajca@apple.com>
113
114         Media: notify clients when the user never plays a media element that was prevented from auto-playing
115         https://bugs.webkit.org/show_bug.cgi?id=169150
116
117         Reviewed by Alex Christensen.
118
119         * UIProcess/API/C/WKPageUIClient.h:
120
121 2017-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
122
123         Expand font-weight and font-stretch to take any number
124         https://bugs.webkit.org/show_bug.cgi?id=168889
125
126         Reviewed by Simon Fraser.
127
128         Migrate off old enum types.
129
130         * WebProcess/WebPage/WebPage.cpp:
131         (WebKit::WebPage::editorState):
132
133 2017-03-06  Andreas Kling  <akling@apple.com>
134
135         [iOS] Report domains crashing under memory pressure via enhanced privacy logging.
136         <https://webkit.org/b/169133>
137         <rdar://problem/29964017>
138
139         Reviewed by Antti Koivisto.
140
141         Notify the UI process when the memory pressure status changes.
142         If a web process crashes while under memory pressure, log the domain of the last open page
143         using enhanced privacy logging.
144
145         * UIProcess/WebPageProxy.cpp:
146         (WebKit::WebPageProxy::processDidCrash):
147         * UIProcess/WebProcessProxy.h:
148         (WebKit::WebProcessProxy::memoryPressureStatusChanged):
149         (WebKit::WebProcessProxy::isUnderMemoryPressure):
150         * UIProcess/WebProcessProxy.messages.in:
151         * WebProcess/WebProcess.cpp:
152         (WebKit::WebProcess::initializeWebProcess):
153
154 2017-03-05  Brady Eidson  <beidson@apple.com>
155
156         Remove new files accidentally added in r213441
157
158         Unreviewed.
159
160         * UIProcess/WebLoadingProviderProxy.cpp: Removed.
161         * UIProcess/WebLoadingProviderProxy.h: Removed.
162         * UIProcess/WebLoadingProviderProxy.messages.in: Removed.
163
164 2017-03-05  Brady Eidson  <beidson@apple.com>
165
166         Rename CustomProtocolFoo to LegacyCustomProtocolFoo.
167         https://bugs.webkit.org/show_bug.cgi?id=169188
168
169         Reviewed by Andy Estes.
170
171         * CMakeLists.txt:
172         * DerivedSources.make:
173
174         * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm.
175         (+[WKCustomProtocol canInitWithRequest:]):
176         (+[WKCustomProtocol canonicalRequestForRequest:]):
177         (+[WKCustomProtocol requestIsCacheEquivalent:toRequest:]):
178         (-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
179         (-[WKCustomProtocol initializationRunLoop]):
180         (-[WKCustomProtocol startLoading]):
181         (-[WKCustomProtocol stopLoading]):
182         (WebKit::LegacyCustomProtocolManager::registerProtocolClass):
183         (WebKit::LegacyCustomProtocolManager::registerScheme):
184         (WebKit::LegacyCustomProtocolManager::unregisterScheme):
185         (WebKit::LegacyCustomProtocolManager::supportsScheme):
186         (WebKit::dispatchOnInitializationRunLoop):
187         (WebKit::LegacyCustomProtocolManager::didFailWithError):
188         (WebKit::LegacyCustomProtocolManager::didLoadData):
189         (WebKit::LegacyCustomProtocolManager::didReceiveResponse):
190         (WebKit::LegacyCustomProtocolManager::didFinishLoading):
191         (WebKit::LegacyCustomProtocolManager::wasRedirectedToRequest):
192         (WebKit::LegacyCustomProtocolManager::protocolForID):
193
194         * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.cpp.
195         (WebKit::generateCustomProtocolID):
196         (WebKit::LegacyCustomProtocolManager::supplementName):
197         (WebKit::LegacyCustomProtocolManager::LegacyCustomProtocolManager):
198         (WebKit::LegacyCustomProtocolManager::initialize):
199         (WebKit::LegacyCustomProtocolManager::addCustomProtocol):
200         (WebKit::LegacyCustomProtocolManager::removeCustomProtocol):
201         (WebKit::LegacyCustomProtocolManager::startLoading):
202         (WebKit::LegacyCustomProtocolManager::stopLoading):
203         * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h.
204         * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in.
205
206         * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp.
207         (WebKit::CustomProtocolManager::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
208         (WebKit::CustomProtocolManager::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
209         (WebKit::CustomProtocolManager::registerProtocolClass):
210         (WebKit::CustomProtocolManager::registerScheme):
211         (WebKit::CustomProtocolManager::unregisterScheme):
212         (WebKit::CustomProtocolManager::supportsScheme):
213         (WebKit::CustomProtocolManager::didFailWithError):
214         (WebKit::CustomProtocolManager::didLoadData):
215         (WebKit::CustomProtocolManager::didReceiveResponse):
216         (WebKit::CustomProtocolManager::didFinishLoading):
217         (WebKit::CustomProtocolManager::wasRedirectedToRequest):
218
219         * NetworkProcess/NetworkProcess.cpp:
220         (WebKit::NetworkProcess::NetworkProcess):
221
222         * NetworkProcess/NetworkSession.cpp:
223         (WebKit::NetworkSession::create):
224         * NetworkProcess/NetworkSession.h:
225
226         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
227         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
228         (WebKit::globalLegacyCustomProtocolManager):
229         (WebKit::NetworkSessionCocoa::setLegacyCustomProtocolManager):
230         (WebKit::NetworkSessionCocoa::create):
231         (WebKit::NetworkSessionCocoa::defaultSession):
232         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
233         (WebKit::globalCustomProtocolManager): Deleted.
234         (WebKit::NetworkSessionCocoa::setCustomProtocolManager): Deleted.
235
236         * NetworkProcess/mac/RemoteNetworkingContext.mm:
237         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
238
239         * UIProcess/API/APICustomProtocolManagerClient.h:
240         (API::LegacyCustomProtocolManagerClient::~LegacyCustomProtocolManagerClient):
241         (API::LegacyCustomProtocolManagerClient::startLoading):
242         (API::LegacyCustomProtocolManagerClient::stopLoading):
243         (API::LegacyCustomProtocolManagerClient::invalidate):
244         (API::CustomProtocolManagerClient::~CustomProtocolManagerClient): Deleted.
245         (API::CustomProtocolManagerClient::startLoading): Deleted.
246         (API::CustomProtocolManagerClient::stopLoading): Deleted.
247         (API::CustomProtocolManagerClient::invalidate): Deleted.
248
249         * UIProcess/Cocoa/LegacyCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.h.
250         * UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm: Renamed from Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.mm.
251         (-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
252         (-[WKCustomProtocolLoader dealloc]):
253         (-[WKCustomProtocolLoader customProtocolManagerProxyDestroyed]):
254         (-[WKCustomProtocolLoader connection:didFailWithError:]):
255         (-[WKCustomProtocolLoader connection:willCacheResponse:]):
256         (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
257         (-[WKCustomProtocolLoader connection:didReceiveData:]):
258         (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
259         (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
260         (WebKit::LegacyCustomProtocolManagerClient::startLoading):
261         (WebKit::LegacyCustomProtocolManagerClient::stopLoading):
262         (WebKit::LegacyCustomProtocolManagerClient::invalidate):
263
264         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
265         (WebKit::WebProcessPool::platformInitialize):
266
267         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Removed.
268         * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp: Added.
269         (WebKit::LegacyCustomProtocolManagerProxy::LegacyCustomProtocolManagerProxy):
270         (WebKit::LegacyCustomProtocolManagerProxy::~LegacyCustomProtocolManagerProxy):
271         (WebKit::LegacyCustomProtocolManagerProxy::startLoading):
272         (WebKit::LegacyCustomProtocolManagerProxy::stopLoading):
273         (WebKit::LegacyCustomProtocolManagerProxy::processDidClose):
274         (WebKit::LegacyCustomProtocolManagerProxy::wasRedirectedToRequest):
275         (WebKit::LegacyCustomProtocolManagerProxy::didReceiveResponse):
276         (WebKit::LegacyCustomProtocolManagerProxy::didLoadData):
277         (WebKit::LegacyCustomProtocolManagerProxy::didFailWithError):
278         (WebKit::LegacyCustomProtocolManagerProxy::didFinishLoading):
279         * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: Renamed from Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h.
280         * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in: Renamed from Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in.
281
282         * UIProcess/Network/NetworkProcessProxy.cpp:
283         * UIProcess/Network/NetworkProcessProxy.h:
284
285         * UIProcess/WebProcessPool.cpp:
286         (WebKit::WebProcessPool::WebProcessPool):
287         (WebKit::WebProcessPool::setLegacyCustomProtocolManagerClient):
288         (WebKit::WebProcessPool::registerSchemeForCustomProtocol):
289         (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol):
290         (WebKit::WebProcessPool::setCustomProtocolManagerClient): Deleted.
291         * UIProcess/WebProcessPool.h:
292
293         * WebKit2.xcodeproj/project.pbxproj:
294
295         * WebProcess/cocoa/WebProcessCocoa.mm:
296
297 2017-03-04  Eric Carlson  <eric.carlson@apple.com>
298
299         [iOS] The web process should inherit application state from UI process
300         https://bugs.webkit.org/show_bug.cgi?id=169156
301         <rdar://problem/30845473>
302
303         Reviewed by Alexey Proskuryakov.
304
305         * Platform/spi/ios/CelestialSPI.h: Added.
306
307         * WebKit2.xcodeproj/project.pbxproj: Include CelestialSPI.h.
308
309         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: Add entitlement.
310
311         * WebProcess/WebPage/ios/WebPageIOS.mm:
312         (WebKit::WebPage::platformInitialize): Set up PID proxying.
313
314 2017-03-04  Aakash Jain  <aakash_jain@apple.com>
315
316         Add symbols required by TAPI from Shared/API/Cocoa/WebKit.m in a header file
317         https://bugs.webkit.org/show_bug.cgi?id=169162
318
319         Reviewed by Alexey Proskuryakov.
320
321         The symbols from binary and headers should match precisely, otherwise TAPI would
322         complain. There are few symbols which are not actually needed in header file, but
323         we still need to add them in a header file to make TAPI happy.
324
325         * Platform/ExtraPublicSymbolsForTAPI.h: Added.
326         * WebKit2.xcodeproj/project.pbxproj: Added ExtraPublicSymbolsForTAPI.h
327
328 2017-03-04  Aakash Jain  <aakash_jain@apple.com>
329
330         Add symbols required by TAPI in a header file
331         https://bugs.webkit.org/show_bug.cgi?id=169113
332         <rdar://problem/30772033>
333
334         Reviewed by Alexey Proskuryakov.
335
336         The symbols from binary and headers should match precisely, otherwise TAPI would
337         complain. There are few symbols which are not actually needed in header file, but
338         we still need to add them in a header file to make TAPI happy.
339
340         * Platform/ExtraPrivateSymbolsForTAPI.h: Added.
341         * WebKit2.xcodeproj/project.pbxproj: Added Platform/ExtraPrivateSymbolsForTAPI.h
342
343 2017-03-04  Joseph Pecoraro  <pecoraro@apple.com>
344
345         Remove duplicate initialization guard in WebKit2 logging initialization
346         https://bugs.webkit.org/show_bug.cgi?id=169164
347
348         Reviewed by Dan Bernstein.
349
350         * Platform/Logging.cpp:
351         (WebKit::initializeLogChannelsIfNecessary):
352
353 2017-03-03  Youenn Fablet  <youenn@apple.com>
354
355         [WebRTC] Update libwebrtc source code
356         https://bugs.webkit.org/show_bug.cgi?id=168599
357
358         Reviewed by Alex Christensen.
359
360         * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
361
362 2017-03-03  Dean Jackson  <dino@apple.com>
363
364         Add WebGPU compile flag and experimental feature flag
365         https://bugs.webkit.org/show_bug.cgi?id=169161
366         <rdar://problem/30846689>
367
368         Reviewed by Tim Horton.
369
370         Add ENABLE_WEBGPU, an experimental feature flag, a RuntimeEnabledFeature,
371         and an InternalSetting.
372
373         * Configurations/FeatureDefines.xcconfig:
374         * Shared/WebPreferencesDefinitions.h:
375         * WebProcess/InjectedBundle/InjectedBundle.cpp:
376         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
377         * WebProcess/WebPage/WebPage.cpp:
378         (WebKit::WebPage::updatePreferences):
379
380 2017-03-03  Dean Jackson  <dino@apple.com>
381
382         Move Input Events and Gamepad from experimental features into main preferences
383         https://bugs.webkit.org/show_bug.cgi?id=169157
384         <rdar://problems/30845587>
385
386         Reviewed by Myles C. Maxfield.
387
388         These are no longer experimental on trunk.
389
390         * Shared/WebPreferencesDefinitions.h:
391
392 2017-03-03  Brent Fulgham  <bfulgham@apple.com>
393
394         [MediaStream iOS] REGRESSION(r212883): Missing function definition breaks sandbox
395         https://bugs.webkit.org/show_bug.cgi?id=169148
396         <rdar://problem/30825728>
397
398         Reviewed by Alex Christensen.
399
400         The changes in r212883 added a call to 'shared-preferences-read', which is not defined
401         for iOS. In fact, it's not needed since 'user-preference-read' does everything we need on iOS.
402         Switch to the correct preference rule.
403
404         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add missing function
405
406 2017-03-03  Aakash Jain  <aakash_jain@apple.com>
407
408         Move declaration of _WKSetCrashReportApplicationSpecificInformation to header file
409         https://bugs.webkit.org/show_bug.cgi?id=169043
410
411         Reviewed by Alex Christensen.
412
413         * WebKit2.xcodeproj/project.pbxproj: Added WebProcessCocoa.h
414         * WebProcess/cocoa/WebProcessCocoa.h: Added.
415         * WebProcess/cocoa/WebProcessCocoa.mm: Imported WebProcessCocoa.h
416         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm: Ditto.
417
418 2017-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>
419
420         [GTK] Ensure WebKitWebView always have a user content manager
421         https://bugs.webkit.org/show_bug.cgi?id=169130
422
423         Reviewed by Michael Catanzaro.
424
425         User content manager is a construct only property, so if not set by the user the web view doesn't have any. We
426         can create a default one, like we do for settings, when user didn't provide one.
427
428         * UIProcess/API/gtk/WebKitWebView.cpp:
429         (webkitWebViewConstructed):
430
431 2017-03-02  Sam Weinig  <sam@webkit.org>
432
433         Rename htmlediting.h/cpp to Editing.h/cpp
434         https://bugs.webkit.org/show_bug.cgi?id=169103
435
436         Reviewed by Alex Christensen.
437
438         * WebProcess/WebPage/WebPage.cpp:
439         * WebProcess/WebPage/ios/WebPageIOS.mm:
440         * WebProcess/WebPage/mac/WebPageMac.mm:
441
442 2017-03-02  Joseph Pecoraro  <pecoraro@apple.com>
443
444         [Mac] Set the NSURLSessionTask priority to match the request's priority
445         https://bugs.webkit.org/show_bug.cgi?id=169115
446         <rdar://problem/28881392>
447
448         Reviewed by Alex Christensen.
449
450         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
451         (WebKit::toNSURLSessionTaskPriority):
452         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
453         Set the priority on the task based on the ResourceRequest's priority.
454         This is used for HTTP/2 request prioritization.
455
456 2017-03-02  Mark Lam  <mark.lam@apple.com>
457
458         Add WebKit2 hooks to notify the VM that the user has requested a debugger break.
459         https://bugs.webkit.org/show_bug.cgi?id=169089
460
461         Reviewed by Tim Horton and Joseph Pecoraro.
462
463         * CMakeLists.txt:
464         * DerivedSources.make:
465         * UIProcess/WebInspectorProxy.cpp:
466         (WebKit::WebInspectorProxy::connect):
467         * WebKit2.xcodeproj/project.pbxproj:
468         * WebProcess/WebPage/WebInspectorInterruptDispatcher.cpp: Added.
469         (WebKit::WebInspectorInterruptDispatcher::create):
470         (WebKit::WebInspectorInterruptDispatcher::WebInspectorInterruptDispatcher):
471         (WebKit::WebInspectorInterruptDispatcher::~WebInspectorInterruptDispatcher):
472         (WebKit::WebInspectorInterruptDispatcher::initializeConnection):
473         (WebKit::WebInspectorInterruptDispatcher::notifyNeedDebuggerBreak):
474         * WebProcess/WebPage/WebInspectorInterruptDispatcher.h: Added.
475         * WebProcess/WebPage/WebInspectorInterruptDispatcher.messages.in: Added.
476         * WebProcess/WebProcess.cpp:
477         (WebKit::WebProcess::WebProcess):
478         (WebKit::WebProcess::initializeConnection):
479         * WebProcess/WebProcess.h:
480
481 2017-03-02  Brady Eidson  <beidson@apple.com>
482
483         Update WKWebsiteDatastoreConfiguration SPI.
484         https://bugs.webkit.org/show_bug.cgi?id=169102
485
486         Reviewed by Tim Horton.
487         
488         Make these strings URLs, and throw exceptions if you try to use non-file URLs.
489
490         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
491         (-[WKWebsiteDataStore _initWithConfiguration:]):
492
493         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
494         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
495         (checkURLArgument):
496         (-[_WKWebsiteDataStoreConfiguration _webStorageDirectory]):
497         (-[_WKWebsiteDataStoreConfiguration _setWebStorageDirectory:]):
498         (-[_WKWebsiteDataStoreConfiguration _indexedDBDatabaseDirectory]):
499         (-[_WKWebsiteDataStoreConfiguration _setIndexedDBDatabaseDirectory:]):
500         (-[_WKWebsiteDataStoreConfiguration _webSQLDatabaseDirectory]):
501         (-[_WKWebsiteDataStoreConfiguration _setWebSQLDatabaseDirectory:]):
502
503 2017-03-02  Youenn Fablet  <youenn@apple.com>
504
505         Move part of NetworkRTCProvider::close implementation in NetworkRTCProvider destructor
506         https://bugs.webkit.org/show_bug.cgi?id=169104
507
508         Reviewed by Alex Christensen.
509
510         Improving NetworkRTCProvider clean-up by moving some member field cleaning to the destructor.
511         The remaining cleaning is still kept in NetworkRTCProvider::close as we need to go to the rtc network thread and
512         for that, we take a ref of NetworkRTCProvider.
513         Stopping any resolver before freeing them.
514
515         * NetworkProcess/webrtc/NetworkRTCMonitor.h:
516         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
517         (WebKit::NetworkRTCProvider::~NetworkRTCProvider):
518         (WebKit::NetworkRTCProvider::close):
519         * NetworkProcess/webrtc/NetworkRTCProvider.h:
520
521 2017-03-02  Youenn Fablet  <youenn@apple.com>
522
523         [iOS] Replicate NetworkProcess Mac sandboxing in iOS to allow TCP/UDP
524         https://bugs.webkit.org/show_bug.cgi?id=169105
525
526         Reviewed by Alex Christensen.
527
528         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Adding sandbox extension support for TCP/UDP networking.
529
530 2017-03-02  Aakash Jain  <aakash_jain@apple.com>
531
532         Move stringMatchesWildcardString from WebKit2 to WebCore
533         https://bugs.webkit.org/show_bug.cgi?id=169065
534
535         Reviewed by Alexey Proskuryakov.
536
537         * Platform/mac/StringUtilities.h: Moved stringMatchesWildcardString to WebCore.
538         * WebKit2.xcodeproj/project.pbxproj: Make StringUtilities.h a project header.
539         * Platform/mac/StringUtilities.mm:
540         (WebKit::wildcardRegexPatternString): Moved to WebCore.
541         (WebKit::stringMatchesWildcardString): Ditto.
542         * WebProcess/Plugins/WebPluginInfoProvider.cpp: Using stringMatchesWildcardString from WebCore.
543
544 2017-03-02  Aakash Jain  <aakash_jain@apple.com>
545
546         IsSmartPtr<WKRetainPtr<T>>::value should not be exported
547         https://bugs.webkit.org/show_bug.cgi?id=169047
548
549         Reviewed by Alexey Proskuryakov.
550
551         * UIProcess/API/cpp/WKRetainPtr.h:
552
553 2017-03-02  Youenn Fablet  <youenn@apple.com>
554
555         Activate some new webrtc tests
556         https://bugs.webkit.org/show_bug.cgi?id=168850
557
558         Reviewed by Alex Christensen.
559
560         * Shared/WebPreferencesDefinitions.h: Activating peer connection by default when libwebrtc is on.
561         This allows ensuring the network process will have its sandbox extension.
562
563 2017-03-02  Brian Burg  <bburg@apple.com>
564
565         Web Automation: _WKAutomationSessionDelegate should work with WKWebViews
566         https://bugs.webkit.org/show_bug.cgi?id=169091
567         <rdar://problem/30810538>
568
569         Reviewed by Tim Horton.
570
571         As a first step towards fixing the mistake of using WKPageRef in an Objective-C SPI,
572         add the correct delegate methods that take WKWebView so that Objective-C clients can
573         use this functionality.
574
575         In a future patch, we'll remove the WKPageRef delegate methods when they are no longer
576         being used by clients. Clients should switch to using WKWebView, or wait for a C SPI
577         with equivalent functionality (something like WKAutomationSessionClient) to be ported.
578
579         While I'm fixing this mess, make API::AutomationSessionClient use references instead
580         of pointers. We null-check all WebPageProxy parameters before calling its methods.
581
582         * UIProcess/API/APIAutomationSessionClient.h:
583         (API::AutomationSessionClient::didDisconnectFromRemote):
584         (API::AutomationSessionClient::didRequestNewWindow):
585         (API::AutomationSessionClient::isShowingJavaScriptDialogOnPage):
586         (API::AutomationSessionClient::dismissCurrentJavaScriptDialogOnPage):
587         (API::AutomationSessionClient::acceptCurrentJavaScriptDialogOnPage):
588         (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage):
589         (API::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage):
590         Change pointer to reference.
591
592         * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
593         Add duplicate delegate methods that take/return WKWebView instead of WKPageRef.
594         Adjust the delegate method names to reflect parameter type and avoid conflicts with the
595         WKPageRef-using methods that we need to remove eventually.
596
597         * UIProcess/Automation/WebAutomationSession.cpp:
598         (WebKit::WebAutomationSession::terminate):
599         (WebKit::WebAutomationSession::createBrowsingContext):
600         (WebKit::WebAutomationSession::isShowingJavaScriptDialog):
601         (WebKit::WebAutomationSession::dismissCurrentJavaScriptDialog):
602         (WebKit::WebAutomationSession::acceptCurrentJavaScriptDialog):
603         (WebKit::WebAutomationSession::messageOfCurrentJavaScriptDialog):
604         (WebKit::WebAutomationSession::setUserInputForCurrentJavaScriptPrompt):
605         Dereference `this` and `webPageProxy` when calling API::AutomationSessionClient methods.
606
607         * UIProcess/Cocoa/AutomationSessionClient.h:
608         * UIProcess/Cocoa/AutomationSessionClient.mm:
609         (WebKit::AutomationSessionClient::AutomationSessionClient):
610         (WebKit::AutomationSessionClient::didDisconnectFromRemote):
611         (WebKit::AutomationSessionClient::didRequestNewWindow):
612         (WebKit::AutomationSessionClient::isShowingJavaScriptDialogOnPage):
613         (WebKit::AutomationSessionClient::dismissCurrentJavaScriptDialogOnPage):
614         (WebKit::AutomationSessionClient::acceptCurrentJavaScriptDialogOnPage):
615         (WebKit::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage):
616         (WebKit::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage):
617         Now there are two possible delegate methods for most of these, so try to use the
618         WKWebView-based delegate method first and fall back to the WKPageRef delegate method.
619
620 2017-03-02  Alex Christensen  <achristensen@webkit.org>
621
622         Continue enabling WebRTC
623         https://bugs.webkit.org/show_bug.cgi?id=169056
624
625         Reviewed by Jon Lee.
626
627         * Configurations/FeatureDefines.xcconfig:
628
629 2017-03-01  Megan Gardner  <megan_gardner@apple.com>
630
631         Data interaction support for WK1
632         https://bugs.webkit.org/show_bug.cgi?id=169062
633
634         Reviewed by Wenson Hsieh.
635
636         Allow for separate additions files in WK1 and WK2
637
638         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
639
640 2017-03-02  Youenn Fablet  <youenn@apple.com>
641
642         [WebRTC] Activate ICE candidate privacy policy
643         https://bugs.webkit.org/show_bug.cgi?id=168975
644
645         Reviewed by Alex Christensen.
646
647         Disabling network enumeration by default.
648         Enabling ICE candidate filtering by default.
649         Chaning ICE candidate filtering according userMediaAccess policy:
650         - If access is denied, filtering is on.
651         - If access is granted, filtering is off.
652
653         * Shared/WebPageCreationParameters.cpp:
654         (WebKit::WebPageCreationParameters::encode):
655         (WebKit::WebPageCreationParameters::decode):
656         * Shared/WebPageCreationParameters.h:
657         * Shared/WebPreferencesDefinitions.h:
658         * UIProcess/API/C/WKPreferences.cpp:
659         (WKPreferencesSetICECandidateFilteringEnabled):
660         (WKPreferencesGetICECandidateFilteringEnabled):
661         (WKPreferencesSetEnumeratingAllNetworkInterfacesEnabled):
662         (WKPreferencesGetEnumeratingAllNetworkInterfacesEnabled):
663         * UIProcess/API/C/WKPreferencesRefPrivate.h:
664         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
665         (WebKit::toWebCore):
666         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
667         * UIProcess/UserMediaProcessManager.cpp:
668         (WebKit::UserMediaProcessManager::willCreateMediaStream):
669         (WebKit::UserMediaProcessManager::endedCaptureSession):
670         * UIProcess/WebPageProxy.cpp:
671         (WebKit::WebPageProxy::creationParameters):
672         * WebProcess/WebPage/WebPage.cpp:
673
674 2017-03-02  Tomas Popela  <tpopela@redhat.com>
675
676         [WK2] Keyboard menu key should show context menu
677         https://bugs.webkit.org/show_bug.cgi?id=72099
678
679         Reviewed by Carlos Garcia Campos.
680
681         Show the context menu when the GtkWidget::popup-menu signal is
682         emitted. This signal is triggered by pressing a key (usually
683         the Menu key or the Shift + F10 shortcut) or it could be emitted on
684         WebKitWebView.
685
686         * UIProcess/API/gtk/WebKitWebView.cpp:
687         (webkit_web_view_class_init):
688         (webkit_web_view_class_init): Update the documentation for the
689         context-menu signal
690         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
691         (webkitWebViewBasePopupMenu): Connect to the popup-menu signal and
692         save the event that was used to trigger the signal. If there is no
693         such event create a new GdkEvent with GDK_NOTHING type.
694         (webkitWebViewBasePopupMenu):
695         (webkit_web_view_base_class_init):
696         * UIProcess/WebPageProxy.cpp:
697         (WebKit::WebPageProxy::handleContextMenuKeyEvent):
698         * UIProcess/WebPageProxy.h:
699         * WebProcess/WebPage/WebPage.cpp:
700         (WebKit::WebPage::contextMenuForKeyEvent):
701         * WebProcess/WebPage/WebPage.h:
702         * WebProcess/WebPage/WebPage.messages.in:
703
704 2017-03-01  Wenson Hsieh  <wenson_hsieh@apple.com>
705
706         Replace -[WKWebView adjustedDataInteractionItemProviders:] with a UI delegate method
707         https://bugs.webkit.org/show_bug.cgi?id=169013
708
709         Reviewed by Dan Bernstein.
710
711         Rather than introduce new SPI on WKWebView directly, we should follow convention and add the hook to the private
712         version of the UI delegate.
713
714         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
715         * UIProcess/API/Cocoa/WKWebView.mm:
716         (-[WKWebView _adjustedDataInteractionItemProviders:]): Deleted.
717         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
718
719 2017-03-01  Alex Christensen  <achristensen@webkit.org>
720
721         Unreviewed, rolling out r213259.
722
723         Broke an internal build
724
725         Reverted changeset:
726
727         "Continue enabling WebRTC"
728         https://bugs.webkit.org/show_bug.cgi?id=169056
729         http://trac.webkit.org/changeset/213259
730
731 2017-03-01  Alex Christensen  <achristensen@webkit.org>
732
733         Continue enabling WebRTC
734         https://bugs.webkit.org/show_bug.cgi?id=169056
735
736         Reviewed by Jon Lee.
737
738         * Configurations/FeatureDefines.xcconfig:
739
740 2017-03-01  Chris Dumez  <cdumez@apple.com>
741
742         [WK2][!NETWORK_SESSION] Failure to download when using a download attribute with no value on an anchor
743         https://bugs.webkit.org/show_bug.cgi?id=169060
744         <rdar://problem/30773140>
745
746         Reviewed by Darin Adler.
747
748         In the !NETWORK_SESSION code path, we were failing to use the suggested filename coming from the
749         network layer in the case where the download attribute is present but has no value. We were ending
750         up passing an empty string as suggested filename to Safari which is not handled properly.
751
752         * UIProcess/Downloads/DownloadProxy.cpp:
753         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
754
755 2017-02-28  Matt Rajca  <mrajca@apple.com>
756
757         Media: notify clients when autoplayed media is muted
758         https://bugs.webkit.org/show_bug.cgi?id=168987
759
760         Reviewed by Alex Christensen.
761
762         * UIProcess/API/C/WKPageUIClient.h:
763
764 2017-03-01  Brady Eidson  <beidson@apple.com>
765
766         Add SPI to create WebsiteDataStore objects pointing to custom paths.
767         https://bugs.webkit.org/show_bug.cgi?id=169044
768
769         Reviewed by Tim Horton.
770
771         * UIProcess/API/APIWebsiteDataStore.h:
772
773         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
774         (-[WKWebsiteDataStore _initWithConfiguration:]):
775
776         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
777
778         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h.
779         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h.
780
781         * UIProcess/WebsiteData/WebsiteDataStore.h:
782
783         * WebKit2.xcodeproj/project.pbxproj:
784
785 2017-03-01  Jon Lee  <jonlee@apple.com>
786
787         Update peer connection preference
788         https://bugs.webkit.org/show_bug.cgi?id=169016
789         rdar://problem/30773889
790
791         Reviewed by Eric Carlson.
792
793         * Shared/WebPreferencesDefinitions.h:
794         * UIProcess/WebPreferences.cpp:
795         (WebKit::WebPreferences::setEnabledForFeature):
796         (WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): Deleted.
797         * UIProcess/WebPreferences.h:
798
799 2017-03-01  Tomas Popela  <tpopela@redhat.com>
800
801         [GTK] Fix problems found by Coverity scan in WebPrintOperationGtk.cpp
802         https://bugs.webkit.org/show_bug.cgi?id=169027
803
804         Reviewed by Carlos Garcia Campos.
805
806         Initialize the lastPagePosition variable and remove an unused one
807         - totalToPrint.
808
809         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
810         (WebKit::PrintPagesData::PrintPagesData):
811
812 2017-03-01  Andreas Kling  <akling@apple.com>
813
814         Move MemoryPressureHandler to WTF
815         <https://webkit.org/b/168908>
816
817         Reviewed by Sam Weinig.
818
819         * NetworkProcess/NetworkProcess.h:
820         * NetworkProcess/mac/NetworkProcessMac.mm:
821         * PluginProcess/PluginProcess.cpp:
822         * Shared/linux/WebMemorySamplerLinux.cpp:
823         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
824         * WebProcess/WebPage/ios/WebPageIOS.mm:
825
826 2017-03-01  Joseph Pecoraro  <pecoraro@apple.com>
827
828         [WebRTC] Install libwebrtc.dylib inside of WebCore.framework
829         https://bugs.webkit.org/show_bug.cgi?id=168859
830
831         Reviewed by Dan Bernstein.
832
833         * Configurations/BaseTarget.xcconfig:
834         * Configurations/WebKit.xcconfig:
835         Set library search path to find the libwebrtc.dylib inside of WebCore's Frameworks
836         or in the WK_OVERRIDE_FRAMEWORKS_DIR.
837
838 2017-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>
839
840         NetworkProcess aborts in WebKit::NetworkLoad::didCompleteWithError at Source/WebKit2/NetworkProcess/NetworkLoad.cpp:423
841         https://bugs.webkit.org/show_bug.cgi?id=168963
842
843         Reviewed by Antti Koivisto.
844
845         This is trying to call SpeculativeLoad::didFailLoading() after SpeculativeLoad has already been
846         completed. SpeculativeLoad::didComplete() call its completion handler that removes the load from
847         m_pendingPreloads. When the completion handler returns the SpeculativeLoad is deleted. So, we should always
848         ensure that SpeculativeLoad is not used after didComplete() call. In SpeculativeLoad::willSendRedirectedRequest(),
849         the call to NetworkLoad::continueWillSendRequest() causes SpeculativeLoad::didFailLoading() to be called. We
850         don't really need to call continueWillSendRequest() though, since the network load is going to be deleted anyway
851         by didComplete(), and the willSendRequest completion handler does nothing when the request is null.
852
853         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
854         (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
855
856 2017-02-28  Alexey Proskuryakov  <ap@apple.com>
857
858         https://bugs.webkit.org/show_bug.cgi?id=168899
859         Re-add deprecated functions to WKPageGroup.h
860
861         Reviewed by Tim Horton.
862
863         * Shared/API/c/WKDeprecatedFunctions.cpp:
864         (WKPageGroupRemoveUserContentFilter):
865         (WKPageGroupRemoveAllUserContentFilters): Deleted. Unlike the other three, this
866         function isn't used by any clients.
867         * UIProcess/API/C/WKPageGroup.h:
868
869 2017-02-28  Alexey Proskuryakov  <ap@apple.com>
870
871         Expose _WKVisitedLinkProvider in a header
872         https://bugs.webkit.org/show_bug.cgi?id=168955
873
874         Reviewed by Tim Horton.
875
876         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
877         * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
878         The class needs to be visible in a header, as it is exported SPI.
879
880 2017-02-28  Brady Eidson  <beidson@apple.com>
881
882         Move resolving symlinks of some WebsiteDataStore paths from WebProcessPool to... WebsiteDataStore!.
883         https://bugs.webkit.org/show_bug.cgi?id=168696.
884
885         Reviewed by Alex Christensen.
886
887         * UIProcess/WebProcessPool.cpp:
888         (WebKit::WebProcessPool::createNewWebProcess):
889
890         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
891         (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
892         * UIProcess/WebsiteData/WebsiteDataStore.h:
893         (WebKit::WebsiteDataStore::resolvedApplicationCacheDirectory):
894         (WebKit::WebsiteDataStore::resolvedMediaCacheDirectory):
895         (WebKit::WebsiteDataStore::resolvedMediaKeysDirectory):
896         (WebKit::WebsiteDataStore::resolvedDatabaseDirectory):
897
898 2017-02-28  Alex Christensen  <achristensen@webkit.org>
899
900         LibWebRTCProvider should check existence of libwebrtc.dylib
901         https://bugs.webkit.org/show_bug.cgi?id=168986
902
903         Reviewed by Youenn Fablet.
904
905         * Shared/WebPreferencesDefinitions.h:
906         * Shared/WebPreferencesStore.cpp:
907         * UIProcess/WebPreferences.cpp:
908         (WebKit::checkWebRTCAvailability): Deleted.
909
910 2017-02-28  Wenson Hsieh  <wenson_hsieh@apple.com>
911
912         Unreviewed, build fix after r213176.
913
914         * Platform/spi/ios/UIKitSPI.h:
915
916 2017-02-28  Tim Horton  <timothy_horton@apple.com>
917
918         [iOS] Getting QLPreviewProtocol slows down first navigation in Web process
919         https://bugs.webkit.org/show_bug.cgi?id=168940
920         <rdar://problem/29468999>
921
922         Reviewed by Simon Fraser.
923
924         * WebProcess/Network/WebLoaderStrategy.cpp:
925         (WebKit::WebLoaderStrategy::scheduleLoad):
926         Make use of isQuickLookPreviewURL.
927
928 2017-02-28  Brady Eidson  <beidson@apple.com>
929
930         Fix API test regression(s):
931         REGRESSION (r213168): API test WKUserContentController.ScriptMessageHandlerMultipleHandlerRemoval crashing
932         https://bugs.webkit.org/show_bug.cgi?id=168991
933
934         Unreviewed.
935
936         * UIProcess/WebProcessPool.cpp:
937         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
938
939 2017-02-28  Wenson Hsieh  <wenson_hsieh@apple.com>
940
941         Data interaction should support attachment elements
942         https://bugs.webkit.org/show_bug.cgi?id=168916
943         <rdar://problem/30664519>
944
945         Reviewed by Ryosuke Niwa.
946
947         Teaches WKContentView to recognize attachment elements as data interactive content, and add an internal hook to
948         adjust the list of item providers before initiating data interaction.
949
950         * Platform/spi/ios/UIKitSPI.h:
951         * UIProcess/API/Cocoa/WKWebView.mm:
952         (-[WKWebView _adjustedDataInteractionItemProviders:]):
953         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
954         * UIProcess/ios/WKContentViewInteraction.mm:
955         (-[WKContentView pointIsInDataInteractionContent:]):
956
957 2017-02-28  Yongjun Zhang  <yongjun_zhang@apple.com>
958
959         Add delegate method to handle images with alternate data.
960         https://bugs.webkit.org/show_bug.cgi?id=168785
961         <rdar://problem/28776219>
962
963         Add delegate methods to WKUIDelegatePrivate so that a WebKit client can provide alternate URL or data for an image
964         before long-press or preview. When an image has alternate URL or data, we can change the actions accordingly.
965
966         Reviewed by Enrica Casucci.
967
968         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add two delegate methods _webView:getAlternateURLFromImage:completionHandler:
969             and _webView:alternateURLFromImage:userInfo;
970         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Add an readonly property userInfo so that alternate data can be
971             carried by _WKActivatedElementInfo and be processed by WebKit client.
972         * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
973         (-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:]):
974         (-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:userInfo:]): A new initializer that also takes userInfo.
975         (-[_WKActivatedElementInfo userInfo]):
976         * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: A new delegate method for WKActionSheetAssistantDelegate to fetch
977             alternate data before showing image sheet.
978         * UIProcess/ios/WKActionSheetAssistant.h:
979         * UIProcess/ios/WKActionSheetAssistant.mm:
980         (-[WKActionSheetAssistant showImageSheet]): Before showing the image sheet, if the image doesn't have linked URL (i.e. not a image
981             link), try to fetch its alternate URL and data.
982         (-[WKActionSheetAssistant defaultActionsForImageSheet:]): Drive-by fix. We always use positionInformation's URL to populate the
983             actions, however, we should use elementInfo's URL since the two URLs could mismatch.
984         * UIProcess/ios/WKContentViewInteraction.mm:
985         (-[WKContentView actionSheetAssistant:getAlternateURLForImage:completion:]):
986         (-[WKContentView _presentedViewControllerForPreviewItemController:]): Before previewing an image, synchronously get alternate
987             data for the image and update the actions accordingly.
988
989 2017-02-28  Brady Eidson  <beidson@apple.com>
990         
991         Refactor WebViewImpl creation in preparation for supporting multiple WebsiteDataStores.
992         https://bugs.webkit.org/show_bug.cgi?id=168676
993
994         Reviewed by Alex Christensen and Sam Weinig.
995
996         * UIProcess/WebProcessPool.cpp:
997         (WebKit::WebProcessPool::createNewWebProcess):
998         (WebKit::WebProcessPool::warmInitialProcess):
999         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
1000         (WebKit::WebProcessPool::createWebPage):
1001         * UIProcess/WebProcessPool.h:
1002
1003 2017-02-28  Youenn Fablet  <youenn@apple.com>
1004
1005         [WebRTC] Limit libwebrtc logging in Debug build
1006         https://bugs.webkit.org/show_bug.cgi?id=168974
1007
1008         Reviewed by Alex Christensen.
1009
1010         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
1011         (WebKit::NetworkRTCProvider::NetworkRTCProvider):
1012         * Platform/Logging.h:
1013
1014 2017-02-28  Youenn Fablet  <youenn@apple.com>
1015
1016         [WebRTC] NetworkRTCProvider should stop the network thread from the main thread
1017         https://bugs.webkit.org/show_bug.cgi?id=168972
1018
1019         Reviewed by Alex Christensen.
1020
1021         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
1022         (WebKit::NetworkRTCProvider::close): Ensuring to stop the network thread from the main thread when provider is
1023         getting closed.
1024
1025 2017-02-24  Matt Rajca  <mrajca@apple.com>
1026
1027         Media: notify clients when autoplayed media ends without being paused
1028         https://bugs.webkit.org/show_bug.cgi?id=168852
1029
1030         Reviewed by Alex Christensen.
1031
1032         * UIProcess/API/C/WKPageUIClient.h:
1033
1034 2017-02-28  Csaba Osztrogonác  <ossy@webkit.org>
1035
1036         Remove EFL leftover from WebPageProxy.messages.in
1037         https://bugs.webkit.org/show_bug.cgi?id=168828
1038
1039         Reviewed by Gyuyoung Kim.
1040
1041         * UIProcess/WebPageProxy.messages.in:
1042
1043 2017-02-28  Alex Christensen  <achristensen@webkit.org>
1044
1045         Main resource requests need cachePartition
1046         https://bugs.webkit.org/show_bug.cgi?id=168806
1047
1048         Reviewed by Brady Eidson.
1049
1050         * NetworkProcess/NetworkResourceLoader.cpp:
1051         (WebKit::NetworkResourceLoader::continueWillSendRequest):
1052
1053 2017-02-27  Alex Christensen  <achristensen@webkit.org>
1054
1055         Begin enabling WebRTC on 64-bit
1056         https://bugs.webkit.org/show_bug.cgi?id=168915
1057
1058         Reviewed by Eric Carlson.
1059
1060         * Configurations/FeatureDefines.xcconfig:
1061
1062 2017-02-27  Alexey Proskuryakov  <ap@apple.com>
1063
1064         Remove _WKWebsiteDataRecord.h
1065         https://bugs.webkit.org/show_bug.cgi?id=168954
1066
1067         Reviewed by Dan Bernstein.
1068
1069         This doesn't seem to have ever been used, so better to remove it than to add an
1070         implementation.
1071
1072         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h: Removed.
1073         * WebKit2.xcodeproj/project.pbxproj:
1074
1075 2017-02-27  Alexey Proskuryakov  <ap@apple.com>
1076
1077         WKPageIsPlayingVideoInEnhancedFullscreen availability mismatch
1078         https://bugs.webkit.org/show_bug.cgi?id=168952
1079
1080         Reviewed by Dan Bernstein.
1081
1082         * UIProcess/API/C/mac/WKPagePrivateMac.h: TARGET_OS_MAC is not the right thing to
1083         check, as it's true on both macOS and iOS.
1084
1085 2017-02-27  Alexey Proskuryakov  <ap@apple.com>
1086
1087         Export WKPluginInformationBundleShortVersionKey
1088         https://bugs.webkit.org/show_bug.cgi?id=168951
1089
1090         Reviewed by Dan Bernstein.
1091
1092         * Shared/API/c/WKPluginInformation.h: It was accidentally not exported when added.
1093
1094 2017-02-27  Youenn Fablet  <youenn@apple.com>
1095
1096         [WebRTC] Add support for libwebrtc TCP incoming connections
1097         https://bugs.webkit.org/show_bug.cgi?id=168748
1098
1099         Reviewed by Alex Christensen.
1100
1101         Covered by added layout tests.
1102
1103         When a libwebrtc server socket is signalling a new connnection through SignalNewConnection, we do:
1104         - Wrap the incoming socket into a LibWebRTCSocketClient
1105         - Store it into a pending socket map with an identifier
1106         - Send a message to the web process of a new connection with the server socket identifier and new connection socket identifier.
1107         The Web process then creates a WebRTCSocket wrapper around it by sendinig a WrapNewTCPConnection message.
1108         It then propagates the SignalNewConnection to libwebrtc code path.
1109
1110         * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
1111         (WebKit::LibWebRTCSocketClient::LibWebRTCSocketClient):
1112         (WebKit::LibWebRTCSocketClient::signalReadPacket):
1113         (WebKit::LibWebRTCSocketClient::signalSentPacket):
1114         (WebKit::LibWebRTCSocketClient::signalNewConnection):
1115         (WebKit::LibWebRTCSocketClient::signalAddressReady):
1116         (WebKit::LibWebRTCSocketClient::signalConnect):
1117         (WebKit::LibWebRTCSocketClient::signalClose):
1118         * NetworkProcess/webrtc/LibWebRTCSocketClient.h:
1119         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
1120         (WebKit::NetworkRTCProvider::wrapNewTCPConnection):
1121         (WebKit::NetworkRTCProvider::newConnection):
1122         * NetworkProcess/webrtc/NetworkRTCProvider.h:
1123         * NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
1124         * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
1125         (WebKit::LibWebRTCSocket::signalNewConnection):
1126         * WebProcess/Network/webrtc/LibWebRTCSocket.h:
1127         * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
1128         (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket):
1129         * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
1130         * WebProcess/Network/webrtc/WebRTCSocket.cpp:
1131         (WebKit::WebRTCSocket::signalNewConnection):
1132         * WebProcess/Network/webrtc/WebRTCSocket.h:
1133         * WebProcess/Network/webrtc/WebRTCSocket.messages.in:
1134
1135 2017-02-27  Brent Fulgham  <bfulgham@apple.com>
1136
1137         [Mac] Don't use undefined sandbox rule on macOS 10.11 or earlier
1138         https://bugs.webkit.org/show_bug.cgi?id=168942
1139         <rdar://problem/30743376>
1140
1141         Reviewed by Ryosuke Niwa.
1142
1143         * WebProcess/com.apple.WebProcess.sb.in:
1144
1145 2017-02-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1146
1147         Unreviewed, roll out r213065.
1148
1149         * UIProcess/ios/WKContentViewInteraction.h:
1150
1151 2017-02-27  Alexey Proskuryakov  <ap@apple.com>
1152
1153         Remove some deprecated WKPage plug-in information functions
1154         https://bugs.webkit.org/show_bug.cgi?id=168897
1155
1156         Reviewed by Tim Horton.
1157
1158         * UIProcess/API/C/WKPage.cpp:
1159         (WKPageGetProcessIdentifier):
1160         (WKPageGetPluginInformationBundleIdentifierKey): Deleted.
1161         (WKPageGetPluginInformationBundleVersionKey): Deleted.
1162         (WKPageGetPluginInformationDisplayNameKey): Deleted.
1163         (WKPageGetPluginInformationFrameURLKey): Deleted.
1164         (WKPageGetPluginInformationMIMETypeKey): Deleted.
1165         (WKPageGetPluginInformationPageURLKey): Deleted.
1166         (WKPageGetPluginInformationPluginspageAttributeURLKey): Deleted.
1167         (WKPageGetPluginInformationPluginURLKey): Deleted.
1168         * UIProcess/API/C/WKPage.h:
1169
1170 2017-02-27  Alexey Proskuryakov  <ap@apple.com>
1171
1172         Stop exporting C++ member variables from class extensions in WKDOMInternals.h
1173         https://bugs.webkit.org/show_bug.cgi?id=168886
1174
1175         Reviewed by Tim Horton.
1176
1177         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: These are @package variables.
1178
1179 2017-02-27  Alex Christensen  <achristensen@webkit.org>
1180
1181         Optimize checkWebRTCAvailability
1182         https://bugs.webkit.org/show_bug.cgi?id=168913
1183
1184         Reviewed by Darin Adler.
1185
1186         We can optimize startup time by using RTLD_LAZY instead of RTLD_NOW because we don't need to load all the symbols.
1187         We just need to check whether libwebrtc.dylib can be found and is a valid dylib for the current architecture.
1188         Also, initialize a static bool so it only needs to be checked once.  Right now it's only used when initializing settings,
1189         but if we use it for other things in the future there will be no need to reopen the dylib.
1190
1191         * UIProcess/WebPreferences.cpp:
1192         (WebKit::checkWebRTCAvailability):
1193
1194 2017-02-26  Wenson Hsieh  <wenson_hsieh@apple.com>
1195
1196         Unreviewed, revert all temporary build fixes for data interaction
1197
1198         Rolls out r212990, r212988 and r212984.
1199
1200         * UIProcess/ios/WKContentViewInteraction.h:
1201
1202 2017-02-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1203
1204         [GTK] Rendering artifacts when resizing the window in X11 with AC mode enabled
1205         https://bugs.webkit.org/show_bug.cgi?id=168728
1206
1207         Reviewed by Žan Doberšek.
1208
1209         This happens because the pixmap we create from the redirected window is uninitialized until the threaded
1210         compositor renders into it. We should always initialize the pixmap right after it's created.
1211
1212         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
1213         (WebKit::defaultVisual): Helper static method to get the default GdkVisual.
1214         (WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11): Use createPixmap().
1215         (WebKit::AcceleratedSurfaceX11::createPixmap): Create and initialize the pixmap.
1216         (WebKit::AcceleratedSurfaceX11::resize): Use createPixmap().
1217         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:
1218
1219 2017-02-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1220
1221         [GTK] Flickering when leaving accelerated compositing mode
1222         https://bugs.webkit.org/show_bug.cgi?id=168911
1223
1224         Reviewed by Žan Doberšek.
1225
1226         It doesn't always happen, and it's too fast, more noticeable in websites with a dark background, because we are
1227         drawing a single white frame. This happens when we leave AC mode during the layer flush that schedules an update
1228         on the compositor, which at that point only clears the area and renders nothing. However,
1229         CoordinatedGraphicsScene::paintToCurrentGLContext() always renders a white background when no web view color has
1230         been set. And that's the white frame we get. We could prevent that last update from happening by checking if we
1231         still have a graphics root layer after syncDisplayState() in the layer flush, the same way we check the layer
1232         tree host is still valid.
1233
1234         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
1235         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1236         (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
1237
1238 2017-02-27  Alex Christensen  <achristensen@webkit.org>
1239
1240         [libwebrtc] Enable WebRTC in some Production Builds
1241         https://bugs.webkit.org/show_bug.cgi?id=168858
1242
1243         * Configurations/FeatureDefines.xcconfig:
1244
1245 2017-02-27  Andy Estes  <aestes@apple.com>
1246
1247         Links cannot be activated when running Mobile Safari with external SDK build of WebKit for iOS Simulator
1248         https://bugs.webkit.org/show_bug.cgi?id=141906
1249
1250         Reviewed by Tim Horton.
1251
1252         Even if Touch Events are disabled, we still need to register a
1253         UIWebTouchEventsGestureRecognizer to record the layer tree transaction ID when a touch
1254         begins. Click events are only generated for touches that occur after the current frame's
1255         load has committed, and we use the transaction ID from when the touch began to implement
1256         this check.
1257
1258         * UIProcess/WebPageProxy.cpp:
1259         (WebKit::WebPageProxy::handleTouchEventSynchronously):
1260         (WebKit::WebPageProxy::resetState):
1261         * UIProcess/WebPageProxy.h:
1262         * UIProcess/ios/WKContentViewInteraction.h: Declared _layerTreeTransactionIdAtLastTouchStart.
1263         * UIProcess/ios/WKContentViewInteraction.mm:
1264         (-[WKContentView setupInteraction]): Register a UIWebTouchEventsGestureRecognizer even if
1265         Touch Events are disabled.
1266         (-[WKContentView cleanupInteraction]): Reset _layerTreeTransactionIdAtLastTouchStart to 0.
1267         (-[WKContentView _webTouchEventsRecognized:]): Update _layerTreeTransactionIdAtLastTouchStart
1268         when a touch begins, even if Touch Events are disabled.
1269         (-[WKContentView _singleTapCommited:]): Passed _layerTreeTransactionIdAtLastTouchStart to
1270         WebPageProxy::commitPotentialTap().
1271         (-[WKContentView _attemptClickAtLocation:]): Ditto for WebPageProxy::handleTap().
1272         * UIProcess/ios/WebPageProxyIOS.mm:
1273         (WebKit::WebPageProxy::commitPotentialTap):
1274         (WebKit::WebPageProxy::handleTap):
1275
1276 2017-02-26  Zan Dobersek  <zdobersek@igalia.com>
1277
1278         [CoordinatedGraphics] Remove CoordinatedGraphicsScene::paintToGraphicsContext()
1279         https://bugs.webkit.org/show_bug.cgi?id=168903
1280
1281         Reviewed by Carlos Garcia Campos.
1282
1283         Remove the CoordinatedGraphicsScene::paintToGraphicsContext() method as it
1284         is not used anywhere. Also enables removing the GraphicsContext pointer
1285         member from the TextureMapper class.
1286
1287         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1288         (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext): Deleted.
1289         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
1290
1291 2017-02-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1292
1293         [GTK] Hangs when showing Google search results
1294         https://bugs.webkit.org/show_bug.cgi?id=168699
1295
1296         Reviewed by Žan Doberšek.
1297
1298         Connection::sendOutgoingMessage() can poll forever if sendmsg fails with EAGAIN or EWOULDBLOCK. For example if
1299         socket read buffers are full, poll will be blocked until we read the pending data, but we can't read because
1300         the thread is blocked in the poll. In case of EAGAIN/EWOULDBLOCK we should poll using the run loop, to allow
1301         reads to happen in thread while we wait for the socket to be writable again. In the GTK+ port we use
1302         GSocketMonitor to poll socket file descriptor without blocking, using the run loop. This patch renames the
1303         socket monitor as readSocketMonitor and adds another one for polling output. When sendmsg fails with
1304         EAGAIN/EWOULDBLOCK, the pending message is saved and the write monitor starts polling. Once the socket is
1305         writable again we send the pending message. Helper class MessageInfo and a new one UnixMessage have been moved
1306         to its own header file to be able to use std::unique_ptr member to save the pending message.
1307
1308         * Platform/IPC/Connection.cpp: Include UnixMessage.h as required by std::unique_ptr.
1309         * Platform/IPC/Connection.h: Add write socket monitor and also keep the GSocket as a member to reuse it.
1310         * Platform/IPC/glib/GSocketMonitor.cpp: Use Function instead of std::function.
1311         (IPC::GSocketMonitor::start):
1312         * Platform/IPC/glib/GSocketMonitor.h:
1313         * Platform/IPC/unix/ConnectionUnix.cpp:
1314         (IPC::Connection::platformInitialize): Initialize the GSocket here since we rely on it to take the ownership of
1315         the descriptor. We were leaking it if the connection was invalidated without being opened.
1316         (IPC::Connection::platformInvalidate): Destroy the GSocket even when not connected. Also stop the write monitor.
1317         (IPC::Connection::processMessage):
1318         (IPC::Connection::open):
1319         (IPC::Connection::platformCanSendOutgoingMessages): Return false if we have a pending message to ensure
1320         Connection doesn't try to send more messages until the pending message is dispatched. We don't need to check
1321         m_isConnected because the caller already checks that.
1322         (IPC::Connection::sendOutgoingMessage): Split it in two. This creates and prepares a UnixMessage and then calls
1323         sendOutputMessage() to do the rest.
1324         (IPC::Connection::sendOutputMessage): Send the message, or save it if sendmsg fails with EAGAIN or EWOULDBLOCK
1325         to be sent later when the socket is writable.
1326         * Platform/IPC/unix/UnixMessage.h: Added.
1327         (IPC::MessageInfo::MessageInfo):
1328         (IPC::MessageInfo::setMessageBodyIsOutOfLine):
1329         (IPC::MessageInfo::isMessageBodyIsOutOfLine):
1330         (IPC::MessageInfo::bodySize):
1331         (IPC::MessageInfo::attachmentCount):
1332         (IPC::UnixMessage::UnixMessage):
1333         (IPC::UnixMessage::~UnixMessage):
1334         (IPC::UnixMessage::attachments):
1335         (IPC::UnixMessage::messageInfo):
1336         (IPC::UnixMessage::body):
1337         (IPC::UnixMessage::bodySize):
1338         (IPC::UnixMessage::appendAttachment):
1339         * PlatformGTK.cmake:
1340
1341 2017-02-26  Devin Rousso  <dcrousso+webkit@gmail.com>
1342
1343         Web Inspector: RTL: Docking Left doesn't constrain the page width
1344         https://bugs.webkit.org/show_bug.cgi?id=168862
1345
1346         Reviewed by Brian Burg.
1347
1348         * UIProcess/mac/WebInspectorProxyMac.mm:
1349         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1350         Calculate the inspectedViewFrame to be the remaining space after WebInspector is opened
1351         instead of using the original page size.
1352
1353 2017-02-26  Alexey Proskuryakov  <ap@apple.com>
1354
1355         Stop exporting C++ member variables from WKDOMTextIterator
1356         https://bugs.webkit.org/show_bug.cgi?id=168885
1357
1358         Reviewed by Dan Bernstein.
1359
1360         * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
1361
1362 2017-02-26  Alexey Proskuryakov  <ap@apple.com>
1363
1364         Add preprocessor guards to Mac specific files that are exposed as private headers on iOS
1365         https://bugs.webkit.org/show_bug.cgi?id=168878
1366
1367         Reviewed by Dan Bernstein.
1368
1369         * UIProcess/API/C/WKInspector.h:
1370         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h:
1371
1372 2017-02-26  Alexey Proskuryakov  <ap@apple.com>
1373
1374         Remove spurious C++ include from _WKTestingDelegate.h
1375         https://bugs.webkit.org/show_bug.cgi?id=168877
1376
1377         Reviewed by Dan Bernstein.
1378
1379         * UIProcess/API/Cocoa/_WKTestingDelegate.h:
1380
1381 2017-02-26  Alexey Proskuryakov  <ap@apple.com>
1382
1383         Remove unimplemented WKResourceLoadStatisticsManagerSetReducedTimestampResolution
1384         https://bugs.webkit.org/show_bug.cgi?id=168880
1385
1386         Reviewed by Dan Bernstein.
1387
1388         * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
1389
1390 2017-02-26  Alexey Proskuryakov  <ap@apple.com>
1391
1392         Remove leftover WebKit2 C API function declarations
1393         https://bugs.webkit.org/show_bug.cgi?id=168879
1394
1395         Reviewed by Tim Horton.
1396
1397         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1398
1399 2017-02-26  Alexey Proskuryakov  <ap@apple.com>
1400
1401         Remove some old WKSecurityOrigin binary compatibility stubs
1402         https://bugs.webkit.org/show_bug.cgi?id=168881
1403
1404         Reviewed by Dan Bernstein.
1405
1406         * Shared/API/c/WKSecurityOriginRef.cpp:
1407         (WKSecurityOriginGetHost): Deleted.
1408         (WKSecurityOriginGetProtocol): Deleted.
1409
1410 2017-02-26  Wenson Hsieh  <wenson_hsieh@apple.com>
1411
1412         REGRESSION (r211312): Double-clicking a word selects it along with the space that follows it
1413         https://bugs.webkit.org/show_bug.cgi?id=168821
1414         <rdar://problem/30690431>
1415
1416         Reviewed by Tim Horton.
1417
1418         Actually encode and decode smartInsertDeleteEnabled when sending WebPageCreationParameters over XPC.
1419
1420         * Shared/WebPageCreationParameters.cpp:
1421         (WebKit::WebPageCreationParameters::encode):
1422         (WebKit::WebPageCreationParameters::decode):
1423
1424 2017-02-26  Chris Dumez  <cdumez@apple.com>
1425
1426         HitTestResult's linkSuggestedFilename should sanitize download attribute
1427         https://bugs.webkit.org/show_bug.cgi?id=168856
1428         <rdar://problem/30683109>
1429
1430         Reviewed by Antti Koivisto.
1431
1432         HitTestResult's linkSuggestedFilename should sanitize download attribute.
1433         This is used by the context menu's "Download Linked File" & "Download Linked
1434         File As..." actions.
1435
1436         * Shared/WebHitTestResultData.cpp:
1437         (WebKit::WebHitTestResultData::WebHitTestResultData):
1438         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
1439         (WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):
1440
1441 2017-02-25  Michael Catanzaro  <mcatanzaro@igalia.com>
1442
1443         [GTK] Unreviewed, document deficiency in webkit_website_data_manager_clear() API
1444
1445         Document that this function cannot currently delete cookie data for a particular period of
1446         time.
1447
1448         * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
1449
1450 2017-02-24  Joseph Pecoraro  <pecoraro@apple.com>
1451
1452         [Resource Timing] Gather timing information with reliable responseEnd time
1453         https://bugs.webkit.org/show_bug.cgi?id=168351
1454
1455         Reviewed by Alex Christensen.
1456
1457         Change from an unused `double finishTime` to a complete WebCore::NetworkLoadMetrics
1458         object in the didFinishLoad ResourceLoader path. We may also extend this in the
1459         didFail path later on. This allows the NetworkProcess to give complete timing
1460         information, and more final metrics about the load, to WebCore.
1461
1462         * NetworkProcess/NetworkDataTask.h:
1463         (WebKit::NetworkDataTaskClient::didCompleteWithError):
1464         Give the NetworkDataTaskClient a basic didCompleteWithError for a completion
1465         without metrics. For loads that complete with an error, or haven't populated
1466         any metrics, this will pass empty metrics onward.
1467
1468         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1469         (WebKit::BlobDownloadClient::didFinishLoading):
1470         * NetworkProcess/Downloads/BlobDownloadClient.h:
1471         * NetworkProcess/Downloads/PendingDownload.h:
1472         * NetworkProcess/PingLoad.h:
1473         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
1474         (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
1475         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
1476         * NetworkProcess/NetworkDataTaskBlob.cpp:
1477         (WebKit::NetworkDataTaskBlob::didFail):
1478         * NetworkProcess/NetworkLoad.cpp:
1479         (WebKit::NetworkLoad::continueWillSendRequest):
1480         (WebKit::NetworkLoad::didCompleteWithError):
1481         (WebKit::NetworkLoad::didFinishLoading):
1482         * NetworkProcess/NetworkLoad.h:
1483         * NetworkProcess/NetworkLoadClient.h:
1484         * NetworkProcess/NetworkResourceLoader.cpp:
1485         (WebKit::NetworkResourceLoader::didFinishLoading):
1486         (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
1487         * NetworkProcess/NetworkResourceLoader.h:
1488         * WebProcess/Network/WebResourceLoader.cpp:
1489         (WebKit::WebResourceLoader::didFinishResourceLoad):
1490         (WebKit::WebResourceLoader::didReceiveResource):
1491         * WebProcess/Network/WebResourceLoader.h:
1492         * WebProcess/Network/WebResourceLoader.messages.in:
1493         Change didFinishLoad paths to take a NetworkLoadMetrics object instead of finishTime.
1494         Change didCompleteWithError pathes to include a NetworkLoadMetrics object instead of finishTime.
1495
1496         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1497         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1498         (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
1499         Own a NetworkLoadTiming that will be populated with the load.
1500
1501         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
1502         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1503         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
1504         (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
1505         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
1506         Populate NetworkLoadMetrics in the didFinishCollectingMetrics NSURLSessionTaskDelegate method.
1507
1508         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1509         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
1510         (WebKit::NetworkDataTaskSoup::timeoutFired):
1511         (WebKit::NetworkDataTaskSoup::didSendRequest):
1512         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
1513         (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
1514         (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
1515         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
1516         (WebKit::NetworkDataTaskSoup::didFinishRead):
1517         (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
1518         (WebKit::NetworkDataTaskSoup::didFailDownload):
1519         (WebKit::NetworkDataTaskSoup::didFail):
1520         (WebKit::NetworkDataTaskSoup::networkEvent):
1521         (WebKit::NetworkDataTaskSoup::didStartRequest):
1522         (WebKit::NetworkDataTaskSoup::didRestart):
1523         * NetworkProcess/soup/NetworkDataTaskSoup.h:
1524         Instead of populating the NetworkLoadMetrics on the ResourceResponse, populate
1525         a member variable during the entire load and dispatch didFinishCollectingMetrics
1526         right before didCompleteLoadWithError.
1527
1528 2017-02-24  Chris Dumez  <cdumez@apple.com>
1529
1530         Unreviewed, rolling out r212944.
1531
1532         Caused a lot of failures on the debug bots
1533
1534         Reverted changeset:
1535
1536         "[Resource Timing] Gather timing information with reliable
1537         responseEnd time"
1538         https://bugs.webkit.org/show_bug.cgi?id=168351
1539         http://trac.webkit.org/changeset/212944
1540
1541 2017-02-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1542
1543         Unreviewed, fix the internal build
1544
1545         * UIProcess/ios/WKContentViewInteraction.h:
1546
1547 2017-02-24  Matt Rajca  <mrajca@apple.com>
1548
1549         Media: notify clients when autoplay is denied
1550         https://bugs.webkit.org/show_bug.cgi?id=168840
1551
1552         Reviewed by Alex Christensen.
1553
1554         * UIProcess/API/APIUIClient.h:
1555         (API::UIClient::handleAutoplayEvent):
1556         (API::UIClient::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
1557         * UIProcess/API/C/WKPage.cpp:
1558         (WKPageSetPageUIClient):
1559         * UIProcess/API/C/WKPageUIClient.h:
1560         * UIProcess/WebPageProxy.cpp:
1561         (WebKit::WebPageProxy::handleAutoplayEvent):
1562         (WebKit::WebPageProxy::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
1563         * UIProcess/WebPageProxy.h:
1564         * UIProcess/WebPageProxy.messages.in:
1565         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1566         (WebKit::WebChromeClient::handleAutoplayEvent):
1567         (WebKit::WebChromeClient::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
1568         * WebProcess/WebCoreSupport/WebChromeClient.h:
1569
1570 2017-02-20  Wenson Hsieh  <wenson_hsieh@apple.com>
1571
1572         Refactor data interaction to use new WKDataInteraction SPI
1573         https://bugs.webkit.org/show_bug.cgi?id=168602
1574         Work towards <rdar://problem/30313681>
1575
1576         Reviewed by Tim Horton.
1577
1578         Adjust testing SPI to match new data interaction interfaces.
1579
1580         * Platform/spi/ios/UIKitSPI.h:
1581         * UIProcess/API/Cocoa/WKWebView.mm:
1582         (-[WKWebView _simulateDataInteractionEntered:]):
1583         (-[WKWebView _simulateDataInteractionUpdated:]):
1584         (-[WKWebView _simulateDataInteractionPerformOperation:]):
1585         (-[WKWebView _simulateDataInteractionEnded:]):
1586         (-[WKWebView _simulateDataInteractionSessionDidEnd:]):
1587         (-[WKWebView _simulateWillBeginDataInteractionWithSession:]):
1588         (-[WKWebView _simulatedItemsForSession:]):
1589         (-[WKWebView _simulatePrepareForDataInteractionSession:completion:]):
1590         (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]): Deleted.
1591         (-[WKWebView _simulateFailedDataInteractionWithIndex:]): Deleted.
1592         (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]): Deleted.
1593         (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]): Deleted.
1594         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1595         * UIProcess/ios/WKContentViewInteraction.h:
1596         * UIProcess/ios/WKContentViewInteraction.mm:
1597         (-[WKContentView _positionInformationDidChange:]):
1598         * UIProcess/ios/WKScrollView.h:
1599         * UIProcess/ios/WKScrollView.mm:
1600
1601 2017-02-20  Wenson Hsieh  <wenson_hsieh@apple.com>
1602
1603         Remove the data interaction gesture recognizer
1604         https://bugs.webkit.org/show_bug.cgi?id=168600
1605         <rdar://problem/30313681>
1606
1607         Reviewed by Anders Carlsson.
1608
1609         The data interaction gesture recognizer will no longer be needed moving forward.
1610
1611         * UIProcess/API/Cocoa/WKWebView.mm:
1612         (-[WKWebView _simulateDataInteractionGestureRecognized]): Deleted.
1613         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1614         * UIProcess/ios/WKContentViewInteraction.h:
1615         * UIProcess/ios/WKContentViewInteraction.mm:
1616         (-[WKContentView setupInteraction]):
1617         (-[WKContentView cleanupInteraction]):
1618         (-[WKContentView _removeDefaultGestureRecognizers]):
1619         (-[WKContentView _addDefaultGestureRecognizers]):
1620         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
1621         (-[WKContentView gestureRecognizerShouldBegin:]):
1622         (-[WKContentView _dataInteractionGestureRecognizer]): Deleted.
1623
1624 2017-02-24  Chris Dumez  <cdumez@apple.com>
1625
1626         [iOS][WK2] Disable network cache speculative revalidation / loading in low power mode
1627         https://bugs.webkit.org/show_bug.cgi?id=168832
1628         <rdar://problem/30697911>
1629
1630         Reviewed by Antti Koivisto.
1631
1632         Disable network cache speculative revalidation / loading in low power mode on iOS to
1633         save battery.
1634
1635         * NetworkProcess/cache/NetworkCache.cpp:
1636         (WebKit::NetworkCache::Cache::initialize):
1637         * NetworkProcess/cache/NetworkCache.h:
1638
1639 2017-02-24  John Wilander  <wilander@apple.com>
1640
1641         Resource Load Statistics: Add alternate classification method
1642         https://bugs.webkit.org/show_bug.cgi?id=168347
1643         <rdar://problem/30352793>
1644         <rdar://problem/30646710>
1645         <rdar://problem/30660708>
1646
1647         Reviewed by Alex Christensen.
1648
1649         This patch adds a CorePrediction-based classifier to the WebResourceLoadStatisticsStore.
1650         The CorePrediction framework is introduced as a dependency for macOS and iOS. The patch
1651         also adds functions to support layout tests of the feature.
1652
1653         * Platform/Logging.h:
1654             Added channel ResourceLoadStatistics.
1655         * Platform/classifier/ResourceLoadStatisticsClassifier.h: Added.
1656             Pulls in the Cocoa-specific classifier for Cocoa-based platforms.
1657         (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
1658         * Platform/classifier/ResourceLoadStatisticsClassifierBase.cpp: Added.
1659         (WebKit::ResourceLoadStatisticsClassifierBase::hasPrevalentResourceCharacteristics):
1660             Shared classifier logic.
1661         (WebKit::ResourceLoadStatisticsClassifierBase::classifyWithVectorThreshold):
1662             Fallback classifier for when we don't have CorePrediction.
1663         * Platform/classifier/ResourceLoadStatisticsClassifierBase.h: Added.
1664         (WebKit::ResourceLoadStatisticsClassifierBase::ResourceLoadStatisticsClassifierBase):
1665         (WebKit::ResourceLoadStatisticsClassifierBase::~ResourceLoadStatisticsClassifierBase):
1666         * Platform/classifier/cocoa/CorePredictionSoftLink.h: Added.
1667             Soft links to CorePrediction and the two functions we use from it.
1668         * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: Added.
1669         (WebKit::ResourceLoadStatisticsClassifier::classify):
1670         (WebKit::ResourceLoadStatisticsClassifier::storagePath):
1671         (WebKit::ResourceLoadStatisticsClassifier::shouldUseCorePredictionAndHaveModelLoaded):
1672         (WebKit::ResourceLoadStatisticsClassifier::singletonPredictionModel):
1673             The new classifier for Cocoa platforms.
1674         * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h: Added.
1675         * PlatformGTK.cmake:
1676             Added Platform/classifier directory and ResourceLoadStatisticsClassifierBase.cpp.
1677         * PlatformMac.cmake:
1678             Added Platform/classifier and Platform/classifier/cocoa directories, and
1679             source files ResourceLoadStatisticsClassifierBase.cpp and
1680             ResourceLoadStatisticsClassifierCocoa.cpp
1681         * Resources/ResourceLoadStatistics/corePrediction_model: Added.
1682             Model file to load into CorePrediction.
1683         * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
1684         (WKResourceLoadStatisticsManagerSetSubframeUnderTopFrameOrigin):
1685         (WKResourceLoadStatisticsManagerSetSubresourceUnderTopFrameOrigin):
1686         (WKResourceLoadStatisticsManagerSetSubresourceUniqueRedirectTo):
1687             Test infrastructure.
1688         * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
1689         * UIProcess/WebResourceLoadStatisticsManager.cpp:
1690         (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
1691         (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
1692         (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
1693             Test infrastructure.
1694         * UIProcess/WebResourceLoadStatisticsManager.h:
1695         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1696         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
1697             Renamed m_storagePath to m_statisticsStoragePath for clarity.
1698         (WebKit::WebResourceLoadStatisticsStore::classifyResource):
1699             Now calls the classifier through its ResourceLoadStatisticsClassifier
1700             member variable.
1701         (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
1702             Renamed m_storagePath to m_statisticsStoragePath for clarity.
1703         (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
1704             Renamed m_storagePath to m_statisticsStoragePath for clarity.
1705         (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics): Deleted.
1706         * UIProcess/WebResourceLoadStatisticsStore.h:
1707         * WebKit2.xcodeproj/project.pbxproj:
1708             Added the new classifier source files under Platform/classifier and the
1709             corePrediction_model file under Resources/ResourceLoadStatistics.
1710
1711 2017-02-23  Joseph Pecoraro  <pecoraro@apple.com>
1712
1713         [Resource Timing] Add Experimental Feature Flag
1714         https://bugs.webkit.org/show_bug.cgi?id=167147
1715
1716         Reviewed by Ryosuke Niwa.
1717
1718         * Shared/WebPreferencesDefinitions.h:
1719         Move ResourceTiming to experimental section.
1720         Disable it for El Capitan due to known issues.
1721
1722 2017-02-23  Joseph Pecoraro  <pecoraro@apple.com>
1723
1724         [Resource Timing] Gather timing information with reliable responseEnd time
1725         https://bugs.webkit.org/show_bug.cgi?id=168351
1726
1727         Reviewed by Alex Christensen.
1728
1729         Change from an unused `double finishTime` to a complete WebCore::NetworkLoadMetrics
1730         object in the didFinishLoad ResourceLoader path. We may also extend this in the
1731         didFail path later on. This allows the NetworkProcess to give complete timing
1732         information, and more final metrics about the load, to WebCore.
1733
1734         * NetworkProcess/NetworkDataTask.h:
1735         (WebKit::NetworkDataTaskClient::didCompleteWithError):
1736         Give the NetworkDataTaskClient a basic didCompleteWithError for a completion
1737         without metrics. For loads that complete with an error, or haven't populated
1738         any metrics, this will pass empty metrics onward.
1739
1740         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1741         (WebKit::BlobDownloadClient::didFinishLoading):
1742         * NetworkProcess/Downloads/BlobDownloadClient.h:
1743         * NetworkProcess/Downloads/PendingDownload.h:
1744         * NetworkProcess/PingLoad.h:
1745         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
1746         (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
1747         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
1748         * NetworkProcess/NetworkDataTaskBlob.cpp:
1749         (WebKit::NetworkDataTaskBlob::didFail):
1750         * NetworkProcess/NetworkLoad.cpp:
1751         (WebKit::NetworkLoad::continueWillSendRequest):
1752         (WebKit::NetworkLoad::didCompleteWithError):
1753         (WebKit::NetworkLoad::didFinishLoading):
1754         * NetworkProcess/NetworkLoad.h:
1755         * NetworkProcess/NetworkLoadClient.h:
1756         * NetworkProcess/NetworkResourceLoader.cpp:
1757         (WebKit::NetworkResourceLoader::didFinishLoading):
1758         (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
1759         * NetworkProcess/NetworkResourceLoader.h:
1760         * WebProcess/Network/WebResourceLoader.cpp:
1761         (WebKit::WebResourceLoader::didFinishResourceLoad):
1762         (WebKit::WebResourceLoader::didReceiveResource):
1763         * WebProcess/Network/WebResourceLoader.h:
1764         * WebProcess/Network/WebResourceLoader.messages.in:
1765         Change didFinishLoad paths to take a NetworkLoadMetrics object instead of finishTime.
1766         Change didCompleteWithError pathes to include a NetworkLoadMetrics object instead of finishTime.
1767
1768         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1769         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1770         (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
1771         Own a NetworkLoadTiming that will be populated with the load.
1772
1773         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
1774         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1775         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
1776         (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
1777         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
1778         Populate NetworkLoadMetrics in the didFinishCollectingMetrics NSURLSessionTaskDelegate method.
1779
1780         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1781         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
1782         (WebKit::NetworkDataTaskSoup::timeoutFired):
1783         (WebKit::NetworkDataTaskSoup::didSendRequest):
1784         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
1785         (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
1786         (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
1787         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
1788         (WebKit::NetworkDataTaskSoup::didFinishRead):
1789         (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
1790         (WebKit::NetworkDataTaskSoup::didFailDownload):
1791         (WebKit::NetworkDataTaskSoup::didFail):
1792         (WebKit::NetworkDataTaskSoup::networkEvent):
1793         (WebKit::NetworkDataTaskSoup::didStartRequest):
1794         (WebKit::NetworkDataTaskSoup::didRestart):
1795         * NetworkProcess/soup/NetworkDataTaskSoup.h:
1796         Instead of populating the NetworkLoadMetrics on the ResourceResponse, populate
1797         a member variable during the entire load and dispatch didFinishCollectingMetrics
1798         right before didCompleteLoadWithError.
1799
1800 2017-02-23  Beth Dakin  <bdakin@apple.com> + Dan Saunders  <dasau@microsoft.com>
1801
1802         No reliable way to get a snapshot of WKWebView
1803         https://bugs.webkit.org/show_bug.cgi?id=161450
1804         -and corresponding-
1805         <rdar://problem/23846039>
1806
1807         Reviewed by Tim Horton.
1808
1809         This patch adds a new API to WKWebView to snapshot a rect:
1810         takeSnapshotWithConfiguration:completionHandler:
1811
1812         It also adds a new API object WKSnapshotConfiguration.
1813
1814         * UIProcess/API/Cocoa/WKSnapshotConfiguration.h: Added.
1815         * UIProcess/API/Cocoa/WKSnapshotConfiguration.mm: Added.
1816         (-[WKSnapshotConfiguration copyWithZone:]):
1817         * UIProcess/API/Cocoa/WKWebView.h:
1818         * UIProcess/API/Cocoa/WKWebView.mm:
1819         (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
1820         * WebKit2.xcodeproj/project.pbxproj:
1821
1822 2017-02-23  Jer Noble  <jer.noble@apple.com>
1823
1824         ASSERT in RTCNetwork::IPAddress::decode()
1825         https://bugs.webkit.org/show_bug.cgi?id=168792
1826
1827         Reviewed by Tim Horton.
1828
1829         An ASSERT added to RTCNetwork::IPAddress::decode in r212781 was hit due to a bad encode of SocketAddress; an
1830         extra boolean value was added to the encoder unnecessarily, leading to garbage data being decoded in the following
1831         IPAddress.
1832
1833         Drive-by-fix: allow the IPAddress encoder/decoder to pass through a value of AF_UNSPEC for an IPAddress to support
1834         passing through an "empty" IPAddress value.
1835
1836         * Shared/RTCNetwork.cpp:
1837         (WebKit::RTCNetwork::IPAddress::decode):
1838         (WebKit::RTCNetwork::IPAddress::encode):
1839         (WebKit::RTCNetwork::SocketAddress::encode):
1840
1841 2017-02-23  Eric Carlson  <eric.carlson@apple.com>
1842
1843         [WebRTC][Mac][WebKit2] WebRTC requires media capture
1844         https://bugs.webkit.org/show_bug.cgi?id=168782
1845         <rdar://problem/30675242>
1846
1847         Reviewed by Youenn Fablet.
1848
1849         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1850         (WebKit::WebProcessPool::platformInitializeWebProcess): Extend the sanbox to allow microphone access
1851         if media stream OR WebRTC is enabled.
1852
1853 2017-02-23  Brent Fulgham  <bfulgham@apple.com>
1854
1855         [Mac] Remove unneeded sandbox exceptions for media elements
1856         https://bugs.webkit.org/show_bug.cgi?id=168767
1857
1858         Reviewed by Alex Christensen.
1859
1860         Remove several sandbox exceptions that have not been needed for the past four
1861         or five macOS releases.
1862         
1863         * WebProcess/com.apple.WebProcess.sb.in:
1864
1865 2017-02-23  Brent Fulgham  <bfulgham@apple.com>
1866
1867         [Mac] Remove com.apple.audio.VDCAssistant from sandboxes
1868         https://bugs.webkit.org/show_bug.cgi?id=168764
1869         <rdar://problem/16736919>
1870
1871         Reviewed by Alex Christensen.
1872
1873         Remove unneeded sandbox class.
1874
1875         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1876         * WebProcess/com.apple.WebProcess.sb.in:
1877
1878 2017-02-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1879
1880         Data interaction causes selection to fall out of sync between web/UI processes
1881         https://bugs.webkit.org/show_bug.cgi?id=168735
1882         <rdar://problem/30657817>
1883
1884         Reviewed by Tim Horton.
1885
1886         Fixes a bug with data interaction causing selection state to fall out of sync between the UI and web processes,
1887         and also introduces testing infrastructure and tests for grabbing UI-side selection view rects in TestWebKitAPI.
1888         While performing a data interaction operation, we now lift restrictions for assisting the focused node.
1889
1890         * UIProcess/ios/WKContentViewInteraction.h:
1891         * UIProcess/ios/WKContentViewInteraction.mm:
1892         (-[WKContentView cleanupInteraction]):
1893         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
1894
1895 2017-02-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1896
1897         [GTK] Crash attempting to load Flash plugin in Wayland
1898         https://bugs.webkit.org/show_bug.cgi?id=163159
1899
1900         Reviewed by Michael Catanzaro.
1901
1902         The problem is that we check if the current diplay is X11 or Wayland also in the plugin process, but with GTK2
1903         plugins the display is always X11. We should early reject plugins requiring GTK2 in the UI process when the
1904         current display is Wayland.
1905
1906         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
1907         (WebKit::PluginInfoStore::getPluginInfo):
1908         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1909         (WebKit::PluginProcessProxy::scanPlugin):
1910         * UIProcess/gtk/WebPageProxyGtk.cpp:
1911         (WebKit::WebPageProxy::createPluginContainer): Add an assert to ensure this message is never received on a
1912         non-X11 display.
1913         * WebProcess/Plugins/PluginView.cpp:
1914         (WebKit::PluginView::createPluginContainer): Never send CreatePluginContainer message to the UI process if the
1915         display is not X11.
1916
1917 2017-02-23  Eric Carlson  <eric.carlson@apple.com>
1918
1919         [MediaStream iOS] Allow web process sandbox to be extended for media capture
1920         https://bugs.webkit.org/show_bug.cgi?id=168756
1921
1922         Reviewed by Brent Fulgham.
1923
1924         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add rules to dynamically
1925         extend the sandbox to allow access to the camera and/or microphone.
1926
1927 2017-02-23  Tomas Popela  <tpopela@redhat.com>
1928
1929         [GTK] Drag and drop is always moving the content even if copy is requested
1930         https://bugs.webkit.org/show_bug.cgi?id=168424
1931
1932         Reviewed by Carlos Garcia Campos.
1933
1934         Drag and drop is always moving the content around even if the copy is
1935         requested (i.e. by pressing the Control key).
1936
1937         * UIProcess/gtk/DragAndDropHandler.cpp:
1938         (WebKit::DragAndDropHandler::drop):
1939
1940 2017-02-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1941
1942         Better handle Thread and RunLoop initialization
1943         https://bugs.webkit.org/show_bug.cgi?id=167828
1944
1945         Reviewed by Yusuke Suzuki.
1946
1947         Remove unnecessary call to WTF::initializeMainThread().
1948
1949         * Shared/WebKit2Initialize.cpp:
1950         (WebKit::InitializeWebKit2):
1951
1952 2017-02-22  Chris Dumez  <cdumez@apple.com>
1953
1954         Unreviewed, drop console logging landed by mistake as part of r212832.
1955
1956         * UIProcess/BackgroundProcessResponsivenessTimer.cpp:
1957         (WebKit::BackgroundProcessResponsivenessTimer::timerFired):
1958
1959 2017-02-22  Brent Fulgham  <bfulgham@apple.com>
1960
1961         [Mac] Tighten sandbox to deny process-info* access
1962         https://bugs.webkit.org/show_bug.cgi?id=168704
1963         <rdar://problem/16371441>
1964
1965         Reviewed by Alex Christensen.
1966
1967         Tighten the various WebKit sandboxes by denying access to process-info.
1968         Add back specific features needed to run WebKit tests and to do browsing
1969         of websites (including plugins).
1970
1971         * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
1972         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1973         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1974         * WebProcess/com.apple.WebProcess.sb.in:
1975
1976 2017-02-22  Anders Carlsson  <andersca@apple.com>
1977
1978         Crash if there's a mismatch between the WebKit used by the UI process and child processes respectively
1979         https://bugs.webkit.org/show_bug.cgi?id=168739
1980         Part of rdar://problem/30631411.
1981
1982         Reviewed by Geoffrey Garen.
1983
1984         If the UI process and web process for some reason end up using different versions of the WebKit framework, weird things happen
1985         because the message format is different between versions. To avoid this, send along the WebKit bundle version from the UI process
1986         in the XPC bootstrap message, check that it matches inside the XPC main functions. If there's a mismatch, crash.
1987
1988         * Shared/Cocoa/ChildProcessCocoa.mm:
1989         (WebKit::ChildProcess::didReceiveInvalidMessage):
1990         Fix parameters.
1991
1992         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1993         (main):
1994         Check for the bundle version and crash if it's not what we expect.
1995
1996         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1997         (WebKit::ProcessLauncher::launchProcess):
1998         Initialize the bundle version.
1999
2000         * WebProcess/cocoa/WebProcessCocoa.mm:
2001         (WebKit::_WKSetCrashReportApplicationSpecificInformation):
2002         Export this so we can call it from the XPC services without having to link WKSI.
2003
2004 2017-02-22  Chris Dumez  <cdumez@apple.com>
2005
2006         [WK2] Call processDidBecomeUnresponsive delegate when a background process is unresponsive
2007         https://bugs.webkit.org/show_bug.cgi?id=168683
2008         <rdar://problem/30558745>
2009
2010         Reviewed by Dan Bernstein.
2011
2012         Call processDidBecomeUnresponsive delegate when a background process is unresponsive
2013         instead of killing it on WebKit side. This gives the client the choice about what it
2014         wants to do about this process.
2015
2016         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2017         (API::ProcessPoolConfiguration::copy):
2018         * UIProcess/API/APIProcessPoolConfiguration.h:
2019         * UIProcess/API/C/WKContext.cpp:
2020         * UIProcess/API/C/WKContextPrivate.h:
2021         * UIProcess/BackgroundProcessResponsivenessTimer.cpp: Renamed from Source/WebKit2/UIProcess/UnresponsiveWebProcessTerminator.cpp.
2022         (WebKit::BackgroundProcessResponsivenessTimer::BackgroundProcessResponsivenessTimer):
2023         (WebKit::BackgroundProcessResponsivenessTimer::updateState):
2024         (WebKit::BackgroundProcessResponsivenessTimer::timerFired):
2025         * UIProcess/BackgroundProcessResponsivenessTimer.h: Renamed from Source/WebKit2/UIProcess/UnresponsiveWebProcessTerminator.h.
2026         * UIProcess/WebPageProxy.cpp:
2027         (WebKit::WebPageProxy::reattachToWebProcess):
2028         (WebKit::WebPageProxy::dispatchActivityStateChange):
2029         (WebKit::WebPageProxy::terminateProcess):
2030         * UIProcess/WebPageProxy.h:
2031         * UIProcess/WebProcessProxy.cpp:
2032         (WebKit::m_backgroundResponsivenessTimer):
2033         * UIProcess/WebProcessProxy.h:
2034         * WebKit2.xcodeproj/project.pbxproj:
2035
2036 2017-02-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2037
2038         NetworkProcess: Stop disabling buffering when NETWORK_CACHE is disabled in build
2039         https://bugs.webkit.org/show_bug.cgi?id=168637
2040
2041         Reviewed by Alex Christensen.
2042
2043         It was added in r193752 as part of bug #137692 to fix an infinite loop in network process that happened in EFL
2044         because they didn't enable the network cache at that time. I think that was actually a workaround, and it was
2045         added without any comment so it has stayed there even when EFL enabled disk cache, and now that is gone. Looking
2046         at current code I see no reason why buffering can't work with the disk cache disabled, so I think it's time to
2047         remove that workaround.
2048
2049         * WebProcess/Network/WebLoaderStrategy.cpp:
2050         (WebKit::maximumBufferingTime):
2051
2052 2017-02-21  Youenn Fablet  <youenn@apple.com>
2053
2054         [WebRTC][Mac] Activate libwebrtc
2055         https://bugs.webkit.org/show_bug.cgi?id=167293
2056         <rdar://problem/30401864>
2057
2058         Reviewed by Alex Christensen.
2059
2060         Activating PeerConnection runtime flag based on successful loading of libwebrtc.dylib.
2061
2062         * Configurations/WebKit.xcconfig:
2063         * Configurations/FeatureDefines.xcconfig:
2064         * Shared/WebPreferencesDefinitions.h:
2065         * UIProcess/WebPreferences.cpp:
2066         (WebKit::checkWebRTCAvailability):
2067
2068 2017-02-21  Commit Queue  <commit-queue@webkit.org>
2069
2070         Unreviewed, rolling out r212786.
2071         https://bugs.webkit.org/show_bug.cgi?id=168710
2072
2073         It broke GTK+ port when using single shared process model
2074         (Requested by KaL on #webkit).
2075
2076         Reverted changeset:
2077
2078         "Refactor WebViewImpl creation in preparation for supporting
2079         multiple WebsiteDataStores."
2080         https://bugs.webkit.org/show_bug.cgi?id=168676
2081         http://trac.webkit.org/changeset/212786
2082
2083 2017-02-21  Brady Eidson  <beidson@apple.com>
2084
2085         Refactor WebViewImpl creation in preparation for supporting multiple WebsiteDataStores.
2086         https://bugs.webkit.org/show_bug.cgi?id=168676
2087
2088         Reviewed by Alex Christensen.
2089
2090         * UIProcess/API/Cocoa/WKWebView.mm:
2091         (-[WKWebView _initializeWithConfiguration:]): Allow for WebViewImpl creation to fail.
2092
2093         * UIProcess/API/mac/WKView.mm:
2094         (-[WKView initWithFrame:processPool:configuration:]): Ditto.
2095
2096         * UIProcess/Cocoa/WebViewImpl.h:
2097         * UIProcess/Cocoa/WebViewImpl.mm:
2098         (WebKit::WebViewImpl::maybeCreate):
2099         (WebKit::WebViewImpl::WebViewImpl):
2100
2101         * UIProcess/WebPageProxy.cpp:
2102         (WebKit::WebPageProxy::reattachToWebProcess): New WebProcess creation might fail. Handle it.
2103         * UIProcess/WebProcessPool.cpp:
2104         (WebKit::WebProcessPool::createNewWebProcess):
2105         (WebKit::WebProcessPool::warmInitialProcess):
2106         (WebKit::WebProcessPool::maybeCreateNewWebProcessRespectingProcessCountLimit): This can now fail
2107           if the process will have a non-default WebsiteDataStore but we've already reached the process cap.
2108         (WebKit::WebProcessPool::createWebPage):
2109         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit): Deleted.
2110         * UIProcess/WebProcessPool.h:
2111
2112 2017-02-21  Youenn Fablet  <youenn@apple.com>
2113
2114         [WebRTC] WebKit2 should assert that libwebrtc transmitted IP addresses family is IP4 or IP6
2115         https://bugs.webkit.org/show_bug.cgi?id=168691
2116
2117         Reviewed by Alex Christensen.
2118
2119         Adding some asserts that family is IPv4 or IPv6.
2120
2121         * Shared/RTCNetwork.cpp:
2122         (WebKit::RTCNetwork::IPAddress::decode):
2123         (WebKit::RTCNetwork::IPAddress::encode):
2124
2125 2017-02-20  Simon Fraser  <simon.fraser@apple.com>
2126
2127         Add support to PlatformCALayer/GraphicsLayerCA for subpixel-antialiased text, with a Setting and a MiniBrowser switch
2128         https://bugs.webkit.org/show_bug.cgi?id=168620
2129         <rdar://problem/30617772>
2130
2131         Reviewed by Tim Horton.
2132
2133         Add a Setting for subpixel-antialiased layer text. Plumb this through GraphicsLayerCA and
2134         PlatformCALayer, where it ultimately affects the layer contents format.
2135         
2136         This is not supported with UI-side compositing.
2137
2138         * Shared/WebPreferencesDefinitions.h:
2139         * UIProcess/API/C/WKPreferences.cpp:
2140         (WKPreferencesSetSubpixelAntialiasedLayerTextEnabled):
2141         (WKPreferencesGetSubpixelAntialiasedLayerTextEnabled):
2142         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2143         * UIProcess/API/Cocoa/WKPreferences.mm:
2144         (-[WKPreferences _subpixelAntialiasedLayerTextEnabled]):
2145         (-[WKPreferences _setSubpixelAntialiasedLayerTextEnabled:]):
2146         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2147         * WebProcess/WebPage/WebPage.cpp:
2148         (WebKit::WebPage::updatePreferences):
2149         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2150         (WebKit::PlatformCALayerRemote::supportsSubpixelAntialiasedText):
2151         (WebKit::PlatformCALayerRemote::setSupportsSubpixelAntialiasedText):
2152         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2153         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2154         (WebKit::PlatformCALayerRemoteTiledBacking::supportsSubpixelAntialiasedText):
2155         (WebKit::PlatformCALayerRemoteTiledBacking::setSupportsSubpixelAntialiasedText):
2156         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2157
2158 2017-02-21  John Wilander  <wilander@apple.com>
2159
2160         Resource Load Statistics: Only scan website data store once per session ID + reinstate removal counting
2161         https://bugs.webkit.org/show_bug.cgi?id=168541
2162
2163         Reviewed by Alex Christensen.
2164
2165         * UIProcess/WebProcessProxy.cpp:
2166         (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyOwnedDomainsInAllPersistentDataStores):
2167             The CallbackAggregator now merges a list of domains for which we
2168             have removed data records and eventually reports this back to the
2169             caller.
2170         * UIProcess/WebProcessProxy.h:
2171         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2172         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
2173             Now reports back to its WebCore::ResourceLoadStatisticsStore
2174             which domains have had data records removed.
2175         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2176         (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyOwnedDomains):
2177             The completion handler now handles data record removal counting.
2178         (WebKit::WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains):
2179             The completion handler now handles data record removal counting.
2180         * UIProcess/WebsiteData/WebsiteDataStore.h:
2181
2182 2017-02-21  Alex Christensen  <achristensen@webkit.org>
2183
2184         Fix CMake build.
2185
2186         * PlatformMac.cmake:
2187
2188 2017-02-21  Youenn Fablet  <youenn@apple.com>
2189
2190         [WebRTC][Mac] Network process sandbox does not allow WebRTC networking
2191         https://bugs.webkit.org/show_bug.cgi?id=168594
2192
2193         Reviewed by Brent Fulgham.
2194
2195         UIProcess was passing a boolean to know whether WebRTC networking is allowed or not to the network process.
2196         This boolean was known to late for the sandbox to be relaxed.
2197         A sandbox extension is now used instead to relax the sandbox.
2198
2199         * NetworkProcess/NetworkProcess.h:
2200         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2201         (WebKit::NetworkProcessCreationParameters::encode):
2202         (WebKit::NetworkProcessCreationParameters::decode):
2203         * NetworkProcess/NetworkProcessCreationParameters.h:
2204         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2205         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2206         * NetworkProcess/mac/NetworkProcessMac.mm:
2207         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2208         (WebKit::NetworkProcess::initializeSandbox):
2209         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2210         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2211         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2212
2213 2017-02-21  Youenn Fablet  <youenn@apple.com>
2214
2215         [WebRTC] ICE candidates should be filtered according a policy
2216         https://bugs.webkit.org/show_bug.cgi?id=168348
2217
2218         Reviewed by Alex Christensen.
2219
2220         Adding the possibility for the UI process to control the ICE candidate filtering and whether libwebrtc can
2221         enumerate all interfaces or not.
2222
2223         Disabling ICE candidate filtering for the moment.
2224         Enabling to enumerate all interfaces for the moment.
2225
2226         In the future, ICE candidate filtering should be tied to getUserMedia.
2227         Interface enumeration should be disabled with the default configuration.
2228         We should do that once we have sufficient testing in various network infrastructures.
2229
2230         * UIProcess/WebPageProxy.cpp:
2231         (WebKit::WebPageProxy::initializeWebPage):
2232         * WebKit2.xcodeproj/project.pbxproj:
2233         * WebProcess/WebPage/WebPage.h:
2234         (WebKit::WebPage::disableICECandidateFiltering):
2235         (WebKit::WebPage::enableICECandidateFiltering):
2236         (WebKit::WebPage::disableEnumeratingAllNetworkInterfaces):
2237         (WebKit::WebPage::enableEnumeratingAllNetworkInterfaces):
2238         * WebProcess/WebPage/WebPage.messages.in:
2239
2240 2017-02-21  Youenn Fablet  <youenn@apple.com>
2241
2242         [WebRTC] NetworkRTCMonitor should ensure clearing its manager only once
2243         https://bugs.webkit.org/show_bug.cgi?id=168661
2244
2245         Reviewed by Alex Christensen.
2246
2247         Making sure NetworkRTCMonitor manager is cleared only once.
2248         ALso ensuring that manager does not get destroyed as part of NetworkRTCMonitor destructor.
2249         The manager needs to be destroyed in the RTC network thread.
2250
2251         * NetworkProcess/webrtc/NetworkRTCMonitor.cpp:
2252         (WebKit::NetworkRTCMonitor::~NetworkRTCMonitor):
2253         (WebKit::NetworkRTCMonitor::stopUpdating):
2254         * NetworkProcess/webrtc/NetworkRTCMonitor.h:
2255
2256 2017-02-21  Brent Fulgham  <bfulgham@apple.com>
2257
2258         [WebRTC][Mac][WebKit2] Revise sandbox to limit connections to UDP and TCP
2259         https://bugs.webkit.org/show_bug.cgi?id=168664
2260         <rdar://problem/30600587>
2261
2262         Reviewed by Youenn Fablet.
2263
2264         Add filters to the WebRTC rule to limit network traffic to UDP and TCP.
2265
2266         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2267
2268 2017-02-21  Maureen Daum  <mdaum@apple.com>
2269
2270         Check what LocalStorage data exists in deleteDatabasesModifiedSince() before attempting deletion.
2271         https://bugs.webkit.org/show_bug.cgi?id=168659
2272         rdar://problem/22781730
2273
2274         Reviewed by Brady Eidson.
2275
2276         Check what LocalStorage data exists in deleteDatabasesModifiedSince() before attempting deletion.
2277         It is possible that another process has caused information to be added to LocalStorage
2278         after we created this LocalStorageDatabaseTracker instance, so we should update our
2279         internal state by checking the contents of StorageTracker.db and the other local
2280         storage files so we know what databases actually exist. By calling importOriginIdentifiers()
2281         at the start of deleteDatabasesModifiedSince(), m_origins will now have the up-to-date
2282         list of origins LocalStorage contains data for.
2283
2284         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2285         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
2286
2287 2017-02-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2288
2289         Reduce platform ifdefs in WebKit2 custom protocols implementation
2290         https://bugs.webkit.org/show_bug.cgi?id=165028
2291
2292         Reviewed by Darin Adler.
2293
2294         Make mac implementation use the APICustomProtocolManagerClient to share more code with the soup based ports.
2295
2296         * CMakeLists.txt: Add CustomProtocolManagerProxy.cpp.
2297         * PlatformEfl.cmake: Remove CustomProtocolManagerProxySoup.cpp.
2298         * PlatformGTK.cmake: Ditto.
2299         * PlatformMac.cmake: Remove CustomProtocolManagerProxyMac.mm.
2300         * UIProcess/API/APICustomProtocolManagerClient.h:
2301         (API::CustomProtocolManagerClient::startLoading): Make it void, since we were always returning true and the
2302         returned value was ignored.
2303         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
2304         (EwkUrlSchemeRequest::finish): Update to new CustomProtocolManagerProxy API.
2305         * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
2306         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
2307         (webkitURISchemeRequestReadCallback): Ditto.
2308         * UIProcess/Cocoa/CustomProtocolManagerClient.h: Added.
2309         * UIProcess/Cocoa/CustomProtocolManagerClient.mm: Added.
2310         (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:]):
2311         (-[WKCustomProtocolLoader dealloc]):
2312         (-[WKCustomProtocolLoader connection:didFailWithError:]):
2313         (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
2314         (-[WKCustomProtocolLoader connection:didReceiveData:]):
2315         (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
2316         (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
2317         (WebKit::CustomProtocolManagerClient::startLoading):
2318         (WebKit::CustomProtocolManagerClient::stopLoading):
2319         (WebKit::CustomProtocolManagerClient::invalidate):
2320         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2321         (WebKit::WebProcessPool::platformInitialize): Set the CustomProtocolManagerClient.
2322         (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
2323         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Added.
2324         (WebKit::CustomProtocolManagerProxy::startLoading):
2325         (WebKit::CustomProtocolManagerProxy::processDidClose):
2326         (WebKit::CustomProtocolManagerProxy::wasRedirectedToRequest):
2327         (WebKit::CustomProtocolManagerProxy::didReceiveResponse):
2328         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2329         * UIProcess/WebProcessPool.cpp:
2330         (WebKit::globalURLSchemesWithCustomProtocolHandlers): Just moved here to use it from ensureNetworkProcess().
2331         (WebKit::WebProcessPool::WebProcessPool): Remove soup ifdefs.
2332         (WebKit::WebProcessPool::setCustomProtocolManagerClient): Moved from the soup implementation.
2333         (WebKit::WebProcessPool::ensureNetworkProcess): Initialize custom protocols parameters.
2334         (WebKit::WebProcessPool::registerSchemeForCustomProtocol): Register the protocol if not already registered globally.
2335         (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): Remove soup ifdefs.
2336         * UIProcess/WebProcessPool.h: Remove soup ifdefs.
2337         * UIProcess/efl/RequestManagerClientEfl.cpp:
2338         * UIProcess/soup/WebProcessPoolSoup.cpp:
2339         (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
2340         * WebKit2.xcodeproj/project.pbxproj:
2341
2342 2017-02-21  Daewoong Jang  <daewoong.jang@navercorp.com>
2343
2344         Remove unused files.
2345         https://bugs.webkit.org/show_bug.cgi?id=168656.
2346
2347         Reviewed by Csaba Osztrogonác.
2348
2349         Remove files which became unused after removal of EFL port.
2350
2351         * UIProcess/CoordinatedGraphics/PageViewportController.cpp: Removed.
2352         * UIProcess/CoordinatedGraphics/PageViewportController.h: Removed.
2353         * UIProcess/PageViewportControllerClient.h: Removed.
2354
2355 2017-02-21  Youenn Fablet  <youenn@apple.com>
2356
2357         [WebRTC] LibWebRTCSocket::SendTo message should have a correct SocketAddress
2358         https://bugs.webkit.org/show_bug.cgi?id=168636
2359
2360         Reviewed by Eric Carlson.
2361
2362         * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
2363         (WebKit::LibWebRTCSocket::SendTo): Ensuring address remains valid during SendTo message lifetime.
2364
2365 2017-02-21  Alex Christensen  <achristensen@webkit.org>
2366
2367         Unreviewed, rolling out r212699.
2368
2369         Internal build not ready
2370
2371         Reverted changeset:
2372
2373         "[WebRTC][Mac] Activate libwebrtc"
2374         https://bugs.webkit.org/show_bug.cgi?id=167293
2375         http://trac.webkit.org/changeset/212699
2376
2377 2017-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2378
2379         Remove ENABLE_THREADED_COMPOSITOR build option
2380         https://bugs.webkit.org/show_bug.cgi?id=168606
2381
2382         Reviewed by Michael Catanzaro.
2383
2384         Now that we have AC mode on demand with the threaded compositor there's no reason to keep the old AC code.
2385
2386         * PlatformGTK.cmake:
2387         * WebProcess/WebPage/LayerTreeHost.cpp:
2388         (WebKit::LayerTreeHost::create):
2389         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: Removed.
2390         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Removed.
2391
2392 2017-02-20  Youenn Fablet  <youenn@apple.com>
2393
2394         [WebRTC][Mac] Activate libwebrtc
2395         https://bugs.webkit.org/show_bug.cgi?id=167293
2396         <rdar://problem/30401864>
2397
2398         Reviewed by Alex Christensen.
2399
2400         Activating PeerConnection runtime flag based on successful loading of libwebrtc.dylib.
2401
2402         * Configurations/WebKit.xcconfig:
2403         * Shared/WebPreferencesDefinitions.h:
2404         * UIProcess/WebPreferences.cpp:
2405         (WebKit::checkWebRTCAvailability):
2406
2407 2017-02-20  Ryan Haddad  <ryanhaddad@apple.com>
2408
2409         Unreviewed, rolling out r212685.
2410
2411         This change broke the 32-bit Sierra build.
2412
2413         Reverted changeset:
2414
2415         "Resource Load Statistics: Add alternate classification
2416         method"
2417         https://bugs.webkit.org/show_bug.cgi?id=168347
2418         http://trac.webkit.org/changeset/212685
2419
2420 2017-02-20  John Wilander  <wilander@apple.com>
2421
2422         Resource Load Statistics: Add alternate classification method
2423         https://bugs.webkit.org/show_bug.cgi?id=168347
2424         <rdar://problem/30352793>
2425
2426         Reviewed by Alex Christensen.
2427
2428         This patch adds a CorePrediction-based classifier to the WebResourceLoadStatisticsStore.
2429         The CorePrediction framework is introduced as a dependency for macOS and iOS. The patch
2430         also adds functions to support layout tests of the feature.
2431
2432         * Configurations/BaseTarget.xcconfig:
2433         * Configurations/WebKit.xcconfig:
2434             Added dependency on CorePrediction.
2435         * Platform/classifier: Added.
2436         * Platform/classifier/ResourceLoadStatisticsClassifier.h: Added.
2437             Pulls in the Cocoa-specific classifier for Cocoa-based platforms.
2438         (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
2439         * Platform/classifier/ResourceLoadStatisticsClassifierBase.cpp: Added.
2440         (WebKit::ResourceLoadStatisticsClassifierBase::hasPrevalentResourceCharacteristics):
2441             Shared classifier logic.
2442         (WebKit::ResourceLoadStatisticsClassifierBase::classifyWithVectorThreshold):
2443             Fallback classifier for when we don't have CorePrediction.
2444         * Platform/classifier/ResourceLoadStatisticsClassifierBase.h: Added.
2445         (WebKit::ResourceLoadStatisticsClassifierBase::ResourceLoadStatisticsClassifierBase):
2446         (WebKit::ResourceLoadStatisticsClassifierBase::~ResourceLoadStatisticsClassifierBase):
2447         * Platform/classifier/cocoa: Added.
2448         * Platform/classifier/cocoa/CorePredictionSPI.h: Added.
2449             Includes CorePrediction if available, otherwise declares needed symbols.
2450             Always redeclares the functions so we'll get a build error if
2451             CorePrediction changes.
2452         * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: Added.
2453         (WebKit::ResourceLoadStatisticsClassifier::classify):
2454         (WebKit::ResourceLoadStatisticsClassifier::storagePath):
2455         (WebKit::ResourceLoadStatisticsClassifier::shouldUseCorePrediction):
2456             The new classifier for Cocoa platforms.
2457         * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h: Added.
2458         (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
2459         * PlatformGTK.cmake:
2460            Added Platform/classifier directory and ResourceLoadStatisticsClassifierBase.cpp.
2461         * PlatformMac.cmake:
2462            Added Platform/classifier and Platform/classifier/cocoa directories, and
2463            source files ResourceLoadStatisticsClassifierBase.cpp and
2464            ResourceLoadStatisticsClassifierCocoa.cpp
2465         * Resources/ResourceLoadStatistics: Added.
2466         * Resources/ResourceLoadStatistics/corePrediction_model: Added.
2467             Model file to load into CorePrediction.
2468         * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
2469         (WKResourceLoadStatisticsManagerSetSubframeUnderTopFrameOrigin):
2470         (WKResourceLoadStatisticsManagerSetSubresourceUnderTopFrameOrigin):
2471         (WKResourceLoadStatisticsManagerSetSubresourceUniqueRedirectTo):
2472             Test infrastructure.
2473         * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
2474         * UIProcess/WebResourceLoadStatisticsManager.cpp:
2475         (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
2476         (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
2477         (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
2478             Test infrastructure.
2479         * UIProcess/WebResourceLoadStatisticsManager.h:
2480         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2481         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
2482             Renamed m_storagePath to m_statisticsStoragePath for clarity.
2483         (WebKit::WebResourceLoadStatisticsStore::classifyResource):
2484             Now calls the classifier through its ResourceLoadStatisticsClassifier
2485             member variable.
2486         (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
2487             Renamed m_storagePath to m_statisticsStoragePath for clarity.
2488         (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
2489             Renamed m_storagePath to m_statisticsStoragePath for clarity.
2490         (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics): Deleted.
2491         * UIProcess/WebResourceLoadStatisticsStore.h:
2492         * WebKit2.xcodeproj/project.pbxproj:
2493             Added the new classifier source files under Platform/classifier and the
2494             corePrediction_model file under Resources/ResourceLoadStatistics.
2495
2496 2017-02-20  Wenson Hsieh  <wenson_hsieh@apple.com>
2497
2498         Add plumbing to the UI process for TextIndicatorData when computing the drag image
2499         https://bugs.webkit.org/show_bug.cgi?id=168583
2500         Work towards <rdar://problem/30313681>
2501
2502         Reviewed by Tim Horton.
2503
2504         Changes the SetDragImage IPC message to send TextIndicatorData over to the UI process. Also changes the boolean
2505         isLink parameter to be a DragSourceAction instead, leaving it up to the receiving end (in the UI process) to
2506         special case links.
2507
2508         Additionally, renames hasDataInteractionAtPosition to hasSelectionAtPosition to better reflect its purpose.
2509
2510         These changes are only infrastructural should not alter any behaviors.
2511
2512         * Shared/ios/InteractionInformationAtPosition.h:
2513         * Shared/ios/InteractionInformationAtPosition.mm:
2514         (WebKit::InteractionInformationAtPosition::encode):
2515         (WebKit::InteractionInformationAtPosition::decode):
2516         * UIProcess/API/Cocoa/WKWebView.mm:
2517         (-[WKWebView _simulateDataInteractionGestureRecognized]):
2518         (-[WKWebView _simulateDataInteractionEntered:]):
2519         (-[WKWebView _simulateDataInteractionUpdated:]):
2520         (-[WKWebView _simulateDataInteractionPerformOperation:]):
2521         (-[WKWebView _simulateDataInteractionEnded:]):
2522         (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]):
2523         (-[WKWebView _simulateFailedDataInteractionWithIndex:]):
2524         (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]):
2525         (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]):
2526         * UIProcess/API/Cocoa/_WKTestingDelegate.h:
2527         * UIProcess/PageClient.h:
2528         * UIProcess/WebPageProxy.h:
2529         * UIProcess/WebPageProxy.messages.in:
2530         * UIProcess/ios/PageClientImplIOS.h:
2531         * UIProcess/ios/PageClientImplIOS.mm:
2532         (WebKit::PageClientImpl::setDragImage):
2533         (WebKit::PageClientImpl::startDataInteractionWithImage):
2534         * UIProcess/ios/WKContentViewInteraction.h:
2535         * UIProcess/ios/WKContentViewInteraction.mm:
2536         (-[WKContentView hasSelectablePositionAtPoint:]):
2537         (-[WKContentView pointIsInDataInteractionContent:]):
2538         (-[WKContentView _dataInteractionGestureRecognizer]):
2539         (-[WKContentView pointIsInAssistedNode:]):
2540         * UIProcess/mac/PageClientImpl.h:
2541         * UIProcess/mac/PageClientImpl.mm:
2542         (WebKit::PageClientImpl::setDragImage):
2543         * UIProcess/mac/WebPageProxyMac.mm:
2544         (WebKit::WebPageProxy::setDragImage):
2545         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2546         (WebKit::WebDragClient::startDrag):
2547         * WebProcess/WebPage/ios/WebPageIOS.mm:
2548         (WebKit::WebPage::getPositionInformation):
2549
2550 2017-02-20  David Quesada  <david_quesada@apple.com>
2551
2552         Don’t set NSURLSessionConfiguration’s _sourceApplicationAuditTokenData if _sourceApplicationBundleIdentifier is also set.
2553         https://bugs.webkit.org/show_bug.cgi?id=168607
2554
2555         rdar://problem/30239618
2556
2557         Reviewed by Geoffrey Garen.
2558
2559         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2560         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2561         If the process pool configuration sets a source application bundle identifier, don't give the NSURLSession configuration
2562         the audit token from the UI process, as it may be associated with an application with a conflicting bundle identifier.
2563
2564 2017-02-20  Ryan Haddad  <ryanhaddad@apple.com>
2565
2566         Unreviewed, rolling out r212632.
2567
2568         This change appears to have caused API test failures.
2569
2570         Reverted changeset:
2571
2572         "Reduce platform ifdefs in WebKit2 custom protocols
2573         implementation"
2574         https://bugs.webkit.org/show_bug.cgi?id=165028
2575         http://trac.webkit.org/changeset/212632
2576
2577 2017-02-20  Youenn Fablet  <youenn@apple.com>
2578
2579         [WebRTC] Fix some memory leaks in libwebrtc binding code
2580         https://bugs.webkit.org/show_bug.cgi?id=168596
2581
2582         Reviewed by Eric Carlson.
2583
2584         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
2585         (WebKit::NetworkRTCProvider::OnMessage):
2586
2587 2017-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2588
2589         Remove code under USE(GRAPHICS_SURFACE)
2590         https://bugs.webkit.org/show_bug.cgi?id=168592
2591
2592         Reviewed by Michael Catanzaro.
2593
2594         This was only used by EFL port.
2595
2596         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2597         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
2598         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
2599         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
2600         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2601         (WebKit::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
2602         (WebKit::CoordinatedGraphicsScene::deleteLayer):
2603         (WebKit::CoordinatedGraphicsScene::assignImageBackingToLayer):
2604         (WebKit::CoordinatedGraphicsScene::purgeGLResources):
2605         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2606         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
2607         (WebKit::WebCoordinatedSurface::Handle::encode):
2608         (WebKit::WebCoordinatedSurface::Handle::decode):
2609         (WebKit::WebCoordinatedSurface::create):
2610         (WebKit::WebCoordinatedSurface::createGraphicsContext):
2611         (WebKit::WebCoordinatedSurface::createHandle):
2612         (WebKit::WebCoordinatedSurface::copyToTexture):
2613         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
2614
2615 2017-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2616
2617         Reduce platform ifdefs in WebKit2 custom protocols implementation
2618         https://bugs.webkit.org/show_bug.cgi?id=165028
2619
2620         Reviewed by Darin Adler.
2621
2622         Make mac implementation use the APICustomProtocolManagerClient to share more code with the soup based ports.
2623
2624         * CMakeLists.txt: Add CustomProtocolManagerProxy.cpp.
2625         * PlatformEfl.cmake: Remove CustomProtocolManagerProxySoup.cpp.
2626         * PlatformGTK.cmake: Ditto.
2627         * PlatformMac.cmake: Remove CustomProtocolManagerProxyMac.mm.
2628         * UIProcess/API/APICustomProtocolManagerClient.h:
2629         (API::CustomProtocolManagerClient::startLoading): Make it void, since we were always returning true and the
2630         returned value was ignored.
2631         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
2632         (EwkUrlSchemeRequest::finish): Update to new CustomProtocolManagerProxy API.
2633         * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
2634         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
2635         (webkitURISchemeRequestReadCallback): Ditto.
2636         * UIProcess/Cocoa/CustomProtocolManagerClient.h: Added.
2637         * UIProcess/Cocoa/CustomProtocolManagerClient.mm: Added.
2638         (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:]):
2639         (-[WKCustomProtocolLoader dealloc]):
2640         (-[WKCustomProtocolLoader connection:didFailWithError:]):
2641         (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
2642         (-[WKCustomProtocolLoader connection:didReceiveData:]):
2643         (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
2644         (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
2645         (WebKit::CustomProtocolManagerClient::startLoading):
2646         (WebKit::CustomProtocolManagerClient::stopLoading):
2647         (WebKit::CustomProtocolManagerClient::invalidate):
2648         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2649         (WebKit::WebProcessPool::platformInitialize): Set the CustomProtocolManagerClient.
2650         (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
2651         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Added.
2652         (WebKit::CustomProtocolManagerProxy::startLoading):
2653         (WebKit::CustomProtocolManagerProxy::processDidClose):
2654         (WebKit::CustomProtocolManagerProxy::wasRedirectedToRequest):
2655         (WebKit::CustomProtocolManagerProxy::didReceiveResponse):
2656         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2657         * UIProcess/WebProcessPool.cpp:
2658         (WebKit::globalURLSchemesWithCustomProtocolHandlers): Just moved here to use it from ensureNetworkProcess().
2659         (WebKit::WebProcessPool::WebProcessPool): Remove soup ifdefs.
2660         (WebKit::WebProcessPool::setCustomProtocolManagerClient): Moved from the soup implementation.
2661         (WebKit::WebProcessPool::ensureNetworkProcess): Initialize custom protocols parameters.
2662         (WebKit::WebProcessPool::registerSchemeForCustomProtocol): Register the protocol if not already registered globally.
2663         (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): Remove soup ifdefs.
2664         * UIProcess/WebProcessPool.h: Remove soup ifdefs.
2665         * UIProcess/efl/RequestManagerClientEfl.cpp:
2666         * UIProcess/soup/WebProcessPoolSoup.cpp:
2667         (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
2668         * WebKit2.xcodeproj/project.pbxproj:
2669
2670 2017-02-20  Manuel Rego Casasnovas  <rego@igalia.com>
2671
2672         [css-grid] Remove compilation flag ENABLE_CSS_GRID_LAYOUT
2673         https://bugs.webkit.org/show_bug.cgi?id=167693
2674
2675         Reviewed by Sergio Villar Senin.
2676
2677         * Configurations/FeatureDefines.xcconfig:
2678         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2679         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2680         * WebProcess/WebPage/WebPage.cpp:
2681         (WebKit::WebPage::updatePreferences):
2682
2683 2017-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2684
2685         REGRESSION(r212345): [GTK] ASSERT(cookieChangeCallbackMap().contains(jar)) failed in WebCore::stopObservingCookieChanges:54
2686         https://bugs.webkit.org/show_bug.cgi?id=168375
2687
2688         Reviewed by Alex Christensen.
2689
2690         Simplify the cookies change notification. The current approach of the UI process telling the network process
2691         when to start and stop observing cookie changes is quite fragile and error prone. In the GTK+ port we always
2692         observe cookies, so our cookie manager always calls start in the constructor and stop in the destructor.
2693         Everything would be a lot simpler if the network process always monitored cookies.
2694
2695         * NetworkProcess/soup/NetworkSessionSoup.cpp:
2696         (WebKit::NetworkSessionSoup::NetworkSessionSoup): Set cookies observer handler for the session.
2697         (WebKit::NetworkSessionSoup::~NetworkSessionSoup): Remove the cookies observer handler.
2698         * UIProcess/API/gtk/WebKitCookieManager.cpp:
2699         (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate): Remove the cookies observer callback.
2700         (webkit_cookie_manager_class_init): Remove dispose implementation that is no longer needed.
2701         (webkitCookieManagerCreate): Set the cookies observer callback.
2702         (webkit_cookie_manager_set_persistent_storage): Remove code to start/stop observing cookies when the jar
2703         changes, the network process deals with that now.
2704         (webkitCookieManagerDispose): Deleted.
2705         * UIProcess/WebCookieManagerProxy.cpp:
2706         (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Remove the optional callback method in favor of an
2707         explicit method to the set the callback that doesn't send the StartObservingCookieChanges message to the network
2708         process.
2709         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Do not change the callback map here.
2710         (WebKit::WebCookieManagerProxy::setCookieObserverCallback): Add the callback to the map or remove the session if
2711         nullptr is given.
2712         * UIProcess/WebCookieManagerProxy.h:
2713         * WebProcess/Cookies/WebCookieManager.cpp:
2714         (WebKit::WebCookieManager::notifyCookiesDidChange): Send CookiesDidChange message to the UI process.
2715         (WebKit::WebCookieManager::startObservingCookieChanges): Use notifyCookiesDidChange().
2716         * WebProcess/Cookies/WebCookieManager.h:
2717         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
2718         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Set the policy on all sessions. Code moved from
2719         WebFrameNetworkingContext since it doesn't belong there.
2720         (WebKit::WebCookieManager::setCookiePersistentStorage): Use new method to set the cookie storage in the
2721         NetworkStorageSession.
2722         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2723         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Deleted.
2724         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
2725
2726 2017-02-19  Chris Dumez  <cdumez@apple.com>
2727
2728         [WK2] Support termination of unresponsive WebContent processes that are in the background
2729         https://bugs.webkit.org/show_bug.cgi?id=168479
2730         <rdar://problem/30558745>
2731
2732         Reviewed by Antti Koivisto.
2733
2734         Support termination of unresponsive WebContent processes that are in the background.
2735         This protects us against cases where a background tab is unresponsive and has high CPU
2736         usage, thus draining the battery without the user knowing about it (e.g.
2737         <rdar://problem/29808005>).
2738
2739         The feature works as follows:
2740         - If a WebProcessProxy has pages but none of them are visible, then it will check
2741           regularly if its associated WebContent process is still responsive.
2742         - Every time we find that the WebContent process is responsive, we exponentially
2743           back off the timer to avoid waking up the process too often. The timer initially
2744           uses a 20 seconds interval and can back off up to 8 hours.
2745         - If the WebContent process is unresponsive, then we terminate it. No notification
2746           is shown to the user and the termination is not immediately observable since the
2747           tab is not visible and its title remains. The tab is not immediately reloaded
2748           so as to avoid getting back into a bad state in the background (and have a
2749           yo-yo effect).
2750         - If the user switches to a tab that was previously killed for being unresponsive
2751           while in the background, we will then reload the tab in a fresh WebContent
2752           process. The crash banner will only be shown if the tab has ever been visible.
2753           If it wasn't ever visible (e.g. session restore case), then it will look as if
2754           the tab loads for the first time when the user switches to it.
2755
2756         The functionality is disabled by default and can be enabled by the client via the new
2757         WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled() private API.
2758
2759         * CMakeLists.txt:
2760         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2761         (API::ProcessPoolConfiguration::copy):
2762         * UIProcess/API/APIProcessPoolConfiguration.h:
2763         * UIProcess/API/C/WKContext.cpp:
2764         (WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled):
2765         * UIProcess/API/C/WKContextPrivate.h:
2766         * UIProcess/UnresponsiveWebProcessTerminator.cpp: Added.
2767         (WebKit::UnresponsiveWebProcessTerminator::UnresponsiveWebProcessTerminator):
2768         (WebKit::UnresponsiveWebProcessTerminator::updateState):
2769         (WebKit::pagesCopy):
2770         (WebKit::UnresponsiveWebProcessTerminator::timerFired):
2771         * UIProcess/UnresponsiveWebProcessTerminator.h: Added.
2772         (WebKit::UnresponsiveWebProcessTerminator::shouldBeActive):
2773         * UIProcess/WebPageProxy.cpp:
2774         (WebKit::WebPageProxy::reattachToWebProcess):
2775         (WebKit::WebPageProxy::reloadAfterBeingKilledInBackground):
2776         (WebKit::WebPageProxy::dispatchActivityStateChange):
2777         (WebKit::WebPageProxy::terminateProcess):
2778         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2779         * UIProcess/WebPageProxy.h:
2780         * UIProcess/WebProcessProxy.cpp:
2781         (WebKit::WebProcessProxy::WebProcessProxy):
2782         (WebKit::m_backgroundResponsivenessTimer):
2783         (WebKit::WebProcessProxy::createWebPage):
2784         (WebKit::WebProcessProxy::addExistingWebPage):
2785         (WebKit::WebProcessProxy::removeWebPage):
2786         (WebKit::WebProcessProxy::updateBackgroundResponsivenessTimer):
2787         * UIProcess/WebProcessProxy.h:
2788         (WebKit::WebProcessProxy::visiblePageCount):
2789         * WebKit2.xcodeproj/project.pbxproj:
2790
2791 2017-02-18  Michael Catanzaro  <mcatanzaro@igalia.com>
2792
2793         Remove COORDINATED_GRAPHICS_MULTIPROCESS
2794         https://bugs.webkit.org/show_bug.cgi?id=168514
2795
2796         Reviewed by Darin Adler.
2797
2798         * Shared/DrawingAreaInfo.h:
2799         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
2800         (WKViewFindZoomableAreaForRect):
2801         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
2802         (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
2803         * UIProcess/AcceleratedDrawingAreaProxy.h:
2804         (WebKit::AcceleratedDrawingAreaProxy::coordinatedLayerTreeHostProxy): Deleted.
2805         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: Removed.
2806         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: Removed.
2807         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: Removed.
2808         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
2809         (WebKit::PageViewportController::pageTransitionViewportReady):
2810         * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp: Removed.
2811         * UIProcess/DrawingAreaProxy.h:
2812         * UIProcess/PageClient.h:
2813         * UIProcess/WebPageProxy.cpp:
2814         (WebKit::WebPageProxy::pageDidRequestScroll): Deleted.
2815         (WebKit::WebPageProxy::pageTransitionViewportReady): Deleted.
2816         (WebKit::WebPageProxy::didRenderFrame): Deleted.
2817         (WebKit::WebPageProxy::commitPageTransitionViewport): Deleted.
2818         * UIProcess/WebPageProxy.h:
2819         * UIProcess/WebPageProxy.messages.in:
2820         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
2821         (WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea):
2822         (WebKit::AcceleratedDrawingArea::updateBackingStoreState):
2823         (WebKit::AcceleratedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage): Deleted.
2824         * WebProcess/WebPage/AcceleratedDrawingArea.h:
2825         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2826         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2827         (WebKit::CoordinatedLayerTreeHost::commitSceneState):
2828         (WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
2829         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2830         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Removed.
2831         * WebProcess/WebPage/DrawingArea.cpp:
2832         (WebKit::DrawingArea::create):
2833         * WebProcess/WebPage/DrawingArea.h:
2834         * WebProcess/WebPage/LayerTreeHost.cpp:
2835         (WebKit::LayerTreeHost::create):
2836         * WebProcess/WebPage/LayerTreeHost.h:
2837         * WebProcess/WebPage/WebPage.cpp:
2838         (WebKit::WebPage::~WebPage):
2839         (WebKit::WebPage::pageDidRequestScroll):
2840         (WebKit::WebPage::didCompletePageTransition):
2841         (WebKit::WebPage::didReceiveMessage):
2842         (WebKit::WebPage::commitPageTransitionViewport): Deleted.
2843         * WebProcess/WebPage/WebPage.h:
2844         * WebProcess/WebPage/WebPage.messages.in:
2845
2846 2017-02-18  Michael Catanzaro  <mcatanzaro@igalia.com>
2847
2848         [GTK] Cannot paste primary selection into web view in Wayland
2849         https://bugs.webkit.org/show_bug.cgi?id=166949
2850
2851         Reviewed by Carlos Garcia Campos.
2852
2853         Once upon a time, primary selection (middle-click paste) was not supported in Wayland. At
2854         the time, I changed this function to report that primary selection was unsupported. But
2855         nowadays, primary selection works fine in all GTK+ applications except WebKit. All we have
2856         to do to make it work in WebKit is change this return value.
2857
2858         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2859         (WebKit::WebEditorClient::supportsGlobalSelection):
2860
2861 2017-02-17  Brian Burg  <bburg@apple.com>
2862
2863         Web Inspector: RTL: Inspector window should dock to the left when using RTL layout direction
2864         https://bugs.webkit.org/show_bug.cgi?id=168273
2865         <rdar://problem/29949325>
2866
2867         Reviewed by Matt Baker.
2868
2869         Add the ability to dock Web Inspector to the left of the inspected view.
2870         The frontend decides whether the Dock to Side button docks left or right
2871         based on the current layout direction.
2872
2873         * UIProcess/WebInspectorProxy.cpp:
2874         (WebKit::WebInspectorProxy::attachLeft):
2875         (WebKit::WebInspectorProxy::attach):
2876         (WebKit::WebInspectorProxy::createInspectorPage):
2877         * UIProcess/WebInspectorProxy.h:
2878         * UIProcess/WebInspectorProxy.messages.in:
2879         Add plumbing for new dock configuration.
2880
2881         * UIProcess/mac/WebInspectorProxyMac.mm:
2882         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2883         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
2884         (WebKit::WebInspectorProxy::platformAttach):
2885         Adapt existing sizing logic to work for docking to left.
2886
2887         * WebProcess/WebPage/WebInspectorUI.cpp:
2888         (WebKit::WebInspectorUI::requestSetDockSide):
2889         (WebKit::WebInspectorUI::setDockSide):
2890         * WebProcess/WebPage/WebInspectorUI.h:
2891         (WebKit::WebInspectorUI::attachedLeft):
2892         * WebProcess/WebPage/WebInspectorUI.messages.in:
2893         Add plumbing for new dock configuration.
2894
2895 2017-02-16  Simon Fraser  <simon.fraser@apple.com>
2896
2897         Allow PlatformCALayers to specify that they want deep color backing store
2898         https://bugs.webkit.org/show_bug.cgi?id=168495
2899
2900         Reviewed by Tim Horton.
2901
2902         Currently capable iOS devices get deep color backing store by virtue of a supports
2903         check in PlatformCALayerCocoa::PlatformCALayerCocoa(), and LegacyTileGridTile.
2904
2905         Future work will make layer contents format selection more complex, so express the need
2906         for deep color on PlatformCALayer, and have the creators of PlatformCALayer (mainly the
2907         flavors of GraphicsLayerCA) choose for them to support deep color. A bit of special-casing
2908         is needed to propagte the state to TileControllers.
2909         
2910         The deep-colorness now propagates from PlatformCALayerRemote to RemoteLayerBackingStore,
2911         instead of RemoteLayerBackingStore looking at the properties of the screen directly.
2912
2913         Remove PlatformCALayer::LayerTypeWebTiledLayer which was only used for the old CATiledLayers
2914         that we no longer use.
2915
2916         * Shared/mac/RemoteLayerBackingStore.h:
2917         * Shared/mac/RemoteLayerBackingStore.mm:
2918         (WebKit::RemoteLayerBackingStore::ensureBackingStore):
2919         (WebKit::RemoteLayerBackingStore::bytesPerPixel):
2920         (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
2921         (WebKit::RemoteLayerBackingStore::drawInContext):
2922         (WebKit::RemoteLayerBackingStore::surfaceBufferFormat):
2923         (WebKit::bufferFormat): Deleted.
2924         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
2925         (WebKit::GraphicsLayerCARemote::createPlatformCALayer):
2926         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2927         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2928         (WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
2929         (WebKit::PlatformCALayerRemote::updateBackingStore):
2930         (WebKit::PlatformCALayerRemote::wantsDeepColorBackingStore):
2931         (WebKit::PlatformCALayerRemote::setWantsDeepColorBackingStore):
2932         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2933         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2934         (WebKit::PlatformCALayerRemoteTiledBacking::wantsDeepColorBackingStore):
2935         (WebKit::PlatformCALayerRemoteTiledBacking::setWantsDeepColorBackingStore):
2936         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2937
2938 2017-02-17  Wenson Hsieh  <wenson_hsieh@apple.com>
2939
2940         [WK2] Action sheet should not dismiss when a DDAction with user interface is being presented
2941         https://bugs.webkit.org/show_bug.cgi?id=168528
2942         <rdar://problem/30515324>
2943
2944         Reviewed by Beth Dakin.
2945
2946         After r211643, -[WKActionSheet doneWithSheet] now dismisses the presenting view controller. This is called when
2947         interaction with the sheet is finished and is a reasonable thing to do in most cases. However, when using data
2948         detectors, we don't want to dismiss the presenting view controller, since DataDetector handles dismissing on its
2949         own and expects that its completion handler will be invoked.
2950
2951         To fix this, we add a parameter to doneWithSheet: to indicate whether or not we should additionally dismiss the
2952         presenting view controller, and pass in NO in the case where we are handing control over to DataDetector.
2953
2954         * UIProcess/ios/WKActionSheet.h:
2955         * UIProcess/ios/WKActionSheet.mm:
2956         (-[WKActionSheet doneWithSheet:]):
2957         (-[WKActionSheet doneWithSheet]): Deleted.
2958         * UIProcess/ios/WKActionSheetAssistant.mm:
2959         (-[WKActionSheetAssistant showDataDetectorsSheet]):
2960         (-[WKActionSheetAssistant cleanupSheet]):
2961
2962 2017-02-17  Michael Catanzaro  <mcatanzaro@igalia.com>
2963
2964         Remove EFL from WebKit2
2965         https://bugs.webkit.org/show_bug.cgi?id=168511
2966
2967         Reviewed by Alex Christensen.
2968
2969         * Platform/IPC/unix/ConnectionUnix.cpp:
2970         (IPC::Connection::platformInvalidate):
2971         (IPC::Connection::open):
2972         * Platform/Module.h:
2973         * PlatformEfl.cmake: Removed.
2974         * PluginProcess/unix/PluginProcessMainUnix.cpp:
2975         * Shared/API/APIObject.h:
2976         * Shared/API/c/WKBase.h:
2977         * Shared/API/c/WKSharedAPICast.h:
2978         (WebKit::toAPI):
2979         (WebKit::toImpl):
2980         * Shared/NativeWebKeyboardEvent.h:
2981         (WebKit::NativeWebKeyboardEvent::isFakeEventForComposition):
2982         (WebKit::NativeWebKeyboardEvent::isFiltered): Deleted.
2983         * Shared/NativeWebMouseEvent.h:
2984         (WebKit::NativeWebMouseEvent::nativeEvent):
2985         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Deleted.
2986         * Shared/NativeWebTouchEvent.h:
2987         (WebKit::NativeWebTouchEvent::nativeEvent):
2988         * Shared/NativeWebWheelEvent.h:
2989         (WebKit::NativeWebWheelEvent::nativeEvent):
2990         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
2991         (WebKit::NetscapePluginModule::determineQuirks):
2992         * Shared/WebPreferencesDefinitions.h:
2993         * UIProcess/API/APIWebsiteDataStore.cpp:
2994         * UIProcess/API/C/WKAPICast.h:
2995         * UIProcess/API/C/WKTextChecker.cpp:
2996         * UIProcess/API/C/WKTextChecker.h:
2997         * UIProcess/ChildProcessProxy.cpp:
2998         (WebKit::ChildProcessProxy::getLaunchOptions):
2999         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
3000         (WebKit::PageViewportController::pixelAlignedFloatPoint):
3001         * UIProcess/InspectorServer/WebInspectorServer.h:
3002         * UIProcess/Launcher/ProcessLauncher.h:
3003         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
3004         * UIProcess/PageClient.h:
3005         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
3006         (WebKit::PluginProcessProxy::scanPlugin):
3007         * UIProcess/WebInspectorProxy.h:
3008         * UIProcess/WebPageProxy.h:
3009         * WebKit2.xcodeproj/project.pbxproj:
3010         * WebProcess/InjectedBundle/InjectedBundle.h:
3011         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3012         (WebKit::getPluginDisplay):
3013         (WebKit::x11Screen):
3014         (WebKit::displayDepth):
3015         (WebKit::rootWindowID):
3016         (WebKit::NetscapePluginX11::paint):
3017         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3018         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
3019         (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
3020         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3021         (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
3022         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3023         (WebKit::WebFrameLoaderClient::saveViewStateToItem):
3024         (WebKit::WebFrameLoaderClient::restoreViewState):
3025         (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
3026         * WebProcess/WebPage/WebPage.cpp:
3027         (WebKit::WebPage::WebPage):
3028         * WebProcess/WebPage/WebPage.h:
3029         * WebProcess/WebPage/WebPage.messages.in:
3030         * config.h:
3031
3032 2017-02-15  Brady Eidson  <beidson@apple.com>
3033
3034         Stop backing up localStorage databases to iCloud by default.
3035         <rdar://problem/29045531> and https://bugs.webkit.org/show_bug.cgi?id=168388
3036
3037         Reviewed by Geoffrey Garen.
3038
3039         * UIProcess/Cocoa/VersionChecks.h:
3040
3041         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
3042         (WebKit::LocalStorageDatabaseTracker::databasePath):
3043         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
3044         * UIProcess/Storage/ios/LocalStorageDatabaseTrackerIOS.mm: Copied from Source/WebKit2/UIProcess/Cocoa/VersionChecks.h.
3045         (WebKit::LocalStorageDatabaseTracker::platformExcludeFromBackup):
3046
3047         * WebKit2.xcodeproj/project.pbxproj:
3048
3049 2017-02-16  Aakash Jain  <aakash_jain@apple.com>
3050
3051         Remove unused methods WKPageGetDebugPaintFlags and WKPageSetDebugPaintFlags
3052         https://bugs.webkit.org/show_bug.cgi?id=168464
3053
3054         Reviewed by Alexey Proskuryakov.
3055
3056         * UIProcess/API/C/WKPagePrivate.h:
3057
3058 2017-02-16  Youenn Fablet  <youenn@apple.com>
3059
3060         [WebRTC] libwebrtc socket addresses should not be passed as strings
3061         https://bugs.webkit.org/show_bug.cgi?id=168474
3062
3063         Reviewed by Alex Christensen.
3064
3065         Removing all seralization of socket addresses as strings.
3066         Instead, a dedicated serialization is provided.
3067         This allows proper handling of various cases like addresses with both hostnames and resolved IPs.
3068
3069         * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
3070         (WebKit::LibWebRTCSocketClient::signalReadPacket):
3071         (WebKit::LibWebRTCSocketClient::signalSentPacket):
3072         (WebKit::LibWebRTCSocketClient::signalAddressReady):
3073         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
3074         (WebKit::NetworkRTCProvider::createUDPSocket):
3075         (WebKit::NetworkRTCProvider::createServerTCPSocket):
3076         (WebKit::NetworkRTCProvider::createClientTCPSocket):
3077         * NetworkProcess/webrtc/NetworkRTCProvider.h:
3078         * NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
3079         * NetworkProcess/webrtc/NetworkRTCSocket.cpp:
3080         (WebKit::NetworkRTCSocket::sendTo):
3081         * NetworkProcess/webrtc/NetworkRTCSocket.h:
3082         * NetworkProcess/webrtc/NetworkRTCSocket.messages.in:
3083         * Shared/RTCNetwork.cpp:
3084         (WebKit::RTCNetwork::SocketAddress::decode):
3085         (WebKit::RTCNetwork::SocketAddress::encode):
3086         * Shared/RTCNetwork.h:
3087         (WebKit::RTCNetwork::SocketAddress::SocketAddress):
3088         * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
3089         (WebKit::LibWebRTCSocket::signalAddressReady):
3090         (WebKit::LibWebRTCSocket::SendTo):
3091         * WebProcess/Network/webrtc/LibWebRTCSocket.h:
3092         * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
3093         (WebKit::LibWebRTCSocketFactory::CreateServerTcpSocket):
3094         (WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
3095         (WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
3096         * WebProcess/Network/webrtc/WebRTCSocket.cpp:
3097         (WebKit::WebRTCSocket::signalAddressReady):
3098         * WebProcess/Network/webrtc/WebRTCSocket.h:
3099         * WebProcess/Network/webrtc/WebRTCSocket.messages.in:
3100
3101 2017-02-16  Daniel Bates  <dabates@apple.com>
3102
3103         Remove Chromium-specific code to call FrameLoaderClient::redirectDataToPlugin(nullptr)
3104         https://bugs.webkit.org/show_bug.cgi?id=168417
3105         <rdar://problem/30541748>
3106
3107         Reviewed by Brent Fulgham.
3108
3109         Update override of FrameLoaderClient::redirectDataToPlugin() to take a Widget& instead of a
3110         Widget* as it is always called with a valid Widget.
3111
3112         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3113         (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
3114         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3115         * mac/WebKit2.order: Remove symbol for WebFrameLoaderClient::redirectDataToPlugin() that took a Widget*
3116         as it no longer exists. I am unclear if this file is still meaningful as it was last modified in
3117         r180570 (2 years ago) though Xcode still references this ordering file (why?).
3118
3119 2017-02-16  Alex Christensen  <achristensen@webkit.org>
3120
3121         Remove EFL-specific files in WebKit2.
3122
3123         Rubber-stamped by Anders Carlsson
3124
3125         * DatabaseProcess/efl: Removed.
3126         * DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Removed.
3127         * NetworkProcess/Downloads/efl: Removed.
3128         * NetworkProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp: Removed.
3129         * NetworkProcess/efl: Removed.
3130         * NetworkProcess/efl/NetworkProcessMainEfl.cpp: Removed.
3131         * Platform/efl: Removed.
3132         * Platform/efl/ModuleEfl.cpp: Removed.
3133         * Shared/API/c/efl: Removed.
3134         * Shared/API/c/efl/WKArrayEfl.cpp: Removed.
3135         * Shared/API/c/efl/WKArrayEfl.h: Removed.
3136         * Shared/API/c/efl/WKBaseEfl.h: Removed.
3137         * Shared/efl: Removed.
3138         * Shared/efl/NativeWebKeyboardEventEfl.cpp: Removed.
3139         * Shared/efl/NativeWebTouchEventEfl.cpp: Removed.
3140         * Shared/efl/NativeWebWheelEventEfl.cpp: Removed.
3141         * Shared/efl/ProcessExecutablePathEfl.cpp: Removed.
3142         * Shared/efl/WebEventFactory.cpp: Removed.
3143         * Shared/efl/WebEventFactory.h: Removed.
3144         * UIProcess/API/C/efl: Removed.
3145         * UIProcess/API/C/efl/WKAPICastEfl.h: Removed.
3146         * UIProcess/API/C/efl/WKColorPickerResultListener.cpp: Removed.
3147         * UIProcess/API/C/efl/WKColorPickerResultListener.h: Removed.
3148         * UIProcess/API/C/efl/WKEventEfl.cpp: Removed.
3149         * UIProcess/API/C/efl/WKEventEfl.h: Removed.
3150         * UIProcess/API/C/efl/WKViewEfl.cpp: Removed.
3151         * UIProcess/API/C/efl/WKViewEfl.h: Removed.
3152         * UIProcess/API/cpp/efl: Removed.
3153         * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: Removed.
3154         * UIProcess/API/cpp/efl/WKEinaSharedString.h: Removed.
3155         * UIProcess/API/efl: Removed.
3156         * UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp: Removed.
3157         * UIProcess/API/efl/EWebKit2.h.in: Removed.
3158         * UIProcess/API/efl/EwkView.cpp: Removed.
3159         * UIProcess/API/efl/EwkView.h: Removed.
3160         * UIProcess/API/efl/EwkViewCallbacks.h: Removed.
3161         * UIProcess/API/efl/GestureRecognizer.cpp: Removed.
3162         * UIProcess/API/efl/GestureRecognizer.h: Removed.
3163         * UIProcess/API/efl/SnapshotImageGL.cpp: Removed.
3164         * UIProcess/API/efl/SnapshotImageGL.h: Removed.
3165         * UIProcess/API/efl/WebAccessibility.cpp: Removed.
3166         * UIProcess/API/efl/WebAccessibility.h: Removed.
3167         * UIProcess/API/efl/ewk_application_cache_manager.cpp: Removed.
3168         * UIProcess/API/efl/ewk_application_cache_manager.h: Removed.
3169         * UIProcess/API/efl/ewk_application_cache_manager_private.h: Removed.
3170         * UIProcess/API/efl/ewk_auth_request.cpp: Removed.
3171         * UIProcess/API/efl/ewk_auth_request.h: Removed.
3172         * UIProcess/API/efl/ewk_auth_request_private.h: Removed.
3173         * UIProcess/API/efl/ewk_back_forward_list.cpp: Removed.
3174         * UIProcess/API/efl/ewk_back_forward_list.h: Removed.
3175         * UIProcess/API/efl/ewk_back_forward_list_item.cpp: Removed.
3176         * UIProcess/API/efl/ewk_back_forward_list_item.h: Removed.
3177         * UIProcess/API/efl/ewk_back_forward_list_item_private.h: Removed.
3178         * UIProcess/API/efl/ewk_back_forward_list_private.h: Removed.
3179         * UIProcess/API/efl/ewk_color_picker.cpp: Removed.
3180         * UIProcess/API/efl/ewk_color_picker.h: Removed.
3181         * UIProcess/API/efl/ewk_color_picker_private.h: Removed.
3182         * UIProcess/API/efl/ewk_context.cpp: Removed.
3183         * UIProcess/API/efl/ewk_context.h: Removed.
3184         * UIProcess/API/efl/ewk_context_menu.cpp: Removed.
3185         * UIProcess/API/efl/ewk_context_menu.h: Removed.
3186         * UIProcess/API/efl/ewk_context_menu_item.cpp: Removed.
3187         * UIProcess/API/efl/ewk_context_menu_item.h: Removed.
3188         * UIProcess/API/efl/ewk_context_menu_item_private.h: Removed.
3189         * UIProcess/API/efl/ewk_context_menu_private.h: Removed.
3190         * UIProcess/API/efl/ewk_context_private.h: Removed.
3191         * UIProcess/API/efl/ewk_cookie_manager.cpp: Removed.
3192         * UIProcess/API/efl/ewk_cookie_manager.h: Removed.
3193         * UIProcess/API/efl/ewk_cookie_manager_private.h: Removed.
3194         * UIProcess/API/efl/ewk_database_manager.cpp: Removed.
3195         * UIProcess/API/efl/ewk_database_manager.h: Removed.
3196         * UIProcess/API/efl/ewk_database_manager_private.h: Removed.
3197         * UIProcess/API/efl/ewk_download_job.cpp: Removed.
3198         * UIProcess/API/efl/ewk_download_job.h: Removed.
3199         * UIProcess/API/efl/ewk_download_job_private.h: Removed.
3200         * UIProcess/API/efl/ewk_error.cpp: Removed.
3201         * UIProcess/API/efl/ewk_error.h: Removed.
3202         * UIProcess/API/efl/ewk_error_private.h: Removed.
3203         * UIProcess/API/efl/ewk_favicon_database.cpp: Removed.
3204         * UIProcess/API/efl/ewk_favicon_database.h: Removed.
3205         * UIProcess/API/efl/ewk_favicon_database_private.h: Removed.
3206         * UIProcess/API/efl/ewk_file_chooser_request.cpp: Removed.
3207         * UIProcess/API/efl/ewk_file_chooser_request.h: Removed.
3208         * UIProcess/API/efl/ewk_file_chooser_request_private.h: Removed.
3209         * UIProcess/API/efl/ewk_form_submission_request.cpp: Removed.
3210         * UIProcess/API/efl/ewk_form_submission_request.h: Removed.
3211         * UIProcess/API/efl/ewk_form_submission_request_private.h: Removed.
3212         * UIProcess/API/efl/ewk_intro.h: Removed.
3213         * UIProcess/API/efl/ewk_main.cpp: Removed.
3214         * UIProcess/API/efl/ewk_main.h: Removed.
3215         * UIProcess/API/efl/ewk_main_private.h: Removed.
3216         * UIProcess/API/efl/ewk_navigation_data.cpp: Removed.
3217         * UIProcess/API/efl/ewk_navigation_data.h: Removed.
3218         * UIProcess/API/efl/ewk_navigation_data_private.h: Removed.
3219         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp: Removed.
3220         * UIProcess/API/efl/ewk_navigation_policy_decision.h: Removed.
3221         * UIProcess/API/efl/ewk_navigation_policy_decision_private.h: Removed.
3222         * UIProcess/API/efl/ewk_object.cpp: Removed.
3223         * UIProcess/API/efl/ewk_object.h: Removed.
3224         * UIProcess/API/efl/ewk_object_private.h: Removed.
3225         * UIProcess/API/efl/ewk_page_group.cpp: Removed.
3226         * UIProcess/API/efl/ewk_page_group.h: Removed.
3227         * UIProcess/API/efl/ewk_page_group_private.h: Removed.
3228         * UIProcess/API/efl/ewk_popup_menu.cpp: Removed.
3229         * UIProcess/API/efl/ewk_popup_menu.h: Removed.
3230         * UIProcess/API/efl/ewk_popup_menu_item.cpp: Removed.
3231         * UIProcess/API/efl/ewk_popup_menu_item.h: Removed.
3232         * UIProcess/API/efl/ewk_popup_menu_item_private.h: Removed.
3233         * UIProcess/API/efl/ewk_popup_menu_private.h: Removed.
3234         * UIProcess/API/efl/ewk_security_origin.cpp: Removed.
3235         * UIProcess/API/efl/ewk_security_origin.h: Removed.
3236         * UIProcess/API/efl/ewk_security_origin_private.h: Removed.
3237         * UIProcess/API/efl/ewk_settings.cpp: Removed.
3238         * UIProcess/API/efl/ewk_settings.h: Removed.
3239         * UIProcess/API/efl/ewk_settings_private.h: Removed.
3240         * UIProcess/API/efl/ewk_storage_manager.cpp: Removed.
3241         * UIProcess/API/efl/ewk_storage_manager.h: Removed.
3242         * UIProcess/API/efl/ewk_storage_manager_private.h: Removed.
3243         * UIProcess/API/efl/ewk_text_checker.cpp: Removed.
3244         * UIProcess/API/efl/ewk_text_checker.h: Removed.
3245         * UIProcess/API/efl/ewk_text_checker_private.h: Removed.
3246         * UIProcess/API/efl/ewk_touch.h: Removed.
3247         * UIProcess/API/efl/ewk_url_request.cpp: Removed.
3248         * UIProcess/API/efl/ewk_url_request.h: Removed.
3249         * UIProcess/API/efl/ewk_url_request_private.h: Removed.
3250         * UIProcess/API/efl/ewk_url_response.cpp: Removed.
3251         * UIProcess/API/efl/ewk_url_response.h: Removed.
3252         * UIProcess/API/efl/ewk_url_response_private.h: Removed.
3253         * UIProcess/API/efl/ewk_url_scheme_request.cpp: Removed.
3254         * UIProcess/API/efl/ewk_url_scheme_request.h: Removed.
3255         * UIProcess/API/efl/ewk_url_scheme_request_private.h: Removed.
3256         * UIProcess/API/efl/ewk_view.cpp: Removed.
3257         * UIProcess/API/efl/ewk_view.h: Removed.
3258         * UIProcess/API/efl/ewk_view_configuration.cpp: Removed.
3259         * UIProcess/API/efl/ewk_view_configuration.h: Removed.
3260         * UIProcess/API/efl/ewk_view_configuration_private.h: Removed.
3261         * UIProcess/API/efl/ewk_view_private.h: Removed.
3262         * UIProcess/API/efl/ewk_window_features.cpp: Removed.
3263         * UIProcess/API/efl/ewk_window_features.h: Removed.
3264         * UIProcess/API/efl/ewk_window_features_private.h: Removed.
3265         * UIProcess/API/efl/tests: Removed.
3266         * UIProcess/API/efl/tests/UnitTestUtils: Removed.
3267         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Removed.
3268         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: Removed.
3269         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: Removed.
3270         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h: Removed.
3271         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestMain.cpp: Removed.
3272         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp: Removed.
3273         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h: Removed.
3274         * UIProcess/API/efl/tests/extensions: Removed.
3275         * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Removed.
3276         * UIProcess/API/efl/tests/resources: Removed.
3277         * UIProcess/API/efl/tests/resources/Page1.html: Removed.
3278         * UIProcess/API/efl/tests/resources/Page2.html: Removed.
3279         * UIProcess/API/efl/tests/resources/Page3.html: Removed.
3280         * UIProcess/API/efl/tests/resources/blank.ico: Removed.
3281         * UIProcess/API/efl/tests/resources/default_test_page.html: Removed.
3282         * UIProcess/API/efl/tests/resources/empty_theme.edj: Removed.
3283         * UIProcess/API/efl/tests/resources/file_chooser.html: Removed.
3284         * UIProcess/API/efl/tests/resources/frame_flattening_test.html: Removed.
3285         * UIProcess/API/efl/tests/resources/frame_flattening_test_subframe.html: Removed.
3286         * UIProcess/API/efl/tests/resources/local_file_access.html: Removed.
3287         * UIProcess/API/efl/tests/resources/redirect_url_to_default.html: Removed.
3288         * UIProcess/API/efl/tests/resources/resultMHTML.mht: Removed.
3289         * UIProcess/API/efl/tests/resources/same_page_navigation.html: Removed.
3290         * UIProcess/API/efl/tests/resources/spelling_selection_tests.html: Removed.
3291         * UIProcess/API/efl/tests/resources/spelling_test.html: Removed.
3292         * UIProcess/API/efl/tests/resources/test.pdf: Removed.
3293         * UIProcess/API/efl/tests/resources/window_move_resize.html: Removed.
3294         * UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Removed.
3295         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp: Removed.
3296         * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp: Removed.
3297         * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp: Removed.
3298         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp: Removed.
3299         * UIProcess/API/efl/tests/test_ewk2_context.cpp: Removed.
3300         * UIProcess/API/efl/tests/test_ewk2_context_history_callbacks.cpp: Removed.
3301         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: Removed.
3302         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: Removed.
3303         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp: Removed.
3304         * UIProcess/API/efl/tests/test_ewk2_download_job.cpp: Removed.
3305         * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: Removed.
3306         * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp: Removed.
3307         * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp: Removed.
3308         * UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Removed.
3309         * UIProcess/API/efl/tests/test_ewk2_object.cpp: Removed.
3310         * UIProcess/API/efl/tests/test_ewk2_page.cpp: Removed.
3311         * UIProcess/API/efl/tests/test_ewk2_page_group.cpp: Removed.
3312         * UIProcess/API/efl/tests/test_ewk2_popup_menu.cpp: Removed.
3313         * UIProcess/API/efl/tests/test_ewk2_settings.cpp: Removed.
3314         * UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Removed.
3315         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp: Removed.
3316         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: Removed.
3317         * UIProcess/API/efl/tests/test_ewk2_view.cpp: Removed.
3318         * UIProcess/API/efl/tests/test_ewk2_view_configuration.cpp: Removed.
3319         * UIProcess/API/efl/tests/test_ewk2_window_features.cpp: Removed.
3320         * UIProcess/InspectorServer/efl: Removed.
3321         * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp: Removed.
3322         * UIProcess/Launcher/efl: Removed.
3323         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: Removed.
3324         * UIProcess/efl: Removed.
3325         * UIProcess/efl/ContextHistoryClientEfl.cpp: Removed.
3326         * UIProcess/efl/ContextHistoryClientEfl.h: Removed.
3327         * UIProcess/efl/ContextMenuClientEfl.cpp: Removed.
3328         * UIProcess/efl/ContextMenuClientEfl.h: Removed.
3329         * UIProcess/efl/DownloadManagerEfl.cpp: Removed.
3330         * UIProcess/efl/DownloadManagerEfl.h: Removed.
3331         * UIProcess/efl/EasingCurves.cpp: Removed.
3332         * UIProcess/efl/EasingCurves.h: Removed.
3333         * UIProcess/efl/EwkDebug.h: Removed.
3334         * UIProcess/efl/EwkTouchEvent.cpp: Removed.
3335         * UIProcess/efl/EwkTouchEvent.h: Removed.
3336         * UIProcess/efl/EwkTouchPoint.cpp: Removed.
3337         * UIProcess/efl/EwkTouchPoint.h: Removed.
3338         * UIProcess/efl/FindClientEfl.cpp: Removed.
3339         * UIProcess/efl/FindClientEfl.h: Removed.
3340         * UIProcess/efl/FormClientEfl.cpp: Removed.
3341         * UIProcess/efl/FormClientEfl.h: Removed.
3342         * UIProcess/efl/InputMethodContextEfl.cpp: Removed.
3343         * UIProcess/efl/InputMethodContextEfl.h: Removed.
3344         * UIProcess/efl/PageLoadClientEfl.cpp: Removed.
3345         * UIProcess/efl/PageLoadClientEfl.h: Removed.
3346         * UIProcess/efl/PagePolicyClientEfl.cpp: Removed.
3347         * UIProcess/efl/PagePolicyClientEfl.h: Removed.
3348         * UIProcess/efl/PageUIClientEfl.cpp: Removed.
3349         * UIProcess/efl/PageUIClientEfl.h: Removed.
3350         * UIProcess/efl/PageViewportControllerClientEfl.cpp: Removed.
3351         * UIProcess/efl/PageViewportControllerClientEfl.h: Removed.
3352         * UIProcess/efl/RequestManagerClientEfl.cpp: Removed.
3353         * UIProcess/efl/RequestManagerClientEfl.h: Removed.
3354         * UIProcess/efl/TextCheckerClientEfl.cpp: Removed.
3355         * UIProcess/efl/TextCheckerClientEfl.h: Removed.
3356         * UIProcess/efl/TextCheckerEfl.cpp: Removed.
3357         * UIProcess/efl/VibrationClientEfl.cpp: Removed.
3358         * UIProcess/efl/VibrationClientEfl.h: Removed.
3359         * UIProcess/efl/ViewClientEfl.cpp: Removed.
3360         * UIProcess/efl/ViewClientEfl.h: Removed.
3361         * UIProcess/efl/WebColorPickerClient.cpp: Removed.
3362         * UIProcess/efl/WebColorPickerClient.h: Removed.
3363         * UIProcess/efl/WebColorPickerEfl.cpp: Removed.
3364         * UIProcess/efl/WebColorPickerEfl.h: Removed.
3365         * UIProcess/efl/WebColorPickerResultListenerProxy.cpp: Removed.
3366         * UIProcess/efl/WebColorPickerResultListenerProxy.h: Removed.
3367         * UIProcess/efl/WebContextMenuProxyEfl.cpp: Removed.
3368         * UIProcess/efl/WebContextMenuProxyEfl.h: Removed.
3369         * UIProcess/efl/WebInspectorProxyEfl.cpp: Removed.
3370         * UIProcess/efl/WebPageProxyEfl.cpp: Removed.
3371         * UIProcess/efl/WebPopupItemEfl.cpp: Removed.
3372         * UIProcess/efl/WebPopupItemEfl.h: Removed.
3373         * UIProcess/efl/WebPopupMenuProxyEfl.cpp: Removed.
3374         * UIProcess/efl/WebPopupMenuProxyEfl.h: Removed.
3375         * UIProcess/efl/WebPreferencesEfl.cpp: Removed.
3376         * UIProcess/efl/WebProcessPoolEfl.cpp: Removed.
3377         * UIProcess/efl/WebView.cpp: Removed.
3378         * UIProcess/efl/WebView.h: Removed.
3379         * UIProcess/efl/WebViewClient.cpp: Removed.
3380         * UIProcess/efl/WebViewClient.h: Removed.
3381         * WebProcess/InjectedBundle/API/efl: Removed.
3382         * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Removed.
3383         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Removed.
3384         * WebProcess/InjectedBundle/API/efl/ewk_extension.h: Removed.
3385         * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Removed.
3386         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Removed.
3387         * WebProcess/InjectedBundle/API/efl/ewk_page.h: Removed.
3388         * WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Removed.
3389         * WebProcess/InjectedBundle/efl: Removed.
3390         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp: Removed.
3391         * WebProcess/WebCoreSupport/efl: Removed.
3392         * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp: Removed.
3393         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: Removed.
3394         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: Removed.
3395         * WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp: Removed.
3396         * WebProcess/WebPage/efl: Removed.
3397         * WebProcess/WebPage/efl/WebInspectorUIEfl.cpp: Removed.
3398         * WebProcess/WebPage/efl/WebPageEfl.cpp: Removed.
3399         * WebProcess/efl: Removed.
3400         * WebProcess/efl/ExtensionManagerEfl.cpp: Removed.
3401         * WebProcess/efl/ExtensionManagerEfl.h: Removed.
3402         * WebProcess/efl/WebInjectedBundleMainEfl.cpp: Removed.
3403         * WebProcess/efl/WebProcessMainEfl.cpp: Removed.
3404         * efl: Removed.
3405         * efl/EWebKit2Config.cmake.in: Removed.
3406         * efl/EWebKit2ConfigVersion.cmake.in: Removed.
3407         * efl/ewebkit2-extension.pc.in: Removed.
3408         * efl/ewebkit2.pc.in: Removed.
3409
3410 2017-02-16  Alex Christensen  <achristensen@webkit.org>
3411
3412         Remove old URL parser
3413         https://bugs.webkit.org/show_bug.cgi?id=168483
3414
3415         Reviewed by Tim Horton.
3416
3417         * NetworkProcess/NetworkProcess.cpp:
3418         (WebKit::NetworkProcess::initializeNetworkProcess):
3419         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3420         (WebKit::NetworkProcessCreationParameters::encode):
3421         (WebKit::NetworkProcessCreationParameters::decode):
3422         * NetworkProcess/NetworkProcessCreationParameters.h:
3423         * PlatformEfl.cmake:
3424         * PlatformGTK.cmake:
3425         * PlatformMac.cmake:
3426         * Shared/Cocoa/WebKit2InitializeCocoa.mm: Removed.
3427         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
3428         (WebKit::XPCServiceInitializer):
3429         * Shared/WebKit2Initialize.cpp:
3430         (WebKit::InitializeWebKit2):
3431         * Shared/WebKit2Initialize.h:
3432         (): Deleted.
3433         * Shared/WebProcessCreationParameters.cpp:
3434         (WebKit::WebProcessCreationParameters::encode):
3435         (WebKit::WebProcessCreationParameters::decode):
3436         * Shared/WebProcessCreationParameters.h:
3437         * Shared/efl/WebKit2InitializeEFL.cpp: Removed.
3438         * Shared/gtk/WebKit2InitializeGTK.cpp: Removed.
3439         * UIProcess/WebProcessPool.cpp:
3440         (WebKit::WebProcessPool::ensureNetworkProcess):
3441         (WebKit::WebProcessPool::createNewWebProcess):
3442         * WebKit2.xcodeproj/project.pbxproj:
3443         * WebProcess/WebProcess.cpp:
3444         (WebKit::WebProcess::initializeWebProcess):
3445
3446 2017-02-16  Wenson Hsieh  <wenson_hsieh@apple.com>
3447
3448         [WK2] Add additional test infrastructure and unit tests for data interaction
3449         https://bugs.webkit.org/show_bug.cgi?id=168439
3450         <rdar://problem/30557942>
3451
3452         Reviewed by Tim Horton.
3453
3454         Adds two new _WKTestingDelegate protocol methods that are fired when a 'start data interaction' request has been
3455         sent to the web process, and when a response has been received. See Tools/ChangeLog for more details.
3456
3457         * UIProcess/API/Cocoa/_WKTestingDelegate.h:
3458
3459 2017-02-16  Aakash Jain  <aakash_jain@apple.com>
3460
3461         Remove unused method WKBundlePageCopyContextMenuItemTitle
3462         https://bugs.webkit.org/show_bug.cgi?id=168456
3463
3464         Reviewed by Dan Bernstein.
3465
3466         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Removed WKBundlePageCopyContextMenuItemTitle.
3467
3468 2017-02-16  Aakash Jain  <aakash_jain@apple.com>
3469
3470         Remove unused WKContextGetProcessSuppressionEnabled and WKContextSetProcessSuppressionEnabled
3471         https://bugs.webkit.org/show_bug.cgi?id=168460
3472
3473         Reviewed by Dan Bernstein.
3474
3475         * UIProcess/API/C/mac/WKContextPrivateMac.h:
3476
3477 2017-02-16  Aakash Jain  <aakash_jain@apple.com>
3478
3479         Removed unused method WKContextGetProcessModel
3480         https://bugs.webkit.org/show_bug.cgi?id=168457
3481
3482         Reviewed by Dan Bernstein.
3483
3484         * UIProcess/API/C/WKContext.h: Removed WKContextGetProcessModel.
3485
3486 2017-02-16  Tim Horton  <timothy_horton@apple.com>
3487
3488         WKWebView inside a UICollectionView flashes when items are inserted above it
3489         https://bugs.webkit.org/show_bug.cgi?id=168376
3490         <rdar://problem/29322051>
3491
3492         Reviewed by Simon Fraser.
3493
3494         Previously, we would immediately send visible content rect updates
3495         whenever we scrolled, or our frame or bounds changed, or ... a whole
3496         bunch of other things. This message would be immediately sent to the
3497         Web Content process, and coalesced at the whims of the Web Content process
3498         main thread. However, if we received multiple such updates within the
3499         same runloop cycle in the UI process, the Web Content process could
3500         send back layer tree commits for intermediate states that would
3501         never make it to the screen.
3502
3503         In the UICollectionView case, UIKit would first scroll to the new location
3504         (potentially putting the WKWebView totally off-screen), and then update
3505         our frame (back on screen), and we would get two layer tree commits;
3506         one, with less tile coverage than needed to cover the area, and another
3507         with full coverage.
3508
3509         Instead, wait until just before we commit the UI-side layer tree (and
3510         thus everyone is done moving things around) to push the new visible 
3511         rect info to the Web Content process.
3512
3513         So far, I have not found a way to test that reliably fails before
3514         and reliably passes after without adding a ton of supporting code to WebKit.
3515
3516         * UIProcess/API/Cocoa/WKWebView.mm:
3517         (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
3518         (-[WKWebView _didCommitLayerTree:]):
3519         (-[WKWebView _didFinishScrolling]):
3520         (-[WKWebView scrollViewDidScroll:]):
3521         (-[WKWebView scrollViewDidZoom:]):
3522         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
3523         (-[WKWebView _scrollViewDidInterruptDecelerating:]):
3524         (-[WKWebView _didScroll]):
3525         (-[WKWebView _enclosingScrollerScrollingEnded:]):
3526         (-[WKWebView _frameOrBoundsChanged]):
3527         (-[WKWebView _scheduleVisibleContentRectUpdate]):
3528         (-[WKWebView _scrollViewIsInStableState:]):
3529         (-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):
3530         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
3531         (-[WKWebView _setObscuredInsets:]):
3532         (-[WKWebView _endInteractiveObscuredInsetsChange]):
3533         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3534         (-[WKWebView _endAnimatedResize]):
3535         (-[WKWebView _updateVisibleContentRects]): Deleted.
3536         (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Deleted.
3537         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3538         * UIProcess/ios/WKContentView.mm:
3539         (-[WKContentView _didCommitLayerTree:]):
3540         * UIProcess/ios/WKContentViewInteraction.mm:
3541         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
3542         (-[WKContentView _stopAssistingNode]):
3543         * UIProcess/ios/WKScrollView.mm:
3544         (-[WKScrollView setContentInset:]):
3545         Have existing callers of _updateVisibleContentRect* instead call
3546         _scheduleVisibleContentRectUpdate*.
3547
3548         In _scheduleVisibleContentRectUpdate, schedule a pre-commit callback
3549         in which we will compute the new visible content rect information
3550         and send it to the Web Content process.
3551
3552         Keep track of the stable state of the scroll view which most recently
3553         scheduled an update, and use that to inform _updateVisibleContentRects.
3554         This matches the previous behavior where the updates might get coalesced
3555         in the Web Content process, and the most recent update wins.
3556
3557         Make a few callers of _updateVisibleContentRectAfterScrollInView
3558         that passed in our scroll view just use _scheduleVisibleContentRectUpdate instead.
3559
3560 2017-02-16  Brent Fulgham  <bfulgham@apple.com>
3561
3562         [WebRTC][Mac] Conditionally add sandbox extensions to the Network Process
3563         https://bugs.webkit.org/show_bug.cgi?id=168010
3564         <rdar://problem/30245503>
3565
3566         Reviewed by Youenn Fablet.
3567
3568         Conditionally add sandbox extensions to the Network Process when the WebRTC/Media Capture
3569         features are enabled.
3570
3571         * NetworkProcess/NetworkProcess.h:
3572         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3573         (WebKit::NetworkProcessCreationParameters::encode): Serialize new process configuration flag.
3574         (WebKit::NetworkProcessCreationParameters::decode): Ditto.
3575         * NetworkProcess/NetworkProcessCreationParameters.h:
3576         * NetworkProcess/mac/NetworkProcessMac.mm:
3577         (WebKit::NetworkProcess::platformInitializeNetworkProcess):  Remember state of WebRTC for when the
3578         sandbox is established.
3579         (WebKit::NetworkProcess::initializeSandbox): Add ENABLE_WEB_RTC parameter to sandbox launch state.
3580         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Add conditional sandbox expansion to allow
3581         bidirectional network access when the ENABLE_LIBWEBRTC flag is present in the sandbox launch parameters.
3582         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3583         (WebKit::WebProcessPool::platformInitializeWebProcess): Use proper compile guards and check media stream
3584         preference, rather than the peer connection preference.
3585         (WebKit::WebProcessPool::platformInitializeNetworkProcess): Notify NetworkProcess at launch time whether the
3586         user wants WebRTC support.
3587
3588 2017-02-16  Brent Fulgham  <bfulgham@apple.com>
3589
3590         [WebRTC][Mac][WebKit2] Initial WebProcess does not support WebRTC
3591         https://bugs.webkit.org/show_bug.cgi?id=168438
3592         <rdar://problem/30401818>
3593
3594         Reviewed by Youenn Fablet.
3595
3596         The sandbox extension for microphone access does not take effect until the second WebProcess
3597         is created, causing the initial browser tab to lack microphone support.
3598
3599         This patch checks the setting earlier in the boot process so that the initial WebProcess
3600         instance gets the correct setting.
3601
3602         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3603         (WebKit::WebProcessPool::platformInitializeWebProcess): Move microphone sandbox extension here, so that the
3604         initial WebProcess has the correct microphone access.
3605         * UIProcess/WebProcessPool.cpp:
3606         (WebKit::WebProcessPool::createNewWebProcess): Move microphone sandbox extension from here to platform-specific file.
3607         (WebKit::WebProcessPool::createWebPage): Remove unneeded preference checks.
3608
3609 2017-02-16  Eric Carlson  <eric.carlson@apple.com>
3610
3611         Add WebRTC as an off-by-default experimental feature menu item.
3612         https://bugs.webkit.org/show_bug.cgi?id=167972
3613         <rdar://problem/30293429>
3614
3615         Reviewed by Alex Christensen.
3616
3617         * Shared/WebPreferencesDefinitions.h:
3618         * UIProcess/WebPreferences.cpp:
3619         (WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): We need to enable/disable
3620         peer connection and media stream preferences at the same time, so special case them.
3621         (WebKit::WebPreferences::setEnabledForFeature):
3622         * UIProcess/WebPreferences.h:
3623
3624 2017-02-15  Alex Christensen  <achristensen@webkit.org>
3625
3626         Unreviewed, rolling out r212394.
3627
3628         Fixed iOS WebInspector
3629
3630         Reverted changeset:
3631
3632         "Unreviewed, rolling out r212169."
3633         https://bugs.webkit.org/show_bug.cgi?id=166681
3634         http://trac.webkit.org/changeset/212394
3635
3636 2017-02-15  Eric Carlson  <eric.carlson@apple.com>
3637
3638         [MediaStream] delete CaptureDeviceInfo struct
3639         https://bugs.webkit.org/show_bug.cgi?id=168395
3640
3641         Reviewed by Sam Weinig.
3642
3643         * Shared/WebCoreArgumentCoders.cpp:
3644         (IPC::ArgumentCoder<CaptureDevice>::encode):
3645         (IPC::ArgumentCoder<CaptureDevice>::decode):
3646
3647 2017-02-15  Anders Carlsson  <andersca@apple.com>
3648
3649         Try again.
3650
3651         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
3652         (WebKit::WebDragClient::startDrag):
3653
3654 2017-02-15  Anders Carlsson  <andersca@apple.com>
3655
3656         Attempt to fix the GTK+ build.
3657
3658         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
3659         (WebKit::WebDragClient::startDrag):
3660
3661 2017-02-15  Simon Fraser  <simon.fraser@apple.com>
3662
3663         Clean up WebProcessCreationParameters a little
3664         https://bugs.webkit.org/show_bug.cgi?id=168349
3665
3666         Reviewed by Alex Christensen.
3667
3668         Initialize the data members better, and rearrange to group the types in a slightly more space-efficient manner.
3669
3670         * Shared/WebProcessCreationParameters.cpp:
3671         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
3672         * Shared/WebProcessCreationParameters.h:
3673
3674 2017-02-15  Jer Noble  <jer.noble@apple.com>
3675
3676         REGRESSION(r183937): Fullscreen Exit animation missing mask
3677         https://bugs.webkit.org/show_bug.cgi?id=168360
3678
3679         Reviewed by Eric Carlson.
3680
3681         In r183937, the fullscreen window's clip layer has it's mask removed when the enter
3682         fullscreen animation completes, allowing low-power video playback mode to be entered. But
3683         this breaks the exit fullscreen animaiton, which assumes a mask is present. Abstract the
3684         mask creation code out into a static helper method, and use it at the beginning of the exit
3685         fullscreen animation to re-create the mask before adding animations to it.
3686
3687         * UIProcess/mac/WKFullScreenWindowController.mm:
3688         (createMask):
3689         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
3690         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
3691
3692 2017-02-15  Alex Christensen  <achristensen@webkit.org>
3693
3694         Unreviewed, rolling out r212169.
3695
3696         Broke iOS WebInspector
3697
3698         Reverted changeset:
3699
3700         "WebInspector: refactor RemoteInspector to move cocoa specific
3701         code to their own files"
3702         https://bugs.webkit.org/show_bug.cgi?id=166681
3703         http://trac.webkit.org/changeset/212169
3704
3705 2017-02-15  Anders Carlsson  <andersca@apple.com>
3706
3707         Modernize DragClient::startDrag somewhat
3708         https://bugs.webkit.org/show_bug.cgi?id=168379
3709
3710         Reviewed by Tim Horton.
3711
3712         Update for WebCore changes.
3713
3714         * WebProcess/WebCoreSupport/WebDragClient.cpp:
3715         (WebKit::WebDragClient::startDrag):
3716         * WebProcess/WebCoreSupport/WebDragClient.h:
3717         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3718         (WebKit::WebDragClient::startDrag):
3719
3720 2017-02-15  Aakash Jain  <aakash_jain@apple.com>
3721
3722         Remove WebIOSEvent interface
3723         https://bugs.webkit.org/show_bug.cgi?id=168368
3724
3725         Reviewed by Tim Horton.
3726
3727         * Shared/NativeWebKeyboardEvent.h: Using WebEvent from WebCore instead of WebIOSEvent.
3728         * Shared/ios/NativeWebKeyboardEventIOS.mm: Ditto.
3729         * Shared/ios/WebIOSEventFactory.h: Ditto.
3730         * Shared/ios/WebIOSEventFactory.mm: Ditto.
3731         * UIProcess/ios/WKContentViewInteraction.h: Ditto.
3732         * UIProcess/ios/WKContentViewInteraction.mm: Ditto.
3733         * UIProcess/API/C/WKPage.cpp: Using WebEvent from WebKit.
3734
3735 2017-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3736
3737         [GTK] Update cookie manager API to properly work with ephemeral sessions
3738         https://bugs.webkit.org/show_bug.cgi?id=168230
3739
3740         Reviewed by Michael Catanzaro.
3741
3742         WebKitCookieManager is associated to a particular WebKitWebContext and uses the default session ID
3743         unconditionally. It should be associated to a WebKitWebsiteDataManager instead and use its session ID. This
3744         patch also adds support for handling cookies with WebKitWebsiteDataManager and deprecates
3745         webkit_cookie_manager_get_domains_with_cookies(), webkit_cookie_manager_delete_cookies_for_domain() and
3746         webkit_cookie_manager_delete_all_cookies(). It also adds API to get the the WebKitWebsiteDataManager of a
3747         WebKitWebView, since it's the only way to get the WebKitCookieManager associated to an ephemeral web view.
3748
3749         * UIProcess/API/gtk/WebKitCookieManager.cpp:
3750         (webkitCookieManagerDispose): Stop observing cookie changes.
3751         (webkit_cookie_manager_class_init): Add dispose implementation.
3752         (webkitCookieManagerCreate): Create the WebKitCookieManager with a WebKitWebsiteDataManager.
3753         (webkit_cookie_manager_set_persistent_storage): Work with all contexts having the session.
3754         (webkit_cookie_manager_set_accept_policy): Ditto.
3755         (webkit_cookie_manager_get_accept_policy): Use any context having the session.
3756         (webkit_cookie_manager_get_domains_with_cookies): Deprecate and implement using WebKitWebsiteDataManager.
3757         (webkit_cookie_manager_get_domains_with_cookies_finish): Ditto.
3758         (webkit_cookie_manager_delete_cookies_for_domain): Ditto.
3759         (webkit_cookie_manager_delete_all_cookies): Ditto.
3760         * UIProcess/API/gtk/WebKitCookieManager.h:
3761         * UIProcess/API/gtk/WebKitCookieManagerPrivate.h:
3762         * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
3763         (attachCustomProtocolManagerClientToContext):
3764         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
3765         (attachDownloadClientToContext):
3766         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
3767         (attachInjectedBundleClientToContext):
3768         * UIProcess/API/gtk/WebKitSecurityManager.cpp:
3769         (registerSecurityPolicyForURIScheme):
3770         * UIProcess/API/gtk/WebKitWebContext.cpp:
3771         (webkitWebContextConstructed): Call webkitWebsiteDataManagerAddProcessPool.
3772         (webkitWebContextDispose): Call webkitWebsiteDataManagerRemoveProcessPool.
3773         (webkit_web_context_get_cookie_manager): Return the WebKitCookieManager of the WebKitWebsiteDataManager.
3774         (webkitWebContextGetProcessPool): Make it return a reference.
3775         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
3776         * UIProcess/API/gtk/WebKitWebView.cpp:
3777         (webkitWebViewConstructed): Call webkitWebsiteDataManagerAddProcessPool when creating a ephemeral web view.
3778         (webkitWebViewDispose): Call webkitWebsiteDataManagerRemoveProcessPool if needed.
3779         (webkit_web_view_get_website_data_manager): Return the WebKitWebsiteDataManager or the context one.
3780         * UIProcess/API/gtk/WebKitWebView.h:
3781         * UIProcess/API/gtk/WebKitWebsiteData.cpp: Add support for Cookies type.
3782         (recordContainsSupportedDataTypes):
3783         (toWebKitWebsiteDataTypes):
3784         * UIProcess/API/gtk/WebKitWebsiteData.h:
3785         * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
3786         (_WebKitWebsiteDataManagerPrivate::~_WebKitWebsiteDataManagerPrivate): Ensure all contexts were unregistered.
3787         (webkitWebsiteDataManagerAddProcessPool): Register the process pool in the session.
3788         (webkitWebsiteDataManagerRemoveProcessPool): Unregister the process poll from the session.
3789         (webkitWebsiteDataManagerGetProcessPools): Return the list of proces pools registered.
3790         (webkit_website_data_manager_get_cookie_manager): Return the WebKitCookieManager.
3791         (toWebsiteDataTypes): Add Cookies.
3792         * UIProcess/API/gtk/WebKitWebsiteDataManager.h:
3793         * UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h:
3794         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
3795         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
3796         (WebKit::WebsiteDataRecord::displayNameForCookieHostName): Handle localhost as a special case here for backwards
3797         compatibility.
3798
3799 2017-02-14  Wenson Hsieh  <wenson_hsieh@apple.com>
3800
3801         [WK2] Support data interaction on links
3802         https://bugs.webkit.org/show_bug.cgi?id=168331
3803         <rdar://problem/30200837>
3804
3805         Reviewed by Tim Horton.
3806
3807         Adds support for data interaction on links at the client layer for WebKit2. This involves several changes,
3808         detailed in the per-method changes below:
3809
3810         * Shared/ios/InteractionInformationAtPosition.h:
3811         * Shared/ios/InteractionInformationAtPosition.mm:
3812         (WebKit::InteractionInformationAtPosition::encode):
3813         (WebKit::InteractionInformationAtPosition::decode):
3814
3815         Add adjustedPointForNodeRespondingToClickEvents (the request point, adjusted to take nodeRespondingToClickEvents
3816         into account) to InteractionInformationAtPosition. The web process sends this adjusted point over to the UI
3817         process so that the UI process will be able to begin a data interaction at the adjusted point rather than the
3818         request point, which is necessary for small clickable (and data-interactive) elements such as links.
3819
3820         * UIProcess/ios/WKActionSheet.h:
3821         * UIProcess/ios/WKActionSheet.mm:
3822         (-[WKActionSheet presentSheet:]):
3823         (-[WKActionSheet _presentationRectForStyle:]):
3824         (-[WKActionSheet updateSheetPosition]):
3825         * UIProcess/ios/WKActionSheetAssistant.h:
3826         * UIProcess/ios/WKActionSheetAssistant.mm:
3827         (-[WKActionSheetAssistant presentationRectForElementUsingClosestIndicatedRect]):
3828         (-[WKActionSheetAssistant presentationRectForIndicatedElement]):
3829         (-[WKActionSheetAssistant showImageSheet]):
3830         (-[WKActionSheetAssistant _shouldPresentAtTouchLocationForElementRect:]):
3831         (-[WKActionSheetAssistant needsLinkIndicator]):
3832         (-[WKActionSheetAssistant showLinkSheet]):
3833         (-[WKActionSheetAssistant cleanupSheet]):
3834         (-[WKActionSheetAssistant _presentationStyleForImageAtElementRect:]): Deleted.
3835
3836         Add support for the WKActionSheetPresentAtClosestIndicatorRect style of presenting an action sheet. When
3837         showing the action sheet for a link and there is space along the margins to show a popover in the first place,
3838         we will now target the popover rect to the bounding rect of the set of adjacent (or nearly-adjacent) element
3839         rects closest to the user's touch location. This covers cases where the link is split into multiple rects due to
3840         a line break, when the link is on multiple lines with a jagged rect per line, and when both of the above are
3841         true.
3842
3843         * UIProcess/ios/WKContentViewInteraction.mm:
3844         (-[WKContentView pointIsInDataInteractionContent:]):
3845         (-[WKContentView _positionInformationDidChange:]):
3846         (-[WKContentView positionInformationForActionSheetAssistant:]):
3847         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
3848
3849         Include link indicator data in the position information request if needed. As the FIXME suggests, this can be
3850         improved by asynchronously presenting the action sheet assistant after the request returns, and is something we
3851         should address in the future.
3852
3853         * WebProcess/WebPage/ios/WebPageIOS.mm:
3854         (WebKit::WebPage::getPositionInformation):
3855
3856 2017-02-14  Jason Rinn  <jrinn@apple.com>
3857
3858         Add new WKWebKit Cocoa API for getContentsAsString.
3859         https://bugs.webkit.org/show_bug.cgi?id=168147
3860         <rdar://problem/30502539>
3861
3862         Reviewed by Tim Horton.
3863
3864         * UIProcess/API/Cocoa/WKWebView.mm:
3865         (-[WKWebView _getContentsAsStringWithCompletionHandler:]): New API for getContentsAsString.
3866         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3867
3868 2017-02-14  Chris Dumez  <cdumez@apple.com>
3869
3870         HTML Form Validation bubble should take minimum font size setting into consideration
3871         https://bugs.webkit.org/show_bug.cgi?id=168271
3872         <rdar://problem/29869869>
3873
3874         Reviewed by Simon Fraser.
3875
3876         * UIProcess/API/Cocoa/WKWebView.mm:
3877         (-[WKWebView _contentsOfUserInterfaceItem:]):
3878         Return font size used in the validation bubble.
3879
3880         * UIProcess/PageClient.h:
3881         * UIProcess/ios/PageClientImplIOS.h:
3882         * UIProcess/ios/PageClientImplIOS.mm:
3883         (WebKit::PageClientImpl::createValidationBubble):
3884         * UIProcess/ios/WebPageProxyIOS.mm:
3885         (WebKit::WebPageProxy::showValidationMessage):
3886         * UIProcess/mac/PageClientImpl.h:
3887         * UIProcess/mac/PageClientImpl.mm:
3888         (WebKit::PageClientImpl::createValidationBubble):
3889         * UIProcess/mac/WebPageProxyMac.mm:
3890         (WebKit::WebPageProxy::showValidationMessage):
3891         Pass minimum font size setting when constructing the form validation bubble.
3892
3893 2017-02-14  Commit Queue  <commit-queue@webkit.org>
3894
3895         Unreviewed, rolling out r211879.
3896         https://bugs.webkit.org/show_bug.cgi?id=168330
3897
3898         Not ready for the menu yet (Requested by eric_car_ on
3899         #webkit).
3900
3901         Reverted changeset:
3902
3903         "Add WebRTC as an off-by-default experimental feature menu
3904         item."
3905         https://bugs.webkit.org/show_bug.cgi?id=167972
3906         http://trac.webkit.org/changeset/211879
3907
3908 2017-02-14  Simon Fraser  <simon.fraser@apple.com>
3909
3910         Add logging and defensive fixes to try to detect problems causing blank tabs
3911         https://bugs.webkit.org/show_bug.cgi?id=168270
3912         rdar://problem/30505482
3913
3914         Reviewed by Jon Lee.
3915         
3916         Add release logging when -[WKWebView _beginAnimatedResizeWithUpdates:] and -[WKWebView _endAnimatedResize]
3917         are unbalanced across a commit, to detect cases where _endAnimatedResize wasn't called enough times.
3918         
3919         Also log when RemoteLayerTreeHost::updateLayerTree() fails to find a root layer, which should never happen.
3920         
3921         In WebPageProxy, clear m_firstLayerTreeTransactionIdAfterDidCommitLoad on a web process crash.
3922
3923         * Platform/Logging.h:
3924         * UIProcess/API/Cocoa/WKWebView.mm:
3925         (-[WKWebView _didCommitLayerTree:]):
3926         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3927         (-[WKWebView _endAnimatedResize]):
3928         * UIProcess/WebPageProxy.cpp:
3929         (WebKit::WebPageProxy::resetState):
3930         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3931         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3932         (WebKit::RemoteLayerTreeDrawingAreaProxy::isAlwaysOnLoggingAllowed):
3933         * UIProcess/mac/RemoteLayerTreeHost.mm:
3934         (WebKit::RemoteLayerTreeHost::updateLayerTree):
3935         (WebKit::RemoteLayerTreeHost::clearLayers):
3936         * WebProcess/WebPage/WebFrame.cpp:
3937         (WebKit::WebFrame::WebFrame):
3938         * WebProcess/WebPage/WebFrame.h:
3939
3940 2017-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3941
3942         Allow to use stored credentials also for downloads started by DownloadManager::startDownload
3943         https://bugs.webkit.org/show_bug.cgi?id=167584
3944
3945         Reviewed by Michael Catanzaro.
3946
3947         Cliking on a link that triggers a download works on an already HTTP authenticated site works, but right clicking
3948         and downloading from the context menu shows the HTTP auth dialog again. This is because PendingDownload uses
3949         DoNotAllowStoredCredentials unconditionally. We want to allow using cached credentials at least for
3950         non-ephemeral sessions.
3951
3952         * NetworkProcess/Downloads/DownloadManager.cpp:
3953         (WebKit::DownloadManager::startDownload):
3954
3955 2017-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3956
3957         [GTK] Make DragImageRef a RefPtr instead of a plain pointer
3958         https://bugs.webkit.org/show_bug.cgi?id=168296
3959
3960         Reviewed by Sergio Villar Senin.
3961
3962         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
3963         (WebKit::WebDragClient::startDrag):
3964
3965 2017-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3966
3967         [SOUP] Ensure a response MIME type when Content-Type is missing and sniffing not allowed
3968         https://bugs.webkit.org/show_bug.cgi?id=168299
3969
3970         Reviewed by Sergio Villar Senin.
3971
3972         Sniffing is not allowed but we can try to guess the MIME using the response path, or at least fallback to
3973         default MIME type instead of leaving an empty string. This matches what mac port does.
3974
3975         Fixes: http/tests/inspector/network/fetch-response-body.html
3976                http/tests/inspector/network/xhr-response-body.html
3977
3978         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3979         (WebKit::NetworkDataTaskSoup::didSendRequest):
3980
3981 2017-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3982
3983         CookieManager only works with the default session
3984         https://bugs.webkit.org/show_bug.cgi?id=168229
3985
3986         Reviewed by Alex Christensen.
3987
3988         Make CookieManager session aware by adding a SessionID parameter to all its functions, and update all the callers
3989         to pass the default session ID, preserving the current
3990         behavior. WebCookieManagerProxy::startObservingCookieChanges() now also receives an optional callback to be
3991         called on every change.
3992
3993         * UIProcess/API/C/WKCookieManager.cpp:
3994         (WKCookieManagerGetHostnamesWithCookies):
3995         (WKCookieManagerDeleteCookiesForHostname):
3996         (WKCookieManagerDeleteAllCookies):
3997         (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
3998         (WKCookieManagerStartObservingCookieChanges):
3999         (WKCookieManagerStopObservingCookieChanges):
4000         * UIProcess/API/gtk/WebKitCookieManager.cpp:
4001         (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate):
4002         (webkitCookieManagerCreate):
4003         (webkit_cookie_manager_set_persistent_storage):
4004         (webkit_cookie_manager_get_domains_with_cookies):
4005         (webkit_cookie_manager_delete_cookies_for_domain):
4006         (webkit_cookie_manager_delete_all_cookies):
4007         * UIProcess/Automation/WebAutomationSession.cpp:
4008         (WebKit::WebAutomationSession::addSingleCookie):
4009         (WebKit::WebAutomationSession::deleteAllCookies):
4010         * UIProcess/WebCookieManagerProxy.cpp:
4011         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
4012         (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
4013         (WebKit::WebCookieManagerProxy::deleteAllCookies):
4014         (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
4015         (WebKit::WebCookieManagerProxy::addCookie):
4016         (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
4017         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
4018         (WebKit::WebCookieManagerProxy::cookiesDidChange):
4019         * UIProcess/WebCookieManagerProxy.h:
4020         * UIProcess/WebCookieManagerProxy.messages.in:
4021         * WebProcess/Cookies/WebCookieManager.cpp:
4022         (WebKit::WebCookieManager::WebCookieManager):
4023         (WebKit::WebCookieManager::getHostnamesWithCookies):
4024         (WebKit::WebCookieManager::deleteCookiesForHostname):
4025         (WebKit::WebCookieManager::deleteAllCookies):
4026         (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
4027         (WebKit::WebCookieManager::addCookie):
4028         (WebKit::WebCookieManager::startObservingCookieChanges):
4029         (WebKit::WebCookieManager::stopObservingCookieChanges):
4030         * WebProcess/Cookies/WebCookieManager.h:
4031         * WebProcess/Cookies/WebCookieManager.messages.in:
4032
4033 2017-02-14  Tomas Popela  <tpopela@redhat.com>
4034
4035         Unreviewed, fix documentation typo
4036
4037         * UIProcess/API/gtk/WebKitEditingCommands.h:
4038
4039 2017-02-12  Brian Burg  <bburg@apple.com>
4040
4041         Web Inspector: expose system user interface layout direction through InspectorFrontendHost
4042         https://bugs.webkit.org/show_bug.cgi?id=168209
4043         <rdar://problem/11573736>
4044
4045         Reviewed by Joseph Pecoraro.
4046
4047         Forward the UserInterfaceLayoutDirection of the inspector page. If the WebKit client has
4048         properly set the UI directionality from system settings in PageClient, this will get inherited
4049         automatically by the Inspector's WebPage instance.
4050
4051         * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
4052         (WebKit::RemoteWebInspectorUI::userInterfaceLayoutDirection):
4053         * WebProcess/WebPage/RemoteWebInspectorUI.h:
4054         * WebProcess/WebPage/WebInspectorUI.cpp:
4055         (WebKit::WebInspectorUI::userInterfaceLayoutDirection):
4056         * WebProcess/WebPage/WebInspectorUI.h:
4057
4058 2017-02-13  Youenn Fablet  <youennf@gmail.com>
4059
4060         [WebRTC] Creating RTCPeerConnection with libwebrtc backend is crashing on rwt
4061         https://bugs.webkit.org/show_bug.cgi?id=168250
4062
4063         Reviewed by Alex Christensen.
4064
4065         * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
4066         (WebKit::LibWebRTCProvider::createPeerConnection):
4067         * WebProcess/Network/webrtc/LibWebRTCProvider.h:
4068         * WebProcess/Network/webrtc/LibWebRTCSocket.h:
4069         * WebProcess/Network/webrtc/WebRTCMonitor.cpp:
4070         (WebKit::WebRTCMonitor::StartUpdating):
4071         (WebKit::WebRTCMonitor::networksChanged):
4072         * WebProcess/Network/webrtc/WebRTCMonitor.h:
4073         * WebProcess/Network/webrtc/WebRTCResolver.cpp:
4074         (WebKit::WebRTCResolver::setResolvedAddress):
4075         (WebKit::WebRTCResolver::resolvedAddressError):
4076         * WebProcess/Network/webrtc/WebRTCSocket.cpp: