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