Remove spurious C++ include from _WKTestingDelegate.h
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2017-02-26  Alexey Proskuryakov  <ap@apple.com>
2
3         Remove spurious C++ include from _WKTestingDelegate.h
4         https://bugs.webkit.org/show_bug.cgi?id=168877
5
6         Reviewed by Dan Bernstein.
7
8         * UIProcess/API/Cocoa/_WKTestingDelegate.h:
9
10 2017-02-26  Alexey Proskuryakov  <ap@apple.com>
11
12         Remove unimplemented WKResourceLoadStatisticsManagerSetReducedTimestampResolution
13         https://bugs.webkit.org/show_bug.cgi?id=168880
14
15         Reviewed by Dan Bernstein.
16
17         * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
18
19 2017-02-26  Alexey Proskuryakov  <ap@apple.com>
20
21         Remove leftover WebKit2 C API function declarations
22         https://bugs.webkit.org/show_bug.cgi?id=168879
23
24         Reviewed by Tim Horton.
25
26         * UIProcess/API/C/WKPreferencesRefPrivate.h:
27
28 2017-02-26  Alexey Proskuryakov  <ap@apple.com>
29
30         Remove some old WKSecurityOrigin binary compatibility stubs
31         https://bugs.webkit.org/show_bug.cgi?id=168881
32
33         Reviewed by Dan Bernstein.
34
35         * Shared/API/c/WKSecurityOriginRef.cpp:
36         (WKSecurityOriginGetHost): Deleted.
37         (WKSecurityOriginGetProtocol): Deleted.
38
39 2017-02-26  Wenson Hsieh  <wenson_hsieh@apple.com>
40
41         REGRESSION (r211312): Double-clicking a word selects it along with the space that follows it
42         https://bugs.webkit.org/show_bug.cgi?id=168821
43         <rdar://problem/30690431>
44
45         Reviewed by Tim Horton.
46
47         Actually encode and decode smartInsertDeleteEnabled when sending WebPageCreationParameters over XPC.
48
49         * Shared/WebPageCreationParameters.cpp:
50         (WebKit::WebPageCreationParameters::encode):
51         (WebKit::WebPageCreationParameters::decode):
52
53 2017-02-26  Chris Dumez  <cdumez@apple.com>
54
55         HitTestResult's linkSuggestedFilename should sanitize download attribute
56         https://bugs.webkit.org/show_bug.cgi?id=168856
57         <rdar://problem/30683109>
58
59         Reviewed by Antti Koivisto.
60
61         HitTestResult's linkSuggestedFilename should sanitize download attribute.
62         This is used by the context menu's "Download Linked File" & "Download Linked
63         File As..." actions.
64
65         * Shared/WebHitTestResultData.cpp:
66         (WebKit::WebHitTestResultData::WebHitTestResultData):
67         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
68         (WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):
69
70 2017-02-25  Michael Catanzaro  <mcatanzaro@igalia.com>
71
72         [GTK] Unreviewed, document deficiency in webkit_website_data_manager_clear() API
73
74         Document that this function cannot currently delete cookie data for a particular period of
75         time.
76
77         * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
78
79 2017-02-24  Joseph Pecoraro  <pecoraro@apple.com>
80
81         [Resource Timing] Gather timing information with reliable responseEnd time
82         https://bugs.webkit.org/show_bug.cgi?id=168351
83
84         Reviewed by Alex Christensen.
85
86         Change from an unused `double finishTime` to a complete WebCore::NetworkLoadMetrics
87         object in the didFinishLoad ResourceLoader path. We may also extend this in the
88         didFail path later on. This allows the NetworkProcess to give complete timing
89         information, and more final metrics about the load, to WebCore.
90
91         * NetworkProcess/NetworkDataTask.h:
92         (WebKit::NetworkDataTaskClient::didCompleteWithError):
93         Give the NetworkDataTaskClient a basic didCompleteWithError for a completion
94         without metrics. For loads that complete with an error, or haven't populated
95         any metrics, this will pass empty metrics onward.
96
97         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
98         (WebKit::BlobDownloadClient::didFinishLoading):
99         * NetworkProcess/Downloads/BlobDownloadClient.h:
100         * NetworkProcess/Downloads/PendingDownload.h:
101         * NetworkProcess/PingLoad.h:
102         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
103         (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
104         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
105         * NetworkProcess/NetworkDataTaskBlob.cpp:
106         (WebKit::NetworkDataTaskBlob::didFail):
107         * NetworkProcess/NetworkLoad.cpp:
108         (WebKit::NetworkLoad::continueWillSendRequest):
109         (WebKit::NetworkLoad::didCompleteWithError):
110         (WebKit::NetworkLoad::didFinishLoading):
111         * NetworkProcess/NetworkLoad.h:
112         * NetworkProcess/NetworkLoadClient.h:
113         * NetworkProcess/NetworkResourceLoader.cpp:
114         (WebKit::NetworkResourceLoader::didFinishLoading):
115         (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
116         * NetworkProcess/NetworkResourceLoader.h:
117         * WebProcess/Network/WebResourceLoader.cpp:
118         (WebKit::WebResourceLoader::didFinishResourceLoad):
119         (WebKit::WebResourceLoader::didReceiveResource):
120         * WebProcess/Network/WebResourceLoader.h:
121         * WebProcess/Network/WebResourceLoader.messages.in:
122         Change didFinishLoad paths to take a NetworkLoadMetrics object instead of finishTime.
123         Change didCompleteWithError pathes to include a NetworkLoadMetrics object instead of finishTime.
124
125         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
126         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
127         (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
128         Own a NetworkLoadTiming that will be populated with the load.
129
130         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
131         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
132         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
133         (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
134         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
135         Populate NetworkLoadMetrics in the didFinishCollectingMetrics NSURLSessionTaskDelegate method.
136
137         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
138         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
139         (WebKit::NetworkDataTaskSoup::timeoutFired):
140         (WebKit::NetworkDataTaskSoup::didSendRequest):
141         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
142         (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
143         (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
144         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
145         (WebKit::NetworkDataTaskSoup::didFinishRead):
146         (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
147         (WebKit::NetworkDataTaskSoup::didFailDownload):
148         (WebKit::NetworkDataTaskSoup::didFail):
149         (WebKit::NetworkDataTaskSoup::networkEvent):
150         (WebKit::NetworkDataTaskSoup::didStartRequest):
151         (WebKit::NetworkDataTaskSoup::didRestart):
152         * NetworkProcess/soup/NetworkDataTaskSoup.h:
153         Instead of populating the NetworkLoadMetrics on the ResourceResponse, populate
154         a member variable during the entire load and dispatch didFinishCollectingMetrics
155         right before didCompleteLoadWithError.
156
157 2017-02-24  Chris Dumez  <cdumez@apple.com>
158
159         Unreviewed, rolling out r212944.
160
161         Caused a lot of failures on the debug bots
162
163         Reverted changeset:
164
165         "[Resource Timing] Gather timing information with reliable
166         responseEnd time"
167         https://bugs.webkit.org/show_bug.cgi?id=168351
168         http://trac.webkit.org/changeset/212944
169
170 2017-02-24  Wenson Hsieh  <wenson_hsieh@apple.com>
171
172         Unreviewed, fix the internal build
173
174         * UIProcess/ios/WKContentViewInteraction.h:
175
176 2017-02-24  Matt Rajca  <mrajca@apple.com>
177
178         Media: notify clients when autoplay is denied
179         https://bugs.webkit.org/show_bug.cgi?id=168840
180
181         Reviewed by Alex Christensen.
182
183         * UIProcess/API/APIUIClient.h:
184         (API::UIClient::handleAutoplayEvent):
185         (API::UIClient::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
186         * UIProcess/API/C/WKPage.cpp:
187         (WKPageSetPageUIClient):
188         * UIProcess/API/C/WKPageUIClient.h:
189         * UIProcess/WebPageProxy.cpp:
190         (WebKit::WebPageProxy::handleAutoplayEvent):
191         (WebKit::WebPageProxy::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
192         * UIProcess/WebPageProxy.h:
193         * UIProcess/WebPageProxy.messages.in:
194         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
195         (WebKit::WebChromeClient::handleAutoplayEvent):
196         (WebKit::WebChromeClient::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
197         * WebProcess/WebCoreSupport/WebChromeClient.h:
198
199 2017-02-20  Wenson Hsieh  <wenson_hsieh@apple.com>
200
201         Refactor data interaction to use new WKDataInteraction SPI
202         https://bugs.webkit.org/show_bug.cgi?id=168602
203         Work towards <rdar://problem/30313681>
204
205         Reviewed by Tim Horton.
206
207         Adjust testing SPI to match new data interaction interfaces.
208
209         * Platform/spi/ios/UIKitSPI.h:
210         * UIProcess/API/Cocoa/WKWebView.mm:
211         (-[WKWebView _simulateDataInteractionEntered:]):
212         (-[WKWebView _simulateDataInteractionUpdated:]):
213         (-[WKWebView _simulateDataInteractionPerformOperation:]):
214         (-[WKWebView _simulateDataInteractionEnded:]):
215         (-[WKWebView _simulateDataInteractionSessionDidEnd:]):
216         (-[WKWebView _simulateWillBeginDataInteractionWithSession:]):
217         (-[WKWebView _simulatedItemsForSession:]):
218         (-[WKWebView _simulatePrepareForDataInteractionSession:completion:]):
219         (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]): Deleted.
220         (-[WKWebView _simulateFailedDataInteractionWithIndex:]): Deleted.
221         (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]): Deleted.
222         (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]): Deleted.
223         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
224         * UIProcess/ios/WKContentViewInteraction.h:
225         * UIProcess/ios/WKContentViewInteraction.mm:
226         (-[WKContentView _positionInformationDidChange:]):
227         * UIProcess/ios/WKScrollView.h:
228         * UIProcess/ios/WKScrollView.mm:
229
230 2017-02-20  Wenson Hsieh  <wenson_hsieh@apple.com>
231
232         Remove the data interaction gesture recognizer
233         https://bugs.webkit.org/show_bug.cgi?id=168600
234         <rdar://problem/30313681>
235
236         Reviewed by Anders Carlsson.
237
238         The data interaction gesture recognizer will no longer be needed moving forward.
239
240         * UIProcess/API/Cocoa/WKWebView.mm:
241         (-[WKWebView _simulateDataInteractionGestureRecognized]): Deleted.
242         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
243         * UIProcess/ios/WKContentViewInteraction.h:
244         * UIProcess/ios/WKContentViewInteraction.mm:
245         (-[WKContentView setupInteraction]):
246         (-[WKContentView cleanupInteraction]):
247         (-[WKContentView _removeDefaultGestureRecognizers]):
248         (-[WKContentView _addDefaultGestureRecognizers]):
249         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
250         (-[WKContentView gestureRecognizerShouldBegin:]):
251         (-[WKContentView _dataInteractionGestureRecognizer]): Deleted.
252
253 2017-02-24  Chris Dumez  <cdumez@apple.com>
254
255         [iOS][WK2] Disable network cache speculative revalidation / loading in low power mode
256         https://bugs.webkit.org/show_bug.cgi?id=168832
257         <rdar://problem/30697911>
258
259         Reviewed by Antti Koivisto.
260
261         Disable network cache speculative revalidation / loading in low power mode on iOS to
262         save battery.
263
264         * NetworkProcess/cache/NetworkCache.cpp:
265         (WebKit::NetworkCache::Cache::initialize):
266         * NetworkProcess/cache/NetworkCache.h:
267
268 2017-02-24  John Wilander  <wilander@apple.com>
269
270         Resource Load Statistics: Add alternate classification method
271         https://bugs.webkit.org/show_bug.cgi?id=168347
272         <rdar://problem/30352793>
273         <rdar://problem/30646710>
274         <rdar://problem/30660708>
275
276         Reviewed by Alex Christensen.
277
278         This patch adds a CorePrediction-based classifier to the WebResourceLoadStatisticsStore.
279         The CorePrediction framework is introduced as a dependency for macOS and iOS. The patch
280         also adds functions to support layout tests of the feature.
281
282         * Platform/Logging.h:
283             Added channel ResourceLoadStatistics.
284         * Platform/classifier/ResourceLoadStatisticsClassifier.h: Added.
285             Pulls in the Cocoa-specific classifier for Cocoa-based platforms.
286         (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
287         * Platform/classifier/ResourceLoadStatisticsClassifierBase.cpp: Added.
288         (WebKit::ResourceLoadStatisticsClassifierBase::hasPrevalentResourceCharacteristics):
289             Shared classifier logic.
290         (WebKit::ResourceLoadStatisticsClassifierBase::classifyWithVectorThreshold):
291             Fallback classifier for when we don't have CorePrediction.
292         * Platform/classifier/ResourceLoadStatisticsClassifierBase.h: Added.
293         (WebKit::ResourceLoadStatisticsClassifierBase::ResourceLoadStatisticsClassifierBase):
294         (WebKit::ResourceLoadStatisticsClassifierBase::~ResourceLoadStatisticsClassifierBase):
295         * Platform/classifier/cocoa/CorePredictionSoftLink.h: Added.
296             Soft links to CorePrediction and the two functions we use from it.
297         * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: Added.
298         (WebKit::ResourceLoadStatisticsClassifier::classify):
299         (WebKit::ResourceLoadStatisticsClassifier::storagePath):
300         (WebKit::ResourceLoadStatisticsClassifier::shouldUseCorePredictionAndHaveModelLoaded):
301         (WebKit::ResourceLoadStatisticsClassifier::singletonPredictionModel):
302             The new classifier for Cocoa platforms.
303         * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h: Added.
304         * PlatformGTK.cmake:
305             Added Platform/classifier directory and ResourceLoadStatisticsClassifierBase.cpp.
306         * PlatformMac.cmake:
307             Added Platform/classifier and Platform/classifier/cocoa directories, and
308             source files ResourceLoadStatisticsClassifierBase.cpp and
309             ResourceLoadStatisticsClassifierCocoa.cpp
310         * Resources/ResourceLoadStatistics/corePrediction_model: Added.
311             Model file to load into CorePrediction.
312         * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
313         (WKResourceLoadStatisticsManagerSetSubframeUnderTopFrameOrigin):
314         (WKResourceLoadStatisticsManagerSetSubresourceUnderTopFrameOrigin):
315         (WKResourceLoadStatisticsManagerSetSubresourceUniqueRedirectTo):
316             Test infrastructure.
317         * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
318         * UIProcess/WebResourceLoadStatisticsManager.cpp:
319         (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
320         (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
321         (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
322             Test infrastructure.
323         * UIProcess/WebResourceLoadStatisticsManager.h:
324         * UIProcess/WebResourceLoadStatisticsStore.cpp:
325         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
326             Renamed m_storagePath to m_statisticsStoragePath for clarity.
327         (WebKit::WebResourceLoadStatisticsStore::classifyResource):
328             Now calls the classifier through its ResourceLoadStatisticsClassifier
329             member variable.
330         (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
331             Renamed m_storagePath to m_statisticsStoragePath for clarity.
332         (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
333             Renamed m_storagePath to m_statisticsStoragePath for clarity.
334         (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics): Deleted.
335         * UIProcess/WebResourceLoadStatisticsStore.h:
336         * WebKit2.xcodeproj/project.pbxproj:
337             Added the new classifier source files under Platform/classifier and the
338             corePrediction_model file under Resources/ResourceLoadStatistics.
339
340 2017-02-23  Joseph Pecoraro  <pecoraro@apple.com>
341
342         [Resource Timing] Add Experimental Feature Flag
343         https://bugs.webkit.org/show_bug.cgi?id=167147
344
345         Reviewed by Ryosuke Niwa.
346
347         * Shared/WebPreferencesDefinitions.h:
348         Move ResourceTiming to experimental section.
349         Disable it for El Capitan due to known issues.
350
351 2017-02-23  Joseph Pecoraro  <pecoraro@apple.com>
352
353         [Resource Timing] Gather timing information with reliable responseEnd time
354         https://bugs.webkit.org/show_bug.cgi?id=168351
355
356         Reviewed by Alex Christensen.
357
358         Change from an unused `double finishTime` to a complete WebCore::NetworkLoadMetrics
359         object in the didFinishLoad ResourceLoader path. We may also extend this in the
360         didFail path later on. This allows the NetworkProcess to give complete timing
361         information, and more final metrics about the load, to WebCore.
362
363         * NetworkProcess/NetworkDataTask.h:
364         (WebKit::NetworkDataTaskClient::didCompleteWithError):
365         Give the NetworkDataTaskClient a basic didCompleteWithError for a completion
366         without metrics. For loads that complete with an error, or haven't populated
367         any metrics, this will pass empty metrics onward.
368
369         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
370         (WebKit::BlobDownloadClient::didFinishLoading):
371         * NetworkProcess/Downloads/BlobDownloadClient.h:
372         * NetworkProcess/Downloads/PendingDownload.h:
373         * NetworkProcess/PingLoad.h:
374         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
375         (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
376         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
377         * NetworkProcess/NetworkDataTaskBlob.cpp:
378         (WebKit::NetworkDataTaskBlob::didFail):
379         * NetworkProcess/NetworkLoad.cpp:
380         (WebKit::NetworkLoad::continueWillSendRequest):
381         (WebKit::NetworkLoad::didCompleteWithError):
382         (WebKit::NetworkLoad::didFinishLoading):
383         * NetworkProcess/NetworkLoad.h:
384         * NetworkProcess/NetworkLoadClient.h:
385         * NetworkProcess/NetworkResourceLoader.cpp:
386         (WebKit::NetworkResourceLoader::didFinishLoading):
387         (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
388         * NetworkProcess/NetworkResourceLoader.h:
389         * WebProcess/Network/WebResourceLoader.cpp:
390         (WebKit::WebResourceLoader::didFinishResourceLoad):
391         (WebKit::WebResourceLoader::didReceiveResource):
392         * WebProcess/Network/WebResourceLoader.h:
393         * WebProcess/Network/WebResourceLoader.messages.in:
394         Change didFinishLoad paths to take a NetworkLoadMetrics object instead of finishTime.
395         Change didCompleteWithError pathes to include a NetworkLoadMetrics object instead of finishTime.
396
397         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
398         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
399         (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
400         Own a NetworkLoadTiming that will be populated with the load.
401
402         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
403         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
404         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
405         (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
406         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
407         Populate NetworkLoadMetrics in the didFinishCollectingMetrics NSURLSessionTaskDelegate method.
408
409         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
410         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
411         (WebKit::NetworkDataTaskSoup::timeoutFired):
412         (WebKit::NetworkDataTaskSoup::didSendRequest):
413         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
414         (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
415         (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
416         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
417         (WebKit::NetworkDataTaskSoup::didFinishRead):
418         (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
419         (WebKit::NetworkDataTaskSoup::didFailDownload):
420         (WebKit::NetworkDataTaskSoup::didFail):
421         (WebKit::NetworkDataTaskSoup::networkEvent):
422         (WebKit::NetworkDataTaskSoup::didStartRequest):
423         (WebKit::NetworkDataTaskSoup::didRestart):
424         * NetworkProcess/soup/NetworkDataTaskSoup.h:
425         Instead of populating the NetworkLoadMetrics on the ResourceResponse, populate
426         a member variable during the entire load and dispatch didFinishCollectingMetrics
427         right before didCompleteLoadWithError.
428
429 2017-02-23  Beth Dakin  <bdakin@apple.com> + Dan Saunders  <dasau@microsoft.com>
430
431         No reliable way to get a snapshot of WKWebView
432         https://bugs.webkit.org/show_bug.cgi?id=161450
433         -and corresponding-
434         <rdar://problem/23846039>
435
436         Reviewed by Tim Horton.
437
438         This patch adds a new API to WKWebView to snapshot a rect:
439         takeSnapshotWithConfiguration:completionHandler:
440
441         It also adds a new API object WKSnapshotConfiguration.
442
443         * UIProcess/API/Cocoa/WKSnapshotConfiguration.h: Added.
444         * UIProcess/API/Cocoa/WKSnapshotConfiguration.mm: Added.
445         (-[WKSnapshotConfiguration copyWithZone:]):
446         * UIProcess/API/Cocoa/WKWebView.h:
447         * UIProcess/API/Cocoa/WKWebView.mm:
448         (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
449         * WebKit2.xcodeproj/project.pbxproj:
450
451 2017-02-23  Jer Noble  <jer.noble@apple.com>
452
453         ASSERT in RTCNetwork::IPAddress::decode()
454         https://bugs.webkit.org/show_bug.cgi?id=168792
455
456         Reviewed by Tim Horton.
457
458         An ASSERT added to RTCNetwork::IPAddress::decode in r212781 was hit due to a bad encode of SocketAddress; an
459         extra boolean value was added to the encoder unnecessarily, leading to garbage data being decoded in the following
460         IPAddress.
461
462         Drive-by-fix: allow the IPAddress encoder/decoder to pass through a value of AF_UNSPEC for an IPAddress to support
463         passing through an "empty" IPAddress value.
464
465         * Shared/RTCNetwork.cpp:
466         (WebKit::RTCNetwork::IPAddress::decode):
467         (WebKit::RTCNetwork::IPAddress::encode):
468         (WebKit::RTCNetwork::SocketAddress::encode):
469
470 2017-02-23  Eric Carlson  <eric.carlson@apple.com>
471
472         [WebRTC][Mac][WebKit2] WebRTC requires media capture
473         https://bugs.webkit.org/show_bug.cgi?id=168782
474         <rdar://problem/30675242>
475
476         Reviewed by Youenn Fablet.
477
478         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
479         (WebKit::WebProcessPool::platformInitializeWebProcess): Extend the sanbox to allow microphone access
480         if media stream OR WebRTC is enabled.
481
482 2017-02-23  Brent Fulgham  <bfulgham@apple.com>
483
484         [Mac] Remove unneeded sandbox exceptions for media elements
485         https://bugs.webkit.org/show_bug.cgi?id=168767
486
487         Reviewed by Alex Christensen.
488
489         Remove several sandbox exceptions that have not been needed for the past four
490         or five macOS releases.
491         
492         * WebProcess/com.apple.WebProcess.sb.in:
493
494 2017-02-23  Brent Fulgham  <bfulgham@apple.com>
495
496         [Mac] Remove com.apple.audio.VDCAssistant from sandboxes
497         https://bugs.webkit.org/show_bug.cgi?id=168764
498         <rdar://problem/16736919>
499
500         Reviewed by Alex Christensen.
501
502         Remove unneeded sandbox class.
503
504         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
505         * WebProcess/com.apple.WebProcess.sb.in:
506
507 2017-02-22  Wenson Hsieh  <wenson_hsieh@apple.com>
508
509         Data interaction causes selection to fall out of sync between web/UI processes
510         https://bugs.webkit.org/show_bug.cgi?id=168735
511         <rdar://problem/30657817>
512
513         Reviewed by Tim Horton.
514
515         Fixes a bug with data interaction causing selection state to fall out of sync between the UI and web processes,
516         and also introduces testing infrastructure and tests for grabbing UI-side selection view rects in TestWebKitAPI.
517         While performing a data interaction operation, we now lift restrictions for assisting the focused node.
518
519         * UIProcess/ios/WKContentViewInteraction.h:
520         * UIProcess/ios/WKContentViewInteraction.mm:
521         (-[WKContentView cleanupInteraction]):
522         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
523
524 2017-02-23  Carlos Garcia Campos  <cgarcia@igalia.com>
525
526         [GTK] Crash attempting to load Flash plugin in Wayland
527         https://bugs.webkit.org/show_bug.cgi?id=163159
528
529         Reviewed by Michael Catanzaro.
530
531         The problem is that we check if the current diplay is X11 or Wayland also in the plugin process, but with GTK2
532         plugins the display is always X11. We should early reject plugins requiring GTK2 in the UI process when the
533         current display is Wayland.
534
535         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
536         (WebKit::PluginInfoStore::getPluginInfo):
537         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
538         (WebKit::PluginProcessProxy::scanPlugin):
539         * UIProcess/gtk/WebPageProxyGtk.cpp:
540         (WebKit::WebPageProxy::createPluginContainer): Add an assert to ensure this message is never received on a
541         non-X11 display.
542         * WebProcess/Plugins/PluginView.cpp:
543         (WebKit::PluginView::createPluginContainer): Never send CreatePluginContainer message to the UI process if the
544         display is not X11.
545
546 2017-02-23  Eric Carlson  <eric.carlson@apple.com>
547
548         [MediaStream iOS] Allow web process sandbox to be extended for media capture
549         https://bugs.webkit.org/show_bug.cgi?id=168756
550
551         Reviewed by Brent Fulgham.
552
553         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add rules to dynamically
554         extend the sandbox to allow access to the camera and/or microphone.
555
556 2017-02-23  Tomas Popela  <tpopela@redhat.com>
557
558         [GTK] Drag and drop is always moving the content even if copy is requested
559         https://bugs.webkit.org/show_bug.cgi?id=168424
560
561         Reviewed by Carlos Garcia Campos.
562
563         Drag and drop is always moving the content around even if the copy is
564         requested (i.e. by pressing the Control key).
565
566         * UIProcess/gtk/DragAndDropHandler.cpp:
567         (WebKit::DragAndDropHandler::drop):
568
569 2017-02-22  Carlos Garcia Campos  <cgarcia@igalia.com>
570
571         Better handle Thread and RunLoop initialization
572         https://bugs.webkit.org/show_bug.cgi?id=167828
573
574         Reviewed by Yusuke Suzuki.
575
576         Remove unnecessary call to WTF::initializeMainThread().
577
578         * Shared/WebKit2Initialize.cpp:
579         (WebKit::InitializeWebKit2):
580
581 2017-02-22  Chris Dumez  <cdumez@apple.com>
582
583         Unreviewed, drop console logging landed by mistake as part of r212832.
584
585         * UIProcess/BackgroundProcessResponsivenessTimer.cpp:
586         (WebKit::BackgroundProcessResponsivenessTimer::timerFired):
587
588 2017-02-22  Brent Fulgham  <bfulgham@apple.com>
589
590         [Mac] Tighten sandbox to deny process-info* access
591         https://bugs.webkit.org/show_bug.cgi?id=168704
592         <rdar://problem/16371441>
593
594         Reviewed by Alex Christensen.
595
596         Tighten the various WebKit sandboxes by denying access to process-info.
597         Add back specific features needed to run WebKit tests and to do browsing
598         of websites (including plugins).
599
600         * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
601         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
602         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
603         * WebProcess/com.apple.WebProcess.sb.in:
604
605 2017-02-22  Anders Carlsson  <andersca@apple.com>
606
607         Crash if there's a mismatch between the WebKit used by the UI process and child processes respectively
608         https://bugs.webkit.org/show_bug.cgi?id=168739
609         Part of rdar://problem/30631411.
610
611         Reviewed by Geoffrey Garen.
612
613         If the UI process and web process for some reason end up using different versions of the WebKit framework, weird things happen
614         because the message format is different between versions. To avoid this, send along the WebKit bundle version from the UI process
615         in the XPC bootstrap message, check that it matches inside the XPC main functions. If there's a mismatch, crash.
616
617         * Shared/Cocoa/ChildProcessCocoa.mm:
618         (WebKit::ChildProcess::didReceiveInvalidMessage):
619         Fix parameters.
620
621         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
622         (main):
623         Check for the bundle version and crash if it's not what we expect.
624
625         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
626         (WebKit::ProcessLauncher::launchProcess):
627         Initialize the bundle version.
628
629         * WebProcess/cocoa/WebProcessCocoa.mm:
630         (WebKit::_WKSetCrashReportApplicationSpecificInformation):
631         Export this so we can call it from the XPC services without having to link WKSI.
632
633 2017-02-22  Chris Dumez  <cdumez@apple.com>
634
635         [WK2] Call processDidBecomeUnresponsive delegate when a background process is unresponsive
636         https://bugs.webkit.org/show_bug.cgi?id=168683
637         <rdar://problem/30558745>
638
639         Reviewed by Dan Bernstein.
640
641         Call processDidBecomeUnresponsive delegate when a background process is unresponsive
642         instead of killing it on WebKit side. This gives the client the choice about what it
643         wants to do about this process.
644
645         * UIProcess/API/APIProcessPoolConfiguration.cpp:
646         (API::ProcessPoolConfiguration::copy):
647         * UIProcess/API/APIProcessPoolConfiguration.h:
648         * UIProcess/API/C/WKContext.cpp:
649         * UIProcess/API/C/WKContextPrivate.h:
650         * UIProcess/BackgroundProcessResponsivenessTimer.cpp: Renamed from Source/WebKit2/UIProcess/UnresponsiveWebProcessTerminator.cpp.
651         (WebKit::BackgroundProcessResponsivenessTimer::BackgroundProcessResponsivenessTimer):
652         (WebKit::BackgroundProcessResponsivenessTimer::updateState):
653         (WebKit::BackgroundProcessResponsivenessTimer::timerFired):
654         * UIProcess/BackgroundProcessResponsivenessTimer.h: Renamed from Source/WebKit2/UIProcess/UnresponsiveWebProcessTerminator.h.
655         * UIProcess/WebPageProxy.cpp:
656         (WebKit::WebPageProxy::reattachToWebProcess):
657         (WebKit::WebPageProxy::dispatchActivityStateChange):
658         (WebKit::WebPageProxy::terminateProcess):
659         * UIProcess/WebPageProxy.h:
660         * UIProcess/WebProcessProxy.cpp:
661         (WebKit::m_backgroundResponsivenessTimer):
662         * UIProcess/WebProcessProxy.h:
663         * WebKit2.xcodeproj/project.pbxproj:
664
665 2017-02-22  Carlos Garcia Campos  <cgarcia@igalia.com>
666
667         NetworkProcess: Stop disabling buffering when NETWORK_CACHE is disabled in build
668         https://bugs.webkit.org/show_bug.cgi?id=168637
669
670         Reviewed by Alex Christensen.
671
672         It was added in r193752 as part of bug #137692 to fix an infinite loop in network process that happened in EFL
673         because they didn't enable the network cache at that time. I think that was actually a workaround, and it was
674         added without any comment so it has stayed there even when EFL enabled disk cache, and now that is gone. Looking
675         at current code I see no reason why buffering can't work with the disk cache disabled, so I think it's time to
676         remove that workaround.
677
678         * WebProcess/Network/WebLoaderStrategy.cpp:
679         (WebKit::maximumBufferingTime):
680
681 2017-02-21  Youenn Fablet  <youenn@apple.com>
682
683         [WebRTC][Mac] Activate libwebrtc
684         https://bugs.webkit.org/show_bug.cgi?id=167293
685         <rdar://problem/30401864>
686
687         Reviewed by Alex Christensen.
688
689         Activating PeerConnection runtime flag based on successful loading of libwebrtc.dylib.
690
691         * Configurations/WebKit.xcconfig:
692         * Configurations/FeatureDefines.xcconfig:
693         * Shared/WebPreferencesDefinitions.h:
694         * UIProcess/WebPreferences.cpp:
695         (WebKit::checkWebRTCAvailability):
696
697 2017-02-21  Commit Queue  <commit-queue@webkit.org>
698
699         Unreviewed, rolling out r212786.
700         https://bugs.webkit.org/show_bug.cgi?id=168710
701
702         It broke GTK+ port when using single shared process model
703         (Requested by KaL on #webkit).
704
705         Reverted changeset:
706
707         "Refactor WebViewImpl creation in preparation for supporting
708         multiple WebsiteDataStores."
709         https://bugs.webkit.org/show_bug.cgi?id=168676
710         http://trac.webkit.org/changeset/212786
711
712 2017-02-21  Brady Eidson  <beidson@apple.com>
713
714         Refactor WebViewImpl creation in preparation for supporting multiple WebsiteDataStores.
715         https://bugs.webkit.org/show_bug.cgi?id=168676
716
717         Reviewed by Alex Christensen.
718
719         * UIProcess/API/Cocoa/WKWebView.mm:
720         (-[WKWebView _initializeWithConfiguration:]): Allow for WebViewImpl creation to fail.
721
722         * UIProcess/API/mac/WKView.mm:
723         (-[WKView initWithFrame:processPool:configuration:]): Ditto.
724
725         * UIProcess/Cocoa/WebViewImpl.h:
726         * UIProcess/Cocoa/WebViewImpl.mm:
727         (WebKit::WebViewImpl::maybeCreate):
728         (WebKit::WebViewImpl::WebViewImpl):
729
730         * UIProcess/WebPageProxy.cpp:
731         (WebKit::WebPageProxy::reattachToWebProcess): New WebProcess creation might fail. Handle it.
732         * UIProcess/WebProcessPool.cpp:
733         (WebKit::WebProcessPool::createNewWebProcess):
734         (WebKit::WebProcessPool::warmInitialProcess):
735         (WebKit::WebProcessPool::maybeCreateNewWebProcessRespectingProcessCountLimit): This can now fail
736           if the process will have a non-default WebsiteDataStore but we've already reached the process cap.
737         (WebKit::WebProcessPool::createWebPage):
738         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit): Deleted.
739         * UIProcess/WebProcessPool.h:
740
741 2017-02-21  Youenn Fablet  <youenn@apple.com>
742
743         [WebRTC] WebKit2 should assert that libwebrtc transmitted IP addresses family is IP4 or IP6
744         https://bugs.webkit.org/show_bug.cgi?id=168691
745
746         Reviewed by Alex Christensen.
747
748         Adding some asserts that family is IPv4 or IPv6.
749
750         * Shared/RTCNetwork.cpp:
751         (WebKit::RTCNetwork::IPAddress::decode):
752         (WebKit::RTCNetwork::IPAddress::encode):
753
754 2017-02-20  Simon Fraser  <simon.fraser@apple.com>
755
756         Add support to PlatformCALayer/GraphicsLayerCA for subpixel-antialiased text, with a Setting and a MiniBrowser switch
757         https://bugs.webkit.org/show_bug.cgi?id=168620
758         <rdar://problem/30617772>
759
760         Reviewed by Tim Horton.
761
762         Add a Setting for subpixel-antialiased layer text. Plumb this through GraphicsLayerCA and
763         PlatformCALayer, where it ultimately affects the layer contents format.
764         
765         This is not supported with UI-side compositing.
766
767         * Shared/WebPreferencesDefinitions.h:
768         * UIProcess/API/C/WKPreferences.cpp:
769         (WKPreferencesSetSubpixelAntialiasedLayerTextEnabled):
770         (WKPreferencesGetSubpixelAntialiasedLayerTextEnabled):
771         * UIProcess/API/C/WKPreferencesRefPrivate.h:
772         * UIProcess/API/Cocoa/WKPreferences.mm:
773         (-[WKPreferences _subpixelAntialiasedLayerTextEnabled]):
774         (-[WKPreferences _setSubpixelAntialiasedLayerTextEnabled:]):
775         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
776         * WebProcess/WebPage/WebPage.cpp:
777         (WebKit::WebPage::updatePreferences):
778         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
779         (WebKit::PlatformCALayerRemote::supportsSubpixelAntialiasedText):
780         (WebKit::PlatformCALayerRemote::setSupportsSubpixelAntialiasedText):
781         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
782         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
783         (WebKit::PlatformCALayerRemoteTiledBacking::supportsSubpixelAntialiasedText):
784         (WebKit::PlatformCALayerRemoteTiledBacking::setSupportsSubpixelAntialiasedText):
785         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
786
787 2017-02-21  John Wilander  <wilander@apple.com>
788
789         Resource Load Statistics: Only scan website data store once per session ID + reinstate removal counting
790         https://bugs.webkit.org/show_bug.cgi?id=168541
791
792         Reviewed by Alex Christensen.
793
794         * UIProcess/WebProcessProxy.cpp:
795         (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyOwnedDomainsInAllPersistentDataStores):
796             The CallbackAggregator now merges a list of domains for which we
797             have removed data records and eventually reports this back to the
798             caller.
799         * UIProcess/WebProcessProxy.h:
800         * UIProcess/WebResourceLoadStatisticsStore.cpp:
801         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
802             Now reports back to its WebCore::ResourceLoadStatisticsStore
803             which domains have had data records removed.
804         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
805         (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyOwnedDomains):
806             The completion handler now handles data record removal counting.
807         (WebKit::WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains):
808             The completion handler now handles data record removal counting.
809         * UIProcess/WebsiteData/WebsiteDataStore.h:
810
811 2017-02-21  Alex Christensen  <achristensen@webkit.org>
812
813         Fix CMake build.
814
815         * PlatformMac.cmake:
816
817 2017-02-21  Youenn Fablet  <youenn@apple.com>
818
819         [WebRTC][Mac] Network process sandbox does not allow WebRTC networking
820         https://bugs.webkit.org/show_bug.cgi?id=168594
821
822         Reviewed by Brent Fulgham.
823
824         UIProcess was passing a boolean to know whether WebRTC networking is allowed or not to the network process.
825         This boolean was known to late for the sandbox to be relaxed.
826         A sandbox extension is now used instead to relax the sandbox.
827
828         * NetworkProcess/NetworkProcess.h:
829         * NetworkProcess/NetworkProcessCreationParameters.cpp:
830         (WebKit::NetworkProcessCreationParameters::encode):
831         (WebKit::NetworkProcessCreationParameters::decode):
832         * NetworkProcess/NetworkProcessCreationParameters.h:
833         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
834         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
835         * NetworkProcess/mac/NetworkProcessMac.mm:
836         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
837         (WebKit::NetworkProcess::initializeSandbox):
838         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
839         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
840         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
841
842 2017-02-21  Youenn Fablet  <youenn@apple.com>
843
844         [WebRTC] ICE candidates should be filtered according a policy
845         https://bugs.webkit.org/show_bug.cgi?id=168348
846
847         Reviewed by Alex Christensen.
848
849         Adding the possibility for the UI process to control the ICE candidate filtering and whether libwebrtc can
850         enumerate all interfaces or not.
851
852         Disabling ICE candidate filtering for the moment.
853         Enabling to enumerate all interfaces for the moment.
854
855         In the future, ICE candidate filtering should be tied to getUserMedia.
856         Interface enumeration should be disabled with the default configuration.
857         We should do that once we have sufficient testing in various network infrastructures.
858
859         * UIProcess/WebPageProxy.cpp:
860         (WebKit::WebPageProxy::initializeWebPage):
861         * WebKit2.xcodeproj/project.pbxproj:
862         * WebProcess/WebPage/WebPage.h:
863         (WebKit::WebPage::disableICECandidateFiltering):
864         (WebKit::WebPage::enableICECandidateFiltering):
865         (WebKit::WebPage::disableEnumeratingAllNetworkInterfaces):
866         (WebKit::WebPage::enableEnumeratingAllNetworkInterfaces):
867         * WebProcess/WebPage/WebPage.messages.in:
868
869 2017-02-21  Youenn Fablet  <youenn@apple.com>
870
871         [WebRTC] NetworkRTCMonitor should ensure clearing its manager only once
872         https://bugs.webkit.org/show_bug.cgi?id=168661
873
874         Reviewed by Alex Christensen.
875
876         Making sure NetworkRTCMonitor manager is cleared only once.
877         ALso ensuring that manager does not get destroyed as part of NetworkRTCMonitor destructor.
878         The manager needs to be destroyed in the RTC network thread.
879
880         * NetworkProcess/webrtc/NetworkRTCMonitor.cpp:
881         (WebKit::NetworkRTCMonitor::~NetworkRTCMonitor):
882         (WebKit::NetworkRTCMonitor::stopUpdating):
883         * NetworkProcess/webrtc/NetworkRTCMonitor.h:
884
885 2017-02-21  Brent Fulgham  <bfulgham@apple.com>
886
887         [WebRTC][Mac][WebKit2] Revise sandbox to limit connections to UDP and TCP
888         https://bugs.webkit.org/show_bug.cgi?id=168664
889         <rdar://problem/30600587>
890
891         Reviewed by Youenn Fablet.
892
893         Add filters to the WebRTC rule to limit network traffic to UDP and TCP.
894
895         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
896
897 2017-02-21  Maureen Daum  <mdaum@apple.com>
898
899         Check what LocalStorage data exists in deleteDatabasesModifiedSince() before attempting deletion.
900         https://bugs.webkit.org/show_bug.cgi?id=168659
901         rdar://problem/22781730
902
903         Reviewed by Brady Eidson.
904
905         Check what LocalStorage data exists in deleteDatabasesModifiedSince() before attempting deletion.
906         It is possible that another process has caused information to be added to LocalStorage
907         after we created this LocalStorageDatabaseTracker instance, so we should update our
908         internal state by checking the contents of StorageTracker.db and the other local
909         storage files so we know what databases actually exist. By calling importOriginIdentifiers()
910         at the start of deleteDatabasesModifiedSince(), m_origins will now have the up-to-date
911         list of origins LocalStorage contains data for.
912
913         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
914         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
915
916 2017-02-21  Carlos Garcia Campos  <cgarcia@igalia.com>
917
918         Reduce platform ifdefs in WebKit2 custom protocols implementation
919         https://bugs.webkit.org/show_bug.cgi?id=165028
920
921         Reviewed by Darin Adler.
922
923         Make mac implementation use the APICustomProtocolManagerClient to share more code with the soup based ports.
924
925         * CMakeLists.txt: Add CustomProtocolManagerProxy.cpp.
926         * PlatformEfl.cmake: Remove CustomProtocolManagerProxySoup.cpp.
927         * PlatformGTK.cmake: Ditto.
928         * PlatformMac.cmake: Remove CustomProtocolManagerProxyMac.mm.
929         * UIProcess/API/APICustomProtocolManagerClient.h:
930         (API::CustomProtocolManagerClient::startLoading): Make it void, since we were always returning true and the
931         returned value was ignored.
932         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
933         (EwkUrlSchemeRequest::finish): Update to new CustomProtocolManagerProxy API.
934         * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
935         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
936         (webkitURISchemeRequestReadCallback): Ditto.
937         * UIProcess/Cocoa/CustomProtocolManagerClient.h: Added.
938         * UIProcess/Cocoa/CustomProtocolManagerClient.mm: Added.
939         (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:]):
940         (-[WKCustomProtocolLoader dealloc]):
941         (-[WKCustomProtocolLoader connection:didFailWithError:]):
942         (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
943         (-[WKCustomProtocolLoader connection:didReceiveData:]):
944         (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
945         (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
946         (WebKit::CustomProtocolManagerClient::startLoading):
947         (WebKit::CustomProtocolManagerClient::stopLoading):
948         (WebKit::CustomProtocolManagerClient::invalidate):
949         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
950         (WebKit::WebProcessPool::platformInitialize): Set the CustomProtocolManagerClient.
951         (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
952         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Added.
953         (WebKit::CustomProtocolManagerProxy::startLoading):
954         (WebKit::CustomProtocolManagerProxy::processDidClose):
955         (WebKit::CustomProtocolManagerProxy::wasRedirectedToRequest):
956         (WebKit::CustomProtocolManagerProxy::didReceiveResponse):
957         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
958         * UIProcess/WebProcessPool.cpp:
959         (WebKit::globalURLSchemesWithCustomProtocolHandlers): Just moved here to use it from ensureNetworkProcess().
960         (WebKit::WebProcessPool::WebProcessPool): Remove soup ifdefs.
961         (WebKit::WebProcessPool::setCustomProtocolManagerClient): Moved from the soup implementation.
962         (WebKit::WebProcessPool::ensureNetworkProcess): Initialize custom protocols parameters.
963         (WebKit::WebProcessPool::registerSchemeForCustomProtocol): Register the protocol if not already registered globally.
964         (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): Remove soup ifdefs.
965         * UIProcess/WebProcessPool.h: Remove soup ifdefs.
966         * UIProcess/efl/RequestManagerClientEfl.cpp:
967         * UIProcess/soup/WebProcessPoolSoup.cpp:
968         (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
969         * WebKit2.xcodeproj/project.pbxproj:
970
971 2017-02-21  Daewoong Jang  <daewoong.jang@navercorp.com>
972
973         Remove unused files.
974         https://bugs.webkit.org/show_bug.cgi?id=168656.
975
976         Reviewed by Csaba Osztrogonác.
977
978         Remove files which became unused after removal of EFL port.
979
980         * UIProcess/CoordinatedGraphics/PageViewportController.cpp: Removed.
981         * UIProcess/CoordinatedGraphics/PageViewportController.h: Removed.
982         * UIProcess/PageViewportControllerClient.h: Removed.
983
984 2017-02-21  Youenn Fablet  <youenn@apple.com>
985
986         [WebRTC] LibWebRTCSocket::SendTo message should have a correct SocketAddress
987         https://bugs.webkit.org/show_bug.cgi?id=168636
988
989         Reviewed by Eric Carlson.
990
991         * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
992         (WebKit::LibWebRTCSocket::SendTo): Ensuring address remains valid during SendTo message lifetime.
993
994 2017-02-21  Alex Christensen  <achristensen@webkit.org>
995
996         Unreviewed, rolling out r212699.
997
998         Internal build not ready
999
1000         Reverted changeset:
1001
1002         "[WebRTC][Mac] Activate libwebrtc"
1003         https://bugs.webkit.org/show_bug.cgi?id=167293
1004         http://trac.webkit.org/changeset/212699
1005
1006 2017-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1007
1008         Remove ENABLE_THREADED_COMPOSITOR build option
1009         https://bugs.webkit.org/show_bug.cgi?id=168606
1010
1011         Reviewed by Michael Catanzaro.
1012
1013         Now that we have AC mode on demand with the threaded compositor there's no reason to keep the old AC code.
1014
1015         * PlatformGTK.cmake:
1016         * WebProcess/WebPage/LayerTreeHost.cpp:
1017         (WebKit::LayerTreeHost::create):
1018         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: Removed.
1019         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Removed.
1020
1021 2017-02-20  Youenn Fablet  <youenn@apple.com>
1022
1023         [WebRTC][Mac] Activate libwebrtc
1024         https://bugs.webkit.org/show_bug.cgi?id=167293
1025         <rdar://problem/30401864>
1026
1027         Reviewed by Alex Christensen.
1028
1029         Activating PeerConnection runtime flag based on successful loading of libwebrtc.dylib.
1030
1031         * Configurations/WebKit.xcconfig:
1032         * Shared/WebPreferencesDefinitions.h:
1033         * UIProcess/WebPreferences.cpp:
1034         (WebKit::checkWebRTCAvailability):
1035
1036 2017-02-20  Ryan Haddad  <ryanhaddad@apple.com>
1037
1038         Unreviewed, rolling out r212685.
1039
1040         This change broke the 32-bit Sierra build.
1041
1042         Reverted changeset:
1043
1044         "Resource Load Statistics: Add alternate classification
1045         method"
1046         https://bugs.webkit.org/show_bug.cgi?id=168347
1047         http://trac.webkit.org/changeset/212685
1048
1049 2017-02-20  John Wilander  <wilander@apple.com>
1050
1051         Resource Load Statistics: Add alternate classification method
1052         https://bugs.webkit.org/show_bug.cgi?id=168347
1053         <rdar://problem/30352793>
1054
1055         Reviewed by Alex Christensen.
1056
1057         This patch adds a CorePrediction-based classifier to the WebResourceLoadStatisticsStore.
1058         The CorePrediction framework is introduced as a dependency for macOS and iOS. The patch
1059         also adds functions to support layout tests of the feature.
1060
1061         * Configurations/BaseTarget.xcconfig:
1062         * Configurations/WebKit.xcconfig:
1063             Added dependency on CorePrediction.
1064         * Platform/classifier: Added.
1065         * Platform/classifier/ResourceLoadStatisticsClassifier.h: Added.
1066             Pulls in the Cocoa-specific classifier for Cocoa-based platforms.
1067         (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
1068         * Platform/classifier/ResourceLoadStatisticsClassifierBase.cpp: Added.
1069         (WebKit::ResourceLoadStatisticsClassifierBase::hasPrevalentResourceCharacteristics):
1070             Shared classifier logic.
1071         (WebKit::ResourceLoadStatisticsClassifierBase::classifyWithVectorThreshold):
1072             Fallback classifier for when we don't have CorePrediction.
1073         * Platform/classifier/ResourceLoadStatisticsClassifierBase.h: Added.
1074         (WebKit::ResourceLoadStatisticsClassifierBase::ResourceLoadStatisticsClassifierBase):
1075         (WebKit::ResourceLoadStatisticsClassifierBase::~ResourceLoadStatisticsClassifierBase):
1076         * Platform/classifier/cocoa: Added.
1077         * Platform/classifier/cocoa/CorePredictionSPI.h: Added.
1078             Includes CorePrediction if available, otherwise declares needed symbols.
1079             Always redeclares the functions so we'll get a build error if
1080             CorePrediction changes.
1081         * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: Added.
1082         (WebKit::ResourceLoadStatisticsClassifier::classify):
1083         (WebKit::ResourceLoadStatisticsClassifier::storagePath):
1084         (WebKit::ResourceLoadStatisticsClassifier::shouldUseCorePrediction):
1085             The new classifier for Cocoa platforms.
1086         * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h: Added.
1087         (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
1088         * PlatformGTK.cmake:
1089            Added Platform/classifier directory and ResourceLoadStatisticsClassifierBase.cpp.
1090         * PlatformMac.cmake:
1091            Added Platform/classifier and Platform/classifier/cocoa directories, and
1092            source files ResourceLoadStatisticsClassifierBase.cpp and
1093            ResourceLoadStatisticsClassifierCocoa.cpp
1094         * Resources/ResourceLoadStatistics: Added.
1095         * Resources/ResourceLoadStatistics/corePrediction_model: Added.
1096             Model file to load into CorePrediction.
1097         * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
1098         (WKResourceLoadStatisticsManagerSetSubframeUnderTopFrameOrigin):
1099         (WKResourceLoadStatisticsManagerSetSubresourceUnderTopFrameOrigin):
1100         (WKResourceLoadStatisticsManagerSetSubresourceUniqueRedirectTo):
1101             Test infrastructure.
1102         * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
1103         * UIProcess/WebResourceLoadStatisticsManager.cpp:
1104         (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
1105         (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
1106         (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
1107             Test infrastructure.
1108         * UIProcess/WebResourceLoadStatisticsManager.h:
1109         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1110         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
1111             Renamed m_storagePath to m_statisticsStoragePath for clarity.
1112         (WebKit::WebResourceLoadStatisticsStore::classifyResource):
1113             Now calls the classifier through its ResourceLoadStatisticsClassifier
1114             member variable.
1115         (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
1116             Renamed m_storagePath to m_statisticsStoragePath for clarity.
1117         (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
1118             Renamed m_storagePath to m_statisticsStoragePath for clarity.
1119         (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics): Deleted.
1120         * UIProcess/WebResourceLoadStatisticsStore.h:
1121         * WebKit2.xcodeproj/project.pbxproj:
1122             Added the new classifier source files under Platform/classifier and the
1123             corePrediction_model file under Resources/ResourceLoadStatistics.
1124
1125 2017-02-20  Wenson Hsieh  <wenson_hsieh@apple.com>
1126
1127         Add plumbing to the UI process for TextIndicatorData when computing the drag image
1128         https://bugs.webkit.org/show_bug.cgi?id=168583
1129         Work towards <rdar://problem/30313681>
1130
1131         Reviewed by Tim Horton.
1132
1133         Changes the SetDragImage IPC message to send TextIndicatorData over to the UI process. Also changes the boolean
1134         isLink parameter to be a DragSourceAction instead, leaving it up to the receiving end (in the UI process) to
1135         special case links.
1136
1137         Additionally, renames hasDataInteractionAtPosition to hasSelectionAtPosition to better reflect its purpose.
1138
1139         These changes are only infrastructural should not alter any behaviors.
1140
1141         * Shared/ios/InteractionInformationAtPosition.h:
1142         * Shared/ios/InteractionInformationAtPosition.mm:
1143         (WebKit::InteractionInformationAtPosition::encode):
1144         (WebKit::InteractionInformationAtPosition::decode):
1145         * UIProcess/API/Cocoa/WKWebView.mm:
1146         (-[WKWebView _simulateDataInteractionGestureRecognized]):
1147         (-[WKWebView _simulateDataInteractionEntered:]):
1148         (-[WKWebView _simulateDataInteractionUpdated:]):
1149         (-[WKWebView _simulateDataInteractionPerformOperation:]):
1150         (-[WKWebView _simulateDataInteractionEnded:]):
1151         (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]):
1152         (-[WKWebView _simulateFailedDataInteractionWithIndex:]):
1153         (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]):
1154         (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]):
1155         * UIProcess/API/Cocoa/_WKTestingDelegate.h:
1156         * UIProcess/PageClient.h:
1157         * UIProcess/WebPageProxy.h:
1158         * UIProcess/WebPageProxy.messages.in:
1159         * UIProcess/ios/PageClientImplIOS.h:
1160         * UIProcess/ios/PageClientImplIOS.mm:
1161         (WebKit::PageClientImpl::setDragImage):
1162         (WebKit::PageClientImpl::startDataInteractionWithImage):
1163         * UIProcess/ios/WKContentViewInteraction.h:
1164         * UIProcess/ios/WKContentViewInteraction.mm:
1165         (-[WKContentView hasSelectablePositionAtPoint:]):
1166         (-[WKContentView pointIsInDataInteractionContent:]):
1167         (-[WKContentView _dataInteractionGestureRecognizer]):
1168         (-[WKContentView pointIsInAssistedNode:]):
1169         * UIProcess/mac/PageClientImpl.h:
1170         * UIProcess/mac/PageClientImpl.mm:
1171         (WebKit::PageClientImpl::setDragImage):
1172         * UIProcess/mac/WebPageProxyMac.mm:
1173         (WebKit::WebPageProxy::setDragImage):
1174         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1175         (WebKit::WebDragClient::startDrag):
1176         * WebProcess/WebPage/ios/WebPageIOS.mm:
1177         (WebKit::WebPage::getPositionInformation):
1178
1179 2017-02-20  David Quesada  <david_quesada@apple.com>
1180
1181         Don’t set NSURLSessionConfiguration’s _sourceApplicationAuditTokenData if _sourceApplicationBundleIdentifier is also set.
1182         https://bugs.webkit.org/show_bug.cgi?id=168607
1183
1184         rdar://problem/30239618
1185
1186         Reviewed by Geoffrey Garen.
1187
1188         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1189         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1190         If the process pool configuration sets a source application bundle identifier, don't give the NSURLSession configuration
1191         the audit token from the UI process, as it may be associated with an application with a conflicting bundle identifier.
1192
1193 2017-02-20  Ryan Haddad  <ryanhaddad@apple.com>
1194
1195         Unreviewed, rolling out r212632.
1196
1197         This change appears to have caused API test failures.
1198
1199         Reverted changeset:
1200
1201         "Reduce platform ifdefs in WebKit2 custom protocols
1202         implementation"
1203         https://bugs.webkit.org/show_bug.cgi?id=165028
1204         http://trac.webkit.org/changeset/212632
1205
1206 2017-02-20  Youenn Fablet  <youenn@apple.com>
1207
1208         [WebRTC] Fix some memory leaks in libwebrtc binding code
1209         https://bugs.webkit.org/show_bug.cgi?id=168596
1210
1211         Reviewed by Eric Carlson.
1212
1213         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
1214         (WebKit::NetworkRTCProvider::OnMessage):
1215
1216 2017-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1217
1218         Remove code under USE(GRAPHICS_SURFACE)
1219         https://bugs.webkit.org/show_bug.cgi?id=168592
1220
1221         Reviewed by Michael Catanzaro.
1222
1223         This was only used by EFL port.
1224
1225         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1226         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
1227         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
1228         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
1229         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1230         (WebKit::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
1231         (WebKit::CoordinatedGraphicsScene::deleteLayer):
1232         (WebKit::CoordinatedGraphicsScene::assignImageBackingToLayer):
1233         (WebKit::CoordinatedGraphicsScene::purgeGLResources):
1234         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
1235         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
1236         (WebKit::WebCoordinatedSurface::Handle::encode):
1237         (WebKit::WebCoordinatedSurface::Handle::decode):
1238         (WebKit::WebCoordinatedSurface::create):
1239         (WebKit::WebCoordinatedSurface::createGraphicsContext):
1240         (WebKit::WebCoordinatedSurface::createHandle):
1241         (WebKit::WebCoordinatedSurface::copyToTexture):
1242         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
1243
1244 2017-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1245
1246         Reduce platform ifdefs in WebKit2 custom protocols implementation
1247         https://bugs.webkit.org/show_bug.cgi?id=165028
1248
1249         Reviewed by Darin Adler.
1250
1251         Make mac implementation use the APICustomProtocolManagerClient to share more code with the soup based ports.
1252
1253         * CMakeLists.txt: Add CustomProtocolManagerProxy.cpp.
1254         * PlatformEfl.cmake: Remove CustomProtocolManagerProxySoup.cpp.
1255         * PlatformGTK.cmake: Ditto.
1256         * PlatformMac.cmake: Remove CustomProtocolManagerProxyMac.mm.
1257         * UIProcess/API/APICustomProtocolManagerClient.h:
1258         (API::CustomProtocolManagerClient::startLoading): Make it void, since we were always returning true and the
1259         returned value was ignored.
1260         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
1261         (EwkUrlSchemeRequest::finish): Update to new CustomProtocolManagerProxy API.
1262         * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
1263         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1264         (webkitURISchemeRequestReadCallback): Ditto.
1265         * UIProcess/Cocoa/CustomProtocolManagerClient.h: Added.
1266         * UIProcess/Cocoa/CustomProtocolManagerClient.mm: Added.
1267         (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:]):
1268         (-[WKCustomProtocolLoader dealloc]):
1269         (-[WKCustomProtocolLoader connection:didFailWithError:]):
1270         (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
1271         (-[WKCustomProtocolLoader connection:didReceiveData:]):
1272         (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
1273         (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
1274         (WebKit::CustomProtocolManagerClient::startLoading):
1275         (WebKit::CustomProtocolManagerClient::stopLoading):
1276         (WebKit::CustomProtocolManagerClient::invalidate):
1277         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1278         (WebKit::WebProcessPool::platformInitialize): Set the CustomProtocolManagerClient.
1279         (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
1280         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Added.
1281         (WebKit::CustomProtocolManagerProxy::startLoading):
1282         (WebKit::CustomProtocolManagerProxy::processDidClose):
1283         (WebKit::CustomProtocolManagerProxy::wasRedirectedToRequest):
1284         (WebKit::CustomProtocolManagerProxy::didReceiveResponse):
1285         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1286         * UIProcess/WebProcessPool.cpp:
1287         (WebKit::globalURLSchemesWithCustomProtocolHandlers): Just moved here to use it from ensureNetworkProcess().
1288         (WebKit::WebProcessPool::WebProcessPool): Remove soup ifdefs.
1289         (WebKit::WebProcessPool::setCustomProtocolManagerClient): Moved from the soup implementation.
1290         (WebKit::WebProcessPool::ensureNetworkProcess): Initialize custom protocols parameters.
1291         (WebKit::WebProcessPool::registerSchemeForCustomProtocol): Register the protocol if not already registered globally.
1292         (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): Remove soup ifdefs.
1293         * UIProcess/WebProcessPool.h: Remove soup ifdefs.
1294         * UIProcess/efl/RequestManagerClientEfl.cpp:
1295         * UIProcess/soup/WebProcessPoolSoup.cpp:
1296         (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
1297         * WebKit2.xcodeproj/project.pbxproj:
1298
1299 2017-02-20  Manuel Rego Casasnovas  <rego@igalia.com>
1300
1301         [css-grid] Remove compilation flag ENABLE_CSS_GRID_LAYOUT
1302         https://bugs.webkit.org/show_bug.cgi?id=167693
1303
1304         Reviewed by Sergio Villar Senin.
1305
1306         * Configurations/FeatureDefines.xcconfig:
1307         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1308         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1309         * WebProcess/WebPage/WebPage.cpp:
1310         (WebKit::WebPage::updatePreferences):
1311
1312 2017-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1313
1314         REGRESSION(r212345): [GTK] ASSERT(cookieChangeCallbackMap().contains(jar)) failed in WebCore::stopObservingCookieChanges:54
1315         https://bugs.webkit.org/show_bug.cgi?id=168375
1316
1317         Reviewed by Alex Christensen.
1318
1319         Simplify the cookies change notification. The current approach of the UI process telling the network process
1320         when to start and stop observing cookie changes is quite fragile and error prone. In the GTK+ port we always
1321         observe cookies, so our cookie manager always calls start in the constructor and stop in the destructor.
1322         Everything would be a lot simpler if the network process always monitored cookies.
1323
1324         * NetworkProcess/soup/NetworkSessionSoup.cpp:
1325         (WebKit::NetworkSessionSoup::NetworkSessionSoup): Set cookies observer handler for the session.
1326         (WebKit::NetworkSessionSoup::~NetworkSessionSoup): Remove the cookies observer handler.
1327         * UIProcess/API/gtk/WebKitCookieManager.cpp:
1328         (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate): Remove the cookies observer callback.
1329         (webkit_cookie_manager_class_init): Remove dispose implementation that is no longer needed.
1330         (webkitCookieManagerCreate): Set the cookies observer callback.
1331         (webkit_cookie_manager_set_persistent_storage): Remove code to start/stop observing cookies when the jar
1332         changes, the network process deals with that now.
1333         (webkitCookieManagerDispose): Deleted.
1334         * UIProcess/WebCookieManagerProxy.cpp:
1335         (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Remove the optional callback method in favor of an
1336         explicit method to the set the callback that doesn't send the StartObservingCookieChanges message to the network
1337         process.
1338         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Do not change the callback map here.
1339         (WebKit::WebCookieManagerProxy::setCookieObserverCallback): Add the callback to the map or remove the session if
1340         nullptr is given.
1341         * UIProcess/WebCookieManagerProxy.h:
1342         * WebProcess/Cookies/WebCookieManager.cpp:
1343         (WebKit::WebCookieManager::notifyCookiesDidChange): Send CookiesDidChange message to the UI process.
1344         (WebKit::WebCookieManager::startObservingCookieChanges): Use notifyCookiesDidChange().
1345         * WebProcess/Cookies/WebCookieManager.h:
1346         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
1347         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Set the policy on all sessions. Code moved from
1348         WebFrameNetworkingContext since it doesn't belong there.
1349         (WebKit::WebCookieManager::setCookiePersistentStorage): Use new method to set the cookie storage in the
1350         NetworkStorageSession.
1351         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
1352         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Deleted.
1353         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
1354
1355 2017-02-19  Chris Dumez  <cdumez@apple.com>
1356
1357         [WK2] Support termination of unresponsive WebContent processes that are in the background
1358         https://bugs.webkit.org/show_bug.cgi?id=168479
1359         <rdar://problem/30558745>
1360
1361         Reviewed by Antti Koivisto.
1362
1363         Support termination of unresponsive WebContent processes that are in the background.
1364         This protects us against cases where a background tab is unresponsive and has high CPU
1365         usage, thus draining the battery without the user knowing about it (e.g.
1366         <rdar://problem/29808005>).
1367
1368         The feature works as follows:
1369         - If a WebProcessProxy has pages but none of them are visible, then it will check
1370           regularly if its associated WebContent process is still responsive.
1371         - Every time we find that the WebContent process is responsive, we exponentially
1372           back off the timer to avoid waking up the process too often. The timer initially
1373           uses a 20 seconds interval and can back off up to 8 hours.
1374         - If the WebContent process is unresponsive, then we terminate it. No notification
1375           is shown to the user and the termination is not immediately observable since the
1376           tab is not visible and its title remains. The tab is not immediately reloaded
1377           so as to avoid getting back into a bad state in the background (and have a
1378           yo-yo effect).
1379         - If the user switches to a tab that was previously killed for being unresponsive
1380           while in the background, we will then reload the tab in a fresh WebContent
1381           process. The crash banner will only be shown if the tab has ever been visible.
1382           If it wasn't ever visible (e.g. session restore case), then it will look as if
1383           the tab loads for the first time when the user switches to it.
1384
1385         The functionality is disabled by default and can be enabled by the client via the new
1386         WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled() private API.
1387
1388         * CMakeLists.txt:
1389         * UIProcess/API/APIProcessPoolConfiguration.cpp:
1390         (API::ProcessPoolConfiguration::copy):
1391         * UIProcess/API/APIProcessPoolConfiguration.h:
1392         * UIProcess/API/C/WKContext.cpp:
1393         (WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled):
1394         * UIProcess/API/C/WKContextPrivate.h:
1395         * UIProcess/UnresponsiveWebProcessTerminator.cpp: Added.
1396         (WebKit::UnresponsiveWebProcessTerminator::UnresponsiveWebProcessTerminator):
1397         (WebKit::UnresponsiveWebProcessTerminator::updateState):
1398         (WebKit::pagesCopy):
1399         (WebKit::UnresponsiveWebProcessTerminator::timerFired):
1400         * UIProcess/UnresponsiveWebProcessTerminator.h: Added.
1401         (WebKit::UnresponsiveWebProcessTerminator::shouldBeActive):
1402         * UIProcess/WebPageProxy.cpp:
1403         (WebKit::WebPageProxy::reattachToWebProcess):
1404         (WebKit::WebPageProxy::reloadAfterBeingKilledInBackground):
1405         (WebKit::WebPageProxy::dispatchActivityStateChange):
1406         (WebKit::WebPageProxy::terminateProcess):
1407         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1408         * UIProcess/WebPageProxy.h:
1409         * UIProcess/WebProcessProxy.cpp:
1410         (WebKit::WebProcessProxy::WebProcessProxy):
1411         (WebKit::m_backgroundResponsivenessTimer):
1412         (WebKit::WebProcessProxy::createWebPage):
1413         (WebKit::WebProcessProxy::addExistingWebPage):
1414         (WebKit::WebProcessProxy::removeWebPage):
1415         (WebKit::WebProcessProxy::updateBackgroundResponsivenessTimer):
1416         * UIProcess/WebProcessProxy.h:
1417         (WebKit::WebProcessProxy::visiblePageCount):
1418         * WebKit2.xcodeproj/project.pbxproj:
1419
1420 2017-02-18  Michael Catanzaro  <mcatanzaro@igalia.com>
1421
1422         Remove COORDINATED_GRAPHICS_MULTIPROCESS
1423         https://bugs.webkit.org/show_bug.cgi?id=168514
1424
1425         Reviewed by Darin Adler.
1426
1427         * Shared/DrawingAreaInfo.h:
1428         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1429         (WKViewFindZoomableAreaForRect):
1430         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
1431         (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
1432         * UIProcess/AcceleratedDrawingAreaProxy.h:
1433         (WebKit::AcceleratedDrawingAreaProxy::coordinatedLayerTreeHostProxy): Deleted.
1434         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: Removed.
1435         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: Removed.
1436         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: Removed.
1437         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
1438         (WebKit::PageViewportController::pageTransitionViewportReady):
1439         * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp: Removed.
1440         * UIProcess/DrawingAreaProxy.h:
1441         * UIProcess/PageClient.h:
1442         * UIProcess/WebPageProxy.cpp:
1443         (WebKit::WebPageProxy::pageDidRequestScroll): Deleted.
1444         (WebKit::WebPageProxy::pageTransitionViewportReady): Deleted.
1445         (WebKit::WebPageProxy::didRenderFrame): Deleted.
1446         (WebKit::WebPageProxy::commitPageTransitionViewport): Deleted.
1447         * UIProcess/WebPageProxy.h:
1448         * UIProcess/WebPageProxy.messages.in:
1449         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1450         (WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea):
1451         (WebKit::AcceleratedDrawingArea::updateBackingStoreState):
1452         (WebKit::AcceleratedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage): Deleted.
1453         * WebProcess/WebPage/AcceleratedDrawingArea.h:
1454         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1455         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1456         (WebKit::CoordinatedLayerTreeHost::commitSceneState):
1457         (WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
1458         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1459         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Removed.
1460         * WebProcess/WebPage/DrawingArea.cpp:
1461         (WebKit::DrawingArea::create):
1462         * WebProcess/WebPage/DrawingArea.h:
1463         * WebProcess/WebPage/LayerTreeHost.cpp:
1464         (WebKit::LayerTreeHost::create):
1465         * WebProcess/WebPage/LayerTreeHost.h:
1466         * WebProcess/WebPage/WebPage.cpp:
1467         (WebKit::WebPage::~WebPage):
1468         (WebKit::WebPage::pageDidRequestScroll):
1469         (WebKit::WebPage::didCompletePageTransition):
1470         (WebKit::WebPage::didReceiveMessage):
1471         (WebKit::WebPage::commitPageTransitionViewport): Deleted.
1472         * WebProcess/WebPage/WebPage.h:
1473         * WebProcess/WebPage/WebPage.messages.in:
1474
1475 2017-02-18  Michael Catanzaro  <mcatanzaro@igalia.com>
1476
1477         [GTK] Cannot paste primary selection into web view in Wayland
1478         https://bugs.webkit.org/show_bug.cgi?id=166949
1479
1480         Reviewed by Carlos Garcia Campos.
1481
1482         Once upon a time, primary selection (middle-click paste) was not supported in Wayland. At
1483         the time, I changed this function to report that primary selection was unsupported. But
1484         nowadays, primary selection works fine in all GTK+ applications except WebKit. All we have
1485         to do to make it work in WebKit is change this return value.
1486
1487         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1488         (WebKit::WebEditorClient::supportsGlobalSelection):
1489
1490 2017-02-17  Brian Burg  <bburg@apple.com>
1491
1492         Web Inspector: RTL: Inspector window should dock to the left when using RTL layout direction
1493         https://bugs.webkit.org/show_bug.cgi?id=168273
1494         <rdar://problem/29949325>
1495
1496         Reviewed by Matt Baker.
1497
1498         Add the ability to dock Web Inspector to the left of the inspected view.
1499         The frontend decides whether the Dock to Side button docks left or right
1500         based on the current layout direction.
1501
1502         * UIProcess/WebInspectorProxy.cpp:
1503         (WebKit::WebInspectorProxy::attachLeft):
1504         (WebKit::WebInspectorProxy::attach):
1505         (WebKit::WebInspectorProxy::createInspectorPage):
1506         * UIProcess/WebInspectorProxy.h:
1507         * UIProcess/WebInspectorProxy.messages.in:
1508         Add plumbing for new dock configuration.
1509
1510         * UIProcess/mac/WebInspectorProxyMac.mm:
1511         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1512         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1513         (WebKit::WebInspectorProxy::platformAttach):
1514         Adapt existing sizing logic to work for docking to left.
1515
1516         * WebProcess/WebPage/WebInspectorUI.cpp:
1517         (WebKit::WebInspectorUI::requestSetDockSide):
1518         (WebKit::WebInspectorUI::setDockSide):
1519         * WebProcess/WebPage/WebInspectorUI.h:
1520         (WebKit::WebInspectorUI::attachedLeft):
1521         * WebProcess/WebPage/WebInspectorUI.messages.in:
1522         Add plumbing for new dock configuration.
1523
1524 2017-02-16  Simon Fraser  <simon.fraser@apple.com>
1525
1526         Allow PlatformCALayers to specify that they want deep color backing store
1527         https://bugs.webkit.org/show_bug.cgi?id=168495
1528
1529         Reviewed by Tim Horton.
1530
1531         Currently capable iOS devices get deep color backing store by virtue of a supports
1532         check in PlatformCALayerCocoa::PlatformCALayerCocoa(), and LegacyTileGridTile.
1533
1534         Future work will make layer contents format selection more complex, so express the need
1535         for deep color on PlatformCALayer, and have the creators of PlatformCALayer (mainly the
1536         flavors of GraphicsLayerCA) choose for them to support deep color. A bit of special-casing
1537         is needed to propagte the state to TileControllers.
1538         
1539         The deep-colorness now propagates from PlatformCALayerRemote to RemoteLayerBackingStore,
1540         instead of RemoteLayerBackingStore looking at the properties of the screen directly.
1541
1542         Remove PlatformCALayer::LayerTypeWebTiledLayer which was only used for the old CATiledLayers
1543         that we no longer use.
1544
1545         * Shared/mac/RemoteLayerBackingStore.h:
1546         * Shared/mac/RemoteLayerBackingStore.mm:
1547         (WebKit::RemoteLayerBackingStore::ensureBackingStore):
1548         (WebKit::RemoteLayerBackingStore::bytesPerPixel):
1549         (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
1550         (WebKit::RemoteLayerBackingStore::drawInContext):
1551         (WebKit::RemoteLayerBackingStore::surfaceBufferFormat):
1552         (WebKit::bufferFormat): Deleted.
1553         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
1554         (WebKit::GraphicsLayerCARemote::createPlatformCALayer):
1555         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1556         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1557         (WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
1558         (WebKit::PlatformCALayerRemote::updateBackingStore):
1559         (WebKit::PlatformCALayerRemote::wantsDeepColorBackingStore):
1560         (WebKit::PlatformCALayerRemote::setWantsDeepColorBackingStore):
1561         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1562         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
1563         (WebKit::PlatformCALayerRemoteTiledBacking::wantsDeepColorBackingStore):
1564         (WebKit::PlatformCALayerRemoteTiledBacking::setWantsDeepColorBackingStore):
1565         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
1566
1567 2017-02-17  Wenson Hsieh  <wenson_hsieh@apple.com>
1568
1569         [WK2] Action sheet should not dismiss when a DDAction with user interface is being presented
1570         https://bugs.webkit.org/show_bug.cgi?id=168528
1571         <rdar://problem/30515324>
1572
1573         Reviewed by Beth Dakin.
1574
1575         After r211643, -[WKActionSheet doneWithSheet] now dismisses the presenting view controller. This is called when
1576         interaction with the sheet is finished and is a reasonable thing to do in most cases. However, when using data
1577         detectors, we don't want to dismiss the presenting view controller, since DataDetector handles dismissing on its
1578         own and expects that its completion handler will be invoked.
1579
1580         To fix this, we add a parameter to doneWithSheet: to indicate whether or not we should additionally dismiss the
1581         presenting view controller, and pass in NO in the case where we are handing control over to DataDetector.
1582
1583         * UIProcess/ios/WKActionSheet.h:
1584         * UIProcess/ios/WKActionSheet.mm:
1585         (-[WKActionSheet doneWithSheet:]):
1586         (-[WKActionSheet doneWithSheet]): Deleted.
1587         * UIProcess/ios/WKActionSheetAssistant.mm:
1588         (-[WKActionSheetAssistant showDataDetectorsSheet]):
1589         (-[WKActionSheetAssistant cleanupSheet]):
1590
1591 2017-02-17  Michael Catanzaro  <mcatanzaro@igalia.com>
1592
1593         Remove EFL from WebKit2
1594         https://bugs.webkit.org/show_bug.cgi?id=168511
1595
1596         Reviewed by Alex Christensen.
1597
1598         * Platform/IPC/unix/ConnectionUnix.cpp:
1599         (IPC::Connection::platformInvalidate):
1600         (IPC::Connection::open):
1601         * Platform/Module.h:
1602         * PlatformEfl.cmake: Removed.
1603         * PluginProcess/unix/PluginProcessMainUnix.cpp:
1604         * Shared/API/APIObject.h:
1605         * Shared/API/c/WKBase.h:
1606         * Shared/API/c/WKSharedAPICast.h:
1607         (WebKit::toAPI):
1608         (WebKit::toImpl):
1609         * Shared/NativeWebKeyboardEvent.h:
1610         (WebKit::NativeWebKeyboardEvent::isFakeEventForComposition):
1611         (WebKit::NativeWebKeyboardEvent::isFiltered): Deleted.
1612         * Shared/NativeWebMouseEvent.h:
1613         (WebKit::NativeWebMouseEvent::nativeEvent):
1614         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Deleted.
1615         * Shared/NativeWebTouchEvent.h:
1616         (WebKit::NativeWebTouchEvent::nativeEvent):
1617         * Shared/NativeWebWheelEvent.h:
1618         (WebKit::NativeWebWheelEvent::nativeEvent):
1619         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1620         (WebKit::NetscapePluginModule::determineQuirks):
1621         * Shared/WebPreferencesDefinitions.h:
1622         * UIProcess/API/APIWebsiteDataStore.cpp:
1623         * UIProcess/API/C/WKAPICast.h:
1624         * UIProcess/API/C/WKTextChecker.cpp:
1625         * UIProcess/API/C/WKTextChecker.h:
1626         * UIProcess/ChildProcessProxy.cpp:
1627         (WebKit::ChildProcessProxy::getLaunchOptions):
1628         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
1629         (WebKit::PageViewportController::pixelAlignedFloatPoint):
1630         * UIProcess/InspectorServer/WebInspectorServer.h:
1631         * UIProcess/Launcher/ProcessLauncher.h:
1632         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
1633         * UIProcess/PageClient.h:
1634         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1635         (WebKit::PluginProcessProxy::scanPlugin):
1636         * UIProcess/WebInspectorProxy.h:
1637         * UIProcess/WebPageProxy.h:
1638         * WebKit2.xcodeproj/project.pbxproj:
1639         * WebProcess/InjectedBundle/InjectedBundle.h:
1640         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1641         (WebKit::getPluginDisplay):
1642         (WebKit::x11Screen):
1643         (WebKit::displayDepth):
1644         (WebKit::rootWindowID):
1645         (WebKit::NetscapePluginX11::paint):
1646         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1647         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
1648         (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
1649         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1650         (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
1651         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1652         (WebKit::WebFrameLoaderClient::saveViewStateToItem):
1653         (WebKit::WebFrameLoaderClient::restoreViewState):
1654         (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
1655         * WebProcess/WebPage/WebPage.cpp:
1656         (WebKit::WebPage::WebPage):
1657         * WebProcess/WebPage/WebPage.h:
1658         * WebProcess/WebPage/WebPage.messages.in:
1659         * config.h:
1660
1661 2017-02-15  Brady Eidson  <beidson@apple.com>
1662
1663         Stop backing up localStorage databases to iCloud by default.
1664         <rdar://problem/29045531> and https://bugs.webkit.org/show_bug.cgi?id=168388
1665
1666         Reviewed by Geoffrey Garen.
1667
1668         * UIProcess/Cocoa/VersionChecks.h:
1669
1670         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1671         (WebKit::LocalStorageDatabaseTracker::databasePath):
1672         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
1673         * UIProcess/Storage/ios/LocalStorageDatabaseTrackerIOS.mm: Copied from Source/WebKit2/UIProcess/Cocoa/VersionChecks.h.
1674         (WebKit::LocalStorageDatabaseTracker::platformExcludeFromBackup):
1675
1676         * WebKit2.xcodeproj/project.pbxproj:
1677
1678 2017-02-16  Aakash Jain  <aakash_jain@apple.com>
1679
1680         Remove unused methods WKPageGetDebugPaintFlags and WKPageSetDebugPaintFlags
1681         https://bugs.webkit.org/show_bug.cgi?id=168464
1682
1683         Reviewed by Alexey Proskuryakov.
1684
1685         * UIProcess/API/C/WKPagePrivate.h:
1686
1687 2017-02-16  Youenn Fablet  <youenn@apple.com>
1688
1689         [WebRTC] libwebrtc socket addresses should not be passed as strings
1690         https://bugs.webkit.org/show_bug.cgi?id=168474
1691
1692         Reviewed by Alex Christensen.
1693
1694         Removing all seralization of socket addresses as strings.
1695         Instead, a dedicated serialization is provided.
1696         This allows proper handling of various cases like addresses with both hostnames and resolved IPs.
1697
1698         * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
1699         (WebKit::LibWebRTCSocketClient::signalReadPacket):
1700         (WebKit::LibWebRTCSocketClient::signalSentPacket):
1701         (WebKit::LibWebRTCSocketClient::signalAddressReady):
1702         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
1703         (WebKit::NetworkRTCProvider::createUDPSocket):
1704         (WebKit::NetworkRTCProvider::createServerTCPSocket):
1705         (WebKit::NetworkRTCProvider::createClientTCPSocket):
1706         * NetworkProcess/webrtc/NetworkRTCProvider.h:
1707         * NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
1708         * NetworkProcess/webrtc/NetworkRTCSocket.cpp:
1709         (WebKit::NetworkRTCSocket::sendTo):
1710         * NetworkProcess/webrtc/NetworkRTCSocket.h:
1711         * NetworkProcess/webrtc/NetworkRTCSocket.messages.in:
1712         * Shared/RTCNetwork.cpp:
1713         (WebKit::RTCNetwork::SocketAddress::decode):
1714         (WebKit::RTCNetwork::SocketAddress::encode):
1715         * Shared/RTCNetwork.h:
1716         (WebKit::RTCNetwork::SocketAddress::SocketAddress):
1717         * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
1718         (WebKit::LibWebRTCSocket::signalAddressReady):
1719         (WebKit::LibWebRTCSocket::SendTo):
1720         * WebProcess/Network/webrtc/LibWebRTCSocket.h:
1721         * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
1722         (WebKit::LibWebRTCSocketFactory::CreateServerTcpSocket):
1723         (WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
1724         (WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
1725         * WebProcess/Network/webrtc/WebRTCSocket.cpp:
1726         (WebKit::WebRTCSocket::signalAddressReady):
1727         * WebProcess/Network/webrtc/WebRTCSocket.h:
1728         * WebProcess/Network/webrtc/WebRTCSocket.messages.in:
1729
1730 2017-02-16  Daniel Bates  <dabates@apple.com>
1731
1732         Remove Chromium-specific code to call FrameLoaderClient::redirectDataToPlugin(nullptr)
1733         https://bugs.webkit.org/show_bug.cgi?id=168417
1734         <rdar://problem/30541748>
1735
1736         Reviewed by Brent Fulgham.
1737
1738         Update override of FrameLoaderClient::redirectDataToPlugin() to take a Widget& instead of a
1739         Widget* as it is always called with a valid Widget.
1740
1741         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1742         (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
1743         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1744         * mac/WebKit2.order: Remove symbol for WebFrameLoaderClient::redirectDataToPlugin() that took a Widget*
1745         as it no longer exists. I am unclear if this file is still meaningful as it was last modified in
1746         r180570 (2 years ago) though Xcode still references this ordering file (why?).
1747
1748 2017-02-16  Alex Christensen  <achristensen@webkit.org>
1749
1750         Remove EFL-specific files in WebKit2.
1751
1752         Rubber-stamped by Anders Carlsson
1753
1754         * DatabaseProcess/efl: Removed.
1755         * DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Removed.
1756         * NetworkProcess/Downloads/efl: Removed.
1757         * NetworkProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp: Removed.
1758         * NetworkProcess/efl: Removed.
1759         * NetworkProcess/efl/NetworkProcessMainEfl.cpp: Removed.
1760         * Platform/efl: Removed.
1761         * Platform/efl/ModuleEfl.cpp: Removed.
1762         * Shared/API/c/efl: Removed.
1763         * Shared/API/c/efl/WKArrayEfl.cpp: Removed.
1764         * Shared/API/c/efl/WKArrayEfl.h: Removed.
1765         * Shared/API/c/efl/WKBaseEfl.h: Removed.
1766         * Shared/efl: Removed.
1767         * Shared/efl/NativeWebKeyboardEventEfl.cpp: Removed.
1768         * Shared/efl/NativeWebTouchEventEfl.cpp: Removed.
1769         * Shared/efl/NativeWebWheelEventEfl.cpp: Removed.
1770         * Shared/efl/ProcessExecutablePathEfl.cpp: Removed.
1771         * Shared/efl/WebEventFactory.cpp: Removed.
1772         * Shared/efl/WebEventFactory.h: Removed.
1773         * UIProcess/API/C/efl: Removed.
1774         * UIProcess/API/C/efl/WKAPICastEfl.h: Removed.
1775         * UIProcess/API/C/efl/WKColorPickerResultListener.cpp: Removed.
1776         * UIProcess/API/C/efl/WKColorPickerResultListener.h: Removed.
1777         * UIProcess/API/C/efl/WKEventEfl.cpp: Removed.
1778         * UIProcess/API/C/efl/WKEventEfl.h: Removed.
1779         * UIProcess/API/C/efl/WKViewEfl.cpp: Removed.
1780         * UIProcess/API/C/efl/WKViewEfl.h: Removed.
1781         * UIProcess/API/cpp/efl: Removed.
1782         * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: Removed.
1783         * UIProcess/API/cpp/efl/WKEinaSharedString.h: Removed.
1784         * UIProcess/API/efl: Removed.
1785         * UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp: Removed.
1786         * UIProcess/API/efl/EWebKit2.h.in: Removed.
1787         * UIProcess/API/efl/EwkView.cpp: Removed.
1788         * UIProcess/API/efl/EwkView.h: Removed.
1789         * UIProcess/API/efl/EwkViewCallbacks.h: Removed.
1790         * UIProcess/API/efl/GestureRecognizer.cpp: Removed.
1791         * UIProcess/API/efl/GestureRecognizer.h: Removed.
1792         * UIProcess/API/efl/SnapshotImageGL.cpp: Removed.
1793         * UIProcess/API/efl/SnapshotImageGL.h: Removed.
1794         * UIProcess/API/efl/WebAccessibility.cpp: Removed.
1795         * UIProcess/API/efl/WebAccessibility.h: Removed.
1796         * UIProcess/API/efl/ewk_application_cache_manager.cpp: Removed.
1797         * UIProcess/API/efl/ewk_application_cache_manager.h: Removed.
1798         * UIProcess/API/efl/ewk_application_cache_manager_private.h: Removed.
1799         * UIProcess/API/efl/ewk_auth_request.cpp: Removed.
1800         * UIProcess/API/efl/ewk_auth_request.h: Removed.
1801         * UIProcess/API/efl/ewk_auth_request_private.h: Removed.
1802         * UIProcess/API/efl/ewk_back_forward_list.cpp: Removed.
1803         * UIProcess/API/efl/ewk_back_forward_list.h: Removed.
1804         * UIProcess/API/efl/ewk_back_forward_list_item.cpp: Removed.
1805         * UIProcess/API/efl/ewk_back_forward_list_item.h: Removed.
1806         * UIProcess/API/efl/ewk_back_forward_list_item_private.h: Removed.
1807         * UIProcess/API/efl/ewk_back_forward_list_private.h: Removed.
1808         * UIProcess/API/efl/ewk_color_picker.cpp: Removed.
1809         * UIProcess/API/efl/ewk_color_picker.h: Removed.
1810         * UIProcess/API/efl/ewk_color_picker_private.h: Removed.
1811         * UIProcess/API/efl/ewk_context.cpp: Removed.
1812         * UIProcess/API/efl/ewk_context.h: Removed.
1813         * UIProcess/API/efl/ewk_context_menu.cpp: Removed.
1814         * UIProcess/API/efl/ewk_context_menu.h: Removed.
1815         * UIProcess/API/efl/ewk_context_menu_item.cpp: Removed.
1816         * UIProcess/API/efl/ewk_context_menu_item.h: Removed.
1817         * UIProcess/API/efl/ewk_context_menu_item_private.h: Removed.
1818         * UIProcess/API/efl/ewk_context_menu_private.h: Removed.
1819         * UIProcess/API/efl/ewk_context_private.h: Removed.
1820         * UIProcess/API/efl/ewk_cookie_manager.cpp: Removed.
1821         * UIProcess/API/efl/ewk_cookie_manager.h: Removed.
1822         * UIProcess/API/efl/ewk_cookie_manager_private.h: Removed.
1823         * UIProcess/API/efl/ewk_database_manager.cpp: Removed.
1824         * UIProcess/API/efl/ewk_database_manager.h: Removed.
1825         * UIProcess/API/efl/ewk_database_manager_private.h: Removed.
1826         * UIProcess/API/efl/ewk_download_job.cpp: Removed.
1827         * UIProcess/API/efl/ewk_download_job.h: Removed.
1828         * UIProcess/API/efl/ewk_download_job_private.h: Removed.
1829         * UIProcess/API/efl/ewk_error.cpp: Removed.
1830         * UIProcess/API/efl/ewk_error.h: Removed.
1831         * UIProcess/API/efl/ewk_error_private.h: Removed.
1832         * UIProcess/API/efl/ewk_favicon_database.cpp: Removed.
1833         * UIProcess/API/efl/ewk_favicon_database.h: Removed.
1834         * UIProcess/API/efl/ewk_favicon_database_private.h: Removed.
1835         * UIProcess/API/efl/ewk_file_chooser_request.cpp: Removed.
1836         * UIProcess/API/efl/ewk_file_chooser_request.h: Removed.
1837         * UIProcess/API/efl/ewk_file_chooser_request_private.h: Removed.
1838         * UIProcess/API/efl/ewk_form_submission_request.cpp: Removed.
1839         * UIProcess/API/efl/ewk_form_submission_request.h: Removed.
1840         * UIProcess/API/efl/ewk_form_submission_request_private.h: Removed.
1841         * UIProcess/API/efl/ewk_intro.h: Removed.
1842         * UIProcess/API/efl/ewk_main.cpp: Removed.
1843         * UIProcess/API/efl/ewk_main.h: Removed.
1844         * UIProcess/API/efl/ewk_main_private.h: Removed.
1845         * UIProcess/API/efl/ewk_navigation_data.cpp: Removed.
1846         * UIProcess/API/efl/ewk_navigation_data.h: Removed.
1847         * UIProcess/API/efl/ewk_navigation_data_private.h: Removed.
1848         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp: Removed.
1849         * UIProcess/API/efl/ewk_navigation_policy_decision.h: Removed.
1850         * UIProcess/API/efl/ewk_navigation_policy_decision_private.h: Removed.
1851         * UIProcess/API/efl/ewk_object.cpp: Removed.
1852         * UIProcess/API/efl/ewk_object.h: Removed.
1853         * UIProcess/API/efl/ewk_object_private.h: Removed.
1854         * UIProcess/API/efl/ewk_page_group.cpp: Removed.
1855         * UIProcess/API/efl/ewk_page_group.h: Removed.
1856         * UIProcess/API/efl/ewk_page_group_private.h: Removed.
1857         * UIProcess/API/efl/ewk_popup_menu.cpp: Removed.
1858         * UIProcess/API/efl/ewk_popup_menu.h: Removed.
1859         * UIProcess/API/efl/ewk_popup_menu_item.cpp: Removed.
1860         * UIProcess/API/efl/ewk_popup_menu_item.h: Removed.
1861         * UIProcess/API/efl/ewk_popup_menu_item_private.h: Removed.
1862         * UIProcess/API/efl/ewk_popup_menu_private.h: Removed.
1863         * UIProcess/API/efl/ewk_security_origin.cpp: Removed.
1864         * UIProcess/API/efl/ewk_security_origin.h: Removed.
1865         * UIProcess/API/efl/ewk_security_origin_private.h: Removed.
1866         * UIProcess/API/efl/ewk_settings.cpp: Removed.
1867         * UIProcess/API/efl/ewk_settings.h: Removed.
1868         * UIProcess/API/efl/ewk_settings_private.h: Removed.
1869         * UIProcess/API/efl/ewk_storage_manager.cpp: Removed.
1870         * UIProcess/API/efl/ewk_storage_manager.h: Removed.
1871         * UIProcess/API/efl/ewk_storage_manager_private.h: Removed.
1872         * UIProcess/API/efl/ewk_text_checker.cpp: Removed.
1873         * UIProcess/API/efl/ewk_text_checker.h: Removed.
1874         * UIProcess/API/efl/ewk_text_checker_private.h: Removed.
1875         * UIProcess/API/efl/ewk_touch.h: Removed.
1876         * UIProcess/API/efl/ewk_url_request.cpp: Removed.
1877         * UIProcess/API/efl/ewk_url_request.h: Removed.
1878         * UIProcess/API/efl/ewk_url_request_private.h: Removed.
1879         * UIProcess/API/efl/ewk_url_response.cpp: Removed.
1880         * UIProcess/API/efl/ewk_url_response.h: Removed.
1881         * UIProcess/API/efl/ewk_url_response_private.h: Removed.
1882         * UIProcess/API/efl/ewk_url_scheme_request.cpp: Removed.
1883         * UIProcess/API/efl/ewk_url_scheme_request.h: Removed.
1884         * UIProcess/API/efl/ewk_url_scheme_request_private.h: Removed.
1885         * UIProcess/API/efl/ewk_view.cpp: Removed.
1886         * UIProcess/API/efl/ewk_view.h: Removed.
1887         * UIProcess/API/efl/ewk_view_configuration.cpp: Removed.
1888         * UIProcess/API/efl/ewk_view_configuration.h: Removed.
1889         * UIProcess/API/efl/ewk_view_configuration_private.h: Removed.
1890         * UIProcess/API/efl/ewk_view_private.h: Removed.
1891         * UIProcess/API/efl/ewk_window_features.cpp: Removed.
1892         * UIProcess/API/efl/ewk_window_features.h: Removed.
1893         * UIProcess/API/efl/ewk_window_features_private.h: Removed.
1894         * UIProcess/API/efl/tests: Removed.
1895         * UIProcess/API/efl/tests/UnitTestUtils: Removed.
1896         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Removed.
1897         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: Removed.
1898         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: Removed.
1899         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h: Removed.
1900         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestMain.cpp: Removed.
1901         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp: Removed.
1902         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h: Removed.
1903         * UIProcess/API/efl/tests/extensions: Removed.
1904         * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Removed.
1905         * UIProcess/API/efl/tests/resources: Removed.
1906         * UIProcess/API/efl/tests/resources/Page1.html: Removed.
1907         * UIProcess/API/efl/tests/resources/Page2.html: Removed.
1908         * UIProcess/API/efl/tests/resources/Page3.html: Removed.
1909         * UIProcess/API/efl/tests/resources/blank.ico: Removed.
1910         * UIProcess/API/efl/tests/resources/default_test_page.html: Removed.
1911         * UIProcess/API/efl/tests/resources/empty_theme.edj: Removed.
1912         * UIProcess/API/efl/tests/resources/file_chooser.html: Removed.
1913         * UIProcess/API/efl/tests/resources/frame_flattening_test.html: Removed.
1914         * UIProcess/API/efl/tests/resources/frame_flattening_test_subframe.html: Removed.
1915         * UIProcess/API/efl/tests/resources/local_file_access.html: Removed.
1916         * UIProcess/API/efl/tests/resources/redirect_url_to_default.html: Removed.
1917         * UIProcess/API/efl/tests/resources/resultMHTML.mht: Removed.
1918         * UIProcess/API/efl/tests/resources/same_page_navigation.html: Removed.
1919         * UIProcess/API/efl/tests/resources/spelling_selection_tests.html: Removed.
1920         * UIProcess/API/efl/tests/resources/spelling_test.html: Removed.
1921         * UIProcess/API/efl/tests/resources/test.pdf: Removed.
1922         * UIProcess/API/efl/tests/resources/window_move_resize.html: Removed.
1923         * UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Removed.
1924         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp: Removed.
1925         * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp: Removed.
1926         * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp: Removed.
1927         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp: Removed.
1928         * UIProcess/API/efl/tests/test_ewk2_context.cpp: Removed.
1929         * UIProcess/API/efl/tests/test_ewk2_context_history_callbacks.cpp: Removed.
1930         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: Removed.
1931         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: Removed.
1932         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp: Removed.
1933         * UIProcess/API/efl/tests/test_ewk2_download_job.cpp: Removed.
1934         * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: Removed.
1935         * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp: Removed.
1936         * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp: Removed.
1937         * UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Removed.
1938         * UIProcess/API/efl/tests/test_ewk2_object.cpp: Removed.
1939         * UIProcess/API/efl/tests/test_ewk2_page.cpp: Removed.
1940         * UIProcess/API/efl/tests/test_ewk2_page_group.cpp: Removed.
1941         * UIProcess/API/efl/tests/test_ewk2_popup_menu.cpp: Removed.
1942         * UIProcess/API/efl/tests/test_ewk2_settings.cpp: Removed.
1943         * UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Removed.
1944         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp: Removed.
1945         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: Removed.
1946         * UIProcess/API/efl/tests/test_ewk2_view.cpp: Removed.
1947         * UIProcess/API/efl/tests/test_ewk2_view_configuration.cpp: Removed.
1948         * UIProcess/API/efl/tests/test_ewk2_window_features.cpp: Removed.
1949         * UIProcess/InspectorServer/efl: Removed.
1950         * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp: Removed.
1951         * UIProcess/Launcher/efl: Removed.
1952         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: Removed.
1953         * UIProcess/efl: Removed.
1954         * UIProcess/efl/ContextHistoryClientEfl.cpp: Removed.
1955         * UIProcess/efl/ContextHistoryClientEfl.h: Removed.
1956         * UIProcess/efl/ContextMenuClientEfl.cpp: Removed.
1957         * UIProcess/efl/ContextMenuClientEfl.h: Removed.
1958         * UIProcess/efl/DownloadManagerEfl.cpp: Removed.
1959         * UIProcess/efl/DownloadManagerEfl.h: Removed.
1960         * UIProcess/efl/EasingCurves.cpp: Removed.
1961         * UIProcess/efl/EasingCurves.h: Removed.
1962         * UIProcess/efl/EwkDebug.h: Removed.
1963         * UIProcess/efl/EwkTouchEvent.cpp: Removed.
1964         * UIProcess/efl/EwkTouchEvent.h: Removed.
1965         * UIProcess/efl/EwkTouchPoint.cpp: Removed.
1966         * UIProcess/efl/EwkTouchPoint.h: Removed.
1967         * UIProcess/efl/FindClientEfl.cpp: Removed.
1968         * UIProcess/efl/FindClientEfl.h: Removed.
1969         * UIProcess/efl/FormClientEfl.cpp: Removed.
1970         * UIProcess/efl/FormClientEfl.h: Removed.
1971         * UIProcess/efl/InputMethodContextEfl.cpp: Removed.
1972         * UIProcess/efl/InputMethodContextEfl.h: Removed.
1973         * UIProcess/efl/PageLoadClientEfl.cpp: Removed.
1974         * UIProcess/efl/PageLoadClientEfl.h: Removed.
1975         * UIProcess/efl/PagePolicyClientEfl.cpp: Removed.
1976         * UIProcess/efl/PagePolicyClientEfl.h: Removed.
1977         * UIProcess/efl/PageUIClientEfl.cpp: Removed.
1978         * UIProcess/efl/PageUIClientEfl.h: Removed.
1979         * UIProcess/efl/PageViewportControllerClientEfl.cpp: Removed.
1980         * UIProcess/efl/PageViewportControllerClientEfl.h: Removed.
1981         * UIProcess/efl/RequestManagerClientEfl.cpp: Removed.
1982         * UIProcess/efl/RequestManagerClientEfl.h: Removed.
1983         * UIProcess/efl/TextCheckerClientEfl.cpp: Removed.
1984         * UIProcess/efl/TextCheckerClientEfl.h: Removed.
1985         * UIProcess/efl/TextCheckerEfl.cpp: Removed.
1986         * UIProcess/efl/VibrationClientEfl.cpp: Removed.
1987         * UIProcess/efl/VibrationClientEfl.h: Removed.
1988         * UIProcess/efl/ViewClientEfl.cpp: Removed.
1989         * UIProcess/efl/ViewClientEfl.h: Removed.
1990         * UIProcess/efl/WebColorPickerClient.cpp: Removed.
1991         * UIProcess/efl/WebColorPickerClient.h: Removed.
1992         * UIProcess/efl/WebColorPickerEfl.cpp: Removed.
1993         * UIProcess/efl/WebColorPickerEfl.h: Removed.
1994         * UIProcess/efl/WebColorPickerResultListenerProxy.cpp: Removed.
1995         * UIProcess/efl/WebColorPickerResultListenerProxy.h: Removed.
1996         * UIProcess/efl/WebContextMenuProxyEfl.cpp: Removed.
1997         * UIProcess/efl/WebContextMenuProxyEfl.h: Removed.
1998         * UIProcess/efl/WebInspectorProxyEfl.cpp: Removed.
1999         * UIProcess/efl/WebPageProxyEfl.cpp: Removed.
2000         * UIProcess/efl/WebPopupItemEfl.cpp: Removed.
2001         * UIProcess/efl/WebPopupItemEfl.h: Removed.
2002         * UIProcess/efl/WebPopupMenuProxyEfl.cpp: Removed.
2003         * UIProcess/efl/WebPopupMenuProxyEfl.h: Removed.
2004         * UIProcess/efl/WebPreferencesEfl.cpp: Removed.
2005         * UIProcess/efl/WebProcessPoolEfl.cpp: Removed.
2006         * UIProcess/efl/WebView.cpp: Removed.
2007         * UIProcess/efl/WebView.h: Removed.
2008         * UIProcess/efl/WebViewClient.cpp: Removed.
2009         * UIProcess/efl/WebViewClient.h: Removed.
2010         * WebProcess/InjectedBundle/API/efl: Removed.
2011         * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Removed.
2012         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Removed.
2013         * WebProcess/InjectedBundle/API/efl/ewk_extension.h: Removed.
2014         * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Removed.
2015         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Removed.
2016         * WebProcess/InjectedBundle/API/efl/ewk_page.h: Removed.
2017         * WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Removed.
2018         * WebProcess/InjectedBundle/efl: Removed.
2019         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp: Removed.
2020         * WebProcess/WebCoreSupport/efl: Removed.
2021         * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp: Removed.
2022         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: Removed.
2023         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: Removed.
2024         * WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp: Removed.
2025         * WebProcess/WebPage/efl: Removed.
2026         * WebProcess/WebPage/efl/WebInspectorUIEfl.cpp: Removed.
2027         * WebProcess/WebPage/efl/WebPageEfl.cpp: Removed.
2028         * WebProcess/efl: Removed.
2029         * WebProcess/efl/ExtensionManagerEfl.cpp: Removed.
2030         * WebProcess/efl/ExtensionManagerEfl.h: Removed.
2031         * WebProcess/efl/WebInjectedBundleMainEfl.cpp: Removed.
2032         * WebProcess/efl/WebProcessMainEfl.cpp: Removed.
2033         * efl: Removed.
2034         * efl/EWebKit2Config.cmake.in: Removed.
2035         * efl/EWebKit2ConfigVersion.cmake.in: Removed.
2036         * efl/ewebkit2-extension.pc.in: Removed.
2037         * efl/ewebkit2.pc.in: Removed.
2038
2039 2017-02-16  Alex Christensen  <achristensen@webkit.org>
2040
2041         Remove old URL parser
2042         https://bugs.webkit.org/show_bug.cgi?id=168483
2043
2044         Reviewed by Tim Horton.
2045
2046         * NetworkProcess/NetworkProcess.cpp:
2047         (WebKit::NetworkProcess::initializeNetworkProcess):
2048         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2049         (WebKit::NetworkProcessCreationParameters::encode):
2050         (WebKit::NetworkProcessCreationParameters::decode):
2051         * NetworkProcess/NetworkProcessCreationParameters.h:
2052         * PlatformEfl.cmake:
2053         * PlatformGTK.cmake:
2054         * PlatformMac.cmake:
2055         * Shared/Cocoa/WebKit2InitializeCocoa.mm: Removed.
2056         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
2057         (WebKit::XPCServiceInitializer):
2058         * Shared/WebKit2Initialize.cpp:
2059         (WebKit::InitializeWebKit2):
2060         * Shared/WebKit2Initialize.h:
2061         (): Deleted.
2062         * Shared/WebProcessCreationParameters.cpp:
2063         (WebKit::WebProcessCreationParameters::encode):
2064         (WebKit::WebProcessCreationParameters::decode):
2065         * Shared/WebProcessCreationParameters.h:
2066         * Shared/efl/WebKit2InitializeEFL.cpp: Removed.
2067         * Shared/gtk/WebKit2InitializeGTK.cpp: Removed.
2068         * UIProcess/WebProcessPool.cpp:
2069         (WebKit::WebProcessPool::ensureNetworkProcess):
2070         (WebKit::WebProcessPool::createNewWebProcess):
2071         * WebKit2.xcodeproj/project.pbxproj:
2072         * WebProcess/WebProcess.cpp:
2073         (WebKit::WebProcess::initializeWebProcess):
2074
2075 2017-02-16  Wenson Hsieh  <wenson_hsieh@apple.com>
2076
2077         [WK2] Add additional test infrastructure and unit tests for data interaction
2078         https://bugs.webkit.org/show_bug.cgi?id=168439
2079         <rdar://problem/30557942>
2080
2081         Reviewed by Tim Horton.
2082
2083         Adds two new _WKTestingDelegate protocol methods that are fired when a 'start data interaction' request has been
2084         sent to the web process, and when a response has been received. See Tools/ChangeLog for more details.
2085
2086         * UIProcess/API/Cocoa/_WKTestingDelegate.h:
2087
2088 2017-02-16  Aakash Jain  <aakash_jain@apple.com>
2089
2090         Remove unused method WKBundlePageCopyContextMenuItemTitle
2091         https://bugs.webkit.org/show_bug.cgi?id=168456
2092
2093         Reviewed by Dan Bernstein.
2094
2095         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Removed WKBundlePageCopyContextMenuItemTitle.
2096
2097 2017-02-16  Aakash Jain  <aakash_jain@apple.com>
2098
2099         Remove unused WKContextGetProcessSuppressionEnabled and WKContextSetProcessSuppressionEnabled
2100         https://bugs.webkit.org/show_bug.cgi?id=168460
2101
2102         Reviewed by Dan Bernstein.
2103
2104         * UIProcess/API/C/mac/WKContextPrivateMac.h:
2105
2106 2017-02-16  Aakash Jain  <aakash_jain@apple.com>
2107
2108         Removed unused method WKContextGetProcessModel
2109         https://bugs.webkit.org/show_bug.cgi?id=168457
2110
2111         Reviewed by Dan Bernstein.
2112
2113         * UIProcess/API/C/WKContext.h: Removed WKContextGetProcessModel.
2114
2115 2017-02-16  Tim Horton  <timothy_horton@apple.com>
2116
2117         WKWebView inside a UICollectionView flashes when items are inserted above it
2118         https://bugs.webkit.org/show_bug.cgi?id=168376
2119         <rdar://problem/29322051>
2120
2121         Reviewed by Simon Fraser.
2122
2123         Previously, we would immediately send visible content rect updates
2124         whenever we scrolled, or our frame or bounds changed, or ... a whole
2125         bunch of other things. This message would be immediately sent to the
2126         Web Content process, and coalesced at the whims of the Web Content process
2127         main thread. However, if we received multiple such updates within the
2128         same runloop cycle in the UI process, the Web Content process could
2129         send back layer tree commits for intermediate states that would
2130         never make it to the screen.
2131
2132         In the UICollectionView case, UIKit would first scroll to the new location
2133         (potentially putting the WKWebView totally off-screen), and then update
2134         our frame (back on screen), and we would get two layer tree commits;
2135         one, with less tile coverage than needed to cover the area, and another
2136         with full coverage.
2137
2138         Instead, wait until just before we commit the UI-side layer tree (and
2139         thus everyone is done moving things around) to push the new visible 
2140         rect info to the Web Content process.
2141
2142         So far, I have not found a way to test that reliably fails before
2143         and reliably passes after without adding a ton of supporting code to WebKit.
2144
2145         * UIProcess/API/Cocoa/WKWebView.mm:
2146         (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
2147         (-[WKWebView _didCommitLayerTree:]):
2148         (-[WKWebView _didFinishScrolling]):
2149         (-[WKWebView scrollViewDidScroll:]):
2150         (-[WKWebView scrollViewDidZoom:]):
2151         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
2152         (-[WKWebView _scrollViewDidInterruptDecelerating:]):
2153         (-[WKWebView _didScroll]):
2154         (-[WKWebView _enclosingScrollerScrollingEnded:]):
2155         (-[WKWebView _frameOrBoundsChanged]):
2156         (-[WKWebView _scheduleVisibleContentRectUpdate]):
2157         (-[WKWebView _scrollViewIsInStableState:]):
2158         (-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):
2159         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2160         (-[WKWebView _setObscuredInsets:]):
2161         (-[WKWebView _endInteractiveObscuredInsetsChange]):
2162         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2163         (-[WKWebView _endAnimatedResize]):
2164         (-[WKWebView _updateVisibleContentRects]): Deleted.
2165         (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Deleted.
2166         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2167         * UIProcess/ios/WKContentView.mm:
2168         (-[WKContentView _didCommitLayerTree:]):
2169         * UIProcess/ios/WKContentViewInteraction.mm:
2170         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
2171         (-[WKContentView _stopAssistingNode]):
2172         * UIProcess/ios/WKScrollView.mm:
2173         (-[WKScrollView setContentInset:]):
2174         Have existing callers of _updateVisibleContentRect* instead call
2175         _scheduleVisibleContentRectUpdate*.
2176
2177         In _scheduleVisibleContentRectUpdate, schedule a pre-commit callback
2178         in which we will compute the new visible content rect information
2179         and send it to the Web Content process.
2180
2181         Keep track of the stable state of the scroll view which most recently
2182         scheduled an update, and use that to inform _updateVisibleContentRects.
2183         This matches the previous behavior where the updates might get coalesced
2184         in the Web Content process, and the most recent update wins.
2185
2186         Make a few callers of _updateVisibleContentRectAfterScrollInView
2187         that passed in our scroll view just use _scheduleVisibleContentRectUpdate instead.
2188
2189 2017-02-16  Brent Fulgham  <bfulgham@apple.com>
2190
2191         [WebRTC][Mac] Conditionally add sandbox extensions to the Network Process
2192         https://bugs.webkit.org/show_bug.cgi?id=168010
2193         <rdar://problem/30245503>
2194
2195         Reviewed by Youenn Fablet.
2196
2197         Conditionally add sandbox extensions to the Network Process when the WebRTC/Media Capture
2198         features are enabled.
2199
2200         * NetworkProcess/NetworkProcess.h:
2201         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2202         (WebKit::NetworkProcessCreationParameters::encode): Serialize new process configuration flag.
2203         (WebKit::NetworkProcessCreationParameters::decode): Ditto.
2204         * NetworkProcess/NetworkProcessCreationParameters.h:
2205         * NetworkProcess/mac/NetworkProcessMac.mm:
2206         (WebKit::NetworkProcess::platformInitializeNetworkProcess):  Remember state of WebRTC for when the
2207         sandbox is established.
2208         (WebKit::NetworkProcess::initializeSandbox): Add ENABLE_WEB_RTC parameter to sandbox launch state.
2209         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Add conditional sandbox expansion to allow
2210         bidirectional network access when the ENABLE_LIBWEBRTC flag is present in the sandbox launch parameters.
2211         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2212         (WebKit::WebProcessPool::platformInitializeWebProcess): Use proper compile guards and check media stream
2213         preference, rather than the peer connection preference.
2214         (WebKit::WebProcessPool::platformInitializeNetworkProcess): Notify NetworkProcess at launch time whether the
2215         user wants WebRTC support.
2216
2217 2017-02-16  Brent Fulgham  <bfulgham@apple.com>
2218
2219         [WebRTC][Mac][WebKit2] Initial WebProcess does not support WebRTC
2220         https://bugs.webkit.org/show_bug.cgi?id=168438
2221         <rdar://problem/30401818>
2222
2223         Reviewed by Youenn Fablet.
2224
2225         The sandbox extension for microphone access does not take effect until the second WebProcess
2226         is created, causing the initial browser tab to lack microphone support.
2227
2228         This patch checks the setting earlier in the boot process so that the initial WebProcess
2229         instance gets the correct setting.
2230
2231         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2232         (WebKit::WebProcessPool::platformInitializeWebProcess): Move microphone sandbox extension here, so that the
2233         initial WebProcess has the correct microphone access.
2234         * UIProcess/WebProcessPool.cpp:
2235         (WebKit::WebProcessPool::createNewWebProcess): Move microphone sandbox extension from here to platform-specific file.
2236         (WebKit::WebProcessPool::createWebPage): Remove unneeded preference checks.
2237
2238 2017-02-16  Eric Carlson  <eric.carlson@apple.com>
2239
2240         Add WebRTC as an off-by-default experimental feature menu item.
2241         https://bugs.webkit.org/show_bug.cgi?id=167972
2242         <rdar://problem/30293429>
2243
2244         Reviewed by Alex Christensen.
2245
2246         * Shared/WebPreferencesDefinitions.h:
2247         * UIProcess/WebPreferences.cpp:
2248         (WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): We need to enable/disable
2249         peer connection and media stream preferences at the same time, so special case them.
2250         (WebKit::WebPreferences::setEnabledForFeature):
2251         * UIProcess/WebPreferences.h:
2252
2253 2017-02-15  Alex Christensen  <achristensen@webkit.org>
2254
2255         Unreviewed, rolling out r212394.
2256
2257         Fixed iOS WebInspector
2258
2259         Reverted changeset:
2260
2261         "Unreviewed, rolling out r212169."
2262         https://bugs.webkit.org/show_bug.cgi?id=166681
2263         http://trac.webkit.org/changeset/212394
2264
2265 2017-02-15  Eric Carlson  <eric.carlson@apple.com>
2266
2267         [MediaStream] delete CaptureDeviceInfo struct
2268         https://bugs.webkit.org/show_bug.cgi?id=168395
2269
2270         Reviewed by Sam Weinig.
2271
2272         * Shared/WebCoreArgumentCoders.cpp:
2273         (IPC::ArgumentCoder<CaptureDevice>::encode):
2274         (IPC::ArgumentCoder<CaptureDevice>::decode):
2275
2276 2017-02-15  Anders Carlsson  <andersca@apple.com>
2277
2278         Try again.
2279
2280         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
2281         (WebKit::WebDragClient::startDrag):
2282
2283 2017-02-15  Anders Carlsson  <andersca@apple.com>
2284
2285         Attempt to fix the GTK+ build.
2286
2287         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
2288         (WebKit::WebDragClient::startDrag):
2289
2290 2017-02-15  Simon Fraser  <simon.fraser@apple.com>
2291
2292         Clean up WebProcessCreationParameters a little
2293         https://bugs.webkit.org/show_bug.cgi?id=168349
2294
2295         Reviewed by Alex Christensen.
2296
2297         Initialize the data members better, and rearrange to group the types in a slightly more space-efficient manner.
2298
2299         * Shared/WebProcessCreationParameters.cpp:
2300         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2301         * Shared/WebProcessCreationParameters.h:
2302
2303 2017-02-15  Jer Noble  <jer.noble@apple.com>
2304
2305         REGRESSION(r183937): Fullscreen Exit animation missing mask
2306         https://bugs.webkit.org/show_bug.cgi?id=168360
2307
2308         Reviewed by Eric Carlson.
2309
2310         In r183937, the fullscreen window's clip layer has it's mask removed when the enter
2311         fullscreen animation completes, allowing low-power video playback mode to be entered. But
2312         this breaks the exit fullscreen animaiton, which assumes a mask is present. Abstract the
2313         mask creation code out into a static helper method, and use it at the beginning of the exit
2314         fullscreen animation to re-create the mask before adding animations to it.
2315
2316         * UIProcess/mac/WKFullScreenWindowController.mm:
2317         (createMask):
2318         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
2319         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2320
2321 2017-02-15  Alex Christensen  <achristensen@webkit.org>
2322
2323         Unreviewed, rolling out r212169.
2324
2325         Broke iOS WebInspector
2326
2327         Reverted changeset:
2328
2329         "WebInspector: refactor RemoteInspector to move cocoa specific
2330         code to their own files"
2331         https://bugs.webkit.org/show_bug.cgi?id=166681
2332         http://trac.webkit.org/changeset/212169
2333
2334 2017-02-15  Anders Carlsson  <andersca@apple.com>
2335
2336         Modernize DragClient::startDrag somewhat
2337         https://bugs.webkit.org/show_bug.cgi?id=168379
2338
2339         Reviewed by Tim Horton.
2340
2341         Update for WebCore changes.
2342
2343         * WebProcess/WebCoreSupport/WebDragClient.cpp:
2344         (WebKit::WebDragClient::startDrag):
2345         * WebProcess/WebCoreSupport/WebDragClient.h:
2346         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2347         (WebKit::WebDragClient::startDrag):
2348
2349 2017-02-15  Aakash Jain  <aakash_jain@apple.com>
2350
2351         Remove WebIOSEvent interface
2352         https://bugs.webkit.org/show_bug.cgi?id=168368
2353
2354         Reviewed by Tim Horton.
2355
2356         * Shared/NativeWebKeyboardEvent.h: Using WebEvent from WebCore instead of WebIOSEvent.
2357         * Shared/ios/NativeWebKeyboardEventIOS.mm: Ditto.
2358         * Shared/ios/WebIOSEventFactory.h: Ditto.
2359         * Shared/ios/WebIOSEventFactory.mm: Ditto.
2360         * UIProcess/ios/WKContentViewInteraction.h: Ditto.
2361         * UIProcess/ios/WKContentViewInteraction.mm: Ditto.
2362         * UIProcess/API/C/WKPage.cpp: Using WebEvent from WebKit.
2363
2364 2017-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2365
2366         [GTK] Update cookie manager API to properly work with ephemeral sessions
2367         https://bugs.webkit.org/show_bug.cgi?id=168230
2368
2369         Reviewed by Michael Catanzaro.
2370
2371         WebKitCookieManager is associated to a particular WebKitWebContext and uses the default session ID
2372         unconditionally. It should be associated to a WebKitWebsiteDataManager instead and use its session ID. This
2373         patch also adds support for handling cookies with WebKitWebsiteDataManager and deprecates
2374         webkit_cookie_manager_get_domains_with_cookies(), webkit_cookie_manager_delete_cookies_for_domain() and
2375         webkit_cookie_manager_delete_all_cookies(). It also adds API to get the the WebKitWebsiteDataManager of a
2376         WebKitWebView, since it's the only way to get the WebKitCookieManager associated to an ephemeral web view.
2377
2378         * UIProcess/API/gtk/WebKitCookieManager.cpp:
2379         (webkitCookieManagerDispose): Stop observing cookie changes.
2380         (webkit_cookie_manager_class_init): Add dispose implementation.
2381         (webkitCookieManagerCreate): Create the WebKitCookieManager with a WebKitWebsiteDataManager.
2382         (webkit_cookie_manager_set_persistent_storage): Work with all contexts having the session.
2383         (webkit_cookie_manager_set_accept_policy): Ditto.
2384         (webkit_cookie_manager_get_accept_policy): Use any context having the session.
2385         (webkit_cookie_manager_get_domains_with_cookies): Deprecate and implement using WebKitWebsiteDataManager.
2386         (webkit_cookie_manager_get_domains_with_cookies_finish): Ditto.
2387         (webkit_cookie_manager_delete_cookies_for_domain): Ditto.
2388         (webkit_cookie_manager_delete_all_cookies): Ditto.
2389         * UIProcess/API/gtk/WebKitCookieManager.h:
2390         * UIProcess/API/gtk/WebKitCookieManagerPrivate.h:
2391         * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
2392         (attachCustomProtocolManagerClientToContext):
2393         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
2394         (attachDownloadClientToContext):
2395         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
2396         (attachInjectedBundleClientToContext):
2397         * UIProcess/API/gtk/WebKitSecurityManager.cpp:
2398         (registerSecurityPolicyForURIScheme):
2399         * UIProcess/API/gtk/WebKitWebContext.cpp:
2400         (webkitWebContextConstructed): Call webkitWebsiteDataManagerAddProcessPool.
2401         (webkitWebContextDispose): Call webkitWebsiteDataManagerRemoveProcessPool.
2402         (webkit_web_context_get_cookie_manager): Return the WebKitCookieManager of the WebKitWebsiteDataManager.
2403         (webkitWebContextGetProcessPool): Make it return a reference.
2404         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
2405         * UIProcess/API/gtk/WebKitWebView.cpp:
2406         (webkitWebViewConstructed): Call webkitWebsiteDataManagerAddProcessPool when creating a ephemeral web view.
2407         (webkitWebViewDispose): Call webkitWebsiteDataManagerRemoveProcessPool if needed.
2408         (webkit_web_view_get_website_data_manager): Return the WebKitWebsiteDataManager or the context one.
2409         * UIProcess/API/gtk/WebKitWebView.h:
2410         * UIProcess/API/gtk/WebKitWebsiteData.cpp: Add support for Cookies type.
2411         (recordContainsSupportedDataTypes):
2412         (toWebKitWebsiteDataTypes):
2413         * UIProcess/API/gtk/WebKitWebsiteData.h:
2414         * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
2415         (_WebKitWebsiteDataManagerPrivate::~_WebKitWebsiteDataManagerPrivate): Ensure all contexts were unregistered.
2416         (webkitWebsiteDataManagerAddProcessPool): Register the process pool in the session.
2417         (webkitWebsiteDataManagerRemoveProcessPool): Unregister the process poll from the session.
2418         (webkitWebsiteDataManagerGetProcessPools): Return the list of proces pools registered.
2419         (webkit_website_data_manager_get_cookie_manager): Return the WebKitCookieManager.
2420         (toWebsiteDataTypes): Add Cookies.
2421         * UIProcess/API/gtk/WebKitWebsiteDataManager.h:
2422         * UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h:
2423         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
2424         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
2425         (WebKit::WebsiteDataRecord::displayNameForCookieHostName): Handle localhost as a special case here for backwards
2426         compatibility.
2427
2428 2017-02-14  Wenson Hsieh  <wenson_hsieh@apple.com>
2429
2430         [WK2] Support data interaction on links
2431         https://bugs.webkit.org/show_bug.cgi?id=168331
2432         <rdar://problem/30200837>
2433
2434         Reviewed by Tim Horton.
2435
2436         Adds support for data interaction on links at the client layer for WebKit2. This involves several changes,
2437         detailed in the per-method changes below:
2438
2439         * Shared/ios/InteractionInformationAtPosition.h:
2440         * Shared/ios/InteractionInformationAtPosition.mm:
2441         (WebKit::InteractionInformationAtPosition::encode):
2442         (WebKit::InteractionInformationAtPosition::decode):
2443
2444         Add adjustedPointForNodeRespondingToClickEvents (the request point, adjusted to take nodeRespondingToClickEvents
2445         into account) to InteractionInformationAtPosition. The web process sends this adjusted point over to the UI
2446         process so that the UI process will be able to begin a data interaction at the adjusted point rather than the
2447         request point, which is necessary for small clickable (and data-interactive) elements such as links.
2448
2449         * UIProcess/ios/WKActionSheet.h:
2450         * UIProcess/ios/WKActionSheet.mm:
2451         (-[WKActionSheet presentSheet:]):
2452         (-[WKActionSheet _presentationRectForStyle:]):
2453         (-[WKActionSheet updateSheetPosition]):
2454         * UIProcess/ios/WKActionSheetAssistant.h:
2455         * UIProcess/ios/WKActionSheetAssistant.mm:
2456         (-[WKActionSheetAssistant presentationRectForElementUsingClosestIndicatedRect]):
2457         (-[WKActionSheetAssistant presentationRectForIndicatedElement]):
2458         (-[WKActionSheetAssistant showImageSheet]):
2459         (-[WKActionSheetAssistant _shouldPresentAtTouchLocationForElementRect:]):
2460         (-[WKActionSheetAssistant needsLinkIndicator]):
2461         (-[WKActionSheetAssistant showLinkSheet]):
2462         (-[WKActionSheetAssistant cleanupSheet]):
2463         (-[WKActionSheetAssistant _presentationStyleForImageAtElementRect:]): Deleted.
2464
2465         Add support for the WKActionSheetPresentAtClosestIndicatorRect style of presenting an action sheet. When
2466         showing the action sheet for a link and there is space along the margins to show a popover in the first place,
2467         we will now target the popover rect to the bounding rect of the set of adjacent (or nearly-adjacent) element
2468         rects closest to the user's touch location. This covers cases where the link is split into multiple rects due to
2469         a line break, when the link is on multiple lines with a jagged rect per line, and when both of the above are
2470         true.
2471
2472         * UIProcess/ios/WKContentViewInteraction.mm:
2473         (-[WKContentView pointIsInDataInteractionContent:]):
2474         (-[WKContentView _positionInformationDidChange:]):
2475         (-[WKContentView positionInformationForActionSheetAssistant:]):
2476         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
2477
2478         Include link indicator data in the position information request if needed. As the FIXME suggests, this can be
2479         improved by asynchronously presenting the action sheet assistant after the request returns, and is something we
2480         should address in the future.
2481
2482         * WebProcess/WebPage/ios/WebPageIOS.mm:
2483         (WebKit::WebPage::getPositionInformation):
2484
2485 2017-02-14  Jason Rinn  <jrinn@apple.com>
2486
2487         Add new WKWebKit Cocoa API for getContentsAsString.
2488         https://bugs.webkit.org/show_bug.cgi?id=168147
2489         <rdar://problem/30502539>
2490
2491         Reviewed by Tim Horton.
2492
2493         * UIProcess/API/Cocoa/WKWebView.mm:
2494         (-[WKWebView _getContentsAsStringWithCompletionHandler:]): New API for getContentsAsString.
2495         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2496
2497 2017-02-14  Chris Dumez  <cdumez@apple.com>
2498
2499         HTML Form Validation bubble should take minimum font size setting into consideration
2500         https://bugs.webkit.org/show_bug.cgi?id=168271
2501         <rdar://problem/29869869>
2502
2503         Reviewed by Simon Fraser.
2504
2505         * UIProcess/API/Cocoa/WKWebView.mm:
2506         (-[WKWebView _contentsOfUserInterfaceItem:]):
2507         Return font size used in the validation bubble.
2508
2509         * UIProcess/PageClient.h:
2510         * UIProcess/ios/PageClientImplIOS.h:
2511         * UIProcess/ios/PageClientImplIOS.mm:
2512         (WebKit::PageClientImpl::createValidationBubble):
2513         * UIProcess/ios/WebPageProxyIOS.mm:
2514         (WebKit::WebPageProxy::showValidationMessage):
2515         * UIProcess/mac/PageClientImpl.h:
2516         * UIProcess/mac/PageClientImpl.mm:
2517         (WebKit::PageClientImpl::createValidationBubble):
2518         * UIProcess/mac/WebPageProxyMac.mm:
2519         (WebKit::WebPageProxy::showValidationMessage):
2520         Pass minimum font size setting when constructing the form validation bubble.
2521
2522 2017-02-14  Commit Queue  <commit-queue@webkit.org>
2523
2524         Unreviewed, rolling out r211879.
2525         https://bugs.webkit.org/show_bug.cgi?id=168330
2526
2527         Not ready for the menu yet (Requested by eric_car_ on
2528         #webkit).
2529
2530         Reverted changeset:
2531
2532         "Add WebRTC as an off-by-default experimental feature menu
2533         item."
2534         https://bugs.webkit.org/show_bug.cgi?id=167972
2535         http://trac.webkit.org/changeset/211879
2536
2537 2017-02-14  Simon Fraser  <simon.fraser@apple.com>
2538
2539         Add logging and defensive fixes to try to detect problems causing blank tabs
2540         https://bugs.webkit.org/show_bug.cgi?id=168270
2541         rdar://problem/30505482
2542
2543         Reviewed by Jon Lee.
2544         
2545         Add release logging when -[WKWebView _beginAnimatedResizeWithUpdates:] and -[WKWebView _endAnimatedResize]
2546         are unbalanced across a commit, to detect cases where _endAnimatedResize wasn't called enough times.
2547         
2548         Also log when RemoteLayerTreeHost::updateLayerTree() fails to find a root layer, which should never happen.
2549         
2550         In WebPageProxy, clear m_firstLayerTreeTransactionIdAfterDidCommitLoad on a web process crash.
2551
2552         * Platform/Logging.h:
2553         * UIProcess/API/Cocoa/WKWebView.mm:
2554         (-[WKWebView _didCommitLayerTree:]):
2555         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2556         (-[WKWebView _endAnimatedResize]):
2557         * UIProcess/WebPageProxy.cpp:
2558         (WebKit::WebPageProxy::resetState):
2559         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2560         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2561         (WebKit::RemoteLayerTreeDrawingAreaProxy::isAlwaysOnLoggingAllowed):
2562         * UIProcess/mac/RemoteLayerTreeHost.mm:
2563         (WebKit::RemoteLayerTreeHost::updateLayerTree):
2564         (WebKit::RemoteLayerTreeHost::clearLayers):
2565         * WebProcess/WebPage/WebFrame.cpp:
2566         (WebKit::WebFrame::WebFrame):
2567         * WebProcess/WebPage/WebFrame.h:
2568
2569 2017-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2570
2571         Allow to use stored credentials also for downloads started by DownloadManager::startDownload
2572         https://bugs.webkit.org/show_bug.cgi?id=167584
2573
2574         Reviewed by Michael Catanzaro.
2575
2576         Cliking on a link that triggers a download works on an already HTTP authenticated site works, but right clicking
2577         and downloading from the context menu shows the HTTP auth dialog again. This is because PendingDownload uses
2578         DoNotAllowStoredCredentials unconditionally. We want to allow using cached credentials at least for
2579         non-ephemeral sessions.
2580
2581         * NetworkProcess/Downloads/DownloadManager.cpp:
2582         (WebKit::DownloadManager::startDownload):
2583
2584 2017-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2585
2586         [GTK] Make DragImageRef a RefPtr instead of a plain pointer
2587         https://bugs.webkit.org/show_bug.cgi?id=168296
2588
2589         Reviewed by Sergio Villar Senin.
2590
2591         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
2592         (WebKit::WebDragClient::startDrag):
2593
2594 2017-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2595
2596         [SOUP] Ensure a response MIME type when Content-Type is missing and sniffing not allowed
2597         https://bugs.webkit.org/show_bug.cgi?id=168299
2598
2599         Reviewed by Sergio Villar Senin.
2600
2601         Sniffing is not allowed but we can try to guess the MIME using the response path, or at least fallback to
2602         default MIME type instead of leaving an empty string. This matches what mac port does.
2603
2604         Fixes: http/tests/inspector/network/fetch-response-body.html
2605                http/tests/inspector/network/xhr-response-body.html
2606
2607         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2608         (WebKit::NetworkDataTaskSoup::didSendRequest):
2609
2610 2017-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2611
2612         CookieManager only works with the default session
2613         https://bugs.webkit.org/show_bug.cgi?id=168229
2614
2615         Reviewed by Alex Christensen.
2616
2617         Make CookieManager session aware by adding a SessionID parameter to all its functions, and update all the callers
2618         to pass the default session ID, preserving the current
2619         behavior. WebCookieManagerProxy::startObservingCookieChanges() now also receives an optional callback to be
2620         called on every change.
2621
2622         * UIProcess/API/C/WKCookieManager.cpp:
2623         (WKCookieManagerGetHostnamesWithCookies):
2624         (WKCookieManagerDeleteCookiesForHostname):
2625         (WKCookieManagerDeleteAllCookies):
2626         (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
2627         (WKCookieManagerStartObservingCookieChanges):
2628         (WKCookieManagerStopObservingCookieChanges):
2629         * UIProcess/API/gtk/WebKitCookieManager.cpp:
2630         (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate):
2631         (webkitCookieManagerCreate):
2632         (webkit_cookie_manager_set_persistent_storage):
2633         (webkit_cookie_manager_get_domains_with_cookies):
2634         (webkit_cookie_manager_delete_cookies_for_domain):
2635         (webkit_cookie_manager_delete_all_cookies):
2636         * UIProcess/Automation/WebAutomationSession.cpp:
2637         (WebKit::WebAutomationSession::addSingleCookie):
2638         (WebKit::WebAutomationSession::deleteAllCookies):
2639         * UIProcess/WebCookieManagerProxy.cpp:
2640         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
2641         (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
2642         (WebKit::WebCookieManagerProxy::deleteAllCookies):
2643         (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
2644         (WebKit::WebCookieManagerProxy::addCookie):
2645         (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
2646         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
2647         (WebKit::WebCookieManagerProxy::cookiesDidChange):
2648         * UIProcess/WebCookieManagerProxy.h:
2649         * UIProcess/WebCookieManagerProxy.messages.in:
2650         * WebProcess/Cookies/WebCookieManager.cpp:
2651         (WebKit::WebCookieManager::WebCookieManager):
2652         (WebKit::WebCookieManager::getHostnamesWithCookies):
2653         (WebKit::WebCookieManager::deleteCookiesForHostname):
2654         (WebKit::WebCookieManager::deleteAllCookies):
2655         (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
2656         (WebKit::WebCookieManager::addCookie):
2657         (WebKit::WebCookieManager::startObservingCookieChanges):
2658         (WebKit::WebCookieManager::stopObservingCookieChanges):
2659         * WebProcess/Cookies/WebCookieManager.h:
2660         * WebProcess/Cookies/WebCookieManager.messages.in:
2661
2662 2017-02-14  Tomas Popela  <tpopela@redhat.com>
2663
2664         Unreviewed, fix documentation typo
2665
2666         * UIProcess/API/gtk/WebKitEditingCommands.h:
2667
2668 2017-02-12  Brian Burg  <bburg@apple.com>
2669
2670         Web Inspector: expose system user interface layout direction through InspectorFrontendHost
2671         https://bugs.webkit.org/show_bug.cgi?id=168209
2672         <rdar://problem/11573736>
2673
2674         Reviewed by Joseph Pecoraro.
2675
2676         Forward the UserInterfaceLayoutDirection of the inspector page. If the WebKit client has
2677         properly set the UI directionality from system settings in PageClient, this will get inherited
2678         automatically by the Inspector's WebPage instance.
2679
2680         * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
2681         (WebKit::RemoteWebInspectorUI::userInterfaceLayoutDirection):
2682         * WebProcess/WebPage/RemoteWebInspectorUI.h:
2683         * WebProcess/WebPage/WebInspectorUI.cpp:
2684         (WebKit::WebInspectorUI::userInterfaceLayoutDirection):
2685         * WebProcess/WebPage/WebInspectorUI.h:
2686
2687 2017-02-13  Youenn Fablet  <youennf@gmail.com>
2688
2689         [WebRTC] Creating RTCPeerConnection with libwebrtc backend is crashing on rwt
2690         https://bugs.webkit.org/show_bug.cgi?id=168250
2691
2692         Reviewed by Alex Christensen.
2693
2694         * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
2695         (WebKit::LibWebRTCProvider::createPeerConnection):
2696         * WebProcess/Network/webrtc/LibWebRTCProvider.h:
2697         * WebProcess/Network/webrtc/LibWebRTCSocket.h:
2698         * WebProcess/Network/webrtc/WebRTCMonitor.cpp:
2699         (WebKit::WebRTCMonitor::StartUpdating):
2700         (WebKit::WebRTCMonitor::networksChanged):
2701         * WebProcess/Network/webrtc/WebRTCMonitor.h:
2702         * WebProcess/Network/webrtc/WebRTCResolver.cpp:
2703         (WebKit::WebRTCResolver::setResolvedAddress):
2704         (WebKit::WebRTCResolver::resolvedAddressError):
2705         * WebProcess/Network/webrtc/WebRTCSocket.cpp:
2706         (WebKit::WebRTCSocket::signalOnNetworkThread):
2707
2708 2017-02-13  Megan Gardner  <megan_gardner@apple.com>
2709
2710         Implement Drag cancels
2711         https://bugs.webkit.org/show_bug.cgi?id=168266
2712
2713         Reviewed by Wenson Hsieh.
2714
2715         Adds support for the UI Process to cancel already started drag events.
2716
2717         * UIProcess/WebPageProxy.cpp:
2718         (WebKit::WebPageProxy::cancelledDrag):
2719         * UIProcess/WebPageProxy.h:
2720         * WebProcess/WebPage/WebPage.h:
2721         (WebKit::WebPage::cancelledDrag):
2722         * WebProcess/WebPage/WebPage.messages.in:
2723
2724 2017-02-13  Simon Fraser  <simon.fraser@apple.com>
2725
2726         Call WKDestroyRenderingResources() on iOS when tabs are backgrounded
2727         https://bugs.webkit.org/show_bug.cgi?id=168261
2728         rdar://problem/30481079
2729
2730         Reviewed by Tim Horton.
2731
2732         There's code to call CABackingStoreCollectBlocking() on a 10s timer that exists for Mac, but on iOS
2733         the web processes are suspended before this timer fires. So call CABackingStoreCollectBlocking()
2734         from WebProcess::actualPrepareToSuspend(), which is where we also trigger the markAllLayersVolatile()
2735         code.
2736
2737         Also add CABackingStoreCollectBlocking() to QuartzCoreSPI.h so we can use it without using WKSI.
2738
2739         Release-log how long this takes, in case we get reports of bad performance. In my testing it could be up to 10ms.
2740
2741         * WebProcess/WebProcess.cpp:
2742         (WebKit::WebProcess::actualPrepareToSuspend):
2743         * WebProcess/cocoa/WebProcessCocoa.mm:
2744         (WebKit::WebProcess::destroyRenderingResources):
2745
2746 2017-02-13  Brady Eidson  <beidson@apple.com>
2747
2748         Followup to: Replace all WebKit Library Version checks in WK2 with SDK version checks.
2749         https://bugs.webkit.org/show_bug.cgi?id=168124
2750
2751         Reviewed by Geoffrey Garen.
2752
2753         * UIProcess/Cocoa/VersionChecks.h: 
2754
2755 2017-02-13  Wenson Hsieh  <wenson_hsieh@apple.com>
2756
2757         [WK2] Add test infrastructure and unit tests for data interaction
2758         https://bugs.webkit.org/show_bug.cgi?id=168159
2759         <rdar://problem/30477634>
2760
2761         Reviewed by Tim Horton.
2762
2763         Adds support at the WebKit2 layer for testing data interaction. Introduces the _WKTestingDelegate, which a
2764         protocol which can specified for a WKWebView and used to install mock objects and simulate the state of the
2765         platform. By default, this delegate is nil, which results in normal behavior. For data interaction, we are able
2766         to specify a mock data interaction gesture recognizer for use by the WKContentView to simulate firing a long
2767         press and subsequent movement. This gesture recognizer is used in place of the regular data interaction gesture
2768         recognizer, and allows for TestWebKitAPI to drive interaction without actually sending events through the
2769         UIApplication. The _WKTestingDelegate also contains optional method hooks which are invoked at key points in
2770         time when performing a data interaction gesture.
2771
2772         Since all methods of the testing delegate are optional, the testing delegate can be easily extended to support
2773         testing for other features -- the idea is that leaving all but the relevant methods in the protocol
2774         unimplemented will result in default behavior for everything other than those methods, so a client need only
2775         implement and add WebKit2 hooks for a few methods to support testing for a new feature.
2776
2777         * UIProcess/API/Cocoa/WKWebView.mm:
2778         (-[WKWebView _testingDelegate]):
2779         (-[WKWebView _setTestingDelegate:]):
2780
2781         Specify the testing delegate to use for this WKWebView (see above for more details).
2782
2783         (-[WKWebView _simulateDataInteractionGestureRecognized]):
2784         (-[WKWebView _simulateDataInteractionEntered:]):
2785         (-[WKWebView _simulateDataInteractionUpdated:]):
2786         (-[WKWebView _simulateDataInteractionPerformOperation:]):
2787         (-[WKWebView _simulateDataInteractionEnded:]):
2788         (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]):
2789         (-[WKWebView _simulateFailedDataInteractionWithIndex:]):
2790         (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]):
2791         (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]):
2792
2793         Used by TestWebKitAPI to drive data interaction tests. See DataInteractionTests.mm.
2794
2795         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2796         * UIProcess/API/Cocoa/_WKTestingDelegate.h: Added.
2797         * UIProcess/ios/WKContentViewInteraction.h:
2798         * UIProcess/ios/WKContentViewInteraction.mm:
2799         (-[WKContentView setupInteraction]):
2800         (-[WKContentView _dataInteractionGestureRecognizer]):
2801         * WebKit2.xcodeproj/project.pbxproj:
2802
2803 2017-02-13  Eric Carlson  <eric.carlson@apple.com>
2804
2805         [MediaStream Mac] Video capture needs access to /Library/CoreMediaIO/Plug-Ins/DAL/
2806         https://bugs.webkit.org/show_bug.cgi?id=168244
2807         <rdar://problem/30461158>
2808
2809         Reviewed by Brady Eidson.
2810
2811         * WebProcess/com.apple.WebProcess.sb.in: Grant read-access to the video capture
2812         plug-in directory when enabling video capture.
2813
2814 2017-02-13  Antti Koivisto  <antti@apple.com>
2815
2816         Disable mmap'd cache files if container is class A
2817         https://bugs.webkit.org/show_bug.cgi?id=168241
2818         <rdar://problem/23676252>
2819
2820         Reviewed by JF Bastien and Chris Dumez.
2821
2822         If the mmap'd cache file gets evicted and the device is locked,
2823         then WebContent won't be able to bring the file back in under
2824         class A, causing SIGBUS.
2825
2826         In those circumstances, don't use mmap'd files.
2827
2828         * NetworkProcess/cache/NetworkCache.h:
2829         (WebKit::NetworkCache::Cache::canUseSharedMemoryForBodyData):
2830         * NetworkProcess/cache/NetworkCacheEntry.cpp:
2831         (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
2832
2833             Don't initialize the shareable resource handle for the map if forbidden.
2834
2835         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
2836         (WebKit::NetworkCache::canUseSharedMemoryForPath):
2837
2838             Query the system for the protection status of the cache path.
2839
2840         * NetworkProcess/cache/NetworkCacheFileSystem.h:
2841         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2842         (WebKit::NetworkCache::Storage::Storage):
2843         * NetworkProcess/cache/NetworkCacheStorage.h:
2844         (WebKit::NetworkCache::Storage::canUseSharedMemoryForBodyData):
2845
2846 2017-02-13  Youenn Fablet  <youennf@gmail.com>
2847
2848         [WebRTC] libwebrtc socket factory is not assigning the right socket type
2849         https://bugs.webkit.org/show_bug.cgi?id=168233
2850
2851         Reviewed by Brent Fulgham.
2852
2853         * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
2854         (WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
2855         (WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
2856
2857 2017-02-13  Michael Catanzaro  <mcatanzaro@igalia.com>
2858
2859         [GTK] Unreviewed, add missing precondition check
2860
2861         * WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp:
2862         (webkit_web_editor_get_page):
2863
2864 2017-02-13  Michael Catanzaro  <mcatanzaro@igalia.com>
2865
2866         Unreviewed, fix another docs typo.
2867
2868         * UIProcess/API/gtk/WebKitEditingCommands.h:
2869
2870 2017-02-12  Michael Catanzaro  <mcatanzaro@igalia.com>
2871
2872         [GTK] Improve documentation of webkit_context_menu_set_user_data()
2873         https://bugs.webkit.org/show_bug.cgi?id=168214
2874
2875         Reviewed by Carlos Garcia Campos.
2876
2877         * UIProcess/API/gtk/WebKitContextMenu.cpp:
2878
2879 2017-02-12  Dan Bernstein  <mitz@apple.com>
2880
2881         Tried to fix USE(APPLE_INTERNAL_SDK) builds after r212211.
2882
2883         * UIProcess/mac/WebContextMenuProxyMac.mm:
2884         (WebKit::WebContextMenuProxyMac::createShareMenuItem): Use non-deprecated method.
2885
2886 2017-02-12  Dan Bernstein  <mitz@apple.com>
2887
2888         [Cocoa] Some -respondsToSelector: checks are unnecessary
2889         https://bugs.webkit.org/show_bug.cgi?id=168183
2890
2891         Reviewed by Tim Horton.
2892
2893         * Platform/mac/LayerHostingContext.mm:
2894         (WebKit::LayerHostingContext::setColorMatchUntaggedContent): Removed unnecessary
2895           -respondsToSelector: check.
2896         (WebKit::LayerHostingContext::colorMatchUntaggedContent): Ditto.
2897
2898         * Platform/mac/MenuUtilities.mm:
2899         (WebKit::menuItemTitleForTelephoneNumberGroup): Ditto.
2900
2901         * Platform/spi/ios/UIKitSPI.h: Moved declaration of
2902           -[UIScrollView _isInterruptingDeceleration] from WKWebView.mm to the
2903           !USE(APPLE_INTERNAL_SDK) section here.
2904
2905         * Shared/mac/ChildProcessMac.mm:
2906         (WebKit::ChildProcess::setSharedHTTPCookieStorage): Removed unnecessary -respondsToSelector:
2907           check.
2908
2909         * Shared/mac/WebEventFactory.mm:
2910         (WebKit::typeForEvent): Ditto.
2911
2912         * UIProcess/API/Cocoa/WKWebView.mm:
2913         (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Ditto.
2914
2915         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2916         (WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup): Ditto.
2917
2918         * UIProcess/Cocoa/WebViewImpl.mm:
2919         (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly): Ditto.
2920
2921         * UIProcess/WKImagePreviewViewController.mm:
2922         (-[WKImagePreviewViewController previewActions]): Removed check whether _WKElementAction
2923           responds to -runActionWithElementInfo:.
2924
2925         * UIProcess/ios/WKActionSheetAssistant.mm:
2926         (-[WKActionSheetAssistant showDataDetectorsSheet]): Ditto.
2927
2928         * UIProcess/ios/WKContentViewInteraction.mm:
2929         (-[WKContentView _lookup:]): Ditto.
2930         (-[WKContentView _share:]): Ditto.
2931         (-[WKContentView _addShortcut:]): Ditto.
2932         (-[WKContentView _promptForReplace:]): Ditto.
2933         (-[WKContentView _transliterateChinese:]): Ditto.
2934         (-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Removed call to
2935           -[UIKeyboardImpl didHandleWebKeyEvent], which is a no-op.
2936         (-[WKContentView _interpretKeyEvent:isCharEvent:]): Removed unnecessary -respondsToSelector:
2937           check.
2938         (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Ditto.
2939
2940         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2941         (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence): Ditto.
2942
2943         * UIProcess/mac/WKImmediateActionController.mm:
2944         (-[WKImmediateActionController _animationControllerForDataDetectedText]): Ditto.
2945
2946         * UIProcess/mac/WebContextMenuProxyMac.mm:
2947         (WebKit::WebContextMenuProxyMac::createShareMenuItem): Ditto.
2948
2949 2017-02-12  Michael Catanzaro  <mcatanzaro@igalia.com>
2950
2951         [GTK] Unreviewed, minor documentation improvements
2952
2953         * UIProcess/API/gtk/WebKitWebView.cpp:
2954         (webkit_web_view_class_init):
2955         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2956         (webkit_web_page_class_init):
2957
2958 2017-02-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2959
2960         [SOUP] Downloads fail when the given destination is not a URI
2961         https://bugs.webkit.org/show_bug.cgi?id=168187
2962
2963         Reviewed by Michael Catanzaro.
2964
2965         It always expects a uri, and fails if a local path is given.
2966
2967         Fixes: http/tests/download/anchor-download-no-extension.html
2968                http/tests/download/area-download.html
2969                http/tests/security/anchor-download-allow-data.html
2970                http/tests/security/anchor-download-allow-sameorigin.html
2971
2972         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2973         (WebKit::NetworkDataTaskSoup::download): Use g_file_new_for_path() if the pending destination is a path instead
2974         of a URI.
2975
2976 2017-02-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2977
2978         [GTK] Handle caps lock indicator in event modifiers
2979         https://bugs.webkit.org/show_bug.cgi?id=168186
2980
2981         Reviewed by Michael Catanzaro.
2982
2983         Use PlatformKeyboardEvent::modifiersContainCapsLock() to check if modifiers contain the caps lock and add
2984         Modifiers::CapsLockKey in that case.
2985
2986         * Shared/gtk/WebEventFactory.cpp:
2987         (WebKit::modifiersForEvent):
2988         * UIProcess/API/gtk/WebKitPrivate.cpp:
2989         (wkEventModifiersToGdkModifiers):
2990         (toGdkModifiers):
2991
2992 2017-02-12  Andy Estes  <aestes@apple.com>
2993
2994         [iOS] PDF page number indicator can show "0 of n" on short pages
2995         https://bugs.webkit.org/show_bug.cgi?id=168185
2996
2997         Reviewed by Tim Horton.
2998
2999         When viewing a PDF with a last page that is shorter than the frame height, it's possible
3000         (thanks to rubber-banding) to scroll down until the page no longer intersects the rect we
3001         use to determine the center page. When this happens, the page number indicator displays
3002         "0 of n".
3003
3004         Fix this by handling cases where the first page starts below the center page rect or the
3005         last page ends above it.
3006
3007         * UIProcess/ios/WKPDFView.mm:
3008         (-[WKPDFView _revalidateViews]):
3009
3010 2017-02-11  Alex Christensen  <achristensen@webkit.org>
3011
3012         Fix crashes after [NSURLSession invalidateAndCancel]
3013         https://bugs.webkit.org/show_bug.cgi?id=168181
3014         <rdar://problem/29813868>
3015
3016         Reviewed by Brady Eidson.
3017
3018         When we call NetworkSessionCocoa::invalidateAndCancel, we intend for the session to immediately
3019         become invalid and stop doing things. [NSURLSession invalidateAndCancel] asynchronously cancels
3020         everything and then calls the delegate's didBecomeInvalidWithError, so before this change there
3021         is a time when we have torn down the session with SessionTracker::destroySession but we can still
3022         get a delegate callback which assumes the session and its NetworkStorageSession exists.  If we
3023         get any delegate callbacks after a NetworkSession has been invalidated, we will want to ignore them.
3024
3025         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3026         (-[WKNetworkSessionDelegate sessionInvalidated]):
3027         (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]):
3028         (-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
3029         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
3030         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
3031         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
3032         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
3033         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
3034         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
3035         (-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
3036         (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
3037         (-[WKNetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]):
3038         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
3039         The pointer to the NetworkSessionCocoa can now be null. We need to check it.
3040         (WebKit::NetworkSessionCocoa::invalidateAndCancel):
3041         Synchronously remove the connection between the delegates and the NetworkSessionCocoa.
3042
3043 2017-02-10  John Wilander  <wilander@apple.com>
3044
3045         Updates to Resource Load Statistics: Get the right website data store and introduce timeout for user interaction
3046         https://bugs.webkit.org/show_bug.cgi?id=167474
3047         <rdar://problem/24681808>
3048         <rdar://problem/24703286>
3049         <rdar://problem/30290270>
3050
3051         This patch does the following:
3052         1. Gets the right website data store. API::WebsiteDataStore::defaultDataStore()
3053             does not provide the right data store.
3054         2. Introduces timeout for user interaction. A domain needs interaction every 30
3055             days to stay in that category.
3056         3. Adds grandfathered to the statistics model in preparation for grandfathering of
3057             existing data records.
3058         4. Adds test infrastructure to allow testing of the various rules in place for
3059             data records removal.
3060         5. Fixes various smaller bugs that were found as part of setting up the tests.
3061         6. Regresses the data records removal counting. We need to come up with a thread
3062             safe way of gathering removal statistics from more than one data store now
3063             that we potentially interact with multiple stores.
3064         7. Adds a first set of layout tests for resource load statistics.
3065
3066         Reviewed by Andy Estes.
3067
3068         * PlatformEfl.cmake:
3069             Added UIProcess/WebResourceLoadStatisticsManager.cpp and
3070             UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
3071         * PlatformGTK.cmake:
3072             Added UIProcess/WebResourceLoadStatisticsManager.cpp and
3073             UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
3074         * PlatformMac.cmake:
3075             Added UIProcess/WebResourceLoadStatisticsManager.cpp and
3076             UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
3077         * Shared/API/APIObject.h:
3078             Adds WebResourceLoadStatisticsManager to the Type enum.
3079         * Shared/API/c/WKBase.h:
3080             Typedef of WKResourceLoadStatisticsManagerRef.
3081         * Shared/WebCoreArgumentCoders.cpp:
3082         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
3083         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
3084             Adds support for statistics mostRecentUserInteraction, grandfathered, and
3085             dataRecordsRemoved.
3086         * UIProcess/API/C/WKAPICast.h:
3087             Adds API mapping between WKResourceLoadStatisticsManagerRef and 
3088             WebResourceLoadStatisticsManager.
3089         * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp: Added.
3090         (WKResourceLoadStatisticsManagerGetTypeID):
3091         (WKResourceLoadStatisticsManagerSetPrevalentResource):
3092         (WKResourceLoadStatisticsManagerIsPrevalentResource):
3093         (WKResourceLoadStatisticsManagerSetHasHadUserInteraction):
3094         (WKResourceLoadStatisticsManagerIsHasHadUserInteraction):
3095         (WKResourceLoadStatisticsManagerSetTimeToLiveUserInteraction):
3096         (WKResourceLoadStatisticsManagerFireDataModificationHandler):
3097         (WKResourceLoadStatisticsManagerSetNotifyPagesWhenDataRecordsWereScanned):
3098         (WKResourceLoadStatisticsManagerSetShouldClassifyResourcesBeforeDataRecordsRemoval):
3099         (WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
3100         (WKResourceLoadStatisticsManagerResetToConsistentState):
3101             API level bridge to WebResourceLoadStatisticsManager functions.
3102         * UIProcess/API/C/WKResourceLoadStatisticsManager.h: Added.
3103         * UIProcess/WebProcessProxy.cpp:
3104         (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyOwnedDomainsInAllPersistentDataStores):
3105             A way to delete website data in persistent store(s) configured by the 
3106             embedding client. API::WebsiteDataStore::defaultDataStore() does not 
3107             do this which caused us to skip session storage.
3108         * UIProcess/WebProcessProxy.h:
3109         * UIProcess/WebResourceLoadStatisticsManager.cpp: Added.
3110         (WebKit::WebResourceLoadStatisticsManager::setPrevalentResource):
3111         (WebKit::WebResourceLoadStatisticsManager::isPrevalentResource):
3112         (WebKit::WebResourceLoadStatisticsManager::setHasHadUserInteraction):
3113         (WebKit::WebResourceLoadStatisticsManager::hasHadUserInteraction):
3114         (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
3115         (WebKit::WebResourceLoadStatisticsManager::fireDataModificationHandler):
3116         (WebKit::WebResourceLoadStatisticsManager::setNotifyPagesWhenDataRecordsWereScanned):
3117         (WebKit::WebResourceLoadStatisticsManager::setShouldClassifyResourcesBeforeDataRecordsRemoval):
3118         (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
3119         (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
3120             Static functions to manage the state and behavior of the UI process' 
3121             resource load statistics store.
3122         * UIProcess/WebResourceLoadStatisticsManager.h: Added.
3123         (WebKit::WebResourceLoadStatisticsManager::create):
3124         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3125         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
3126             An effect of a member variable rename. See header file comment below.
3127         (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned):
3128         (WebKit::WebResourceLoadStatisticsStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
3129         (WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval):
3130             Three static functions for controlling the behavior of the store.
3131         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
3132             Changes:
3133             1. Covers all data record types.
3134             2. Allows data removal when m_lastTimeDataRecordsWereRemoved is not set.
3135             3. Moves the heavy lifting to WebsiteDataStore (see below).
3136             4. No longer counts removed data regressions.
3137         (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
3138             See next comment.
3139         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
3140             WebResourceLoadStatisticsStore::processStatisticsAndDataRecords() is 
3141             broken out of WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated
3142             to allow for statistics processing without prior classification.
3143             Tests need to set statistics and a run of the classifier may
3144             reset the data.
3145         (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
3146             Sets the notification callback which calls 
3147             WebResourceLoadStatisticsStore::processStatisticsAndDataRecords().
3148         * UIProcess/WebResourceLoadStatisticsStore.h:
3149         (WebKit::WebResourceLoadStatisticsStore::coreStore):
3150             Renamed m_resourceStatisticsStore to m_resourceLoadStatisticsStore to
3151             harmonize with other naming.
3152         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3153         (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyOwnedDomains):
3154             This is now where matching is made between prevalent resources
3155             and data records. This function is used by 
3156             WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains().
3157         (WebKit::WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains):
3158             The function WebResourceLoadStatisticsStore::removeDataRecords()
3159             calls to get data records removed in all persistent stores.
3160         * UIProcess/WebsiteData/WebsiteDataStore.h:
3161         * WebKit2.xcodeproj/project.pbxproj:
3162         * WebProcess/WebProcess.cpp:
3163         (WebKit::m_resourceLoadStatisticsStore):
3164         (WebKit::WebProcess::statisticsChangedTimerFired):
3165         (WebKit::m_resourceLoadStatisticsStorage): Deleted.
3166             Renamed m_resourceLoadStatisticsStorage to m_resourceLoadStatisticsStore 
3167             to harmonize with other naming.
3168         * WebProcess/WebProcess.h:
3169
3170 2017-02-10  Simon Fraser  <simon.fraser@apple.com>
3171
3172         Zero out some WKWebView state in the case of a web content crash
3173         https://bugs.webkit.org/show_bug.cgi?id=168157
3174
3175         Reviewed by Tim Horton.
3176
3177         Reset some bits of state in WKWebView when the web content process crashes, in
3178         to try to avoid states that might cause the web view to stay blank.
3179
3180         * UIProcess/API/Cocoa/WKWebView.mm:
3181         (-[WKWebView _processDidExit]):
3182
3183 2017-02-10  Daniel Bates  <dabates@apple.com>
3184
3185         Detach frame from document when entering page cache
3186         https://bugs.webkit.org/show_bug.cgi?id=166774
3187         <rdar://problem/29904368>
3188
3189         Reviewed by Chris Dumez.
3190
3191         * Shared/WebPreferencesDefinitions.h:
3192         * UIProcess/API/C/WKPreferences.cpp:
3193         (WKPreferencesSetAllowsPageCacheWithWindowOpener): Deleted.
3194         (WKPreferencesGetAllowsPageCacheWithWindowOpener): Deleted.
3195         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3196         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3197         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3198         * WebProcess/WebPage/WebPage.cpp:
3199         (WebKit::WebPage::updatePreferences):
3200
3201 2017-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3202
3203         WebInspector: refactor RemoteInspector to move cocoa specific code to their own files
3204         https://bugs.webkit.org/show_bug.cgi?id=166681
3205
3206         Reviewed by Michael Catanzaro.
3207
3208         * WebProcess/WebProcess.cpp:
3209         (WebKit::WebProcess::initializeWebProcess): Add PLATFORM(COCOA) to the ifdef.
3210
3211 2017-02-10  Tim Horton  <timothy_horton@apple.com>
3212
3213         Infinite UI process hang under ensurePositionInformationIsUpToDate
3214         https://bugs.webkit.org/show_bug.cgi?id=168154
3215         <rdar://problem/30428673>
3216
3217         Reviewed by Simon Fraser.
3218
3219         * UIProcess/ios/WKContentViewInteraction.mm:
3220         (-[WKContentView cleanupInteraction]):
3221         If the web process crashes or we're being torn down for another reason,
3222         assume that we aren't ever going to receive any pending async interaction
3223         information update. Otherwise, ensurePositionInformationIsUpToDate can end
3224         up waiting for it forever.
3225
3226 2017-02-10  Andrew Gold  <agold@apple.com>
3227
3228         Add mediaStreamEnabled property to WKPreferences for Cocoa.
3229         https://bugs.webkit.org/show_bug.cgi?id=168080
3230
3231         Reviewed by Tim Horton.
3232
3233         * UIProcess/API/Cocoa/WKWebView.mm:
3234         (-[WKWebView _initializeWithConfiguration:]): Sets the pageConfiguration's mediaStreamEnabled preference value.
3235
3236         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3237         (-[WKWebViewConfiguration copyWithZone:]): Copies the mediaStreamEnabled property.
3238         (-[WKWebViewConfiguration _mediaStreamEnabled]): Gets the mediaStreamEnabled property.
3239         (-[WKWebViewConfiguration _setMediaStreamEnabled:]): Sets the mediaStreamEnabled property.
3240         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3241
3242 2017-02-10  Olivier Blin  <olivier.blin@softathome.com>
3243
3244         WebProcess: remove unused m_inDidClose
3245         https://bugs.webkit.org/show_bug.cgi?id=168121
3246
3247         Reviewed by Alex Christensen.
3248
3249         * WebProcess/WebProcess.cpp:
3250         (WebKit::WebProcess::didClose):
3251         * WebProcess/WebProcess.h:
3252         m_inDidClose has been unused since r83774
3253
3254 2017-02-10  Joseph Pecoraro  <pecoraro@apple.com>
3255
3256         [Resource Timing] Enable Resource Timing by default in Tests
3257         https://bugs.webkit.org/show_bug.cgi?id=168145
3258
3259         Reviewed by Ryosuke Niwa.
3260
3261         * Shared/WebPreferencesDefinitions.h:
3262         * UIProcess/API/C/WKPreferences.cpp:
3263         (WKPreferencesSetResourceTimingEnabled):
3264         (WKPreferencesGetResourceTimingEnabled):
3265         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3266         * WebProcess/WebPage/WebPage.cpp:
3267         (WebKit::WebPage::updatePreferences):
3268
3269 2017-02-10  Dan Bernstein  <mitz@apple.com>
3270
3271         [Cocoa] Add shouldChangeSelectedRange to WKWebProcessPlugInEditingDelegate
3272         https://bugs.webkit.org/show_bug.cgi?id=168097
3273
3274         Reviewed by Tim Horton.
3275
3276         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
3277           Declared new delegate method.
3278         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3279         (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Dispatch new delegate
3280           method.
3281
3282         * WebProcess/WebPage/ios/WebPageIOS.mm:
3283         (WebKit::WebPage::selectWithGesture): Pass UserTriggered whan calling
3284           WebCore::Frame::Selection::setSelectedRange, so that the delegate is consulted.
3285         (WebKit::WebPage::changeBlockSelection): Ditto.
3286         (WebKit::WebPage::updateSelectionWithTouches): Ditto.
3287         (WebKit::WebPage::selectWithTwoTouches): Ditto.
3288         (WebKit::WebPage::extendSelection): Ditto.
3289         (WebKit::WebPage::selectWordBackward): Ditto,
3290         (WebKit::WebPage::moveSelectionByOffset): Ditto.
3291         (WebKit::WebPage::selectPositionAtPoint): Ditto.
3292         (WebKit::WebPage::selectPositionAtBoundaryWithDirection): Ditto.
3293         (WebKit::WebPage::moveSelectionAtBoundaryWithDirection): Ditto.
3294         (WebKit::WebPage::selectTextWithGranularityAtPoint): Ditto.
3295         (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary): Ditto.
3296         (WebKit::WebPage::updateSelectionWithExtentPoint): Ditto.
3297
3298 2017-02-10  Brady Eidson  <beidson@apple.com>
3299
3300         Replace all WebKit Library Version checks in WK2 with SDK version checks.
3301         https://bugs.webkit.org/show_bug.cgi?id=168124
3302
3303         Reviewed by Geoffrey Garen.
3304
3305         This change gets rid of WebKit Library Version checks and replaces them with SDK version checks.
3306         
3307         To allow our tools to still be able to test new behaviors even when built against older SDKs,
3308         it also opts them into an SPI default to have "linkedOnOrAfter()" always return true.
3309         
3310         * Shared/Cocoa/CompletionHandlerCallChecker.mm:
3311         (WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):
3312         
3313         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3314         (-[WKWebViewConfiguration init]):
3315         
3316         * UIProcess/Cocoa/VersionChecks.h:
3317         (WebKit::linkedOnOrAfter): Deleted.
3318         * UIProcess/Cocoa/VersionChecks.mm:
3319         (WebKit::linkedOnOrAfter):
3320         
3321         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3322         (WebKit::WebProcessPool::isNetworkCacheEnabled):
3323
3324 2017-02-10  Brian Burg  <bburg@apple.com>
3325
3326         [Cocoa] Web Inspector: generate an NS_ENUM containing platforms supported by the protocol code generator
3327         https://bugs.webkit.org/show_bug.cgi?id=168019
3328         <rdar://problem/28718990>
3329
3330         Reviewed by Joseph Pecoraro.
3331
3332         * UIProcess/Automation/Automation.json: Fix the platform values to be lowercase.
3333
3334 2017-02-10  Brian Burg  <bburg@apple.com>
3335
3336         Web Automation: fail gracefully when a screenshot cannot be encoded as base64
3337         https://bugs.webkit.org/show_bug.cgi?id=168095
3338         <rdar://problem/30297427>
3339
3340         Reviewed by Joseph Pecoraro.
3341
3342         Convert platformGetBase64EncodedPNGData to return a std::optional<String>.
3343         Return nullopt if we can't create a screenshot or convert it to base64.
3344
3345         * UIProcess/Automation/WebAutomationSession.cpp:
3346         (WebKit::WebAutomationSession::didTakeScreenshot):
3347         (WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
3348         * UIProcess/Automation/WebAutomationSession.h:
3349         * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
3350         (WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
3351
3352 2017-02-09  Carlos Garcia Campos  <cgarcia@igalia.com>
3353
3354         Unreviewed. Fix GTK+ build with threaded compositor disabled.
3355
3356         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
3357         (WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):
3358         (WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeNow):
3359
3360 2017-02-09  Alex Christensen  <achristensen@webkit.org>
3361
3362         Unreviewed, rolling out r212040.
3363
3364         Broke build.  I'm not surprised
3365
3366         Reverted changeset:
3367
3368         "[WebRTC][Mac] Activate libwebrtc"
3369         https://bugs.webkit.org/show_bug.cgi?id=167293
3370         http://trac.webkit.org/changeset/212040
3371
3372 2017-02-09  Chris Dumez  <cdumez@apple.com>
3373
3374         [Mac][WK2] Use MIME type to add file extension to downloads' suggested filenames when missing
3375         https://bugs.webkit.org/show_bug.cgi?id=168077
3376         <rdar://problem/30412595>
3377
3378         Reviewed by Alex Christensen.
3379
3380         Use MIME type to add file extension to downloads' suggested filenames when missing:
3381         - https://html.spec.whatwg.org/#as-a-download (step 19)
3382
3383         This new behavior matches Chrome.
3384
3385         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
3386         (WebKit::BlobDownloadClient::didReceiveResponseAsync):
3387         * NetworkProcess/Downloads/Download.cpp:
3388         (WebKit::Download::didReceiveResponse):
3389         (WebKit::Download::decideDestinationWithSuggestedFilename):
3390         * NetworkProcess/Downloads/Download.h:
3391         * NetworkProcess/NetworkProcess.cpp:
3392         (WebKit::NetworkProcess::findPendingDownloadLocation):
3393         * UIProcess/Downloads/DownloadProxy.cpp:
3394         (WebKit::DownloadProxy::didStart):
3395         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
3396         * UIProcess/Downloads/DownloadProxy.h:
3397         * UIProcess/Downloads/DownloadProxy.messages.in:
3398
3399 2017-02-09  Youenn Fablet  <youenn@apple.com>
3400
3401         [WebRTC][Mac] Activate libwebrtc
3402         https://bugs.webkit.org/show_bug.cgi?id=167293
3403
3404         Reviewed by Alex Christensen.
3405
3406         * Shared/WebPreferencesDefinitions.h:
3407
3408 2017-02-09  Alex Christensen  <achristensen@webkit.org>
3409
3410         Fix libwebrtc build on case-sensitive file systems.
3411
3412         * WebProcess/Network/webrtc/WebRTCMonitor.cpp:
3413
3414 2017-02-09  Alex Christensen  <achristensen@webkit.org>
3415
3416         Fix CMake build.
3417
3418         * PlatformMac.cmake:
3419
3420 2017-02-09  Brady Eidson  <beidson@apple.com>
3421
3422         Transition "WebKit Library Version" checks to SDK version checks.
3423         <rdar://problem/30313696> and https://bugs.webkit.org/show_bug.cgi?id=168056
3424
3425         Reviewed by Geoffrey Garen.
3426
3427         When doing linkedOnOrAfter checks, relying solely on the WebKit library version number is error prone,
3428         since apps may not link against WebKit directly and therefore the linked WebKit is unknown.
3429         
3430         We should first prefer a version check on the SDK that the app was built with.
3431         
3432         If that check fails, we can fallback to the linked WebKit library version number if it exists.
3433
3434         * Shared/Cocoa/CompletionHandlerCallChecker.mm:
3435         (WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):
3436
3437         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3438         (-[WKWebViewConfiguration init]):
3439
3440         For each "linked-on-or-after" feature, include both the WebKit library version and SDK version:
3441         * UIProcess/Cocoa/VersionChecks.h:
3442         (WebKit::linkedOnOrAfter):
3443         * UIProcess/Cocoa/VersionChecks.mm:
3444         (WebKit::linkedOnOrAfter):
3445         (WebKit::linkTimeVersion): Deleted.
3446
3447         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3448         (WebKit::WebProcessPool::isNetworkCacheEnabled):
3449
3450 2017-02-09  Commit Queue  <commit-queue@webkit.org>
3451
3452         Unreviewed, rolling out r211980 and r211987.
3453         https://bugs.webkit.org/show_bug.cgi?id=168072
3454
3455         Caused API test WebKit2.DuplicateCompletionHandlerCalls to
3456         fail (Requested by ryanhaddad on #webkit).
3457
3458         Reverted changesets:
3459
3460         "Transition "WebKit Library Version" checks to SDK version