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