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