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