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