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