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