iOS: Split keyboard should not shrink visualViewport.height
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-01-24  Ryosuke Niwa  <rniwa@webkit.org>
2
3         iOS: Split keyboard should not shrink visualViewport.height
4         https://bugs.webkit.org/show_bug.cgi?id=193798
5
6         Reviewed by Tim Horton.
7
8         Treat a split keyboard like a floating keyboard and don't consider its input view bounds in computing the visible content rects.
9
10         No new tests since while it's possible to transition between split and merged keyboard using some SPI,
11         there isn't a reliable mechanism to reset the keyboard state. e.g. we need to wait for a hard-coded amount of time.
12
13         * Platform/spi/ios/UIKitSPI.h:
14         * UIProcess/API/Cocoa/WKWebView.mm:
15         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
16
17 2019-01-24  Eric Carlson  <eric.carlson@apple.com>
18
19         [iOS] Silence MediaPlayer compile warnings
20         https://bugs.webkit.org/show_bug.cgi?id=193780
21         <rdar://problem/47518428>
22
23         Reviewed by Jer Noble.
24
25         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
26
27 2019-01-24  Truitt Savell  <tsavell@apple.com>
28
29         Unreviewed, rolling out r240446.
30
31         Casued 5 API failures
32
33         Reverted changeset:
34
35         "Activate the WebResourceLoadStatisticsStore in the
36         NetworkProcess and deactivate it in the UIProcess."
37         https://bugs.webkit.org/show_bug.cgi?id=193297
38         https://trac.webkit.org/changeset/240446
39
40 2019-01-24  Brent Fulgham  <bfulgham@apple.com>
41
42         Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
43         https://bugs.webkit.org/show_bug.cgi?id=193297
44         <rdar://problem/47158841>
45
46         Reviewed by Alex Christensen.
47
48         This patch activates the ResourceLoadStatistics code in the NetworkProcess, and turns
49         it off in the UIProcess. It also updates test infrastructure to work with this change
50         in architecture.
51
52         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
53         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceLoading): Added.
54         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceRedirect): Added.
55         (WebKit::ResourceLoadStatisticsMemoryStore::logWebSocketLoading): Added.
56         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
57         (WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): Added.
58         (WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): Added.
59         (WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): Added.
60         (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
61         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
62         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources): Deleted.
63         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
64         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
65         (WebKit::NetworkConnectionToWebProcess::logSubresourceLoading): Added.
66         (WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect): Added.
67         (WebKit::NetworkConnectionToWebProcess::logWebSocketLoading): Added.
68         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
69         * NetworkProcess/NetworkSession.cpp:
70         (WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
71         * UIProcess/WebProcessPool.cpp:
72         (WebKit::WebProcessPool::ensureNetworkProcess):
73         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
74         (WebKit::WebsiteDataStore::parameters):
75         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
76         (WebKit::WebsiteDataStore::removeData):
77         (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
78         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
79         * Webprocess/WebProcess.cpp:
80         (WebKit::WebProcess::initializeWebProcess): Register new ResourceLoadObserver callbacks.
81
82 2019-01-24  John Wilander  <wilander@apple.com>
83
84         Add Ad Click Attribution as an internal/experimental feature
85         https://bugs.webkit.org/show_bug.cgi?id=193685
86         <rdar://problem/47450399>
87
88         Reviewed by Brent Fulgham.
89
90         * Shared/WebPreferences.yaml:
91             Added AdClickAttributionEnabled as a runtime enabled feature, off by default.
92
93 2019-01-24  Antti Koivisto  <antti@apple.com>
94
95         [PSON] Flash on back navigation on Mac
96         https://bugs.webkit.org/show_bug.cgi?id=193716
97         <rdar://problem/47148458>
98
99         Reviewed by Chris Dumez.
100
101         We close the page immediately if we fail to suspend. Layers disappear and we get a flash.
102
103         * UIProcess/SuspendedPageProxy.cpp:
104         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
105         (WebKit::SuspendedPageProxy::close):
106
107         Track closed state so we don't send the message twice, causing unhandled message errors in web process.
108
109         (WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
110
111         Close the suspended page if the suspension fails.
112         Skip this if we are using web process side compositing on Mac.
113
114         * UIProcess/SuspendedPageProxy.h:
115         * UIProcess/WebPageProxy.cpp:
116         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
117
118         On Mac, close the failed SuspendedPageProxy when entering compositing mode. At this point we don't need it to keep layers alive.
119
120         * UIProcess/WebProcessPool.cpp:
121         (WebKit::WebProcessPool::closeFailedSuspendedPagesForPage):
122         * UIProcess/WebProcessPool.h:
123         * WebProcess/WebPage/WebPage.cpp:
124         (WebKit::WebPage::suspendForProcessSwap):
125
126         Don't close the page on suspension failure. This is now managed by the UI process.
127
128 2019-01-24  Chris Dumez  <cdumez@apple.com>
129
130         Regression(PSON) Back/Forward list items' URL sometimes gets replaced with the URL of a subframe
131         https://bugs.webkit.org/show_bug.cgi?id=193761
132         <rdar://problem/47456405>
133
134         Reviewed by Alex Christensen.
135
136         When doing a history navigation cross-process, the UIProcess would first send the back/forward list items
137         to the destination WebProcess via WebPage::updateBackForwardListForReattach(), then ask the process to
138         navigate to the expected back/forward list item.
139
140         WebPage::updateBackForwardListForReattach() would call restoreSessionInternal(), which would call
141         toHistoryItem() on each BackForwardListItem. This may end up creating more than one HistoryItem for each
142         BackForwardListItem because HistoryItems are part of a tree (each frame has its own list of history items).
143
144         Note that BackForwardListItems and HistoryItem share a BackForwardItemIdentifier which is a
145         (processIdentifier, itemIdentifier) pair. We normally generate the HistoryItem's identifier from inside
146         its constructor like so:
147         `{ Process::identifier(), generateObjectIdentifier<BackForwardItemIdentifier::ItemIdentifierType>() }`
148
149         However, when calling updateBackForwardListForReattach() and constructing children HistoryItem,
150         applyFrameState() would generate the identifier by itself and passing it to the HistoryItem constructor.
151         Its genegates the ID the exact same way so this would in theory not be a problem. Unfortunately, both
152         calls to generateObjectIdentifier() get inlined and both call sites end up with their own static counter
153         to generate ids. As a result, we may end up with conflicts as HistoryItems for child frames (restored
154         by restoreSessionInternal()) can end up with the same identifier as HistoryItems for top frames.
155
156         This confusion would lead to the WebContent process sending the UIProcess bad information and the URL
157         of subframes could end up as the WebBackForwardListItem's mainframe URL.
158
159         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
160         (WebKit::applyFrameState):
161         Stop calling generateObjectIdentifier() explicitly and let the HistoryItem constructor take care of it.
162         Calling generateObjectIdentifier() for the same type from different places is not safe due to inlining.
163
164 2019-01-24  Ross Kirsling  <ross.kirsling@sony.com>
165
166         Move FileSystem to WTF
167         https://bugs.webkit.org/show_bug.cgi?id=193602
168
169         Reviewed by Yusuke Suzuki.
170
171         * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp:
172         * NetworkProcess/NetworkDataTaskBlob.h:
173         * NetworkProcess/NetworkProcess.cpp:
174         * NetworkProcess/cache/CacheStorageEngine.cpp:
175         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
176         * NetworkProcess/cache/NetworkCache.cpp:
177         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
178         * NetworkProcess/cache/NetworkCacheData.cpp:
179         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
180         * NetworkProcess/cache/NetworkCacheFileSystem.h:
181         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
182         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
183         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
184         * NetworkProcess/cache/NetworkCacheStorage.cpp:
185         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
186         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
187         * NetworkProcess/mac/NetworkProcessMac.mm:
188         * NetworkProcess/soup/NetworkProcessSoup.cpp:
189         * PluginProcess/unix/PluginProcessMainUnix.cpp:
190         * Shared/PersistencyUtils.cpp:
191         * Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:
192         * Shared/Plugins/unix/PluginSearchPath.cpp:
193         * Shared/WebMemorySampler.h:
194         * Shared/glib/ProcessExecutablePathGLib.cpp:
195         * Shared/ios/ChildProcessIOS.mm:
196         * Shared/mac/ChildProcessMac.mm:
197         * Shared/mac/SandboxExtensionMac.mm:
198         * UIProcess/API/APIContentRuleListStore.cpp:
199         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
200         * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
201         * UIProcess/API/glib/IconDatabase.cpp:
202         * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
203         * UIProcess/API/glib/WebKitFileChooserRequest.cpp:
204         * UIProcess/API/glib/WebKitWebContext.cpp:
205         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
206         * UIProcess/API/win/APIWebsiteDataStoreWin.cpp:
207         * UIProcess/Automation/WebAutomationSession.cpp:
208         * UIProcess/Cocoa/DownloadClient.mm:
209         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
210         * UIProcess/Cocoa/WebViewImpl.mm:
211         * UIProcess/DeviceIdHashSaltStorage.cpp:
212         * UIProcess/Downloads/DownloadProxy.cpp:
213         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
214         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
215         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
216         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
217         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
218         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
219         * UIProcess/ServiceWorkerProcessProxy.cpp:
220         * UIProcess/WebStorage/LocalStorageDatabase.cpp:
221         * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
222         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
223         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
224         * UIProcess/glib/WebProcessProxyGLib.cpp:
225         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
226         * UIProcess/gtk/WebProcessPoolGtk.cpp:
227         * UIProcess/ios/WKContentViewInteraction.mm:
228         * UIProcess/ios/forms/WKFileUploadPanel.mm:
229         * UIProcess/mac/WebPageProxyMac.mm:
230         * UIProcess/win/WebProcessPoolWin.cpp:
231         * UIProcess/win/WebView.cpp:
232         * UIProcess/wpe/WebProcessPoolWPE.cpp:
233         * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp:
234         * WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp:
235         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
236         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
237         * WebProcess/Plugins/PluginProcessConnection.cpp:
238         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
239         * WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:
240         * WebProcess/WebPage/win/WebInspectorUIWin.cpp:
241         * WebProcess/cocoa/WebProcessCocoa.mm:
242
243 2019-01-23  Simon Fraser  <simon.fraser@apple.com>
244
245         Create "frame hosting" nodes for the scrolling tree
246         https://bugs.webkit.org/show_bug.cgi?id=193753
247
248         Reviewed by Antti Koivisto.
249
250         When the scrolling tree crosses frame boundaries, mutations in the parent frame currently
251         require the iframe's scrolling node to get reparented in a new ancestor, which requires
252         a layer tree walk of the parent frame. This is error-prone, and not very future-proof.
253
254         Fix this by introducing "frame hosting" scrolling tree nodes. These are mostly inert
255         nodes that are owned by the RenderIFrame's layer backing in the parent frame, and exist
256         to provide a consistent parent node for the subframe's scrolling node.
257
258         This patch adds the node types, but does not instantiate them yet.
259
260         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
261         (ArgumentCoder<ScrollingStateFrameHostingNode>::encode):
262         (ArgumentCoder<ScrollingStateFrameHostingNode>::decode):
263         (WebKit::encodeNodeAndDescendants):
264         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
265         (WebKit::dump):
266         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
267         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
268         * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
269         (WebKit::RemoteScrollingTree::createScrollingTreeNode):
270         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
271         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
272
273 2019-01-23  Ross Kirsling  <ross.kirsling@sony.com>
274
275         [Curl] Unreviewed build fix for r240292 and friends.
276
277         WinCairo test stability must be restored in subsequent patch.
278
279         * NetworkProcess/curl/NetworkProcessCurl.cpp:
280         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
281         (WebKit::NetworkProcess::setNetworkProxySettings):
282
283 2019-01-23  Commit Queue  <commit-queue@webkit.org>
284
285         Unreviewed, rolling out r240403.
286         https://bugs.webkit.org/show_bug.cgi?id=193757
287
288         "Causes multiple crashes on macOS port (probably used wrong
289         ENABLE macro)" (Requested by ddkilzer on #webkit).
290
291         Reverted changeset:
292
293         "[Curl] Unreviewed build fix for r240292 and friends."
294         https://trac.webkit.org/changeset/240403
295
296 2019-01-23  Ross Kirsling  <ross.kirsling@sony.com>
297
298         [Curl] Unreviewed build fix for r240292 and friends.
299
300         WinCairo test stability must be restored in subsequent patch.
301
302         * NetworkProcess/curl/NetworkProcessCurl.cpp:
303         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
304         (WebKit::NetworkProcess::setNetworkProxySettings):
305
306 2019-01-23  Alex Christensen  <achristensen@webkit.org>
307
308         Stop using NetworkProcess::singleton
309         https://bugs.webkit.org/show_bug.cgi?id=193700
310
311         Reviewed by Don Olmstead.
312
313         This replaces it with a NeverDestroyed<NetworkProcess> and paves the way for more interesting things.
314
315         * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
316         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
317         (WebKit::initializeChildProcess<WebKit::NetworkProcess>):
318         * NetworkProcess/NetworkProcess.cpp:
319         (WebKit::NetworkProcess::NetworkProcess):
320         (WebKit::NetworkProcess::singleton): Deleted.
321         * NetworkProcess/NetworkProcess.h:
322         * NetworkProcess/soup/NetworkProcessMainSoup.cpp:
323         (WebKit::initializeChildProcess<WebKit::NetworkProcess>):
324         * NetworkProcess/win/NetworkProcessMainWin.cpp:
325         (WebKit::initializeChildProcess<WebKit::NetworkProcess>):
326         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
327         (WebKit::initializeChildProcess):
328         (WebKit::XPCServiceInitializer):
329
330 2019-01-23  Ryan Haddad  <ryanhaddad@apple.com>
331
332         Unreviewed, rolling out r240343.
333
334         Caused 4 PSON API test failures.
335
336         Reverted changeset:
337
338         "[PSON] Flash on back navigation on Mac"
339         https://bugs.webkit.org/show_bug.cgi?id=193716
340         https://trac.webkit.org/changeset/240343
341
342 2019-01-23  Chris Dumez  <cdumez@apple.com>
343
344         Deprecate API to limit the maximum number of WebProcesses
345         https://bugs.webkit.org/show_bug.cgi?id=193725
346         <rdar://problem/47464879>
347
348         Reviewed by Geoff Garen.
349
350         Deprecate API to limit the maximum number of WebProcesses and make it a no-op. It adds
351         complexity and is not safe (conflicts with PSON).
352
353         Add a new usesSingleWebProcess SPI to _WKProcessPoolConfiguration to be used by
354         Minibrowser / Safari in order to disable process per tab (can be useful for debugging).
355         Note that enabling the single WebProcess mode will disable PSON and process prewarming.
356
357         * UIProcess/API/APIProcessPoolConfiguration.cpp:
358         (API::ProcessPoolConfiguration::createWithLegacyOptions):
359         (API::ProcessPoolConfiguration::copy):
360         * UIProcess/API/APIProcessPoolConfiguration.h:
361         * UIProcess/API/C/WKContext.cpp:
362         (WKContextSetMaximumNumberOfProcesses):
363         (WKContextGetMaximumNumberOfProcesses):
364         * UIProcess/API/C/WKContext.h:
365         * UIProcess/API/Cocoa/WKProcessPool.mm:
366         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
367         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
368         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
369         (-[_WKProcessPoolConfiguration maximumProcessCount]):
370         (-[_WKProcessPoolConfiguration setMaximumProcessCount:]):
371         (-[_WKProcessPoolConfiguration usesSingleWebProcess]):
372         (-[_WKProcessPoolConfiguration setUsesSingleWebProcess:]):
373         (-[_WKProcessPoolConfiguration description]):
374         * UIProcess/API/glib/WebKitWebContext.cpp:
375         (webkitWebContextConstructed):
376         (webkit_web_context_set_process_model):
377         (webkit_web_context_set_web_process_count_limit):
378         * UIProcess/WebProcessPool.cpp:
379         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
380         (WebKit::WebProcessPool::didReachGoodTimeToPrewarm):
381         (WebKit::WebProcessPool::processForNavigationInternal):
382         * UIProcess/WebProcessPool.h:
383
384 2019-01-23  Brent Fulgham  <bfulgham@apple.com>
385
386         Switch NetworkStorageSession portions of ResourceLoadStatistics to Async message passing style
387         https://bugs.webkit.org/show_bug.cgi?id=193659
388         <rdar://problem/47433290>
389
390         Reviewed by Alex Christensen.
391
392         Change the implementations of ResourceLoadStatistics code in NetworkStorageSession to use the
393         'sendWithAsyncReply' so that more of the code is autogenerated. This should make test runs more
394         consistent, and should reduce the possibility of bookkeeping errors in the message handling
395         implementations.
396
397         Fix the implementation of NetworkProcessProxy::clearCallbackStates to remove the manually constructed
398         (and incomplete) message callbacks. These errors are a big reason to move to the auto-generated
399         'sendWithAsyncReply' implementatoin. Ditto for NetworkProcessProxy::didClose.
400
401         This patch also moves an initializaton call (WebsiteDataStore::didCreateNetworkProcess) from
402         'ensureNetworkProcess' to 'processDidFinishLaunching'. In current code, the call happens before
403         a connection is established to the network process, causing initialization messages to get dropped
404         leading to test system flakiness.
405
406         Finally: The WK API test code was updated to ensure that completion handlers are always called, even
407         when built without ENABLE_RESOURCE_LOAD_STATISTICS defined.
408
409         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
410         * NetworkProcess/Classifier/ShouldGrandfatherStatistics.h: Added.
411         * NetworkProcess/Classifier/StorageAccessStatus.h: Added.
412         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
413         (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
414         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
415         * NetworkProcess/NetworkProcess.cpp:
416         (WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
417         (WebKit::NetworkProcess::setAgeCapForClientSideCookies):
418         (WebKit::NetworkProcess::scheduleClearInMemoryAndPersistent):
419         (WebKit::NetworkProcess::hasStorageAccessForFrame):
420         (WebKit::NetworkProcess::requestStorageAccess):
421         (WebKit::NetworkProcess::grantStorageAccess):
422         (WebKit::NetworkProcess::removeAllStorageAccess):
423         (WebKit::NetworkProcess::setCacheMaxAgeCapForPrevalentResources):
424         (WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
425         (WebKit::NetworkProcess::deleteWebsiteData):
426         * NetworkProcess/NetworkProcess.h:
427         * NetworkProcess/NetworkProcess.messages.in:
428         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
429         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
430         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
431         (WKWebsiteDataStoreStatisticsResetToConsistentState):
432         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
433         * UIProcess/Network/NetworkProcessProxy.cpp:
434         (WebKit::NetworkProcessProxy::clearCallbackStates): Remove incomplete clean-up code that
435         is now autogenerated.
436         (WebKit::NetworkProcessProxy::didClose): Ditto.
437         (WebKit::NetworkProcessProxy::updatePrevalentDomainsToBlockCookiesFor):
438         (WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent):
439         (WebKit::NetworkProcessProxy::setAgeCapForClientSideCookies):
440         (WebKit::NetworkProcessProxy::hasStorageAccessForFrame):
441         (WebKit::NetworkProcessProxy::requestStorageAccess):
442         (WebKit::NetworkProcessProxy::grantStorageAccess):
443         (WebKit::NetworkProcessProxy::removeAllStorageAccess):
444         (WebKit::NetworkProcessProxy::setCacheMaxAgeCapForPrevalentResources):
445         (WebKit::NetworkProcessProxy::setCacheMaxAgeCap):
446         (WebKit::NetworkProcessProxy::resetCacheMaxAgeCapForPrevalentResources):
447         (WebKit::NetworkProcessProxy::didUpdateBlockCookies): Deleted.
448         (WebKit::NetworkProcessProxy::didSetAgeCapForClientSideCookies): Deleted.
449         (WebKit::NetworkProcessProxy::didUpdateRuntimeSettings): Deleted.
450         (WebKit::NetworkProcessProxy::storageAccessRequestResult): Deleted.
451         (WebKit::NetworkProcessProxy::storageAccessOperationResult): Deleted.
452         (WebKit::NetworkProcessProxy::didRemoveAllStorageAccess): Deleted.
453         (WebKit::NetworkProcessProxy::didSetCacheMaxAgeCapForPrevalentResources): Deleted.
454         * UIProcess/Network/NetworkProcessProxy.h:
455         * UIProcess/Network/NetworkProcessProxy.messages.in:
456         * UIProcess/WebPageProxy.cpp:
457         * UIProcess/WebProcessPool.cpp:
458         (WebKit::WebProcessPool::ensureNetworkProcess): Move WebsiteDataStore 'didCreateNetworkProcess'
459         to 'processDidFinishLaunching'. Currently the call happens before a connection is established,
460         causing initialization messages to get dropped.
461         (WebKit::WebProcessPool::processDidFinishLaunching): Ditto.
462         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
463         (WebKit::WebsiteDataStore::removeData):
464         (WebKit::WebsiteDataStore::setMaxStatisticsEntries):
465         (WebKit::WebsiteDataStore::setPruneEntriesDownTo):
466         (WebKit::WebsiteDataStore::setGrandfatheringTime):
467         (WebKit::WebsiteDataStore::setCacheMaxAgeCap):
468         (WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
469         (WebKit::WebsiteDataStore::setPrevalentResource):
470         (WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
471         (WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
472         (WebKit::WebsiteDataStore::setAgeCapForClientSideCookies):
473         (WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
474         (WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured):
475         (WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
476         (WebKit::WebsiteDataStore::setCacheMaxAgeCapForPrevalentResources):
477         (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
478         * UIProcess/WebsiteData/WebsiteDataStore.h:
479         * WebKit.xcodeproj/project.pbxproj:
480
481 2019-01-23  Sihui Liu  <sihui_liu@apple.com>
482
483         Clean up IndexedDB files between tests
484         https://bugs.webkit.org/show_bug.cgi?id=192796
485         <rdar://problem/46824999>
486
487         Reviewed by Geoffrey Garen.
488
489         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
490         (WKWebsiteDataStoreRemoveAllIndexedDatabases):
491         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
492
493 2019-01-23  Wenson Hsieh  <wenson_hsieh@apple.com>
494
495         [iOS] fast/events/touch/ios/hover-when-style-change-is-async.html times out
496         https://bugs.webkit.org/show_bug.cgi?id=193182
497         <rdar://problem/47452154>
498
499         Reviewed by Tim Horton.
500
501         Fix an existing bug where blurring an element doesn't always un-suppress text interactions.
502
503         * UIProcess/ios/WKContentViewInteraction.mm:
504         (-[WKContentView _elementDidBlur]):
505
506 2019-01-23  Michael Catanzaro  <mcatanzaro@igalia.com>
507
508         Minor improvements to NetworkProcess
509         https://bugs.webkit.org/show_bug.cgi?id=193708
510
511         Reviewed by Alex Christensen.
512
513         * NetworkProcess/NetworkProcess.cpp:
514         (WebKit::NetworkProcess::switchToNewTestingSession): Fix a spelling error.
515         (WebKit::NetworkProcess::ensureSession): Add useful assertion.
516         (WebKit::NetworkProcess::defaultStorageSession const): Split into platform functions.
517         (WebKit::NetworkProcess::destroySession): Add useful assertion.
518         * NetworkProcess/NetworkProcess.h:
519         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
520         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
521         * NetworkProcess/curl/NetworkProcessCurl.cpp:
522         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
523         * NetworkProcess/soup/NetworkProcessSoup.cpp:
524         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
525
526 2019-01-23  Daniel Bates  <dabates@apple.com>
527
528         Fix the Apple Internal build. See <rdar://problem/47486758>.
529
530         * UIProcess/ios/WKContentViewInteraction.mm:
531         (-[WKContentView dropInteraction:previewForDroppingItem:withDefault:]):
532
533 2019-01-23  Per Arne Vollan  <pvollan@apple.com>
534
535         [macOS] Sandbox fails to compile
536         https://bugs.webkit.org/show_bug.cgi?id=193727
537         <rdar://problem/47476903>
538
539         Reviewed by Brent Fulgham.
540
541         Use '(with send-signal SIGKILL)' instead of '(with termination)'.
542
543         * WebProcess/com.apple.WebProcess.sb.in:
544
545 2019-01-23  Brent Fulgham  <bfulgham@apple.com>
546
547         REGRESSION (r240243): CrashTracer: WebKitTestRunnerApp at com.apple.WebKit: WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const + 32
548         https://bugs.webkit.org/show_bug.cgi?id=193723
549         <rdar://problem/47476802>
550
551         Reviewed by David Kilzer.
552
553         The new code added in r240243 could attempt to submit telemetry after the relevant
554         WebResourceLoadStatisticsStore was destroyed. We should guard against this possibility.
555
556         * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:
557         (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
558
559 2019-01-23  Antti Koivisto  <antti@apple.com>
560
561         [PSON] Flash on back navigation on Mac
562         https://bugs.webkit.org/show_bug.cgi?id=193716
563         <rdar://problem/47148458>
564
565         Reviewed by Chris Dumez.
566
567         We close the page immediately if we fail to suspend. Layers disappear and we get a flash.
568
569         * UIProcess/SuspendedPageProxy.cpp:
570         (WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
571
572         Remove the suspended page (so closing it on web process side) if the suspension fails.
573         Skip this if we are using web process side compositing on Mac.
574
575         * UIProcess/WebPageProxy.cpp:
576         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
577
578         On Mac, remove failed SuspendedPageProxy when entering compositing mode. At this point we don't need it to keep layers alive.
579
580         * UIProcess/WebProcessPool.cpp:
581         (WebKit::WebProcessPool::removeFailedSuspendedPagesForPage):
582         * UIProcess/WebProcessPool.h:
583         * WebProcess/WebPage/WebPage.cpp:
584         (WebKit::WebPage::suspendForProcessSwap):
585
586         Don't close the page on suspension failure.
587
588 2019-01-23  Wenson Hsieh  <wenson_hsieh@apple.com>
589
590         Introduce UndoStep::label() and adopt it in WebKitLegacy and WebKit
591         https://bugs.webkit.org/show_bug.cgi?id=193706
592         <rdar://problem/44807048>
593
594         Reviewed by Ryosuke Niwa.
595
596         * UIProcess/Cocoa/WebViewImpl.mm:
597         (WebKit::WebViewImpl::registerEditCommand):
598         * UIProcess/WebEditCommandProxy.cpp:
599         (WebKit::WebEditCommandProxy::WebEditCommandProxy):
600         * UIProcess/WebEditCommandProxy.h:
601
602         Drive-by tweak: make WebEditCommandProxy's backpointer to its WebPageProxy a WeakPtr instead of a raw pointer.
603         Additionally, call clear() instead of setting m_page to 0 upon invalidation. Also, turn the WebPageProxy*
604         argument into a WebPageProxy&, since the WebPageProxy must exist when it creates a new WebEditCommandProxy.
605
606         (WebKit::WebEditCommandProxy::create):
607         (WebKit::WebEditCommandProxy::label const):
608         (WebKit::WebEditCommandProxy::invalidate):
609         (WebKit::WebEditCommandProxy::editAction const): Deleted.
610
611         Adjust UI-side logic to just handle the undo/redo label, rather than map the edit action to a localized string.
612
613         * UIProcess/WebPageProxy.cpp:
614         (WebKit::WebPageProxy::registerEditCommandForUndo):
615         (WebKit::WebPageProxy::resetState):
616
617         Tweak this to use std::exchange instead of copying all the WebEditCommandProxy RefPtrs into a separate Vector
618         and then iterating over the Vector.
619
620         * UIProcess/WebPageProxy.h:
621         * UIProcess/WebPageProxy.messages.in:
622
623         Adjust this so that we only send the undo/redo label over IPC, rather than the edit action type.
624
625         * UIProcess/ios/PageClientImplIOS.mm:
626         (WebKit::PageClientImpl::registerEditCommand):
627         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
628         (WebKit::WebEditorClient::registerUndoStep):
629
630 2019-01-23  Michael Catanzaro  <mcatanzaro@igalia.com>
631
632         [SOUP] Remove libsoup cruft from WebProcess
633         https://bugs.webkit.org/show_bug.cgi?id=193710
634
635         Reviewed by Carlos Garcia Campos.
636
637         SoupNetworkSession is no longer accessible from the web process because it's owned
638         (indirectly) by NetworkProcess after r240292. It doesn't make sense to have any libsoup
639         code under WebProcess anymore. The current libsoup code consists of (a) unused stuff to be
640         removed, (b) stuff unrelated to libsoup, which should move to a WebProcessGLib.cpp, and (c)
641         WebKitSoupRequestInputStream, which is only used by NetworkProcess and should move there
642
643         * NetworkProcess/soup/WebKitSoupRequestInputStream.cpp: Renamed from Source/WebKit/WebProcess/soup/WebKitSoupRequestInputStream.cpp.
644         (AsyncReadData::AsyncReadData):
645         (webkitSoupRequestInputStreamReadAsyncResultComplete):
646         (webkitSoupRequestInputStreamPendingReadAsyncComplete):
647         (webkitSoupRequestInputStreamHasDataToRead):
648         (webkitSoupRequestInputStreamIsWaitingForData):
649         (webkitSoupRequestInputStreamReadAsync):
650         (webkitSoupRequestInputStreamReadFinish):
651         (webkitSoupRequestInputStreamFinalize):
652         (webkit_soup_request_input_stream_init):
653         (webkit_soup_request_input_stream_class_init):
654         (webkitSoupRequestInputStreamNew):
655         (webkitSoupRequestInputStreamAddData):
656         (webkitSoupRequestInputStreamDidFailWithError):
657         (webkitSoupRequestInputStreamFinished):
658         * NetworkProcess/soup/WebKitSoupRequestInputStream.h: Renamed from Source/WebKit/WebProcess/soup/WebKitSoupRequestInputStream.h.
659         * SourcesGTK.txt:
660         * SourcesWPE.txt:
661         * UIProcess/soup/WebProcessPoolSoup.cpp:
662         (WebKit::WebProcessPool::setNetworkProxySettings): Don't send message to web processes.
663         * WebProcess/WebProcess.h:
664         * WebProcess/WebProcess.messages.in:
665         * WebProcess/glib/WebProcessGLib.cpp: Renamed from Source/WebKit/WebProcess/soup/WebProcessSoup.cpp.
666         (WebKit::WebProcess::platformSetCacheModel):
667         (WebKit::WebProcess::platformInitializeWebProcess):
668         (WebKit::WebProcess::platformTerminate):
669
670 2019-01-23  Michael Catanzaro  <mcatanzaro@igalia.com>
671
672         [SOUP] Clean up NetworkStorageSession
673         https://bugs.webkit.org/show_bug.cgi?id=193707
674
675         Reviewed by Carlos Garcia Campos.
676
677         Restore an important call to clearSoupNetworkSession that was removed in r240292. Also,
678         adapt to NetworkStorageSessions API changes.
679
680         * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
681         (WebKit::LegacyCustomProtocolManager::registerScheme):
682         * NetworkProcess/soup/NetworkProcessMainSoup.cpp:
683         * NetworkProcess/soup/NetworkProcessSoup.cpp:
684         (WebKit::NetworkProcess::userPreferredLanguagesChanged):
685         (WebKit::NetworkProcess::setNetworkProxySettings):
686         * NetworkProcess/soup/NetworkSessionSoup.cpp:
687         (WebKit::NetworkSessionSoup::soupSession const):
688
689 2019-01-23  Philippe Normand  <pnormand@igalia.com>
690
691         [GTK] Crash when browsing inspector:// uri without port set
692         https://bugs.webkit.org/show_bug.cgi?id=193721
693
694         Reviewed by Michael Catanzaro.
695
696         * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
697         (WebKit::RemoteInspectorProtocolHandler::handleRequest): Return
698         back to caller after setting the error, if no port was provided
699         along with the inspector URL.
700
701 2019-01-23  David Kilzer  <ddkilzer@apple.com>
702
703         Switch remaining CoreMedia soft-linking in WebKit over to CoreMediaSoftLink.{cpp,h}
704         <https://webkit.org/b/193694>
705         <rdar://problem/47464025>
706
707         Reviewed by Tim Horton.
708
709         * Shared/ios/WebIconUtilities.mm:
710         - Switch to using CoreMediaSoftLink.{h,mm} in PAL.
711
712 2019-01-22  Chris Dumez  <cdumez@apple.com>
713
714         Regression(r240178) Some API tests are crashing
715         https://bugs.webkit.org/show_bug.cgi?id=193680
716
717         Reviewed by Alex Christensen.
718
719         r240178 made sure that userScripts / scriptMessageHandlers / contentExtensions are always
720         properly populated in the WebPageCreationParameters. This was needed in case we need to
721         reconstruct the WebUserContentController on the WebProcess side. However, this caused a
722         regression in the case we reuse a process where the WebUserContentController still exists
723         (because it was kept alive, e.g. by the WebPageGroup). In that case, we would add duplicate
724         entries to the existing WebUserContentController instance because its "add" methods did not
725         have duplicate checks. To address the issue, this patch adds duplicate checks to the
726         WebUserContentController "add" methods.
727
728         * WebProcess/UserContent/WebUserContentController.cpp:
729         (WebKit::WebUserContentController::addUserScriptMessageHandlerInternal):
730         (WebKit::WebUserContentController::removeUserScriptMessageHandlerInternal):
731         (WebKit::WebUserContentController::addUserScriptInternal):
732         (WebKit::WebUserContentController::removeUserScriptInternal):
733         (WebKit::WebUserContentController::addUserStyleSheetInternal):
734         (WebKit::WebUserContentController::removeUserStyleSheetInternal):
735         (WebKit::WebUserContentController::forEachUserMessageHandler const):
736         * WebProcess/UserContent/WebUserContentController.h:
737
738 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
739
740         Unreviewed attempt to fix GTK/WPE bots
741         https://bugs.webkit.org/show_bug.cgi?id=193580
742         <rdar://problem/47457742>
743
744         Doesn't make sense to clear the storage session right after creating it. This should fix
745         network process crash on startup under G_DEBUG=fatal-criticals due to the storage session
746         not having a cookie jar.
747
748         * NetworkProcess/NetworkProcess.cpp:
749         (WebKit::NetworkProcess::NetworkProcess):
750
751 2019-01-22  Megan Gardner  <megan_gardner@apple.com>
752
753         Cancel Web Touches Properly so that long presses on YouTube links do not incorrectly trigger a load
754         https://bugs.webkit.org/show_bug.cgi?id=193687
755         <rdar://problem/47056717>
756
757         Reviewed by Tim Horton.
758
759         Cancel web gestures when a long press is recognized.
760
761         * Platform/spi/ios/UIKitSPI.h:
762         * UIProcess/ios/WKContentViewInteraction.mm:
763         (-[WKContentView _cancelWebGestureRecognizer]):
764         (-[WKContentView _longPressRecognized:]):
765
766 2019-01-22  Alex Christensen  <achristensen@webkit.org>
767
768         Fix an internal build failure after r240292
769         https://bugs.webkit.org/show_bug.cgi?id=193580
770
771         Rubber-stamped by Wenson Hsieh.
772
773         * SourcesCocoa.txt:
774         * UIProcess/mac/WebContextMenuProxyMac.mm:
775         (-[WKMenuTarget forwardContextMenuAction:]):
776         * WebKit.xcodeproj/project.pbxproj:
777         It was apparently unclear to the compiler sometimes which "state" selector to use, and this apparently mattered.
778         Tell the compiler to use the NSMenuItem selector, but at runtime it doesn't matter.
779
780 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
781
782         Unreviewed, fix -Wunused-but-set-variable warning
783         https://bugs.webkit.org/show_bug.cgi?id=193660
784         <rdar://problem/47433602>
785
786         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
787         (WebKit::WebsiteDataStore::removeData):
788
789 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
790
791         Unreviewed, further build fixes after r240292
792         https://bugs.webkit.org/show_bug.cgi?id=193580
793         <rdar://problem/47457742>
794
795         Oops.
796
797         * NetworkProcess/NetworkProcess.cpp:
798         (WebKit::NetworkProcess::defaultStorageSession const):
799
800 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
801
802         Unreviewed, further build fixes after r240292
803         https://bugs.webkit.org/show_bug.cgi?id=193580
804         <rdar://problem/47457742>
805
806         This builds for libsoup. Doesn't work, but at least builds.
807
808         Also, speculative fixes for curl.
809
810         * NetworkProcess/NetworkProcess.cpp:
811         (WebKit::NetworkProcess::defaultStorageSession const):
812
813 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
814
815         Unreviewed, further build fixes after r240292
816         https://bugs.webkit.org/show_bug.cgi?id=193580
817         <rdar://problem/47457742>
818
819         Still not working yet.
820
821         * NetworkProcess/NetworkProcess.cpp:
822         (WebKit::NetworkProcess::NetworkProcess):
823         * UIProcess/API/APIHTTPCookieStore.h:
824
825 2019-01-22  Antti Koivisto  <antti@apple.com>
826
827         [iOS] Flash when swiping back to Google search result page
828         https://bugs.webkit.org/show_bug.cgi?id=193668
829         <rdar://problem/47071684>
830
831         Reviewed by Simon Fraser.
832
833         If the google page is scrolled, there is sometimes a short flash.
834
835         When restoring the page state we also restore exposedContentRect which is used to determine
836         which part of the page to create layers for. Scroll position is restored by the UI process
837         later so we rely on this to get the right layers for the initial view update.
838
839         A viewport configuration update may sometimes trample over the restored exposedContentRect,
840         moving it to top left. In this case the initial layer tree unfreeze commit may not have
841         layers to cover the actual visible view position.
842
843         * WebProcess/WebPage/WebPage.cpp:
844         (WebKit::WebPage::didCommitLoad):
845         * WebProcess/WebPage/WebPage.h:
846         * WebProcess/WebPage/ios/WebPageIOS.mm:
847         (WebKit::WebPage::restorePageState):
848
849         Set a bit to indicate we have already restored the exposedContentRect.
850
851         (WebKit::WebPage::viewportConfigurationChanged):
852
853         Only reset exposedContentRect if wasn't already set by restorePageState.
854
855 2019-01-22  Alex Christensen  <achristensen@webkit.org>
856
857         Fix more builds.
858
859         * SourcesCocoa.txt:
860         * WebKit.xcodeproj/project.pbxproj:
861
862 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
863
864         Another build fix after r240292
865         https://bugs.webkit.org/show_bug.cgi?id=193580
866         <rdar://problem/47457742>
867
868         Unreviewed, still not enough to fix soup builds, but closer.
869
870         * UIProcess/API/APIHTTPCookieStore.h:
871
872 2019-01-22  Alex Christensen  <achristensen@webkit.org>
873
874         Fix some builds after r240292
875         https://bugs.webkit.org/show_bug.cgi?id=193580
876
877         * NetworkProcess/NetworkProcess.cpp:
878         (WebKit::NetworkProcess::switchToNewTestingSession):
879         * NetworkProcess/cache/NetworkCache.cpp:
880         (WebKit::NetworkCache::Cache::retrieve):
881
882 2019-01-22  Brian Burg  <bburg@apple.com>
883
884         Automation.computeElementLayout should return visual viewport-aware coordinates
885         https://bugs.webkit.org/show_bug.cgi?id=193598
886         <rdar://problem/35325644>
887
888         Unreviewed, restore a mistakenly-deleted line whose absence causes hangs.
889
890         * Shared/CoordinateSystem.h:
891
892 2019-01-22  Alex Christensen  <achristensen@webkit.org>
893
894         Move NetworkStorageSession ownership to NetworkProcess
895         https://bugs.webkit.org/show_bug.cgi?id=193580
896
897         Reviewed by Geoff Garen.
898
899         * NetworkProcess/Cookies/WebCookieManager.cpp:
900         (WebKit::WebCookieManager::WebCookieManager):
901         (WebKit::WebCookieManager::getHostnamesWithCookies):
902         (WebKit::WebCookieManager::deleteCookiesForHostname):
903         (WebKit::WebCookieManager::deleteAllCookies):
904         (WebKit::WebCookieManager::deleteCookie):
905         (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
906         (WebKit::WebCookieManager::getAllCookies):
907         (WebKit::WebCookieManager::getCookies):
908         (WebKit::WebCookieManager::setCookie):
909         (WebKit::WebCookieManager::setCookies):
910         (WebKit::WebCookieManager::startObservingCookieChanges):
911         (WebKit::WebCookieManager::stopObservingCookieChanges):
912         * NetworkProcess/Cookies/WebCookieManager.h:
913         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
914         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
915         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
916         (WebKit::storageSession):
917         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
918         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
919         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
920         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
921         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
922         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
923         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
924         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):
925         * NetworkProcess/NetworkProcess.cpp:
926         (WebKit::NetworkProcess::initializeNetworkProcess):
927         (WebKit::NetworkProcess::clearCachedCredentials):
928         (WebKit::NetworkProcess::switchToNewTestingSession):
929         (WebKit::NetworkProcess::ensureSession):
930         (WebKit::NetworkProcess::storageSession const):
931         (WebKit::NetworkProcess::defaultStorageSession const):
932         (WebKit::NetworkProcess::forEachNetworkStorageSession):
933         (WebKit::NetworkProcess::destroySession):
934         (WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
935         (WebKit::NetworkProcess::setAgeCapForClientSideCookies):
936         (WebKit::NetworkProcess::hasStorageAccessForFrame):
937         (WebKit::NetworkProcess::getAllStorageAccessEntries):
938         (WebKit::NetworkProcess::grantStorageAccess):
939         (WebKit::NetworkProcess::removeAllStorageAccess):
940         (WebKit::NetworkProcess::removePrevalentDomains):
941         (WebKit::NetworkProcess::setCacheMaxAgeCapForPrevalentResources):
942         (WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
943         (WebKit::NetworkProcess::fetchWebsiteData):
944         (WebKit::NetworkProcess::deleteWebsiteData):
945         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
946         * NetworkProcess/NetworkProcess.h:
947         * NetworkProcess/NetworkResourceLoader.cpp:
948         (WebKit::NetworkResourceLoader::validateCacheEntryForMaxAgeCapValidation):
949         (WebKit::NetworkResourceLoader::logCookieInformation const):
950         * NetworkProcess/NetworkSession.cpp:
951         (WebKit::NetworkSession::networkStorageSession const):
952         * NetworkProcess/NetworkStorageSessionProvider.h:
953         * NetworkProcess/cache/NetworkCache.cpp:
954         (WebKit::NetworkCache::makeUseDecision):
955         (WebKit::NetworkCache::Cache::retrieve):
956         (WebKit::NetworkCache::Cache::makeEntry):
957         (WebKit::NetworkCache::Cache::makeRedirectEntry):
958         (WebKit::NetworkCache::Cache::update):
959         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
960         (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
961         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
962         (WebKit::NetworkProcess::platformSyncAllCookies):
963         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
964         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
965         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
966         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
967         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
968         * NetworkProcess/mac/RemoteNetworkingContext.mm:
969         (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
970         * SourcesCocoa.txt:
971         * UIProcess/API/APIHTTPCookieStore.cpp:
972         (API::HTTPCookieStore::~HTTPCookieStore):
973         (API::HTTPCookieStore::cookies):
974         (API::HTTPCookieStore::setCookie):
975         (API::HTTPCookieStore::deleteCookie):
976         (API::HTTPCookieStore::registerObserver):
977         (API::HTTPCookieStore::unregisterObserver):
978         (API::HTTPCookieStore::registerForNewProcessPoolNotifications):
979         (API::HTTPCookieStore::flushDefaultUIProcessCookieStore):
980         (API::HTTPCookieStore::getAllDefaultUIProcessCookieStoreCookies):
981         (API::HTTPCookieStore::setCookieInDefaultUIProcessCookieStore):
982         (API::HTTPCookieStore::deleteCookieFromDefaultUIProcessCookieStore):
983         (API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
984         (API::HTTPCookieStore::stopObservingChangesToDefaultUIProcessCookieStore):
985         * UIProcess/API/APIHTTPCookieStore.h:
986         * UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: Added.
987         (API::HTTPCookieStore::flushDefaultUIProcessCookieStore):
988         (API::HTTPCookieStore::getAllDefaultUIProcessCookieStoreCookies):
989         (API::HTTPCookieStore::setCookieInDefaultUIProcessCookieStore):
990         (API::HTTPCookieStore::deleteCookieFromDefaultUIProcessCookieStore):
991         (API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
992         (API::HTTPCookieStore::stopObservingChangesToDefaultUIProcessCookieStore):
993         * UIProcess/WebProcessPool.cpp:
994         (WebKit::WebProcessPool::clearCachedCredentials):
995         * WebKit.xcodeproj/project.pbxproj:
996         * WebProcess/Plugins/PluginView.cpp:
997         (WebKit::PluginView::getAuthenticationInfo):
998         * WebProcess/WebProcess.cpp:
999         (WebKit::WebProcess::deleteWebsiteData):
1000         (WebKit::WebProcess::clearCachedCredentials): Deleted.
1001         * WebProcess/WebProcess.h:
1002         * WebProcess/WebProcess.messages.in:
1003
1004 2019-01-22  Per Arne Vollan  <pvollan@apple.com>
1005
1006         [macOS] Adjust logging policy in WebKit's sandbox
1007         https://bugs.webkit.org/show_bug.cgi?id=193454
1008
1009         Reviewed by Brent Fulgham.
1010
1011         Add a rule to initially deny all calls, since the default is to allow every call.
1012         Later rules allow syscalls that we determined are needed for proper WebKit function.
1013         This reduces the API surface available to attackers.
1014
1015         * WebProcess/com.apple.WebProcess.sb.in:
1016
1017 2019-01-22  Daniel Bates  <dabates@apple.com>
1018
1019         [iOS] WebKit should handle shift state changes when using the software keyboard
1020         https://bugs.webkit.org/show_bug.cgi?id=191475
1021         <rdar://problem/45949246>
1022
1023         Reviewed by Brent Fulgham.
1024
1025         Implement UIKit SPI to be notified of shift state changes to the software keyboard
1026         and dispatch a synthetic keydown or keyup event for either the Shift key or Caps Lock
1027         key.
1028
1029         A side benefit of this change is that we now show and hide the caps lock indicator
1030         in a focused password field when caps lock is enabled or disabled using the software
1031         keyboard, respectively.
1032
1033         * Platform/spi/ios/UIKitSPI.h: Expose more SPI.
1034         * SourcesCocoa.txt:
1035         * UIProcess/ios/WKContentViewInteraction.mm:
1036         (-[WKContentView modifierFlagsDidChangeFrom:to:]): Create a synthetic flags changed
1037         web event based on the state change and dispatch it.
1038         (-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Early return if the event
1039         was a synethic flags change event so that we do not notify UIKit about this event
1040         as it does not know anything about such synthetic events.
1041         * UIProcess/ios/WKSyntheticFlagsChangedWebEvent.h: Added.
1042         * UIProcess/ios/WKSyntheticFlagsChangedWebEvent.mm: Added.
1043         (-[WKSyntheticFlagsChangedWebEvent initWithKeyCode:modifiers:keyDown:]):
1044         (-[WKSyntheticFlagsChangedWebEvent initWithCapsLockState:]):
1045         (-[WKSyntheticFlagsChangedWebEvent initWithShiftState:]):
1046         * WebKit.xcodeproj/project.pbxproj:
1047
1048 2019-01-22  Daniel Bates  <dabates@apple.com>
1049
1050         [iOS] Interpret text key commands on keydown and app key commands on keypress
1051         https://bugs.webkit.org/show_bug.cgi?id=192897
1052         <rdar://problem/46857378>
1053
1054         Reviewed by Brent Fulgham.
1055
1056         Adopt SPI to interpret text key commands and app key commands independently on keydown (isCharEvent
1057         is false) and keypress (isCharEvent is true), respectively.
1058
1059         * Platform/spi/ios/UIKitSPI.h: Add more SPI.
1060         * UIProcess/ios/WKContentViewInteraction.mm:
1061         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
1062
1063 2019-01-22  David Kilzer  <ddkilzer@apple.com>
1064
1065         C strings in ClientCertificateAuthenticationXPCConstants.h are duplicated
1066         <https://webkit.org/b/193607>
1067         <rdar://problem/47334613>
1068
1069         Reviewed by Alex Christensen.
1070
1071         * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
1072         (WebKit::AuthenticationManager::initializeConnection):
1073         * UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm:
1074         (WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc):
1075         - Update name of constants.
1076
1077         * Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.cpp: Copied from Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h.
1078         * Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h:
1079         - Put constant values in a namespace, and move values to
1080           ClientCertificateAuthenticationXPCConstants.cpp.
1081
1082         * SourcesCocoa.txt:
1083         * UnifiedSources-input.xcfilelist:
1084         * WebKit.xcodeproj/project.pbxproj:
1085         - Add ClientCertificateAuthenticationXPCConstants.cpp.
1086
1087 2019-01-22  David Kilzer  <ddkilzer@apple.com>
1088
1089         Switch remaining QuickLook soft-linking in WebCore, WebKit over to QuickLookSoftLink.{cpp,h}
1090         <https://webkit.org/b/193654>
1091         <rdar://problem/47430290>
1092
1093         Reviewed by Alex Christensen.
1094
1095         - Moves QuickLookSoftLink.{h,mm} to PAL.
1096         - Adds soft-link to 3 classes to consolidate QuickLook.framework
1097           soft-linking.
1098         - Updates existing source to work with above changes.
1099
1100         * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
1101         (-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):
1102         (WebKit::SystemPreviewController::start):
1103         * UIProcess/ios/WKSystemPreviewView.mm:
1104         (-[WKSystemPreviewView web_setContentProviderData:suggestedFilename:]):
1105         - Switch to using QuickLookSoftLink.{h,mm} in PAL.
1106
1107 2019-01-22  Oriol Brufau  <obrufau@igalia.com>
1108
1109         [css-logical] Implement flow-relative margin, padding and border shorthands
1110         https://bugs.webkit.org/show_bug.cgi?id=188697
1111
1112         Reviewed by Simon Fraser and Antti Koivisto.
1113
1114         Add a CSSLogicalEnabled runtime flag.
1115
1116         * Shared/WebPreferences.yaml:
1117
1118 2019-01-22  Frederic Wang  <fwang@igalia.com>
1119
1120         Enable CSSOMViewScrollingAPI
1121         https://bugs.webkit.org/show_bug.cgi?id=189472
1122
1123         Reviewed by Simon Fraser.
1124
1125         This patch enables the CSSOMViewScrollingAPI option by default. This feature has already been
1126         enabled in tests since r235855. Basically, this change fixes an old compatibility issue
1127         regarding which scrolling element correspond to the viewport in standard mode (WebKit uses
1128         document.body while Gecko/Edge/Chromium use document.documentElement as described in the
1129         CSSOM View specification). WebKit developers writing tests can use document.scrollingElement
1130         for that purpose, so that they work independently of whether the option is enabled.
1131
1132         [1] https://lists.webkit.org/pipermail/webkit-dev/2018-January/029857.html
1133
1134         * Shared/WebPreferences.yaml: Enable by default and remove "experimental" category in
1135         accordance with the new policy. Instead, keep an internal flag only for developers.
1136
1137 2019-01-21  Antti Koivisto  <antti@apple.com>
1138
1139         [iOS] Handle hit testing for subframes
1140         https://bugs.webkit.org/show_bug.cgi?id=192303
1141
1142         Reviewed by Frédéric Wang.
1143
1144         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1145         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1146
1147         Only set delegatesScrolling for the main frame.
1148
1149 2019-01-21  Brent Fulgham  <bfulgham@apple.com>
1150
1151         Unreviewed test fix after r240243
1152         Nhttps://bugs.webkit.org/show_bug.cgi?id=193660
1153         <rdar://problem/47433602>
1154
1155         The new ResourceLoadStatistics section of 'removeData' was incrementing the
1156         pending callback count before deciding whether to send a message to delete
1157         data. This left the count out-of-balance leading to the operation never
1158         completing.
1159
1160         This patch also prevents sending a second message to the NetworkProcess
1161         requesting data be deleted if the message was already sent in an earlier
1162         section of the method (e.g., as typically happens when all website data
1163         is being deleted).
1164
1165         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1166         (WebKit::WebsiteDataStore::removeData):
1167
1168 2019-01-21  Brent Fulgham  <bfulgham@apple.com>
1169
1170         Implement message handlers for NetworkProcess-based ResourceLoadStatistics
1171         https://bugs.webkit.org/show_bug.cgi?id=193556
1172         <rdar://problem/47368501>
1173
1174         Reviewed by Alex Christensen.
1175
1176         This patch adds a number of sibling methods for tracking ResourceLoadStatistics when the
1177         observations are being handled in the NetworkProcess, rather than the UIProcess. The
1178         original versions of these methods will be removed as part of Bug 193303.
1179
1180         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
1181         (WebKit::ResourceLoadStatisticsMemoryStore::removeDataRecords):
1182         (WebKit::ResourceLoadStatisticsMemoryStore::processStatisticsAndDataRecords):
1183         (WebKit::ResourceLoadStatisticsMemoryStore::grandfatherExistingWebsiteData):
1184         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
1185         (WebKit::ResourceLoadStatisticsMemoryStore::store const):
1186         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
1187         (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned):
1188         (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenTelemetryWasCaptured):
1189         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
1190         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode):
1191         (WebKit::WebResourceLoadStatisticsStore::scheduleStatisticsAndDataRecordsProcessing):
1192         (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
1193         (WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
1194         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
1195         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
1196         (WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
1197         (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
1198         (WebKit::WebResourceLoadStatisticsStore::setLastSeen):
1199         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
1200         (WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource):
1201         (WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
1202         (WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource):
1203         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubresourceUnder):
1204         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubFrameUnder):
1205         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsRedirectingTo):
1206         (WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
1207         (WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
1208         (WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
1209         (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
1210         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
1211         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
1212         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom):
1213         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo):
1214         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom):
1215         (WebKit::WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
1216         (WebKit::WebResourceLoadStatisticsStore::logTestingEvent):
1217         (WebKit::WebResourceLoadStatisticsStore::notifyResourceLoadStatisticsProcessed):
1218         (WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
1219         (WebKit::WebResourceLoadStatisticsStore::topPrivatelyControlledDomainsWithWebsiteData):
1220         (WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const):
1221         (WebKit::WebResourceLoadStatisticsStore::notifyPageStatisticsTelemetryFinished const):
1222         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
1223         * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:
1224         (WebKit::submitTopList):
1225         (WebKit::submitTopLists):
1226         (WebKit::notifyPages):
1227         (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
1228         (WebKit::nonEphemeralWebPageProxy): Deleted.
1229         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1230         (WebKit::NetworkConnectionToWebProcess::logUserInteraction):
1231         * NetworkProcess/NetworkConnectionToWebProcess.h:
1232         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1233         * NetworkProcess/NetworkProcess.cpp:
1234         (WebKit::NetworkProcess::dumpResourceLoadStatistics):
1235         (WebKit::NetworkProcess::isGrandfathered):
1236         (WebKit::NetworkProcess::isPrevalentResource):
1237         (WebKit::NetworkProcess::isVeryPrevalentResource):
1238         (WebKit::NetworkProcess::setGrandfathered):
1239         (WebKit::NetworkProcess::setPrevalentResource):
1240         (WebKit::NetworkProcess::setPrevalentResourceForDebugMode):
1241         (WebKit::NetworkProcess::setVeryPrevalentResource):
1242         (WebKit::NetworkProcess::clearPrevalentResource):
1243         (WebKit::NetworkProcess::submitTelemetry):
1244         (WebKit::NetworkProcess::scheduleCookieBlockingUpdate):
1245         (WebKit::NetworkProcess::scheduleClearInMemoryAndPersistent):
1246         (WebKit::NetworkProcess::resetParametersToDefaultValues):
1247         (WebKit::NetworkProcess::scheduleStatisticsAndDataRecordsProcessing):
1248         (WebKit::NetworkProcess::setNotifyPagesWhenDataRecordsWereScanned):
1249         (WebKit::NetworkProcess::setNotifyPagesWhenTelemetryWasCaptured):
1250         (WebKit::NetworkProcess::setSubframeUnderTopFrameOrigin):
1251         (WebKit::NetworkProcess::isRegisteredAsRedirectingTo):
1252         (WebKit::NetworkProcess::isRegisteredAsSubFrameUnder):
1253         (WebKit::NetworkProcess::setSubresourceUnderTopFrameOrigin):
1254         (WebKit::NetworkProcess::setSubresourceUniqueRedirectTo):
1255         (WebKit::NetworkProcess::setSubresourceUniqueRedirectFrom):
1256         (WebKit::NetworkProcess::isRegisteredAsSubresourceUnder):
1257         (WebKit::NetworkProcess::setTopFrameUniqueRedirectTo):
1258         (WebKit::NetworkProcess::setTopFrameUniqueRedirectFrom):
1259         (WebKit::NetworkProcess::setLastSeen):
1260         (WebKit::NetworkProcess::hasStorageAccess):
1261         (WebKit::NetworkProcess::requestStorageAccess):
1262         (WebKit::NetworkProcess::grantStorageAccess):
1263         (WebKit::NetworkProcess::logUserInteraction):
1264         (WebKit::NetworkProcess::hadUserInteraction):
1265         (WebKit::NetworkProcess::clearUserInteraction):
1266         (WebKit::NetworkProcess::setGrandfatheringTime):
1267         (WebKit::NetworkProcess::setMaxStatisticsEntries):
1268         (WebKit::NetworkProcess::setMinimumTimeBetweenDataRecordsRemoval):
1269         (WebKit::NetworkProcess::setPruneEntriesDownTo):
1270         (WebKit::NetworkProcess::setTimeToLiveUserInteraction):
1271         (WebKit::NetworkProcess::setShouldClassifyResourcesBeforeDataRecordsRemoval):
1272         (WebKit::NetworkProcess::setResourceLoadStatisticsEnabled):
1273         (WebKit::NetworkProcess::setResourceLoadStatisticsDebugMode):
1274         (WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
1275         (WebKit::NetworkProcess::deleteWebsiteData):
1276         (WebKit::filterForTopLevelDomains):
1277         (WebKit::NetworkProcess::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
1278         (WebKit::NetworkProcess::topPrivatelyControlledDomainsWithWebsiteData):
1279         * NetworkProcess/NetworkProcess.h:
1280         * NetworkProcess/NetworkProcess.messages.in:
1281         * NetworkProcess/NetworkSession.cpp:
1282         (WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
1283         (WebKit::NetworkSession::notifyResourceLoadStatisticsProcessed):
1284         (WebKit::NetworkSession::logDiagnosticMessageWithValue):
1285         (WebKit::NetworkSession::notifyPageStatisticsTelemetryFinished):
1286         (WebKit::NetworkSession::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
1287         (WebKit::NetworkSession::topPrivatelyControlledDomainsWithWebsiteData):
1288         (WebKit::NetworkSession::enableResourceLoadStatistics): Deleted.
1289         * NetworkProcess/NetworkSession.h:
1290         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1291         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1292         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1293         (WKWebsiteDataStoreSetResourceLoadStatisticsDebugModeWithCompletionHandler):
1294         (WKWebsiteDataStoreSetResourceLoadStatisticsPrevalentResourceForDebugMode):
1295         (WKWebsiteDataStoreSetStatisticsLastSeen):
1296         (WKWebsiteDataStoreSetStatisticsPrevalentResource):
1297         (WKWebsiteDataStoreSetStatisticsVeryPrevalentResource):
1298         (WKWebsiteDataStoreDumpResourceLoadStatistics):
1299         (WKWebsiteDataStoreIsStatisticsPrevalentResource):
1300         (WKWebsiteDataStoreIsStatisticsVeryPrevalentResource):
1301         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubresourceUnder):
1302         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
1303         (WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
1304         (WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
1305         (WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
1306         (WKWebsiteDataStoreSetStatisticsGrandfathered):
1307         (WKWebsiteDataStoreIsStatisticsGrandfathered):
1308         (WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
1309         (WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
1310         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
1311         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
1312         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
1313         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
1314         (WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction):
1315         (WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords):
1316         (WKWebsiteDataStoreStatisticsUpdateCookieBlocking):
1317         (WKWebsiteDataStoreStatisticsSubmitTelemetry):
1318         (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenDataRecordsWereScanned):
1319         (WKWebsiteDataStoreSetStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
1320         (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenTelemetryWasCaptured):
1321         (WKWebsiteDataStoreSetStatisticsMinimumTimeBetweenDataRecordsRemoval):
1322         (WKWebsiteDataStoreSetStatisticsGrandfatheringTime):
1323         (WKWebsiteDataStoreSetStatisticsMaxStatisticsEntries):
1324         (WKWebsiteDataStoreSetStatisticsPruneEntriesDownTo):
1325         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
1326         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
1327         (WKWebsiteDataStoreStatisticsResetToConsistentState):
1328         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1329         (-[WKWebsiteDataStore _setResourceLoadStatisticsTestingCallback:]):
1330         * UIProcess/Network/NetworkProcessProxy.cpp:
1331         (WebKit::NetworkProcessProxy::clearCallbackStates):
1332         (WebKit::NetworkProcessProxy::didClose):
1333         (WebKit::nonEphemeralWebPageProxy):
1334         (WebKit::NetworkProcessProxy::logGlobalDiagnosticMessageWithValue):
1335         (WebKit::NetworkProcessProxy::dumpResourceLoadStatistics):
1336         (WebKit::NetworkProcessProxy::didDumpResourceLoadStatistics):
1337         (WebKit::NetworkProcessProxy::updatePrevalentDomainsToBlockCookiesFor):
1338         (WebKit::NetworkProcessProxy::didUpdateBlockCookies):
1339         (WebKit::NetworkProcessProxy::isPrevalentResource):
1340         (WebKit::NetworkProcessProxy::isPrevalentResourceResult):
1341         (WebKit::NetworkProcessProxy::isVeryPrevalentResource):
1342         (WebKit::NetworkProcessProxy::setPrevalentResource):
1343         (WebKit::NetworkProcessProxy::setPrevalentResourceForDebugMode):
1344         (WebKit::NetworkProcessProxy::setVeryPrevalentResource):
1345         (WebKit::NetworkProcessProxy::didSetResourceLoadStatisticData):
1346         (WebKit::NetworkProcessProxy::setLastSeen):
1347         (WebKit::NetworkProcessProxy::clearPrevalentResource):
1348         (WebKit::NetworkProcessProxy::scheduleCookieBlockingUpdate):
1349         (WebKit::NetworkProcessProxy::didScheduleCookieBlockingUpdate):
1350         (WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent):
1351         (WebKit::NetworkProcessProxy::didScheduleStatisticsProcessing):
1352         (WebKit::NetworkProcessProxy::scheduleStatisticsAndDataRecordsProcessing):
1353         (WebKit::NetworkProcessProxy::logUserInteraction):
1354         (WebKit::NetworkProcessProxy::hasHadUserInteraction):
1355         (WebKit::NetworkProcessProxy::didHaveUserInteraction):
1356         (WebKit::NetworkProcessProxy::clearUserInteraction):
1357         (WebKit::NetworkProcessProxy::setAgeCapForClientSideCookies):
1358         (WebKit::NetworkProcessProxy::didSetAgeCapForClientSideCookies):
1359         (WebKit::NetworkProcessProxy::setTimeToLiveUserInteraction):
1360         (WebKit::NetworkProcessProxy::didUpdateRuntimeSettings):
1361         (WebKit::NetworkProcessProxy::setNotifyPagesWhenTelemetryWasCaptured):
1362         (WebKit::NetworkProcessProxy::setNotifyPagesWhenDataRecordsWereScanned):
1363         (WebKit::NetworkProcessProxy::setSubframeUnderTopFrameOrigin):
1364         (WebKit::NetworkProcessProxy::isRegisteredAsRedirectingTo):
1365         (WebKit::NetworkProcessProxy::didIsRegisteredAsRedirectingTo):
1366         (WebKit::NetworkProcessProxy::isRegisteredAsSubFrameUnder):
1367         (WebKit::NetworkProcessProxy::didIsRegisteredAsSubFrameUnder):
1368         (WebKit::NetworkProcessProxy::setSubresourceUnderTopFrameOrigin):
1369         (WebKit::NetworkProcessProxy::isRegisteredAsSubresourceUnder):
1370         (WebKit::NetworkProcessProxy::didIsRegisteredAsSubresourceUnder):
1371         (WebKit::NetworkProcessProxy::setSubresourceUniqueRedirectTo):
1372         (WebKit::NetworkProcessProxy::setSubresourceUniqueRedirectFrom):
1373         (WebKit::NetworkProcessProxy::setTopFrameUniqueRedirectTo):
1374         (WebKit::NetworkProcessProxy::setTopFrameUniqueRedirectFrom):
1375         (WebKit::NetworkProcessProxy::isGrandfathered):
1376         (WebKit::NetworkProcessProxy::didIsGrandfathered):
1377         (WebKit::NetworkProcessProxy::setGrandfathered):
1378         (WebKit::NetworkProcessProxy::hasStorageAccess):
1379         (WebKit::NetworkProcessProxy::requestStorageAccess):
1380         (WebKit::NetworkProcessProxy::grantStorageAccess):
1381         (WebKit::NetworkProcessProxy::storageAccessRequestResult):
1382         (WebKit::NetworkProcessProxy::storageAccessOperationResult):
1383         (WebKit::NetworkProcessProxy::didRemoveAllStorageAccess):
1384         (WebKit::NetworkProcessProxy::didSetCacheMaxAgeCapForPrevalentResources):
1385         (WebKit::NetworkProcessProxy::setCacheMaxAgeCap):
1386         (WebKit::NetworkProcessProxy::setGrandfatheringTime):
1387         (WebKit::NetworkProcessProxy::setMaxStatisticsEntries):
1388         (WebKit::NetworkProcessProxy::setMinimumTimeBetweenDataRecordsRemoval):
1389         (WebKit::NetworkProcessProxy::setPruneEntriesDownTo):
1390         (WebKit::NetworkProcessProxy::setShouldClassifyResourcesBeforeDataRecordsRemoval):
1391         (WebKit::NetworkProcessProxy::setResourceLoadStatisticsDebugMode):
1392         (WebKit::NetworkProcessProxy::resetParametersToDefaultValues):
1393         (WebKit::NetworkProcessProxy::submitTelemetry):
1394         (WebKit::NetworkProcessProxy::notifyResourceLoadStatisticsProcessed):
1395         (WebKit::NetworkProcessProxy::notifyWebsiteDataDeletionForTopPrivatelyOwnedDomainsFinished):
1396         (WebKit::NetworkProcessProxy::notifyWebsiteDataScanForTopPrivatelyControlledDomainsFinished):
1397         (WebKit::NetworkProcessProxy::notifyResourceLoadStatisticsTelemetryFinished):
1398         (WebKit::NetworkProcessProxy::didLogUserInteraction): Deleted.
1399         (WebKit::NetworkProcessProxy::didResetCacheMaxAgeCapForPrevalentResources): Deleted.
1400         * UIProcess/Network/NetworkProcessProxy.h:
1401         * UIProcess/Network/NetworkProcessProxy.messages.in:
1402         * UIProcess/WebPageProxy.cpp:
1403         (WebKit::WebPageProxy::nonEphemeralWebPageProxy):
1404         * UIProcess/WebPageProxy.h:
1405         * UIProcess/WebProcessPool.cpp:
1406         (WebKit::WebProcessPool::ensureNetworkProcess):
1407         * UIProcess/WebProcessProxy.cpp:
1408         (WebKit::WebProcessProxy::notifyWebsiteDataScanForTopPrivatelyControlledDomainsFinished):
1409         (WebKit::WebProcessProxy::notifyWebsiteDataDeletionForTopPrivatelyOwnedDomainsFinished):
1410         * UIProcess/WebProcessProxy.h:
1411         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
1412         (WebKit::WebsiteDataStore::parameters):
1413         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1414         (WebKit::WebsiteDataStore::removeData):
1415         (WebKit::WebsiteDataStore::setMaxStatisticsEntries):
1416         (WebKit::WebsiteDataStore::setPruneEntriesDownTo):
1417         (WebKit::WebsiteDataStore::setGrandfatheringTime):
1418         (WebKit::WebsiteDataStore::setCacheMaxAgeCap):
1419         (WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
1420         (WebKit::WebsiteDataStore::dumpResourceLoadStatistics):
1421         (WebKit::WebsiteDataStore::isPrevalentResource):
1422         (WebKit::WebsiteDataStore::setPrevalentResource):
1423         (WebKit::WebsiteDataStore::setPrevalentResourceForDebugMode):
1424         (WebKit::WebsiteDataStore::isVeryPrevalentResource):
1425         (WebKit::WebsiteDataStore::setVeryPrevalentResource):
1426         (WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
1427         (WebKit::WebsiteDataStore::setSubframeUnderTopFrameOrigin):
1428         (WebKit::WebsiteDataStore::isRegisteredAsSubFrameUnder):
1429         (WebKit::WebsiteDataStore::setSubresourceUnderTopFrameOrigin):
1430         (WebKit::WebsiteDataStore::isRegisteredAsSubresourceUnder):
1431         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectTo):
1432         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectFrom):
1433         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectTo):
1434         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectFrom):
1435         (WebKit::WebsiteDataStore::isRegisteredAsRedirectingTo):
1436         (WebKit::WebsiteDataStore::clearPrevalentResource):
1437         (WebKit::WebsiteDataStore::resetParametersToDefaultValues):
1438         (WebKit::WebsiteDataStore::submitTelemetry):
1439         (WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
1440         (WebKit::WebsiteDataStore::scheduleCookieBlockingUpdate):
1441         (WebKit::WebsiteDataStore::scheduleStatisticsAndDataRecordsProcessing):
1442         (WebKit::WebsiteDataStore::updatePrevalentDomainsToBlockCookiesFor):
1443         (WebKit::WebsiteDataStore::setAgeCapForClientSideCookies):
1444         (WebKit::WebsiteDataStore::setLastSeen):
1445         (WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
1446         (WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured):
1447         (WebKit::WebsiteDataStore::hasStorageAccessForFrameHandler):
1448         (WebKit::WebsiteDataStore::getAllStorageAccessEntries):
1449         (WebKit::WebsiteDataStore::grantStorageAccessHandler):
1450         (WebKit::WebsiteDataStore::removeAllStorageAccessHandler):
1451         (WebKit::WebsiteDataStore::removePrevalentDomains):
1452         (WebKit::WebsiteDataStore::hasStorageAccess):
1453         (WebKit::WebsiteDataStore::requestStorageAccess):
1454         (WebKit::WebsiteDataStore::grantStorageAccess):
1455         (WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
1456         (WebKit::WebsiteDataStore::logUserInteraction):
1457         (WebKit::WebsiteDataStore::hasHadUserInteraction):
1458         (WebKit::WebsiteDataStore::clearUserInteraction):
1459         (WebKit::WebsiteDataStore::isGrandfathered):
1460         (WebKit::WebsiteDataStore::setGrandfathered):
1461         (WebKit::WebsiteDataStore::setCacheMaxAgeCapForPrevalentResources):
1462         (WebKit::WebsiteDataStore::resetCacheMaxAgeCapForPrevalentResources):
1463         (WebKit::WebsiteDataStore::webPageWasAdded):
1464         (WebKit::WebsiteDataStore::webPageWasInvalidated):
1465         (WebKit::WebsiteDataStore::webProcessWillOpenConnection):
1466         (WebKit::WebsiteDataStore::webPageWillOpenConnection):
1467         (WebKit::WebsiteDataStore::webPageDidCloseConnection):
1468         (WebKit::WebsiteDataStore::webProcessDidCloseConnection):
1469         (WebKit::WebsiteDataStore::isAssociatedProcessPool const):
1470         (WebKit::WebsiteDataStore::processPools const):
1471         (WebKit::WebsiteDataStore::resourceLoadStatisticsEnabled const):
1472         (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
1473         (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
1474         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
1475         (WebKit::WebsiteDataStore::logTestingEvent):
1476         * UIProcess/WebsiteData/WebsiteDataStore.h:
1477         (WebKit::WebsiteDataStore::setStatisticsTestingCallback):
1478         * WebProcess/WebProcess.cpp:
1479         (WebKit::WebProcess::initializeWebProcess):
1480
1481 2019-01-15  Darin Adler  <darin@apple.com>
1482
1483         Use references rather than pointers for register/unregister functions, and more
1484         https://bugs.webkit.org/show_bug.cgi?id=175028
1485
1486         Reviewed by Daniel Bates.
1487
1488         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1489         (WebKit::WebFullScreenManager::willEnterFullScreen): Update for change to the
1490         functions in Document; pass a reference.
1491         (WebKit::WebFullScreenManager::didEnterFullScreen): Ditto, don't pass the element.
1492         (WebKit::WebFullScreenManager::willExitFullScreen): Ditto.
1493         (WebKit::WebFullScreenManager::didExitFullScreen): Ditto.
1494
1495         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1496         (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): Pass a reference.
1497         (WebKit::UserMediaPermissionRequestManager::mediaCanStart): Ditto.
1498         (WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps): Ditto.
1499         * WebProcess/Plugins/PluginView.cpp:
1500         (WebKit::PluginView::~PluginView): Ditto.
1501         (WebKit::PluginView::initializePlugin): Ditto.
1502
1503 2019-01-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1504
1505         Unreviewed, fix -Wreturn-type warning
1506         https://bugs.webkit.org/show_bug.cgi?id=193333
1507         <rdar://problem/45649489>
1508
1509         * UIProcess/Automation/WebAutomationSession.cpp:
1510         (WebKit::toProtocol):
1511
1512 2019-01-20  chris fleizach  <cfleizach@apple.com>
1513
1514         AX: Support returning relative frames for accessibility
1515         https://bugs.webkit.org/show_bug.cgi?id=193414
1516         <rdar://problem/47268501>
1517
1518         Reviewed by Zalan Bujtas.
1519
1520         * UIProcess/API/Cocoa/WKWebView.mm:
1521         (-[WKWebView accessibilityAttributeValue:forParameter:]):
1522         (-[WKWebView IGNORE_WARNINGS_END]):
1523         * UIProcess/API/mac/WKView.mm:
1524         (-[WKView accessibilityAttributeValue:forParameter:]):
1525         (-[WKView IGNORE_WARNINGS_END]):
1526         * UIProcess/Cocoa/WebViewImpl.h:
1527         * UIProcess/Cocoa/WebViewImpl.mm:
1528         (WebKit::WebViewImpl::accessibilityAttributeValue):
1529         * UIProcess/ios/WKContentView.mm:
1530         (-[WKContentView accessibilityConvertRelativeFrameFromPage:]):
1531
1532 2019-01-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1533
1534         Unreviewed, rolling out r240209.
1535
1536         Broke GTK/WPE injected bundle
1537
1538         Reverted changeset:
1539
1540         "AX: Support returning relative frames for accessibility"
1541         https://bugs.webkit.org/show_bug.cgi?id=193414
1542         https://trac.webkit.org/changeset/240209
1543
1544 2019-01-12  Dan Bernstein  <mitz@apple.com>
1545
1546         [Cocoa] Avoid importing directly from subumbrella frameworks
1547         https://bugs.webkit.org/show_bug.cgi?id=186016
1548         <rdar://problem/40591038>
1549
1550         Reviewed by Sam Weinig.
1551
1552         * Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and
1553           OTHER_CPLUSPLUSFLAGS.
1554         * UIProcess/Automation/mac/WebAutomationSessionMac.mm: Import Carbon.h instead of an
1555           HIToolbox header.
1556         * UIProcess/Cocoa/WebViewImpl.mm: Ditto.
1557         * UIProcess/mac/WKPrintingView.mm: Import Quartz.h instead of a PDFKit header.
1558         * UIProcess/mac/WKTextInputWindowController.mm: Import Carbon.h instead of an HIToolbox
1559           header.
1560         * WebProcess/Plugins/PDF/PDFAnnotationTextWidgetDetails.h: Import Quartz.h instead of a
1561           PDFKit header.
1562         * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h: Ditto.
1563         * WebProcess/Plugins/PDF/PDFPlugin.mm: Ditto.
1564         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: Ditto.
1565         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: Ditto.
1566         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm: Ditto.
1567         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: Ditto.
1568         * WebProcess/WebPage/mac/WebPageMac.mm: Ditto.
1569
1570 2019-01-20  chris fleizach  <cfleizach@apple.com>
1571
1572         AX: Support returning relative frames for accessibility
1573         https://bugs.webkit.org/show_bug.cgi?id=193414
1574         <rdar://problem/47268501>
1575
1576         Reviewed by Zalan Bujtas.
1577
1578         * UIProcess/API/Cocoa/WKWebView.mm:
1579         (-[WKWebView accessibilityAttributeValue:forParameter:]):
1580         (-[WKWebView IGNORE_WARNINGS_END]):
1581         * UIProcess/API/mac/WKView.mm:
1582         (-[WKView accessibilityAttributeValue:forParameter:]):
1583         (-[WKView IGNORE_WARNINGS_END]):
1584         * UIProcess/Cocoa/WebViewImpl.h:
1585         * UIProcess/Cocoa/WebViewImpl.mm:
1586         (WebKit::WebViewImpl::accessibilityAttributeValue):
1587         * UIProcess/ios/WKContentView.mm:
1588         (-[WKContentView accessibilityConvertRelativeFrameFromPage:]):
1589
1590 2019-01-20  Antoine Quint  <graouts@apple.com>
1591
1592         Add a POINTER_EVENTS feature flag
1593         https://bugs.webkit.org/show_bug.cgi?id=193577
1594         <rdar://problem/47408511>
1595
1596         Unreviewed. Also enable Pointer Events for iosmac.
1597
1598         * Configurations/FeatureDefines.xcconfig:
1599
1600 2019-01-19  David Kilzer  <ddkilzer@apple.com>
1601
1602         Follow-up: iOS: Updating input mode should update the software keyboard
1603         <https://bugs.webkit.org/show_bug.cgi?id=193565>
1604         <rdar://problem/47376334>
1605
1606         * WebProcess/WebPage/WebPage.cpp:
1607         (WebKit::WebPage::focusedElementDidChangeInputMode): Fix iOS
1608         Debug builds after r240199 by downcasting `element` to
1609         `HTMLElement` before calling canonicalInputMode().
1610
1611 2019-01-19  David Kilzer  <ddkilzer@apple.com>
1612
1613         Sort WebKit Xcode project file
1614
1615         * WebKit.xcodeproj/project.pbxproj:
1616
1617 2019-01-19  Antoine Quint  <graouts@apple.com>
1618
1619         Add a POINTER_EVENTS feature flag
1620         https://bugs.webkit.org/show_bug.cgi?id=193577
1621
1622         Reviewed by Dean Jackson.
1623
1624         * Configurations/FeatureDefines.xcconfig:
1625
1626 2019-01-18  Ryosuke Niwa  <rniwa@webkit.org>
1627
1628         iOS: Updating input mode should update the software keyboard
1629         https://bugs.webkit.org/show_bug.cgi?id=193565
1630         <rdar://problem/47376334>
1631
1632         Reviewed by Wenson Hsieh.
1633
1634         Update the software keyboard when the inputmode content attribute on the focused element had been mutated.
1635
1636         * Scripts/webkit/messages.py:
1637         * Shared/WebCoreArgumentCoders.h:
1638         * UIProcess/PageClient.h:
1639         * UIProcess/WebPageProxy.h:
1640         * UIProcess/WebPageProxy.messages.in:
1641         * UIProcess/ios/PageClientImplIOS.h:
1642         * UIProcess/ios/PageClientImplIOS.mm:
1643         (WebKit::PageClientImpl::focusedElementDidChangeInputMode):
1644         * UIProcess/ios/WKContentViewInteraction.h:
1645         * UIProcess/ios/WKContentViewInteraction.mm:
1646         (-[WKContentView _didUpdateInputMode:]):
1647         * UIProcess/ios/WebPageProxyIOS.mm:
1648         (WebKit::WebPageProxy::focusedElementDidChangeInputMode):
1649         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1650         (WebKit::WebChromeClient::focusedElementDidChangeInputMode):
1651         * WebProcess/WebCoreSupport/WebChromeClient.h:
1652         * WebProcess/WebPage/WebPage.cpp:
1653         (WebKit::WebPage::focusedElementDidChangeInputMode):
1654         * WebProcess/WebPage/WebPage.h:
1655
1656 2019-01-18  Tim Horton  <timothy_horton@apple.com>
1657
1658         Adjust WKDrawingView protocol method name
1659         https://bugs.webkit.org/show_bug.cgi?id=193604
1660
1661         Reviewed by Wenson Hsieh.
1662
1663         * UIProcess/ios/WKDrawingView.mm:
1664         (-[WKDrawingView canvasViewDrawingDidChange:]):
1665         (-[WKDrawingView drawingDidChange:]): Deleted.
1666
1667 2019-01-18  David Kilzer  <ddkilzer@apple.com>
1668
1669         [WebKit] Change Xcode folders to map to folders on disk
1670
1671         * WebKit.xcodeproj/project.pbxproj: Update these folders:
1672         - Shared/Authentication
1673         - Shared/Authentication/cocoa
1674
1675 2019-01-18  Brian Burg  <bburg@apple.com>
1676
1677         Automation.computeElementLayout should return visual viewport-aware coordinates
1678         https://bugs.webkit.org/show_bug.cgi?id=193598
1679         <rdar://problem/35325644>
1680
1681         Reviewed by Simon Fraser.
1682
1683         Previously I added CoordinateSystem::VisualViewport to stub out this for iOS.
1684         But I think that it's a mistake for safaridriver to care about VisualViewport
1685         being enabled or not, because it is a runtime-switchable setting.
1686
1687         This patch removes CoordinateSystem::VisualViewport. Make the existing
1688         CoordinateSystem::LayoutViewport use visual viewport semantics if needed.
1689
1690         This is tested by WebDriver element clicking tests. There should not be any
1691         difference in behavior until it is possible to zoom with gestures via WebDriver.
1692
1693         * Shared/CoordinateSystem.h:
1694         * UIProcess/Automation/Automation.json:
1695         * UIProcess/Automation/WebAutomationSession.cpp:
1696         (WebKit::protocolStringToCoordinateSystem):
1697         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
1698         (WebKit::WebAutomationSessionProxy::computeElementLayout):
1699
1700 2019-01-18  Daniel Bates  <dabates@apple.com>
1701
1702         Fix some build issues.
1703
1704         Include missing header WKDrawingCoordinator.
1705
1706         * UIProcess/ios/WKInkPickerView.mm:
1707
1708 2019-01-18  Tim Horton  <timothy_horton@apple.com>
1709
1710         Get rid of ADVANCED_SPELL_CHECKING
1711         https://bugs.webkit.org/show_bug.cgi?id=193592
1712
1713         Reviewed by Wenson Hsieh.
1714
1715         * UIProcess/Cocoa/WebViewImpl.mm:
1716         (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
1717         (WebKit::WebViewImpl::insertText):
1718         * UIProcess/mac/TextCheckerMac.mm:
1719         (WebKit::TextChecker::checkTextOfParagraph):
1720         (WebKit::TextChecker::getGuessesForWord):
1721
1722 2019-01-18  Chris Dumez  <cdumez@apple.com>
1723
1724         Regression(PSON) Content blockers are sometimes lost on back navigation cross-site
1725         https://bugs.webkit.org/show_bug.cgi?id=193588
1726         <rdar://problem/47131566>
1727
1728         Reviewed by Alex Christensen.
1729
1730         When the WebPageProxy needs to create initialization parameters for its WebPage in the
1731         WebContent process, it calls WebProcessProxy::addWebUserContentControllerProxy()
1732         which calls WebUserContentControllerProxy::addProcess(). This last call is supposed to
1733         register the WebProcessProxy with the WebUserContentControllerProxy and adding the
1734         contentRuleLists to the WebPageCreationParameters. The issue is that if the
1735         WebUserContentControllerProxy already knows about this WebProcessProxy, it would return
1736         early and not populate the WebPageCreationParameters.
1737
1738         In PSON world, when navigating back to a page that failed to enter page cache, we reuse
1739         the process where we previously loaded the page but re-create a new WebPage on the
1740         WebContent process site. When this happens, WebUserContentControllerProxy would not
1741         add the contentRuleLists to the WebPageCreationParameters and the new WebPage in the
1742         previously-suspended process would be missing them.
1743
1744         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1745         (WebKit::WebUserContentControllerProxy::addProcess):
1746
1747 2019-01-18  Jer Noble  <jer.noble@apple.com>
1748
1749         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
1750         https://bugs.webkit.org/show_bug.cgi?id=189553
1751
1752         Reviewed by Tim Horton.
1753
1754         * Configurations/Base.xcconfig:
1755         * Configurations/BaseTarget.xcconfig:
1756         * Configurations/SDKVariant.xcconfig: Added.
1757
1758 2019-01-18  Antti Koivisto  <antti@apple.com>
1759
1760         Implement asynchronous frame scrolling for iOS
1761         https://bugs.webkit.org/show_bug.cgi?id=193539
1762         <rdar://problem/47379873>
1763
1764         Reviewed by Simon Fraser.
1765
1766         Add a scrolling node type that can handle UIScrollView backed frames.
1767         It basically just instantiates and forwards to the existing ScrollingTreeScrollingNodeDelegateIOS.
1768
1769         * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
1770         (WebKit::RemoteScrollingTree::createScrollingTreeNode):
1771         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1772         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1773         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h: Added.
1774         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm: Added.
1775         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::create):
1776         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::ScrollingTreeFrameScrollingNodeRemoteIOS):
1777         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::~ScrollingTreeFrameScrollingNodeRemoteIOS):
1778         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
1779         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren):
1780         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterAncestorChange):
1781         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::scrollPosition const):
1782         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::setScrollLayerPosition):
1783         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterDelegatedScroll):
1784         * WebKit.xcodeproj/project.pbxproj:
1785
1786 2019-01-18  Chris Dumez  <cdumez@apple.com>
1787
1788         Regression(PSON) Scroll position is not always restored properly when navigating back
1789         https://bugs.webkit.org/show_bug.cgi?id=193578
1790         <rdar://problem/47386331>
1791
1792         Reviewed by Tim Horton.
1793
1794         Fix issues causing the scroll position to not be restored at all (or incorrectly) when
1795         navigating back cross-site with PSON enabled. Also make sure that the swipe gesture
1796         snapshot really stays up until we've restored the scroll position.
1797
1798         Note that even after those changes, I can still sometimes reproduce a white flash when
1799         swiping back to Google search results (scroll position being correct now). This is
1800         tracked by <rdar://problem/47071684> and happens even if I disable PSON entirely.
1801
1802         * Shared/SessionState.cpp:
1803         (WebKit::FrameState::encode const):
1804         (WebKit::FrameState::decode):
1805         * Shared/SessionState.h:
1806         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
1807         (WebKit::toFrameState):
1808         (WebKit::applyFrameState):
1809         obscuredInsets is present on the HistoryItem in the WebProcess but was never passed to
1810         or stored by the UIProcess on the WebBackForwardListItem. obscuredInsets is needed to
1811         properly restore the scrollPosition (position was 70px off on my iPad without this).
1812         With PSON enabled, if you swipe back cross-process and the previous page was not put
1813         into PageCache, then the HistoryItem is gone on the WebProcess side. What happens is
1814         that the UIProcess sends its WebBackForwardListItem to the WebProcess, which restores
1815         the HistoryItem there, and then asks it to load it. The obscuredInsets was getting lost
1816         in the process since the UIProcess never knew about it.
1817
1818         * UIProcess/Cocoa/ViewGestureController.cpp:
1819         (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
1820         Drop logic that was causing the ViewGestureController to not wait for the scroll position
1821         to be restored before taking down the snapshot, when UI-side compositing is enabled.
1822         If you look at the comment above the code, you'll see that the code in question was meant
1823         to impact only the non-UI side compositing code path. As a matter of fact, when the code
1824         was reviewed at https://bugs.webkit.org/show_bug.cgi?id=151224, it was protected by a
1825         #if PLATFORM(MAC), before getting modified the wrong way before landing. In practice, we
1826         would have often restored the scroll position by the time the load is finished so it would
1827         not cause a flash in most cases. However, with PSON enabled and the layer tree freezing we
1828         do on process-swap, the first post-scroll restoration layer tree commit may now occur a
1829         little bit later and we would lose the race more often.
1830
1831         * UIProcess/WebProcessProxy.cpp:
1832         (WebKit::WebProcessProxy::updateBackForwardItem):
1833         * UIProcess/WebProcessProxy.h:
1834         When adding PageCache support to PSON, we used to navigate the "suspended" page to
1835         about:blank. This would lead to unwanted WebProcessProxy::updateBackForwardItem()
1836         calls from the WebProcess which we wanted to ignore. We thus added logic to ignore
1837         updateBackForwardItem() IPC from the old WebProcess after a swap. The issue with this
1838         is that we sometimes miss/ignore legit updates to the HistoryItem from the old process,
1839         in particular with regards to the scroll position and the pageScaleFactor. So if you
1840         swiped and then quickly enough did a cross-site navigation, the UIProcess'
1841         WebBackForwardList would not get updated with the latest scroll position and we would
1842         thus fail to restore it later on. To address the issue, we now stop ignoring updates
1843         from the old WebProcess after a swap. This logic is no longer needed since we no longer
1844         navigate the old page to about:blank after a swap, we merely suspend it "in place".
1845
1846 2019-01-18  Wenson Hsieh  <wenson_hsieh@apple.com>
1847
1848         Remove some last vestiges of assisted node terminology in WebKit
1849         https://bugs.webkit.org/show_bug.cgi?id=193572
1850
1851         Reviewed by Tim Horton.
1852
1853         * UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
1854         * UIProcess/ios/WKContentViewInteraction.mm:
1855         (-[WKContentView gestureRecognizerShouldBegin:]):
1856         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
1857         (-[WKContentView _showKeyboard]):
1858         (-[WKContentView _hideKeyboard]):
1859
1860         Add a FIXME about invoking `-reloadInputViews` on watchOS when the focused element is blurred.
1861
1862         (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
1863         (-[WKContentView _elementDidBlur]):
1864         (-[WKContentView updateCurrentFocusedElementInformation:]):
1865         (-[WKContentView _startAssistingKeyboard]): Deleted.
1866         (-[WKContentView _stopAssistingKeyboard]): Deleted.
1867         * WebProcess/WebPage/ios/WebPageIOS.mm:
1868         (WebKit::WebPage::getFocusedElementInformation):
1869
1870 2019-01-18  Youenn Fablet  <youenn@apple.com>
1871
1872         Add a new SPI to request for cache storage quota increase
1873         https://bugs.webkit.org/show_bug.cgi?id=193323
1874
1875         Reviewed by Alex Christensen.
1876
1877         Add a delegate on the WebSiteDataStore for WebKit to ask for quota update.
1878         The current SPI is currently CacheStorage specific but future work should
1879         make it so that other storage like IDB use the same mechanism.
1880         By default, quota remains unchanged if delegate is not implemented.
1881
1882         * NetworkProcess/NetworkProcess.cpp:
1883         * UIProcess/API/Cocoa/WKStorageQuotaDelegatePrivate.h: Added.
1884         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1885         (WebsiteDataStoreQuotaManager::WebsiteDataStoreQuotaManager):
1886         (-[WKWebsiteDataStore _quotaDelegate]):
1887         (-[WKWebsiteDataStore set_quotaDelegate:]):
1888         * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h:
1889         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
1890         * UIProcess/Network/NetworkProcessProxy.cpp:
1891         (WebKit::NetworkProcessProxy::requestCacheStorageSpace):
1892         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1893         (WebKit::WebsiteDataStore::WebsiteDataStore):
1894         * UIProcess/WebsiteData/WebsiteDataStore.h:
1895         (WebKit::WebsiteDataStore::quotaManager):
1896         (WebKit::WebsiteDataStore::setQuotaManager):
1897         * UIProcess/WebsiteData/WebsiteDataStoreQuotaManager.h: Added.
1898         (WebKit::WebsiteDataStoreQuotaManager::~WebsiteDataStoreQuotaManager):
1899         (WebKit::WebsiteDataStoreQuotaManager::requestCacheStorageSpace):
1900         * WebKit.xcodeproj/project.pbxproj:
1901
1902 2019-01-18  Philippe Normand  <pnormand@igalia.com>
1903
1904         [WPE] Add Qt extension
1905         https://bugs.webkit.org/show_bug.cgi?id=191464
1906
1907         Reviewed by Carlos Garcia Campos.
1908
1909         This new extension is a QML plugin embedding a WPE ViewBackend
1910         implementation. It provides a public API very similar to Qt's
1911         WebView module. It comes with a simple mini-browser implemented in
1912         QML.
1913
1914         QtWPE is known to work with the Wayland-EGL (in GNOME and Weston
1915         compositors) and EGLFS QPAs.
1916
1917         * PlatformWPE.cmake:
1918         * UIProcess/API/wpe/qt/WPEQmlExtensionPlugin.cpp: Added.
1919         (WPEQmlExtensionPlugin::registerTypes):
1920         * UIProcess/API/wpe/qt/WPEQmlExtensionPlugin.h: Added.
1921         * UIProcess/API/wpe/qt/WPEQtView.cpp: Added.
1922         (WPEQtView::WPEQtView):
1923         (WPEQtView::~WPEQtView):
1924         (WPEQtView::geometryChanged):
1925         (WPEQtView::configureWindow):
1926         (WPEQtView::createOffscreen):
1927         (WPEQtView::backendCreated):
1928         (WPEQtView::notifyUrlChangedCallback):
1929         (WPEQtView::notifyTitleChangedCallback):
1930         (WPEQtView::notifyLoadProgressCallback):
1931         (WPEQtView::notifyLoadChangedCallback):
1932         (WPEQtView::notifyLoadFailedCallback):
1933         (WPEQtView::updatePaintNode):
1934         (WPEQtView::url const):
1935         (WPEQtView::setUrl):
1936         (WPEQtView::loadProgress const):
1937         (WPEQtView::title const):
1938         (WPEQtView::canGoBack const):
1939         (WPEQtView::isLoading const):
1940         (WPEQtView::canGoForward const):
1941         (WPEQtView::goBack):
1942         (WPEQtView::goForward):
1943         (WPEQtView::reload):
1944         (WPEQtView::stop):
1945         (WPEQtView::loadHtml):
1946         (WPEQtView::jsAsyncReadyCallback):
1947         (WPEQtView::handleJsResult):
1948         (WPEQtView::runJavaScript):
1949         (WPEQtView::mousePressEvent):
1950         (WPEQtView::mouseReleaseEvent):
1951         (WPEQtView::hoverEnterEvent):
1952         (WPEQtView::hoverLeaveEvent):
1953         (WPEQtView::hoverMoveEvent):
1954         (WPEQtView::wheelEvent):
1955         (WPEQtView::keyPressEvent):
1956         (WPEQtView::keyReleaseEvent):
1957         (WPEQtView::touchEvent):
1958         * UIProcess/API/wpe/qt/WPEQtView.h: Added.
1959         * UIProcess/API/wpe/qt/WPEQtViewBackend.cpp: Added.
1960         (configureCallback):
1961         (WPEQtViewBackend::WPEQtViewBackend):
1962         (WPEQtViewBackend::~WPEQtViewBackend):
1963         (WPEQtViewBackend::configureGlibEglDisplay):
1964         (WPEQtViewBackend::configureEglDisplay):
1965         (WPEQtViewBackend::initialize):
1966         (WPEQtViewBackend::backend const):
1967         (WPEQtViewBackend::resize):
1968         (WPEQtViewBackend::getTexture):
1969         (WPEQtViewBackend::initSurface):
1970         (WPEQtViewBackend::displayImage):
1971         (WPEQtViewBackend::modifiers const):
1972         (WPEQtViewBackend::dispatchHoverEnterEvent):
1973         (WPEQtViewBackend::dispatchHoverLeaveEvent):
1974         (WPEQtViewBackend::dispatchHoverMoveEvent):
1975         (WPEQtViewBackend::dispatchMousePressEvent):
1976         (WPEQtViewBackend::dispatchMouseReleaseEvent):
1977         (WPEQtViewBackend::dispatchWheelEvent):
1978         (WPEQtViewBackend::dispatchKeyEvent):
1979         (WPEQtViewBackend::dispatchTouchEvent):
1980         * UIProcess/API/wpe/qt/WPEQtViewBackend.h: Added.
1981         * UIProcess/API/wpe/qt/WPEQtViewLoadRequest.cpp: Added.
1982         (WPEQtViewLoadRequest::WPEQtViewLoadRequest):
1983         (WPEQtViewLoadRequest::~WPEQtViewLoadRequest):
1984         (WPEQtViewLoadRequest::url const):
1985         (WPEQtViewLoadRequest::status const):
1986         (WPEQtViewLoadRequest::errorString const):
1987         * UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h: Added.
1988         * UIProcess/API/wpe/qt/WPEQtViewLoadRequestPrivate.h: Added.
1989         (WPEQtViewLoadRequestPrivate::WPEQtViewLoadRequestPrivate):
1990         (WPEQtViewLoadRequestPrivate::~WPEQtViewLoadRequestPrivate):
1991         * UIProcess/API/wpe/qt/qmldir: Added.
1992
1993 2019-01-17  Wenson Hsieh  <wenson_hsieh@apple.com>
1994
1995         [iOS] Content offset jumps erratically when autoscrolling near scroll view content inset areas
1996         https://bugs.webkit.org/show_bug.cgi?id=193494
1997         <rdar://problem/46859627>
1998
1999         Reviewed by Simon Fraser and Tim Horton.
2000
2001         Adds `contentInsets` to `VisibleContentRectUpdateInfo`. This keeps track of the visible content insets
2002         surrounding the unobscured content rect. See WebCore ChangeLog for more details.
2003
2004         * Shared/VisibleContentRectUpdateInfo.cpp:
2005         (WebKit::VisibleContentRectUpdateInfo::encode const):
2006         (WebKit::VisibleContentRectUpdateInfo::decode):
2007         (WebKit::operator<<):
2008         * Shared/VisibleContentRectUpdateInfo.h:
2009         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2010         (WebKit::VisibleContentRectUpdateInfo::contentInsets const):
2011         (WebKit::operator==):
2012         * UIProcess/API/Cocoa/WKWebView.mm:
2013         (-[WKWebView _computedObscuredInset]):
2014         (-[WKWebView _computedContentInset]):
2015         (-[WKWebView _computedUnobscuredSafeAreaInset]):
2016
2017         We don't care about source compatibility with iOS 10 and below anymore, so we should change these >= iOS 11
2018         target checks to simply `PLATFORM(IOS)`.
2019
2020         (-[WKWebView _updateVisibleContentRects]):
2021
2022         Compute the visible content insets on all sides of the unobscured content rect. These insets are scaled to
2023         content coordinates.
2024
2025         * UIProcess/ios/WKContentView.h:
2026         * UIProcess/ios/WKContentView.mm:
2027         (floatBoxExtent):
2028
2029         Add a helper to convert `UIEdgeInsets` to `WebCore::FloatBoxExtent`, and use it in a few places below.
2030
2031         (-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
2032         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]): Deleted.
2033         * WebProcess/WebPage/ios/WebPageIOS.mm:
2034         (WebKit::WebPage::updateVisibleContentRects):
2035
2036         Update the Page's content insets.
2037
2038 2019-01-17  Truitt Savell  <tsavell@apple.com>
2039
2040         Unreviewed, rolling out r240124.
2041
2042         This commit broke an internal build.
2043
2044         Reverted changeset:
2045
2046         "SDK_VARIANT build destinations should be separate from non-
2047         SDK_VARIANT builds"
2048         https://bugs.webkit.org/show_bug.cgi?id=189553
2049         https://trac.webkit.org/changeset/240124
2050
2051 2019-01-17  John Wilander  <wilander@apple.com>
2052
2053         Add infrastructure to enable/disable ITP Debug Mode through Preferences
2054         https://bugs.webkit.org/show_bug.cgi?id=193510
2055         <rdar://problem/47330969>
2056
2057         Reviewed by Dean Jackson.
2058
2059         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
2060         (WebKit::ResourceLoadStatisticsMemoryStore::ensurePrevalentResourcesForDebugMode):
2061         (WebKit::ResourceLoadStatisticsMemoryStore::setResourceLoadStatisticsDebugMode):
2062         (WebKit::ResourceLoadStatisticsMemoryStore::setPrevalentResourceForDebugMode):
2063             These functions are now suited for runtime switching of ITP Debug Mode.
2064         * Shared/WebPreferences.yaml:
2065             Changed name from ResourceLoadStatisticsDebugMode to ItpDebugModeEnabled.
2066         * UIProcess/API/Cocoa/WKPreferences.mm:
2067         (-[WKPreferences _setItpDebugModeEnabled:]):
2068         (-[WKPreferences _itpDebugModeEnabled]):
2069             New private preferences functions.
2070         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2071         * UIProcess/Cocoa/ResourceLoadStatisticsMemoryStoreCocoa.mm:
2072         (WebKit::ResourceLoadStatisticsMemoryStore::registerUserDefaultsIfNeeded):
2073             Removed support for old experimental user default. Added a new one that's
2074             not connected to any UI, i.e. merely for command line debugging where
2075             ITP Debug Mode needs to be on all the time.
2076
2077 2019-01-17  Tim Horton  <timothy_horton@apple.com>
2078
2079         Adopt NSTextCheckingSuppressInitialCapitalizationKey
2080         https://bugs.webkit.org/show_bug.cgi?id=193545
2081
2082         Reviewed by Dean Jackson.
2083
2084         * UIProcess/mac/TextCheckerMac.mm:
2085         (WebKit::TextChecker::checkTextOfParagraph):
2086         (WebKit::TextChecker::getGuessesForWord):
2087
2088 2019-01-17  Jer Noble  <jer.noble@apple.com>
2089
2090         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
2091         https://bugs.webkit.org/show_bug.cgi?id=189553
2092
2093         Reviewed by Tim Horton.
2094
2095         * Configurations/Base.xcconfig:
2096         * Configurations/BaseTarget.xcconfig:
2097         * Configurations/SDKVariant.xcconfig: Added.
2098
2099 2019-01-16  Dean Jackson  <dino@apple.com>
2100
2101         (iPad) Link tapping is sluggish on many sites
2102         https://bugs.webkit.org/show_bug.cgi?id=193522
2103         <rdar://problem/47102987>
2104
2105         Reviewed by Wenson Hsieh.
2106
2107         Some WKWebView clients might set the initial zoom scale of the page to
2108         something other than 1, which disables the "fast tap" behaviour.
2109         The fix is very simple -- just check against the initial scale rather
2110         than 1.
2111
2112         The most likely regression from this would be pages designed for desktop,
2113         but provide a viewport tag saying width=device-width and initial-scale.
2114         They might stop allowing double-tap-to-zoom.
2115
2116         * UIProcess/API/Cocoa/WKWebView.mm:
2117         (-[WKWebView _allowsDoubleTapGestures]): Check against initial page scale.
2118
2119 2019-01-17  Alex Christensen  <achristensen@webkit.org>
2120
2121         Stop using NetworkStorageSession::storageSession in WebCore
2122         https://bugs.webkit.org/show_bug.cgi?id=193529
2123
2124         Reviewed by Tim Horton.
2125
2126         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2127         (WebKit::NetworkConnectionToWebProcess::createSocketStream):
2128         * NetworkProcess/NetworkProcess.h:
2129         * NetworkProcess/NetworkSocketStream.cpp:
2130         (WebKit::NetworkSocketStream::create):
2131         (WebKit::NetworkSocketStream::NetworkSocketStream):
2132         * NetworkProcess/NetworkSocketStream.h:
2133         * NetworkProcess/NetworkStorageSessionProvider.h: Added.
2134         * WebKit.xcodeproj/project.pbxproj:
2135         * WebProcess/Network/WebSocketProvider.cpp:
2136         (WebKit::WebSocketProvider::createSocketStreamHandle):
2137         * WebProcess/Network/WebSocketProvider.h:
2138         * WebProcess/WebPage/WebCookieJar.cpp:
2139         (WebKit::WebCookieJar::WebCookieJar):
2140         * WebProcess/WebPage/WebCookieJar.h:
2141
2142 2019-01-16  Youenn Fablet  <youenn@apple.com>
2143
2144         Add a new SPI for controlling getUserMedia
2145         https://bugs.webkit.org/show_bug.cgi?id=192793
2146
2147         Reviewed by Eric Carlson.
2148
2149         Some weaknesses of the current getUserMedia/enumerateDevices SPI were found.
2150         In particular:
2151         - The hash salt should be handled by WebKit not by apps using WebKit.
2152         - No need to expose the frame URL, only the top level origin is needed.
2153         - The names of the callback are changed to improve the intent of these callbacks.
2154         Addressed these by creating a new SPI which will replace the current one.
2155         The current SPI will be removed later on.
2156
2157         Did some refactoring by making the callbacks not return false.
2158         Instead, implement the default behavior inside the request objects as deny methods.
2159         Some further refactoring will be done as a follow-up to better align the C API with the Cocoa API.
2160
2161         * UIProcess/API/APIUIClient.h:
2162         (API::UIClient::decidePolicyForUserMediaPermissionRequest):
2163         (API::UIClient::checkUserMediaPermissionForOrigin):
2164         * UIProcess/API/C/WKPage.cpp:
2165         (WKPageSetPageUIClient):
2166         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2167         * UIProcess/API/Cocoa/WKWebView.mm:
2168         (-[WKWebView _mediaCaptureState]):
2169         (-[WKWebView _setMediaCaptureMuted:]):
2170         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2171         * UIProcess/API/glib/WebKitUIClient.cpp:
2172         * UIProcess/Cocoa/MediaCaptureUtilities.h: Added.
2173         * UIProcess/Cocoa/MediaCaptureUtilities.mm: Added.
2174         * UIProcess/Cocoa/UIDelegate.h:
2175         * UIProcess/Cocoa/UIDelegate.mm:
2176         (WebKit::UIDelegate::setDelegate):
2177         (WebKit::requestUserMediaAuthorizationForFrame):
2178         (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
2179         (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
2180         (WebKit::UIDelegate::UIClient::mediaCaptureStateDidChange):
2181         * UIProcess/UserMediaPermissionCheckProxy.h:
2182         (WebKit::UserMediaPermissionCheckProxy::deny):
2183         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2184         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2185         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
2186         * UIProcess/UserMediaPermissionRequestProxy.h:
2187
2188 2019-01-16  Youenn Fablet  <youenn@apple.com>
2189
2190         Pipe cache quota request from Network Process to UIProcess
2191         https://bugs.webkit.org/show_bug.cgi?id=193296
2192
2193         Reviewed by Alex Christensen.
2194
2195         When cache storage hits quota for a given origin, pipe the request back to NetworkProcess.
2196         No record will be put until the quota request is answered.
2197         The request is sent from CacheStorage::Caches to CacheStorage::Engine and to NetworkProcess.
2198         NetworkProcess then sends it to NetworkProcessProxy.
2199         Currently NetworkProcessProxy just answers by keeping the quota as it is.
2200         In the future, NetworkProcessProxy should make a delegate call to let the app using WebKit
2201         make a decision on the quota. This will allow prompting user to bump it as done for other data.
2202
2203         * NetworkProcess/NetworkProcess.cpp:
2204         (WebKit::NetworkProcess::requestCacheStorageSpace):
2205         * NetworkProcess/NetworkProcess.h:
2206         * NetworkProcess/cache/CacheStorageEngine.cpp:
2207         (WebKit::CacheStorage::Engine::~Engine):
2208         (WebKit::CacheStorage::Engine::from):
2209         (WebKit::CacheStorage::Engine::Engine):
2210         (WebKit::CacheStorage::Engine::requestSpace):
2211         (WebKit::CacheStorage::Engine::requestSpaceCompleted):
2212         * NetworkProcess/cache/CacheStorageEngine.h:
2213         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
2214         (WebKit::CacheStorage::Cache::put):
2215         (WebKit::CacheStorage::Cache::retryPuttingPendingRecords):
2216         * NetworkProcess/cache/CacheStorageEngineCache.h:
2217         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2218         (WebKit::CacheStorage::Caches::requestSpace):
2219         (WebKit::CacheStorage::Caches::notifyCachesOfRequestSpaceEnd):
2220         * NetworkProcess/cache/CacheStorageEngineCaches.h:
2221         (WebKit::CacheStorage::Caches::isRequestingSpace const):
2222         * UIProcess/Network/NetworkProcessProxy.cpp:
2223         (WebKit::NetworkProcessProxy::requestCacheStorageSpace):
2224         * UIProcess/Network/NetworkProcessProxy.h:
2225         * UIProcess/Network/NetworkProcessProxy.messages.in:
2226
2227 2019-01-16  Alex Christensen  <achristensen@webkit.org>
2228
2229         sendBeacon to previously-unvisited https domain always fails
2230         https://bugs.webkit.org/show_bug.cgi?id=193508
2231
2232         Reviewed by Geoffrey Garen.
2233
2234         * NetworkProcess/PingLoad.cpp:
2235         (WebKit::PingLoad::didReceiveChallenge):
2236         If a ping load is doing a TLS handshake, continue if the server has good certificates.
2237
2238 2019-01-16  Youenn Fablet  <youenn@apple.com>
2239
2240         ASSERTION FAILED: m_networkLoadInformationByID.contains(identifier) in WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics
2241         https://bugs.webkit.org/show_bug.cgi?id=189097
2242         <rdar://problem/43856423>
2243
2244         Reviewed by Alex Christensen.
2245
2246         In case where the inspector is launched, it will instruct the NetworkConnectionToWebProcess to start capturing network metrics.
2247         If this happens in the middle of a load, addNetworkLoadInformationMetrics might fail since addNetworkLoadInformation will not be called.
2248         To fix this issue, store whether to capture metrics at NetworkResourceLoader level.
2249
2250         To ensure that the case of switching back and forth capture of metrics, disable loader capture of metrics whenver NetworkConnectionToWebProcess is asked to.
2251
2252         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2253         (WebKit::NetworkConnectionToWebProcess::setCaptureExtraNetworkLoadMetricsEnabled):
2254         * NetworkProcess/NetworkConnectionToWebProcess.h:
2255         (WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics):
2256         * NetworkProcess/NetworkResourceLoader.cpp:
2257         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
2258         (WebKit::NetworkResourceLoader::shouldCaptureExtraNetworkLoadMetrics const):
2259         * NetworkProcess/NetworkResourceLoader.h:
2260
2261 2019-01-16  Alex Christensen  <achristensen@webkit.org>
2262
2263         Revert r239938
2264         https://bugs.webkit.org/show_bug.cgi?id=193267
2265         <rdar://problem/47297304>
2266
2267         * Configurations/WebContent-iOS.entitlements:
2268
2269 2019-01-16  Chris Dumez  <cdumez@apple.com>
2270
2271         Regression(r240046) Several API tests are crashing
2272         https://bugs.webkit.org/show_bug.cgi?id=193509
2273
2274         Reviewed by Geoffrey Garen.
2275
2276         The crashes would happen because loadRequestShared() would take a WebProcessProxy& in parameter but
2277         then call reattachToWebProcess() if the page is not valid, which would replace m_process and invalidate
2278         our process reference.
2279
2280         To address the issue, move the reattachToWebProcess() call to loadRequest(), before calling
2281         loadRequestShared(). Also, update *Shared() methods to take a Ref<WebProcessProxy>&& instead
2282         of a WebProcessProxy& in parameter. Since we call client delegates, we need to make sure
2283         our process stays alive.
2284
2285         * UIProcess/ProvisionalPageProxy.cpp:
2286         (WebKit::ProvisionalPageProxy::loadData):
2287         (WebKit::ProvisionalPageProxy::loadRequest):
2288         (WebKit::ProvisionalPageProxy::didCreateMainFrame):
2289         (WebKit::ProvisionalPageProxy::didPerformClientRedirect):
2290         (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
2291         (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
2292         (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData):
2293         (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame):
2294         (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
2295         (WebKit::ProvisionalPageProxy::decidePolicyForResponse):
2296         (WebKit::ProvisionalPageProxy::startURLSchemeTask):
2297         (WebKit::ProvisionalPageProxy::backForwardGoToItem):
2298         * UIProcess/WebPageProxy.cpp:
2299         (WebKit::WebPageProxy::loadRequest):
2300         (WebKit::WebPageProxy::loadRequestWithNavigationShared):
2301         (WebKit::WebPageProxy::loadData):
2302         (WebKit::WebPageProxy::loadDataWithNavigationShared):
2303         (WebKit::WebPageProxy::didPerformDragControllerAction):
2304         (WebKit::WebPageProxy::findPlugin):
2305         (WebKit::WebPageProxy::didCreateMainFrame):
2306         (WebKit::WebPageProxy::didCreateSubframe):
2307         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
2308         (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
2309         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
2310         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
2311         (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
2312         (WebKit::WebPageProxy::didCancelClientRedirectForFrame):
2313         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
2314         (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):
2315         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
2316         (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
2317         (WebKit::WebPageProxy::didCommitLoadForFrame):
2318         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
2319         (WebKit::WebPageProxy::didFinishLoadForFrame):
2320         (WebKit::WebPageProxy::didFailLoadForFrame):
2321         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
2322         (WebKit::WebPageProxy::didReceiveTitleForFrame):
2323         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
2324         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
2325         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
2326         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
2327         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
2328         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
2329         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2330         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
2331         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2332         (WebKit::WebPageProxy::decidePolicyForResponse):
2333         (WebKit::WebPageProxy::decidePolicyForResponseShared):
2334         (WebKit::WebPageProxy::unableToImplementPolicy):
2335         (WebKit::WebPageProxy::willSubmitForm):
2336         (WebKit::WebPageProxy::didNavigateWithNavigationData):
2337         (WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
2338         (WebKit::WebPageProxy::didPerformClientRedirect):
2339         (WebKit::WebPageProxy::didPerformClientRedirectShared):
2340         (WebKit::WebPageProxy::didPerformServerRedirect):
2341         (WebKit::WebPageProxy::didUpdateHistoryTitle):
2342         (WebKit::WebPageProxy::createNewPage):
2343         (WebKit::WebPageProxy::runJavaScriptAlert):
2344         (WebKit::WebPageProxy::runJavaScriptConfirm):
2345         (WebKit::WebPageProxy::runJavaScriptPrompt):
2346         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
2347         (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
2348         (WebKit::WebPageProxy::runOpenPanel):
2349         (WebKit::WebPageProxy::printFrame):
2350         (WebKit::WebPageProxy::backForwardGoToItem):
2351         (WebKit::WebPageProxy::backForwardGoToItemShared):
2352         (WebKit::WebPageProxy::learnWord):
2353         (WebKit::WebPageProxy::ignoreWord):
2354         (WebKit::WebPageProxy::didReceiveEvent):
2355         (WebKit::WebPageProxy::editingRangeCallback):
2356         (WebKit::WebPageProxy::rectForCharacterRangeCallback):
2357         (WebKit::WebPageProxy::focusedFrameChanged):
2358         (WebKit::WebPageProxy::frameSetLargestFrameChanged):
2359         (WebKit::WebPageProxy::exceededDatabaseQuota):
2360         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
2361         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
2362         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
2363         (WebKit::WebPageProxy::startURLSchemeTask):
2364         (WebKit::WebPageProxy::startURLSchemeTaskShared):
2365         (WebKit::WebPageProxy::stopURLSchemeTask):
2366         (WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
2367         * UIProcess/WebPageProxy.h:
2368
2369 2019-01-16  Chris Dumez  <cdumez@apple.com>
2370
2371         Regression(PSON) View becomes blank after click a cross-site download link
2372         https://bugs.webkit.org/show_bug.cgi?id=193361
2373         <rdar://problem/47099573>
2374
2375         Reviewed by Geoffrey Garen.
2376
2377         The issue tracked by rdar://problem/47099573 is that a provisional load may get
2378         canceled (or converted into a download) *after* we've decided to process-swap.
2379         In such cases, the view should keep displaying the current site and it should
2380         still be interactive. However, with the previous PSON model, the view (pageProxy)
2381         would have already swapped to the new process and would end up displaying the
2382         initially empty document.
2383
2384         To address the issue, this patch introduces the concept of a provisional load
2385         in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
2386         process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
2387         provisional page until after the load was committed in the new process. This means
2388         that the view / WebPageProxy keeps using the old process and displays the current
2389         content until a load has committed in the provisional page. If no load commits
2390         in the provisional process (e.g. because the load is cancelled or converted into
2391         a download), then we merely destroy the ProvisionalPageProxy and terminate its
2392         process, without impacting the WebPageProxy.
2393
2394         * Shared/WebPageCreationParameters.cpp:
2395         (WebKit::WebPageCreationParameters::encode const):
2396         (WebKit::WebPageCreationParameters::decode):
2397         * Shared/WebPageCreationParameters.h:
2398         Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to
2399         delay attaching the drawing area in case of a process-swap, no matter what
2400         now that the previous process is kept alive until the provisional load is
2401         committed in the new process.
2402
2403         * Shared/WebPolicyAction.h:
2404         Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of
2405         process-swap, we now tell the previous process to simply ignore the load, while
2406         we create a ProvisionalPageProxy to do the new load in a new process.
2407         Suspension of the previous page in the old process, happens later, when a load
2408         is actually committed in the new process.
2409
2410         * Sources.txt:
2411         Add new ProvisionalPageProxy file.
2412
2413         * UIProcess/API/Cocoa/WKWebView.mm:
2414         (-[WKWebView _killWebContentProcessAndResetState]):
2415         When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current
2416         process and the provisional one, to maintain previous behavior in our API tests.
2417
2418         * UIProcess/API/gtk/PageClientImpl.cpp:
2419         (WebKit::PageClientImpl::createDrawingAreaProxy):
2420         * UIProcess/API/gtk/PageClientImpl.h:
2421         * UIProcess/API/wpe/PageClientImpl.cpp:
2422         (WebKit::PageClientImpl::createDrawingAreaProxy):
2423         * UIProcess/API/wpe/PageClientImpl.h:
2424         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
2425         (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
2426         (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState):
2427         (WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState):
2428         (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
2429         (WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
2430         (WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
2431         * UIProcess/AcceleratedDrawingAreaProxy.h:
2432         * UIProcess/Cocoa/WebViewImpl.h:
2433         * UIProcess/Cocoa/WebViewImpl.mm:
2434         (WebKit::WebViewImpl::createDrawingAreaProxy):
2435         * UIProcess/DrawingAreaProxy.cpp:
2436         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
2437         (WebKit::DrawingAreaProxy::~DrawingAreaProxy):
2438         (WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
2439         * UIProcess/DrawingAreaProxy.h:
2440         (WebKit::DrawingAreaProxy::process):
2441         * UIProcess/DrawingAreaProxyImpl.cpp:
2442         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2443         (WebKit::DrawingAreaProxyImpl::update):
2444         * UIProcess/DrawingAreaProxyImpl.h:
2445         * UIProcess/PageClient.h:
2446         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
2447         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
2448         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
2449         (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
2450         (WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):
2451         (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
2452         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
2453         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
2454         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
2455         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
2456         (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
2457         * UIProcess/ios/PageClientImplIOS.h:
2458         * UIProcess/ios/PageClientImplIOS.mm:
2459         (WebKit::PageClientImpl::createDrawingAreaProxy):
2460         * UIProcess/ios/WKContentView.h:
2461         * UIProcess/ios/WKContentView.mm:
2462         (-[WKContentView _createDrawingAreaProxy:]):
2463         * UIProcess/mac/PageClientImplMac.h:
2464         * UIProcess/mac/PageClientImplMac.mm:
2465         (WebKit::PageClientImpl::createDrawingAreaProxy):
2466         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2467         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2468         (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
2469         (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
2470         (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
2471         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
2472         (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
2473         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
2474         (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
2475         (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):
2476         (WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
2477         * UIProcess/mac/WebPageProxyMac.mm:
2478         * UIProcess/win/PageClientImpl.cpp:
2479         (WebKit::PageClientImpl::createDrawingAreaProxy):
2480         * UIProcess/win/PageClientImpl.h:
2481         * UIProcess/win/PageClientImpl.cpp:
2482         (WebKit::PageClientImpl::createDrawingAreaProxy):
2483         * UIProcess/win/PageClientImpl.h:
2484         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2485         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2486         Pass the drawing area's associated process when constructing it and store it as a member
2487         in addition to the page. This is necessary now that a page can be associated with 2
2488         WebProcesses at a time, each having its own drawing area.
2489
2490         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2491         (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
2492         Pass the process.
2493
2494         * UIProcess/ProvisionalPageProxy.cpp: Added.
2495         (WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
2496         (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
2497         (WebKit::ProvisionalPageProxy::processDidTerminate):
2498         (WebKit::ProvisionalPageProxy::takeDrawingArea):
2499         (WebKit::ProvisionalPageProxy::cancel):
2500         (WebKit::ProvisionalPageProxy::processDidFinishLaunching):
2501         (WebKit::ProvisionalPageProxy::finishInitializingWebPageAfterProcessLaunch):
2502         (WebKit::ProvisionalPageProxy::initializeWebPage):
2503         (WebKit::ProvisionalPageProxy::loadData):
2504         (WebKit::ProvisionalPageProxy::loadRequest):
2505         (WebKit::ProvisionalPageProxy::goToBackForwardItem):
2506         (WebKit::ProvisionalPageProxy::didCreateMainFrame):
2507         (WebKit::ProvisionalPageProxy::didPerformClientRedirect):
2508         (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
2509         (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
2510         (WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
2511         (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData):
2512         (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame):
2513         (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
2514         (WebKit::ProvisionalPageProxy::decidePolicyForResponse):
2515         (WebKit::ProvisionalPageProxy::startURLSchemeTask):
2516         (WebKit::ProvisionalPageProxy::backForwardGoToItem):
2517         (WebKit::ProvisionalPageProxy::didReceiveMessage):
2518         (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
2519         * UIProcess/ProvisionalPageProxy.h: Added.
2520         (WebKit::ProvisionalPageProxy::page):
2521         (WebKit::ProvisionalPageProxy::mainFrame const):
2522         (WebKit::ProvisionalPageProxy::process):
2523         (WebKit::ProvisionalPageProxy::processSwapRequestedByClient const):
2524         (WebKit::ProvisionalPageProxy::navigationID const):
2525         (WebKit::ProvisionalPageProxy::drawingArea const):
2526         New WebPageProxy-like class which is owned by the WebPageProxy and proxies IPC from
2527         the provisional process.
2528
2529         * UIProcess/SuspendedPageProxy.cpp:
2530         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
2531         (WebKit::SuspendedPageProxy::unsuspend):
2532         (WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
2533         Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier
2534         when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy
2535         which tries to register itself as an IPC message receiver for the same pageID when
2536         a process-swap occurs and we're switching to a suspended page.
2537
2538         * UIProcess/WebFrameProxy.cpp:
2539         (WebKit::WebFrameProxy::isMainFrame const):
2540         WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame.
2541         Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's
2542         m_mainFrame to maintain previous behavior.
2543
2544         * UIProcess/WebPageProxy.cpp:
2545         (WebKit::WebPageProxy::provisionalDrawingArea const):
2546         Add getter for the provisional drawing area. We normally only deal with the page's current drawing area, but
2547         the ViewGestureController needs access to the provisional once to display the swipe gesture snapshot.
2548
2549         (WebKit::WebPageProxy::swapToWebProcess):
2550         swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess()
2551         later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs
2552         to initialize some data members such as the drawing area and the main frame as it is transferring them over from
2553         the ProvisionalPageProxy which started the provisional load.
2554
2555         (WebKit::WebPageProxy::finishAttachingToWebProcess):
2556         We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
2557         committed in the provisional process.
2558
2559         (WebKit::WebPageProxy::setDrawingArea):
2560         (WebKit::WebPageProxy::initializeWebPage):
2561         - We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
2562           committed in the provisional process.
2563         - Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().
2564
2565         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
2566         (WebKit::WebPageProxy::loadRequest):
2567         (WebKit::WebPageProxy::loadRequestWithNavigationShared):
2568         Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
2569         Yes. This avoids hitting some assertions as this was already called during the first API call if needed.
2570
2571         (WebKit::WebPageProxy::loadData):
2572         (WebKit::WebPageProxy::loadDataWithNavigationShared):
2573         (WebKit::WebPageProxy::stopLoading):
2574         (WebKit::WebPageProxy::reload):
2575         (WebKit::WebPageProxy::didPerformDragControllerAction):
2576         (WebKit::WebPageProxy::findPlugin):
2577         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
2578         In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
2579         Suspension now happens later, only if we end up committing the provisional load in the new process.
2580         Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
2581         to happen a bit later but it is clearer if we do this as early as possible I think.
2582
2583         (WebKit::WebPageProxy::commitProvisionalPage):
2584         When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:
2585         - Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
2586         - Suspending the current page.
2587         - Letting the client know the load is comitted
2588         - Destroy the ProvisionalPageProxy.
2589         This work used to happen earlier in continueNavigationInNewProcess().
2590
2591         (WebKit::WebPageProxy::continueNavigationInNewProcess):
2592         Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
2593         without actually having the WebPageProxy switch to the new process yet.
2594
2595         (WebKit::WebPageProxy::didCreateMainFrame):
2596         (WebKit::WebPageProxy::didCreateSubframe):
2597         (WebKit::WebPageProxy::didCreateWindow):
2598         Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.
2599
2600         (WebKit::WebPageProxy::didDestroyNavigation):
2601         On process-swap, when telling the previous process to ignore the load and starting the new load in a new
2602         ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
2603         the call since the navigation is merely taken over by the ProvisionalPageProxy.
2604
2605         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
2606         (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
2607         Moved some PSON logic to the ProvisionalPageProxy instead.
2608
2609         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
2610         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
2611         (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
2612         (WebKit::WebPageProxy::didCancelClientRedirectForFrame):
2613         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
2614         (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):
2615
2616         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
2617         (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
2618         When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.
2619
2620         (WebKit::WebPageProxy::didCommitLoadForFrame):
2621         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
2622         (WebKit::WebPageProxy::didFinishLoadForFrame):
2623         (WebKit::WebPageProxy::didFailLoadForFrame):
2624         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
2625         (WebKit::WebPageProxy::didReceiveTitleForFrame):
2626         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
2627         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
2628         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
2629         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
2630         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
2631         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
2632         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2633         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
2634         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2635         (WebKit::WebPageProxy::decidePolicyForResponse):
2636         (WebKit::WebPageProxy::decidePolicyForResponseShared):
2637         (WebKit::WebPageProxy::unableToImplementPolicy):
2638         (WebKit::WebPageProxy::willSubmitForm):
2639         (WebKit::WebPageProxy::didNavigateWithNavigationData):
2640         (WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
2641         (WebKit::WebPageProxy::didPerformClientRedirect):
2642         (WebKit::WebPageProxy::didPerformClientRedirectShared):
2643         (WebKit::WebPageProxy::didPerformServerRedirect):
2644         (WebKit::WebPageProxy::didUpdateHistoryTitle):
2645         (WebKit::WebPageProxy::createNewPage):
2646         (WebKit::WebPageProxy::runJavaScriptAlert):
2647         (WebKit::WebPageProxy::runJavaScriptConfirm):
2648         (WebKit::WebPageProxy::runJavaScriptPrompt):
2649         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
2650         (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
2651         (WebKit::WebPageProxy::runOpenPanel):
2652         (WebKit::WebPageProxy::printFrame):
2653         (WebKit::WebPageProxy::backForwardGoToItem):
2654         (WebKit::WebPageProxy::backForwardGoToItemShared):
2655         (WebKit::WebPageProxy::learnWord):
2656         (WebKit::WebPageProxy::ignoreWord):
2657         (WebKit::WebPageProxy::didReceiveEvent):
2658         (WebKit::WebPageProxy::editingRangeCallback):
2659         (WebKit::WebPageProxy::rectForCharacterRangeCallback):
2660         (WebKit::WebPageProxy::focusedFrameChanged):
2661         (WebKit::WebPageProxy::frameSetLargestFrameChanged):
2662
2663         (WebKit::WebPageProxy::provisionalProcessDidTerminate):
2664         Cancel the provisiona load and destroy the ProvisionalPageProxy if
2665         the provisional process crashes.
2666
2667         (WebKit::WebPageProxy::resetState):
2668         Drop some code that is no longer needed.
2669
2670         (WebKit::WebPageProxy::creationParameters):
2671         - Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have
2672         more than one call site. This was just some bad factoring.
2673         - Take the process in parameter now that we page can be associated with several processes at a time.
2674
2675         (WebKit::WebPageProxy::exceededDatabaseQuota):
2676         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
2677         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
2678         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
2679         (WebKit::WebPageProxy::startURLSchemeTask):
2680         (WebKit::WebPageProxy::startURLSchemeTaskShared):
2681         (WebKit::WebPageProxy::stopURLSchemeTask):
2682         (WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
2683         (WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
2684         (WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):
2685         * UIProcess/WebPageProxy.h:
2686         (WebKit::WebPageProxy::visitedLinkStore):
2687         (WebKit::WebPageProxy::provisionalPageProxy const):
2688
2689         * UIProcess/WebProcessProxy.cpp:
2690         (WebKit::WebProcessProxy::hasProvisionalPageWithID const):
2691         (WebKit::WebProcessProxy::updateBackForwardItem):
2692         (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
2693         (WebKit::WebProcessProxy::didFinishLaunching):
2694         (WebKit::WebProcessProxy::canTerminateChildProcess):
2695         * UIProcess/WebProcessProxy.h:
2696         (WebKit::WebProcessProxy::addProvisionalPageProxy):
2697         (WebKit::WebProcessProxy::removeProvisionalPageProxy):
2698         Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the
2699         item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID
2700         associated with this process yet, because it is still a ProvisionalPageProxy.        
2701
2702         * UIProcess/WebURLSchemeHandler.cpp:
2703         (WebKit::WebURLSchemeHandler::startTask):
2704         * UIProcess/WebURLSchemeHandler.h:
2705         * UIProcess/WebURLSchemeTask.cpp:
2706         (WebKit::WebURLSchemeTask::create):
2707         (WebKit::WebURLSchemeTask::WebURLSchemeTask):
2708         (WebKit::WebURLSchemeTask::didPerformRedirection):
2709         (WebKit::WebURLSchemeTask::didReceiveResponse):
2710         (WebKit::WebURLSchemeTask::didReceiveData):
2711         (WebKit::WebURLSchemeTask::didComplete):
2712         (WebKit::WebURLSchemeTask::pageDestroyed):
2713         * UIProcess/WebURLSchemeTask.h:
2714         Pass the process when constructing a WebURLSchemeTask and store it as a data member in addition to
2715         the page. This is necessary now that a WebPageProxy can be associated with several WebProcesses.
2716
2717         * UIProcess/ios/ViewGestureControllerIOS.mm:
2718         (WebKit::ViewGestureController::endSwipeGesture):
2719         Use the provisional drawing area to display the swipe snapshot as it may differ from the one currently
2720         associated with the page in case of process swap.
2721
2722         * WebKit.xcodeproj/project.pbxproj:
2723         Add ProvisionalPageProxy class.
2724
2725         * WebProcess/WebPage/WebFrame.cpp:
2726         (WebKit::toPolicyAction):
2727         (WebKit::WebFrame::didReceivePolicyDecision):
2728         * WebProcess/WebPage/WebPage.cpp:
2729         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
2730         (WebKit::WebPage::reinitializeWebPage):
2731         (WebKit::WebPage::didReceivePolicyDecision):
2732         Stop dealing with WebPolicyAction::Suspend as it no longer exists.
2733
2734         (WebKit::WebPage::didCompletePageTransition):
2735
2736         (WebKit::WebPage::setIsSuspended):
2737         Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
2738         setIsSuspended(true) IPC is sent when we actually commit the provisional page.
2739
2740         * WebProcess/WebPage/WebPage.h:
2741
2742 2019-01-16  Tim Horton  <timothy_horton@apple.com>
2743
2744         Frequent null-deref under TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded()
2745         https://bugs.webkit.org/show_bug.cgi?id=193468
2746         <rdar://problem/38645869>
2747
2748         Reviewed by Zalan Bujtas.
2749
2750         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2751         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2752         Adjust the null-check a bit; Zalan pointed out that the layout could
2753         be responsible for the Frame/RenderView going away, so we should bail
2754         *after* layout, not before.
2755
2756 2019-01-15  Fujii Hironori  <Hironori.Fujii@sony.com>
2757
2758         Unreviewed WinCairo build fix.
2759
2760         * WebProcess/WebPage/WebPageInspectorTargetController.cpp:
2761         (WebKit::WebPageInspectorTargetController::connectInspector): Use 'auto' instead of unprefixed InspectorTarget.
2762         (WebKit::WebPageInspectorTargetController::disconnectInspector): Ditto.
2763         (WebKit::WebPageInspectorTargetController::sendMessageToTargetBackend): Ditto.
2764
2765 2019-01-15  Alex Christensen  <achristensen@webkit.org>
2766
2767         Reduce use of NetworkStorageSession::defaultStorageSession in WebCore
2768         https://bugs.webkit.org/show_bug.cgi?id=193368
2769
2770         Reviewed by Geoff Garen.
2771
2772         * WebProcess/Plugins/PluginView.cpp:
2773         (WebKit::PluginView::getAuthenticationInfo):
2774
2775 2019-01-15  Alex Christensen  <achristensen@webkit.org>
2776
2777         Remove more NetworkProcess::singleton use
2778         https://bugs.webkit.org/show_bug.cgi?id=193484
2779
2780         Reviewed by Geoffrey Garen.
2781
2782         This removes the use of NetworkProcess::singleton in the LegacyCustomProtocolManager.
2783         This is the kind of awful duct tape code that keeps me awake at night, but it's necessary
2784         because we can't quite remove LegacyCustomProtocolManager yet but we need to allow more than
2785         one NetworkProcess object.  To make it work well enough until we remove LegacyCustomProtocolManager,
2786         use the last NetworkProcess object that has been created.
2787
2788         * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:
2789         (newestNetworkProcess):
2790         (LegacyCustomProtocolManager::networkProcessCreated):
2791         (+[WKCustomProtocol canInitWithRequest:]):
2792         (-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
2793         (-[WKCustomProtocol startLoading]):
2794         (-[WKCustomProtocol stopLoading]):
2795         * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp:
2796         (WebKit::LegacyCustomProtocolManager::LegacyCustomProtocolManager):
2797         (WebKit::LegacyCustomProtocolManager::startLoading):
2798         (WebKit::LegacyCustomProtocolManager::stopLoading):
2799         * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h:
2800         * NetworkProcess/NetworkProcess.cpp:
2801         (WebKit::NetworkProcess::NetworkProcess):
2802
2803 2019-01-15  Alex Christensen  <achristensen@webkit.org>
2804
2805         Fix WinCairo build after r240014
2806         https://bugs.webkit.org/show_bug.cgi?id=161106
2807
2808         * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
2809
2810 2019-01-15  Ryosuke Niwa  <rniwa@webkit.org>
2811
2812         VisualViewport API should be updated upon opening of keyboard
2813         https://bugs.webkit.org/show_bug.cgi?id=193475
2814
2815         Reviewed by Simon Fraser.
2816
2817         The bug was caused by the changes to unobscuredContentRectRespectingInputViewBounds not updating the visual viewport
2818         unless it caused a layout to happen. Added a code to update the visual viewport in WebPage::updateVisibleContentRects.
2819
2820         Also fixed the bug that VisibleContentRectUpdateInfo::operator== was not checking differences in
2821         unobscuredContentRectRespectingInputViewBounds which resulted in the visual viewport override not getting updated
2822         while the keyboard is getting brought up.
2823
2824         * Shared/VisibleContentRectUpdateInfo.h:
2825         (WebKit::operator==):
2826         * WebProcess/WebPage/ios/WebPageIOS.mm:
2827         (WebKit::WebPage::updateVisibleContentRects):
2828
2829 2019-01-15  Megan Gardner  <megan_gardner@apple.com>
2830
2831         Add Reveal support in iOSMac
2832         https://bugs.webkit.org/show_bug.cgi?id=193408
2833         <rdar://problem/47300699>
2834
2835         Reviewed by Tim Horton.
2836
2837         Add calls to DictionaryLookup from the appropriate places.
2838
2839         * UIProcess/PageClient.h:
2840         * UIProcess/ios/PageClientImplIOS.h:
2841         * UIProcess/ios/PageClientImplIOS.mm:
2842         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2843         * UIProcess/ios/WebPageProxyIOS.mm:
2844         (WebKit::WebPageProxy::didPerformDictionaryLookup):
2845         * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
2846         (WebKit::WebPage::dictionaryPopupInfoForRange):
2847
2848 2019-01-15  Claudio Saavedra  <csaavedra@igalia.com>
2849
2850         [SOUP] Remove usage of NetworkProcess::singleton()
2851         https://bugs.webkit.org/show_bug.cgi?id=193444
2852
2853         Reviewed by Michael Catanzaro.
2854
2855         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2856         (WebKit::NetworkDataTaskSoup::download):
2857         (WebKit::NetworkDataTaskSoup::didWriteDownload):
2858         (WebKit::NetworkDataTaskSoup::didFinishDownload):
2859         (WebKit::NetworkDataTaskSoup::didFailDownload):
2860         * NetworkProcess/soup/NetworkSessionSoup.cpp:
2861         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
2862
2863 2019-01-15  Eric Carlson  <eric.carlson@apple.com>
2864
2865         Fix incorrect ASSERT added in r239840
2866         https://bugs.webkit.org/show_bug.cgi?id=193466
2867         <rdar://problem/47095142>
2868
2869         Reviewed by Youenn Fablet.
2870
2871         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2872         (WebKit::UserMediaCaptureManager::Source::Source):
2873
2874 2019-01-15  Tim Horton  <timothy_horton@apple.com>
2875
2876         Frequent null-deref under TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded()
2877         https://bugs.webkit.org/show_bug.cgi?id=193468
2878         <rdar://problem/38645869>
2879
2880         Reviewed by Beth Dakin.
2881
2882         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2883         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2884         I'm not sure why this got *worse*, but we should null-check RenderView.
2885         It's OK to bail from scaleViewToFitDocumentIfNeeded, we'll re-do it
2886         the next time we paint (which will surely happen if we gain a RenderView).
2887
2888 2019-01-15  Chris Dumez  <cdumez@apple.com>
2889
2890         Unreviewed, rolling out r239993, r239995, r239997, and
2891         r239999.
2892
2893         Caused assertions under
2894         ViewGestureController::disconnectFromProcess()
2895
2896         Reverted changesets:
2897
2898         "Regression(PSON) View becomes blank after click a cross-site
2899         download link"
2900         https://bugs.webkit.org/show_bug.cgi?id=193361
2901         https://trac.webkit.org/changeset/239993
2902
2903         "Unreviewed iOS build fix after r239993."
2904         https://trac.webkit.org/changeset/239995
2905
2906         "Fix iOS build after r239993"
2907         https://bugs.webkit.org/show_bug.cgi?id=193361
2908         https://trac.webkit.org/changeset/239997
2909
2910         "Unreviewed, revert part of r239997 as it is not needed to fix
2911         the build."
2912         https://trac.webkit.org/changeset/239999
2913
2914 2019-01-15  Alex Christensen  <achristensen@webkit.org>
2915
2916         Stop using CookiesStrategy
2917         https://bugs.webkit.org/show_bug.cgi?id=161106
2918
2919         Reviewed by Don Olmstead and Antti Koivisto.
2920
2921         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
2922         (WebKit::NetworkProcessPlatformStrategies::createCookiesStrategy): Deleted.
2923         * NetworkProcess/NetworkProcessPlatformStrategies.h:
2924         * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
2925         * Scripts/webkit/messages.py:
2926         * Sources.txt:
2927         * WebKit.xcodeproj/project.pbxproj:
2928         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
2929         (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
2930         (WebKit::WebAutomationSessionProxy::deleteCookie):
2931         * WebProcess/Plugins/PluginView.cpp:
2932         (WebKit::PluginView::cookiesForURL):
2933         (WebKit::PluginView::setCookiesForURL):
2934         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2935         (WebKit::WebPlatformStrategies::createCookiesStrategy): Deleted.
2936         (WebKit::WebPlatformStrategies::cookiesForDOM): Deleted.
2937         (WebKit::WebPlatformStrategies::setCookiesFromDOM): Deleted.
2938         (WebKit::WebPlatformStrategies::cookiesEnabled): Deleted.
2939         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue): Deleted.
2940         (WebKit::WebPlatformStrategies::getRawCookies): Deleted.
2941         (WebKit::WebPlatformStrategies::deleteCookie): Deleted.
2942         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2943         * WebProcess/WebPage/WebCookieJar.cpp: Added.
2944         (WebKit::WebCookieJar::cookies const):
2945         (WebKit::WebCookieJar::setCookies):
2946         (WebKit::WebCookieJar::cookiesEnabled const):
2947         (WebKit::WebCookieJar::cookieRequestHeaderFieldValue const):
2948         (WebKit::WebCookieJar::getRawCookies const):
2949         (WebKit::WebCookieJar::deleteCookie):
2950         * WebProcess/WebPage/WebCookieJar.h: Added.
2951         * WebProcess/WebPage/WebPage.cpp:
2952         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
2953
2954 2019-01-15  Per Arne Vollan  <pvollan@apple.com>
2955
2956         Remove reporting for iOS mach lookups confirmed in-use
2957         https://bugs.webkit.org/show_bug.cgi?id=193455
2958         <rdar://problem/47259551>
2959
2960         Reviewed by Brent Fulgham.
2961
2962         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2963
2964 2019-01-15  Tim Horton  <timothy_horton@apple.com>
2965
2966         Cannot tab out of WKWebView on macOS
2967         https://bugs.webkit.org/show_bug.cgi?id=161448
2968         <rdar://problem/28100085>
2969
2970         Reviewed by Dean Jackson.
2971
2972         * UIProcess/WebPageProxy.cpp:
2973         (WebKit::WebPageProxy::takeFocus):
2974         If the UIDelegate doesn't implement takeFocus, provide a simple default
2975         implementation that just uses AppKit's key view loop to move the focus.
2976
2977         * UIProcess/API/APIUIClient.h:
2978         (API::UIClient::takeFocus):
2979         * UIProcess/API/C/WKPage.cpp:
2980         (WKPageSetPageUIClient):
2981         * UIProcess/Cocoa/UIDelegate.h:
2982         * UIProcess/Cocoa/UIDelegate.mm:
2983         (WebKit::UIDelegate::UIClient::takeFocus):
2984         Make API::UIClient's takeFocus return a bool indicating whether the
2985         client implements it or not.
2986
2987         * UIProcess/PageClient.h:
2988         * UIProcess/mac/PageClientImplMac.h:
2989         * UIProcess/mac/PageClientImplMac.mm:
2990         (WebKit::PageClientImpl::takeFocus):
2991         Plumb takeFocus to WebViewImpl.
2992
2993         * UIProcess/Cocoa/WebViewImpl.h:
2994         * UIProcess/Cocoa/WebViewImpl.mm:
2995         (WebKit::WebViewImpl::takeFocus):
2996         Borrow the relevant portion of WebKitLegacy's implementation of takeFocus,
2997         shifting focus to the next/previous key view in the window.
2998
2999 2019-01-15  Youenn Fablet  <youenn@apple.com>
3000
3001         Remove the specific handling of ephemeral sessions from CacheStorage::Engine::from
3002         https://bugs.webkit.org/show_bug.cgi?id=193400
3003
3004         Reviewed by Alex Christensen.
3005
3006         It is no longer needed as we correctly handle ephemeral sessions removal.
3007
3008         * NetworkProcess/cache/CacheStorageEngine.cpp:
3009         (WebKit::CacheStorage::Engine::from):
3010
3011 2019-01-15  Alex Christensen  <achristensen@webkit.org>
3012
3013         Fix iOS build after r239993
3014         https://bugs.webkit.org/show_bug.cgi?id=193361
3015
3016         * UIProcess/ProvisionalPageProxy.h:
3017         * UIProcess/SuspendedPageProxy.h:
3018
3019 2019-01-15  Per Arne Vollan  <pvollan@apple.com>
3020
3021         [macOS] Adjust logging policy in WebKit's sandbox
3022         https://bugs.webkit.org/show_bug.cgi?id=193454
3023         <rdar://problem/47256325>
3024
3025         Reviewed by Brent Fulgham.
3026
3027         * WebProcess/com.apple.WebProcess.sb.in:
3028
3029 2019-01-15  Chris Dumez  <cdumez@apple.com>
3030
3031         Unreviewed iOS build fix after r239993.
3032
3033         * UIProcess/SuspendedPageProxy.h:
3034
3035 2019-01-15  Per Arne Vollan  <pvollan@apple.com>
3036
3037         Add allow directive for MTLCompilerService.xpc to PluginProcess and WebContent
3038         https://bugs.webkit.org/show_bug.cgi?id=193453
3039         <rdar://problem/47268166>
3040
3041         Reviewed by Brent Fulgham.
3042
3043         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
3044         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3045         * WebProcess/com.apple.WebProcess.sb.in:
3046
3047 2019-01-15  Chris Dumez  <cdumez@apple.com>
3048
3049         Regression(PSON) View becomes blank after click a cross-site download link
3050         https://bugs.webkit.org/show_bug.cgi?id=193361
3051         <rdar://problem/47099573>
3052
3053         Reviewed by Geoff Garen.
3054
3055         The issue tracked by rdar://problem/47099573 is that a provisional load may get
3056         canceled (or converted into a download) *after* we've decided to process-swap.
3057         In such cases, the view should keep displaying the current site and it should
3058         still be interactive. However, with the previous PSON model, the view (pageProxy)
3059         would have already swapped to the new process and would end up displaying the
3060         initially empty document.
3061
3062         To address the issue, this patch introduces the concept of a provisional load
3063         in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
3064         process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
3065         provisional page until after the load was committed in the new process. This means
3066         that the view / WebPageProxy keeps using the old process and displays the current
3067         content until a load has committed in the provisional page. If no load commits
3068         in the provisional process (e.g. because the load is cancelled or converted into
3069         a download), then we merely destroy the ProvisionalPageProxy and terminate its
3070         process, without impacting the WebPageProxy.
3071
3072         * Shared/WebPageCreationParameters.cpp:
3073         (WebKit::WebPageCreationParameters::encode const):
3074         (WebKit::WebPageCreationParameters::decode):
3075         * Shared/WebPageCreationParameters.h:
3076         Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to
3077         delay attaching the drawing area in case of a process-swap, no matter what
3078         now that the previous process is kept alive until the provisional load is
3079         committed in the new process.
3080
3081         * Shared/WebPolicyAction.h:
3082         Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of
3083         process-swap, we now tell the previous process to simply ignore the load, while
3084         we create a ProvisionalPageProxy to do the new load in a new process.
3085         Suspension of the previous page in the old process, happens later, when a load
3086         is actually committed in the new process.
3087
3088         * Sources.txt:
3089         Add new ProvisionalPageProxy file.
3090
3091         * UIProcess/API/Cocoa/WKWebView.mm:
3092         (-[WKWebView _killWebContentProcessAndResetState]):
3093         When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current
3094         process and the provisional one, to maintain previous behavior in our API tests.
3095
3096         * UIProcess/PageClient.h:
3097         Tiny build fix.
3098
3099         * UIProcess/ProvisionalPageProxy.cpp: Added.
3100         (WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
3101         (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
3102         (WebKit::ProvisionalPageProxy::takeDrawingArea):
3103         (WebKit::ProvisionalPageProxy::cancel):
3104         (WebKit::ProvisionalPageProxy::initializeWebPage):
3105         (WebKit::ProvisionalPageProxy::loadDataWithNavigation):
3106         (WebKit::ProvisionalPageProxy::loadRequestWithNavigation):
3107         (WebKit::ProvisionalPageProxy::goToBackForwardItem):
3108         (WebKit::ProvisionalPageProxy::didCreateMainFrame):
3109         (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
3110         (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
3111         (WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
3112         (WebKit::ProvisionalPageProxy::didReceiveMessage):
3113         (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
3114         * UIProcess/ProvisionalPageProxy.h: Added.
3115         (WebKit::ProvisionalPageProxy::page):
3116         (WebKit::ProvisionalPageProxy::mainFrame const):
3117         (WebKit::ProvisionalPageProxy::process):
3118         (WebKit::ProvisionalPageProxy::processSwapRequestedByClient const):
3119         (WebKit::ProvisionalPageProxy::navigationID const):
3120         Add new ProvisionalPageProxy class to wrap the provisional load in the new process
3121         after a swap. The provisional page is owned by the WebPageProxy and we only commit
3122         the provisional page when the load is committed. Until then, the WebPageProxy keeps
3123         using the old process and displaying the current content.
3124
3125         * UIProcess/SuspendedPageProxy.cpp:
3126         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
3127         (WebKit::SuspendedPageProxy::unsuspend):
3128         (WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
3129         Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier
3130         when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy
3131         which tries to register itself as an IPC message receiver for the same pageID when
3132         a process-swap occurs and we're switching to a suspended page.
3133
3134         * UIProcess/WebFrameProxy.cpp:
3135         (WebKit::WebFrameProxy::isMainFrame const):
3136         WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame.
3137         Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's
3138         m_mainFrame to maintain previous behavior.
3139
3140         * UIProcess/WebPageProxy.cpp:
3141         (WebKit::WebPageProxy::swapToWebProcess):
3142         swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess()
3143         later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs
3144         to initialize some data members such as the drawing area and the main frame as it is transferring them over from
3145         the ProvisionalPageProxy which started the provisional load.
3146
3147         (WebKit::WebPageProxy::finishAttachingToWebProcess):
3148         We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
3149         committed in the provisional process.
3150
3151         (WebKit::WebPageProxy::initializeWebPage):
3152         - We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
3153           committed in the provisional process.
3154         - Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().
3155
3156         (WebKit::WebPageProxy::loadRequestWithNavigation):
3157         Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
3158         Yes. This avoids hitting some assertions as this was already called during the first API call if needed.
3159
3160         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
3161         In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
3162         Suspension now happens later, only if we end up committing the provisional load in the new process.
3163         Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
3164         to happen a bit later but it is clearer if we do this as early as possible I think.
3165
3166         (WebKit::WebPageProxy::commitProvisionalPage):
3167         When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:
3168         - Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
3169         - Suspending the current page.
3170         - Letting the client know the load is comitted
3171         - Destroy the ProvisionalPageProxy.
3172         This work used to happen earlier in continueNavigationInNewProcess().
3173
3174         (WebKit::WebPageProxy::continueNavigationInNewProcess):
3175         Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
3176         without actually having the WebPageProxy switch to the new process yet.
3177
3178         (WebKit::WebPageProxy::didCreateMainFrame):
3179         (WebKit::WebPageProxy::didCreateWindow):
3180         Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.
3181
3182         (WebKit::WebPageProxy::didDestroyNavigation):
3183         On process-swap, when telling the previous process to ignore the load and starting the new load in a new
3184         ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
3185         the call since the navigation is merely taken over by the ProvisionalPageProxy.
3186
3187         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3188         Moved some PSON logic to the ProvisionalPageProxy instead.
3189
3190         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
3191         When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.
3192
3193         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
3194         (WebKit::WebPageProxy::decidePolicyForResponse):
3195         Capture the process in the lambda, to make sure we send the policy decision to the same process that
3196         asked for it, so as to not get confused by process swaps.
3197
3198         (WebKit::WebPageProxy::resetState):
3199         Drop some code that is no longer needed.
3200
3201         (WebKit::WebPageProxy::creationParameters):
3202         Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have
3203         more than one call site. This was just some bad factoring.
3204
3205         (WebKit::WebPageProxy::PageProcessOverride::PageProcessOverride):
3206         (WebKit::WebPageProxy::PageProcessOverride::~PageProcessOverride):
3207         * UIProcess/WebPageProxy.h:
3208         (WebKit::WebPageProxy::temporarilyOverrideProcess):
3209         Add utility class to temporarily override the WebPageProxy's m_process with the provisional one when
3210         the ProvisionalPageProxy interacts with the WebPageProxy.
3211
3212         * UIProcess/WebProcessProxy.cpp:
3213         (WebKit::WebProcessProxy::hasProvisionalPageWithID const):
3214         (WebKit::WebProcessProxy::updateBackForwardItem):
3215         Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the
3216         item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID
3217         associated with this process yet, because it is still a ProvisionalPageProxy.
3218
3219         (WebKit::WebProcessProxy::canTerminateChildProcess):
3220         Do not terminate the WebProcess if there are ProvisionalPageProxy objects using it.
3221
3222         * UIProcess/WebProcessProxy.h:
3223         (WebKit::WebProcessProxy::addProvisionalPageProxy):
3224         (WebKit::WebProcessProxy::removeProvisionalPageProxy):
3225
3226         * WebKit.xcodeproj/project.pbxproj:
3227
3228         * WebProcess/WebPage/WebFrame.cpp:
3229         (WebKit::toPolicyAction):
3230         (WebKit::WebFrame::didReceivePolicyDecision):
3231         Stop dealing with WebPolicyAction::Suspend as it no longer exists.
3232
3233         * WebProcess/WebPage/WebPage.cpp:
3234         (WebKit::WebPage::reinitializeWebPage):
3235         (WebKit::WebPage::didReceivePolicyDecision):
3236
3237         (WebKit::WebPage::setIsSuspended):
3238         Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
3239         setIsSuspended(true) IPC is sent when we actually commit the provisional page.
3240
3241         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3242         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
3243
3244 2019-01-15  Brian Burg  <bburg@apple.com>
3245
3246         WebDriver: update Create Window implementation to support newest specification
3247         https://bugs.webkit.org/show_bug.cgi?id=193333
3248         <rdar://problem/45649489>
3249
3250         Reviewed by Carlos Garcia Campos.
3251
3252         Spec link: https://w3c.github.io/webdriver/#create-window
3253
3254         The command as specified returns a value indicating whether the new browsing context
3255         was presented as a new tab or new window. Add a new delegate method to query the current
3256         'presentation' of the browsing context. The presentation can change over time due to
3257         things such as screen orientation, so the value that is returned by the command only
3258         reflects how the browsing context was initially presented to the user.
3259
3260         This is covered by existing WPT and internal tests. More will be added when Selenium
3261         exposes this command in its various bindings.
3262
3263         * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
3264         Add new SPI delegate method to query the 'presentation' (tab or window) for an automated WKWebView.
3265
3266         * UIProcess/API/APIAutomationSessionClient.h:
3267         (API::AutomationSessionClient::currentPresentationOfPage):
3268         * UIProcess/Cocoa/AutomationSessionClient.h:
3269         * UIProcess/Cocoa/AutomationSessionClient.mm:
3270         (WebKit::AutomationSessionClient::AutomationSessionClient):
3271         (WebKit::toImpl):
3272         (WebKit::AutomationSessionClient::currentPresentationOfPage):
3273         * UIProcess/Automation/WebAutomationSession.cpp:
3274         (WebKit::toProtocol):
3275         (WebKit::WebAutomationSession::createBrowsingContext):
3276         Add plumbing between ObjC delegate and C++.
3277
3278         * UIProcess/Automation/Automation.json:
3279         Include the initial presentation in the createBrowsingContext command result.
3280
3281 2019-01-14  Alex Christensen  <achristensen@webkit.org>
3282
3283         Split headerValueForVary into specialized functions for NetworkProcess and WebProcess/WebKitLegacy
3284         https://bugs.webkit.org/show_bug.cgi?id=193429
3285
3286         Reviewed by Joseph Pecoraro.
3287
3288         * NetworkProcess/cache/NetworkCache.cpp:
3289         (WebKit::NetworkCache::makeUseDecision):
3290         (WebKit::NetworkCache::Cache::retrieve):
3291         (WebKit::NetworkCache::Cache::makeEntry):
3292         (WebKit::NetworkCache::Cache::makeRedirectEntry):
3293         (WebKit::NetworkCache::Cache::update):
3294
3295 2019-01-14  Tim Horton  <timothy_horton@apple.com>
3296
3297         Fix a style mistake in PageClientImplMac
3298
3299         * UIProcess/mac/PageClientImplMac.h:
3300         Somehow these methods ended up above the members.
3301
3302 2019-01-14  Per Arne Vollan  <pvollan@apple.com>
3303
3304         [macOS] Remove reporting for mach lookups confirmed in-use
3305         https://bugs.webkit.org/show_bug.cgi?id=193415
3306         <rdar://problem/47266542>
3307
3308         Reviewed by Brent Fulgham.
3309
3310         Also, start denying the services which have not been confirmed to be in use.
3311
3312         * WebProcess/com.apple.WebProcess.sb.in:
3313
3314 2019-01-14  Commit Queue  <commit-queue@webkit.org>
3315
3316         Unreviewed, rolling out r239901, r239909, r239910, r239912,
3317         r239913, and r239914.
3318         https://bugs.webkit.org/show_bug.cgi?id=193407
3319
3320         These revisions caused an internal failure (Requested by
3321         Truitt on #webkit).
3322
3323         Reverted changesets:
3324
3325         "[Cocoa] Avoid importing directly from subumbrella frameworks"
3326         https://bugs.webkit.org/show_bug.cgi?id=186016
3327         https://trac.webkit.org/changeset/239901
3328
3329         "Tried to fix USE(APPLE_INTERNAL_SDK) builds after r239901."
3330         https://trac.webkit.org/changeset/239909
3331
3332         "Tried to fix the build."
3333         https://trac.webkit.org/changeset/239910
3334
3335         "Fixed iOS builds after r239910."
3336         https://trac.webkit.org/changeset/239912
3337
3338         "More build fixing."
3339         https://trac.webkit.org/changeset/239913
3340
3341         "Tried to fix USE(APPLE_INTERNAL_SDK) 32-bit builds."
3342         https://trac.webkit.org/changeset/239914
3343
3344 2019-01-14  Mark Lam  <mark.lam@apple.com>
3345
3346         Re-enable ability to build --cloop builds.
3347         https://bugs.webkit.org/show_bug.cgi?id=192955
3348         <rdar://problem/46882363>
3349
3350         Reviewed by Saam barati and Keith Miller.
3351
3352         * Configurations/FeatureDefines.xcconfig:
3353
3354 2019-01-14  Alex Christensen  <achristensen@webkit.org>
3355
3356         Remove unused networking entitlement from iOS WebProcess entitlements
3357         https://bugs.webkit.org/show_bug.cgi?id=193267
3358
3359         Reviewed by Dean Jackson.
3360
3361         * Configurations/WebContent-iOS.entitlements:
3362         This gave access to VPN stuff.  It's not needed any more.
3363
3364 2019-01-14  Youenn Fablet  <youenn@apple.com>
3365
3366         Enable MDNS ICE candidate support by default
3367         https://bugs.webkit.org/show_bug.cgi?id=193358
3368
3369         Reviewed by Geoffrey Garen.
3370
3371         * Shared/WebPreferences.yaml:
3372
3373 2019-01-11  Matt Rajca  <mrajca@apple.com>
3374
3375         Expose preference for site-specific quirks on iOS
3376         https://bugs.webkit.org/show_bug.cgi?id=193353
3377
3378         Reviewed by Dean Jackson.
3379
3380         * UIProcess/API/Cocoa/WKPreferences.mm:
3381         (-[WKPreferences _setNeedsSiteSpecificQuirks:]):
3382         (-[WKPreferences _needsSiteSpecificQuirks]):
3383         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3384
3385 2019-01-14  Wenson Hsieh  <wenson_hsieh@apple.com>
3386
3387         [iOS] Expose SPI to access the current sentence boundary and selection state
3388         https://bugs.webkit.org/show_bug.cgi?id=193398
3389         <rdar://problem/45893108>
3390
3391         Reviewed by Dean Jackson.
3392
3393         Expose SPI on WKWebView for internal clients to grab information about attributes at the current selection; so
3394         far, this only includes whether the selection is a caret or a range, and whether or not the start of the
3395         selection is at the start of a new sentence.
3396