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