Make HashMap::keys() and HashMap::values() work with WTF::map/WTF::copyToVector
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2017-10-09  Sam Weinig  <sam@webkit.org>
2
3         Make HashMap::keys() and HashMap::values() work with WTF::map/WTF::copyToVector
4         https://bugs.webkit.org/show_bug.cgi?id=178072
5
6         Reviewed by Darin Adler.
7
8         * Shared/AsyncRequest.h:
9         (WebKit::AsyncRequestMap::values):
10         * UIProcess/WebProcessProxy.h:
11         (WebKit::WebProcessProxy::pages const):
12
13             Update for type change for HashMap::values().
14
15 2017-10-09  Jeremy Jones  <jeremyj@apple.com>
16
17         Incorrect fullscreen animation when element has a transform.
18         https://bugs.webkit.org/show_bug.cgi?id=177558
19         rdar://problem/29603741
20
21         Reviewed by Jer Noble.
22
23         Use a bit of code from element fullscreen to do this correctly for video fullscreen.
24         The key is to get the absolute quad from the renderer. This will work for scaling,
25         But since we still take the bounding box, it won't work for rotations.
26
27         * WebProcess/cocoa/VideoFullscreenManager.mm:
28         (WebKit::inlineVideoFrame):
29
30 2017-10-09  Robin Morisset  <rmorisset@apple.com>
31
32         Make the names of the options consistent
33         https://bugs.webkit.org/show_bug.cgi?id=177933
34
35         Reviewed by Saam Barati.
36
37         * NetworkProcess/capture/json.hpp:
38         * Platform/IPC/Connection.cpp:
39         (IPC::Connection::connectionDidClose):
40         * UIProcess/API/Cocoa/WKWebView.mm:
41         (-[WKWebView _keyboardWillHide:]):
42         * UIProcess/WebPageProxy.cpp:
43         (WebKit::WebPageProxy::runModal):
44         * UIProcess/mac/WebInspectorProxyMac.mm:
45         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
46         * WebProcess/WebPage/ios/WebPageIOS.mm:
47         (WebKit::WebPage::selectWithGesture):
48
49 2017-10-09  Adrian Perez de Castro  <aperez@igalia.com>
50
51         [WPE][GTK] Propagate libepoxy compiler flags obtained from pkg-config
52         https://bugs.webkit.org/show_bug.cgi?id=178081
53
54         Reviewed by Carlos Alberto Lopez Perez.
55
56         * CMakeLists.txt: Use ${LIBEPOXY_DEFINITIONS} for building WebKit.
57
58 2017-10-08  Tim Horton  <timothy_horton@apple.com>
59
60         mediaPlaybackRequiresUserAction API replacement annotation is wrong
61         https://bugs.webkit.org/show_bug.cgi?id=178063
62
63         Reviewed by Dan Bernstein.
64
65         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
66         mediaPlaybackRequiresUserAction suggests that you should use 
67         requiresUserActionForMediaPlayback instead, but that is also deprecated.
68         Instead, follow the chain and suggest mediaTypesRequiringUserActionForPlayback.
69
70 2017-10-06  Wenson Hsieh  <wenson_hsieh@apple.com>
71
72         [iOS WK2] API tests added in r222991 are failing in iOS 11 test runners
73         https://bugs.webkit.org/show_bug.cgi?id=178037
74
75         Reviewed by Tim Horton.
76
77         This patch carries out some minor cleanup around UIKitSPI.h in WebKit2, so that the internal SDK isn't required
78         to implement -[WKContentView insertTextSuggestion:].
79
80         * Platform/spi/ios/UIKitSPI.h:
81         * UIProcess/ios/WKContentViewInteraction.mm:
82         (-[WKContentView insertTextSuggestion:]):
83
84 2017-10-06  Chris Dumez  <cdumez@apple.com>
85
86         [Beacon][Cocoa] Beacon requests with BufferSource payload should not have a Content-Type HTTP header
87         https://bugs.webkit.org/show_bug.cgi?id=178027
88         <rdar://problem/34748470>
89
90         Reviewed by Youenn Fablet.
91
92         Use new NSURLSessionConfiguration._suppressedAutoAddedHTTPHeaders CFNetwork SPI to
93         make sure that CFNetwork never adds a Content-Type HTTP headers to our requests
94         when we did not add one.
95
96         This is covered by the following tests on newer OSes:
97         - imported/w3c/web-platform-tests/beacon/headers/header-content-type.html
98         - http/tests/blink/sendbeacon/beacon-same-origin.html
99
100         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
101         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
102
103 2017-10-06  Aishwarya Nirmal  <anirmal@apple.com>
104
105         [iOS] Respect the "caret-color" CSS property when editing 
106         https://bugs.webkit.org/show_bug.cgi?id=177489
107         <rdar://problem/34600419>
108
109         Reviewed by Tim Horton.
110
111         This change adds support for the caret-color property on iOS.
112
113         * Shared/EditorState.cpp:
114         (WebKit::EditorState::PostLayoutData::encode const):
115         (WebKit::EditorState::PostLayoutData::decode):
116         * Shared/EditorState.h:
117         * UIProcess/ios/WKContentViewInteraction.mm:
118         (-[WKContentView insertionPointColor]):
119         * WebProcess/WebPage/ios/WebPageIOS.mm:
120         (WebKit::WebPage::platformEditorState const):
121
122 2017-10-06  Brian Burg  <bburg@apple.com>
123
124         Web Inspector: clicking in Inspector webview clears the selection in the inspected page
125         https://bugs.webkit.org/show_bug.cgi?id=178014
126         <rdar://problem/12706857>
127
128         Reviewed by Timothy Hatcher.
129
130         If the Inspector is docked to the inspected view, clicking on the Inspector
131         webview will cause selection in the inspected view to be lost. This is because
132         the selection is lost when the web view resigns first responder.
133
134         Add a check in maintainsInactiveSelection to always retain selection if
135         Web Inspector is open. This approach seems simpler than trying to sync a client's
136         usage of WKPageSetMaintainsInactiveSelection with overrides that need to be applied
137         and unapplied when an inspector web view is shown or hidden.
138
139         * UIProcess/WebPageProxy.cpp:
140         (WebKit::WebPageProxy::maintainsInactiveSelection const):
141         (WebKit::WebPageProxy::inspector const): Drive by, use nullptr.
142
143         * UIProcess/WebPageProxy.h:
144         (WebKit::WebPageProxy::maintainsInactiveSelection const): Deleted.
145
146 2017-10-06  Alex Christensen  <achristensen@webkit.org>
147
148         Add more infrastructure to apply custom headers to same-origin requests
149         https://bugs.webkit.org/show_bug.cgi?id=177629
150
151         Reviewed by Ryosuke Niwa.
152
153         * UIProcess/API/C/WKWebsitePolicies.cpp:
154         (WKWebsitePoliciesCopyCustomHeaderFields):
155         (WKWebsitePoliciesSetCustomHeaderFields):
156         * UIProcess/API/C/WKWebsitePolicies.h:
157         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
158         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
159         (-[_WKWebsitePolicies customHeaderFields]):
160         (-[_WKWebsitePolicies setCustomHeaderFields:]):
161
162         Make the SPI for setting custom header fields take a dictionary<String, String>
163         instead of an array of Strings with colons. This matches NSURLRequest and other
164         APIs that deal with header fields.
165
166 2017-10-06  Wenson Hsieh  <wenson_hsieh@apple.com>
167
168         [iOS] Tweak support for classifying form controls (followup to r222487)
169         https://bugs.webkit.org/show_bug.cgi?id=177917
170         <rdar://problem/34820122>
171
172         Reviewed by Dean Jackson.
173
174         This patch follows up with <http://trac.webkit.org/r222487>. It combines the functionality of two SPI hooks
175         implemented on WKContentView into a single method that vends a context dictionary, and additionally addresses an
176         issue with the original implementation, wherein some cached state on WebPageProxy is set upon starting node
177         assistance, but is never unset when stopping node assistance, nor set anywhere else. See per-method comments for
178         more detail.
179
180         * UIProcess/WebPageProxy.h:
181
182         Remove members m_acceptsAutofilledLoginCredentials and m_representingPageURL from WebPageProxy. This state is
183         retrieved from the AssistedNodeInformation struct when starting node assistance, but is never reset anywhere
184         else. Instead of introducing new members to remember this state, we can just use the WKContentView's current
185         assisted node information.
186
187         This also means that programmatically focusing forms (without user gesture) will no longer cause WKContentView
188         to accept autofilled login credentials, since we bail out of node assistance and don't begin an input session.
189
190         * UIProcess/ios/WKContentView.mm:
191         (-[WKContentView acceptsAutofilledLoginCredentials]): Deleted.
192         (-[WKContentView representingPageURL]): Deleted.
193         * UIProcess/ios/WKContentViewInteraction.mm:
194         (-[WKContentView _autofillContext]):
195
196         Merge functionality of the previous two SPI hooks, such that -_autofillContext will return a non-null dictionary
197         containing the URL of the focused element's document if and only if WKContentView accepts autofilled login
198         credentials, and there exists a representing page URL.
199
200         When the page stops assisting the focused node, we set the AssistedNodeInformation's element type to None, so we
201         additionally bail and return nil if the element type is None. As an aside, it seems a more reasonable approach to
202         resetting state upon stopping node assistance is to just completely reset _assistedNodeInformation to its initial
203         value, i.e. via _assistedNodeInformation = { }. It's not clear whether there are behaviors relying on the fact
204         that all members but the element type in the content view's assisted node information could be stale, so this
205         seems worthy of some investigation.
206
207         * UIProcess/ios/WebPageProxyIOS.mm:
208         (WebKit::WebPageProxy::startAssistingNode):
209         (WebKit::WebPageProxy::acceptsAutofilledLoginCredentials): Deleted.
210         (WebKit::WebPageProxy::representingPageURL): Deleted.
211
212 2017-10-06  Yousuke Kimoto  <yousuke.kimoto@sony.com>
213
214         [WinCairo] Add shared curl files
215         https://bugs.webkit.org/show_bug.cgi?id=177999
216
217         Reviewed by Alex Christensen.
218
219         * PlatformWin.cmake:
220         * Shared/Authentication/curl/AuthenticationManagerCurl.cpp: Added.
221         (WebKit::AuthenticationManager::receivedCredential):
222         (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
223         (WebKit::AuthenticationManager::receivedCancellation):
224         (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
225         (WebKit::AuthenticationManager::receivedChallengeRejection):
226         * Shared/curl/WebCoreArgumentCodersCurl.cpp: Added.
227         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
228         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
229         (IPC::ArgumentCoder<CertificateInfo>::encode):
230         (IPC::ArgumentCoder<CertificateInfo>::decode):
231         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
232         (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
233         (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
234         (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData):
235         (IPC::ArgumentCoder<Credential>::encodePlatformData):
236         (IPC::ArgumentCoder<Credential>::decodePlatformData):
237
238 2017-10-06  Brent Fulgham  <bfulgham@apple.com>
239
240         Sandbox rules block PluginProcess using "File Open/Save" dialogs
241         https://bugs.webkit.org/show_bug.cgi?id=177965
242         <rdar://problem/33976846>
243
244         Reviewed by Alexey Proskuryakov.
245
246         Update the PluginProcess sandboxes to allow the same XPC services as
247         the WebContent process. Also allow access to the openAndSavePanelServices.
248
249         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: 
250
251 2017-10-06  Brady Eidson  <beidson@apple.com>
252
253         Add (entirely incorrect) fetching of ServiceWorker scripts.
254         https://bugs.webkit.org/show_bug.cgi?id=176179
255
256         Reviewed by Andy Estes.
257
258         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
259         (WebKit::WebSWServerConnection::startScriptFetchInClient):
260         * StorageProcess/ServiceWorker/WebSWServerConnection.h:
261         * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
262
263         * WebProcess/Storage/WebSWClientConnection.cpp:
264         (WebKit::WebSWClientConnection::finishFetchingScriptInServer):
265         * WebProcess/Storage/WebSWClientConnection.h:
266         * WebProcess/Storage/WebSWClientConnection.messages.in:
267
268 2017-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>
269
270         [GTK][WPE] Add API to configure and enable resource load statistics
271         https://bugs.webkit.org/show_bug.cgi?id=177943
272
273         Reviewed by Michael Catanzaro.
274
275         Add new WebKitWebsiteDataManager construct only property to set the directory where the persistent stats are
276         stored, and methods to enable resource load statistics and query whether it's currently enabled. Also add a new
277         Website data type to be able to remove the persistent stats using WebKitWebsiteDataManager existing API.
278
279         * UIProcess/API/glib/WebKitWebContext.cpp:
280         (websiteDataStoreConfigurationForWebProcessPoolConfiguration):
281         (webkitWebContextConstructed):
282         * UIProcess/API/glib/WebKitWebsiteData.cpp:
283         (recordContainsSupportedDataTypes):
284         (toWebKitWebsiteDataTypes):
285         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
286         (webkitWebsiteDataManagerGetProperty):
287         (webkitWebsiteDataManagerSetProperty):
288         (webkitWebsiteDataManagerConstructed):
289         (webkit_website_data_manager_class_init):
290         (webkitWebsiteDataManagerGetDataStore):
291         (webkit_website_data_manager_get_resource_load_stats_directory):
292         (webkit_website_data_manager_set_resource_load_stats_enabled):
293         (webkit_website_data_manager_get_resource_load_stats_enabled):
294         (toWebsiteDataTypes):
295         * UIProcess/API/gtk/WebKitWebsiteData.h:
296         * UIProcess/API/gtk/WebKitWebsiteDataManager.h:
297         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
298         * UIProcess/API/wpe/WebKitWebsiteData.h:
299         * UIProcess/API/wpe/WebKitWebsiteDataManager.h:
300
301 2017-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>
302
303         [GTK][WPE] All resource load statistics tests added in r212183 crash in GTK bots, timeout in GTK and WPE bots since r219049
304         https://bugs.webkit.org/show_bug.cgi?id=168171
305
306         Reviewed by Chris Dumez.
307
308         Add C API to handle all resource load statistics requests made by the layout tests.
309
310         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
311         (WKWebsiteDataStoreSetStatisticsLastSeen):
312         (WKWebsiteDataStoreSetStatisticsPrevalentResource):
313         (WKWebsiteDataStoreIsStatisticsPrevalentResource):
314         (WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
315         (WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
316         (WKWebsiteDataStoreSetStatisticsGrandfathered):
317         (WKWebsiteDataStoreIsStatisticsGrandfathered):
318         (WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
319         (WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
320         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
321         (WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction):
322         (WKWebsiteDataStoreSetStatisticsTimeToLiveCookiePartitionFree):
323         (WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords):
324         (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
325         (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
326         (WKWebsiteDataStoreStatisticsSubmitTelemetry):
327         (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenDataRecordsWereScanned):
328         (WKWebsiteDataStoreSetStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
329         (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenTelemetryWasCaptured):
330         (WKWebsiteDataStoreSetStatisticsMinimumTimeBetweenDataRecordsRemoval):
331         (WKWebsiteDataStoreSetStatisticsGrandfatheringTime):
332         (WKWebsiteDataStoreSetStatisticsMaxStatisticsEntries):
333         (WKWebsiteDataStoreSetStatisticsPruneEntriesDownTo):
334         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
335         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
336         (WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval):
337         (WKWebsiteDataStoreStatisticsResetToConsistentState):
338         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
339
340 2017-10-05  Tim Horton  <timothy_horton@apple.com>
341
342         Fix the Mac CMake build
343         https://bugs.webkit.org/show_bug.cgi?id=177985
344
345         Unreviewed build fix.
346
347         * CMakeLists.txt:
348         * PlatformMac.cmake:
349         After r222917, there's one more piece of WebKitSystemInterface left.
350         And some missing bits of PaymentRequest.
351
352 2017-10-05  Keith Miller  <keith_miller@apple.com>
353
354         Unreviewed, tapi builds without optimization so we should have TAPI passes -DRELEASE_WITHOUT_OPTIMIZATIONS.
355
356         * Configurations/Base.xcconfig:
357
358 2017-10-05  Jer Noble  <jer.noble@apple.com>
359
360         [Cocoa] Enable ENABLE_ENCRYPTED_MEDIA build-time setting
361         https://bugs.webkit.org/show_bug.cgi?id=177261
362
363         Reviewed by Eric Carlson.
364
365         * Configurations/FeatureDefines.xcconfig:
366
367 2017-10-05  Alex Christensen  <achristensen@webkit.org>
368
369         Add ObjC equivalent of WKPageNavigationClient.didChangeBackForwardList
370         https://bugs.webkit.org/show_bug.cgi?id=177966
371         <rdar://problem/22387135>
372
373         Reviewed by Tim Horton.
374
375         * UIProcess/API/APINavigationClient.h:
376         (API::NavigationClient::didChangeBackForwardList):
377         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
378         * UIProcess/Cocoa/NavigationState.h:
379         * UIProcess/Cocoa/NavigationState.mm:
380         (WebKit::NavigationState::setNavigationDelegate):
381         (WebKit::NavigationState::NavigationClient::didFailToInitializePlugIn):
382         (WebKit::NavigationState::NavigationClient::didChangeBackForwardList):
383         (WebKit::NavigationState::NavigationClient::willPerformClientRedirect):
384         (WebKit::NavigationState::NavigationClient::didCancelClientRedirect):
385         (WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
386         (WebKit::NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace):
387         (WebKit::NavigationState::NavigationClient::processDidTerminate):
388         (WebKit::NavigationState::NavigationClient::processDidBecomeResponsive):
389         (WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive):
390         (WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
391         (WebKit::NavigationState::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame):
392         (WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
393         (WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
394         (WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
395         (WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
396         * UIProcess/WebPageProxy.cpp:
397         (WebKit::WebPageProxy::didChangeBackForwardList):
398
399 2017-10-05  Alex Christensen  <achristensen@webkit.org>
400
401         Add ObjC SPI with userInfo corresponding to WKPageNavigationClient's decidePolicyForNavigationAction, didStartProvisionalNavigation, and didFailNavigation
402         https://bugs.webkit.org/show_bug.cgi?id=177974
403         <rdar://problem/22888802>
404
405         Reviewed by Tim Horton.
406
407         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
408         * UIProcess/Cocoa/NavigationState.h:
409         * UIProcess/Cocoa/NavigationState.mm:
410         (WebKit::NavigationState::setNavigationDelegate):
411         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
412         (WebKit::NavigationState::NavigationClient::didStartProvisionalNavigation):
413         (WebKit::NavigationState::NavigationClient::didFailNavigationWithError):
414         * UIProcess/Cocoa/UIDelegate.mm:
415         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
416
417 2017-10-05  John Wilander  <wilander@apple.com>
418
419         Storage Access API: Web process should ask UI process for grant/deny
420         https://bugs.webkit.org/show_bug.cgi?id=176941
421         <rdar://problem/34440036>
422
423         Reviewed by Chris Dumez and Sam Weinig.
424
425         This patch adds infrastructure to let WebCore::Document call
426         WebKit::WebResourceLoadStatisticsStore and ask for storage
427         access on behalf of an iframe. The communication goes through
428         the ChromeClient since we might want to add a native prompt.
429         From the ChromeClient it continues to the WebPage which
430         messages the WebPageProxy. The WebPageProxy calls the
431         WebsiteDataStore which owns the WebResourceLoadStatisticsStore.
432         A uint64_t is used to match the right callback with the boolean
433         result.
434
435         * UIProcess/WebPageProxy.cpp:
436         (WebKit::WebPageProxy::requestStorageAccess):
437         * UIProcess/WebPageProxy.h:
438         * UIProcess/WebPageProxy.messages.in:
439         * UIProcess/WebResourceLoadStatisticsStore.cpp:
440         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
441         * UIProcess/WebResourceLoadStatisticsStore.h:
442         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
443         (WebKit::WebsiteDataStore::requestStorageAccess):
444         * UIProcess/WebsiteData/WebsiteDataStore.h:
445         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
446         (WebKit::WebChromeClient::requestStorageAccess):
447         * WebProcess/WebCoreSupport/WebChromeClient.h:
448         * WebProcess/WebPage/WebPage.cpp:
449         (WebKit::nextRequestStorageAccessContextId):
450         (WebKit::WebPage::requestStorageAccess):
451         (WebKit::WebPage::storageAccessResponse):
452         * WebProcess/WebPage/WebPage.h:
453         * WebProcess/WebPage/WebPage.messages.in:
454
455 2017-10-05  Chris Dumez  <cdumez@apple.com>
456
457         Drop unused parameters for CookiesStrategy::cookiesEnabled()
458         https://bugs.webkit.org/show_bug.cgi?id=177957
459
460         Reviewed by Alex Christensen.
461
462         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
463         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
464         * NetworkProcess/NetworkConnectionToWebProcess.h:
465         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
466         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
467         (WebKit::WebPlatformStrategies::cookiesEnabled):
468         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
469
470 2017-10-05  Tim Horton  <timothy_horton@apple.com>
471
472         Make progress toward properly-formed XPC services in the Mac CMake build
473         https://bugs.webkit.org/show_bug.cgi?id=177918
474
475         Reviewed by Alex Christensen.
476
477         * CMakeLists.txt:
478         * PlatformMac.cmake:
479         Turn on the storage process on Mac, and fix its build.
480         Move XPC services to Versions/A/XPCServices and add the toplevel
481         XPCServices as a symlink of that.
482         Run the XPC services' Info.plists through configure_file, and substitute
483         the important variables (most critically the bundle identifier).
484         Factor out the service setup so we don't keep duplicating it as it
485         gets more complicated.
486
487 2017-10-05  Andy Estes  <aestes@apple.com>
488
489         [Payment Request] Add a payment method that supports Apple Pay
490         https://bugs.webkit.org/show_bug.cgi?id=177850
491
492         Reviewed by Youenn Fablet.
493
494         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
495         (toShippingMethod): Converted the NSDecimalNumber amount to a string rather than an integer.
496         (WebKit::toDecimalNumber): used -decimalNumberWithString:locale: rather than
497         -initWithMantissa:exponent:isNegative: to create an NSDecimalNumber.
498         (WebKit::toPKPaymentSummaryItem):
499         (WebKit::toPKShippingMethod):
500
501 2017-10-05  Youenn Fablet  <youenn@apple.com>
502
503         Make LibWebRTCProvider port agnostic
504         https://bugs.webkit.org/show_bug.cgi?id=177747
505
506         Reviewed by Alex Christensen & Alex Garcia.
507
508         * WebProcess/Network/webrtc/LibWebRTCProvider.h: Making sure Mac/iOS provider creates the codec factories.
509
510 2017-10-04  Alex Christensen  <achristensen@webkit.org>
511
512         Stop linking with WebKitSystemInterface
513         https://bugs.webkit.org/show_bug.cgi?id=177915
514
515         Reviewed by Antti Koivisto.
516
517         * Configurations/DebugRelease.xcconfig:
518         * WebKit.xcodeproj/project.pbxproj:
519
520 2017-10-04  Alex Christensen  <achristensen@webkit.org>
521
522         Remove unnecessary includes of WebKitSystemInterface on Cocoa platforms
523         https://bugs.webkit.org/show_bug.cgi?id=177912
524
525         Reviewed by Saam Barati.
526
527         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
528         * NetworkProcess/mac/NetworkProcessMac.mm:
529         * NetworkProcess/mac/RemoteNetworkingContext.mm:
530         * Platform/IPC/mac/ConnectionMac.mm:
531         * Platform/mac/LayerHostingContext.mm:
532         * PluginProcess/mac/PluginProcessMac.mm:
533         * PluginProcess/mac/PluginProcessShim.mm:
534         * Shared/ios/ChildProcessIOS.mm:
535         * Shared/mac/ChildProcessMac.mm:
536         * Shared/mac/SandboxExtensionMac.mm:
537         * Shared/mac/WebCoreArgumentCodersMac.mm:
538         * Shared/mac/WebEventFactory.mm:
539         * StorageProcess/ios/StorageProcessIOS.mm:
540         * StorageProcess/mac/StorageProcessMac.mm:
541         * UIProcess/API/Cocoa/WKWebView.mm:
542         * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
543         * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
544         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
545         * UIProcess/Cocoa/WebViewImpl.mm:
546         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
547         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
548         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
549         * UIProcess/mac/PageClientImplMac.mm:
550         * UIProcess/mac/WKTextInputWindowController.mm:
551         * UIProcess/mac/WebContextMenuProxyMac.mm:
552         * UIProcess/mac/WebPopupMenuProxyMac.mm:
553         * UIProcess/mac/WindowServerConnection.mm:
554         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
555         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
556         * WebProcess/Plugins/PDF/PDFPlugin.mm:
557         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
558         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
559         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
560         * WebProcess/WebPage/ios/WebPageIOS.mm:
561         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
562         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
563         * WebProcess/WebPage/mac/WebPageMac.mm:
564         * WebProcess/cocoa/WebProcessCocoa.mm:
565
566 2017-10-04  Youenn Fablet  <youenn@apple.com>
567
568         rtc::PacketOptions should have its own IPC encoding/decoding routines
569         https://bugs.webkit.org/show_bug.cgi?id=177812
570
571         Reviewed by Alex Christensen.
572
573         Replacing rtc::PacketOptions IPC encoding/decoding from passing the structure as individual parameters to the structure as a parameter.
574         Introducing WebKit::RTCPacketOptions as a wrapper around it for which encode/decode routines are added.
575         Updating code using rtc::PacketOptions accordingly.
576
577         * NetworkProcess/webrtc/NetworkRTCSocket.cpp:
578         (WebKit::NetworkRTCSocket::sendTo):
579         * NetworkProcess/webrtc/NetworkRTCSocket.h:
580         * NetworkProcess/webrtc/NetworkRTCSocket.messages.in:
581         * Platform/IPC/Decoder.cpp:
582         (IPC::Decoder::operator>>):
583         (IPC::Decoder::decode):
584         * Platform/IPC/Decoder.h:
585         * Platform/IPC/Encoder.cpp:
586         (IPC::Encoder::encode):
587         * Platform/IPC/Encoder.h:
588         * Shared/RTCPacketOptions.cpp: Added.
589         (WebKit::RTCPacketOptions::encode const):
590         (WebKit::RTCPacketOptions::decode):
591         * Shared/RTCPacketOptions.h: Added.
592         * WebKit.xcodeproj/project.pbxproj:
593         * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
594         (WebKit::LibWebRTCSocket::SendTo):
595
596 2017-10-04  Don Olmstead  <don.olmstead@sony.com>
597
598         Include Pasteboard.h for all in WebCoreArgumentCoders
599         https://bugs.webkit.org/show_bug.cgi?id=177902
600
601         Reviewed by Alex Christensen.
602
603         * Shared/WebCoreArgumentCoders.cpp:
604
605 2017-10-04  David Kilzer  <ddkilzer@apple.com>
606
607         Remove unused variables in lambdas for network process cache
608         <https://webkit.org/b/177878>
609         <rdar://problem/34038482>
610
611         Reviewed by Tim Horton.
612
613         * NetworkProcess/cache/CacheStorageEngine.cpp:
614         (WebKit::CacheStorage::Engine::open):
615         (WebKit::CacheStorage::Engine::putRecords):
616         (WebKit::CacheStorage::Engine::deleteMatchingRecords):
617         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
618         (WebKit::CacheStorageEngineConnection::reference):
619         - Remove unused |this| from lambda captures.
620
621 2017-10-04  Stephan Szabo  <stephan.szabo@sony.com>
622
623         [WinCairo] add PLATFORM(WIN) configurations to config.h
624         https://bugs.webkit.org/show_bug.cgi?id=177846
625
626         Reviewed by Alex Christensen.
627
628         * config.h:
629
630 2017-10-04  Adrian Perez de Castro  <aperez@igalia.com>
631
632         [GTK] WebKit2GTK+ does not handle touchmove and touchend events correctly
633         https://bugs.webkit.org/show_bug.cgi?id=158531
634
635         Reviewed by Carlos Alberto Lopez Perez.
636
637         Do not bypass WebCore event handling when receiving touch events.
638
639         Based on a patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>.
640         Thanks to Carlos Garnacho <carlosg@gnome.org> for helping out reviewing the code.
641
642         * UIProcess/API/gtk/PageClientImpl.cpp:
643         (WebKit::PageClientImpl::doneWithTouchEvent): Make sure touchend reaches gesture controller if touchbegin evet got to it.
644         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
645         (webkitWebViewBaseTouchEvent): Do not invoke gesture controller directly by bypassing WebCore event handling.
646         * UIProcess/gtk/GestureController.cpp:
647         (WebKit::GestureController::reset): Added.
648         (WebKit::GestureController::handleEvent): Reset gesture controller when touchpadupdate/end is received without touchbegin.
649         (WebKit::GestureController::Gesture::reset): Added.
650         * UIProcess/gtk/GestureController.h:
651
652 2017-10-04  Michael Catanzaro  <mcatanzaro@igalia.com>
653
654         Unreviewed WPE build fix after r222837
655         https://bugs.webkit.org/show_bug.cgi?id=177449
656
657         * Shared/wpe/WebEventFactory.cpp:
658         (WebKit::wallTimeForEventTime):
659
660 2017-10-04  Ryosuke Niwa  <rniwa@webkit.org>
661
662         Use blob URL when pasting RTFD instead of overriding DocumentLoader
663         https://bugs.webkit.org/show_bug.cgi?id=177801
664         <rdar://problem/34542270>
665
666         Reviewed by Wenson Hsieh.
667
668         Fixed the assertion failure when RTFD content is empty.
669
670         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
671         (WebKit::WebPasteboardProxy::getPasteboardBufferForType):
672
673 2017-10-04  Michael Catanzaro  <mcatanzaro@igalia.com>
674
675         REGRESSION(r222392): [WPE][GTK] Many forms tests are failing due to broken event timestamps
676         https://bugs.webkit.org/show_bug.cgi?id=177449
677
678         Reviewed by Chris Dumez.
679
680         * Shared/wpe/WebEventFactory.cpp:
681         (WebKit::wallTimeForEventTime):
682
683 2017-10-03  Brent Fulgham  <bfulgham@apple.com>
684
685         Correct nullptr dereference during shutdown
686         https://bugs.webkit.org/show_bug.cgi?id=177845
687         <rdar://problem/33651405>
688
689         Reviewed by Chris Dumez.
690
691         It looks like the ResourceLoadStatisticsPersistentStorage destructor is calling code that attempts
692         to use member variables in its owning class (WebResourceLoadStatisticsStore). Since these may have
693         already been destroyed, they are in an invalid state when accessed.
694
695         * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
696         (WebKit::ResourceLoadStatisticsPersistentStorage::~ResourceLoadStatisticsPersistentStorage): Do not call
697         finishAllPendingWorkSynchronously() in the destructor, since it relies on the m_memoryStore to be
698         a reference to completely valid object.
699         * UIProcess/WebResourceLoadStatisticsStore.cpp:
700         (WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore): Instead, call
701         'finishAllPendingWorkSynchronously' here, when the object is still in a known valid state.
702
703 2017-10-03  Alex Christensen  <achristensen@webkit.org>
704
705         Moderize WebKit's back forward list code
706         https://bugs.webkit.org/show_bug.cgi?id=177843
707
708         Reviewed by Tim Horton.
709
710         Use Ref instead of RefPtr when possible.
711         Use references instead of pointers when possible.
712         Remove unnecessary null checks.
713         Reduce unnecessary Vector copying.
714
715         * Shared/SessionState.h:
716         * Shared/WebBackForwardListItem.h:
717         * UIProcess/API/APILoaderClient.h:
718         (API::LoaderClient::didChangeBackForwardList):
719         (API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
720         * UIProcess/API/C/WKPage.cpp:
721         (WKPageSetPageLoaderClient):
722         * UIProcess/WebBackForwardList.cpp:
723         (WebKit::WebBackForwardList::pageClosed):
724         (WebKit::WebBackForwardList::addItem):
725         (WebKit::WebBackForwardList::goToItem):
726         (WebKit::WebBackForwardList::currentItem const):
727         (WebKit::WebBackForwardList::backItem const):
728         (WebKit::WebBackForwardList::forwardItem const):
729         (WebKit::WebBackForwardList::itemAtIndex const):
730         (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit const):
731         (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit const):
732         (WebKit::WebBackForwardList::removeAllItems):
733         (WebKit::WebBackForwardList::clear):
734         (WebKit::WebBackForwardList::backForwardListState const):
735         (WebKit::WebBackForwardList::restoreFromState):
736         * UIProcess/WebBackForwardList.h:
737         * UIProcess/WebPageProxy.cpp:
738         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
739         (WebKit::WebPageProxy::initializeWebPage):
740         (WebKit::WebPageProxy::didChangeBackForwardList):
741         (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
742         (WebKit::WebPageProxy::backForwardGoToItem):
743         * UIProcess/WebPageProxy.h:
744         * UIProcess/WebProcessProxy.cpp:
745         (WebKit::WebProcessProxy::registerNewWebBackForwardListItem):
746         * UIProcess/WebProcessProxy.h:
747         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
748         (WebKit::WebBackForwardListProxy::itemAtIndex):
749
750 2017-10-03  Chris Dumez  <cdumez@apple.com>
751
752         SharedStringHashStore should support removing hashes
753         https://bugs.webkit.org/show_bug.cgi?id=177770
754
755         Reviewed by Alex Christensen.
756
757         SharedStringHashStore should support removing hashes. It currently only supports adding hashes or
758         clearing all of them, which is sufficient for the VisitedLinkStore but will not be for Service
759         Worker purposes.
760
761         * Shared/SharedStringHashStore.cpp:
762         (WebKit::SharedStringHashStore::SharedStringHashStore):
763         (WebKit::SharedStringHashStore::add):
764         (WebKit::SharedStringHashStore::remove):
765         (WebKit::SharedStringHashStore::contains):
766         (WebKit::SharedStringHashStore::clear):
767         (WebKit::SharedStringHashStore::resizeTable):
768         (WebKit::SharedStringHashStore::pendingOperationsTimerFired):
769         * Shared/SharedStringHashStore.h:
770         * Shared/SharedStringHashTable.cpp:
771         (WebKit::SharedStringHashTable::remove):
772         * Shared/SharedStringHashTable.h:
773         * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
774         * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
775         (-[_WKVisitedLinkStore containsVisitedLinkWithURL:]):
776         (-[_WKVisitedLinkStore removeVisitedLinkWithURL:]):
777         * UIProcess/VisitedLinkStore.cpp:
778         (WebKit::VisitedLinkStore::containsVisitedLinkHash):
779         (WebKit::VisitedLinkStore::removeVisitedLinkHash):
780         (WebKit::VisitedLinkStore::didUpdateSharedStringHashes):
781         * UIProcess/VisitedLinkStore.h:
782
783 2017-10-03  Alex Christensen  <achristensen@webkit.org>
784
785         Fix API tests after r222794.
786         https://bugs.webkit.org/show_bug.cgi?id=177825
787
788         * UIProcess/WebPageProxy.cpp:
789         (WebKit::WebPageProxy::willGoToBackForwardListItem):
790         Sometimes there's no navigation client.
791
792 2017-10-03  Alex Christensen  <achristensen@webkit.org>
793
794         Add ObjC equivalent of WKPageLoaderClient.pluginDidFail
795         https://bugs.webkit.org/show_bug.cgi?id=177787
796         <rdar://problem/22387633>
797
798         Reviewed by Tim Horton.
799
800         * UIProcess/API/APILoaderClient.h:
801         (API::LoaderClient::didFailToInitializePlugin):
802         * UIProcess/API/APINavigationClient.h:
803         (API::NavigationClient::canHandleDidFailToInitializePlugIn const):
804         (API::NavigationClient::didFailToInitializePlugIn):
805         * UIProcess/API/C/WKPage.cpp:
806         (WKPageSetPageLoaderClient):
807         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
808         * UIProcess/Cocoa/NavigationState.h:
809         * UIProcess/Cocoa/NavigationState.mm:
810         (WebKit::NavigationState::setNavigationDelegate):
811         (WebKit::NavigationState::NavigationClient::canHandleDidFailToInitializePlugIn const):
812         (WebKit::NavigationState::NavigationClient::didFailToInitializePlugIn):
813         * UIProcess/WebPageProxy.cpp:
814         (WebKit::WebPageProxy::didFailToInitializePlugin):
815
816 2017-10-03  Adrian Perez de Castro  <aperez@igalia.com>
817
818         [GTK] Prefer -webkit-system-font
819         https://bugs.webkit.org/show_bug.cgi?id=177814
820
821         Reviewed by Carlos Garcia Campos.
822
823         Use "font-family: -webkit-system-font" instead of "font: menu".
824
825         * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
826         (WebKit::RemoteInspectorProtocolHandler::handleRequest): Edited HTML snippet.
827
828 2017-10-03  Alex Christensen  <achristensen@webkit.org>
829
830         Add ObjC SPI equivalent to WKPageLoaderClient.willGoToBackForwardListItem
831         https://bugs.webkit.org/show_bug.cgi?id=177825
832         <rdar://problem/22387505>
833
834         Reviewed by Tim Horton.
835
836         * UIProcess/API/APILoaderClient.h:
837         (API::LoaderClient::willGoToBackForwardListItem):
838         * UIProcess/API/APINavigationClient.h:
839         (API::NavigationClient::canHandleWillGoToBackForwardListItem const):
840         (API::NavigationClient::willGoToBackForwardListItem):
841         * UIProcess/API/C/WKPage.cpp:
842         (WKPageSetPageLoaderClient):
843         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
844         * UIProcess/Cocoa/NavigationState.h:
845         * UIProcess/Cocoa/NavigationState.mm:
846         (WebKit::NavigationState::setNavigationDelegate):
847         (WebKit::NavigationState::NavigationClient::canHandleWillGoToBackForwardListItem const):
848         (WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):
849         * UIProcess/WebPageProxy.cpp:
850         (WebKit::WebPageProxy::willGoToBackForwardListItem):
851         * UIProcess/WebPageProxy.h:
852         * UIProcess/WebPageProxy.messages.in:
853         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
854         (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem const):
855
856 2017-10-03  Michael Catanzaro  <mcatanzaro@igalia.com>
857
858         REGRESSION(r222392): [WPE][GTK] Many forms tests are failing due to broken event timestamps
859         https://bugs.webkit.org/show_bug.cgi?id=177449
860
861         Reviewed by Chris Dumez.
862
863         * Shared/gtk/WebEventFactory.cpp:
864         (WebKit::WebEventFactory::createWebMouseEvent):
865         (WebKit::WebEventFactory::createWebWheelEvent):
866         (WebKit::WebEventFactory::createWebKeyboardEvent):
867         (WebKit::WebEventFactory::createWebTouchEvent):
868         * Shared/wpe/WebEventFactory.cpp:
869         (WebKit::wallTimeForEventTime):
870         (WebKit::WebEventFactory::createWebKeyboardEvent):
871         (WebKit::WebEventFactory::createWebMouseEvent):
872         (WebKit::WebEventFactory::createWebWheelEvent):
873         (WebKit::WebEventFactory::createWebTouchEvent):
874
875 2017-10-03  Carlos Garcia Campos  <cgarcia@igalia.com>
876
877         [GTK][WPE] WebProcess should run cleanup on quit to release resources
878         https://bugs.webkit.org/show_bug.cgi?id=168126
879
880         Reviewed by Michael Catanzaro.
881
882         Do not call exit on sync message send failure for GTK and WPE ports.
883
884         * WebProcess/WebProcess.cpp:
885         (WebKit::WebProcess::initializeConnection):
886
887 2017-10-02  Ryosuke Niwa  <rniwa@webkit.org>
888
889         Move more code into PasteboardCustomData
890         https://bugs.webkit.org/show_bug.cgi?id=177795
891
892         Reviewed by Wenson Hsieh.
893
894         Added the support for encoding and decoding the origin string in PasteboardCustomData.
895
896         * Shared/WebCoreArgumentCoders.cpp:
897         (IPC::ArgumentCoder<PasteboardCustomData>::encode):
898         (IPC::ArgumentCoder<PasteboardCustomData>::decode):
899
900 2017-10-02  Adrian Perez de Castro  <aperez@igalia.com>
901
902         [GTK] Do not hardcode font family in served remote inspector HTML snippets
903         https://bugs.webkit.org/show_bug.cgi?id=177742
904
905         Reviewed by Carlos Garcia Campos.
906
907         Instead of hardcoding Cantarell as the font used for the HTML snippets served
908         by the remote inspector handler, use "font: menu" to obtain the system UI
909         font, plus a "font-size" rule for adjusting the size.
910
911         * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
912         (WebKit::RemoteInspectorProtocolHandler::handleRequest): Change the
913         CSS rules in the served snippet.
914
915 2017-10-02  Joseph Pecoraro  <pecoraro@apple.com>
916
917         Web Inspector: Include Beacon and Ping requests in Network tab
918         https://bugs.webkit.org/show_bug.cgi?id=177641
919         <rdar://problem/33086839>
920
921         Reviewed by Chris Dumez.
922
923         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
924         (WebKit::NetworkConnectionToWebProcess::loadPing):
925         (WebKit::NetworkConnectionToWebProcess::didFinishPingLoad):
926         * NetworkProcess/NetworkConnectionToWebProcess.h:
927         * NetworkProcess/PingLoad.cpp:
928         (WebKit::PingLoad::PingLoad):
929         (WebKit::PingLoad::didFinish):
930         (WebKit::PingLoad::didReceiveResponseNetworkSession):
931         * NetworkProcess/PingLoad.h:
932         * WebProcess/Network/NetworkProcessConnection.cpp:
933         (WebKit::NetworkProcessConnection::didFinishPingLoad):
934         * WebProcess/Network/NetworkProcessConnection.h:
935         * WebProcess/Network/NetworkProcessConnection.messages.in:
936         * WebProcess/Network/WebLoaderStrategy.cpp:
937         (WebKit::WebLoaderStrategy::networkProcessCrashed):
938         (WebKit::WebLoaderStrategy::startPingLoad):
939         (WebKit::WebLoaderStrategy::didFinishPingLoad):
940         * WebProcess/Network/WebLoaderStrategy.h:
941         Pass an optional ResourceResponse back to the ping completion handler.
942
943 2017-10-02  Alex Christensen  <achristensen@webkit.org>
944
945         REGRESSION: API tests WebKit.ProcessDidTerminateRequestedByClient and WebKit.ProcessDidTerminateWithReasonCrash are timing out
946         https://bugs.webkit.org/show_bug.cgi?id=177764
947
948         Reviewed by Chris Dumez.
949
950         * UIProcess/API/C/WKPage.cpp:
951         (WKPageSetPageNavigationClient):
952         I shouldn't have reverted the A API telling the listener to continue if there's no client function.
953
954 2017-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
955
956         [WPE][GTK] Crash in webkit_web_resource_get_data_finish()
957         https://bugs.webkit.org/show_bug.cgi?id=177107
958
959         Reviewed by Michael Catanzaro.
960
961         Handle errors in webkit_web_resource_get_data() callback.
962
963         * UIProcess/API/glib/WebKitWebResource.cpp:
964         (resourceDataCallback):
965         (webkit_web_resource_get_data):
966
967 2017-10-02  Olivier Blin  <olivier.blin@softathome.com>
968
969         [WPE] Fix UIProcess build with GStreamer and without VIDEO
970         https://bugs.webkit.org/show_bug.cgi?id=177753
971
972         Reviewed by Michael Catanzaro.
973
974         GStreamer builds fail when WebAudio is enabled but VIDEO disabled.
975         This is the WPE counterpart of bug 153135.
976
977         * UIProcess/API/wpe/PageClientImpl.h:
978
979 2017-10-02  Alex Christensen  <achristensen@webkit.org>
980
981         Expose more WKPreferences SPI to match C SPI
982         https://bugs.webkit.org/show_bug.cgi?id=177697
983
984         * UIProcess/API/Cocoa/WKPreferences.mm:
985         (-[WKPreferences _javaEnabledForLocalFiles]):
986         (-[WKPreferences _setPlugInsEnabled:]): Deleted.
987         (-[WKPreferences _plugInsEnabled]): Deleted.
988         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
989         _javaEnabledForLocalFiles should return the correct value.
990         _plugInsEnabled has public API.  This SPI is not needed.
991
992 2017-10-02  Alex Christensen  <achristensen@webkit.org>
993
994         REGRESSION(r214201): WebProcess hangs during policy decisions
995         https://bugs.webkit.org/show_bug.cgi?id=177590
996         <rdar://problem/33362929>
997
998         Reviewed by Andy Estes.
999
1000         This is like r222431 but for trunk instead of a branch.
1001         It includes the same regression API test so I don't make the same mistake again.
1002
1003         * UIProcess/API/C/WKPage.cpp:
1004         (WKPageSetPageNavigationClient):
1005         * UIProcess/WebPageProxy.cpp:
1006         (WebKit::WebPageProxy::receivedPolicyDecision):
1007         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1008         (WebKit::WebPageProxy::decidePolicyForResponseSync):
1009         * UIProcess/WebPageProxy.h:
1010         * UIProcess/WebPageProxy.messages.in:
1011         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1012         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1013         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1014         (WebKit::WebFrameLoaderClient::applyToDocumentLoader):
1015         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1016         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1017         * WebProcess/WebPage/WebDocumentLoader.cpp:
1018         (WebKit::WebDocumentLoader::setNavigationID):
1019         * WebProcess/WebPage/WebFrame.cpp:
1020         (WebKit::WebFrame::setUpPolicyListener):
1021         (WebKit::WebFrame::invalidatePolicyListener):
1022         (WebKit::WebFrame::didReceivePolicyDecision):
1023         * WebProcess/WebPage/WebFrame.h:
1024         * WebProcess/WebPage/WebPage.cpp:
1025         (WebKit::WebPage::didReceivePolicyDecision):
1026         * WebProcess/WebPage/WebPage.h:
1027         * WebProcess/WebPage/WebPage.messages.in:
1028
1029 2017-10-02  Alex Christensen  <achristensen@webkit.org>
1030
1031         Remove unnecessary copy of SessionID in WebPageProxy
1032         https://bugs.webkit.org/show_bug.cgi?id=177702
1033
1034         Reviewed by Darin Adler.
1035
1036         * UIProcess/WebPageProxy.cpp:
1037         (WebKit::WebPageProxy::sessionID const):
1038         (WebKit::WebPageProxy::creationParameters):
1039         * UIProcess/WebPageProxy.h:
1040         (WebKit::WebPageProxy::sessionID const): Deleted.
1041
1042 2017-10-02  Alex Christensen  <achristensen@webkit.org>
1043
1044         Expose more WKPreferences SPI to match C SPI
1045         https://bugs.webkit.org/show_bug.cgi?id=177697
1046         <rdar://problem/24110556>
1047
1048         Reviewed by Darin Adler.
1049
1050         * UIProcess/API/Cocoa/WKPreferences.mm:
1051         (-[WKPreferences _setJavaEnabledForLocalFiles:]):
1052         (-[WKPreferences _javaEnabledForLocalFiles]):
1053         (-[WKPreferences _setCanvasUsesAcceleratedDrawing:]):
1054         (-[WKPreferences _canvasUsesAcceleratedDrawing]):
1055         (-[WKPreferences _setAcceleratedCompositingEnabled:]):
1056         (-[WKPreferences _acceleratedCompositingEnabled]):
1057         (-[WKPreferences _setDefaultTextEncodingName:]):
1058         (-[WKPreferences _defaultTextEncodingName]):
1059         (-[WKPreferences _setNeedsSiteSpecificQuirks:]):
1060         (-[WKPreferences _needsSiteSpecificQuirks]):
1061         (-[WKPreferences _setAuthorAndUserStylesEnabled:]):
1062         (-[WKPreferences _authorAndUserStylesEnabled]):
1063         (-[WKPreferences _setDOMTimersThrottlingEnabled:]):
1064         (-[WKPreferences _domTimersThrottlingEnabled]):
1065         (-[WKPreferences _setWebArchiveDebugModeEnabled:]):
1066         (-[WKPreferences _webArchiveDebugModeEnabled]):
1067         (-[WKPreferences _setLocalFileContentSniffingEnabled:]):
1068         (-[WKPreferences _localFileContentSniffingEnabled]):
1069         (-[WKPreferences _setUsesPageCache:]):
1070         (-[WKPreferences _usesPageCache]):
1071         (-[WKPreferences _setPageCacheSupportsPlugins:]):
1072         (-[WKPreferences _pageCacheSupportsPlugins]):
1073         (-[WKPreferences _setShouldPrintBackgrounds:]):
1074         (-[WKPreferences _shouldPrintBackgrounds]):
1075         (-[WKPreferences _setWebSecurityEnabled:]):
1076         (-[WKPreferences _webSecurityEnabled]):
1077         (-[WKPreferences _setUniversalAccessFromFileURLsAllowed:]):
1078         (-[WKPreferences _universalAccessFromFileURLsAllowed]):
1079         (-[WKPreferences _setAVFoundationEnabled:]):
1080         (-[WKPreferences _avFoundationEnabled]):
1081         (-[WKPreferences _setSuppressesIncrementalRendering:]):
1082         (-[WKPreferences _suppressesIncrementalRendering]):
1083         (-[WKPreferences _setAsynchronousPluginInitializationEnabled:]):
1084         (-[WKPreferences _asynchronousPluginInitializationEnabled]):
1085         (-[WKPreferences _setArtificialPluginInitializationDelayEnabled:]):
1086         (-[WKPreferences _artificialPluginInitializationDelayEnabled]):
1087         (-[WKPreferences _setCookieEnabled:]):
1088         (-[WKPreferences _cookieEnabled]):
1089         (-[WKPreferences _setPlugInSnapshottingEnabled:]):
1090         (-[WKPreferences _plugInSnapshottingEnabled]):
1091         (-[WKPreferences _setQTKitEnabled:]):
1092         (-[WKPreferences _qtKitEnabled]):
1093         (-[WKPreferences _setSubpixelCSSOMElementMetricsEnabled:]):
1094         (-[WKPreferences _subpixelCSSOMElementMetricsEnabled]):
1095         (-[WKPreferences _setMediaSourceEnabled:]):
1096         (-[WKPreferences _mediaSourceEnabled]):
1097         (-[WKPreferences _setViewGestureDebuggingEnabled:]):
1098         (-[WKPreferences _viewGestureDebuggingEnabled]):
1099         (-[WKPreferences _setCSSAnimationTriggersEnabled:]):
1100         (-[WKPreferences _cssAnimationTriggersEnabled]):
1101         (-[WKPreferences _setStandardFontFamily:]):
1102         (-[WKPreferences _standardFontFamily]):
1103         (-[WKPreferences _setNotificationsEnabled:]):
1104         (-[WKPreferences _notificationsEnabled]):
1105         (-[WKPreferences _setBackspaceKeyNavigationEnabled:]):
1106         (-[WKPreferences _backspaceKeyNavigationEnabled]):
1107         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1108
1109 2017-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1110
1111         [GTK][WPE] Enable interactive forms validation by default
1112         https://bugs.webkit.org/show_bug.cgi?id=177737
1113
1114         Reviewed by Michael Catanzaro.
1115
1116         It's currently disabled for no reason.
1117
1118         * Shared/WebPreferencesDefinitions.h:
1119
1120 2017-10-02  Michael Catanzaro  <mcatanzaro@igalia.com>
1121
1122         Remove ENABLE_CSS_REGIONS
1123         https://bugs.webkit.org/show_bug.cgi?id=177689
1124
1125         Reviewed by Darin Adler.
1126
1127         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
1128         (webkit_dom_element_get_webkit_region_overset):
1129         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.h:
1130         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
1131         (webkit_dom_element_get_webkit_region_overset): Deleted.
1132         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
1133
1134 2017-09-30  Darin Adler  <darin@apple.com>
1135
1136         Have IPC::Connection::Client objects consistently invalidate the connection when destroyed
1137         https://bugs.webkit.org/show_bug.cgi?id=177708
1138
1139         Reviewed by Anders Carlsson.
1140
1141         I ran into an intermittent crash when running regression tests. It looked like a connection
1142         client was being called after it was destroyed. I did an audit of the all the connection
1143         clients to make sure they all invalidate their connection before they are destroyed.
1144
1145         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1146         (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): Invalidate the
1147         connection since this object opened the connection. There is no obvious
1148         guarantee that the connection will already be invalid when this is destroyed.
1149         * StorageProcess/StorageToWebProcessConnection.cpp:
1150         (WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection): Ditto.
1151         * UIProcess/Plugins/PluginProcessProxy.cpp:
1152         (WebKit::PluginProcessProxy::~PluginProcessProxy): Ditto.
1153         * WebProcess/Network/NetworkProcessConnection.cpp:
1154         (WebKit::NetworkProcessConnection::~NetworkProcessConnection): Ditto.
1155         * WebProcess/Storage/WebToStorageProcessConnection.cpp:
1156         (WebKit::WebToStorageProcessConnection::~WebToStorageProcessConnection): Ditto.
1157
1158         * StorageProcess/StorageToWebProcessConnection.h: Derive privately rather than publicly
1159         from IPC::Connection::Client because we can, and this means we don't have to study quite
1160         as much code to understand how this is used as a connection client.
1161         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h: Ditto.
1162         * WebProcess/Storage/WebToStorageProcessConnection.h: Ditto.
1163         * WebProcess/WebPage/WebInspector.h: Ditto.
1164         * WebProcess/WebPage/WebInspectorUI.h: Ditto.
1165
1166         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1167         (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer): Added a comment about a
1168         reference cycle cycle leading to a leak that I believe exists here.
1169
1170 2017-09-29  Alex Christensen  <achristensen@webkit.org>
1171
1172         REGRESSION: ASSERTION FAILED: m_provisionalURL.isEmpty() in WebKit::FrameLoadState::didStartProvisionalLoad
1173         https://bugs.webkit.org/show_bug.cgi?id=177491
1174
1175         Reviewed by Andy Estes.
1176
1177         * WebProcess/WebPage/WebFrame.cpp:
1178         (WebKit::WebFrame::setUpWillSubmitFormListener):
1179         (WebKit::WebFrame::continueWillSubmitForm):
1180         (WebKit::WebFrame::invalidatePolicyListener):
1181         Speculative fix for a flaky assertion.
1182         Restore the clearing of the policy listeners we used to have when form submission was treated as a policy.
1183
1184 2017-09-29  Chris Dumez  <cdumez@apple.com>
1185
1186         http/tests/preconnect/link-rel-preconnect-https.html is flaky
1187         https://bugs.webkit.org/show_bug.cgi?id=177673
1188
1189         Reviewed by Alex Christensen.
1190
1191         Update PreconnectTask to query the client when a certificate needs to be
1192         validated. This allows WebKitTestRunner to ignore invalid certificates
1193         and this causes http/tests/preconnect/link-rel-preconnect-https.html
1194         to pass consistently.
1195
1196         To avoid duplicating code, PreconnectTask now uses NetworkLoad internally
1197         instead of using a NetworkDataTask directly.
1198
1199         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1200         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
1201         * NetworkProcess/NetworkConnectionToWebProcess.h:
1202         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1203         * NetworkProcess/NetworkLoad.h:
1204         * NetworkProcess/NetworkProcess.cpp:
1205         (WebKit::generateCanAuthenticateIdentifier):
1206         (WebKit::NetworkProcess::canAuthenticateAgainstProtectionSpace):
1207         (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
1208         (WebKit::NetworkProcess::preconnectTo):
1209         * NetworkProcess/NetworkProcess.h:
1210         * NetworkProcess/NetworkResourceLoadParameters.cpp:
1211         (WebKit::NetworkResourceLoadParameters::encode const):
1212         (WebKit::NetworkResourceLoadParameters::decode):
1213         * NetworkProcess/PreconnectTask.cpp:
1214         (WebKit::PreconnectTask::PreconnectTask):
1215         (WebKit::PreconnectTask::~PreconnectTask):
1216         (WebKit::PreconnectTask::willSendRedirectedRequest):
1217         (WebKit::PreconnectTask::didReceiveResponse):
1218         (WebKit::PreconnectTask::didReceiveBuffer):
1219         (WebKit::PreconnectTask::didFinishLoading):
1220         (WebKit::PreconnectTask::didFailLoading):
1221         (WebKit::PreconnectTask::didSendData):
1222         (WebKit::PreconnectTask::canAuthenticateAgainstProtectionSpaceAsync):
1223         (WebKit::PreconnectTask::continueCanAuthenticateAgainstProtectionSpace):
1224         (WebKit::PreconnectTask::frameID const):
1225         (WebKit::PreconnectTask::pageID const):
1226         * NetworkProcess/PreconnectTask.h:
1227         * WebProcess/Network/WebLoaderStrategy.cpp:
1228         (WebKit::WebLoaderStrategy::preconnectTo):
1229         * WebProcess/Network/WebLoaderStrategy.h:
1230
1231 2017-09-29  Alex Christensen  <achristensen@webkit.org>
1232
1233         Expose WebPreferences::webGLEnabled through WKPreferences
1234         https://bugs.webkit.org/show_bug.cgi?id=177692
1235         <rdar://problem/24110556>
1236
1237         Reviewed by Andy Estes.
1238
1239         * UIProcess/API/Cocoa/WKPreferences.mm:
1240         (-[WKPreferences _setWebGLEnabled:]):
1241         (-[WKPreferences _webGLEnabled]):
1242         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1243
1244 2017-09-29  Chris Dumez  <cdumez@apple.com>
1245
1246         [WK2][NETWORK_SESSION] Move some authentication-related code to avoid duplication
1247         https://bugs.webkit.org/show_bug.cgi?id=177667
1248
1249         Reviewed by Alex Christensen.
1250
1251         Move some authentication-related code to avoid duplication.
1252         This is a preparation code supporting Download authentication
1253         as Download uses a NSURLSessionDownloadTask and not a
1254         NetworkDataTask.
1255
1256         * NetworkProcess/NetworkDataTask.h:
1257         (WebKit::NetworkDataTask::setSuggestedFilename):
1258         * NetworkProcess/NetworkLoad.cpp:
1259         (WebKit::NetworkLoad::didReceiveChallenge):
1260         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
1261         * NetworkProcess/NetworkSession.cpp:
1262         (WebKit::NetworkSession::allowsSpecificHTTPSCertificateForHost):
1263         * NetworkProcess/NetworkSession.h:
1264         * NetworkProcess/PreconnectTask.cpp:
1265         (WebKit::PreconnectTask::didReceiveChallenge):
1266         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1267         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1268         (WebKit::NetworkDataTaskCocoa::didReceiveChallenge):
1269         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
1270         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1271         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1272         (WebKit::certificatesMatch):
1273         (WebKit::NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost):
1274
1275 2017-09-29  Alex Christensen  <achristensen@webkit.org>
1276
1277         Fix WKWebViewConfigurationPrivate after r222663
1278         https://bugs.webkit.org/show_bug.cgi?id=177644
1279
1280         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1281         (-[WKWebViewConfiguration init]):
1282         (-[WKWebViewConfiguration copyWithZone:]):
1283         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1284
1285 2017-09-29  Chris Dumez  <cdumez@apple.com>
1286
1287         Split some logic out of VisitedLinkStore and make it reusable
1288         https://bugs.webkit.org/show_bug.cgi?id=177575
1289
1290         Reviewed by Alex Christensen.
1291
1292         Split some logic out of VisitedLinkStore and make it reusable for other purposes than
1293         visited links and from other processes than the UIProcess.
1294
1295         The plan is to reuse the new SharedStringHashStore for Service Worker registration
1296         on StorageProcess side and querying on WebContent process side.
1297
1298         * CMakeLists.txt:
1299         * Shared/SharedStringHashStore.cpp: Added.
1300         (WebKit::nextPowerOf2):
1301         (WebKit::tableSizeForKeyCount):
1302         (WebKit::SharedStringHashStore::SharedStringHashStore):
1303         (WebKit::SharedStringHashStore::createSharedMemoryHandle):
1304         (WebKit::SharedStringHashStore::add):
1305         (WebKit::SharedStringHashStore::clear):
1306         (WebKit::SharedStringHashStore::resizeTable):
1307         (WebKit::SharedStringHashStore::pendingSharedStringHashesTimerFired):
1308         * Shared/SharedStringHashStore.h: Copied from Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.h.
1309         (WebKit::SharedStringHashStore::Client::~Client):
1310         (WebKit::SharedStringHashStore::isEmpty const):
1311         * Shared/SharedStringHashTable.cpp: Renamed from Source/WebKit/Shared/VisitedLinkTable.cpp.
1312         (WebKit::SharedStringHashTable::SharedStringHashTable):
1313         (WebKit::SharedStringHashTable::~SharedStringHashTable):
1314         (WebKit::SharedStringHashTable::setSharedMemory):
1315         (WebKit::SharedStringHashTable::add):
1316         (WebKit::SharedStringHashTable::contains const):
1317         (WebKit::SharedStringHashTable::clear):
1318         * Shared/SharedStringHashTable.h: Renamed from Source/WebKit/Shared/VisitedLinkTable.h.
1319         * UIProcess/API/C/WKContext.cpp:
1320         (WKContextAddVisitedLink):
1321         * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
1322         (-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
1323         * UIProcess/VisitedLinkStore.cpp:
1324         (WebKit::VisitedLinkStore::VisitedLinkStore):
1325         (WebKit::VisitedLinkStore::addProcess):
1326         (WebKit::VisitedLinkStore::addVisitedLinkHash):
1327         (WebKit::VisitedLinkStore::removeAll):
1328         (WebKit::VisitedLinkStore::addVisitedLinkHashFromPage):
1329         (WebKit::VisitedLinkStore::sendStoreHandleToProcess):
1330         (WebKit::VisitedLinkStore::didInvalidateSharedMemory):
1331         (WebKit::VisitedLinkStore::didAddSharedStringHashes):
1332         * UIProcess/VisitedLinkStore.h:
1333         * UIProcess/WebProcessPool.cpp:
1334         * UIProcess/WebProcessPool.h:
1335         * UIProcess/WebProcessProxy.h:
1336         * WebKit.xcodeproj/project.pbxproj:
1337         * WebProcess/WebPage/VisitedLinkTableController.cpp:
1338         (WebKit::VisitedLinkTableController::isLinkVisited):
1339         (WebKit::VisitedLinkTableController::addVisitedLink):
1340         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
1341         * WebProcess/WebPage/VisitedLinkTableController.h:
1342         * WebProcess/WebPage/VisitedLinkTableController.messages.in:
1343
1344 2017-09-28  Alex Christensen  <achristensen@webkit.org>
1345
1346         Add WKWebViewConfiguration SPI equivalent to WKPageConfigurationSetBackgroundCPULimit
1347         https://bugs.webkit.org/show_bug.cgi?id=177644
1348         <rdar://problem/34338698>
1349
1350         Reviewed by Geoffrey Garen.
1351
1352         WKPageConfigurationSetBackgroundCPULimit is a setter of a std::optional<double> with no accessor.
1353         It's never set to 0 in practice, so I guess the ObjC equivalent is a double that is zero or nonzero.
1354
1355         * UIProcess/API/Cocoa/WKWebView.mm:
1356         (-[WKWebView _initializeWithConfiguration:]):
1357         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1358         (-[WKWebViewConfiguration _setCPULimit:]):
1359         (-[WKWebViewConfiguration _cpuLimit]):
1360         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1361
1362 2017-09-28  Ryosuke Niwa  <rniwa@webkit.org>
1363
1364         Image pasting is not working on tineye.com / gmail.com / GitHub.com due to lack of support for DataTransfer.items
1365         https://bugs.webkit.org/show_bug.cgi?id=170449
1366         <rdar://problem/31432525>
1367
1368         Reviewed by Wenson Hsieh.
1369
1370         Add sandbox extensions for files in the pasteboard to make copying & pasting image files work.
1371         This is what we do for drag & drop but we should consider adding a mechanism to rekoke the extension in the future.
1372
1373         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
1374         (WebKit::WebPasteboardProxy::getPasteboardPathnamesForType): Add sandbox extensions to the pasted files.
1375         * UIProcess/WebPasteboardProxy.h:
1376         * UIProcess/WebPasteboardProxy.messages.in:
1377         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1378         (WebKit::WebPlatformStrategies::getPathnamesForType): Consume the sandbox tokens sent by the UI process permanently
1379         since WebCore will now create File objects for these pasted files.
1380
1381 2017-09-29  Wenson Hsieh  <wenson_hsieh@apple.com>
1382
1383         [iOS WK2] Implement -[WKContentView hasText] for compatibility with the UITextInput protocol
1384         https://bugs.webkit.org/show_bug.cgi?id=177662
1385         <rdar://problem/33410373>
1386
1387         Reviewed by Tim Horton.
1388
1389         Implements -[WKContentView hasText] by propagating a flag through post-layout editor state.
1390
1391         * Shared/EditorState.cpp:
1392         (WebKit::EditorState::PostLayoutData::encode const):
1393         (WebKit::EditorState::PostLayoutData::decode):
1394         * Shared/EditorState.h:
1395
1396         Add a new flag to EditorState indicating whether or not the current editable root containing the selection has
1397         any plain text. Add IPC support for this new flag.
1398
1399         * UIProcess/ios/WKContentViewInteraction.mm:
1400         (-[WKContentView hasText]):
1401         * WebProcess/WebPage/ios/WebPageIOS.mm:
1402         (WebKit::computeEditableRootHasContentAndPlainText):
1403
1404         Add a new helper to compute whether or not the editable root has any content, and any plain text. This
1405         is used as the last cached value for -hasText on WKContentView that we will deliver to UIKit. Some important
1406         things to note here:
1407         - If post layout data already indicates that we have selected some plain text, or that there is a plain text
1408           character near the selection, just set the flags to true and bail, since the editable root necessarily has
1409           content that is plain text.
1410         - If hasContent is false, don't even bother computing hasPlainText, because it must also be false.
1411         - Otherwise, use hasAnyPlainText to compute the value of hasPlainText, which is a faster variant of plainText.
1412         These optimizations help us avoid doing extra work at all when running Speedometer, apart from checking the
1413         values of a few PostLayoutData flags. This also fixes the value of hasContent, which was previously always false
1414         if we had a range selection rather than a caret selection even when the editable root has content, because the
1415         logic to compute the value of hasContent only existed in the branch where we have a caret selection.
1416
1417         (WebKit::WebPage::platformEditorState const):
1418
1419 2017-09-28  Timothy Horton  <timothy_horton@apple.com>
1420
1421         Fix the macOS CMake build
1422
1423         * CMakeLists.txt:
1424
1425 2017-09-28  Timothy Horton  <timothy_horton@apple.com>
1426
1427         Revise deployment target macros from r222620
1428
1429         Rubber-stamped by Wenson Hsieh.
1430
1431         * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
1432         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1433         (WebKit::PDFPlugin::pdfDocumentDidLoad):
1434
1435 2017-09-28  Aishwarya Nirmal  <anirmal@apple.com>
1436
1437         Request for PDF URL targets for specific pages, sections, etc.
1438         https://bugs.webkit.org/show_bug.cgi?id=177582
1439         <rdar://problem/5692679>
1440
1441         Reviewed by Tim Horton.
1442         
1443         This change sets the URL fragment for scroll anchoring in PDFs.
1444
1445         * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
1446         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1447         (WebKit::PDFPlugin::pdfDocumentDidLoad):
1448
1449 2017-09-28  Ross Kirsling  <ross.kirsling@sony.com>
1450
1451         [PAL] Move HysteresisActivity into PAL
1452         https://bugs.webkit.org/show_bug.cgi?id=177516
1453
1454         Reviewed by Alex Christensen.
1455
1456         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
1457         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
1458         * Shared/WebSQLiteDatabaseTracker.cpp:
1459         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
1460         (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
1461         * Shared/WebSQLiteDatabaseTracker.h:
1462         * WebProcess/WebPage/WebPage.cpp:
1463         (WebKit::m_pageScrolledHysteresis):
1464         (WebKit::m_userActivityHysteresis):
1465         (WebKit::WebPage::updateUserActivity):
1466         * WebProcess/WebPage/WebPage.h:
1467         * WebProcess/WebProcess.cpp:
1468         (WebKit::WebProcess::WebProcess):
1469         * WebProcess/WebProcess.h:
1470
1471 2017-09-28  Chris Dumez  <cdumez@apple.com>
1472
1473         Add support for <link rel=preconnect>
1474         https://bugs.webkit.org/show_bug.cgi?id=177474
1475         <rdar://problem/33141380>
1476
1477         Reviewed by Alex Christensen.
1478
1479         Add support for <link rel=preconnect>:
1480         - https://w3c.github.io/resource-hints/#preconnect
1481
1482         Also add corresponding native private API.
1483
1484         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1485         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
1486         (WebKit::NetworkConnectionToWebProcess::didFinishPreconnection):
1487         * NetworkProcess/NetworkConnectionToWebProcess.h:
1488         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1489         * NetworkProcess/NetworkDataTask.cpp:
1490         (WebKit::NetworkDataTask::create):
1491         * NetworkProcess/NetworkLoadParameters.h:
1492         * NetworkProcess/NetworkProcess.cpp:
1493         (WebKit::NetworkProcess::preconnectTo):
1494         * NetworkProcess/NetworkProcess.h:
1495         * NetworkProcess/NetworkProcess.messages.in:
1496         * NetworkProcess/PreconnectTask.cpp: Added.
1497         (WebKit::PreconnectTask::PreconnectTask):
1498         (WebKit::PreconnectTask::~PreconnectTask):
1499         (WebKit::PreconnectTask::willPerformHTTPRedirection):
1500         (WebKit::PreconnectTask::didReceiveChallenge):
1501         (WebKit::PreconnectTask::didReceiveResponseNetworkSession):
1502         (WebKit::PreconnectTask::didReceiveData):
1503         (WebKit::PreconnectTask::didCompleteWithError):
1504         (WebKit::PreconnectTask::didSendData):
1505         (WebKit::PreconnectTask::wasBlocked):
1506         (WebKit::PreconnectTask::cannotShowURL):
1507         (WebKit::PreconnectTask::didFinish):
1508         * NetworkProcess/PreconnectTask.h: Copied from Source/WebKit/NetworkProcess/NetworkLoadParameters.h.
1509         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1510         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1511         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
1512         * Shared/WebCoreArgumentCoders.h:
1513         * Shared/WebPreferencesDefinitions.h:
1514         * UIProcess/API/C/WKContext.cpp:
1515         (WKContextPreconnectToServer):
1516         * UIProcess/API/C/WKContextPrivate.h:
1517         * UIProcess/API/Cocoa/WKProcessPool.mm:
1518         (-[WKProcessPool _preconnectToServer:]):
1519         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1520         * UIProcess/WebProcessPool.cpp:
1521         (WebKit::WebProcessPool::preconnectToServer):
1522         * UIProcess/WebProcessPool.h:
1523         * WebKit.xcodeproj/project.pbxproj:
1524         * WebProcess/Network/NetworkProcessConnection.cpp:
1525         (WebKit::NetworkProcessConnection::didFinishPreconnection):
1526         * WebProcess/Network/NetworkProcessConnection.h:
1527         * WebProcess/Network/NetworkProcessConnection.messages.in:
1528         * WebProcess/Network/WebLoaderStrategy.cpp:
1529         (WebKit::WebLoaderStrategy::networkProcessCrashed):
1530         (WebKit::generateLoadIdentifier):
1531         (WebKit::WebLoaderStrategy::startPingLoad):
1532         (WebKit::WebLoaderStrategy::preconnectTo):
1533         (WebKit::WebLoaderStrategy::didFinishPreconnection):
1534         * WebProcess/Network/WebLoaderStrategy.h:
1535         * WebProcess/WebPage/WebPage.cpp:
1536         (WebKit::WebPage::updatePreferences):
1537         * config.h:
1538
1539 2017-09-28  Zan Dobersek  <zdobersek@igalia.com>
1540
1541         [Cairo] Remove the cairo_glyph_t complexity from GlyphBuffer
1542         https://bugs.webkit.org/show_bug.cgi?id=177598
1543
1544         Reviewed by Carlos Garcia Campos.
1545
1546         * Shared/API/c/cairo/WKImageCairo.cpp: Explicitly include the <cairo.h>
1547         header here now that it's not included in GlyphBuffer.h.
1548         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp: Ditto.
1549
1550 2017-09-27  Alex Christensen  <achristensen@webkit.org>
1551
1552         Add WKContentRuleList notify action type
1553         https://bugs.webkit.org/show_bug.cgi?id=177013
1554         <rdar://problem/31073936>
1555
1556         Reviewed by Darin Adler.
1557
1558         * NetworkProcess/PingLoad.cpp:
1559         (WebKit::PingLoad::processContentExtensionRulesForLoad):
1560         * UIProcess/API/APINavigationClient.h:
1561         (API::NavigationClient::contentRuleListNotification):
1562         * UIProcess/API/C/WKPage.cpp:
1563         (WKPageSetPageNavigationClient):
1564         * UIProcess/API/C/WKPageNavigationClient.h:
1565         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1566         * UIProcess/Cocoa/NavigationState.h:
1567         * UIProcess/Cocoa/NavigationState.mm:
1568         (WebKit::NavigationState::setNavigationDelegate):
1569         (WebKit::NavigationState::NavigationClient::contentRuleListNotification):
1570         * UIProcess/WebPageProxy.cpp:
1571         (WebKit::WebPageProxy::contentRuleListNotification):
1572         * UIProcess/WebPageProxy.h:
1573         * UIProcess/WebPageProxy.messages.in:
1574         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1575         (WebKit::WebChromeClient::contentRuleListNotification):
1576         * WebProcess/WebCoreSupport/WebChromeClient.h:
1577
1578 2017-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1579
1580         Drag event DataTransfer has unexpected types "dyn.ah62d4..."
1581         https://bugs.webkit.org/show_bug.cgi?id=172526
1582         <rdar://problem/32396081>
1583
1584         Reviewed by Ryosuke Niwa.
1585
1586         Add boilerplate plumbing and encoder/decoder support for new pasteboard codepaths. See WebCore ChangeLog for
1587         more details.
1588
1589         * Scripts/webkit/messages.py:
1590         (headers_for_type):
1591         * Shared/WebCoreArgumentCoders.cpp:
1592         (IPC::ArgumentCoder<PasteboardCustomData>::encode):
1593         (IPC::ArgumentCoder<PasteboardCustomData>::decode):
1594
1595         Add encoder/decoder support for PasteboardCustomData.
1596
1597         (IPC::ArgumentCoder<PasteboardWebContent>::encode):
1598         (IPC::ArgumentCoder<PasteboardWebContent>::decode):
1599
1600         Encode and decode dataInHTMLFormat.
1601
1602         * Shared/WebCoreArgumentCoders.h:
1603         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
1604         (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
1605         (WebKit::WebPasteboardProxy::writeCustomData):
1606         * UIProcess/WebPasteboardProxy.cpp:
1607         (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
1608         (WebKit::WebPasteboardProxy::writeCustomData):
1609         * UIProcess/WebPasteboardProxy.h:
1610         * UIProcess/WebPasteboardProxy.messages.in:
1611         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1612         (WebKit::WebPlatformStrategies::typesSafeForDOMToReadAndWrite):
1613         (WebKit::WebPlatformStrategies::writeCustomData):
1614         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1615
1616 2017-09-27  Alex Christensen  <achristensen@webkit.org>
1617
1618         Allow modern decoding of std::optional<T>
1619         https://bugs.webkit.org/show_bug.cgi?id=177519
1620
1621         Reviewed by Tim Horton.
1622
1623         * Platform/IPC/ArgumentCoders.h:
1624         (IPC::ArgumentCoder<std::optional<T>>::decode):
1625         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
1626         (IPC::ArgumentCoder<WebCore::PaymentAuthorizationResult>::decode):
1627         (IPC::ArgumentCoder<WebCore::PaymentError>::decode):
1628         (IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):
1629         (IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::decode):
1630         (IPC::ArgumentCoder<WebCore::ShippingMethodUpdate>::decode):
1631         * Shared/WebCoreArgumentCoders.cpp:
1632         (IPC::ArgumentCoder<IntPoint>::decode):
1633         (IPC::ArgumentCoder<IntSize>::decode):
1634         * Shared/WebCoreArgumentCoders.h:
1635         * Shared/WebPageCreationParameters.cpp:
1636         (WebKit::WebPageCreationParameters::decode):
1637
1638 2017-09-27  Commit Queue  <commit-queue@webkit.org>
1639
1640         Unreviewed, rolling out r222541.
1641         https://bugs.webkit.org/show_bug.cgi?id=177580
1642
1643         WebCore isn't ready for the asynchronousness this was going to
1644         enable (Requested by alexchristensen on #webkit).
1645
1646         Reverted changeset:
1647
1648         "Pass a completion handler instead of a
1649         WebFramePolicyListenerProxy during policy decisions"
1650         https://bugs.webkit.org/show_bug.cgi?id=177509
1651         http://trac.webkit.org/changeset/222541
1652
1653 2017-09-27  Tina Liu  <iting_liu@apple.com>
1654
1655         Expose setShouldSuppressFirstResponderChanges() as WKView SPI
1656         https://bugs.webkit.org/show_bug.cgi?id=177513
1657         <rdar://problem/34669220>
1658
1659         Reviewed by Wenson Hsieh.
1660
1661         We already have setShouldSuppressFirstResponderChanges() SPI on WKWebView; Expose it on
1662         WKView as well for clients using legacy WebKit.
1663
1664         * UIProcess/API/Cocoa/WKViewPrivate.h:
1665         * UIProcess/API/mac/WKView.mm:
1666         (-[WKView _setShouldSuppressFirstResponderChanges:]):
1667
1668 2017-09-27  Chris Dumez  <cdumez@apple.com>
1669
1670         Have PingLoad take a CompletionHandler
1671         https://bugs.webkit.org/show_bug.cgi?id=177549
1672
1673         Reviewed by Youenn Fablet.
1674
1675         Have PingLoad take a CompletionHandler instead of relying on it calling on method on the
1676         NetworkConnectionToWebProcess when it is done.
1677
1678         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1679         (WebKit::NetworkConnectionToWebProcess::loadPing):
1680         * NetworkProcess/PingLoad.cpp:
1681         (WebKit::PingLoad::PingLoad):
1682         (WebKit::PingLoad::didFinish):
1683         * NetworkProcess/PingLoad.h:
1684
1685 2017-09-26  Alex Christensen  <achristensen@webkit.org>
1686
1687         Pass a completion handler instead of a WebFramePolicyListenerProxy during policy decisions
1688         https://bugs.webkit.org/show_bug.cgi?id=177509
1689
1690         Reviewed by Tim Horton.
1691
1692         This makes WebFramePolicyListenerProxy just a wrapper around a WTF::Function which is only needed for the C and glib APIs.
1693         This is a step towards making WebPageProxy::DecidePolicyForResponseSync and WebPageProxy::DecidePolicyForNavigationAction asynchronous.
1694
1695         This patch has no change in behavior.
1696
1697         * CMakeLists.txt:
1698         * UIProcess/API/APINavigationClient.h:
1699         (API::NavigationClient::decidePolicyForNavigationAction):
1700         (API::NavigationClient::decidePolicyForNavigationResponse):
1701         * UIProcess/API/APIPolicyClient.h:
1702         (API::PolicyClient::decidePolicyForNavigationAction):
1703         (API::PolicyClient::decidePolicyForNewWindowAction):
1704         (API::PolicyClient::decidePolicyForResponse):
1705         * UIProcess/API/C/WKFramePolicyListener.cpp:
1706         (WKFramePolicyListenerUseWithPolicies):
1707         * UIProcess/API/C/WKPage.cpp:
1708         (WKPageSetPagePolicyClient):
1709         (WKPageSetPageNavigationClient):
1710         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1711         * UIProcess/API/glib/WebKitPolicyClient.cpp:
1712         * UIProcess/Automation/WebAutomationSession.cpp:
1713         * UIProcess/Cocoa/NavigationState.h:
1714         * UIProcess/Cocoa/NavigationState.mm:
1715         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1716         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
1717         * UIProcess/Cocoa/WebViewImpl.mm:
1718         * UIProcess/RemoteWebInspectorProxy.cpp:
1719         * UIProcess/WebFormSubmissionListenerProxy.h:
1720         * UIProcess/WebFrameListenerProxy.cpp: Removed.
1721         * UIProcess/WebFrameListenerProxy.h: Removed.
1722         * UIProcess/WebFramePolicyListenerProxy.cpp:
1723         (WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
1724         (WebKit::WebFramePolicyListenerProxy::~WebFramePolicyListenerProxy):
1725         (WebKit::WebFramePolicyListenerProxy::create):
1726         (WebKit::WebFramePolicyListenerProxy::use):
1727         (WebKit::WebFramePolicyListenerProxy::download):
1728         (WebKit::WebFramePolicyListenerProxy::ignore):
1729         * UIProcess/WebFramePolicyListenerProxy.h:
1730         (WebKit::WebFramePolicyListenerProxy::create): Deleted.
1731         (): Deleted.
1732         (WebKit::WebFramePolicyListenerProxy::operator new): Deleted.
1733         * UIProcess/WebFrameProxy.cpp:
1734         (WebKit::WebFrameProxy::webProcessWillShutDown):
1735         (WebKit::WebFrameProxy::receivedPolicyDecision): Deleted.
1736         (WebKit::WebFrameProxy::setUpPolicyListenerProxy): Deleted.
1737         * UIProcess/WebFrameProxy.h:
1738         * UIProcess/WebInspectorProxy.cpp:
1739         * UIProcess/WebPageProxy.cpp:
1740         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1741         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1742         (WebKit::WebPageProxy::decidePolicyForResponseSync):
1743         (WebKit::WebPageProxy::receivedPolicyDecision): Deleted.
1744         (WebKit::WebPageProxy::decidePolicyForResponse): Deleted.
1745         * UIProcess/WebPageProxy.h:
1746         * UIProcess/mac/ViewGestureControllerMac.mm:
1747         * WebKit.xcodeproj/project.pbxproj:
1748
1749 2017-09-26  Brian Burg  <bburg@apple.com>
1750
1751         Web Automation: overflow:hidden elements with no children are mistakenly reported as not visible
1752         https://bugs.webkit.org/show_bug.cgi?id=177514
1753         <rdar://problem/31936291>
1754
1755         Reviewed by Joseph Pecoraro.
1756
1757         * UIProcess/Automation/atoms/ElementDisplayed.js:
1758         (isShown.isElementSubtreeHiddenByOverflow):
1759         Array.prototype.every returns true when passed an empty list, so we need
1760         to check for the case where the element has no children and return 'false'.
1761
1762 2017-09-26  Youenn Fablet  <youenn@apple.com>
1763
1764         [Cocoa] Add a modern WKPreferences switch to disable WebRTC
1765         https://bugs.webkit.org/show_bug.cgi?id=176638
1766         <rdar://problem/34335158>
1767
1768         Reviewed by Alex Christensen.
1769
1770         * UIProcess/API/Cocoa/WKPreferences.mm:
1771         (-[WKPreferences _peerConnectionEnabled]):
1772         (-[WKPreferences _setPeerConnectionEnabled:]):
1773         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1774
1775 2017-09-26  Brent Fulgham  <bfulgham@apple.com>
1776
1777         Harden our access to the vector of URL schemes.
1778         https://bugs.webkit.org/show_bug.cgi?id=177470
1779         <rdar://problem/33881522>
1780
1781         Reviewed by Chris Dumez.
1782
1783         Instead of asserting, use MESSAGE_CHECK so that we actually refuse to access an invalid iterator.
1784
1785         * UIProcess/WebPageProxy.cpp:
1786         (WebKit::WebPageProxy::startURLSchemeTask):
1787         (WebKit::WebPageProxy::stopURLSchemeTask):
1788
1789 2017-09-26  Jer Noble  <jer.noble@apple.com>
1790
1791         Thrown ObjC exception when right clicking on <img> containing mp4 link
1792         https://bugs.webkit.org/show_bug.cgi?id=177370
1793
1794         Reviewed by Darin Adler.
1795
1796         Creating a NSImage from mp4 data will fail and return nil; do a nil-check before attempting
1797         to put the results into a NSMutableArray.
1798
1799         * UIProcess/mac/WebContextMenuProxyMac.mm:
1800         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
1801
1802 2017-09-26  Brian Burg  <bburg@apple.com>
1803
1804         Web Automation: add commands to get and set user permissions for pages in an automation session
1805         https://bugs.webkit.org/show_bug.cgi?id=177405
1806         <rdar://problem/34493846>
1807
1808         Reviewed by Joseph Pecoraro.
1809
1810         To test some Web APIs via WebDriver, it needs to be possible to simulate a user accepting or
1811         denying requests for elevated permissions, such as getUserMedia() or geolocation.
1812
1813         This patch adds a generic way for a test to configure the automation session's
1814         simulated user action that will happen every time a specific permission is requested.
1815         A test can set a "session permission", trigger the permission request via Web API,
1816         and then verify that the page behaves correctly when the user accepted or denied the request.
1817
1818         A proposal will follow shortly to expose this functionality via a new REST API endpoint.
1819
1820         * UIProcess/Automation/Automation.json: Add get/set commands.
1821
1822         * UIProcess/Automation/WebAutomationSession.cpp:
1823         (WebKit::WebAutomationSession::getSessionPermissions):
1824         (WebKit::WebAutomationSession::setSessionPermissions):
1825         For now, store the permission value in a member of the session. The getUserMedia
1826         permission only needs a bool, but there is no reason we couldn't use more complicated
1827         values for permissions (i.e., strings, numbers, arrays, objects) someday.
1828
1829         (WebKit::WebAutomationSession::shouldAllowGetUserMediaForPage const):
1830         Expose the specific decision to be taken based on whether the request is allowed or denied.
1831
1832         * UIProcess/Automation/WebAutomationSession.h:
1833         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1834         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1835         If the page is under automation, then simulate the user action according to the
1836         current values of permissions set for the session.
1837
1838 2017-09-25  Alex Christensen  <achristensen@webkit.org>
1839
1840         Make PolicyAction an encodable enum class
1841         https://bugs.webkit.org/show_bug.cgi?id=177480
1842
1843         Reviewed by Antti Koivisto.
1844
1845         * NetworkProcess/Downloads/DownloadManager.cpp:
1846         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
1847         (WebKit::DownloadManager::cancelDownload):
1848         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
1849         (WebKit::NetworkCORSPreflightChecker::didReceiveResponseNetworkSession):
1850         * NetworkProcess/NetworkDataTask.cpp:
1851         (WebKit::NetworkDataTask::didReceiveResponse):
1852         * NetworkProcess/NetworkDataTaskBlob.cpp:
1853         (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
1854         * NetworkProcess/NetworkLoad.cpp:
1855         (WebKit::NetworkLoad::~NetworkLoad):
1856         (WebKit::NetworkLoad::continueDidReceiveResponse):
1857         (WebKit::NetworkLoad::notifyDidReceiveResponse):
1858         * NetworkProcess/PingLoad.cpp:
1859         (WebKit::PingLoad::didReceiveResponseNetworkSession):
1860         * NetworkProcess/capture/NetworkDataTaskReplay.cpp:
1861         (WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):
1862         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1863         (toNSURLSessionResponseDisposition):
1864         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1865         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
1866         * Scripts/webkit/messages.py:
1867         (headers_for_type):
1868         * UIProcess/WebFormSubmissionListenerProxy.h:
1869         * UIProcess/WebFrameListenerProxy.h:
1870         (WebKit::WebFrameListenerProxy::navigation): Deleted.
1871         * UIProcess/WebFramePolicyListenerProxy.cpp:
1872         (WebKit::WebFramePolicyListenerProxy::use):
1873         (WebKit::WebFramePolicyListenerProxy::download):
1874         (WebKit::WebFramePolicyListenerProxy::ignore):
1875         * UIProcess/WebPageProxy.cpp:
1876         (WebKit::WebPageProxy::receivedPolicyDecision):
1877         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1878         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1879         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1880         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1881         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1882         * WebProcess/WebPage/WebFrame.cpp:
1883         (WebKit::WebFrame::invalidatePolicyListener):
1884         * WebProcess/WebPage/WebPage.cpp:
1885         (WebKit::WebPage::didReceivePolicyDecision):
1886         * WebProcess/WebPage/WebPage.h:
1887         * WebProcess/WebPage/WebPage.messages.in:
1888
1889 2017-09-25  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
1890
1891         [WinCairo] Share default value of font family preferences among non-cocoa builds
1892         https://bugs.webkit.org/show_bug.cgi?id=177479
1893
1894         Reviewed by Yusuke Suzuki.
1895
1896         * Shared/WebPreferencesDefinitions.h:
1897
1898 2017-09-25  Frederik Riedel  <riedel@apple.com>
1899
1900         Expose way to set values of classified form controls as {Legacy WebKit, WebKit} SPI
1901         https://bugs.webkit.org/show_bug.cgi?id=174394
1902         <rdar://problem/33183504>
1903
1904         Reviewed by Ryosuke Niwa.
1905
1906         * Platform/spi/ios/UIKitSPI.h:
1907         * Shared/AssistedNodeInformation.cpp:
1908         (WebKit::AssistedNodeInformation::encode const):
1909         Encodes additional node information, including if the node is part of a login screen.
1910         (WebKit::AssistedNodeInformation::decode):
1911         Decodes the additional assisted node information.
1912         * Shared/AssistedNodeInformation.h:
1913         * UIProcess/WebPageProxy.h:
1914         * UIProcess/ios/WKContentView.mm:
1915         (-[WKContentView acceptsAutofilledLoginCredentials]):
1916         Determines if the WKContentView shows a login screen.
1917         (-[WKContentView representingPageUrl]):
1918         Returns the URL of the currently displayed web page.
1919         * UIProcess/ios/WKContentViewInteraction.mm:
1920         (-[WKContentView insertTextSuggestion:]):
1921         Inserts the login credentials into the Web View.
1922         * UIProcess/ios/WebPageProxyIOS.mm:
1923         (WebKit::WebPageProxy::startAssistingNode):
1924         Transfer the additional assistednode information (acceptsAutofilledLoginCredentials and representingPageUrl).
1925         (WebKit::WebPageProxy::acceptsAutofilledLoginCredentials):
1926         Returns if the Web View shows a login screen.
1927         (WebKit::WebPageProxy::representingPageUrl):
1928         Returns the Web View's URL.
1929         (WebKit::WebPageProxy::autofillLoginCredentials):
1930         Insert the credentials into the Web View.
1931         * WebProcess/WebPage/WebPage.h:
1932         * WebProcess/WebPage/WebPage.messages.in:
1933         * WebProcess/WebPage/ios/WebPageIOS.mm:
1934         (WebKit::WebPage::getAssistedNodeInformation): Transports the information if the currently
1935         highlighted node accepts autofilled login credentials.
1936         (WebKit::WebPage::autofillLoginCredentials): Fills the login credentials into the
1937         WebPage.
1938
1939 2017-09-25  Youenn Fablet  <youenn@apple.com>
1940
1941         WebRTC video does not resume receiving when switching back to Safari 11 on iOS
1942         https://bugs.webkit.org/show_bug.cgi?id=175472
1943         <rdar://problem/33860863>
1944
1945         Reviewed by Darin Adler.
1946
1947         Notifying LibWebRTC of backgrounding/foregrouding.
1948
1949         * WebProcess/WebPage/ios/WebPageIOS.mm:
1950         (WebKit::WebPage::applicationDidEnterBackground):
1951         (WebKit::WebPage::applicationWillEnterForeground):
1952
1953 2017-09-25  Sam Weinig  <sam@webkit.org>
1954
1955         Remove unused EditorClient functions
1956         https://bugs.webkit.org/show_bug.cgi?id=177463
1957
1958         Reviewed by Alex Christensen.
1959
1960         Remove unused EditorClient functions.
1961
1962         * WebProcess/WebCoreSupport/WebEditorClient.h:
1963         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
1964         (WebKit::WebEditorClient::canonicalizeURL): Deleted.
1965         (WebKit::WebEditorClient::canonicalizeURLString): Deleted.
1966         (WebKit::WebEditorClient::writeDataToPasteboard): Deleted.
1967         (WebKit::WebEditorClient::supportedPasteboardTypesForCurrentSelection): Deleted.
1968         (WebKit::WebEditorClient::readDataFromPasteboard): Deleted.
1969         (WebKit::WebEditorClient::pasteboardChangeCount): Deleted.
1970         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1971         (WebKit::WebEditorClient::canonicalizeURL): Deleted.
1972         (WebKit::WebEditorClient::canonicalizeURLString): Deleted.
1973
1974 2017-09-25  Alex Christensen  <achristensen@webkit.org>
1975
1976         Make Attribute an enum class
1977         https://bugs.webkit.org/show_bug.cgi?id=177414
1978
1979         Reviewed by Yusuke Suzuki.
1980
1981         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1982         (WebKit::JSNPObject::getOwnPropertySlot):
1983
1984 2017-09-25  Alex Christensen  <achristensen@webkit.org>
1985
1986         Stop using PolicyCallback
1987         https://bugs.webkit.org/show_bug.cgi?id=176088
1988
1989         Reviewed by Andy Estes.
1990
1991         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1992         * WebProcess/WebPage/WebFrame.cpp:
1993         (WebKit::WebFrame::invalidatePolicyListener):
1994         * WebProcess/WebPage/WebFrame.h:
1995         * WebProcess/WebPage/WebInspector.cpp:
1996
1997 2017-09-25  Chris Dumez  <cdumez@apple.com>
1998
1999         [WK2] Add API to query if a download was user-initiated
2000         https://bugs.webkit.org/show_bug.cgi?id=177435
2001         <rdar://problem/34498422>
2002
2003         Reviewed by Alex Christensen.
2004
2005         Add C and Cocoa private API to query if a download was user-initiated.
2006
2007         For clarity, we now construct navigation object for subframe loads
2008         as well (we used to do so only for main frame loads). This allows us
2009         to store the user-intiated flag and the redirect chain on the navigation
2010         object instead of the WebFrameProxy.
2011
2012         * UIProcess/API/APINavigation.cpp:
2013         (API::Navigation::Navigation):
2014         (API::Navigation::appendRedirectionURL):
2015         * UIProcess/API/APINavigation.h:
2016         (API::Navigation::takeRedirectChain):
2017         (API::Navigation::setWasUserInitiated):
2018         (API::Navigation::wasUserInitiated const):
2019         * UIProcess/API/C/WKDownload.cpp:
2020         (WKDownloadGetWasUserInitiated):
2021         * UIProcess/API/C/WKDownload.h:
2022         * UIProcess/API/Cocoa/_WKDownload.h:
2023         * UIProcess/API/Cocoa/_WKDownload.mm:
2024         (-[_WKDownload wasUserInitiated]):
2025         * UIProcess/Downloads/DownloadProxy.h:
2026         (WebKit::DownloadProxy::setWasUserInitiated):
2027         (WebKit::DownloadProxy::wasUserInitiated const):
2028         * UIProcess/WebFrameProxy.cpp:
2029         (WebKit::WebFrameProxy::didStartProvisionalLoad):
2030         (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
2031         (WebKit::WebFrameProxy::didFailProvisionalLoad):
2032         (WebKit::WebFrameProxy::didFinishLoad):
2033         (WebKit::WebFrameProxy::didFailLoad):
2034         * UIProcess/WebFrameProxy.h:
2035         (WebKit::WebFrameProxy::title const):
2036         * UIProcess/WebPageProxy.cpp:
2037         (WebKit::WebPageProxy::receivedPolicyDecision):
2038         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
2039         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2040         (WebKit::WebPageProxy::decidePolicyForResponse):
2041         (WebKit::WebPageProxy::decidePolicyForResponseSync):
2042         * UIProcess/WebPageProxy.h:
2043         * UIProcess/WebPageProxy.messages.in:
2044         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2045         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2046
2047 2017-09-25  Chris Dumez  <cdumez@apple.com>
2048
2049         Make StoredCredentials an enum class and rename its header
2050         https://bugs.webkit.org/show_bug.cgi?id=177455
2051
2052         Reviewed by Youenn Fablet.
2053
2054         Make StoredCredentials an enum class and rename its header for clarity. This was error-prone because 0 meant
2055         "allow" and and 1 meant "do not allow". It was trivial to convert it to a boolean by mistake and get the
2056         opposite behavior.
2057
2058         * NetworkProcess/Downloads/DownloadManager.cpp:
2059         (WebKit::DownloadManager::startDownload):
2060         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
2061         (WebKit::NetworkCORSPreflightChecker::didCompleteWithError):
2062         * NetworkProcess/NetworkCORSPreflightChecker.h:
2063         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2064         (WebKit::NetworkConnectionToWebProcess::loadPing):
2065         * NetworkProcess/NetworkDataTask.cpp:
2066         (WebKit::NetworkDataTask::create):
2067         (WebKit::NetworkDataTask::NetworkDataTask):
2068         * NetworkProcess/NetworkDataTask.h:
2069         * NetworkProcess/NetworkDataTaskBlob.cpp:
2070         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
2071         * NetworkProcess/NetworkLoad.cpp:
2072         (WebKit::NetworkLoad::shouldUseCredentialStorage):
2073         * NetworkProcess/NetworkLoadParameters.h:
2074         * NetworkProcess/NetworkResourceLoadParameters.cpp:
2075         (WebKit::NetworkResourceLoadParameters::encode const):
2076         (WebKit::NetworkResourceLoadParameters::decode):
2077         * NetworkProcess/PingLoad.cpp:
2078         (WebKit::PingLoad::willPerformHTTPRedirection):
2079         (WebKit::PingLoad::makeCrossOriginAccessRequest):
2080         (WebKit::PingLoad::makeSimpleCrossOriginAccessRequest):
2081         (WebKit::PingLoad::makeCrossOriginAccessRequestWithPreflight):
2082         (WebKit::PingLoad::preflightSuccess):
2083         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
2084         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
2085         * NetworkProcess/capture/NetworkDataTaskReplay.cpp:
2086         (WebKit::NetworkCapture::NetworkDataTaskReplay::NetworkDataTaskReplay):
2087         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
2088         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2089         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
2090         (WebKit::NetworkDataTaskCocoa::~NetworkDataTaskCocoa):
2091         (WebKit::NetworkDataTaskCocoa::tryPasswordBasedAuthentication):
2092         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
2093         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2094         (-[WKNetworkSessionDelegate existingTask:]):
2095         (WebKit::NetworkSessionCocoa::dataTaskForIdentifier):
2096         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2097         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
2098         (WebKit::NetworkDataTaskSoup::createRequest):
2099         (WebKit::NetworkDataTaskSoup::authenticate):
2100         (WebKit::NetworkDataTaskSoup::continueAuthenticate):
2101         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
2102         * NetworkProcess/soup/NetworkDataTaskSoup.h:
2103         * WebProcess/Network/WebLoaderStrategy.cpp:
2104         (WebKit::WebLoaderStrategy::scheduleLoad):
2105         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
2106         (WebKit::WebLoaderStrategy::startPingLoad):
2107         * WebProcess/Network/WebLoaderStrategy.h:
2108
2109 2017-09-25  Sam Weinig  <sam@webkit.org>
2110
2111         Remove unnecessary userVisibleString EditorClient function
2112         https://bugs.webkit.org/show_bug.cgi?id=177456
2113
2114         Reviewed by Dan Bernstein.
2115
2116         * WebProcess/WebCoreSupport/WebEditorClient.h:
2117         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2118         (WebKit::WebEditorClient::userVisibleString): Deleted.
2119         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2120         (WebKit::WebEditorClient::userVisibleString): Deleted.
2121
2122             Remove userVisibleString client function.
2123
2124 2017-09-25  Commit Queue  <commit-queue@webkit.org>
2125
2126         Unreviewed, rolling out r222455.
2127         https://bugs.webkit.org/show_bug.cgi?id=177460
2128
2129         broke iOS build (Requested by alexchristensen on #webkit).
2130
2131         Reverted changeset:
2132
2133         "Add WKContentRuleList notify action type"
2134         https://bugs.webkit.org/show_bug.cgi?id=177013
2135         http://trac.webkit.org/changeset/222455
2136
2137 2017-09-25  Alex Christensen  <achristensen@webkit.org>
2138
2139         Separate form submission from PolicyChecker infrastructure
2140         https://bugs.webkit.org/show_bug.cgi?id=177396
2141
2142         Reviewed by Geoffrey Garen.
2143
2144         * UIProcess/API/APIFormClient.h:
2145         (API::FormClient::willSubmitForm):
2146         * UIProcess/API/Cocoa/WKWebView.mm:
2147         (-[WKWebView _setInputDelegate:]):
2148         * UIProcess/WebFormClient.cpp:
2149         (WebKit::WebFormClient::willSubmitForm):
2150         * UIProcess/WebFormClient.h:
2151         * UIProcess/WebFormSubmissionListenerProxy.cpp:
2152         (WebKit::WebFormSubmissionListenerProxy::continueSubmission):
2153         (WebKit::WebFormSubmissionListenerProxy::WebFormSubmissionListenerProxy): Deleted.
2154         * UIProcess/WebFormSubmissionListenerProxy.h:
2155         (WebKit::WebFormSubmissionListenerProxy::create):
2156         (WebKit::WebFormSubmissionListenerProxy::WebFormSubmissionListenerProxy):
2157         (): Deleted.
2158         (WebKit::WebFormSubmissionListenerProxy::operator new): Deleted.
2159         * UIProcess/WebFrameProxy.cpp:
2160         (WebKit::WebFrameProxy::setUpFormSubmissionListenerProxy): Deleted.
2161         * UIProcess/WebFrameProxy.h:
2162         * UIProcess/WebPageProxy.cpp:
2163         (WebKit::WebPageProxy::willSubmitForm):
2164         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2165         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2166         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
2167         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2168         * WebProcess/WebPage/WebFrame.cpp:
2169         (WebKit::WebFrame::setUpWillSubmitFormListener):
2170         (WebKit::WebFrame::continueWillSubmitForm):
2171         * WebProcess/WebPage/WebFrame.h:
2172         * WebProcess/WebPage/WebPage.cpp:
2173         (WebKit::WebPage::continueWillSubmitForm):
2174         * WebProcess/WebPage/WebPage.h:
2175         * WebProcess/WebPage/WebPage.messages.in:
2176
2177 2017-09-25  Alex Christensen  <achristensen@webkit.org>
2178
2179         Add WKContentRuleList notify action type
2180         https://bugs.webkit.org/show_bug.cgi?id=177013
2181         <rdar://problem/31073936>
2182
2183         Reviewed by Darin Adler.
2184
2185         * NetworkProcess/PingLoad.cpp:
2186         (WebKit::PingLoad::processContentExtensionRulesForLoad):
2187         * UIProcess/API/APINavigationClient.h:
2188         (API::NavigationClient::contentRuleListNotification):
2189         * UIProcess/API/C/WKPage.cpp:
2190         (WKPageSetPageNavigationClient):
2191         * UIProcess/API/C/WKPageNavigationClient.h:
2192         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2193         * UIProcess/Cocoa/NavigationState.h:
2194         * UIProcess/Cocoa/NavigationState.mm:
2195         (WebKit::NavigationState::setNavigationDelegate):
2196         (WebKit::NavigationState::NavigationClient::contentRuleListNotification):
2197         * UIProcess/WebPageProxy.cpp:
2198         (WebKit::WebPageProxy::contentRuleListNotification):
2199         * UIProcess/WebPageProxy.h:
2200         * UIProcess/WebPageProxy.messages.in:
2201         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2202         (WebKit::WebChromeClient::contentRuleListNotification):
2203         * WebProcess/WebCoreSupport/WebChromeClient.h:
2204
2205 2017-09-25  Timothy Horton  <timothy_horton@apple.com>
2206
2207         Make progress on getting Mac CMake building again
2208         https://bugs.webkit.org/show_bug.cgi?id=177443
2209
2210         Unreviewed, just "fixing" the build.
2211
2212         * PlatformMac.cmake:
2213         Add some missing files and include paths.
2214
2215 2017-09-24  Michael Catanzaro  <mcatanzaro@igalia.com>
2216
2217         Viewport fit is no longer experimental
2218         https://bugs.webkit.org/show_bug.cgi?id=177417
2219
2220         Reviewed by Darin Adler.
2221
2222         * Shared/WebPreferencesDefinitions.h:
2223
2224 2017-09-24  Michael Catanzaro  <mcatanzaro@igalia.com>
2225
2226         [GTK] Unreviewed, move webkit_hit_test_result_context_is_scrollbar in documentation
2227
2228         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2229
2230 2017-09-24  Michael Catanzaro  <mcatanzaro@igalia.com>
2231
2232         Alphabetize experimental features list
2233         https://bugs.webkit.org/show_bug.cgi?id=177374
2234
2235         Reviewed by Darin Adler.
2236
2237         * Shared/WebPreferencesDefinitions.h:
2238
2239 2017-09-24  Zan Dobersek  <zdobersek@igalia.com>
2240
2241         [WebKit] Changing EME setting through InjectedBundle should update WebPreferencesStore
2242         https://bugs.webkit.org/show_bug.cgi?id=177312
2243
2244         Reviewed by Carlos Garcia Campos.
2245
2246         When enabling EME through the InjectedBundle for testing purposes, it's
2247         only enabled in RuntimeEnabledFeatures, but not in WebPreferencesStore.
2248         This causes failures on imported W3C tests that cover EME persistent
2249         state licenses and perform parts of that test in a new window, where
2250         the original RuntimeEnabledFeatures state doesn't have any effect.
2251
2252         To avoid those failures, when enabling EME feature for testing purposes
2253         through InjectedBundle, the feature should also be enabled in the
2254         WebPreferencesStore.
2255
2256         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2257         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2258
2259 2017-09-22  Zalan Bujtas  <zalan@apple.com>
2260
2261         WeakPtrFactory should populate m_ref lazily.
2262         https://bugs.webkit.org/show_bug.cgi?id=177375
2263
2264         Reviewed by Geoffrey Garen.
2265
2266         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
2267         (WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy):
2268         (WebKit::WebPaymentCoordinatorProxy::canMakePaymentsWithActiveCard):
2269         (WebKit::WebPaymentCoordinatorProxy::openPaymentSetup):
2270         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
2271         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
2272         * UIProcess/ApplicationStateTracker.mm:
2273         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
2274         * UIProcess/Cocoa/WebViewImpl.h:
2275         (WebKit::WebViewImpl::createWeakPtr):
2276         * UIProcess/Cocoa/WebViewImpl.mm:
2277         (WebKit::WebViewImpl::WebViewImpl):
2278         * UIProcess/Launcher/ProcessLauncher.cpp:
2279         (WebKit::ProcessLauncher::ProcessLauncher):
2280         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2281         (WebKit::ProcessLauncher::launchProcess):
2282         * UIProcess/ProcessAssertion.h:
2283         (WebKit::ProcessAssertion::createWeakPtr):
2284         * UIProcess/WebPageProxy.cpp:
2285         (WebKit::m_configurationPreferenceValues):
2286         (WebKit::m_weakPtrFactory): Deleted.
2287         * UIProcess/WebPageProxy.h:
2288         (WebKit::WebPageProxy::createWeakPtr const):
2289         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
2290         (WebKit::RemoteLayerTreeDrawingArea::createWeakPtr):
2291         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
2292         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2293
2294 2017-09-22  John Wilander  <wilander@apple.com>
2295
2296         Re-enable configuration.HTTPCookieStorage on session without credentials
2297         https://bugs.webkit.org/show_bug.cgi?id=177393
2298
2299         This patch rolls back the crucial change to the network session
2300         without credentials that landed in r221632:
2301         <http://trac.webkit.org/changeset/221632>
2302
2303         Reviewed by Brent Fulgham.
2304
2305         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2306         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2307             Commented out the disabled cookie jar and added a FIXME
2308             referring to https://bugs.webkit.org/show_bug.cgi?id=177394.
2309
2310 2017-09-22  Chris Dumez  <cdumez@apple.com>
2311
2312         Enable File and Directory Entries API at runtime
2313         https://bugs.webkit.org/show_bug.cgi?id=176616
2314         <rdar://problem/34330942>
2315
2316         Reviewed by Geoffrey Garen.
2317
2318         Enable File and Directory Entries API at runtime on Mac/WebKit2,
2319         now that DataTransfer.items is enabled there.
2320
2321         * Shared/WebPreferencesDefinitions.h:
2322
2323 2017-09-22  Matt Lewis  <jlewis3@apple.com>
2324
2325         Unreviewed, rolling out r222394.
2326
2327         This broke the Windows Debug Build.
2328
2329         Reverted changeset:
2330
2331         "Remove build-webkit's notion of feature flags having a
2332         default value"
2333         https://bugs.webkit.org/show_bug.cgi?id=177338
2334         http://trac.webkit.org/changeset/222394
2335
2336 2017-09-22  John Wilander  <wilander@apple.com>
2337
2338         Non-prevalent resources should be allowed access to existing cookies in a third-party context
2339         https://bugs.webkit.org/show_bug.cgi?id=177336
2340         <rdar://problem/34578257>
2341
2342         Reviewed by Brent Fulgham.
2343
2344         This patch restructures what is communicated to the network process,
2345         from two vectors - with user interaction and without user interaction -
2346         to three vectors - to partition, to block, to neither partition nor block.
2347         The previous two vectors did not allow proper categorization into which
2348         domains should be partitioned, blocked, or left alone. That was the cause
2349         of the regression where non-prevalent third-party domains erroneously had
2350         their cookies blocked when they should fall back to the old behavior of
2351         access but no new cookies allowed to be set.
2352
2353         * NetworkProcess/NetworkProcess.cpp:
2354         (WebKit::NetworkProcess::updatePrevalentDomainsToPartitionOrBlockCookies):
2355         (WebKit::NetworkProcess::updatePrevalentDomainsWithAndWithoutInteraction): Deleted.
2356         * NetworkProcess/NetworkProcess.h:
2357         * NetworkProcess/NetworkProcess.messages.in:
2358         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2359         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]):
2360         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2361         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
2362         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
2363         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdateForDomains):
2364         (WebKit::WebResourceLoadStatisticsStore::clearInMemory):
2365         (WebKit::WebResourceLoadStatisticsStore::shouldPartitionCookies const):
2366         (WebKit::WebResourceLoadStatisticsStore::shouldBlockCookies const):
2367         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):
2368         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains):
2369         (WebKit::WebResourceLoadStatisticsStore::clearPartitioningStateForDomains):
2370         (WebKit::WebResourceLoadStatisticsStore::resetCookiePartitioningState):
2371         * UIProcess/WebResourceLoadStatisticsStore.h:
2372         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2373         (WebKit::WebsiteDataStore::updatePrevalentDomainsToPartitionOrBlockCookies):
2374         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
2375         (WebKit::WebsiteDataStore::updatePrevalentDomainsWithAndWithoutInteraction): Deleted.
2376         * UIProcess/WebsiteData/WebsiteDataStore.h:
2377
2378 2017-09-22  Tim Horton <timothy_horton@apple.com> and Michael Catanzaro <mcatanzaro@igalia.com>
2379
2380         Remove build-webkit's notion of feature flags having a default value
2381         https://bugs.webkit.org/show_bug.cgi?id=177338
2382
2383         Reviewed by Alex Christensen.
2384
2385         Use ENABLE_EXPERIMENTAL_FEATURES instead of ENABLE_DEVELOPER_MODE to enable runtime
2386         experimental features.
2387
2388         * Shared/WebPreferencesDefinitions.h:
2389
2390 2017-09-22  Chris Dumez  <cdumez@apple.com>
2391
2392         Use high resolution timestamp for event time
2393         https://bugs.webkit.org/show_bug.cgi?id=154246
2394         <rdar://problem/34333304>
2395
2396         Reviewed by Ryosuke Niwa.
2397
2398         Use WallTime / MonotonicTime instead of double type for clarity.
2399
2400         * Shared/WebCoreArgumentCoders.cpp:
2401         (IPC::ArgumentCoder<WallTime>::encode):
2402         (IPC::ArgumentCoder<WallTime>::decode):
2403         * Shared/WebCoreArgumentCoders.h:
2404         * Shared/WebEvent.cpp:
2405         (WebKit::WebEvent::WebEvent):
2406         * Shared/WebEvent.h:
2407         (WebKit::WebEvent::timestamp const):
2408         (WebKit::WebTouchEvent::WebTouchEvent):
2409         * Shared/WebKeyboardEvent.cpp:
2410         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
2411         * Shared/WebMouseEvent.cpp:
2412         (WebKit::WebMouseEvent::WebMouseEvent):
2413         * Shared/WebTouchEvent.cpp:
2414         (WebKit::WebTouchEvent::WebTouchEvent):
2415         * Shared/WebWheelEvent.cpp:
2416         (WebKit::WebWheelEvent::WebWheelEvent):
2417         * Shared/gtk/WebEventFactory.cpp:
2418         (WebKit::WebEventFactory::createWebMouseEvent):
2419         (WebKit::WebEventFactory::createWebWheelEvent):
2420         (WebKit::WebEventFactory::createWebKeyboardEvent):
2421         (WebKit::WebEventFactory::createWebTouchEvent):
2422         * Shared/ios/NativeWebTouchEventIOS.mm:
2423         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2424         * Shared/ios/WebIOSEventFactory.mm:
2425         (WebIOSEventFactory::createWebKeyboardEvent):
2426         * Shared/mac/NativeWebGestureEventMac.mm:
2427         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
2428         * Shared/mac/WebEventFactory.mm:
2429         (WebKit::WebEventFactory::createWebMouseEvent):
2430         (WebKit::WebEventFactory::createWebWheelEvent):
2431         (WebKit::WebEventFactory::createWebKeyboardEvent):
2432         * Shared/mac/WebGestureEvent.h:
2433         (WebKit::WebGestureEvent::WebGestureEvent):
2434         * Shared/wpe/WebEventFactory.cpp:
2435         (WebKit::WebEventFactory::createWebKeyboardEvent):
2436         (WebKit::WebEventFactory::createWebMouseEvent):
2437         (WebKit::WebEventFactory::createWebWheelEvent):
2438         (WebKit::WebEventFactory::createWebTouchEvent):
2439         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2440         (WKBundlePageSimulateMouseDown):
2441         (WKBundlePageSimulateMouseUp):
2442         (WKBundlePageSimulateMouseMotion):
2443         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2444         (WebKit::PDFPlugin::showContextMenuAtPoint):
2445         * WebProcess/Plugins/PluginView.cpp:
2446         (WebKit::PluginView::createWebEvent const):
2447         * WebProcess/WebPage/WebPage.cpp:
2448         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
2449         (WebKit::WebPage::contextMenuAtPointInWindow):
2450         (WebKit::WebPage::dragEnded):
2451         (WebKit::WebPage::simulateMouseDown):
2452         (WebKit::WebPage::simulateMouseUp):
2453         (WebKit::WebPage::simulateMouseMotion):
2454         * WebProcess/WebPage/WebPage.h:
2455         * WebProcess/WebPage/ios/WebPageIOS.mm:
2456         (WebKit::WebPage::handleSyntheticClick):
2457         (WebKit::WebPage::completeSyntheticClick):
2458         (WebKit::WebPage::requestAdditionalItemsForDragSession):
2459         (WebKit::WebPage::inspectorNodeSearchMovedToPosition):
2460
2461 2017-09-22  Fujii Hironori  <Hironori.Fujii@sony.com>
2462
2463         [GTK] Web Inspector: Can't load three.js
2464         https://bugs.webkit.org/show_bug.cgi?id=177340
2465
2466         Reviewed by Carlos Garcia Campos.
2467
2468         * PlatformGTK.cmake: Add JS files of three.js to InspectorFiles variable.
2469         * PlatformWPE.cmake: Ditto.
2470
2471 2017-09-21  Ryosuke Niwa  <rniwa@webkit.org>
2472
2473         Enable dataTransfer.items on macOS and iOS
2474         https://bugs.webkit.org/show_bug.cgi?id=177335
2475
2476         Reviewed by Sam Weinig.
2477
2478         * Shared/WebPreferencesDefinitions.h:
2479
2480 2017-09-21  Dan Bernstein  <mitz@apple.com>
2481
2482         Try to fix Apple internal builds with the iOS 11.0 SDK.
2483
2484         * Configurations/WebKit.xcconfig: Disable framework header postprocessing for iOS 11.0.
2485
2486 2017-09-21  Chris Dumez  <cdumez@apple.com>
2487
2488         Regression(r222308): new API tests are failing for !NETWORK_SESSION
2489         https://bugs.webkit.org/show_bug.cgi?id=177321
2490
2491         Reviewed by Alex Christensen.
2492
2493         When a load is redirected and then converted into a download, CFNetwork
2494         seems to call [NSURLDownloadDelegate willSendRequest:] on the download
2495         with a non-nil redirectResponse, which was unexpected.
2496
2497         To address the issue, we now ignore the willSendRequest call if the
2498         new request's URL is the same as the redirectResponse one.
2499
2500         * NetworkProcess/Downloads/mac/DownloadMac.mm:
2501         (-[WKDownloadAsDelegate download:willSendRequest:redirectResponse:]):
2502
2503 2017-09-21  Chris Dumez  <cdumez@apple.com>
2504
2505         Unreviewed, drop assertion added in r222308.
2506
2507         The assertion is hit by a couple of tests still but there is no bad effect
2508         to the vector not being empty at this point since we clear it right after.
2509
2510         * UIProcess/WebFrameProxy.cpp:
2511         (WebKit::WebFrameProxy::didStartProvisionalLoad):
2512
2513 2017-09-21  Chris Dumez  <cdumez@apple.com>
2514
2515         [WK2] Add API to get the redirect chain of a WKDownload
2516         https://bugs.webkit.org/show_bug.cgi?id=176628
2517         <rdar://problem/34338279>
2518
2519         Reviewed by Alex Christensen.
2520
2521         Re-enable assertion initially added in r222308 and later disabled in
2522         r222320. The assertion was hit because we failed to clear the redirect
2523         chain in WebFrameProxy::didFailProvisionalLoad().
2524
2525         * UIProcess/WebFrameProxy.cpp:
2526         (WebKit::WebFrameProxy::didStartProvisionalLoad):
2527         (WebKit::WebFrameProxy::didFailProvisionalLoad):
2528
2529 2017-09-21  Alex Christensen  <achristensen@webkit.org>
2530
2531         REGRESSION(r221465) WKWebViews without WebGL delegate callbacks crash when WebGL contexts are created
2532         https://bugs.webkit.org/show_bug.cgi?id=177306
2533         <rdar://problem/34351988>
2534
2535         Reviewed by Chris Dumez.
2536
2537         * UIProcess/Cocoa/NavigationState.mm:
2538         (WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
2539         (WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
2540         I forgot to early return after calling the default completion handler if there's no delegate selector.
2541
2542 2017-09-21  Chris Dumez  <cdumez@apple.com>
2543
2544         Unreviewed, temporarily disable assertion added in r222308 while I investigate.
2545
2546         * UIProcess/WebFrameProxy.cpp:
2547         (WebKit::WebFrameProxy::didStartProvisionalLoad):
2548
2549 2017-09-20  Stephan Szabo  <stephan.szabo@sony.com>
2550
2551         [Win] WTF: Add alias for process id to use in place of direct uses of pid_t
2552         https://bugs.webkit.org/show_bug.cgi?id=177017
2553
2554         Reviewed by Alex Christensen.
2555
2556         * NetworkProcess/NetworkProcessCreationParameters.h:
2557         * Shared/WebProcessCreationParameters.h:
2558         * UIProcess/API/APIProcessPoolConfiguration.h:
2559         * UIProcess/API/C/WKContext.cpp:
2560         (WKContextGetNetworkProcessIdentifier):
2561         (WKContextGetDatabaseProcessIdentifier):
2562         * UIProcess/API/C/WKContextPrivate.h:
2563         * UIProcess/API/C/WKPage.cpp:
2564         (WKPageGetProcessIdentifier):
2565         * UIProcess/API/C/WKPagePrivate.h:
2566         * UIProcess/ChildProcessProxy.h:
2567         (WebKit::ChildProcessProxy::processIdentifier const):
2568         * UIProcess/Launcher/ProcessLauncher.cpp:
2569         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
2570         * UIProcess/Launcher/ProcessLauncher.h:
2571         (WebKit::ProcessLauncher::processIdentifier const):
2572         * UIProcess/ProcessAssertion.cpp:
2573         (WebKit::ProcessAssertion::ProcessAssertion):
2574         (WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
2575         * UIProcess/ProcessAssertion.h:
2576         (WebKit::ProcessAssertion::ProcessAssertion):
2577         * UIProcess/ProcessThrottler.cpp:
2578         (WebKit::ProcessThrottler::didConnectToProcess):
2579         * UIProcess/ProcessThrottler.h:
2580         * UIProcess/WebPageProxy.cpp:
2581         (WebKit::WebPageProxy::processIdentifier const):
2582         * UIProcess/WebPageProxy.h:
2583         * UIProcess/WebProcessPool.cpp:
2584         (WebKit::WebProcessPool::networkProcessIdentifier):
2585         (WebKit::WebProcessPool::storageProcessIdentifier):
2586         * UIProcess/WebProcessPool.h:
2587
2588 2017-09-20  Chris Dumez  <cdumez@apple.com>
2589
2590         [WK2] Add API to get the redirect chain of a WKDownload
2591         https://bugs.webkit.org/show_bug.cgi?id=176628
2592         <rdar://problem/34338279>
2593
2594         Reviewed by Alex Christensen.
2595
2596         Add API to get the redirect chain of a WKDwnload. The redirect chain includes redirects
2597         that happened during initial load, before the load was converted into a download.
2598
2599         * UIProcess/API/C/WKDownload.cpp:
2600         (WKDownloadCopyRedirectChain):
2601         * UIProcess/API/C/WKDownload.h:
2602         * UIProcess/API/Cocoa/_WKDownload.h:
2603         * UIProcess/API/Cocoa/_WKDownload.mm:
2604         (-[_WKDownload originatingWebView]):
2605         (-[_WKDownload redirectChain]):
2606         * UIProcess/Downloads/DownloadProxy.cpp:
2607         (WebKit::DownloadProxy::willSendRequest):
2608         * UIProcess/Downloads/DownloadProxy.h:
2609         (WebKit::DownloadProxy::setRedirectChain):
2610         (WebKit::DownloadProxy::redirectChain const):
2611         * UIProcess/WebFrameProxy.cpp:
2612         (WebKit::WebFrameProxy::didStartProvisionalLoad):
2613         (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
2614         * UIProcess/WebFrameProxy.h:
2615         (WebKit::WebFrameProxy::redirectChain const):
2616         * UIProcess/WebPageProxy.cpp:
2617         (WebKit::WebPageProxy::receivedPolicyDecision):
2618
2619 2017-09-20  Alex Christensen  <achristensen@webkit.org>
2620
2621         Add infrastructure for adding custom headers to requests per website
2622         https://bugs.webkit.org/show_bug.cgi?id=177255
2623
2624         Reviewed by Geoffrey Garen.
2625
2626         * Shared/WebsitePolicies.cpp: Added.
2627         * Shared/WebsitePolicies.h:
2628         (WebKit::WebsitePolicies::encode const):
2629         (WebKit::WebsitePolicies::decode):
2630         * UIProcess/API/APIWebsitePolicies.h:
2631         * UIProcess/API/C/WKWebsitePolicies.cpp:
2632         (WKWebsitePoliciesCopyCustomHeaderFields):
2633         (WKWebsitePoliciesSetCustomHeaderFields):
2634         * UIProcess/API/C/WKWebsitePolicies.h:
2635         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
2636         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
2637         (-[_WKWebsitePolicies customHeaderFields]):
2638         (-[_WKWebsitePolicies setCustomHeaderFields:]):
2639         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2640         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2641
2642 2017-09-20  Michael Catanzaro  <mcatanzaro@igalia.com>
2643
2644         REGRESSION(r222194) [WPE] Library and executable output names broken
2645         https://bugs.webkit.org/show_bug.cgi?id=177273
2646
2647         Reviewed by Carlos Alberto Lopez Perez.
2648
2649         Move the WebKit2 output name variables to here from Source/cmake, since this is a better
2650         place and where they are set on all other ports. Update them for the changes in r222194.
2651
2652         * PlatformWPE.cmake:
2653
2654 2017-09-20  Jonathan Bedard  <jbedard@apple.com>
2655
2656         Removed nullable from UIDragItem property
2657         https://bugs.webkit.org/show_bug.cgi?id=176264
2658         <rdar://problem/31144674>
2659
2660         Unreviewed build fix
2661
2662         When a nullable annotation is used in a header file,
2663         the Objective-C compiler forces annotations on the entire
2664         file. Remove an unneeded annotation in UIKitSPI.h so that
2665         we can build in iOS 11.
2666
2667         * Platform/spi/ios/UIKitSPI.h:
2668
2669 2017-09-20  Antti Koivisto  <antti@apple.com>
2670
2671         Remove DOM and styling support for CSS Regions
2672         https://bugs.webkit.org/show_bug.cgi?id=177221
2673
2674         Reviewed by Andreas Kling.
2675
2676         * Configurations/FeatureDefines.xcconfig:
2677
2678 2017-09-19  Simon Fraser  <simon.fraser@apple.com>
2679
2680         Do more math in terms of FloatSizes and FloatPoints
2681         https://bugs.webkit.org/show_bug.cgi?id=177217
2682
2683         Reviewed by Zalan Bujtas.
2684
2685         Add operator/(const FloatSize&, const FloatSize&), GraphicsContext::translate(const FloatPoint&),
2686         FloatRect.scale(FloatSize) and AffineTransform::translate(const FloatSize&)
2687         and use them in lots of places to do math in terms of points and sizes.
2688
2689         * UIProcess/API/Cocoa/WKWebView.mm:
2690         (-[WKWebView _didCommitLayerTree:]):
2691         * UIProcess/ios/DragDropInteractionState.mm:
2692         (WebKit::createTargetedDragPreview):
2693         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2694         (WebKit::imageForRect):
2695         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
2696         (WebKit::InjectedBundleRangeHandle::renderedImage):
2697         * WebProcess/WebPage/WebPage.cpp:
2698         (WebKit::paintSnapshotAtSize):
2699         (WebKit::WebPage::snapshotNode):
2700
2701 2017-09-19  Simon Fraser  <simon.fraser@apple.com>
2702
2703         tiled-drawing/tiled-backing-in-window.html fails on Retina displays
2704         https://bugs.webkit.org/show_bug.cgi?id=177113
2705
2706         Reviewed by Tim Horton.
2707
2708         Make m_customDeviceScaleFactor a std::optional<> instead of having the weird "0 is unset"
2709         behavior.
2710
2711         * UIProcess/WebPageProxy.cpp:
2712         (WebKit::WebPageProxy::deviceScaleFactor const):
2713         (WebKit::WebPageProxy::setCustomDeviceScaleFactor):
2714         * UIProcess/WebPageProxy.h:
2715
2716 2017-09-19  Alex Christensen  <achristensen@webkit.org>
2717
2718         Allow modern decoding of Vectors
2719         https://bugs.webkit.org/show_bug.cgi?id=177102
2720
2721         Reviewed by Andy Estes.
2722
2723         Rather than allow modern decoding of Vectors of types that only allow legacy decoding,
2724         I just made modern decoders for all types that we need to decode in Vectors.
2725
2726         * NetworkProcess/NetworkResourceLoadParameters.cpp:
2727         (WebKit::NetworkResourceLoadParameters::decode):
2728         * Platform/IPC/ArgumentCoders.cpp:
2729         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode):
2730         * Platform/IPC/ArgumentCoders.h:
2731         * Shared/AssistedNodeInformation.cpp:
2732         (WebKit::OptionItem::decode):
2733         * Shared/AssistedNodeInformation.h:
2734         * Shared/CallbackID.h:
2735         (WebKit::CallbackID::decode):
2736         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
2737         (IPC::ArgumentCoder<WebCore::PaymentError>::decode):
2738         (IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):
2739         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode):
2740         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::LineItem>::decode):
2741         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ShippingMethod>::decode):
2742         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::TotalAndLineItems>::decode):
2743         (IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::decode):
2744         (IPC::ArgumentCoder<WebCore::ShippingMethodUpdate>::decode):
2745         * Shared/Databases/IndexedDB/WebIDBResult.cpp:
2746         (WebKit::WebIDBResult::decode):
2747         * Shared/FrameInfoData.cpp:
2748         (WebKit::FrameInfoData::decode):
2749         * Shared/Gamepad/GamepadData.cpp:
2750         (WebKit::GamepadData::decode):
2751         * Shared/Gamepad/GamepadData.h:
2752         * Shared/PlatformPopupMenuData.cpp:
2753         (WebKit::PlatformPopupMenuData::decode):
2754         * Shared/PlatformPopupMenuData.h:
2755         * Shared/Plugins/NPIdentifierData.cpp:
2756         (WebKit::NPIdentifierData::decode):
2757         * Shared/Plugins/NPIdentifierData.h:
2758         * Shared/Plugins/NPVariantData.cpp:
2759         (WebKit::NPVariantData::decode):
2760         * Shared/Plugins/NPVariantData.h:
2761         * Shared/RTCNetwork.cpp:
2762         (WebKit::RTCNetwork::IPAddress::decode):
2763         (WebKit::RTCNetwork::SocketAddress::decode):
2764         (WebKit::RTCNetwork::decode):
2765         * Shared/RTCNetwork.h:
2766         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
2767         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
2768         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
2769         (WebKit::RemoteLayerTreeTransaction::decode):
2770         * Shared/SessionState.cpp:
2771         (WebKit::HTTPBody::Element::decode):
2772         (WebKit::FrameState::decode):
2773         (WebKit::PageState::decode):
2774         (WebKit::BackForwardListItemState::decode):
2775         (WebKit::BackForwardListState::decode):
2776         * Shared/SessionState.h:
2777         * Shared/WebCompiledContentRuleListData.cpp:
2778         (WebKit::WebCompiledContentRuleListData::decode):
2779         * Shared/WebCompiledContentRuleListData.h:
2780         * Shared/WebContextMenuItemData.cpp:
2781         (WebKit::WebContextMenuItemData::decode):
2782         * Shared/WebContextMenuItemData.h:
2783         * Shared/WebCoreArgumentCoders.cpp:
2784         (IPC::ArgumentCoder<DOMCacheEngine::CacheInfo>::decode):
2785         (IPC::ArgumentCoder<DOMCacheEngine::Record>::decode):
2786         (IPC::ArgumentCoder<FloatRect>::decode):
2787         (IPC::ArgumentCoder<FloatQuad>::decode):
2788         (IPC::ArgumentCoder<IntRect>::decode):
2789         (IPC::ArgumentCoder<RecentSearch>::decode):
2790         (IPC::ArgumentCoder<Region::Span>::decode):
2791         (IPC::ArgumentCoder<MimeClassInfo>::decode):
2792         (IPC::ArgumentCoder<PluginInfo>::decode):
2793         (IPC::ArgumentCoder<SelectionRect>::decode):
2794         (IPC::ArgumentCoder<CompositionUnderline>::decode):
2795         (IPC::ArgumentCoder<DictationAlternative>::decode):
2796         (IPC::ArgumentCoder<GrammarDetail>::decode):
2797         (IPC::ArgumentCoder<TextCheckingResult>::decode):
2798         (IPC::ArgumentCoder<BlobPart>::decode):
2799         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
2800         (IPC::ArgumentCoder<MediaConstraints>::decode):
2801         (IPC::ArgumentCoder<CaptureDevice>::decode):
2802         (IPC::ArgumentCoder<ScrollOffsetRange<float>>::decode):
2803         (IPC::ArgumentCoder<MediaSelectionOption>::decode):
2804         * Shared/WebCoreArgumentCoders.h:
2805         * Shared/WebEvent.h:
2806         * Shared/WebPageCreationParameters.cpp:
2807         (WebKit::WebPageCreationParameters::decode):
2808         * Shared/WebPlatformTouchPoint.cpp:
2809         (WebKit::WebPlatformTouchPoint::decode):
2810         * Shared/WebPopupItem.cpp:
2811         (WebKit::WebPopupItem::decode):
2812         * Shared/WebPopupItem.h:
2813         * Shared/WebUserContentControllerDataTypes.cpp:
2814         (WebKit::WebUserScriptData::decode):
2815         (WebKit::WebUserStyleSheetData::decode):
2816         (WebKit::WebScriptMessageHandlerData::decode):
2817         * Shared/WebUserContentControllerDataTypes.h:
2818         * Shared/WebsiteData/WebsiteData.cpp:
2819         (WebKit::WebsiteData::Entry::decode):
2820         * Shared/WebsiteData/WebsiteData.h:
2821         * Shared/WebsiteDataStoreParameters.cpp:
2822         (WebKit::WebsiteDataStoreParameters::decode):
2823         * Shared/ios/WebPlatformTouchPointIOS.cpp:
2824         (WebKit::WebPlatformTouchPoint::decode):
2825         * Shared/mac/WebCoreArgumentCodersMac.mm:
2826         (IPC::ArgumentCoder<KeypressCommand>::decode):
2827         * UIProcess/LegacySessionStateCodingNone.cpp:
2828         (WebKit::decodeLegacySessionState):
2829         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.h:
2830         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
2831         (WebKit::PlatformCAAnimationRemote::KeyframeValue::decode):
2832         (WebKit::PlatformCAAnimationRemote::Properties::decode):
2833
2834 2017-09-19  Ryosuke Niwa  <rniwa@webkit.org>
2835
2836         On iOS, getData can't get text set by setData during copy event
2837         https://bugs.webkit.org/show_bug.cgi?id=176980
2838         <rdar://problem/34453915>
2839
2840         Reviewed by Darin Adler.
2841
2842         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2843         (WebKit::WebPlatformStrategies::copy): Deleted.
2844         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2845
2846 2017-09-19  Alex Christensen  <achristensen@webkit.org>
2847
2848         Expose WKPageRef as a private property on WKWebView on Mac
2849         https://bugs.webkit.org/show_bug.cgi?id=177022
2850         <rdar://problem/34342762>
2851
2852         Reviewed by Andy Estes.
2853
2854         * UIProcess/API/Cocoa/WKWebView.mm:
2855         (-[WKWebView _pageRefForTransitionToWKWebView]):
2856         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2857
2858 2017-09-19  Alex Christensen  <achristensen@webkit.org>
2859
2860         Make _WKProcessPoolConfiguration.allowsCellularAccess actually work on iOS
2861         https://bugs.webkit.org/show_bug.cgi?id=177124
2862
2863         Reviewed by Andy Estes.
2864
2865         The boolean added in r213747 was getting lost in two places:
2866         1. The API::ProcessPoolConfiguration gets copied before it's used, so we need to set the bool on the copy.
2867         2. The bool was not getting copied from that ProcessPoolConfiguration to the NetworkProcessCreationParameters
2868         to be sent to the NetworkProcess to be given to the NSURLSessionConfiguration in NetworkSessionCocoa.mm.
2869
2870         These two problems were fixed and verified manually with a customized iOS app on my phone.
2871         Unfortunately, this cannot be tested well with our current test infrastructure.
2872
2873         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2874         (API::ProcessPoolConfiguration::copy):
2875         * UIProcess/WebProcessPool.cpp:
2876         (WebKit::WebProcessPool::ensureNetworkProcess):
2877
2878 2017-09-18  Michael Catanzaro  <mcatanzaro@igalia.com>
2879
2880         [CMake] Rename WebKit target to WebKitLegacy and rename WebKit2 target to WebKit
2881         https://bugs.webkit.org/show_bug.cgi?id=174558
2882
2883         Reviewed by Alex Christensen.
2884
2885         * CMakeLists.txt:
2886         * PlatformGTK.cmake:
2887         * PlatformMac.cmake:
2888         * PlatformWPE.cmake:
2889         * PlatformWin.cmake:
2890         * Shared/gtk/WebKitWaylandProtocol.xml: Renamed from Source/WebKit/Shared/gtk/WebKit2WaylandProtocol.xml.
2891         * UIProcess/gtk/WaylandCompositor.cpp:
2892         * WebProcess/gtk/WaylandCompositorDisplay.cpp:
2893
2894 2017-09-18  Andy Estes  <aestes@apple.com>
2895
2896         [Cocoa] Upstream sandbox-related WebKitSystemInterface functions
2897         https://bugs.webkit.org/show_bug.cgi?id=177047
2898
2899         Reviewed by Daniel Bates.
2900
2901         * NetworkProcess/NetworkResourceLoadParameters.cpp:
2902         (WebKit::NetworkResourceLoadParameters::encode const):
2903         * Platform/spi/mac/QuarantineSPI.h: Added.
2904         * Shared/SandboxExtension.h:
2905         (): Deleted.
2906         * Shared/mac/ChildProcessMac.mm:
2907         (WebKit::enableSandboxStyleFileQuarantine):
2908         (WebKit::ChildProcess::initializeSandbox):
2909         * Shared/mac/SandboxExtensionMac.mm:
2910         (WebKit::SandboxExtensionImpl::create):
2911         (WebKit::SandboxExtensionImpl::SandboxExtensionImpl):
2912         (WebKit::SandboxExtensionImpl::~SandboxExtensionImpl):
2913         (WebKit::SandboxExtensionImpl::consume):
2914         (WebKit::SandboxExtensionImpl::invalidate):
2915         (WebKit::SandboxExtensionImpl::getSerializedFormat):
2916         (WebKit::SandboxExtension::Handle::Handle):
2917         (WebKit::SandboxExtension::Handle::~Handle):
2918         (WebKit::SandboxExtension::Handle::encode const):
2919         (WebKit::SandboxExtension::Handle::decode):
2920         (WebKit::SandboxExtension::createHandleWithoutResolvingPath):
2921         (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
2922         (WebKit::SandboxExtension::createHandleForTemporaryFile):
2923         (WebKit::SandboxExtension::createHandleForGenericExtension):
2924         (WebKit::SandboxExtension::SandboxExtension):
2925         (WebKit::SandboxExtension::~SandboxExtension):
2926         (WebKit::SandboxExtension::revoke):
2927         (WebKit::SandboxExtension::consume):
2928         (WebKit::SandboxExtension::consumePermanently):
2929         (WebKit::wkSandboxExtensionType): Deleted.
2930         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2931         (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
2932         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2933         (WebKit::WebProcessPool::platformInitializeWebProcess):
2934         * UIProcess/Downloads/DownloadProxy.cpp:
2935         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):
2936         * UIProcess/Network/NetworkProcessProxy.cpp:
2937         (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs):
2938         * UIProcess/Storage/StorageProcessProxy.cpp:
2939         (WebKit::StorageProcessProxy::getSandboxExtensionsForBlobFiles):
2940         * UIProcess/WebPageProxy.cpp:
2941         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
2942         (WebKit::WebPageProxy::loadFile):
2943         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
2944         * UIProcess/WebProcessPool.cpp:
2945         (WebKit::WebProcessPool::createNewWebProcess):
2946         (WebKit::WebProcessPool::processDidFinishLaunching):
2947         (WebKit::WebProcessPool::resumeDownload):
2948         (WebKit::WebProcessPool::startMemorySampler):
2949         * WebKit.xcodeproj/project.pbxproj:
2950         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
2951         (WebKit::BlobRegistryProxy::registerFileBlobURL):
2952
2953 2017-09-18  Andy Estes  <aestes@apple.com>
2954
2955         [Cocoa] Upstream WKSetCrashReportApplicationSpecificInformation() from WebKitSystemInterface
2956         https://bugs.webkit.org/show_bug.cgi?id=177048
2957
2958         Reviewed by Alex Christensen.
2959
2960         * Platform/IPC/mac/ConnectionMac.mm:
2961         (IPC::Connection::sendMessage):
2962         (IPC::readFromMachPort):
2963         * Platform/cocoa/CrashReporter.h: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm.
2964         * Platform/cocoa/CrashReporter.mm: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm.
2965         (WebKit::setCrashReportApplicationSpecificInformation):
2966         * Platform/spi/Cocoa/CrashReporterClientSPI.h: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm.
2967         * Shared/Cocoa/ChildProcessCocoa.mm:
2968         (WebKit::ChildProcess::didReceiveInvalidMessage):
2969         * WebKit.xcodeproj/project.pbxproj:
2970         * WebProcess/cocoa/WebProcessCocoa.mm:
2971         (WebKit::_WKSetCrashReportApplicationSpecificInformation):
2972
2973 2017-09-18  Andy Estes  <aestes@apple.com>
2974
2975         [Mac] Upstream miscellaneous WebKitSystemInterface functions
2976         https://bugs.webkit.org/show_bug.cgi?id=177029
2977
2978         Reviewed by Alex Christensen.
2979
2980         * NetworkProcess/mac/NetworkProcessMac.mm:
2981         (WebKit::NetworkProcess::initializeProcessName):
2982         * PluginProcess/mac/PluginProcessMac.mm:
2983         (WebKit::PluginProcess::initializeProcessName):
2984         * StorageProcess/mac/StorageProcessMac.mm:
2985         (WebKit::StorageProcess::initializeProcessName):
2986         * UIProcess/Cocoa/WebViewImpl.mm:
2987         (WebKit::trackingAreaOptions):
2988         (WebKit::WebViewImpl::mightBeginScrollWhileInactive):
2989         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2990         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
2991         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2992         (WebKit::NetscapePlugin::popUpContextMenu):
2993         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2994         (WebKit::PDFPlugin::handleContextMenuEvent):
2995         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2996         (InitWebCoreSystemInterface):
2997         * WebProcess/cocoa/WebProcessCocoa.mm:
2998         (WebKit::WebProcess::initializeProcessName):
2999         (WebKit::WebProcess::updateActivePages):
3000
3001 2017-09-17  Michael Catanzaro  <mcatanzaro@igalia.com>
3002
3003         [WPE][GTK] Merge ProcessLauncher[WPE,GTK]
3004         https://bugs.webkit.org/show_bug.cgi?id=177041
3005
3006         Unreviewed fixup, I broke the size of the argv buffer when experimenting with how to respond
3007         to review comments. Not sure why this didn't blow up everything during testing.
3008
3009         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
3010         (WebKit::ProcessLauncher::launchProcess):
3011
3012 2017-09-17  Michael Catanzaro  <mcatanzaro@igalia.com>
3013
3014         [WPE][GTK] Merge ProcessLauncher[WPE,GTK]
3015         https://bugs.webkit.org/show_bug.cgi?id=177041
3016
3017         Reviewed by Carlos Garcia Campos.
3018
3019         * PlatformGTK.cmake:
3020         * PlatformWPE.cmake:
3021         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp: Renamed from Source/WebKit/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp.
3022         (WebKit::childSetupFunction):
3023         (WebKit::ProcessLauncher::launchProcess):
3024         (WebKit::ProcessLauncher::terminateProcess):
3025         (WebKit::ProcessLauncher::platformInvalidate):
3026         * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp: Removed.
3027
3028 2017-09-16  Tim Horton  <timothy_horton@apple.com>
3029
3030         Fix the Tools build with CMake on macOS
3031         https://bugs.webkit.org/show_bug.cgi?id=177030
3032
3033         Reviewed by Geoffrey Garen.
3034
3035         * PlatformMac.cmake:
3036         Add some WebKitLegacy headers to forward (for use by the tools).
3037
3038 2017-09-15  JF Bastien  <jfbastien@apple.com>
3039
3040         WTF: use Forward.h when appropriate instead of Vector.h
3041         https://bugs.webkit.org/show_bug.cgi?id=176984
3042
3043         Reviewed by Saam Barati.
3044
3045         There's no need to include Vector.h when Forward.h will suffice. All we need is to move the template default parameters from Vector, and then the forward declaration can be used in so many new places: if a header only takes Vector by reference, rvalue reference, pointer, returns any of these, or has them as members then the header doesn't need to see the definition because the declaration will suffice.
3046
3047         * Scripts/webkit/LegacyMessages-expected.h:
3048         * Scripts/webkit/Messages-expected.h:
3049         * Shared/API/APIData.h:
3050         * UIProcess/API/APIContextMenuClient.h:
3051         * UIProcess/API/APIFormClient.h:
3052         * UIProcess/API/APIHTTPCookieStore.h:
3053         * UIProcess/API/APINotificationProvider.h:
3054         * UIProcess/API/glib/WebKitNotificationProvider.h:
3055         * UIProcess/Notifications/WebNotificationProvider.h:
3056         * UIProcess/TextCheckerCompletion.h:
3057         * UIProcess/WebCookieManagerProxy.h:
3058         * UIProcess/WebOpenPanelResultListenerProxy.h:
3059         * UIProcess/WebPasteboardProxy.h:
3060         * UIProcess/WebPopupMenuProxy.h:
3061         * UIProcess/WebTextCheckerClient.h:
3062         * WebProcess/Cookies/WebCookieManager.h:
3063         * WebProcess/Gamepad/WebGamepadProvider.h:
3064         * WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
3065         * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
3066         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
3067         * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
3068         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3069         * WebProcess/Network/webrtc/WebRTCMonitor.h:
3070         * WebProcess/Network/webrtc/WebRTCResolver.h:
3071         * WebProcess/WebPage/DrawingArea.h:
3072         * WebProcess/WebPage/WebOpenPanelResultListener.h:
3073
3074 2017-09-15  Tim Horton  <timothy_horton@apple.com>
3075
3076         Fix the macOS CMake build
3077         https://bugs.webkit.org/show_bug.cgi?id=177015
3078
3079         Reviewed by Andy Estes.
3080
3081         * CMakeLists.txt:
3082         Add the new RemoteLayerTree directories to the header search path.
3083         Add CookieStorageUtilsCF.mm to Sources.
3084
3085         * PlatformMac.cmake:
3086         Add a few more files, and fix the generated forwarding headers include
3087         path to name "WebKit" instead of "WebKit2".
3088
3089 2017-09-15  Youenn Fablet  <youenn@apple.com>
3090
3091         Add an URL method to remove both query string and fragment identifier
3092         https://bugs.webkit.org/show_bug.cgi?id=176911
3093
3094         Reviewed by Alex Christensen.
3095
3096         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
3097         (WebKit::CacheStorage::computeKeyURL):
3098
3099 2017-09-15  Andy Estes  <aestes@apple.com>
3100
3101         [Cocoa] Upstream MediaRemote and VideoToolbox WebKitSystemInterface functions
3102         https://bugs.webkit.org/show_bug.cgi?id=176953
3103
3104         Reviewed by Eric Carlson.
3105
3106         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3107         (InitWebCoreSystemInterface):
3108
3109 2017-09-15  Ryosuke Niwa  <rniwa@webkit.org>
3110
3111         iOS: WebKitTestRunner hits an assertion in editing/pasteboard/datatransfer-items-copy-plaintext.html
3112         https://bugs.webkit.org/show_bug.cgi?id=176968
3113
3114         Reviewed by Wenson Hsieh.
3115
3116         Don't allocate a SharedMemory of size zero (content was empty) as this would result in a crash inside
3117         a WebContent process in release builds and an assertion failure in debug builds.
3118
3119         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
3120         (WebKit::WebPasteboardProxy::readBufferFromPasteboard):
3121
3122 2017-09-14  Youenn Fablet  <youenn@apple.com>
3123
3124         Add Cache API support of records persistency
3125         https://bugs.webkit.org/show_bug.cgi?id=176845
3126
3127         Reviewed by Alex Christensen.
3128
3129         Introducing asynchronous opening of Cache objects.
3130         When opening, Cache objects will read the list of records from the disk.
3131         They keep in memory the necessary information to make any match or remove request without reading further information from the disk.
3132         Cache objects thus keep during the opening time a list of callbacks to call when being opened.
3133         Persistent storage is implemented through NetworkCache::Storage.
3134
3135         A Cache object is added a unique name so that records from a Cache cannot be mixed with records from another Cache.
3136         This unique name is stored persistenly in addition to the Cache name.
3137         This unique name is used as the key type given to the storage.
3138
3139         Request, response and responsebody data are no longer kept by the Cache object.
3140         For regular sessions, this information is kept on the disk through NetworkCache::Storage.
3141         Insertion time is also stored persistently so as to keep the ordering of the records consistent.
3142         For private browsing sessions, this information is kept in a map owned by the Caches object.
3143         RecordData is renamed to RecordInformation as it now only contains the information used to handle the different Cache actions.
3144
3145         For every record retrieval action, a ReadRecordTaskCounter is used.
3146         Its purpose is to allow retrieving the record data on the disk in parallel,
3147         and then send back the information when everything is read.
3148         In case some records cannot be correctly read, they are removed automatically at that point.
3149         The current implementation loads all information in memory including response bodies.
3150         Further improvements might consider streaming the response bodies progressively.
3151
3152         For every stored record, an AsynchronousPutTaskCounter is used.
3153         Its purpose is also to wait for all put actions to be completed before executing the completion callback.
3154         In some cases, a record needs to be overriden.
3155         In that case, as per the specification, only the data related to the response is to be modified.
3156         This requires reading the record request data on disk before actually writing the whole record again.
3157         This is implemented in updateRecordToDisk.
3158
3159         The Cache object is delegating all record writing/reading tasks to its Caches object.
3160         The Caches object is responsible to handle persistent/private sessions.
3161
3162         * NetworkProcess/cache/CacheStorageEngine.cpp:
3163         (WebKit::CacheStorage::Engine::retrieveRecords): Making sure Cache object is opened.
3164         (WebKit::CacheStorage::Engine::readCache): Ditto.
3165         (WebKit::CacheStorage::Engine::unlock): Disposing the cache without going through initializing it.
3166         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
3167         (WebKit::CacheStorage::computeKeyURL):
3168         (WebKit::CacheStorage::queryCache):
3169         (WebKit::CacheStorage::updateVaryInformation):
3170         (WebKit::CacheStorage::Cache::toRecordInformation):
3171         (WebKit::CacheStorage::Cache::Cache):
3172         (WebKit::CacheStorage::Cache::open):
3173         (WebKit::CacheStorage::Cache::finishOpening):
3174         (WebKit::CacheStorage::ReadRecordTaskCounter::create):
3175         (WebKit::CacheStorage::ReadRecordTaskCounter::~ReadRecordTaskCounter):
3176         (WebKit::CacheStorage::ReadRecordTaskCounter::appendRecord):
3177         (WebKit::CacheStorage::ReadRecordTaskCounter::ReadRecordTaskCounter):
3178         (WebKit::CacheStorage::Cache::retrieveRecord):
3179         (WebKit::CacheStorage::Cache::retrieveRecords):
3180         (WebKit::CacheStorage::Cache::addRecord):
3181         (WebKit::CacheStorage::Cache::recordsFromURL):
3182         (WebKit::CacheStorage::Cache::recordsFromURL const):
3183         (WebKit::CacheStorage::AsynchronousPutTaskCounter::create):
3184         (WebKit::CacheStorage::AsynchronousPutTaskCounter::~AsynchronousPutTaskCounter):
3185         (WebKit::CacheStorage::AsynchronousPutTaskCounter::onCompletion):
3186         (WebKit::CacheStorage::AsynchronousPutTaskCounter::setError):
3187         (WebKit::CacheStorage::Cache::put):
3188         (WebKit::CacheStorage::Cache::remove):
3189         (WebKit::CacheStorage::Cache::removeFromRecordList):
3190         (WebKit::CacheStorage::Cache::writeRecordToDisk):
3191         (WebKit::CacheStorage::Cache::updateRecordToDisk):
3192         (WebKit::CacheStorage::Cache::readRecordFromDisk):
3193         (WebKit::CacheStorage::Cache::removeRecordFromDisk):
3194         (WebKit::CacheStorage::Cache::encode):
3195         (WebKit::CacheStorage::decodeRecordHeader):
3196         (WebKit::CacheStorage::Cache::decode):
3197         (WebKit::CacheStorage::Cache::keys const):
3198         * NetworkProcess/cache/CacheStorageEngineCache.h:
3199         (WebKit::CacheStorage::Cache::isOpened const):
3200         (WebKit::CacheStorage::Cache::uniqueName const):
3201         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
3202         (WebKit::CacheStorage::Caches::initialize):
3203         (WebKit::CacheStorage::Caches::open):
3204         (WebKit::CacheStorage::Caches::remove):
3205         (WebKit::CacheStorage::Caches::dispose):
3206         (WebKit::CacheStorage::encodeCacheNames):
3207         (WebKit::CacheStorage::decodeCachesNames):
3208         (WebKit::CacheStorage::Caches::readCachesFromDisk):
3209         (WebKit::CacheStorage::Caches::readRecordsList):
3210         (WebKit::CacheStorage::Caches::writeRecord):
3211         (WebKit::CacheStorage::Caches::readRecord):
3212         (WebKit::CacheStorage::Caches::removeRecord):
3213         (WebKit::CacheStorage::Caches::clearMemoryRepresentation):
3214         (WebKit::CacheStorage::Caches::salt const):
3215         * NetworkProcess/cache/CacheStorageEngineCaches.h:
3216         (WebKit::CacheStorage::Caches::shouldPersist const):
3217         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3218         (WebKit::NetworkCache::Storage::store):
3219         * NetworkProcess/cache/NetworkCacheStorage.h:
3220         (WebKit::NetworkCache::Storage::writeWithoutWaiting):
3221
3222 2017-09-14  Alex Christensen  <achristensen@webkit.org>
3223
3224         Add WKUIDelegatePrivate equivalent of WKPageUIClient's drawHeader, drawFooter, headerHeight, and footerHeight
3225         https://bugs.webkit.org/show_bug.cgi?id=176889
3226         <rdar://problem/29270035>
3227
3228         Reviewed by Andy Estes.
3229
3230         * UIProcess/API/C/WKPage.cpp:
3231         (WKPageLoadAlternateHTMLString):
3232         (WKPageLoadAlternateHTMLStringWithUserData):
3233         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3234         (-[WKBrowsingContextController loadAlternateHTMLString:baseURL:forUnreachableURL:]):
3235         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3236         * UIProcess/API/Cocoa/WKWebView.mm:
3237         (-[WKWebView _loadAlternateHTMLString:baseURL:forUnreachableURL:]):
3238         * UIProcess/Cocoa/UIDelegate.h:
3239         * UIProcess/Cocoa/UIDelegate.mm:
3240         (WebKit::UIDelegate::setDelegate):
3241         (WebKit::UIDelegate::UIClient::headerHeight):
3242         (WebKit::UIDelegate::UIClient::footerHeight):
3243         (WebKit::UIDelegate::UIClient::drawHeader):
3244         (WebKit::UIDelegate::UIClient::drawFooter):
3245         * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:
3246         (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
3247         * UIProcess/Cocoa/WebViewImpl.mm:
3248         (WebKit::WebViewImpl::printOperationWithPrintInfo):
3249         * UIProcess/FrameLoadState.cpp:
3250         (WebKit::FrameLoadState::didStartProvisionalLoad):
3251         (WebKit::FrameLoadState::didReceiveServerRedirectForProvisionalLoad):
3252         (WebKit::FrameLoadState::didFailProvisionalLoad):
3253         (WebKit::FrameLoadState::didCommitLoad):
3254         (WebKit::FrameLoadState::didSameDocumentNotification):
3255         (WebKit::FrameLoadState::setUnreachableURL):
3256         (WebKit::FrameLoadState::FrameLoadState): Deleted.
3257         * UIProcess/FrameLoadState.h:
3258         (WebKit::FrameLoadState::url const):
3259         (WebKit::FrameLoadState::provisionalURL const):
3260         (WebKit::FrameLoadState::unreachableURL const):
3261         * UIProcess/WebFrameProxy.cpp:
3262         (WebKit::WebFrameProxy::loadURL):
3263         (WebKit::WebFrameProxy::didStartProvisionalLoad):
3264         (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
3265         (WebKit::WebFrameProxy::didSameDocumentNavigation):
3266         (WebKit::WebFrameProxy::setUnreachableURL):
3267         * UIProcess/WebFrameProxy.h:
3268         (WebKit::WebFrameProxy::url const):
3269         (WebKit::WebFrameProxy::provisionalURL const):
3270         (WebKit::WebFrameProxy::unreachableURL const):
3271         * UIProcess/WebPageProxy.cpp:
3272         (WebKit::WebPageProxy::loadAlternateHTMLString):
3273         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3274         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
3275         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
3276         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
3277         * UIProcess/WebPageProxy.h:
3278         * UIProcess/WebPageProxy.messages.in:
3279         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3280         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
3281         (WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL):
3282         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
3283         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
3284         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
3285         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
3286         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
3287         * WebProcess/WebPage/WebPage.cpp:
3288         (WebKit::WebPage::loadURLInFrame):
3289         * WebProcess/WebPage/WebPage.h:
3290         * WebProcess/WebPage/WebPage.messages.in:
3291
3292 2017-09-14  Andy Estes  <aestes@apple.com>
3293
3294         [Mac] Upstream SpeechSynthesis-related WebKitSystemInterface functions
3295         https://bugs.webkit.org/show_bug.cgi?id=176931
3296
3297         Reviewed by Joseph Pecoraro.
3298
3299         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3300         (InitWebCoreSystemInterface):
3301
3302 2017-09-14  Ryan Haddad  <ryanhaddad@apple.com>
3303
3304         Unreviewed, rolling out r222033.
3305
3306         This change caused API test WebKit.PrintFrame to time out.
3307
3308         Reverted changeset:
3309
3310         "Add WKUIDelegatePrivate equivalent of WKPageUIClient's
3311         drawHeader, drawFooter, headerHeight, and footerHeight"
3312         https://bugs.webkit.org/show_bug.cgi?id=176889
3313         http://trac.webkit.org/changeset/222033
3314
3315 2017-09-14  Alex Christensen  <achristensen@webkit.org>
3316
3317         Add WKUIDelegatePrivate equivalent of WKPageUIClient's drawHeader, drawFooter, headerHeight, and footerHeight
3318         https://bugs.webkit.org/show_bug.cgi?id=176889
3319         <rdar://problem/29270035>
3320
3321         Reviewed by Andy Estes.
3322
3323         * UIProcess/API/C/WKPage.cpp:
3324         (WKPageLoadAlternateHTMLString):
3325         (WKPageLoadAlternateHTMLStringWithUserData):
3326         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3327         (-[WKBrowsingContextController loadAlternateHTMLString:baseURL:forUnreachableURL:]):
3328         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3329         * UIProcess/API/Cocoa/WKWebView.mm:
3330         (-[WKWebView _loadAlternateHTMLString:baseURL:forUnreachableURL:]):
3331         * UIProcess/Cocoa/UIDelegate.h:
3332         * UIProcess/Cocoa/UIDelegate.mm:
3333         (WebKit::UIDelegate::setDelegate):
3334         (WebKit::UIDelegate::UIClient::headerHeight):
3335         (WebKit::UIDelegate::UIClient::footerHeight):
3336         (WebKit::UIDelegate::UIClient::drawHeader):
3337         (WebKit::UIDelegate::UIClient::drawFooter):
3338         * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:
3339         (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
3340         * UIProcess/Cocoa/WebViewImpl.mm:
3341         (WebKit::WebViewImpl::printOperationWithPrintInfo):
3342         * UIProcess/FrameLoadState.cpp:
3343         (WebKit::FrameLoadState::didStartProvisionalLoad):
3344         (WebKit::FrameLoadState::didReceiveServerRedirectForProvisionalLoad):
3345         (WebKit::FrameLoadState::didFailProvisionalLoad):
3346         (WebKit::FrameLoadState::didCommitLoad):
3347         (WebKit::FrameLoadState::didSameDocumentNotification):
3348         (WebKit::FrameLoadState::setUnreachableURL):
3349         (WebKit::FrameLoadState::FrameLoadState): Deleted.
3350         * UIProcess/FrameLoadState.h:
3351         (WebKit::FrameLoadState::url const):
3352         (WebKit::FrameLoadState::provisionalURL const):
3353         (WebKit::FrameLoadState::unreachableURL const):
3354         * UIProcess/WebFrameProxy.cpp:
3355         (WebKit::WebFrameProxy::loadURL):
3356         (WebKit::WebFrameProxy::didStartProvisionalLoad):
3357         (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
3358         (WebKit::WebFrameProxy::didSameDocumentNavigation):
3359         (WebKit::WebFrameProxy::setUnreachableURL):
3360         * UIProcess/WebFrameProxy.h:
3361         (WebKit::WebFrameProxy::url const):
3362         (WebKit::WebFrameProxy::provisionalURL const):
3363         (WebKit::WebFrameProxy::unreachableURL const):
3364         * UIProcess/WebPageProxy.cpp:
3365         (WebKit::WebPageProxy::loadAlternateHTMLString):
3366         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3367         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
3368         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
3369         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
3370         * UIProcess/WebPageProxy.h:
3371         * UIProcess/WebPageProxy.messages.in:
3372         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3373         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
3374         (WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL):
3375         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
3376         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
3377         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
3378         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
3379         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
3380         * WebProcess/WebPage/WebPage.cpp:
3381         (WebKit::WebPage::loadURLInFrame):
3382         * WebProcess/WebPage/WebPage.h:
3383         * WebProcess/WebPage/WebPage.messages.in:
3384
3385 2017-09-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3386
3387         [GTK][Wayland] Flickering when resizing the window
3388         https://bugs.webkit.org/show_bug.cgi?id=176774
3389
3390         Reviewed by Michael Catanzaro.
3391
3392         This regressed when we switched to always start the wayland compositor. In
3393         AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState() we check if the nested compositor is
3394         running, which is always true now (if EGL and the required extensions are available). We should check if we are
3395         in AC mode instead.
3396
3397         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
3398         (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
3399
3400 2017-09-14  Yusuke Suzuki  <utatane.tea@gmail.com>
3401
3402         [JSC] Add PrivateSymbolMode::{Include,Exclude} for PropertyNameArray
3403         https://bugs.webkit.org/show_bug.cgi?id=176867
3404
3405         Reviewed by Sam Weinig.
3406
3407         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3408         (WebKit::NPJSObject::enumerate):
3409
3410 2017-09-14  Maureen Daum  <mdaum@apple.com>
3411
3412         Introduce the option to mark an HTML element as having AutoFill available.
3413         https://bugs.webkit.org/show_bug.cgi?id=176710
3414
3415         Reviewed by Alex Christensen.
3416
3417         Introduce the option to mark an HTML element as having AutoFill available. Accessibility
3418         can use this property when deciding whether to announce that the focused field offers
3419         AutoFill.
3420
3421         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3422         (WKBundleNodeHandleGetHTMLInputElementAutoFillAvailable):
3423         (WKBundleNodeHandleSetHTMLInputElementAutoFillAvailable):
3424         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
3425         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3426         (WebKit::InjectedBundleNodeHandle::isAutoFillAvailable const):
3427         (WebKit::InjectedBundleNodeHandle::setAutoFillAvailable):
3428         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3429
3430 2017-09-13  John Wilander  <wilander@apple.com>
3431
3432         Introduce Storage Access API (document parts) as an experimental feature
3433         https://bugs.webkit.org/show_bug.cgi?id=175759
3434         <rdar://problem/34414107>
3435
3436         Reviewed by Alex Christensen.
3437
3438         Storage Access API is an experimental feature which allows cross-origin,
3439         sandboxed iframes to request access to their first-party storage (as
3440         opposed to partitioned storage). This might be restricted to cookies or
3441         might cover all stateful mechanisms.
3442
3443         It introduces the following three developer-facing things:
3444         - A new readonly attribute, document.hasStorageAccess.
3445         - A new function, document.requestStorageAccess().
3446         - A new iframe sandbox token, allow-storage-access-by-user-activation.
3447
3448         * Shared/WebCoreArgumentCoders.cpp:
3449         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
3450         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
3451             Storage handling of the new type of data.
3452         * Shared/WebPreferencesDefinitions.h:
3453         * UIProcess/API/C/WKPreferences.cpp:
3454         (WKPreferencesSetStorageAccessAPIEnabled):
3455         (WKPreferencesGetStorageAccessAPIEnabled):
3456         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3457         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3458             Bumped the model version from 9 to 10.
3459         * WebProcess/WebPage/WebPage.cpp:
3460         (WebKit::WebPage::updatePreferences):
3461
3462 2017-09-13  Andy Estes  <aestes@apple.com>
3463
3464         [Apple Pay] Consider phoneticName when encoding ContactFields
3465         https://bugs.webkit.org/show_bug.cgi?id=176885
3466         <rdar://problem/34176419>
3467
3468         Reviewed by Tim Horton.
3469
3470         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
3471         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ContactFields>::encode):
3472         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ContactFields>::decode):
3473
3474 2017-09-13  Matt Lewis  <jlewis3@apple.com>
3475
3476         Unreviewed, rolling out r221976.
3477
3478         The test introduced was flaky from point of addition.
3479
3480         Reverted changeset:
3481
3482         "Introduce Storage Access API (document parts) as an
3483         experimental feature"
3484         https://bugs.webkit.org/show_bug.cgi?id=175759
3485         http://trac.webkit.org/changeset/221976
3486
3487 2017-09-13  Youenn Fablet  <youenn@apple.com>
3488
3489         Internals clearCacheStorageMemoryRepresentation should return a Promise
3490         https://bugs.webkit.org/show_bug.cgi?id=176818
3491
3492         Reviewed by Alex Christensen.
3493
3494         Adding a completion handler to clearMemoryRepresentation.
3495
3496         * NetworkProcess/cache/CacheStorageEngine.cpp:
3497         (WebKit::CacheStorage::Engine::clearMemoryRepresentation):
3498         * NetworkProcess/cache/CacheStorageEngine.h:
3499         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
3500         (WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
3501         * NetworkProcess/cache/CacheStorageEngineConnection.h:
3502         * NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
3503         * WebProcess/Cache/WebCacheStorageConnection.cpp:
3504         (WebKit::WebCacheStorageConnection::clearMemoryRepresentation):
3505         (WebKit::WebCacheStorageConnection::clearMemoryRepresentationCompleted):
3506         * WebProcess/Cache/WebCacheStorageConnection.h:
3507         * WebProcess/Cache/WebCacheStorageConnection.messages.in:
3508
3509 2017-09-13  Andy Estes  <aestes@apple.com>
3510
3511         [CF] Upstream CFNetwork-related WebKitSystemInterface functions
3512         https://bugs.webkit.org/show_bug.cgi?id=176729
3513
3514         Reviewed by Alex Christensen.
3515
3516         * Shared/mac/WebCoreArgumentCodersMac.mm:
3517         (IPC::createSerializableRepresentation):
3518         (IPC::dictionaryValueOfType):
3519         (IPC::createArchiveList):
3520         (IPC::createCFURLRequestFromSerializableRepresentation):
3521         (IPC::createNSURLRequestFromSerializableRepresentation):
3522         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
3523         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
3524         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3525         (WebKit::WebProcessPool::legacyPlatformDefaultCacheStorageDirectory):
3526         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
3527         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3528         (InitWebCoreSystemInterface):
3529
3530 2017-09-13  Alex Christensen  <achristensen@webkit.org>
3531
3532         Add WKUIDelegatePrivate equivalent of WKPageUIClient's setIsResizable, getWindowFrame, and setWindowFrame
3533         https://bugs.webkit.org/show_bug.cgi?id=176857
3534         <rdar://problem/29270035>
3535
3536         Reviewed by Tim Horton.
3537
3538         isResizable is unreachable code because nothing sends Messages::WebPageProxy::GetIsResizable, so I removed it.
3539
3540         * UIProcess/API/APIUIClient.h:
3541         (API::UIClient::setStatusBarIsVisible):
3542         (API::UIClient::isResizable): Deleted.
3543         * UIProcess/API/C/WKPage.cpp:
3544         (WKPageSetPageUIClient):
3545         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3546         * UIProcess/API/glib/WebKitUIClient.cpp:
3547         * UIProcess/Cocoa/UIDelegate.h:
3548         * UIProcess/Cocoa/UIDelegate.mm:
3549         (WebKit::UIDelegate::setDelegate):
3550         (WebKit::UIDelegate::UIClient::setIsResizable):
3551         (WebKit::UIDelegate::UIClient::setWindowFrame):
3552         (WebKit::UIDelegate::UIClient::windowFrame):
3553         * UIProcess/WebPageProxy.cpp:
3554         (WebKit::WebPageProxy::getIsResizable): Deleted.
3555         * UIProcess/WebPageProxy.h:
3556         * UIProcess/WebPageProxy.messages.in:
3557
3558 2017-09-13  Youenn Fablet  <youenn@apple.com>
3559
3560         Add a lambda-based map for Vectors
3561         https://bugs.webkit.org/show_bug.cgi?id=176487
3562
3563         Reviewed by Darin Adler.
3564
3565         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
3566         (WebKit::CacheStorage::Caches::readCachesFromDisk):
3567
3568 2017-09-13  John Wilander  <wilander@apple.com>
3569
3570         Introduce Storage Access API (document parts) as an experimental feature
3571         https://bugs.webkit.org/show_bug.cgi?id=175759
3572         <rdar://problem/33666847>
3573
3574         Reviewed by Alex Christensen.
3575
3576         Storage Access API is an experimental feature which allows cross-origin,
3577         sandboxed iframes to request access to their first-party storage (as
3578         opposed to partitioned storage). This might be restricted to cookies or
3579         might cover all stateful mechanisms.
3580
3581         It introduces the following three developer-facing things:
3582         - A new readonly attribute, document.hasStorageAccess.
3583         - A new function, document.requestStorageAccess().
3584         - A new iframe sandbox token, allow-storage-access-by-user-activation.
3585
3586         * Shared/WebCoreArgumentCoders.cpp:
3587         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
3588         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
3589             Storage handling of the new type of data.
3590         * Shared/WebPreferencesDefinitions.h:
3591         * UIProcess/API/C/WKPreferences.cpp:
3592         (WKPreferencesSetStorageAccessAPIEnabled):
3593         (WKPreferencesGetStorageAccessAPIEnabled):
3594         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3595         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3596             Bumped the model version from 9 to 10.
3597         * WebProcess/WebPage/WebPage.cpp:
3598         (WebKit::WebPage::updatePreferences):
3599
3600 2017-09-13  Sergio Villar Senin  <svillar@igalia.com>
3601
3602         [WebVR] Add IDLs and stubs
3603         https://bugs.webkit.org/show_bug.cgi?id=174202
3604
3605         Reviewed by Dean Jackson.
3606
3607         * Shared/WebPreferencesDefinitions.h:
3608         * WebProcess/WebPage/WebPage.cpp:
3609         (WebKit::WebPage::updatePreferences):
3610
3611 2017-09-12  Ryosuke Niwa  <rniwa@webkit.org>
3612
3613         Dragging & dropping a file creates an attachment element even when it's disabled
3614         https://bugs.webkit.org/show_bug.cgi?id=176769
3615
3616         Reviewed by Tim Horton.
3617
3618         * UIProcess/API/C/WKPreferences.cpp:
3619         (WKPreferencesSetAttachmentElementEnabled):
3620         (WKPreferencesGetAttachmentElementEnabled):
3621         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3622         * WebProcess/WebPage/WebPage.cpp:
3623         (WebKit::WebPage::updatePreferences):
3624
3625 2017-09-12  Youenn Fablet  <youenn@apple.com>
3626
3627         Introduce a RecordData for Cache to efficiently check whether it matches a corresponding request or not
3628         https://bugs.webkit.org/show_bug.cgi?id=176579
3629
3630         Reviewed by Alex Christensen.
3631
3632         Introducing RecordData that splits its stored data in mandatory data,
3633         used to check a record with a request and optional data that is
3634         necessary to build a CacheStorageEngine::Record used by WebProcess.
3635
3636         The mandatory data contains the URL, Vary header information and identifiers.
3637         Adding routines to go from a Record to RecordData and vice versa.
3638         Storing in CacheStorage::Cache RecordData instead of Record.
3639
3640         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
3641         (WebKit::CacheStorage::queryCache):
3642         (WebKit::CacheStorage::updateVaryInformation):
3643         (WebKit::CacheStorage::toRecord):
3644         (WebKit::CacheStorage::toRecordData):
3645         (WebKit::CacheStorage::Cache::retrieveRecords const):
3646         (WebKit::CacheStorage::Cache::addRecord):
3647         (WebKit::CacheStorage::Cache::recordsFromURL):
3648         (WebKit::CacheStorage::Cache::recordsFromURL const):
3649         (WebKit::CacheStorage::Cache::put):
3650         (WebKit::CacheStorage::Cache::writeRecordToDisk):
3651         (WebKit::CacheStorage::Cache::removeRecordFromDisk):
3652         * NetworkProcess/cache/CacheStorageEngineCache.h:
3653
3654 2017-09-12  Dan Bernstein  <mitz@apple.com>
3655
3656         Tried to fix the iOS 10 build after r221930.
3657
3658         * UIProcess/API/Cocoa/WKWebView.mm:
3659         (-[WKWebView _initializeWithConfiguration:]):
3660         (-[WKWebView _setDragInteractionPolicy:]):
3661
3662 2017-09-12  Dan Bernstein  <mitz@apple.com>
3663
3664         Update availability annotations to match the macOS 10.13 and iOS 11.0 GM seed SDKs
3665         https://bugs.webkit.org/show_bug.cgi?id=176793
3666
3667         Reviewed by Tim Horton.
3668
3669         Changed WK_MAC_TBA and WK_IOS_TBA to 10.13 and 11.0, respectively, in all declarations that
3670         appear in the GM seed SDKs. Additional changes and exceptions are noted below.
3671
3672         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added missing availability annotation to
3673           -_webView:dataOwnerForDropSession: and -_webView:dataOwnerForDragSession:.
3674
3675         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Removed rednundant
3676           __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000 guards.
3677
3678         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: Added missing availability annotation to
3679           -_setResourceLoadStatisticsTestingCallback:.
3680
3681         * UIProcess/API/Cocoa/_WKFullscreenDelegate.h: Added missing availability annotation.
3682
3683         * UIProcess/API/Cocoa/_WKLinkIconParameters.h: Added availability annotation that had been
3684           missing since macOS 10.12.3 and iOS 10.3. Corrected annotation for _WKLinkIconParameters.
3685
3686         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: Added missing TBA annotation to
3687           _resourceLoadStatisticsDirectory.
3688
3689         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Removed iOS
3690           availability from macOS-only declaration and vice versa.
3691
3692         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm:
3693         (-[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:]): Removed an availability
3694           annotation from this method implementation.
3695
3696         * Shared/API/Cocoa/WKDragDestinationAction.h:
3697         * UIProcess/API/Cocoa/WKContentRuleList.h:
3698         * UIProcess/API/Cocoa/WKContentRuleListStore.h:
3699         * UIProcess/API/Cocoa/WKError.h:
3700         * UIProcess/API/Cocoa/WKFrameInfo.h:
3701         * UIProcess/API/Cocoa/WKHTTPCookieStore.h:
3702         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
3703         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
3704         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3705         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3706         * UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
3707         * UIProcess/API/Cocoa/WKURLSchemeHandler.h:
3708         * UIProcess/API/Cocoa/WKURLSchemeTask.h:
3709         * UIProcess/API/Cocoa/WKURLSchemeTaskPrivate.h:
3710         * UIProcess/API/Cocoa/WKUserContentController.h:
3711         * UIProcess/API/Cocoa/WKWebView.h:
3712         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3713         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3714         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
3715         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
3716         * UIProcess/API/Cocoa/WKWindowFeaturesPrivate.h:
3717         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
3718         * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
3719         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
3720         * UIProcess/API/Cocoa/_WKGeolocationCoreLocationProvider.h:
3721         * UIProcess/API/Cocoa/_WKGeolocationPosition.h:
3722         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
3723         * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
3724         * UIProcess/API/Cocoa/_WKUserContentFilterPrivate.h:
3725         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
3726         * UIProcess/_WKWebViewPrintFormatter.h:
3727         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
3728         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h:
3729         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
3730
3731 2017-09-12  Alex Christensen  <achristensen@webkit.org>
3732
3733         Add WKUIDelegatePrivate equivalent of WKPageUIClient's runModal
3734         https://bugs.webkit.org/show_bug.cgi?id=176728
3735         <rdar://problem/29270035>
3736         
3737         Covered by a new API test.
3738
3739         Reviewed by Tim Horton.
3740
3741         * UIProcess/API/APIUIClient.h:
3742         (API::UIClient::runModal):
3743         * UIProcess/API/C/WKPage.cpp:
3744         (WKPageSetPageUIClient):
3745         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3746         * UIProcess/Cocoa/UIDelegate.h:
3747         * UIProcess/Cocoa/UIDelegate.mm:
3748         (WebKit::UIDelegate::setDelegate):
3749         (WebKit::UIDelegate::UIClient::canRunModal const):
3750         (WebKit::UIDelegate::UIClient::runModal):
3751         * UIProcess/WebPageProxy.cpp:
3752         (WebKit::WebPageProxy::runModal):
3753
3754 2017-09-12  Alex Christensen  <achristensen@webkit.org>
3755
3756         Add WKUIDelegatePrivate equivalent of WKPageUIClient's decidePolicyForNotificationPermissionRequest
3757         https://bugs.webkit.org/show_bug.cgi?id=176768
3758         <rdar://problem/29270035>
3759
3760         Reviewed by Tim Horton.
3761
3762         Covered by a new API test.
3763
3764         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3765         * UIProcess/Cocoa/UIDelegate.h:
3766         * UIProcess/Cocoa/UIDelegate.mm:
3767         (WebKit::UIDelegate::setDelegate):
3768         (WebKit::UIDelegate::UIClient::runBeforeUnloadConfirmPanel):
3769         (WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
3770         (WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):
3771         (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
3772
3773 2017-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
3774
3775         [iOS DnD] Support DataTransfer.setDragImage when starting a drag on iOS
3776         https://bugs.webkit.org/show_bug.cgi?id=176721
3777         <rdar://problem/34373660>
3778
3779         Reviewed by Tim Horton.
3780
3781         Rename elementBounds => dragPreviewFrameInRootViewCoordinates.
3782
3783         * UIProcess/ios/DragDropInteractionState.h:
3784         * UIProcess/ios/DragDropInteractionState.mm:
3785         (WebKit::DragDropInteractionState::previewForDragItem const):
3786         (WebKit::DragDropInteractionState::stageDragItem):
3787
3788 2017-09-11  Tim Horton  <timothy_horton@apple.com>
3789
3790         REGRESSION (r221272): WKWebView gets stuck zoomed in if the web process crashes
3791         https://bugs.webkit.org/show_bug.cgi?id=176767
3792         <rdar://problem/34196874>
3793
3794         Reviewed by Dan Bernstein.
3795
3796         * UIProcess/API/Cocoa/WKWebView.mm:
3797         (-[WKWebView _processDidExit]):
3798         Reset the "last sent" layout parameters when the Web Content process exits.
3799         They're no longer "last sent", and if we short-circuit from sending them
3800         again (from under _didRelaunchProcess), we will never send the correct
3801         layout width (until it changes).
3802
3803 2017-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
3804
3805         [iOS WK2] Support tapping to add items to the current drag session in web content
3806         https://bugs.webkit.org/show_bug.cgi?id=176421
3807         <rdar://problem/31144674>
3808
3809         Reviewed by Tim Horton.
3810
3811         To request additional drag items, end the current drag in the web page and try to begin a drag at the new
3812         location. This process is transparent to the UI process, which still maintains the same UIDragSession with the
3813         old drag source.
3814
3815         As opposed to firing a new event (for instance: `adddragitem`), this approach is taken to ensure that if the
3816         page wants to preventDefault() on `dragstart`, it would also prevent the user from adding it as an additional
3817         drag item. Using the new event approach, dealing with this case would either require the page to listen for a
3818         new event and call preventDefault(), which would break compatibility with pages that only preventDefault() on
3819         `dragstart`, or it would require the default behavior of this new event to be _not_ adding a drag item, in which
3820         case this approach would require pages to adopt the new event in some form.
3821
3822         * WebProcess/WebPage/ios/WebPageIOS.mm:
3823         (WebKit::WebPage::requestAdditionalItemsForDragSession):
3824
3825 2017-09-11  Alex Christensen  <achristensen@webkit.org>
3826
3827         Clean up API::UIClient
3828         https://bugs.webkit.org/show_bug.cgi?id=176568
3829
3830         Reviewed by Brady Eidson.
3831
3832         We don't need createNewPage and createNewPageAsync.
3833         An async version can support synchronous delegate calls by just calling the completion handler synchronously.
3834
3835         * UIProcess/API/APIUIClient.h:
3836         (API::UIClient::createNewPage):
3837         (API::UIClient::createNewPageAsync): Deleted.
3838         (API::UIClient::canCreateNewPageAsync): Deleted.
3839         * UIProcess/API/C/WKPage.cpp:
3840         (WKPageSetPageUIClient):
3841         * UIProcess/API/glib/WebKitUIClient.cpp:
3842         * UIProcess/API/glib/WebKitUIClient.h:
3843         * UIProcess/Cocoa/UIDelegate.h:
3844         * UIProcess/Cocoa/UIDelegate.mm:
3845         (WebKit::UIDelegate::UIClient::createNewPage):
3846         (WebKit::UIDelegate::UIClient::createNewPageCommon): Deleted.
3847         (WebKit::UIDelegate::UIClient::canCreateNewPageAsync): Deleted.
3848         (WebKit::UIDelegate::UIClient::createNewPageAsync): Deleted.
3849         * UIProcess/WebPageProxy.cpp:
3850         (WebKit::WebPageProxy::createNewPage):
3851         * UIProcess/WebPageProxy.h:
3852
3853 2017-09-11  Alex Christensen  <achristensen@webkit.org>
3854
3855         Fix memory leak introduced in r221894.
3856         https://bugs.webkit.org/show_bug.cgi?id=176753
3857
3858         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp:
3859         (WebKit::NotificationPermissionRequestManagerProxy::createRequest):
3860         The NotificationPermissionRequestManagerProxy keeps track of pending requests
3861         so they can be denied when invalidating the page.  We add them to a HashMap and in
3862         r221894 I removed the code that removes them from that map once the request is complete.
3863         This code adds the completed task removal back.
3864         The NotificationPermissionRequestManagerProxy and WebPageProxy have the same lifetime,
3865         so protecting the WebPageProxy (m_page) makes sure there is no use-after-free when the
3866         completion handler is called.
3867
3868 2017-09-11  Alex Christensen  <achristensen@webkit.org>
3869
3870         Make NotificationPermissionRequest work with completion handlers
3871         https://bugs.webkit.org/show_bug.cgi?id=176753
3872
3873         Reviewed by Andy Estes.
3874
3875         API::UIClient::decidePolicyForNotificationPermissionRequest should take a completion handler
3876         which it will eventually call with a bool representing whether notifications are allowed.
3877         To do this, I make NotificationPermissionRequest just a wrapper for a lambda.
3878         One subtle change in behavior is when invalidating all outstanding requests, we deny them instead
3879         of just dropping them.  This results in a deny message sent where there wasn't one before,
3880         resulting in better cleanup in NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision.
3881
3882         * UIProcess/API/APIUIClient.h:
3883         (API::UIClient::decidePolicyForNotificationPermissionRequest):
3884         * UIProcess/API/C/WKPage.cpp:
3885         (WKPageSetPageUIClient):
3886         * UIProcess/Notifications/NotificationPermissionRequest.cpp: Removed.
3887         * UIProcess/Notifications/NotificationPermissionRequest.h:
3888         (WebKit::NotificationPermissionRequest::create):
3889         (WebKit::NotificationPermissionRequest::allow):
3890         (WebKit::NotificationPermissionRequest::deny):
3891         (WebKit::NotificationPermissionRequest::NotificationPermissionRequest):
3892         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp:
3893         (WebKit::NotificationPermissionRequestManagerProxy::invalidateRequests):
3894         (WebKit::NotificationPermissionRequestManagerProxy::createRequest):
3895         (WebKit::NotificationPermissionRequestManagerProxy::didReceiveNotificationPermissionDecision): Deleted.
3896         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h:
3897         * UIProcess/WebPageProxy.cpp:
3898         (WebKit::WebPageProxy::requestNotificationPermission):
3899         * WebKit.xcodeproj/project.pbxproj:
3900
3901 2017-09-11  Alex Christensen  <achristensen@webkit.org>
3902
3903         Modernize and make API::UIClient more asynchronous
3904         https://bugs.webkit.org/show_bug.cgi?id=176583
3905
3906         Reviewed by Brian Burg.
3907
3908         API::UIClient calls that return values synchronously require synchronous APIs unnecessarily.
3909         Having them call completion handlers with the results instead allows us to make asynchronous
3910         APIs, and existing synchronous APIs can just call the completion handlers immediately.
3911         
3912         Unfortunately an assumption that API::UIClient::windowFrame returns synchronously had worked
3913         its way into the WebAutomationSession, which calls WebPageProxy::getWindowFrame.  Making it
3914         asynchronous required making some automation protocols asynchronous so they can send their
3915         result once they have the resulting frames from the UIClient.
3916         
3917         No change in behaviour.
3918
3919         * UIProcess/API/APIUIClient.h:
3920         (API::UIClient::setToolbarsAreVisible):
3921         (API::UIClient::menuBarIsVisible):
3922         (API::UIClient::setMenuBarIsVisible):
3923         (API::UIClient::statusBarIsVisible):
3924         (API::UIClient::setStatusBarIsVisible):
3925         (API::UIClient::isResizable):
3926         (API::UIClient::setIsResizable):
3927         (API::UIClient::setWindowFrame):
3928         (API::UIClient::windowFrame):
3929         (API::UIClient::headerHeight):
3930         (API::UIClient::footerHeight):
3931         (API::UIClient::drawHeader):
3932         (API::UIClient::drawFooter):
3933         (API::UIClient::printFrame):
3934         * UIProcess/API/C/WKPage.cpp:
3935         (WKPageSetPageUIClient):
3936         * UIProcess/Automation/Automation.json:
3937         * UIProcess/Automation/WebAutomationSession.cpp:
3938         (WebKit::WebAutomationSession::buildBrowsingContextForPage):
3939         (WebKit::WebAutomationSession::getNextContext):
3940         (WebKit::WebAutomationSession::getBrowsingContexts):
3941         (WebKit::WebAutomationSession::getBrowsingContext):
3942         (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
3943         (WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
3944         (WebKit::WebAutomationSession::performMouseInteraction):
3945         * UIProcess/Automation/WebAutomationSession.h:
3946         * UIProcess/Cocoa/UIDelegate.h:
3947         * UIProcess/Cocoa/UIDelegate.mm:
3948         (WebKit::UIDelegate::UIClient::printFrame):
3949         * UIProcess/Cocoa/WebViewImpl.mm:
3950         (WebKit::WebViewImpl::printOperationWithPrintInfo):
3951         * UIProcess/WebPageProxy.cpp:
3952         (WebKit::WebPageProxy::runJavaScriptPrompt):
3953         (WebKit::WebPageProxy::setToolbarsAreVisible):
3954         (WebKit::WebPageProxy::setMenuBarIsVisible):
3955         (WebKit::WebPageProxy::getMenuBarIsVisible):
3956         (WebKit::WebPageProxy::setStatusBarIsVisible):
3957         (WebKit::WebPageProxy::getStatusBarIsVisible):
3958         (WebKit::WebPageProxy::setIsResizable):
3959         (WebKit::WebPageProxy::getIsResizable):
3960         (WebKit::WebPageProxy::setWindowFrame):
3961         (WebKit::WebPageProxy::getWindowFrame):
3962         (WebKit::WebPageProxy::getWindowFrameWithCompletionHandler):
3963         (WebKit::WebPageProxy::screenToRootView):
3964         (WebKit::WebPageProxy::rootViewToScreen):
3965         (WebKit::WebPageProxy::printFrame):
3966         (WebKit::WebPageProxy::headerHeight):
3967         (WebKit::WebPageProxy::footerHeight):
3968         (WebKit::WebPageProxy::drawHeader):
3969         (WebKit::WebPageProxy::drawFooter):
3970         * UIProcess/WebPageProxy.h:
3971         * UIProcess/WebPageProxy.messages.in:
3972         * UIProcess/mac/WKPrintingView.h:
3973         * UIProcess/mac/WKPrintingView.mm:
3974         (-[WKPrintingView initWithFrameProxy:view:]):
3975         (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]):
3976         (-[WKPrintingView drawPageBorderWithSize:]):
3977         * UIProcess/mac/WebPageProxyMac.mm:
3978         (WebKit::WebPageProxy::windowAndViewFramesChanged):
3979
3980 2017-09-11  Stephan Szabo  <stephan.szabo@sony.com>
3981
3982         [WinCairo] Add entry Web Process files for wincairo webkit
3983         https://bugs.webkit.org/show_bug.cgi?id=176570
3984
3985         Reviewed by Alex Christensen.
3986
3987         * PlatformWin.cmake:
3988         * WebProcess/EntryPoint/win/WebProcessMain.cpp: Added.
3989         * WebProcess/win/WebProcessMainWin.cpp: Added.
3990         * WebProcess/win/WebProcessMainWin.h: Added.
3991
3992 2017-09-11  Alex Christensen  <achristensen@webkit.org>
3993
3994         Add WKUIDelegatePrivate equivalent of WKPageUIClient's decidePolicyForGeolocationPermissionRequest
3995         https://bugs.webkit.org/show_bug.cgi?id=176642
3996         <rdar://problem/29270035>
3997
3998         Reviewed by Darin Adler.
3999
4000         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
4001         * UIProcess/Cocoa/UIDelegate.h:
4002         * UIProcess/Cocoa/UIDelegate.mm:
4003         (WebKit::UIDelegate::setDelegate):
4004         (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
4005         (WebKit::Function<void):
4006
4007 2017-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
4008
4009         [iOS DnD] Elements in the DOM with the `draggable` attribute should be draggable
4010         https://bugs.webkit.org/show_bug.cgi?id=176664
4011         <rdar://problem/32596156>
4012
4013         Reviewed by Tim Horton.
4014
4015         Makes a simple adjustment in DragDropInteractionState::previewForDragItem to respect the drag image supplied to
4016         the UI process during a "DHTML"-defined drag (i.e. DragSourceActionDHTML).
4017
4018         Test: DataInteractionTests.CanStartDragOnDivWithDraggableAttribute
4019
4020         * UIProcess/API/Cocoa/WKWebView.mm:
4021         (-[WKWebView _simulateDataInteractionEntered:]): Deleted.
4022         (-[WKWebView _simulateDataInteractionUpdated:]): Deleted.
4023         (-[WKWebView _simulateDataInteractionPerformOperation:]): Deleted.
4024         (-[WKWebView _simulateDataInteractionEnded:]): Deleted.
4025         (-[WKWebView _simulateDataInteractionSessionDidEnd:]): Deleted.
4026         (-[WKWebView _simulateWillBeginDataInteractionWithSession:]): Deleted.
4027         (-[WKWebView _simulatedItemsForSession:]): Deleted.
4028         (-[WKWebView _simulateItemsForAddingToSession:atLocation:completion:]): Deleted.
4029         (-[WKWebView _simulatePrepareForDataInteractionSession:completion:]): Deleted.
4030
4031         Remove all -_simulate*: testing helpers on WKWebView.
4032
4033         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
4034         * UIProcess/ios/DragDropInteractionState.mm:
4035         (WebKit::shouldUseDragImageToCreatePreviewForDragSource):
4036         (WebKit::shouldUseTextIndicatorToCreatePreviewForDragSource):
4037
4038         Add shouldUseDragImageToCreatePreviewForDragSource, which returns YES when dragging an image or DHTML-defined
4039         draggable element and the drag image exists. This is called from previewForDragItem when constructing the drag
4040         preview for a given UIDragItem.
4041
4042         (WebKit::DragDropInteractionState::previewForDragItem const):
4043         (WebKit::shouldUseTextIndicatorToCreatePreviewForDragAction): Deleted.
4044         * UIProcess/ios/WKContentViewInteraction.h:
4045         * UIProcess/ios/WKContentViewInteraction.mm:
4046         (-[WKContentView _simulateDataInteractionEntered:]): Deleted.
4047         (-[WKContentView _simulateDataInteractionUpdated:]): Deleted.
4048         (-[WKContentView _simulateDataInteractionEnded:]): Deleted.
4049         (-[WKContentView _simulateDataInteractionPerformOperation:]): Deleted.
4050         (-[WKContentView _simulateDataInteractionSessionDidEnd:]): Deleted.