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