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