7c2b6657a25d725de7f402c39b00d9a6893889a4
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-08-21  Keith Rollin  <krollin@apple.com>
2
3         Remove support for watchOS < 6.0
4         https://bugs.webkit.org/show_bug.cgi?id=200937
5         <rdar://problem/54524009>
6
7         Reviewed by Darin Adler.
8
9         Update conditionals that reference __WATCH_OS_VERSION_MIN_REQUIRED and
10         __WATCH_OS_VERSION_MAX_ALLOWED, assuming that they both have values >=
11         60000. This means that expressions like
12         "__WATCH_OS_VERSION_MIN_REQUIRED < 60000" are always False and
13         "__WATCH_OS_VERSION_MIN_REQUIRED >= 60000" are always True.
14
15         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
16         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
17
18 2019-08-21  Adrian Perez de Castro  <aperez@igalia.com>
19
20         [GTK] Build failure due to unwieldy definition of “None” from X11 headers
21         https://bugs.webkit.org/show_bug.cgi?id=200984
22
23         Reviewed by Carlos Alberto Lopez Perez.
24
25         * SourcesGTK.txt: Mark AcceleratedBackingStore.cpp with @no-unify
26         because it includes AcceleratedSurfaceX11.h when building with
27         ENABLE_X11_TARGET=ON, which in turn will include the X11 headers.
28         It is just lucky that most of the time the order of the generated
29         #include statements in the unified sources has been masking this
30         problem.
31
32 2019-08-21  Rob Buis  <rbuis@igalia.com>
33
34         Verify Prefetch and credential behavior
35         https://bugs.webkit.org/show_bug.cgi?id=200000
36
37         Reviewed by Youenn Fablet.
38
39         Cancel cross-origin prefetches for Vary: Cookie.
40
41         Test: http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie.html
42
43         * NetworkProcess/NetworkResourceLoader.cpp:
44         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
45         (WebKit::NetworkResourceLoader::didReceiveResponse):
46         * NetworkProcess/cache/PrefetchCache.cpp:
47         (WebKit::PrefetchCache::take):
48
49 2019-08-21  Pablo Saavedra  <psaavedra@igalia.com>
50
51         [WPE] Build failure after r248846 ([WTF] Add makeUnique<T>, which ensures T is fast-allocated, makeUnique / makeUniqueWithoutFastMallocCheck part)
52         https://bugs.webkit.org/show_bug.cgi?id=200973
53
54         WPE fails to build with `-DENABLE_WPE_QT_API=ON` after changes done by r248846 in:
55
56           Source/WebKit/UIProcess/API/wpe/qt/WPEQtView.cpp
57           Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewBackend.cpp
58
59         ; to forces FastMalloc use.
60
61         Related to:
62
63           https://bugs.webkit.org/show_bug.cgi?id=200611
64           https://bugs.webkit.org/show_bug.cgi?id=200620
65
66         This patch puts WPEQt... classes into FastMalloc in the same way it
67         was done by many others in r248603.
68
69         Reviewed by Philippe Normand.
70
71         * UIProcess/API/wpe/qt/WPEQtView.cpp:
72         (WPEQtView::runJavaScript):
73         * UIProcess/API/wpe/qt/WPEQtViewBackend.h:
74         * UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h:
75
76 2019-08-20  Said Abou-Hallawa  <sabouhallawa@apple.com>
77
78         [iOS] REGRESSION (248501): gmail.com images are still not shown on some versions of iPhone iOS13
79         https://bugs.webkit.org/show_bug.cgi?id=200948
80
81         Reviewed by Tim Horton.
82
83         Apply the gmail.com quirk for all iPhone iOS versions till the gmail.com
84         bug is fixed.
85
86         * WebProcess/WebPage/ios/WebPageIOS.mm:
87         (WebKit::WebPage::platformUserAgent const):
88
89 2019-08-20  Chris Dumez  <cdumez@apple.com>
90
91         WebSQLiteDatabaseTracker does not ensure it is still alive after dispatching to the main thread
92         https://bugs.webkit.org/show_bug.cgi?id=200925
93
94         Reviewed by Geoffrey Garen.
95
96         WebSQLiteDatabaseTracker does not ensure it is still alive after dispatching to the main thread,
97         which is not safe. Use WeakPtr to address the issue.
98
99         * Shared/WebSQLiteDatabaseTracker.cpp:
100         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
101         (WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction):
102         (WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction):
103         * Shared/WebSQLiteDatabaseTracker.h:
104
105 2019-08-20  Brent Fulgham  <bfulgham@apple.com>
106
107         [FTW] Fix scrolling in modern WebKit views
108         https://bugs.webkit.org/show_bug.cgi?id=200923
109
110         Reviewed by Don Olmstead.
111
112         The initial implementation of scrolling in Direct2D had errors that
113         caused hilarious rendering glitches. This patch corrects the logic
114         so that page scroll is correct.
115
116         This patch also fixes a bug that would trigger when resizing windows.
117
118         * Shared/win/ShareableBitmapDirect2D.cpp:
119         (WebKit::ShareableBitmap::paint):
120         * UIProcess/BackingStore.h:
121         (WebKit::BackingStore::renderTarget): Deleted.
122         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
123         (WebKit::DrawingAreaProxyCoordinatedGraphics::sizeDidChange):
124         (WebKit::DrawingAreaProxyCoordinatedGraphics::deviceScaleFactorDidChange):
125         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
126         * UIProcess/win/BackingStoreDirect2D.cpp:
127         (WebKit::BackingStore::paint):
128         (WebKit::BackingStore::incorporateUpdate):
129         (WebKit::BackingStore::scroll):
130         * UIProcess/win/WebView.cpp:
131         (WebKit::WebView::paint):
132         (WebKit::WebView::onSizeEvent):
133
134 2019-08-20  Chris Dumez  <cdumez@apple.com>
135
136         Unsafe usage of CookieStorageObserver from a background thread
137         https://bugs.webkit.org/show_bug.cgi?id=200920
138
139         Reviewed by Alex Christensen.
140
141         * UIProcess/API/APIHTTPCookieStore.h:
142         * UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm:
143         (API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
144
145 2019-08-20  Chris Dumez  <cdumez@apple.com>
146
147         Use a strongly typed identifier for StorageNamespace's identifier
148         https://bugs.webkit.org/show_bug.cgi?id=200895
149
150         Reviewed by Alex Christensen and Youenn Fablet.
151
152         Use a strongly typed identifier for StorageNamespace's identifier instead of uint64_t, to
153         avoid type confusion.
154
155         * NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
156         (WebKit::LocalStorageNamespace::LocalStorageNamespace):
157         * NetworkProcess/WebStorage/LocalStorageNamespace.h:
158         * NetworkProcess/WebStorage/StorageManager.cpp:
159         (WebKit::StorageManager::createSessionStorageNamespace):
160         (WebKit::StorageManager::destroySessionStorageNamespace):
161         (WebKit::StorageManager::cloneSessionStorageNamespace):
162         (WebKit::StorageManager::createLocalStorageArea):
163         (WebKit::StorageManager::createTransientLocalStorageArea):
164         (WebKit::StorageManager::createSessionStorageArea):
165         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
166         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
167         (WebKit::StorageManager::getOrCreateSessionStorageNamespace):
168         * NetworkProcess/WebStorage/StorageManager.h:
169         * NetworkProcess/WebStorage/StorageManagerSet.cpp:
170         (WebKit::StorageManagerSet::connectToLocalStorageArea):
171         (WebKit::StorageManagerSet::connectToTransientLocalStorageArea):
172         (WebKit::StorageManagerSet::connectToSessionStorageArea):
173         (WebKit::StorageManagerSet::cloneSessionStorageNamespace):
174         * NetworkProcess/WebStorage/StorageManagerSet.h:
175         * NetworkProcess/WebStorage/StorageManagerSet.messages.in:
176         * Scripts/webkit/messages.py:
177         * WebKit.xcodeproj/project.pbxproj:
178         * WebProcess/InjectedBundle/InjectedBundle.cpp:
179         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
180         * WebProcess/WebPage/WebPage.cpp:
181         (WebKit::m_textAutoSizingAdjustmentTimer):
182         * WebProcess/WebPage/WebPage.h:
183         (WebKit::WebPage::sessionStorageNamespaceIdentifier const):
184         * WebProcess/WebPage/WebPageGroupProxy.h:
185         (WebKit::WebPageGroupProxy::localStorageNamespaceIdentifier const):
186         * WebProcess/WebStorage/StorageAreaMap.cpp:
187         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
188         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
189         * WebProcess/WebStorage/StorageNamespaceIdentifier.h: Copied from Source/WebKit/WebProcess/WebStorage/WebStorageNamespaceProvider.h.
190         * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
191         (WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
192         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
193         (WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
194         (WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
195         (WebKit::StorageNamespaceImpl::copy):
196         (WebKit::StorageNamespaceImpl::sessionStoragePageID const):
197         (WebKit::StorageNamespaceImpl::pageGroupID const):
198         * WebProcess/WebStorage/StorageNamespaceImpl.h:
199         (WebKit::StorageNamespaceImpl::storageNamespaceID const):
200         * WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:
201         (WebKit::WebStorageNamespaceProvider::getOrCreate):
202         (WebKit::WebStorageNamespaceProvider::WebStorageNamespaceProvider):
203         (WebKit::WebStorageNamespaceProvider::~WebStorageNamespaceProvider):
204         (WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
205         (WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
206         (WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
207         * WebProcess/WebStorage/WebStorageNamespaceProvider.h:
208
209 2019-08-20  Dean Jackson  <dino@apple.com>
210
211         REGRESSION: Open in New Tab is missing from context menu
212         https://bugs.webkit.org/show_bug.cgi?id=200909
213         <rdar://problem/54476169>
214
215         Reviewed by Simon Fraser.
216
217         Don't assume the new API if webView:contextMenuWillPresentForElement:
218         is implemented.
219
220         * UIProcess/ios/WKContentViewInteraction.mm:
221         (needsDeprecatedPreviewAPI):
222
223 2019-08-20  Joseph Pecoraro  <pecoraro@apple.com>
224
225         Web Inspector: Support for JavaScript BigInt
226         https://bugs.webkit.org/show_bug.cgi?id=180731
227         <rdar://problem/36298748>
228
229         Reviewed by Devin Rousso.
230
231         * WebProcess/WebPage/WebInspectorUI.cpp:
232         (WebKit::WebInspectorUI::WebInspectorUI):
233         Enable BigInt in the Web Inspector process. It only makes use of
234         `globalThis.BigInt(...)` to hold the value.
235
236 2019-08-19  Fujii Hironori  <Hironori.Fujii@sony.com>
237
238         [CMake] WebKit2.dll can't link because of missing PAL's import symbols for WinCairo port
239         https://bugs.webkit.org/show_bug.cgi?id=200910
240
241         Unreviewed build fix for Windows port.
242
243         * CMakeLists.txt: Added -DSTATICALLY_LINKED_WITH_PAL=1 if PAL_LIBRARY_TYPE is STATIC.
244
245 2019-08-19  Fujii Hironori  <Hironori.Fujii@sony.com>
246
247         Unreviewed build fix for WinCairo port.
248
249         The base class of NetworkDataTask has been changed in r248874.
250
251         * NetworkProcess/curl/NetworkDataTaskCurl.h:
252         (ref):
253         (deref):
254         Call 'ref' and 'deref' of NetworkDataTask instead of RefCounted<NetworkDataTask>.
255
256 2019-08-19  Keith Rollin  <krollin@apple.com>
257
258         Unreviewed build fix for security entitlements.
259
260         Bug 200242 (r248164) changed the way that entitlements were generated
261         and applied during the build. In that refactoring, the codesign
262         parameter "-o library" was dropped. This change adds it back.
263
264         * Configurations/BaseXPCService.xcconfig:
265
266 2019-08-19  Chris Dumez  <cdumez@apple.com>
267
268         NetworkDataTask is being ref'd / deref'd from several threads and is not ThreadSafeRefCounted
269         https://bugs.webkit.org/show_bug.cgi?id=200897
270
271         Reviewed by Geoffrey Garen.
272
273         NetworkDataTask subclasses RefCounted and is ref'd / deref'd on the main thread. However, there
274         is code in NetworkDataTaskCocoa::resume() that was ref'ing / deref'ing it on a background thread,
275         which is unsafe. To address the issue, Have NetworkDataTask subclass ThreadSafeRefCounted, and
276         make sure it always gets destroyed on the main thread.
277
278         * NetworkProcess/NetworkDataTask.h:
279
280         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
281         (WebKit::NetworkDataTaskCocoa::resume):
282         Avoid some unnecessary refcounting churn.
283
284 2019-08-19  Alex Christensen  <achristensen@webkit.org>
285
286         Move call to initializeMainThread introduced in r248549 to after WebKit.framework has been loaded
287         https://bugs.webkit.org/show_bug.cgi?id=200896
288         <rdar://problem/54479065>
289
290         Reviewed by Chris Dumez.
291
292         In XPCServiceMain we haven't been told which WebKit.framework to load yet, so when using staged frameworks it
293         causes problems if we call a function from a WebKit framework.  We need to wait until after initializerFunctionPtr is called.
294
295         * NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm:
296         (NetworkServiceInitializer):
297         * PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm:
298         (PluginServiceInitializer):
299         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
300         (WebKit::XPCServiceMain):
301         * WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm:
302         (WebContentServiceInitializer):
303
304 2019-08-19  Yusuke Suzuki  <ysuzuki@apple.com>
305
306         Unreviewed, build fix for PLATFORM_DRIVEN_TEXT_CHECKING
307         https://bugs.webkit.org/show_bug.cgi?id=200620
308
309         It is enabled if PLATFORM(MACCATALYST) is true.
310
311         * UIProcess/Cocoa/TextCheckingController.h:
312
313 2019-08-19  Sihui Liu  <sihui_liu@apple.com>
314
315         Remove IDB-specific quota
316         https://bugs.webkit.org/show_bug.cgi?id=196545
317         <rdar://problem/54201783>
318
319         Reviewed by Youenn Fablet.
320
321         * NetworkProcess/NetworkProcess.cpp:
322         (WebKit::NetworkProcess::createIDBServer):
323         (WebKit::NetworkProcess::addIndexedDatabaseSession):
324         (WebKit::NetworkProcess::setIDBPerOriginQuota): Deleted.
325         * NetworkProcess/NetworkProcess.h:
326         * NetworkProcess/NetworkProcess.messages.in:
327         * UIProcess/API/C/WKContext.cpp:
328         (WKContextSetIDBPerOriginQuota): Deleted.
329         * UIProcess/API/C/WKContextPrivate.h:
330         * UIProcess/WebProcessPool.cpp:
331         (WebKit::WebProcessPool::setIDBPerOriginQuota): Deleted.
332         * UIProcess/WebProcessPool.h:
333
334 2019-08-19  Youenn Fablet  <youenn@apple.com>
335
336         Remove SessionID::emptySessionID()
337         https://bugs.webkit.org/show_bug.cgi?id=200811
338
339         Reviewed by Alex Christensen.
340
341         Update SessionID call sites to use toUInt64.
342         Remove debug asserts to isValid since construction of invalid session IDs can only happen in very specific cases
343         typically for HashMaps.
344
345         * NetworkProcess/Downloads/DownloadManager.h:
346         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
347         (WebKit::storageSession):
348         (WebKit::NetworkConnectionToWebProcess::logUserInteraction):
349         * NetworkProcess/NetworkProcess.cpp:
350         (WebKit::NetworkProcess::networkSession const):
351         (WebKit::NetworkProcess::networkSessionByConnection const):
352         (WebKit::NetworkProcess::setSession):
353         (WebKit::NetworkProcess::destroySession):
354         (WebKit::NetworkProcess::fetchWebsiteData):
355         (WebKit::NetworkProcess::deleteWebsiteData):
356         (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
357         (WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
358         (WebKit::NetworkProcess::existingSWOriginStoreForSession const):
359         (WebKit::NetworkProcess::webProcessWasDisconnected):
360         * NetworkProcess/NetworkProcess.h:
361         * NetworkProcess/NetworkResourceLoader.cpp:
362         (WebKit::NetworkResourceLoader::startNetworkLoad):
363         * NetworkProcess/mac/RemoteNetworkingContext.mm:
364         (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
365         * UIProcess/Network/NetworkProcessProxy.cpp:
366         (WebKit::NetworkProcessProxy::retrieveCacheStorageParameters):
367         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
368         (WebKit::WebsiteDataStore::~WebsiteDataStore):
369         (WebKit::WebsiteDataStore::maybeRegisterWithSessionIDMap):
370         (WebKit::WebsiteDataStore::existingNonDefaultDataStoreForSessionID):
371         * WebProcess/Cache/WebCacheStorageProvider.cpp:
372         (WebKit::WebCacheStorageProvider::createCacheStorageConnection):
373         * WebProcess/Cache/WebCacheStorageProvider.h:
374         * WebProcess/Storage/WebSWClientConnection.cpp:
375         (WebKit::WebSWClientConnection::WebSWClientConnection):
376         (WebKit::WebSWClientConnection::initializeConnectionIfNeeded):
377         * WebProcess/Storage/WebServiceWorkerProvider.cpp:
378         (WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession):
379         * WebProcess/WebPage/WebPage.cpp:
380         (WebKit::m_textAutoSizingAdjustmentTimer):
381
382 2019-08-19  Yusuke Suzuki  <ysuzuki@apple.com>
383
384         Unreviewed, speculative build fix for GTK and WinCairo
385         https://bugs.webkit.org/show_bug.cgi?id=200620
386
387         * UIProcess/socket/RemoteInspectorProtocolHandler.cpp:
388
389 2019-08-19  Yusuke Suzuki  <ysuzuki@apple.com>
390
391         Unreviewed, build fix in WinCairo and GTK ports
392         https://bugs.webkit.org/show_bug.cgi?id=200767
393
394         * UIProcess/WebPageProxy.cpp:
395         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
396
397 2019-08-19  Youenn Fablet  <youenn@apple.com>
398
399         enumerateDevices should return the same JS objects if called twice
400         https://bugs.webkit.org/show_bug.cgi?id=200767
401
402         Reviewed by Eric Carlson.
403
404         Update code as enumerate device request is now gone.
405         Make use of async IPC to simplify code since we are now passing a completion handler directly.
406
407         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
408         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
409         (WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):
410         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
411         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
412         * UIProcess/WebPageProxy.cpp:
413         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
414         * UIProcess/WebPageProxy.h:
415         * UIProcess/WebPageProxy.messages.in:
416         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
417         (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
418         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
419         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
420         (WebKit::WebUserMediaClient::enumerateMediaDevices):
421         * WebProcess/WebCoreSupport/WebUserMediaClient.h:
422         * WebProcess/WebPage/WebPage.cpp:
423         * WebProcess/WebPage/WebPage.h:
424         * WebProcess/WebPage/WebPage.messages.in:
425
426 2019-08-18  Yusuke Suzuki  <ysuzuki@apple.com>
427
428         [WTF] Add makeUnique<T>, which ensures T is fast-allocated, makeUnique / makeUniqueWithoutFastMallocCheck part
429         https://bugs.webkit.org/show_bug.cgi?id=200620
430
431         Reviewed by Geoffrey Garen.
432
433         * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp:
434         (WebKit::ResourceLoadStatisticsPersistentStorage::startMonitoringDisk):
435         (WebKit::ResourceLoadStatisticsPersistentStorage::monitorDirectoryForNewStatistics):
436         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
437         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
438         * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
439         * NetworkProcess/Downloads/DownloadManager.cpp:
440         (WebKit::DownloadManager::startDownload):
441         (WebKit::DownloadManager::convertNetworkLoadToDownload):
442         (WebKit::DownloadManager::resumeDownload):
443         * NetworkProcess/Downloads/DownloadMap.cpp:
444         (WebKit::DownloadMap::add):
445         * NetworkProcess/Downloads/PendingDownload.cpp:
446         (WebKit::PendingDownload::PendingDownload):
447         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
448         (WebKit::NetworkConnectionToWebProcess::establishSWServerConnection):
449         * NetworkProcess/NetworkContentRuleListManager.cpp:
450         (WebKit::NetworkContentRuleListManager::addContentRuleLists):
451         * NetworkProcess/NetworkDataTaskBlob.cpp:
452         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
453         (WebKit::NetworkDataTaskBlob::download):
454         * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
455         (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
456         * NetworkProcess/NetworkLoad.cpp:
457         (WebKit::NetworkLoad::didReceiveResponse):
458         * NetworkProcess/NetworkLoadChecker.cpp:
459         (WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):
460         (WebKit::NetworkLoadChecker::contentSecurityPolicy):
461         * NetworkProcess/NetworkProcess.cpp:
462         (WebKit::NetworkProcess::switchToNewTestingSession):
463         (WebKit::NetworkProcess::ensureSession):
464         (WebKit::NetworkProcess::swServerForSession):
465         (WebKit::NetworkProcess::initializeQuotaUsers):
466         (WebKit::NetworkProcess::storageQuotaManager):
467         * NetworkProcess/NetworkProcess.h:
468         (WebKit::NetworkProcess::addSupplement):
469         * NetworkProcess/NetworkResourceLoader.cpp:
470         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
471         (WebKit::NetworkResourceLoader::startNetworkLoad):
472         * NetworkProcess/NetworkSocketChannel.cpp:
473         (WebKit::NetworkSocketChannel::create):
474         * NetworkProcess/PreconnectTask.cpp:
475         * NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
476         (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
477         * NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
478         (WebKit::LocalStorageNamespace::getOrCreateStorageArea):
479         * NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
480         (WebKit::SessionStorageNamespace::getOrCreateStorageArea):
481         * NetworkProcess/WebStorage/StorageArea.cpp:
482         (WebKit::StorageArea::clone const):
483         * NetworkProcess/WebStorage/StorageManager.cpp:
484         (WebKit::StorageManager::createSessionStorageNamespace):
485         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
486         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
487         (WebKit::StorageManager::getOrCreateSessionStorageNamespace):
488         * NetworkProcess/WebStorage/StorageManagerSet.cpp:
489         (WebKit::StorageManagerSet::add):
490         * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp:
491         (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea):
492         * NetworkProcess/cache/NetworkCache.cpp:
493         (WebKit::NetworkCache::Cache::Cache):
494         (WebKit::NetworkCache::Cache::makeEntry):
495         (WebKit::NetworkCache::Cache::makeRedirectEntry):
496         (WebKit::NetworkCache::Cache::update):
497         * NetworkProcess/cache/NetworkCacheEntry.cpp:
498         (WebKit::NetworkCache::Entry::decodeStorageRecord):
499         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
500         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
501         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
502         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresourceLoad):
503         (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
504         (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
505         (WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests):
506         (WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource):
507         (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
508         * NetworkProcess/cache/NetworkCacheStorage.cpp:
509         (WebKit::NetworkCache::Storage::synchronize):
510         (WebKit::NetworkCache::Storage::readRecord):
511         (WebKit::NetworkCache::retrieveFromMemory):
512         (WebKit::NetworkCache::Storage::retrieve):
513         (WebKit::NetworkCache::Storage::store):
514         (WebKit::NetworkCache::Storage::traverse):
515         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
516         (WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord):
517         * NetworkProcess/cache/PrefetchCache.cpp:
518         (WebKit::PrefetchCache::store):
519         (WebKit::PrefetchCache::storeRedirect):
520         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
521         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
522         (WebKit::NetworkProcess::networkHTTPSUpgradeChecker):
523         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
524         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
525         (WebKit::NetworkSessionCocoa::create):
526         (WebKit::NetworkSessionCocoa::createWebSocketTask):
527         * NetworkProcess/curl/NetworkProcessCurl.cpp:
528         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
529         * NetworkProcess/curl/NetworkSessionCurl.h:
530         * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm:
531         (WebKit::NetworkConnectionToWebProcess::paymentCoordinator):
532         (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorAuthorizationPresenter):
533         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
534         (WebKit::NetworkDataTaskSoup::download):
535         * NetworkProcess/soup/NetworkProcessSoup.cpp:
536         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
537         * NetworkProcess/soup/NetworkSessionSoup.cpp:
538         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
539         (WebKit::NetworkSessionSoup::createWebSocketTask):
540         * NetworkProcess/soup/NetworkSessionSoup.h:
541         * NetworkProcess/soup/WebKitSoupRequestInputStream.cpp:
542         (webkitSoupRequestInputStreamReadAsync):
543         * NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
544         (WebKit::NetworkMDNSRegister::registerMDNSName):
545         * NetworkProcess/webrtc/NetworkRTCMonitor.cpp:
546         (WebKit::NetworkRTCMonitor::startUpdating):
547         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
548         (WebKit::NetworkRTCProvider::NetworkRTCProvider):
549         (WebKit::NetworkRTCProvider::createSocket):
550         (WebKit::NetworkRTCProvider::wrapNewTCPConnection):
551         * Platform/IPC/Connection.cpp:
552         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
553         (IPC::Connection::createSyncMessageEncoder):
554         (IPC::Connection::enableIncomingMessagesThrottling):
555         (IPC::Connection::dispatchSyncMessage):
556         * Platform/IPC/Connection.h:
557         (IPC::Connection::send):
558         (IPC::Connection::sendWithAsyncReply):
559         * Platform/IPC/Decoder.cpp:
560         (IPC::Decoder::unwrapForTesting):
561         * Platform/IPC/HandleMessage.h:
562         (IPC::handleMessageAsync):
563         * Platform/IPC/MessageSender.h:
564         * Platform/IPC/cocoa/ConnectionCocoa.mm:
565         (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
566         (IPC::Connection::open):
567         (IPC::createMessageDecoder):
568         (IPC::Connection::receiveSourceEventHandler):
569         * Platform/IPC/unix/ConnectionUnix.cpp:
570         (IPC::Connection::processMessage):
571         (IPC::Connection::sendOutputMessage):
572         * Platform/IPC/win/ConnectionWin.cpp:
573         (IPC::Connection::readEventHandler):
574         * Platform/mac/LayerHostingContext.mm:
575         (WebKit::LayerHostingContext::createForPort):
576         (WebKit::LayerHostingContext::createForExternalHostingProcess):
577         (WebKit::LayerHostingContext::createForExternalPluginHostingProcess):
578         * PluginProcess/WebProcessConnection.cpp:
579         (WebKit::WebProcessConnection::createPluginInternal):
580         * Shared/API/APIURL.h:
581         (API::URL::create):
582         (API::URL::parseURLIfNecessary const):
583         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
584         (WebKit::RemoteObjectInvocation::decode):
585         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
586         (-[_WKRemoteObjectRegistry _initWithWebPage:]):
587         (-[_WKRemoteObjectRegistry _initWithWebPageProxy:]):
588         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
589         * Shared/API/glib/WebKitContextMenuItem.cpp:
590         (webkitContextMenuItemCreate):
591         (webkit_context_menu_item_new):
592         (webkit_context_menu_item_new_from_gaction):
593         (webkit_context_menu_item_new_from_stock_action):
594         (webkit_context_menu_item_new_from_stock_action_with_label):
595         (webkit_context_menu_item_new_with_submenu):
596         (webkit_context_menu_item_new_separator):
597         * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
598         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
599         * Shared/Cocoa/SandboxExtensionCocoa.mm:
600         (WebKit::SandboxExtension::Handle::decode):
601         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
602         (WebKit::texmapLayer):
603         (WebKit::CoordinatedGraphicsScene::ensureRootLayer):
604         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
605         (WebKit::ThreadedCompositor::ThreadedCompositor):
606         * Shared/Plugins/NPRemoteObjectMap.cpp:
607         (WebKit::NPRemoteObjectMap::registerNPObject):
608         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
609         (WebKit::NetscapePluginModule::tryLoad):
610         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
611         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
612         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
613         (WebKit::RemoteLayerTreeTransaction::decode):
614         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
615         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
616         * Shared/cairo/ShareableBitmapCairo.cpp:
617         (WebKit::ShareableBitmap::createGraphicsContext):
618         * Shared/cg/ShareableBitmapCG.cpp:
619         (WebKit::ShareableBitmap::createGraphicsContext):
620         * Shared/win/ShareableBitmapDirect2D.cpp:
621         (WebKit::ShareableBitmap::createGraphicsContext):
622         * UIProcess/API/APIHTTPCookieStore.cpp:
623         (API::HTTPCookieStore::registerObserver):
624         * UIProcess/API/C/WKContext.cpp:
625         (WKContextSetInjectedBundleClient):
626         (WKContextSetHistoryClient):
627         (WKContextSetDownloadClient):
628         * UIProcess/API/C/WKGeolocationManager.cpp:
629         (WKGeolocationManagerSetProvider):
630         * UIProcess/API/C/WKNotificationManager.cpp:
631         (WKNotificationManagerSetProvider):
632         * UIProcess/API/C/WKPage.cpp:
633         (WKPageSetPageContextMenuClient):
634         (WKPageSetPageDiagnosticLoggingClient):
635         (WKPageSetPageFindClient):
636         (WKPageSetPageFindMatchesClient):
637         (WKPageSetPageFormClient):
638         (WKPageSetPageLoaderClient):
639         (WKPageSetPagePolicyClient):
640         (WKPageSetPageUIClient):
641         (WKPageSetPageStateClient):
642         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
643         (-[WKObservablePageState initWithPage:]):
644         * UIProcess/API/C/wpe/WKView.cpp:
645         (WKViewSetViewClient):
646         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
647         (-[WKBrowsingContextController _initWithPageRef:]):
648         * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
649         (-[WKHTTPCookieStore addObserver:]):
650         * UIProcess/API/Cocoa/WKProcessPool.mm:
651         (-[WKProcessPool _setDownloadDelegate:]):
652         (-[WKProcessPool _setAutomationDelegate:]):
653         * UIProcess/API/Cocoa/WKUserContentController.mm:
654         (-[WKUserContentController addScriptMessageHandler:name:]):
655         (-[WKUserContentController _addScriptMessageHandler:name:userContentWorld:]):
656         * UIProcess/API/Cocoa/WKWebView.mm:
657         (-[WKWebView _initializeWithConfiguration:]):
658         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
659         (-[WKWebView _setInputDelegate:]):
660         * UIProcess/API/Cocoa/_WKAutomationSession.mm:
661         (-[_WKAutomationSession setDelegate:]):
662         * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:
663         (-[_WKRemoteWebInspectorViewController init]):
664         * UIProcess/API/glib/IconDatabase.cpp:
665         (WebKit::readySQLiteStatement):
666         * UIProcess/API/glib/WebKitAutomationSession.cpp:
667         (webkitAutomationSessionConstructed):
668         * UIProcess/API/glib/WebKitContextMenuClient.cpp:
669         (attachContextMenuClientToView):
670         * UIProcess/API/glib/WebKitCustomProtocolManagerClient.cpp:
671         (attachCustomProtocolManagerClientToContext):
672         * UIProcess/API/glib/WebKitDownloadClient.cpp:
673         (attachDownloadClientToContext):
674         * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
675         (webkitFaviconDatabaseOpen):
676         * UIProcess/API/glib/WebKitFindController.cpp:
677         (webkitFindControllerConstructed):
678         * UIProcess/API/glib/WebKitFormClient.cpp:
679         (attachFormClientToView):
680         * UIProcess/API/glib/WebKitGeolocationManager.cpp:
681         (webkitGeolocationManagerCreate):
682         * UIProcess/API/glib/WebKitIconLoadingClient.cpp:
683         (attachIconLoadingClientToView):
684         * UIProcess/API/glib/WebKitInjectedBundleClient.cpp:
685         (attachInjectedBundleClientToContext):
686         * UIProcess/API/glib/WebKitNotificationProvider.cpp:
687         (WebKitNotificationProvider::WebKitNotificationProvider):
688         * UIProcess/API/glib/WebKitUIClient.cpp:
689         (attachUIClientToView):
690         * UIProcess/API/glib/WebKitUserContentManager.cpp:
691         (webkit_user_content_manager_register_script_message_handler):
692         (webkit_user_content_manager_register_script_message_handler_in_world):
693         * UIProcess/API/glib/WebKitWebContext.cpp:
694         (webkitWebContextConstructed):
695         (webkit_web_context_set_automation_allowed):
696         * UIProcess/API/glib/WebKitWebView.cpp:
697         (webkitWebViewConstructed):
698         * UIProcess/API/gtk/PageClientImpl.cpp:
699         (WebKit::PageClientImpl::createDrawingAreaProxy):
700         * UIProcess/API/gtk/WebKitEmojiChooser.cpp:
701         (webkitEmojiChooserSetupEmojiSections):
702         * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
703         (WebKit::RemoteInspectorProtocolHandler::handleRequest):
704         * UIProcess/API/gtk/WebKitWebInspector.cpp:
705         (webkitWebInspectorCreate):
706         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
707         (webkitWebViewBaseConstructed):
708         (webkitWebViewBaseGestureController):
709         (webkitWebViewBaseDragAndDropHandler):
710         (webkitWebViewBaseDidRelaunchWebProcess):
711         * UIProcess/API/mac/WKView.mm:
712         (-[WKView maybeInstallIconLoadingClient]):
713         (-[WKView initWithFrame:processPool:configuration:]):
714         * UIProcess/API/wpe/PageClientImpl.cpp:
715         (WebKit::PageClientImpl::PageClientImpl):
716         (WebKit::PageClientImpl::createDrawingAreaProxy):
717         * UIProcess/API/wpe/WPEView.cpp:
718         (WKWPE::View::View):
719         (WKWPE::View::setClient):
720         * UIProcess/API/wpe/qt/WPEQtView.cpp:
721         (WPEQtView::notifyLoadChangedCallback):
722         (WPEQtView::notifyLoadFailedCallback):
723         (WPEQtView::runJavaScript):
724         * UIProcess/API/wpe/qt/WPEQtViewBackend.cpp:
725         (WPEQtViewBackend::create):
726         * UIProcess/Automation/WebAutomationSession.cpp:
727         (WebKit::WebAutomationSession::WebAutomationSession):
728         * UIProcess/AuxiliaryProcessProxy.h:
729         (WebKit::AuxiliaryProcessProxy::send):
730         * UIProcess/Cocoa/IconLoadingDelegate.mm:
731         (WebKit::IconLoadingDelegate::createIconLoadingClient):
732         * UIProcess/Cocoa/UIDelegate.mm:
733         (WebKit::UIDelegate::createContextMenuClient):
734         (WebKit::UIDelegate::createUIClient):
735         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
736         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
737         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
738         (WebKit::WebProcessPool::platformInitialize):
739         (WebKit::WebProcessPool::startDisplayLink):
740         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
741         (WebKit::WebProcessProxy::processWasUnexpectedlyUnsuspended):
742         * UIProcess/Cocoa/WebViewImpl.mm:
743         (WebKit::WebViewImpl::WebViewImpl):
744         (WebKit::WebViewImpl::createDrawingAreaProxy):
745         (WebKit::WebViewImpl::setTextIndicator):
746         (WebKit::WebViewImpl::ensureGestureController):
747         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
748         (WebKit::DrawingAreaProxyCoordinatedGraphics::incorporateUpdate):
749         (WebKit::DrawingAreaProxyCoordinatedGraphics::dispatchAfterEnsuringDrawing):
750         * UIProcess/DeviceIdHashSaltStorage.cpp:
751         (WebKit::DeviceIdHashSaltStorage::getDataFromDecoder const):
752         (WebKit::DeviceIdHashSaltStorage::completeDeviceIdHashSaltForOriginCall):
753         * UIProcess/Downloads/DownloadProxyMap.cpp:
754         (WebKit::DownloadProxyMap::createDownloadProxy):
755         * UIProcess/Gamepad/UIGamepadProvider.cpp:
756         (WebKit::UIGamepadProvider::setInitialConnectedGamepads):
757         (WebKit::UIGamepadProvider::platformGamepadConnected):
758         * UIProcess/Network/NetworkProcessProxy.cpp:
759         (WebKit::NetworkProcessProxy::createDownloadProxy):
760         (WebKit::NetworkProcessProxy::takeUploadAssertion):
761         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
762         (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
763         (WebKit::WebNotificationManagerProxy::setProvider):
764         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
765         (WebKit::pluginRequiresGtk2):
766         * UIProcess/ProcessThrottler.cpp:
767         (WebKit::ProcessThrottler::didConnectToProcess):
768         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
769         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
770         (WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator):
771         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
772         (WebKit::RemoteLayerTreeHost::makeNode):
773         * UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
774         (WebKit::RemoteLayerTreeNode::createWithPlainLayer):
775         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
776         (WebKit::RemoteLayerTreeHost::makeNode):
777         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
778         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
779         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
780         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
781         * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp:
782         (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::ScrollingTreeFrameScrollingNodeRemoteMac):
783         * UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp:
784         (WebKit::ScrollingTreeOverflowScrollingNodeRemoteMac::ScrollingTreeOverflowScrollingNodeRemoteMac):
785         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
786         (WebKit::HidService::deviceAdded):
787         * UIProcess/WebGeolocationManagerProxy.cpp:
788         (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
789         (WebKit::WebGeolocationManagerProxy::setProvider):
790         * UIProcess/WebMediaSessionFocusManager.cpp:
791         (WebKit::WebMediaSessionFocusManager::setFocusedMediaElement):
792         * UIProcess/WebPageInspectorController.cpp:
793         (WebKit::WebPageInspectorController::WebPageInspectorController):
794         * UIProcess/WebPageProxy.cpp:
795         (WebKit::WebPageProxy::WebPageProxy):
796         (WebKit::m_resetRecentCrashCountTimer):
797         (WebKit::WebPageProxy::setFormClient):
798         (WebKit::WebPageProxy::setUIClient):
799         (WebKit::WebPageProxy::setIconLoadingClient):
800         (WebKit::WebPageProxy::setFindClient):
801         (WebKit::WebPageProxy::setFindMatchesClient):
802         (WebKit::WebPageProxy::setContextMenuClient):
803         (WebKit::WebPageProxy::setInjectedBundleClient):
804         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
805         (WebKit::WebPageProxy::didAttachToRunningProcess):
806         (WebKit::WebPageProxy::setDrawingArea):
807         (WebKit::WebPageProxy::close):
808         (WebKit::WebPageProxy::loadData):
809         (WebKit::WebPageProxy::handleWheelEvent):
810         (WebKit::WebPageProxy::processNextQueuedWheelEvent):
811         (WebKit::WebPageProxy::continueNavigationInNewProcess):
812         (WebKit::WebPageProxy::setFullscreenClient):
813         (WebKit::WebPageProxy::userMediaPermissionRequestManager):
814         (WebKit::WebPageProxy::setScrollPerformanceDataCollectionEnabled):
815         (WebKit::WebPageProxy::speechSynthesisData):
816         * UIProcess/WebProcessCache.cpp:
817         (WebKit::WebProcessCache::addProcessIfPossible):
818         * UIProcess/WebProcessPool.cpp:
819         (WebKit::WebProcessPool::WebProcessPool):
820         (WebKit::WebProcessPool::setInjectedBundleClient):
821         (WebKit::WebProcessPool::setHistoryClient):
822         (WebKit::WebProcessPool::setDownloadClient):
823         (WebKit::WebProcessPool::setAutomationClient):
824         (WebKit::WebProcessPool::setLegacyCustomProtocolManagerClient):
825         (WebKit::WebProcessPool::ensureNetworkProcess):
826         (WebKit::WebProcessPool::didCollectPrewarmInformation):
827         (WebKit::WebProcessPool::setWebProcessHasUploads):
828         (WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia):
829         * UIProcess/WebProcessProxy.cpp:
830         * UIProcess/cairo/BackingStoreCairo.cpp:
831         (WebKit::BackingStore::createBackend):
832         * UIProcess/glib/RemoteInspectorClient.cpp:
833         (WebKit::RemoteInspectorClient::inspect):
834         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
835         (WebKit::AcceleratedBackingStoreWayland::checkRequirements):
836         * UIProcess/gtk/DragAndDropHandler.cpp:
837         (WebKit::DragAndDropHandler::dragDataSelection):
838         * UIProcess/gtk/WaylandCompositor.cpp:
839         (WebKit::WaylandCompositor::initializeEGL):
840         * UIProcess/ios/EditableImageController.mm:
841         (WebKit::EditableImageController::ensureEditableImage):
842         * UIProcess/ios/WKApplicationStateTrackingView.mm:
843         (-[WKApplicationStateTrackingView didMoveToWindow]):
844         * UIProcess/ios/WKContentView.mm:
845         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
846         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
847         (-[WKContentView _createDrawingAreaProxy:]):
848         * UIProcess/ios/WKContentViewInteraction.mm:
849         (-[WKContentView setupInteraction]):
850         (-[WKContentView becomeFirstResponderForWebView]):
851         (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
852         * UIProcess/ios/WebPageProxyIOS.mm:
853         (WebKit::WebPageProxy::elementDidFocus):
854         (WebKit::WebPageProxy::paymentCoordinatorAuthorizationPresenter):
855         * UIProcess/mac/PageClientImplMac.mm:
856         (WebKit::PageClientImpl::PageClientImpl):
857         * UIProcess/mac/WKFullScreenWindowController.mm:
858         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
859         * UIProcess/mac/WKTextFinderClient.mm:
860         (-[WKTextFinderClient initWithPage:view:usePlatformFindUI:]):
861         * UIProcess/socket/RemoteInspectorClient.cpp:
862         (WebKit::RemoteInspectorClient::inspect):
863         * UIProcess/socket/RemoteInspectorProtocolHandler.cpp:
864         (WebKit::RemoteInspectorProtocolHandler::platformStartTask):
865         * UIProcess/win/BackingStoreDirect2D.cpp:
866         (WebKit::BackingStore::createBackend):
867         * UIProcess/win/PageClientImpl.cpp:
868         (WebKit::PageClientImpl::createDrawingAreaProxy):
869         * UIProcess/win/WebView.cpp:
870         (WebKit::WebView::WebView):
871         * WebProcess/Gamepad/WebGamepadProvider.cpp:
872         (WebKit::WebGamepadProvider::setInitialGamepads):
873         (WebKit::WebGamepadProvider::gamepadConnected):
874         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
875         (WKBundleSetClient):
876         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
877         (WKBundlePageSetContextMenuClient):
878         (WKBundlePageSetEditorClient):
879         (WKBundlePageSetFormClient):
880         (WKBundlePageSetPageLoaderClient):
881         (WKBundlePageSetResourceLoadClient):
882         (WKBundlePageSetUIClient):
883         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
884         (WKBundlePageOverlayCreate):
885         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
886         (WKBundlePageBannerCreateBannerWithCALayer):
887         * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp:
888         (WebKit::getOrCreateDOMObjectCacheFrameObserver):
889         (WebKit::DOMObjectCache::put):
890         * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp:
891         (WebKit::WebKitExtensionManager::initialize):
892         * WebProcess/InjectedBundle/API/glib/WebKitWebEditor.cpp:
893         (webkitWebEditorCreate):
894         * WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp:
895         (webkitWebExtensionCreate):
896         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
897         (webkitFrameGetOrCreate):
898         (webkitWebPageCreate):
899         * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
900         (-[WKDOMTextIterator initWithRange:]):
901         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
902         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
903         (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):
904         * WebProcess/InjectedBundle/InjectedBundle.cpp:
905         (WebKit::InjectedBundle::InjectedBundle):
906         (WebKit::InjectedBundle::setClient):
907         * WebProcess/Network/WebSocketChannel.cpp:
908         (WebKit::PendingMessage::PendingMessage):
909         (WebKit::WebSocketChannel::send):
910         * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
911         (WebKit::LibWebRTCProvider::createPeerConnection):
912         (WebKit::LibWebRTCProvider::createSocketFactory):
913         * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
914         (WebKit::LibWebRTCSocketFactory::createServerTcpSocket):
915         (WebKit::LibWebRTCSocketFactory::createUdpSocket):
916         (WebKit::LibWebRTCSocketFactory::createClientTcpSocket):
917         (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket):
918         (WebKit::LibWebRTCSocketFactory::createAsyncResolver):
919         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
920         (WebKit::PluginDestructionProtector::PluginDestructionProtector):
921         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
922         (WebKit::NetscapePlugin::scheduleTimer):
923         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
924         (WebKit::NetscapePluginStream::deliverData):
925         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
926         (WebKit::NetscapePluginX11::create):
927         * WebProcess/Plugins/PluginProxy.cpp:
928         (WebKit::PluginProxy::initialize):
929         * WebProcess/Plugins/PluginView.cpp:
930         (WebKit::PluginView::createWebEvent const):
931         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
932         (WebKit::WebSWContextManagerConnection::installServiceWorker):
933         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
934         (WebKit::WebChromeClient::createColorChooser):
935         (WebKit::WebChromeClient::createDataListSuggestionPicker):
936         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
937         (WebKit::WebInspectorClient::showPaintRect):
938         * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:
939         (WebKit::WebPasteboardOverrides::addOverride):
940         * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
941         (WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode):
942         * WebProcess/WebPage/DrawingArea.cpp:
943         (WebKit::DrawingArea::create):
944         * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
945         (WebKit::PlatformCALayerRemote::ensureBackingStore):
946         (WebKit::PlatformCALayerRemote::setTransform):
947         (WebKit::PlatformCALayerRemote::setSublayerTransform):
948         (WebKit::PlatformCALayerRemote::setFilters):
949         (WebKit::PlatformCALayerRemote::setShapeRoundedRect):
950         * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp:
951         (WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
952         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
953         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
954         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
955         * WebProcess/WebPage/WebFrame.cpp:
956         (WebKit::WebFrame::createSubframe):
957         * WebProcess/WebPage/WebPage.cpp:
958         (WebKit::m_textAutoSizingAdjustmentTimer):
959         (WebKit::WebPage::setInjectedBundleContextMenuClient):
960         (WebKit::WebPage::setInjectedBundleEditorClient):
961         (WebKit::WebPage::setInjectedBundleFormClient):
962         (WebKit::WebPage::setInjectedBundlePageLoaderClient):
963         (WebKit::WebPage::setInjectedBundleResourceLoadClient):
964         (WebKit::WebPage::setInjectedBundleUIClient):
965         (WebKit::WebPage::close):
966         (WebKit::WebPage::beginPrinting):
967         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
968         (WebKit::WebPrintOperationGtk::print):
969         * WebProcess/WebPage/ios/FindControllerIOS.mm:
970         (WebKit::FindController::updateFindIndicator):
971         * WebProcess/WebPage/mac/DrawingAreaMac.cpp:
972         (WebKit::DisplayRefreshMonitorMac::requestRefreshCallback):
973         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
974         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
975         * WebProcess/WebProcess.cpp:
976         (WebKit::WebProcess::markAllLayersVolatile):
977         (WebKit::WebProcess::ensureAutomationSessionProxy):
978         (WebKit::WebProcess::libWebRTCNetwork):
979         (WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess):
980         * WebProcess/WebProcess.h:
981         (WebKit::WebProcess::addSupplement):
982         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
983         (WebKit::UserMediaCaptureManager::Source::Source):
984         * WebProcess/cocoa/WebProcessCocoa.mm:
985         (WebKit::WebProcess::processTaskStateDidChange):
986         (WebKit::WebProcess::updateCPUMonitorState):
987
988 2019-08-18  Per Arne Vollan  <pvollan@apple.com>
989
990         [Mac] Use the PID of the WebContent process when issuing local file read sandbox extensions
991         https://bugs.webkit.org/show_bug.cgi?id=200543
992         <rdar://problem/49394015>
993         
994         Reviewed by Brent Fulgham.
995
996         Adopt SPI to issue a process-specific sandbox extension for local file read, passing it the process
997         identifier of the WebContent process.
998         
999         * Shared/Cocoa/SandboxExtensionCocoa.mm:
1000         (WebKit::SandboxExtensionImpl::sandboxExtensionForType):
1001         (WebKit::SandboxExtension::createHandleForReadByPid):
1002         * Shared/SandboxExtension.h:
1003         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1004         (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
1005         * UIProcess/WebPageProxy.cpp:
1006         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
1007         (WebKit::WebPageProxy::loadFile):
1008
1009 2019-08-17  Tim Horton  <timothy_horton@apple.com>
1010
1011         Layout tests that call resizeTo() crash when run on iOS with IOSurface support enabled
1012         https://bugs.webkit.org/show_bug.cgi?id=200866
1013         <rdar://problem/50254021>
1014
1015         Reviewed by Simon Fraser.
1016
1017         * UIProcess/ios/PageClientImplIOS.mm:
1018         (WebKit::PageClientImpl::convertToDeviceSpace):
1019         (WebKit::PageClientImpl::convertToUserSpace):
1020         Implement convertTo{Device,User}Space in PageClientImplIOS.
1021         We don't actually do any conversion. For our purposes, the window is
1022         "device" space, and we never allow iOS WebKit clients to resize the window...
1023         except for in tests! So just pass the rects straight through, instead of
1024         returning an empty rect.
1025
1026 2019-08-17  Eric Liang  <ericliang@apple.com>
1027
1028         Use bundlePath SPI in AccessibilitySupport for WebProcessLoader
1029         https://bugs.webkit.org/show_bug.cgi?id=200367
1030
1031         Reviewed by Darin Adler.
1032
1033         * Platform/spi/ios/AccessibilitySupportSPI.h:
1034         * WebProcess/cocoa/WebProcessCocoa.mm:
1035         (WebKit::accessibilityWebProcessLoaderBundlePath):
1036         (WebKit::registerWithAccessibility):
1037
1038 2019-08-17  Sam Weinig  <weinig@apple.com>
1039
1040         Rename StringBuilder::flexibleAppend(...) to StringBuilder::append(...)
1041         https://bugs.webkit.org/show_bug.cgi?id=200756
1042
1043         Reviewed by Darin Adler.
1044
1045         Update call sites for rename from StringBuilder::flexibleAppend(...) to 
1046         StringBuilder::append(...).
1047
1048         * WebProcess/WebPage/WebPage.cpp:
1049         (WebKit::dumpHistoryItem):
1050         We have to explicitly access the underlying String of the URL rather than
1051         relying on the implicit conversion since it is now ambiguous which append(...)
1052         overload should be used.
1053
1054 2019-08-17  Devin Rousso  <drousso@apple.com>
1055
1056         Web Inspector: make the initial height bigger when attached
1057         https://bugs.webkit.org/show_bug.cgi?id=200855
1058
1059         Reviewed by Joseph Pecoraro.
1060
1061         * Shared/WebPreferences.yaml:
1062         Increase the default attached height from `300px` to `500px`, which is close to the same
1063         amount of area given a 15" MacBook Pro's aspect ratio (default attached width is `750px`).
1064
1065 2019-08-17  Simon Fraser  <simon.fraser@apple.com>
1066
1067         [iOS WK2] Scroll indicators disappear sometimes
1068         https://bugs.webkit.org/show_bug.cgi?id=200791
1069
1070         Reviewed by Tim Horton.
1071         
1072         _web_setSubviews: replaces all of the views subviews with the supplied array, but this blows
1073         away views not managed by WebKit, including UIScrollViews scroll indicators. Fix by having
1074         WebKit-managed views implement the WKWebKitControlled protocol, and only removing views
1075         implementing that protocol.
1076
1077         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
1078         (-[UIView _web_setSubviews:]):
1079         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:
1080
1081 2019-08-17  Antti Koivisto  <antti@apple.com>
1082
1083         Content in <iframe> should override "touch-action" set in embedding document
1084         https://bugs.webkit.org/show_bug.cgi?id=200204
1085         <rdar://problem/54355249>
1086
1087         Reviewed by Antoine Quint.
1088
1089         Subframes where content doesn't use any touch-action properties won't generate event region for their main layer.
1090         As a result the touch-action property gets computed in UI process to the parent frames touch-action (instead of 'auto').
1091
1092         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
1093         (WebKit::touchActionsForPoint):
1094
1095         If the topmost layer hit is a WKChildScrollView we know its content layer didn't have an event region.
1096         This means we should return the default value 'auto'.
1097
1098 2019-08-16  Chris Dumez  <cdumez@apple.com>
1099
1100         Use strongly typed identifiers for StorageArea / StorageAreaImpl
1101         https://bugs.webkit.org/show_bug.cgi?id=200835
1102
1103         Reviewed by Alex Christensen.
1104
1105         Use strongly typed identifiers for StorageArea / StorageAreaImpl. They currently both use uint64_t
1106         and are used in the same code, it is therefore very easy to confused the 2 types of identifiers.
1107
1108         * NetworkProcess/WebStorage/StorageArea.cpp:
1109         (WebKit::StorageArea::StorageArea):
1110         (WebKit::StorageArea::setItem):
1111         (WebKit::StorageArea::removeItem):
1112         (WebKit::StorageArea::clear):
1113         (WebKit::StorageArea::dispatchEvents const):
1114         * NetworkProcess/WebStorage/StorageArea.h:
1115         (WebKit::StorageArea::identifier):
1116         * NetworkProcess/WebStorage/StorageAreaIdentifier.h: Copied from Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.h.
1117         * NetworkProcess/WebStorage/StorageManagerSet.cpp:
1118         (WebKit::StorageManagerSet::connectToLocalStorageArea):
1119         (WebKit::StorageManagerSet::connectToTransientLocalStorageArea):
1120         (WebKit::StorageManagerSet::connectToSessionStorageArea):
1121         (WebKit::StorageManagerSet::disconnectFromStorageArea):
1122         (WebKit::StorageManagerSet::getValues):
1123         (WebKit::StorageManagerSet::setItem):
1124         (WebKit::StorageManagerSet::removeItem):
1125         (WebKit::StorageManagerSet::clear):
1126         * NetworkProcess/WebStorage/StorageManagerSet.h:
1127         * NetworkProcess/WebStorage/StorageManagerSet.messages.in:
1128         * Scripts/webkit/messages.py:
1129         * WebKit.xcodeproj/project.pbxproj:
1130         * WebProcess/Network/NetworkProcessConnection.cpp:
1131         (WebKit::NetworkProcessConnection::didReceiveMessage):
1132         * WebProcess/WebProcess.cpp:
1133         (WebKit::WebProcess::registerStorageAreaMap):
1134         (WebKit::WebProcess::unregisterStorageAreaMap):
1135         (WebKit::WebProcess::storageAreaMap const):
1136         * WebProcess/WebProcess.h:
1137         * WebProcess/WebStorage/StorageAreaImpl.cpp:
1138         (WebKit::StorageAreaImpl::StorageAreaImpl):
1139         * WebProcess/WebStorage/StorageAreaImpl.h:
1140         * WebProcess/WebStorage/StorageAreaImplIdentifier.h: Copied from Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.h.
1141         * WebProcess/WebStorage/StorageAreaMap.cpp:
1142         (WebKit::StorageAreaMap::StorageAreaMap):
1143         (WebKit::StorageAreaMap::setItem):
1144         (WebKit::StorageAreaMap::removeItem):
1145         (WebKit::StorageAreaMap::clear):
1146         (WebKit::StorageAreaMap::loadValuesIfNeeded):
1147         (WebKit::StorageAreaMap::dispatchStorageEvent):
1148         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
1149         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
1150         (WebKit::StorageAreaMap::disconnect):
1151         * WebProcess/WebStorage/StorageAreaMap.h:
1152         (WebKit::StorageAreaMap::identifier const):
1153         * WebProcess/WebStorage/StorageAreaMap.messages.in:
1154
1155 2019-08-16  Chris Dumez  <cdumez@apple.com>
1156
1157         Drop StorageArea::setWorkQueue() member function
1158         https://bugs.webkit.org/show_bug.cgi?id=200832
1159
1160         Reviewed by Alex Christensen.
1161
1162         Drop StorageArea::setWorkQueue() member function and pass the WorkQueue to the StorageArea constructor instead.
1163         The WorkQueue can never get updated so an explicit setter is not necessary. It also makes it clearer that the
1164         m_queue data member can never be null.
1165
1166         * NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
1167         (WebKit::LocalStorageNamespace::getOrCreateStorageArea):
1168         * NetworkProcess/WebStorage/LocalStorageNamespace.h:
1169         * NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
1170         (WebKit::SessionStorageNamespace::getOrCreateStorageArea):
1171         * NetworkProcess/WebStorage/SessionStorageNamespace.h:
1172         * NetworkProcess/WebStorage/StorageArea.cpp:
1173         (WebKit::StorageArea::StorageArea):
1174         (WebKit::StorageArea::clone const):
1175         (WebKit::StorageArea::openDatabaseAndImportItemsIfNeeded const):
1176         * NetworkProcess/WebStorage/StorageArea.h:
1177         (WebKit::StorageArea::setWorkQueue): Deleted.
1178         * NetworkProcess/WebStorage/StorageManager.cpp:
1179         (WebKit::StorageManager::createLocalStorageArea):
1180         (WebKit::StorageManager::createTransientLocalStorageArea):
1181         (WebKit::StorageManager::createSessionStorageArea):
1182         * NetworkProcess/WebStorage/StorageManager.h:
1183         * NetworkProcess/WebStorage/StorageManagerSet.cpp:
1184         (WebKit::StorageManagerSet::connectToLocalStorageArea):
1185         (WebKit::StorageManagerSet::connectToTransientLocalStorageArea):
1186         (WebKit::StorageManagerSet::connectToSessionStorageArea):
1187         * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp:
1188         (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea):
1189         * NetworkProcess/WebStorage/TransientLocalStorageNamespace.h:
1190
1191 2019-08-16  Chris Dumez  <cdumez@apple.com>
1192
1193         LocalStorageDatabaseTracker does not need to subclass ThreadSafeRefCounted
1194         https://bugs.webkit.org/show_bug.cgi?id=200825
1195
1196         Reviewed by Alex Christensen.
1197
1198         LocalStorageDatabaseTracker does not need to subclass ThreadSafeRefCounted. It is currently always
1199         ref'd / deref'd from the com.apple.WebKit.WebStorage serial WorkQueue, save from inside
1200         LocalStorageDatabaseTracker::platformMaybeExcludeFromBackup() on iOS. However, it is probably
1201         not a good idea to set FileSystem metadata from the main thread in platformMaybeExcludeFromBackup()
1202         anyway.
1203
1204         Note that I had to get rid of an old linked-on-after check since those are currently only safe
1205         to do on the main thread. I cleared this with Brady. It has been a while since we've shipped this
1206         behavior now and apps have had a chance to update.
1207
1208         * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
1209         (WebKit::LocalStorageDatabaseTracker::databasePath const):
1210         * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.h:
1211         * NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm:
1212         (WebKit::LocalStorageDatabaseTracker::platformMaybeExcludeFromBackup const):
1213         * UIProcess/Cocoa/VersionChecks.h:
1214
1215 2019-08-16  Chris Dumez  <cdumez@apple.com>
1216
1217         LocalStorageDatabase should use inline initialization for its data members
1218         https://bugs.webkit.org/show_bug.cgi?id=200828
1219
1220         Reviewed by John Wilander.
1221
1222         * NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
1223         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1224         * NetworkProcess/WebStorage/LocalStorageDatabase.h:
1225
1226 2019-08-16  Kate Cheney  <katherine_cheney@apple.com>
1227
1228         Functions with no parameters in WebKit/Shared/API/c and WebKit/UIProcess/API/C are
1229         missing a "void" specifier in their argument list
1230         https://bugs.webkit.org/show_bug.cgi?id=200826
1231
1232         Reviewed by Chris Dumez.
1233
1234         Added void to indicate functions with no arguments to satisfy compiler errors.
1235         This error came to light when fixing another patch.
1236
1237         * Shared/API/c/WKArray.h:
1238         * Shared/API/c/WKConnectionRef.h:
1239         * Shared/API/c/WKContextMenuItem.h:
1240         * Shared/API/c/WKData.h:
1241         * Shared/API/c/WKDictionary.h:
1242         * Shared/API/c/WKErrorRef.h:
1243         * Shared/API/c/WKMutableArray.h:
1244         * Shared/API/c/WKMutableDictionary.h:
1245         * Shared/API/c/WKNumber.h:
1246         * Shared/API/c/WKPluginInformation.h:
1247         * Shared/API/c/WKRenderLayer.h:
1248         * Shared/API/c/WKRenderObject.h:
1249         * Shared/API/c/WKSecurityOriginRef.h:
1250         * Shared/API/c/WKSerializedScriptValue.h:
1251         * Shared/API/c/WKString.h:
1252         * Shared/API/c/WKURL.h:
1253         * Shared/API/c/WKURLRequest.h:
1254         * Shared/API/c/WKURLResponse.h:
1255         * Shared/API/c/WKUserContentURLPattern.h:
1256         * UIProcess/API/C/WKBackForwardListItemRef.h:
1257         * UIProcess/API/C/WKBackForwardListRef.h:
1258         * UIProcess/API/C/WKContext.h:
1259         * UIProcess/API/C/WKFormSubmissionListener.h:
1260         * UIProcess/API/C/WKFrame.h:
1261         * UIProcess/API/C/WKFramePolicyListener.h:
1262         * UIProcess/API/C/WKGeolocationManager.h:
1263         * UIProcess/API/C/WKGeolocationPermissionRequest.h:
1264         * UIProcess/API/C/WKGeolocationPosition.h:
1265         * UIProcess/API/C/WKHitTestResult.h:
1266         * UIProcess/API/C/WKNavigationDataRef.h:
1267         * UIProcess/API/C/WKOpenPanelParametersRef.h:
1268         * UIProcess/API/C/WKOpenPanelResultListener.h:
1269         * UIProcess/API/C/WKPage.h:
1270         * UIProcess/API/C/WKPageConfigurationRef.h:
1271         * UIProcess/API/C/WKPageGroup.h:
1272         * UIProcess/API/C/WKPageUIClient.h:
1273         * UIProcess/API/C/WKPreferencesRef.h:
1274         * UIProcess/API/C/WKUserContentControllerRef.h:
1275         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
1276         * UIProcess/API/C/WKUserScriptRef.h:
1277
1278 2019-08-16  Chris Dumez  <cdumez@apple.com>
1279
1280         LocalStorageDatabase does not need to subclass ThreadSafeRefCounted
1281         https://bugs.webkit.org/show_bug.cgi?id=200822
1282
1283         Reviewed by Geoff Garen.
1284
1285         LocalStorageDatabase does not need to subclass ThreadSafeRefCounted, it is only ref'd / deref'd by the StorageArea
1286         on the com.apple.WebKit.WebStorage serial WorkQueue, and in LocalStorageDatabase::scheduleDatabaseUpdate() on the
1287         same WorkQueue.
1288
1289         * NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
1290         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1291         (WebKit::LocalStorageDatabase::~LocalStorageDatabase):
1292         * NetworkProcess/WebStorage/LocalStorageDatabase.h:
1293
1294 2019-08-16  Chris Dumez  <cdumez@apple.com>
1295
1296         Many WebStorage classes do not need to subclass ThreadSafeRefCounted
1297         https://bugs.webkit.org/show_bug.cgi?id=200821
1298
1299         Reviewed by Geoffrey Garen.
1300
1301         Many WebStorage classes do not need to subclass ThreadSafeRefCounted. They never get ref'd or deref'd.
1302
1303         * NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
1304         (WebKit::LocalStorageNamespace::getOrCreateStorageArea):
1305         (WebKit::LocalStorageNamespace::clearAllStorageAreas):
1306         * NetworkProcess/WebStorage/LocalStorageNamespace.h:
1307         * NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
1308         (WebKit::SessionStorageNamespace::getOrCreateStorageArea):
1309         * NetworkProcess/WebStorage/SessionStorageNamespace.h:
1310         * NetworkProcess/WebStorage/StorageArea.cpp:
1311         (WebKit::StorageArea::clone const):
1312         * NetworkProcess/WebStorage/StorageArea.h:
1313         * NetworkProcess/WebStorage/StorageManager.cpp:
1314         (WebKit::StorageManager::createSessionStorageNamespace):
1315         (WebKit::StorageManager::createLocalStorageArea):
1316         (WebKit::StorageManager::createTransientLocalStorageArea):
1317         (WebKit::StorageManager::createSessionStorageArea):
1318         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
1319         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
1320         (WebKit::StorageManager::getOrCreateSessionStorageNamespace):
1321         * NetworkProcess/WebStorage/StorageManager.h:
1322         * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp:
1323         (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea):
1324         * NetworkProcess/WebStorage/TransientLocalStorageNamespace.h:
1325
1326 2019-08-16  Dean Jackson  <dino@apple.com>
1327
1328         Long pressing images with transparent backgrounds in dark mode causes a black background to appear around the image content
1329         https://bugs.webkit.org/show_bug.cgi?id=200827
1330         <rdar://53933379>
1331
1332         Reviewed by Tim Horton.
1333
1334         Set a clear color when there is no provided background.
1335
1336         * UIProcess/ios/WKContentViewInteraction.mm:
1337         (createTargetedPreview):
1338
1339 2019-08-16  Ryosuke Niwa  <rniwa@webkit.org>
1340
1341         Split tabIndex computation for DOM and the rest of WebCore
1342         https://bugs.webkit.org/show_bug.cgi?id=200806
1343
1344         Reviewed by Chris Dumez.
1345
1346         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
1347         (webkit_dom_html_element_get_tab_index):
1348         (webkit_dom_html_element_set_tab_index):
1349
1350 2019-08-16  Ross Kirsling  <ross.kirsling@sony.com>
1351
1352         Unreviewed restabilization of non-unified build.
1353
1354         * NetworkProcess/NetworkCORSPreflightChecker.h:
1355         * NetworkProcess/WebStorage/StorageManagerSet.cpp:
1356         (WebKit::StorageManagerSet::StorageManagerSet):
1357         * Shared/FrameInfoData.cpp:
1358         (WebKit::FrameInfoData::decode):
1359         * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
1360         * WebProcess/WebStorage/StorageNamespaceImpl.h:
1361
1362 2019-08-16  Chris Dumez  <cdumez@apple.com>
1363
1364         StorageManager does not need to subclass RefCounted
1365         https://bugs.webkit.org/show_bug.cgi?id=200818
1366
1367         Reviewed by Geoffrey Garen.
1368
1369         StorageManager does not need to subclass RefCounted. It is owned by the StorageManagerSet
1370         and is never ref'd / deref'd.
1371
1372         * NetworkProcess/WebStorage/StorageManager.h:
1373         (WebKit::StorageManager::create): Deleted.
1374         * NetworkProcess/WebStorage/StorageManagerSet.cpp:
1375         (WebKit::StorageManagerSet::add):
1376         * NetworkProcess/WebStorage/StorageManagerSet.h:
1377
1378 2019-08-16  Chris Dumez  <cdumez@apple.com>
1379
1380         Clarify StorageManagerSet / StorageManager threading model after r248734
1381         https://bugs.webkit.org/show_bug.cgi?id=200817
1382
1383         Reviewed by Geoffrey Garen.
1384
1385         Clarify StorageManagerSet / StorageManager threading model after r248734. StorageManager is now
1386         a background thread object but it still calls its completion handlers on the main thread, which
1387         is very error prone. The pattern in WebKit for thread safety is that methods should always call
1388         their completion handler of the thread / queue they were called on themselves. Doing differently
1389         has caused so many thread-safety bugs in the past.
1390
1391         * NetworkProcess/WebStorage/StorageManager.cpp:
1392         (WebKit::StorageManager::getSessionStorageOrigins const):
1393         (WebKit::StorageManager::deleteSessionStorageOrigins):
1394         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
1395         (WebKit::StorageManager::getLocalStorageOrigins const):
1396         (WebKit::StorageManager::getLocalStorageOriginDetails const):
1397         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
1398         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
1399         (WebKit::StorageManager::getSessionStorageOrigins): Deleted.
1400         (WebKit::StorageManager::getLocalStorageOrigins): Deleted.
1401         (WebKit::StorageManager::getLocalStorageOriginDetails): Deleted.
1402         * NetworkProcess/WebStorage/StorageManager.h:
1403         * NetworkProcess/WebStorage/StorageManagerSet.cpp:
1404         (WebKit::StorageManagerSet::getSessionStorageOrigins):
1405         (WebKit::StorageManagerSet::deleteSessionStorage):
1406         (WebKit::StorageManagerSet::deleteSessionStorageForOrigins):
1407         (WebKit::StorageManagerSet::getLocalStorageOrigins):
1408         (WebKit::StorageManagerSet::deleteLocalStorageModifiedSince):
1409         (WebKit::StorageManagerSet::deleteLocalStorageForOrigins):
1410         (WebKit::StorageManagerSet::getLocalStorageOriginDetails):
1411
1412 2019-08-16  Chris Dumez  <cdumez@apple.com>
1413
1414         StorageManagerSet constructor should not be public
1415         https://bugs.webkit.org/show_bug.cgi?id=200816
1416
1417         Reviewed by Geoffrey Garen.
1418
1419         StorageManagerSet constructor should not be public since it subclasses ThreadSafeRefCounted and
1420         has a factory method.
1421
1422         * NetworkProcess/WebStorage/StorageManagerSet.h:
1423
1424 2019-08-16  Timothy Hatcher  <timothy@apple.com>
1425
1426         REGRESSION (r248436): WKWebView doesn’t respect isOpaque setting in NIB.
1427         https://bugs.webkit.org/show_bug.cgi?id=200802
1428         rdar://problem/54357818
1429
1430         Reviewed by Tim Horton.
1431
1432         Tests: WKWebView.IsOpaqueDefault, WKWebView.SetOpaqueYes, WKWebView.SetOpaqueNo, WKWebView.IsOpaqueYesSubclassOverridden,
1433         WKWebView.IsOpaqueNoSubclassOverridden, WKWebView.IsOpaqueYesDecodedFromArchive, WKWebView.IsOpaqueNoDecodedFromArchive,
1434         WKWebView.IsOpaqueDrawsBackgroundYesConfiguration, WKWebView.IsOpaqueDrawsBackgroundNoConfiguration.
1435
1436         * UIProcess/API/Cocoa/WKWebView.mm:
1437         (-[WKWebView _initializeWithConfiguration:]): Call _setOpaqueInternal:NO instead of self.opaque = NO.
1438         (-[WKWebView _setOpaqueInternal:]): Added. Moved code from setOpaque:.
1439         (-[WKWebView setOpaque:]): Call _setOpaqueInternal:.
1440
1441 2019-08-15  Yusuke Suzuki  <ysuzuki@apple.com>
1442
1443         [WTF] Add makeUnique<T>, which ensures T is fast-allocated, WTF_MAKE_FAST_ALLOCATED annotation part
1444         https://bugs.webkit.org/show_bug.cgi?id=200620
1445
1446         Reviewed by Geoffrey Garen.
1447
1448         * NetworkProcess/AdClickAttributionManager.h:
1449         * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h:
1450         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
1451         * NetworkProcess/Cookies/WebCookieManager.h:
1452         * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h:
1453         * NetworkProcess/NetworkHTTPSUpgradeChecker.h:
1454         * NetworkProcess/NetworkProcess.cpp:
1455         * NetworkProcess/NetworkSession.h:
1456         * NetworkProcess/NetworkSocketChannel.h:
1457         * NetworkProcess/WebSocketTask.h:
1458         * NetworkProcess/cache/PrefetchCache.h:
1459         * NetworkProcess/cocoa/WebSocketTaskCocoa.h:
1460         * NetworkProcess/soup/WebKitSoupRequestInputStream.cpp:
1461         * NetworkProcess/soup/WebSocketTaskSoup.h:
1462         * NetworkProcess/webrtc/LibWebRTCSocketClient.h:
1463         * NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
1464         * Platform/Module.h:
1465         * PluginProcess/PluginControllerProxy.h:
1466         * Shared/ApplePay/WebPaymentCoordinatorProxy.h:
1467         * Shared/Authentication/AuthenticationManager.h:
1468         * Shared/Cocoa/SandboxExtensionCocoa.mm:
1469         * Shared/Plugins/NPObjectMessageReceiver.h:
1470         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
1471         * UIProcess/API/APIAutomationClient.h:
1472         * UIProcess/API/APIAutomationSessionClient.h:
1473         * UIProcess/API/APIContextMenuClient.h:
1474         * UIProcess/API/APICustomProtocolManagerClient.h:
1475         * UIProcess/API/APIDiagnosticLoggingClient.h:
1476         * UIProcess/API/APIDownloadClient.h:
1477         * UIProcess/API/APIFindClient.h:
1478         * UIProcess/API/APIFindMatchesClient.h:
1479         * UIProcess/API/APIFormClient.h:
1480         * UIProcess/API/APIFullscreenClient.h:
1481         * UIProcess/API/APIGeolocationProvider.h:
1482         * UIProcess/API/APIHistoryClient.h:
1483         * UIProcess/API/APIIconDatabaseClient.h:
1484         * UIProcess/API/APIIconLoadingClient.h:
1485         * UIProcess/API/APIInjectedBundleClient.h:
1486         * UIProcess/API/APILegacyContextHistoryClient.h:
1487         * UIProcess/API/APILoaderClient.h:
1488         * UIProcess/API/APINavigationClient.h:
1489         * UIProcess/API/APIPolicyClient.h:
1490         * UIProcess/API/APIUIClient.h:
1491         * UIProcess/API/C/WKPage.cpp:
1492         (WKPageSetPageStateClient):
1493         * UIProcess/API/Cocoa/WKUserContentController.mm:
1494         * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:
1495         * UIProcess/API/glib/IconDatabase.h:
1496         * UIProcess/API/glib/WebKitAutomationSession.cpp:
1497         * UIProcess/API/glib/WebKitIconLoadingClient.cpp:
1498         * UIProcess/API/glib/WebKitNotificationProvider.h:
1499         * UIProcess/API/glib/WebKitUserContentManager.cpp:
1500         * UIProcess/API/glib/WebKitWebContext.cpp:
1501         * UIProcess/API/glib/WebKitWebView.cpp:
1502         * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
1503         * UIProcess/API/gtk/WebKitWebInspector.cpp:
1504         * UIProcess/API/mac/WKView.mm:
1505         (-[WKView maybeInstallIconLoadingClient]):
1506         * UIProcess/API/wpe/APIViewClient.h:
1507         * UIProcess/API/wpe/ScrollGestureController.h:
1508         * UIProcess/ApplicationStateTracker.h:
1509         * UIProcess/Cocoa/AutomationSessionClient.h:
1510         * UIProcess/Cocoa/IconLoadingDelegate.h:
1511         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
1512         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
1513         * UIProcess/DrawingAreaProxy.h:
1514         * UIProcess/HighPerformanceGraphicsUsageSampler.h:
1515         * UIProcess/Network/NetworkProcessProxy.h:
1516         * UIProcess/PageClient.h:
1517         * UIProcess/PerActivityStateCPUUsageSampler.h:
1518         * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.h:
1519         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
1520         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
1521         * UIProcess/SystemPreviewController.h:
1522         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1523         * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
1524         * UIProcess/WebNavigationState.h:
1525         * UIProcess/WebPageInjectedBundleClient.h:
1526         * UIProcess/WebPageProxy.h:
1527         * UIProcess/WebsiteData/WebsiteDataStoreClient.h:
1528         * UIProcess/gtk/DragAndDropHandler.h:
1529         * UIProcess/ios/EditableImageController.h:
1530         * UIProcess/ios/InputViewUpdateDeferrer.h:
1531         * UIProcess/ios/SmartMagnificationController.h:
1532         * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
1533         * UIProcess/mac/WKFullScreenWindowController.mm:
1534         * UIProcess/mac/WKTextFinderClient.mm:
1535         * WebProcess/ApplePay/WebPaymentCoordinator.h:
1536         * WebProcess/Geolocation/GeolocationPermissionRequestManager.h:
1537         * WebProcess/Geolocation/WebGeolocationManager.h:
1538         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
1539         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
1540         * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp:
1541         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
1542         * WebProcess/MediaCache/WebMediaKeyStorageManager.h:
1543         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
1544         * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
1545         * WebProcess/Network/webrtc/LibWebRTCResolver.h:
1546         * WebProcess/Notifications/WebNotificationManager.h:
1547         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1548         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.h:
1549         * WebProcess/Plugins/PluginController.h:
1550         * WebProcess/Storage/WebSWOriginTable.h:
1551         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
1552         * WebProcess/WebCoreSupport/WebChromeClient.h:
1553         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
1554         * WebProcess/WebCoreSupport/WebDragClient.h:
1555         * WebProcess/WebCoreSupport/WebEditorClient.h:
1556         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
1557         * WebProcess/WebCoreSupport/WebInspectorClient.h:
1558         * WebProcess/WebCoreSupport/WebMessagePortChannelProvider.h:
1559         * WebProcess/WebCoreSupport/WebNotificationClient.h:
1560         * WebProcess/WebCoreSupport/WebPlugInClient.h:
1561         * WebProcess/WebCoreSupport/WebProgressTrackerClient.h:
1562         * WebProcess/WebCoreSupport/WebSpeechSynthesisClient.h:
1563         * WebProcess/WebCoreSupport/WebUserMediaClient.h:
1564         * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.h:
1565         * WebProcess/WebPage/FindController.h:
1566         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
1567         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
1568         * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
1569         * WebProcess/WebProcess.h:
1570         * WebProcess/cocoa/UserMediaCaptureManager.h:
1571
1572 2019-08-15  Brent Fulgham  <bfulgham@apple.com>
1573
1574         [FTW] Enable CoreFoundation use if building for Apple target
1575         https://bugs.webkit.org/show_bug.cgi?id=200799
1576
1577         Reviewed by Alex Christensen.
1578
1579         Fix the build and remove an unused method.
1580
1581         * PlatformFTW.cmake:
1582         * Shared/ShareableBitmap.h:
1583         * Shared/win/ShareableBitmapDirect2D.cpp:
1584         (WebKit::ShareableBitmap::createDirect2DSurface):
1585         (WebKit::ShareableBitmap::releaseSurfaceData): Deleted.
1586
1587 2019-08-15  Sihui Liu  <sihui_liu@apple.com>
1588
1589         Some improvements on web storage
1590         https://bugs.webkit.org/show_bug.cgi?id=200373
1591
1592         Reviewed by Geoffrey Garen.
1593
1594         Fix some issues in web storage architecture. For example, sessionStorageNameSpace for web page is prepared and 
1595         destroyed in the network process when the page comes and goes, even though the page may not use sessionStorage 
1596         at all. The messages about page state sent from web process to network process can be waste.
1597
1598         Here are some general ideas of this patch:
1599         1. Network process owns the web storage, and web process keeps a small local copy (based on session and 
1600         origins that are visited). There is a virtual connection from the local copy in the web process to the original
1601         copy in the network process. The connection is created by web process when some page asks for web storage.
1602         2. If connection is lost because network process is gone, storage in memory will be lost. The local copy in web
1603         processs will be discarded.
1604         3. (SessionID, StorageNamespaceID, SecurityOrigin) is used to identify a storage area. If session is changed in
1605         web process (like enabling private browsing in layout test now), a re-connection with different sessionID would 
1606         suffice to load another copy of storage.
1607         4. localStorage in ephemeral session has the same behavior as localStorage instead of sessionStorage, which
1608         means different pages in the same ephemeral session share the same localStorage.
1609
1610         Also, this patch introduces StorageManagerSet to network process. It handles web storage stuff, including
1611         receiving storage messages from web process, on one background thread. Previously each session has its own
1612         StorageManager and each StorageManager has its own WorkQueue.
1613
1614         * CMakeLists.txt:
1615         * DerivedSources-input.xcfilelist:
1616         * DerivedSources-output.xcfilelist:
1617         * DerivedSources.make:
1618
1619         * NetworkProcess/NetworkConnectionToWebProcess.cpp: remove message handlers that are no longer needed. Network
1620         process no longer needs to know page states from web process.
1621         (WebKit::NetworkConnectionToWebProcess::didClose):
1622         (WebKit::NetworkConnectionToWebProcess::webPageWasAdded): Deleted.
1623         (WebKit::NetworkConnectionToWebProcess::webPageWasRemoved): Deleted.
1624         (WebKit::NetworkConnectionToWebProcess::webProcessSessionChanged): Deleted.
1625         * NetworkProcess/NetworkConnectionToWebProcess.h:
1626         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1627
1628         * NetworkProcess/NetworkProcess.cpp: NetworkProcess uses StorageManagerSet instead of StorageManager from 
1629         different sessions to deal with web storage.
1630         (WebKit::NetworkProcess::NetworkProcess):
1631         (WebKit::NetworkProcess::initializeNetworkProcess):
1632         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess): StorageManagerSet starts handling 
1633         StorageManagerSet messages from the new connection.
1634         (WebKit::NetworkProcess::addWebsiteDataStore):
1635         (WebKit::NetworkProcess::destroySession):
1636         (WebKit::NetworkProcess::hasLocalStorage):
1637         (WebKit::NetworkProcess::fetchWebsiteData):
1638         (WebKit::NetworkProcess::deleteWebsiteData):
1639         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
1640         (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
1641         (WebKit::NetworkProcess::actualPrepareToSuspend):
1642         (WebKit::NetworkProcess::resume):
1643         (WebKit::NetworkProcess::syncLocalStorage):
1644         (WebKit::NetworkProcess::clearLegacyPrivateBrowsingLocalStorage): added for clearing in-memory ephemeral
1645         localStorage.
1646         (WebKit::NetworkProcess::getLocalStorageOriginDetails):
1647         (WebKit::NetworkProcess::connectionToWebProcessClosed):
1648         (WebKit::NetworkProcess::webPageWasAdded): Deleted.
1649         (WebKit::NetworkProcess::webPageWasRemoved): Deleted.
1650         (WebKit::NetworkProcess::webProcessWasDisconnected): Deleted.
1651         (WebKit::NetworkProcess::webProcessSessionChanged): Deleted.
1652         * NetworkProcess/NetworkProcess.h:
1653         * NetworkProcess/NetworkProcess.messages.in:
1654
1655         * NetworkProcess/NetworkSession.cpp: StorageManager is moved out of NetworkSession. It is now managed by 
1656         StorageManagerSet.
1657         (WebKit::NetworkSession::NetworkSession):
1658         (WebKit::NetworkSession::~NetworkSession):
1659         * NetworkProcess/NetworkSession.h:
1660         (WebKit::NetworkSession::storageManager): Deleted.
1661
1662         * NetworkProcess/NetworkSessionCreationParameters.cpp: creation parameters of StorageManager is moved out of
1663         NetworkSessionCreationParameters.
1664         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
1665         (WebKit::NetworkSessionCreationParameters::encode const):
1666         (WebKit::NetworkSessionCreationParameters::decode):
1667         * NetworkProcess/NetworkSessionCreationParameters.h:
1668
1669         * NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
1670         (WebKit::LocalStorageDatabase::updateDatabase): remove an assertion that is no longer true as we can force an
1671         update with syncLocalStorage now.
1672         * NetworkProcess/WebStorage/LocalStorageDatabase.h: make updateDatabase public for syncLocalStorage.
1673
1674         * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp: LocalStorageDatabaseTracker is created on the
1675         background thread now, so it does not hold WorkQueue to do the file operation.
1676         (WebKit::LocalStorageDatabaseTracker::create):
1677         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
1678         (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
1679         * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.h:
1680         * NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
1681         (WebKit::LocalStorageNamespace::getOrCreateStorageArea):
1682         (WebKit::LocalStorageNamespace::cloneTo): Deleted.
1683         * NetworkProcess/WebStorage/LocalStorageNamespace.h:
1684         * NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
1685         (WebKit::SessionStorageNamespace::getOrCreateStorageArea):
1686         (WebKit::SessionStorageNamespace::addAllowedConnection): Deleted.
1687         (WebKit::SessionStorageNamespace::removeAllowedConnection): Deleted.
1688         * NetworkProcess/WebStorage/SessionStorageNamespace.h:
1689         (WebKit::SessionStorageNamespace::allowedConnections const): Deleted.
1690
1691         * NetworkProcess/WebStorage/StorageArea.cpp:
1692         (WebKit::generateStorageAreaIdentifier): each StorageArea has an identifier. StorageAreaMap in web process uses
1693         this identifier to indicate which StorageArea it is connecting to.
1694         (WebKit::StorageArea::StorageArea):
1695         (WebKit::StorageArea::~StorageArea): StorageArea may still have listeners because StorageArea should be 
1696         destroyed by requests from UI process, and listeners are connections to web processses.
1697         (WebKit::StorageArea::addListener): load localStorageDatabase in advance if there is some connection to this 
1698         LocalStorage area.
1699         (WebKit::StorageArea::removeListener):
1700         (WebKit::StorageArea::hasListener const):
1701         (WebKit::StorageArea::clear):
1702         (WebKit::StorageArea::openDatabaseAndImportItemsIfNeeded const):
1703         (WebKit::StorageArea::dispatchEvents const):
1704         (WebKit::StorageArea::syncToDatabase):
1705         (WebKit::StorageArea::setItems): Deleted. Stop syncing from web process to network process after network process
1706         is relaunched.
1707         * NetworkProcess/WebStorage/StorageArea.h:
1708         (WebKit::StorageArea::identifier):
1709         (WebKit::StorageArea::setWorkQueue):
1710
1711         * NetworkProcess/WebStorage/StorageManager.cpp: StorageManager should be accessed by only background thread now.
1712         (WebKit::StorageManager::StorageManager):
1713         (WebKit::StorageManager::~StorageManager):
1714         (WebKit::StorageManager::createSessionStorageNamespace):
1715         (WebKit::StorageManager::destroySessionStorageNamespace): this is not used now but keep it for future 
1716         improvement to remove in-memory sessionStorage in network process if we know some web page is gone forever.
1717         (WebKit::StorageManager::cloneSessionStorageNamespace): previously each page had its own ephemeral 
1718         localStorageNamespace and now all pages in the same session share one localStorage, so we don't need to clone
1719         localStorageNamespace.
1720         (WebKit::StorageManager::getSessionStorageOrigins):
1721         (WebKit::StorageManager::deleteSessionStorageOrigins):
1722         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
1723         (WebKit::StorageManager::getLocalStorageOrigins):
1724         (WebKit::StorageManager::getLocalStorageOriginDetails):
1725         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
1726         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
1727         (WebKit::StorageManager::createLocalStorageArea):
1728         (WebKit::StorageManager::createTransientLocalStorageArea):
1729         (WebKit::StorageManager::createSessionStorageArea):
1730         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
1731         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
1732         (WebKit::StorageManager::getOrCreateSessionStorageNamespace):
1733         (WebKit::StorageManager::clearStorageNamespaces):
1734         (WebKit::StorageManager::addAllowedSessionStorageNamespaceConnection): Deleted.
1735         (WebKit::StorageManager::removeAllowedSessionStorageNamespaceConnection): Deleted.
1736         (WebKit::StorageManager::processDidCloseConnection): Deleted.
1737         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin): Deleted.
1738         (WebKit::StorageManager::createLocalStorageMap): Deleted.
1739         (WebKit::StorageManager::createTransientLocalStorageMap): Deleted.
1740         (WebKit::StorageManager::createSessionStorageMap): Deleted.
1741         (WebKit::StorageManager::destroyStorageMap): Deleted.
1742         (WebKit::StorageManager::prewarm): Deleted.
1743         (WebKit::StorageManager::getValues): Deleted.
1744         (WebKit::StorageManager::setItem): Deleted.
1745         (WebKit::StorageManager::setItems): Deleted.
1746         (WebKit::StorageManager::removeItem): Deleted.
1747         (WebKit::StorageManager::clear): Deleted.
1748         (WebKit::StorageManager::waitUntilTasksFinished): Deleted.
1749         (WebKit::StorageManager::suspend): Deleted.
1750         (WebKit::StorageManager::resume): Deleted.
1751         (WebKit::StorageManager::findStorageArea const): Deleted.
1752         * NetworkProcess/WebStorage/StorageManager.h:
1753         (WebKit::StorageManager::workQueue const): Deleted.
1754         (): Deleted.
1755
1756         * NetworkProcess/WebStorage/StorageManager.messages.in: Removed. Moved to StorageManagerSet.messages.in.
1757
1758         * NetworkProcess/WebStorage/StorageManagerSet.cpp: Added.
1759         (WebKit::StorageManagerSet::create):
1760         (WebKit::StorageManagerSet::StorageManagerSet):
1761         (WebKit::StorageManagerSet::~StorageManagerSet):
1762         (WebKit::StorageManagerSet::add):
1763         (WebKit::StorageManagerSet::remove):
1764         (WebKit::StorageManagerSet::contains):
1765         (WebKit::StorageManagerSet::addConnection):
1766         (WebKit::StorageManagerSet::removeConnection):
1767         (WebKit::StorageManagerSet::waitUntilTasksFinished):
1768         (WebKit::StorageManagerSet::waitUntilSyncingLocalStorageFinished):
1769         (WebKit::StorageManagerSet::suspend):
1770         (WebKit::StorageManagerSet::resume):
1771         (WebKit::StorageManagerSet::getSessionStorageOrigins):
1772         (WebKit::StorageManagerSet::deleteSessionStorage):
1773         (WebKit::StorageManagerSet::deleteSessionStorageForOrigins):
1774         (WebKit::StorageManagerSet::getLocalStorageOrigins):
1775         (WebKit::StorageManagerSet::deleteLocalStorageModifiedSince):
1776         (WebKit::StorageManagerSet::deleteLocalStorageForOrigins):
1777         (WebKit::StorageManagerSet::getLocalStorageOriginDetails):
1778         (WebKit::StorageManagerSet::connectToLocalStorageArea):
1779         (WebKit::StorageManagerSet::connectToTransientLocalStorageArea):
1780         (WebKit::StorageManagerSet::connectToSessionStorageArea):
1781         (WebKit::StorageManagerSet::disconnectFromStorageArea):
1782         (WebKit::StorageManagerSet::getValues):
1783         (WebKit::StorageManagerSet::setItem):
1784         (WebKit::StorageManagerSet::removeItem):
1785         (WebKit::StorageManagerSet::clear):
1786         (WebKit::StorageManagerSet::cloneSessionStorageNamespace):
1787         * NetworkProcess/WebStorage/StorageManagerSet.h: Added.
1788         * NetworkProcess/WebStorage/StorageManagerSet.messages.in: Added.
1789
1790         * Shared/WebsiteDataStoreParameters.cpp: creation parameters of StorageManager are moved to 
1791         WebsiteDataStoreParameters.
1792         (WebKit::WebsiteDataStoreParameters::encode const):
1793         (WebKit::WebsiteDataStoreParameters::decode):
1794         (WebKit::WebsiteDataStoreParameters::privateSessionParameters):
1795         * Shared/WebsiteDataStoreParameters.h:
1796         * Sources.txt:
1797
1798         * UIProcess/API/C/WKContext.cpp: add SPI for tests.
1799         (WKContextSyncLocalStorage):
1800         (WKContextClearLegacyPrivateBrowsingLocalStorage):
1801         * UIProcess/API/C/WKContextPrivate.h:
1802         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1803         (WKWebsiteDataStoreRemoveLocalStorage):
1804         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
1805         * UIProcess/WebProcessPool.cpp:
1806         (WebKit::WebProcessPool::ensureNetworkProcess):
1807         (WebKit::WebProcessPool::syncLocalStorage):
1808         (WebKit::WebProcessPool::clearLegacyPrivateBrowsingLocalStorage):
1809         * UIProcess/WebProcessPool.h:
1810         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
1811         (WebKit::WebsiteDataStore::parameters):
1812         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1813         (WebKit::WebsiteDataStore::parameters):
1814         * WebKit.xcodeproj/project.pbxproj:
1815
1816         * WebProcess/InjectedBundle/InjectedBundle.cpp: session change of web storage is done via 
1817         WebStorageNamespaceProvider instead of WebProcess now.
1818         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
1819         * WebProcess/WebProcess.cpp: web process no longer sends messsages about page state to network process.
1820         (WebKit::WebProcess::createWebPage):
1821         (WebKit::WebProcess::removeWebPage):
1822         (WebKit::WebProcess::ensureNetworkProcessConnection):
1823         (WebKit::WebProcess::networkProcessConnectionClosed):
1824         (WebKit::WebProcess::storageAreaMap const):
1825         (WebKit::WebProcess::enablePrivateBrowsingForTesting): Deleted. This was used for changing session via 
1826         WebProcess.
1827         * WebProcess/WebProcess.h:
1828         * WebProcess/WebStorage/StorageAreaImpl.cpp:
1829         (WebKit::StorageAreaImpl::StorageAreaImpl):
1830         (WebKit::StorageAreaImpl::length):
1831         (WebKit::StorageAreaImpl::key):
1832         (WebKit::StorageAreaImpl::item):
1833         (WebKit::StorageAreaImpl::setItem):
1834         (WebKit::StorageAreaImpl::removeItem):
1835         (WebKit::StorageAreaImpl::clear):
1836         (WebKit::StorageAreaImpl::contains):
1837         (WebKit::StorageAreaImpl::storageType const):
1838         (WebKit::StorageAreaImpl::incrementAccessCount):
1839         (WebKit::StorageAreaImpl::decrementAccessCount):
1840         (WebKit::StorageAreaImpl::prewarm): Deleted.
1841         (WebKit::StorageAreaImpl::securityOrigin const): Deleted.
1842
1843         * WebProcess/WebStorage/StorageAreaImpl.h: make StorageAreaImpl hold a weak reference to StorageAreaMap and 
1844         StorageNamespaceImpl hold a strong reference. In this way lifeime of localStorage StorageAreraMap stays align 
1845         with StorageNameSpaceProvider and Page.
1846
1847         * WebProcess/WebStorage/StorageAreaMap.cpp: identifier of StorageAreaMap is the same as identifier of 
1848         StorageArea it connects to. If the identifier is 0, it means the StorageAreaMap is disconnected.
1849         (WebKit::StorageAreaMap::StorageAreaMap):
1850         (WebKit::StorageAreaMap::~StorageAreaMap):
1851         (WebKit::StorageAreaMap::setItem):
1852         (WebKit::StorageAreaMap::removeItem):
1853         (WebKit::StorageAreaMap::clear):
1854         (WebKit::StorageAreaMap::resetValues):
1855         (WebKit::StorageAreaMap::loadValuesIfNeeded):
1856         (WebKit::StorageAreaMap::applyChange):
1857         (WebKit::StorageAreaMap::dispatchStorageEvent):
1858         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
1859         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
1860         (WebKit::StorageAreaMap::connect):
1861         (WebKit::StorageAreaMap::disconnect):
1862         (WebKit::generateStorageMapID): Deleted.
1863         (WebKit::StorageAreaMap::prewarm): Deleted.
1864         (WebKit::StorageAreaMap::didGetValues): Deleted. This is useless as GetValues is a synchronous operation.
1865         * WebProcess/WebStorage/StorageAreaMap.h:
1866         (): Deleted.
1867
1868         * WebProcess/WebStorage/StorageAreaMap.messages.in: there are two synchronous messages, one for connection and 
1869         one for getting values. We may merge them into one in future improvement.
1870         * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
1871         (WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
1872         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
1873         (WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
1874         (WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
1875         (WebKit::StorageNamespaceImpl::storageArea):
1876         (WebKit::StorageNamespaceImpl::copy):
1877         (WebKit::StorageNamespaceImpl::setSessionIDForTesting):
1878         (WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace): Deleted.
1879         * WebProcess/WebStorage/StorageNamespaceImpl.h:
1880         * WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:
1881         (WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
1882         (WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
1883         (WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
1884         (WebKit::WebStorageNamespaceProvider::createEphemeralLocalStorageNamespace): Deleted.
1885         * WebProcess/WebStorage/WebStorageNamespaceProvider.h:
1886
1887 2019-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
1888
1889         Occasional hang under -[UIKeyboardTaskQueue lockWhenReadyForMainThread] when long-pressing non-editable text
1890         https://bugs.webkit.org/show_bug.cgi?id=200731
1891         <rdar://problem/54315371>
1892
1893         Reviewed by Tim Horton.
1894
1895         When handling a single tap in non-editable content, keyboards logic in UIKit may attempt to wait for all
1896         pending tasks in UIKeyboardTaskQueue to finish executing (e.g. by calling -waitUntilAllTasksAreFinished]). If
1897         the task queue has a pending task at this moment - for example, a text selection update that is waiting for a
1898         response from the web process - this will result in a permanent deadlock, since the main thread will be blocked,
1899         and therefore cannot receive any IPC communication from the web process.
1900
1901         One way to trigger this is to activate both the loupe gesture and non-editable text tap gesture simultaneously,
1902         by tapping in a non-editable part of the web page, while an ongoing loupe gesture is driving selection updates
1903         (see the layout test for more details).
1904
1905         To avoid getting into this scenario, prevent the text tap gesture recognizer from firing in a few edge cases
1906         that could lead to hangs under keyboard code in UIKit. See comments below.
1907
1908         Test: editing/selection/ios/tap-during-loupe-gesture.html
1909
1910         * UIProcess/ios/WKContentViewInteraction.h:
1911         * UIProcess/ios/WKContentViewInteraction.mm:
1912         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
1913
1914         Don't allow the text tap gesture recognizer to fire if the user is actively modifying the text selection using
1915         the loupe gesture, or if there's other pending selection change updates that are pending responses from the web
1916         content process.
1917
1918         (-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
1919         (-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
1920
1921         Increment and decrement _suppressNonEditableSingleTapTextInteractionCount while handling these selection
1922         updates.
1923
1924 2019-08-15  Commit Queue  <commit-queue@webkit.org>
1925
1926         Unreviewed, rolling out r248440.
1927         https://bugs.webkit.org/show_bug.cgi?id=200772
1928
1929         Introduced regressions related to loading of local files.
1930         (Requested by perarne on #webkit).
1931
1932         Reverted changeset:
1933
1934         "[Mac] Use the PID of the WebContent process when issuing
1935         local file read sandbox extensions"
1936         https://bugs.webkit.org/show_bug.cgi?id=200543
1937         https://trac.webkit.org/changeset/248440
1938
1939 2019-08-15  Alex Christensen  <achristensen@webkit.org>
1940
1941         WKUIDelegate's webView:contextMenuDidEndForElement: should be called when context menus end
1942         https://bugs.webkit.org/show_bug.cgi?id=200750
1943         <rdar://problem/54232261> and <rdar://problem/52355829>
1944
1945         Reviewed by Tim Horton.
1946
1947         * UIProcess/ios/WKContentViewInteraction.mm:
1948         (-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):
1949
1950 2019-08-14  Brian Burg  <bburg@apple.com>
1951
1952         Web Automation: mouse buttons are not correctly printed in SimulatedInputDispatcher log spew
1953         https://bugs.webkit.org/show_bug.cgi?id=200729
1954
1955         Reviewed by Devin Rousso.
1956
1957         This was printing out gibberish because it was trying to decode a WebMouseEvent button
1958         as an Automation protocol button. The logging was less useful because of it.
1959
1960         To fix this, push usage of Automation protocol-based MouseButton type alias all the way
1961         to the platform-specific methods. The mouse buttons are the same for WebMouseEvent::Button
1962         and the Automation protocol type, except the automation type has an auto-generated toString.
1963
1964         * UIProcess/Automation/SimulatedInputDispatcher.h:
1965         * UIProcess/Automation/SimulatedInputDispatcher.cpp:
1966         (WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
1967         (WebKit::SimulatedInputDispatcher::run):
1968         Fix types.
1969
1970         * UIProcess/Automation/WebAutomationSession.h:
1971         * UIProcess/Automation/WebAutomationSession.cpp:
1972         (WebKit::WebAutomationSession::simulateMouseInteraction):
1973         (WebKit::WebAutomationSession::performMouseInteraction):
1974         (WebKit::WebAutomationSession::performInteractionSequence):
1975         (WebKit::protocolMouseButtonToWebMouseEventButton): Deleted.
1976         Fix types.
1977
1978         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
1979         (WebKit::automationMouseButtonToPlatformMouseButton):
1980         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
1981         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
1982         (WebKit::mouseButtonToGdkButton):
1983         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
1984         * UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp:
1985         (WebKit::mouseButtonToWPEButton):
1986         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
1987         Move translation between MouseButton and native button values to platform methods.
1988
1989 2019-08-15  Simon Fraser  <simon.fraser@apple.com>
1990
1991         Use ObjectIdentifier<FrameIdentifierType> for frameIDs
1992         https://bugs.webkit.org/show_bug.cgi?id=199986
1993
1994         Reviewed by Ryosuke Niwa.
1995
1996         Use the strongly-typed FrameIdentifier instead of uint64_t as frame identifiers everywhere.
1997
1998         * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
1999         (WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess):
2000         (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
2001         (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess):
2002         (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal):
2003         * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
2004         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
2005         (WebKit::ResourceLoadStatisticsMemoryStore::hasStorageAccess):
2006         (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess):
2007         (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccess):
2008         (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal):
2009         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
2010         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
2011         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
2012         (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
2013         (WebKit::WebResourceLoadStatisticsStore::hasStorageAccessForFrame):
2014         (WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
2015         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
2016         (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess):
2017         (WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler):
2018         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
2019         * NetworkProcess/NetworkCORSPreflightChecker.h:
2020         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2021         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
2022         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
2023         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
2024         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
2025         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
2026         (WebKit::NetworkConnectionToWebProcess::hasStorageAccess):
2027         (WebKit::NetworkConnectionToWebProcess::requestStorageAccess):
2028         * NetworkProcess/NetworkConnectionToWebProcess.h:
2029         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2030         * NetworkProcess/NetworkLoadChecker.cpp:
2031         (WebKit::NetworkLoadChecker::NetworkLoadChecker):
2032         * NetworkProcess/NetworkLoadChecker.h:
2033         * NetworkProcess/NetworkLoadParameters.h:
2034         * NetworkProcess/NetworkProcess.h:
2035         * NetworkProcess/NetworkResourceLoader.cpp:
2036         (WebKit::NetworkResourceLoader::start):
2037         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
2038         (WebKit::NetworkResourceLoader::startNetworkLoad):
2039         (WebKit::NetworkResourceLoader::convertToDownload):
2040         (WebKit::NetworkResourceLoader::abort):
2041         (WebKit::NetworkResourceLoader::didReceiveResponse):
2042         (WebKit::NetworkResourceLoader::didReceiveBuffer):
2043         (WebKit::NetworkResourceLoader::didFinishLoading):
2044         (WebKit::NetworkResourceLoader::didFailLoading):
2045         (WebKit::NetworkResourceLoader::continueWillSendRequest):
2046         (WebKit::escapeIDForJSON):
2047         (WebKit::logBlockedCookieInformation):
2048         (WebKit::logCookieInformationInternal):
2049         (WebKit::NetworkResourceLoader::logCookieInformation):
2050         * NetworkProcess/NetworkResourceLoader.h:
2051         * NetworkProcess/cache/NetworkCache.h:
2052         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
2053         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2054         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
2055         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
2056         * Scripts/webkit/messages.py:
2057         * Shared/API/APIFrameHandle.cpp:
2058         (API::FrameHandle::create):
2059         (API::FrameHandle::createAutoconverting):
2060         (API::FrameHandle::FrameHandle):
2061         (API::FrameHandle::decode):
2062         * Shared/API/APIFrameHandle.h:
2063         (API::FrameHandle::frameID const):
2064         * Shared/API/Cocoa/_WKFrameHandle.mm:
2065         (-[_WKFrameHandle hash]):
2066         (-[_WKFrameHandle _frameID]):
2067         (-[_WKFrameHandle initWithCoder:]):
2068         (-[_WKFrameHandle encodeWithCoder:]):
2069         * Shared/Authentication/AuthenticationManager.cpp:
2070         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
2071         * Shared/Authentication/AuthenticationManager.h:
2072         * Shared/FrameInfoData.h:
2073         * UIProcess/API/C/WKFrameHandleRef.cpp:
2074         (WKFrameHandleGetFrameID):
2075         * UIProcess/API/Cocoa/WKWebView.mm:
2076         (-[WKWebView _printOperationWithPrintInfo:forFrame:]):
2077         (-[WKWebView _canChangeFrameLayout:]):
2078         * UIProcess/API/Cocoa/_WKInspector.mm:
2079         (-[_WKInspector showMainResourceForFrame:]):
2080         * UIProcess/Automation/SimulatedInputDispatcher.cpp:
2081         (WebKit::SimulatedInputDispatcher::run):
2082         * UIProcess/Automation/SimulatedInputDispatcher.h:
2083         * UIProcess/Automation/WebAutomationSession.cpp:
2084         (WebKit::WebAutomationSession::webFrameIDForHandle):
2085         (WebKit::WebAutomationSession::handleForWebFrameID):
2086         (WebKit::WebAutomationSession::switchToBrowsingContext):
2087         (WebKit::WebAutomationSession::waitForNavigationToComplete):
2088         (WebKit::findPageForFrameID):
2089         (WebKit::WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout):
2090         (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
2091         (WebKit::WebAutomationSession::resolveChildFrameHandle):
2092         (WebKit::WebAutomationSession::resolveParentFrameHandle):
2093         (WebKit::WebAutomationSession::computeElementLayout):
2094         (WebKit::WebAutomationSession::selectOptionElement):
2095         (WebKit::WebAutomationSession::getAllCookies):
2096         (WebKit::WebAutomationSession::deleteSingleCookie):
2097         (WebKit::WebAutomationSession::viewportInViewCenterPointOfElement):
2098         (WebKit::WebAutomationSession::takeScreenshot):
2099         * UIProcess/Automation/WebAutomationSession.h:
2100         * UIProcess/Cocoa/UIDelegate.mm:
2101         (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
2102         * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:
2103         (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
2104         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2105         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
2106         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrameShared):
2107         * UIProcess/Network/NetworkProcessProxy.cpp:
2108         (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
2109         (WebKit::NetworkProcessProxy::requestStorageAccessConfirm):
2110         * UIProcess/Network/NetworkProcessProxy.h:
2111         * UIProcess/Network/NetworkProcessProxy.messages.in:
2112         * UIProcess/ProvisionalPageProxy.cpp:
2113         (WebKit::ProvisionalPageProxy::validateInput):
2114         (WebKit::ProvisionalPageProxy::didCreateMainFrame):
2115         (WebKit::ProvisionalPageProxy::didPerformClientRedirect):
2116         (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
2117         (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
2118         (WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
2119         (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData):
2120         (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame):
2121         (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
2122         (WebKit::ProvisionalPageProxy::decidePolicyForResponse):
2123         (WebKit::ProvisionalPageProxy::didPerformServerRedirect):
2124         (WebKit::ProvisionalPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
2125         (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionSync):
2126         (WebKit::ProvisionalPageProxy::contentFilterDidBlockLoadForFrame):
2127         * UIProcess/ProvisionalPageProxy.h:
2128         * UIProcess/ServiceWorkerProcessProxy.cpp:
2129         (WebKit::ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge):
2130         * UIProcess/ServiceWorkerProcessProxy.h:
2131         * UIProcess/SuspendedPageProxy.cpp:
2132         (WebKit::SuspendedPageProxy::SuspendedPageProxy):
2133         * UIProcess/SuspendedPageProxy.h:
2134         * UIProcess/UserMediaPermissionCheckProxy.cpp:
2135         (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy):
2136         * UIProcess/UserMediaPermissionCheckProxy.h:
2137         (WebKit::UserMediaPermissionCheckProxy::create):
2138         (WebKit::UserMediaPermissionCheckProxy::frameID const):
2139         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2140         (WebKit::UserMediaPermissionRequestManagerProxy::resetAccess):
2141         (WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest const):
2142         (WebKit::UserMediaPermissionRequestManagerProxy::wasRequestDenied):
2143         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2144         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
2145         (WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess):
2146         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
2147         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2148         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2149         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
2150         * UIProcess/UserMediaPermissionRequestProxy.h:
2151         (WebKit::UserMediaPermissionRequestProxy::create):
2152         (WebKit::UserMediaPermissionRequestProxy::mainFrameID const):
2153         (WebKit::UserMediaPermissionRequestProxy::frameID const):
2154         * UIProcess/WebFrameProxy.cpp:
2155         (WebKit::WebFrameProxy::WebFrameProxy):
2156         * UIProcess/WebFrameProxy.h:
2157         (WebKit::WebFrameProxy::create):
2158         (WebKit::WebFrameProxy::frameID const):
2159         * UIProcess/WebPageProxy.cpp:
2160         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
2161         (WebKit::WebPageProxy::commitProvisionalPage):
2162         (WebKit::WebPageProxy::runJavaScriptInFrame):
2163         (WebKit::WebPageProxy::didCreateMainFrame):
2164         (WebKit::WebPageProxy::didCreateSubframe):
2165         (WebKit::WebPageProxy::didCreateWindow):
2166         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
2167         (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
2168         (WebKit::WebPageProxy::didExplicitOpenForFrame):
2169         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
2170         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
2171         (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
2172         (WebKit::WebPageProxy::didCancelClientRedirectForFrame):
2173         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
2174         (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):
2175         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
2176         (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
2177         (WebKit::WebPageProxy::didCommitLoadForFrame):
2178         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
2179         (WebKit::WebPageProxy::didFinishLoadForFrame):
2180         (WebKit::WebPageProxy::didFailLoadForFrame):
2181         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
2182         (WebKit::WebPageProxy::didChangeMainDocument):
2183         (WebKit::WebPageProxy::didReceiveTitleForFrame):
2184         (WebKit::WebPageProxy::didFirstLayoutForFrame):
2185         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
2186         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
2187         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
2188         (WebKit::WebPageProxy::didDetectXSSForFrame):
2189         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
2190         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
2191         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
2192         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
2193         (WebKit::WebPageProxy::decidePolicyForNavigationActionSyncShared):
2194         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2195         (WebKit::WebPageProxy::decidePolicyForResponse):
2196         (WebKit::WebPageProxy::decidePolicyForResponseShared):
2197         (WebKit::WebPageProxy::unableToImplementPolicy):
2198         (WebKit::WebPageProxy::willSubmitForm):
2199         (WebKit::WebPageProxy::didNavigateWithNavigationData):
2200         (WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
2201         (WebKit::WebPageProxy::didPerformClientRedirect):
2202         (WebKit::WebPageProxy::didPerformClientRedirectShared):
2203         (WebKit::WebPageProxy::didPerformServerRedirect):
2204         (WebKit::WebPageProxy::didPerformServerRedirectShared):
2205         (WebKit::WebPageProxy::didUpdateHistoryTitle):
2206         (WebKit::WebPageProxy::runJavaScriptAlert):
2207         (WebKit::WebPageProxy::runJavaScriptConfirm):
2208         (WebKit::WebPageProxy::runJavaScriptPrompt):
2209         (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
2210         (WebKit::WebPageProxy::runOpenPanel):
2211         (WebKit::WebPageProxy::printFrame):
2212         (WebKit::WebPageProxy::focusedFrameChanged):
2213         (WebKit::WebPageProxy::frameSetLargestFrameChanged):
2214         (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
2215         (WebKit::WebPageProxy::exceededDatabaseQuota):
2216         (WebKit::WebPageProxy::requestStorageSpace):
2217         (WebKit::WebPageProxy::makeStorageSpaceRequest):
2218         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
2219         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
2220         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
2221         (WebKit::WebPageProxy::shouldAllowDeviceOrientationAndMotionAccess):
2222         (WebKit::WebPageProxy::requestStorageAccessConfirm):
2223         * UIProcess/WebPageProxy.h:
2224         * UIProcess/WebPageProxy.messages.in:
2225         * UIProcess/WebProcessProxy.cpp:
2226         (WebKit::WebProcessProxy::webFrame const):
2227         (WebKit::WebProcessProxy::canCreateFrame const):
2228         (WebKit::WebProcessProxy::frameCreated):
2229         (WebKit::WebProcessProxy::didDestroyFrame):
2230         * UIProcess/WebProcessProxy.h:
2231         * UIProcess/WebProcessProxy.messages.in:
2232         * UIProcess/ios/WKContentView.mm:
2233         (-[WKContentView _wk_pageCountForPrintFormatter:]):
2234         * UIProcess/ios/WebPageProxyIOS.mm:
2235         (WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF):
2236         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
2237         (WebKit::evaluateJavaScriptCallback):
2238         (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame):
2239         (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
2240         (WebKit::WebAutomationSessionProxy::didEvaluateJavaScriptFunction):
2241         (WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
2242         (WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
2243         (WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
2244         (WebKit::WebAutomationSessionProxy::resolveParentFrame):
2245         (WebKit::WebAutomationSessionProxy::focusFrame):
2246         (WebKit::WebAutomationSessionProxy::computeElementLayout):
2247         (WebKit::WebAutomationSessionProxy::selectOptionElement):
2248         (WebKit::WebAutomationSessionProxy::takeScreenshot):
2249         (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
2250         (WebKit::WebAutomationSessionProxy::deleteCookie):
2251         * WebProcess/Automation/WebAutomationSessionProxy.h:
2252         * WebProcess/Automation/WebAutomationSessionProxy.messages.in:
2253         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
2254         (+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]):
2255         * WebProcess/Network/WebLoaderStrategy.cpp:
2256         (WebKit::WebLoaderStrategy::scheduleLoad):
2257         (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
2258         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
2259         * WebProcess/Network/WebResourceLoader.cpp:
2260         (WebKit::WebResourceLoader::willSendRequest):
2261         (WebKit::WebResourceLoader::didReceiveResponse):
2262         (WebKit::WebResourceLoader::didReceiveData):
2263         (WebKit::WebResourceLoader::didFinishResourceLoad):
2264         (WebKit::WebResourceLoader::didFailResourceLoad):
2265         (WebKit::WebResourceLoader::didBlockAuthenticationChallenge):
2266         (WebKit::WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied):
2267         (WebKit::WebResourceLoader::didReceiveResource):
2268         * WebProcess/Network/WebResourceLoader.h:
2269         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2270         (WebKit::WebSWContextManagerConnection::installServiceWorker):
2271         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2272         (WebKit::WebChromeClient::focusedFrameChanged):
2273         (WebKit::WebChromeClient::contentsSizeChanged const):
2274         (WebKit::WebChromeClient::hasStorageAccess):
2275         (WebKit::WebChromeClient::requestStorageAccess):
2276         * WebProcess/WebCoreSupport/WebChromeClient.h:
2277         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2278         (WebKit::WebFrameLoaderClient::frameID const):
2279         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
2280         (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
2281         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2282         * WebProcess/WebPage/WebCookieJar.cpp:
2283         (WebKit::WebCookieJar::cookies const):
2284         (WebKit::WebCookieJar::setCookies):
2285         (WebKit::WebCookieJar::cookieRequestHeaderFieldValue const):
2286         (WebKit::WebCookieJar::getRawCookies const):
2287         * WebProcess/WebPage/WebCookieJar.h:
2288         * WebProcess/WebPage/WebFrame.cpp:
2289         (WebKit::WebFrame::WebFrame):
2290         (WebKit::generateFrameID): Deleted.
2291         * WebProcess/WebPage/WebFrame.h:
2292         (WebKit::WebFrame::frameID const):
2293         * WebProcess/WebPage/WebInspector.cpp:
2294         (WebKit::WebInspector::showMainResourceForFrame):
2295         * WebProcess/WebPage/WebInspector.h:
2296         * WebProcess/WebPage/WebInspector.messages.in:
2297         * WebProcess/WebPage/WebPage.cpp:
2298         (WebKit::WebPage::loadURLInFrame):
2299         (WebKit::WebPage::loadDataInFrame):
2300         (WebKit::WebPage::stopLoadingFrame):
2301         (WebKit::WebPage::didReceivePolicyDecision):
2302         (WebKit::WebPage::continueWillSubmitForm):
2303         (WebKit::WebPage::runJavaScriptInFrame):
2304         (WebKit::WebPage::getSourceForFrame):
2305         (WebKit::WebPage::getMainResourceDataOfFrame):
2306         (WebKit::WebPage::getResourceDataFromFrame):
2307         (WebKit::WebPage::getWebArchiveOfFrame):
2308         (WebKit::WebPage::addConsoleMessage):
2309         (WebKit::WebPage::sendCSPViolationReport):
2310         (WebKit::WebPage::enqueueSecurityPolicyViolationEvent):
2311         (WebKit::WebPage::beginPrinting):
2312         (WebKit::WebPage::computePagesForPrinting):
2313         (WebKit::WebPage::computePagesForPrintingImpl):
2314         (WebKit::WebPage::drawRectToImage):
2315         (WebKit::WebPage::drawPagesToPDF):
2316         (WebKit::WebPage::drawPagesToPDFImpl):
2317         (WebKit::WebPage::drawPagesForPrinting):
2318         (WebKit::WebPage::frameBecameRemote):
2319         (WebKit::WebPage::hasStorageAccess):
2320         (WebKit::WebPage::requestStorageAccess):
2321         (WebKit::WebPage::shouldAllowDeviceOrientationAndMotionAccess):
2322         * WebProcess/WebPage/WebPage.h:
2323         * WebProcess/WebPage/WebPage.messages.in:
2324         * WebProcess/WebPage/ios/WebPageIOS.mm:
2325         (WebKit::WebPage::computePagesForPrintingPDFDocument):
2326         (WebKit::WebPage::computePagesForPrintingAndDrawToPDF):
2327         * WebProcess/WebPage/mac/WebPageMac.mm:
2328         (WebKit::WebPage::computePagesForPrintingPDFDocument):
2329         * WebProcess/WebProcess.cpp:
2330         (WebKit::WebProcess::webFrame const):
2331         (WebKit::WebProcess::addWebFrame):
2332         (WebKit::WebProcess::removeWebFrame):
2333         * WebProcess/WebProcess.h:
2334
2335 2019-08-14  Wenson Hsieh  <wenson_hsieh@apple.com>
2336
2337         Remove m_blockRectForTextSelection (along with related code)
2338         https://bugs.webkit.org/show_bug.cgi?id=200695
2339
2340         Reviewed by Megan Gardner.
2341
2342         This member variable was consulted by block selection codepaths which no longer exist.
2343         No change in behavior.
2344
2345         * WebProcess/WebPage/WebPage.h:
2346         * WebProcess/WebPage/ios/WebPageIOS.mm:
2347         (WebKit::WebPage::selectTextWithGranularityAtPoint):
2348         (WebKit::selectionBoxForRange): Deleted.
2349
2350 2019-08-14  Ryan Haddad  <ryanhaddad@apple.com>
2351
2352         Unreviewed, rolling out r248526.
2353
2354         Caused two IndexedDB perf tests to fail
2355
2356         Reverted changeset:
2357
2358         "Remove IDB-specific quota"
2359         https://bugs.webkit.org/show_bug.cgi?id=196545
2360         https://trac.webkit.org/changeset/248526
2361
2362 2019-08-14  Andy Estes  <aestes@apple.com>
2363
2364         Fix the build when ENABLE(APPLE_PAY) is false.
2365
2366         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
2367
2368 2019-08-14  Keith Rollin  <krollin@apple.com>
2369
2370         Remove support for macOS < 10.13
2371         https://bugs.webkit.org/show_bug.cgi?id=200694
2372         <rdar://problem/54278851>
2373
2374         Reviewed by Youenn Fablet.
2375
2376         Update conditionals that reference __MAC_OS_X_VERSION_MIN_REQUIRED and
2377         __MAC_OS_X_VERSION_MAX_ALLOWED, assuming that they both have values >=
2378         101300. This means that expressions like
2379         "__MAC_OS_X_VERSION_MIN_REQUIRED < 101300" are always False and
2380         "__MAC_OS_X_VERSION_MIN_REQUIRED >= 101300" are always True.
2381
2382         * NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:
2383         (-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]):
2384         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2385         (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
2386         * Shared/WebPreferencesDefaultValues.cpp:
2387         (WebKit::defaultCustomPasteboardDataEnabled):
2388         * Shared/WebPreferencesDefaultValues.h:
2389         * Shared/mac/AuxiliaryProcessMac.mm:
2390         * UIProcess/Cocoa/WebViewImpl.h:
2391         * UIProcess/Cocoa/WebViewImpl.mm:
2392         (-[WKTextTouchBarItemController itemForIdentifier:]):
2393         (WebKit::WebViewImpl::mediaPlaybackControlsView const):
2394         (WebKit::WebViewImpl::updateMediaTouchBar):
2395         * UIProcess/mac/WebColorPickerMac.mm:
2396         * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
2397         * WebProcess/Plugins/PDF/PDFPlugin.h:
2398         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2399         (-[WKPDFPluginAccessibilityObject setPdfLayerController:]):
2400         (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
2401         (-[WKPDFPluginAccessibilityObject ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
2402         (-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
2403         (-[WKPDFPluginAccessibilityObject accessibilityAssociatedControlForAnnotation:]):
2404         (-[WKPDFPluginAccessibilityObject accessibilityHitTest:]):
2405         (WebKit::PDFPlugin::pdfDocumentDidLoad):
2406         (WebKit::PDFPlugin::handleMouseEvent):
2407         (WebKit::PDFPlugin::handleMouseEnterEvent):
2408         (WebKit::PDFPlugin::handleContextMenuEvent):
2409         (WebKit::PDFPlugin::pluginHandlesContentOffsetForAccessibilityHitTest const):
2410         (WebKit::PDFPlugin::accessibilityAssociatedPluginParentForElement const):
2411         (WebKit::PDFPlugin::updateCursor): Deleted.
2412         * WebProcess/WebProcess.cpp:
2413         (WebKit::WebProcess::initializeWebProcess):
2414
2415 2019-08-14  Brian Burg  <bburg@apple.com>
2416
2417         REGRESSION(r245320): Web Automation: Perform Actions hangs when pointerdown happens near top of page
2418         https://bugs.webkit.org/show_bug.cgi?id=200728
2419         <rdar://problem/54260518>
2420
2421         Reviewed by Devin Rousso.
2422
2423         In the last major refactoring for this code, it seems that the argument to
2424         platformSimulateMouseInteraction was not unified to use viewport coordinates
2425         in all code paths. This patch fixes both callers to *not* add in topContentInset,
2426         and instead this is added back in when doing platform-specific event simulation.
2427
2428         This has no effect on iOS since it's guarded by ENABLE(WEBDRIVER_MOUSE_INTERACTIONS),
2429         which is only built on macOS.
2430
2431         * UIProcess/Automation/WebAutomationSession.h:
2432         * UIProcess/Automation/WebAutomationSession.cpp:
2433         (WebKit::WebAutomationSession::performMouseInteraction):
2434         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
2435         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
2436
2437 2019-08-14  Andy Estes  <aestes@apple.com>
2438
2439         [Cocoa] Add some WKA extension points
2440         https://bugs.webkit.org/show_bug.cgi?id=200506
2441         <rdar://problem/51682474>
2442
2443         Reviewed by Tim Horton.
2444
2445         * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2446         (WebKit::finishCreating):
2447         (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest):
2448         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
2449         (IPC::finishDecoding):
2450         (IPC::finishEncoding):
2451         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::encode):
2452         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode):
2453         * Shared/WebCoreArgumentCoders.h:
2454
2455 2019-08-14  Luming Yin  <luming_yin@apple.com>
2456
2457         v3: CrashTracer: Regression : MobileSafari at UIKitCore: -[UITargetedPreview initWithView:parameters:]
2458         https://bugs.webkit.org/show_bug.cgi?id=200634
2459
2460         Reviewed by Simon Fraser.
2461
2462         Under rare race conditions, the WKContentView may no longer have an associated window. However, 
2463         UIContextMenuInteraction may still attempt initialize a UITargetedPreview with the orphaned 
2464         WKContentView. Speculative fix for crashes under such scenarios, so that we can continue without 
2465         a context menu configuration to prevent the UIKit exception.
2466
2467         * UIProcess/ios/WKContentViewInteraction.mm:
2468         (-[WKContentView continueContextMenuInteraction:]):
2469
2470 2019-08-14  Zalan Bujtas  <zalan@apple.com>
2471
2472         [ContentChangeObserver] Stop content change observation explicitly.
2473         https://bugs.webkit.org/show_bug.cgi?id=200689
2474         <rdar://problem/54274887>
2475
2476         Reviewed by Simon Fraser.
2477
2478         * WebProcess/WebPage/ios/WebPageIOS.mm:
2479         (WebKit::WebPage::handleSyntheticClick):
2480
2481 2019-08-14  Youenn Fablet  <youenn@apple.com>
2482
2483         Remove use of emptySessionID from NetworkLoadParameters
2484         https://bugs.webkit.org/show_bug.cgi?id=200712
2485
2486         Reviewed by Alex Christensen.
2487
2488         Make NetworkLoadParameters constructor take a session ID.
2489         Update call sites accordingly.
2490
2491         * NetworkProcess/AdClickAttributionManager.cpp:
2492         (WebKit::AdClickAttributionManager::fireConversionRequest):
2493         * NetworkProcess/Downloads/DownloadManager.cpp:
2494         (WebKit::DownloadManager::startDownload):
2495         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
2496         (WebKit::NetworkCORSPreflightChecker::startPreflight):
2497         * NetworkProcess/NetworkLoadParameters.h:
2498         (WebKit::NetworkLoadParameters::NetworkLoadParameters):
2499         * NetworkProcess/NetworkProcess.cpp:
2500         (WebKit::NetworkProcess::preconnectTo):
2501         * NetworkProcess/NetworkResourceLoadParameters.cpp:
2502         (WebKit::NetworkResourceLoadParameters::encode const):
2503         (WebKit::NetworkResourceLoadParameters::decode):
2504         * NetworkProcess/NetworkResourceLoadParameters.h:
2505         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
2506         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
2507         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
2508         * WebProcess/Network/WebLoaderStrategy.cpp:
2509         (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
2510         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
2511         (WebKit::WebLoaderStrategy::startPingLoad):
2512         (WebKit::WebLoaderStrategy::preconnectTo):
2513
2514 2019-08-14  Youenn Fablet  <youenn@apple.com>
2515
2516         Remove use of emptySessionID from WebPageCreationParameters
2517         https://bugs.webkit.org/show_bug.cgi?id=200708
2518
2519         Reviewed by Alex Christensen.
2520
2521         Make WebPageCreationParameters constructor take a SessionID.
2522         Update constructor call sites.
2523
2524         * Shared/WebPageCreationParameters.cpp:
2525         (WebKit::WebPageCreationParameters::decode):
2526         * Shared/WebPageCreationParameters.h:
2527         (WebKit::WebPageCreationParameters::WebPageCreationParameters):
2528         * UIProcess/WebPageProxy.cpp:
2529         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
2530
2531 2019-08-14  Youenn Fablet  <youenn@apple.com>
2532
2533         Remove API::PageConfiguration::m_sessionID
2534         https://bugs.webkit.org/show_bug.cgi?id=200670
2535
2536         Reviewed by Alex Christensen.
2537
2538         We can remove this member since it is only accessed for a debug assertion that can be removed without any harm.
2539
2540         * UIProcess/API/APIPageConfiguration.cpp:
2541         (API::PageConfiguration::PageConfiguration):
2542         (API::PageConfiguration::copy const):
2543         (API::PageConfiguration::setWebsiteDataStore):
2544         * UIProcess/API/APIPageConfiguration.h:
2545         * UIProcess/API/glib/WebKitWebContext.cpp:
2546         (webkitWebContextCreatePageForWebView):
2547         * UIProcess/WebProcessPool.cpp:
2548         (WebKit::WebProcessPool::createWebPage):
2549
2550 2019-08-14  Youenn Fablet  <youenn@apple.com>
2551
2552         ThreadableBlobRegistry::blobSize should take a SessionID as parameter
2553         https://bugs.webkit.org/show_bug.cgi?id=200671
2554
2555         Reviewed by Alex Christensen.
2556
2557         Update WebCacheStorageConnection to implement sessionID getter.
2558         Update NetworkConnectionToWebProcess to get a sessionID as parameter to blobSize computation.
2559
2560         * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
2561         (WebKit::NetworkDataTaskCurl::createCurlRequest):
2562         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2563         (WebKit::NetworkConnectionToWebProcess::blobSize):
2564         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
2565         * NetworkProcess/NetworkConnectionToWebProcess.h:
2566         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2567         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
2568         (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
2569         * WebProcess/Cache/WebCacheStorageConnection.h:
2570         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
2571         (WebKit::BlobRegistryProxy::blobSize):
2572         * WebProcess/FileAPI/BlobRegistryProxy.h:
2573
2574 2019-08-14  Youenn Fablet  <youenn@apple.com>
2575
2576         Remove SessionID default constructor
2577         https://bugs.webkit.org/show_bug.cgi?id=200669
2578
2579         Reviewed by Alex Christensen.
2580
2581         Update IPC decoder to use an Optional<SessionID>.
2582         Update PageConfiguration to use emptySessionID instead of default constructor.
2583
2584         * NetworkProcess/NetworkSessionCreationParameters.cpp:
2585         (WebKit::NetworkSessionCreationParameters::decode):
2586         * Shared/WebPageCreationParameters.h:
2587         * UIProcess/API/APIPageConfiguration.cpp:
2588         (API::PageConfiguration::PageConfiguration):
2589         (API::PageConfiguration::sessionID): Deleted.
2590         (API::PageConfiguration::setSessionID): Deleted.
2591
2592 2019-08-14  Youenn Fablet  <youenn@apple.com>
2593
2594         Make WebSWOriginStore::m_webSWServerConnections a WeakHashSet
2595         https://bugs.webkit.org/show_bug.cgi?id=200661
2596
2597         Reviewed by Alex Christensen.
2598
2599         * NetworkProcess/ServiceWorker/WebSWOriginStore.cpp:
2600         (WebKit::WebSWOriginStore::importComplete):
2601         (WebKit::WebSWOriginStore::registerSWServerConnection):
2602         (WebKit::WebSWOriginStore::unregisterSWServerConnection):
2603         (WebKit::WebSWOriginStore::didInvalidateSharedMemory):
2604         * NetworkProcess/ServiceWorker/WebSWOriginStore.h:
2605
2606 2019-08-14  Youenn Fablet  <youenn@apple.com>
2607
2608         NetworkProcess::m_swServerConnections should use WeakPtr
2609         https://bugs.webkit.org/show_bug.cgi?id=200660
2610
2611         Reviewed by Geoffrey Garen.
2612
2613         Use WeakPtr for SWServer connections as an extra safety measure.
2614
2615         * NetworkProcess/NetworkProcess.cpp:
2616         (WebKit::NetworkProcess::postMessageToServiceWorkerClient):
2617         (WebKit::NetworkProcess::postMessageToServiceWorker):
2618         (WebKit::NetworkProcess::registerSWServerConnection):
2619         (WebKit::NetworkProcess::unregisterSWServerConnection):
2620         * NetworkProcess/NetworkProcess.h:
2621
2622 2019-08-14  Youenn Fablet  <youenn@apple.com>
2623
2624         Move some WebRTC runtime flags from experimental to internal
2625         https://bugs.webkit.org/show_bug.cgi?id=200672
2626
2627         Reviewed by Eric Carlson.
2628
2629         * Shared/WebPreferences.yaml:
2630
2631 2019-08-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
2632
2633         shouldRespectImageOrientation should be a value in ImageOrientation
2634         https://bugs.webkit.org/show_bug.cgi?id=200553
2635
2636         Reviewed by Simon Fraser.
2637
2638         * WebProcess/WebPage/ios/WebPageIOS.mm:
2639         (WebKit::imagePositionInformation):
2640
2641 2019-08-13  John Wilander  <wilander@apple.com>
2642
2643         Resource Load Statistics: Switch NSURLSession on top navigation to prevalent resource with user interaction
2644         https://bugs.webkit.org/show_bug.cgi?id=200642
2645         <rdar://problem/53962073>
2646
2647         Reviewed by Alex Christensen.
2648
2649         Since prevalent resources with user interaction get to keep their cookies and website
2650         data, we should use a different NSURLSessions for when they are first-party websites
2651         and have access to that data. This patch achieves that.
2652
2653         The WebKit::NetworkDataTaskCocoa constructor now checks with the network storage session
2654         if the first party for this load should be isolated. The category for which this is true
2655         is checked in the new function
2656         WebCore:NetworkStorageSession::shouldBlockThirdPartyCookiesButKeepFirstPartyCookiesFor()
2657         which in turn is backed by a new split of m_registrableDomainsToBlockCookieFor into:
2658         - m_registrableDomainsToBlockAndDeleteCookiesFor
2659         - m_registrableDomainsToBlockButKeepCookiesFor
2660         ... in WebCore:NetworkStorageSession.
2661
2662         Non-isolated sessions are now picked up through the convenience function
2663         WebKit::NetworkSessionCocoa::session() whereas isolated sessions are created lazily and
2664         picked up through WebKit::NetworkSessionCocoa::isolatedSession().
2665
2666         The number of isolated NSURLSessions in memory is capped to 10. When the cap is hit,
2667         the session that's been unused the longest is aged out.
2668
2669         The C API changes are test infrastructure.
2670
2671         * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
2672         (WebKit::ResourceLoadStatisticsDatabaseStore::clear):
2673         (WebKit::ResourceLoadStatisticsDatabaseStore::domainsToBlockAndDeleteCookiesFor const):
2674         (WebKit::ResourceLoadStatisticsDatabaseStore::domainsToBlockButKeepCookiesFor const):
2675         (WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlocking):
2676         (WebKit::ResourceLoadStatisticsDatabaseStore::domainsToBlock const): Deleted.
2677         * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
2678         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
2679         (WebKit::ResourceLoadStatisticsMemoryStore::clear):
2680         (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
2681         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
2682         (WebKit::ResourceLoadStatisticsStore::updateCookieBlockingForDomains):
2683         (WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):
2684         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
2685         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
2686         (WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
2687         (WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdateForDomains): Deleted.
2688         (WebKit::WebResourceLoadStatisticsStore::scheduleClearBlockingStateForDomains): Deleted.
2689             Dead code.
2690         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
2691         (WebKit::RegistrableDomainsToBlockCookiesFor::isolatedCopy const):
2692         * NetworkProcess/NetworkProcess.cpp:
2693         (WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
2694         (WebKit::NetworkProcess::scheduleClearInMemoryAndPersistent):
2695         (WebKit::NetworkProcess::hasIsolatedSession const):
2696         * NetworkProcess/NetworkProcess.h:
2697         * NetworkProcess/NetworkProcess.messages.in:
2698         * NetworkProcess/NetworkSession.h:
2699         (WebKit::NetworkSession::shouldIsolateSessionsForPrevalentTopFrames const):
2700         (WebKit::NetworkSession::hasIsolatedSession const):
2701         (WebKit::NetworkSession::clearIsolatedSessions):
2702         * NetworkProcess/NetworkSessionCreationParameters.cpp:
2703         (WebKit::NetworkSessionCreationParameters::encode const):
2704         (WebKit::NetworkSessionCreationParameters::decode):
2705         * NetworkProcess/NetworkSessionCreationParameters.h:
2706         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2707         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
2708         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
2709         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2710         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2711         (WebKit::NetworkSessionCocoa::session):
2712         (WebKit::NetworkSessionCocoa::isolatedSession):
2713         (WebKit::NetworkSessionCocoa::hasIsolatedSession const):
2714         (WebKit::NetworkSessionCocoa::clearIsolatedSessions):
2715         (WebKit::NetworkSessionCocoa::invalidateAndCancel):
2716         (WebKit::NetworkSessionCocoa::clearCredentials):
2717         * Shared/WebPreferences.yaml:
2718         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2719         (WKWebsiteDataStoreStatisticsHasIsolatedSession):
2720         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
2721         * UIProcess/Network/NetworkProcessProxy.cpp:
2722         (WebKit::NetworkProcessProxy::hasIsolatedSession):
2723         * UIProcess/Network/NetworkProcessProxy.h:
2724         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2725         (WebKit::WebsiteDataStore::parameters):
2726         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2727         (WebKit::WebsiteDataStore::hasLocalStorageForTesting const):
2728         (WebKit::WebsiteDataStore::hasIsolatedSessionForTesting const):
2729         * UIProcess/WebsiteData/WebsiteDataStore.h:
2730
2731 2019-08-13  Chris Dumez  <cdumez@apple.com>
2732
2733         Fix potential thread safety issue under WebResourceLoadStatisticsStore::hasHadUserInteraction()
2734         https://bugs.webkit.org/show_bug.cgi?id=200688
2735
2736         Reviewed by Alex Christensen.
2737
2738         Fix potential thread safety issue under WebResourceLoadStatisticsStore::hasHadUserInteraction().
2739         It passes a RegistrableDomain to another thread without isolated copying it.
2740
2741         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
2742         (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
2743
2744 2019-08-13  Chris Dumez  <cdumez@apple.com>
2745
2746         Fix potential thread safety issue under StorageManager::getSessionStorageOrigins()
2747         https://bugs.webkit.org/show_bug.cgi?id=200684
2748
2749         Reviewed by Geoffrey Garen.
2750
2751         Fix potential thread safety issue under StorageManager::getSessionStorageOrigins(). The origins are being
2752         passed from the background queue to the main thread without isolated copy.
2753
2754         * NetworkProcess/WebStorage/StorageManager.cpp:
2755         (WebKit::StorageManager::getSessionStorageOrigins):
2756
2757 2019-08-12  Jiewen Tan  <jiewen_tan@apple.com>
2758
2759         [WebAuthn] Make CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator
2760         https://bugs.webkit.org/show_bug.cgi?id=191527
2761         <rdar://problem/54237146>
2762
2763         Reviewed by Chris Dumez.
2764
2765         This patch makes an ABC CtapDriver, which services as an abstract interface for CtapAuthenticator/U2fAuthenticator to talk to
2766         the actual object that implement the specific CTAP protocol that mananges communications over different transports, for example,
2767         CtapHidDriver, such that CtapAuthenticator/U2fAuthenticator can be shared across different transports.
2768
2769         This patch also renames CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator correspondingly.
2770
2771         * Sources.txt:
2772         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
2773         (WebKit::HidService::continueAddDeviceAfterGetInfo):
2774         * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp.
2775         (WebKit::CtapAuthenticator::CtapAuthenticator):
2776         (WebKit::CtapAuthenticator::makeCredential):
2777         (WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived const):
2778         (WebKit::CtapAuthenticator::getAssertion):
2779         (WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived):
2780         (WebKit::CtapAuthenticator::tryDowngrade):
2781         * UIProcess/WebAuthentication/fido/CtapAuthenticator.h: Copied from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h.
2782         * UIProcess/WebAuthentication/fido/CtapDriver.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h.
2783         * UIProcess/WebAuthentication/fido/CtapHidDriver.h:
2784         (WebKit::CtapHidDriver::setProtocol):
2785         * UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp.
2786         (WebKit::U2fAuthenticator::U2fAuthenticator):
2787         (WebKit::U2fAuthenticator::makeCredential):
2788         (WebKit::U2fAuthenticator::checkExcludeList):
2789         (WebKit::U2fAuthenticator::issueRegisterCommand):
2790         (WebKit::U2fAuthenticator::getAssertion):
2791         (WebKit::U2fAuthenticator::issueSignCommand):
2792         (WebKit::U2fAuthenticator::issueNewCommand):
2793         (WebKit::U2fAuthenticator::issueCommand):
2794         (WebKit::U2fAuthenticator::responseReceived):
2795         (WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived):
2796         (WebKit::U2fAuthenticator::continueCheckOnlyCommandAfterResponseReceived):
2797         (WebKit::U2fAuthenticator::continueBogusCommandAfterResponseReceived):
2798         (WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived):
2799         * UIProcess/WebAuthentication/fido/U2fAuthenticator.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h.
2800         * WebKit.xcodeproj/project.pbxproj:
2801
2802 2019-08-13  Chris Dumez  <cdumez@apple.com>
2803
2804         Crash under IPC::Connection::markCurrentlyDispatchedMessageAsInvalid()
2805         https://bugs.webkit.org/show_bug.cgi?id=200674
2806         <rdar://problem/50692748>
2807
2808         Reviewed by Geoff Garen.
2809
2810         When the client terminates a provisional process (e.g. via the [WKWebView _killWebContentProcessAndResetState]
2811         SPI), the WebProcessProxy would notify its associated WebPageProxy objects that it had terminated but would fail
2812         to notify its associated ProvisionalPageProxy objects. As a result, those objects would not get destroyed and
2813         would still think that they were in the middle of a provisional load the next time a load started. This inconsistent
2814         state would lead to crashes such as the one in the radar.
2815
2816         * UIProcess/ProvisionalPageProxy.cpp:
2817         (WebKit::ProvisionalPageProxy::cancel):
2818         * UIProcess/WebProcessProxy.cpp:
2819         (WebKit::WebProcessProxy::requestTermination):
2820
2821 2019-08-13  Youenn Fablet  <youenn@apple.com>
2822
2823         Blob registries should be keyed by session IDs
2824         https://bugs.webkit.org/show_bug.cgi?id=200567
2825         <rdar://problem/54120212>
2826
2827         Reviewed by Alex Christensen.
2828
2829         Move blob registry to NetworkSession so that it is partitioned by session ID.
2830         In case session ID is not given through IPC, use the connection as key to get the network session.
2831         This is used for blobSize.
2832
2833         * NetworkProcess/Downloads/DownloadManager.cpp:
2834         (WebKit::DownloadManager::startDownload):
2835         * NetworkProcess/Downloads/DownloadManager.h:
2836         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2837         * NetworkProcess/FileAPI/NetworkBlobRegistry.h: Removed.
2838         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2839         (WebKit::NetworkConnectionToWebProcess::didClose):
2840         (WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
2841         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
2842         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
2843         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
2844         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
2845         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
2846         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
2847         (WebKit::NetworkConnectionToWebProcess::blobSize):
2848         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
2849         (WebKit::NetworkConnectionToWebProcess::filesInBlob):
2850         * NetworkProcess/NetworkConnectionToWebProcess.h:
2851         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2852         * NetworkProcess/NetworkProcess.cpp:
2853         (WebKit::NetworkProcess::blobRegistry):
2854         * NetworkProcess/NetworkProcess.h:
2855         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
2856         (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
2857         * NetworkProcess/NetworkResourceLoader.cpp:
2858         (WebKit::NetworkResourceLoader::startNetworkLoad):
2859         * NetworkProcess/NetworkSession.h:
2860         (WebKit::NetworkSession::blobRegistry):
2861         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2862         (WebKit::NetworkDataTaskSoup::createRequest):
2863         * NetworkProcess/soup/NetworkSessionSoup.cpp:
2864         (WebKit::NetworkSessionSoup::createWebSocketTask):
2865         * Sources.txt:
2866         * WebKit.xcodeproj/project.pbxproj:
2867         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
2868         (WebKit::BlobRegistryProxy::registerFileBlobURL):
2869         (WebKit::BlobRegistryProxy::registerBlobURL):
2870         (WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
2871         (WebKit::BlobRegistryProxy::unregisterBlobURL):
2872         (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
2873         (WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
2874         * WebProcess/FileAPI/BlobRegistryProxy.h:
2875         * WebProcess/Network/NetworkProcessConnection.cpp:
2876         (WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
2877         * WebProcess/Network/NetworkProcessConnection.h:
2878
2879 2019-08-13  Youenn Fablet  <youenn@apple.com>
2880
2881         User Agent and SessionID should be given to NetworkRTCProvider to set up the correct proxy information
2882         https://bugs.webkit.org/show_bug.cgi?id=200583
2883
2884         Reviewed by Eric Carlson.
2885
2886         Pass session id and user agent whenever creating a TCP client socket.
2887         Use this information to get the proxy information from NetworkSession and pass it to libwebrtc socket creation.
2888
2889         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
2890         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
2891         (WebKit::NetworkRTCProvider::proxyInfoFromSession):
2892         (WebKit::NetworkRTCProvider::createClientTCPSocket):
2893         * NetworkProcess/webrtc/NetworkRTCProvider.h:
2894         * NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
2895         * WebKit.xcodeproj/project.pbxproj:
2896         * NetworkProcess/webrtc/NetworkRTCProvider.mm: Added.
2897         (WebKit::NetworkRTCProvider::proxyInfoFromSession):
2898         * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
2899         (WebKit::LibWebRTCProvider::createPeerConnection):
2900         (WebKit::LibWebRTCProvider::createSocketFactory):
2901         * WebProcess/Network/webrtc/LibWebRTCProvider.h:
2902         * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
2903         (WebKit::LibWebRTCSocketFactory::createServerTcpSocket):
2904         (WebKit::LibWebRTCSocketFactory::createUdpSocket):
2905         (WebKit::LibWebRTCSocketFactory::createClientTcpSocket):
2906         (WebKit::LibWebRTCSocketFactory::createAsyncResolver):
2907         * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
2908
2909 2019-08-12  Chris Dumez  <cdumez@apple.com>
2910
2911         Fix bad RELEASE_LOG_ERROR under ProvisionalPageProxy::ProvisionalPageProxy()
2912         https://bugs.webkit.org/show_bug.cgi?id=200646
2913
2914         Reviewed by Alex Christensen.
2915
2916         Fix bad RELEASE_LOG_ERROR under ProvisionalPageProxy::ProvisionalPageProxy(). Should be a
2917         simple RELEASE_LOG() as this is not an error.
2918
2919         * UIProcess/ProvisionalPageProxy.cpp:
2920         (WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
2921
2922 2019-08-12  Sam Weinig  <weinig@apple.com>
2923
2924         Replace multiparameter overloads of append() in StringBuilder as a first step toward standardizinging on the flexibleAppend() implementation
2925         https://bugs.webkit.org/show_bug.cgi?id=200614
2926
2927         Reviewed by Darin Adler.
2928
2929         Renames StringBuilder::append(const LChar*, unsigned), StringBuilder::append(const UChar*, unsigned) and 
2930         StringBuilder::append(const char*, unsigned) to StringBuilder::appendCharacters(...).
2931         
2932         Renames StringBuilder::append(const String& string, unsigned offset, unsigned length) to 
2933         StringBuilder::appendSubstring(...).
2934
2935         * Shared/mac/AuxiliaryProcessMac.mm:
2936         (WebKit::setAndSerializeSandboxParameters):
2937         * UIProcess/WebProcessPool.cpp:
2938         (WebKit::WebProcessPool::didReceiveInvalidMessage):
2939         Update for renames.
2940
2941 2019-08-12  Dean Jackson  <dino@apple.com>
2942
2943         Contextual menu Hide and Show Link Previews should not have a symbol
2944         https://bugs.webkit.org/show_bug.cgi?id=200645
2945         <rdar://problem/54129647>
2946
2947         Reviewed by Wenson Hsieh.
2948
2949         Don't use an image on the UIMenuItem.
2950
2951         * UIProcess/API/Cocoa/_WKElementAction.mm:
2952         (+[_WKElementAction imageForElementActionType:]): Return nil for Show/Hide Link Previews.
2953
2954 2019-08-12  Chris Dumez  <cdumez@apple.com>
2955
2956         Unreviewed, add missing WTF::initializeMainThread() call to fix some crashes on the bots after r248533.
2957
2958         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
2959         (WebKit::XPCServiceMain):
2960
2961 2019-08-12  Megan Gardner  <megan_gardner@apple.com>
2962
2963         Fix Crash in Mail Search
2964         https://bugs.webkit.org/show_bug.cgi?id=200589
2965         <rdar://problem/53666720>
2966
2967         Reviewed by Tim Horton.
2968
2969         If we search in Mail backwards first, for AppKit reasons 
2970         we get a -1 for the index of the found item.
2971         Do not try and insert data in this case.
2972
2973         * UIProcess/mac/WKTextFinderClient.mm:
2974
2975 2019-08-12  Adrian Perez de Castro  <aperez@igalia.com>
2976
2977         [WPE][GTK] Fix building without unified sources
2978         https://bugs.webkit.org/show_bug.cgi?id=200641
2979
2980         Reviewed by Žan Doberšek.
2981
2982         * UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp: Add missing inclusions for headers
2983         WebCore/GtkUtilities.h (for convertWidgetPointToScreenPoint), WebCore/IntPoint.h, and
2984         WebPageProxy.h (the two latter to avoid usage of undefined types).
2985         (WebKit::WebDataListSuggestionsDropdownGtk::show): Add namespace prefix to use
2986         WebCore::IntPoint.
2987
2988 2019-08-12  Sihui Liu  <sihui_liu@apple.com>
2989
2990         Clear m_sessionStorageNamespaces on the background thread
2991         https://bugs.webkit.org/show_bug.cgi?id=200631
2992         <rdar://problem/54149638>
2993
2994         Reviewed by Chris Dumez.
2995
2996         Network process receives messages about web page state from web process and destroys sessionStorageNamespace if 
2997         needed. It also receives messages about session state from UI process and destroys StorageManager, which owns 
2998         SessionStorageNamespaces, if needed. Because of the race in receiving the messages from different processes, 
2999         network process may decide to destroy StorageManager before destroying all SessionStorageNamespaces, and 
3000         SessionStorageNamespaces are destroyed with StorageManager on the main thread.
3001
3002         * NetworkProcess/WebStorage/StorageManager.cpp:
3003         (WebKit::StorageManager::waitUntilTasksFinished):
3004
3005 2019-08-12  Sihui Liu  <sihui_liu@apple.com>
3006
3007         Remove an assertion in ~StorageArea()
3008         https://bugs.webkit.org/show_bug.cgi?id=200630
3009         <rdar://problem/54097722>
3010
3011         Reviewed by Chris Dumez.
3012
3013         In r247370, we clear the LocalStorageNamespace before the destructor of LocalStorageNamespace is invoked, to 
3014         make sure StorageArea gets destroyed on the background thread. 
3015         StorageArea can get destroyed before LocalStorageNamespace, so the assertion in ~StorageArea() is not true any 
3016         more.
3017
3018         * NetworkProcess/WebStorage/StorageArea.cpp:
3019         (WebKit::StorageArea::~StorageArea):
3020
3021 2019-08-12  Wenson Hsieh  <wenson_hsieh@apple.com>
3022
3023         [iPadOS] Web pages sometimes load at half width in Safari
3024         https://bugs.webkit.org/show_bug.cgi?id=200624
3025         <rdar://problem/52694257>
3026
3027         Reviewed by Simon Fraser.
3028
3029         Whenever WKWebView's size changes, it normally notifies the web content process by calling into WebPageProxy::
3030         setViewportConfigurationViewLayoutSize, which remembers this view layout size using a member variable,
3031         m_viewportConfigurationViewLayoutSize. Later, m_viewportConfigurationViewLayoutSize is consulted as a part of
3032         constructing the creation parameters used to set up a new page.
3033
3034         However, during animated resize, WKWebView avoids these calls to setViewportConfigurationViewLayoutSize via the
3035         dynamic viewport update mode check in -[WKWebView _frameOrBoundsChanged]. Instead, the new view layout size is
3036         pushed to the web process by calling WebPageProxy::dynamicViewportSizeUpdate.
3037
3038         Since dynamicViewportSizeUpdate doesn't update m_viewportConfigurationViewLayoutSize, the next
3039         WebPageCreationParameters that are created with this WebPageProxy (e.g. after a process swap, or after
3040         reloading, if the process was terminated) will use the size of the WKWebView prior to the most recent animated
3041         resize.
3042
3043         To fix the bug, we simply make sure that m_viewportConfigurationViewLayoutSize is updated in the dynamic
3044         viewport size update (i.e. animated resize) case as well.
3045
3046         Test: WebKit.CreateWebPageAfterAnimatedResize
3047
3048         * UIProcess/ios/WebPageProxyIOS.mm:
3049         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3050
3051 2019-08-12  Chris Dumez  <cdumez@apple.com>
3052
3053         Crash under NetworkResourceLoader::start()
3054         https://bugs.webkit.org/show_bug.cgi?id=200628
3055
3056         Reviewed by Youenn Fablet.
3057
3058         Make sure the NetworkResourceLoader is still alive when the lambda passed to NetworkLoadChecker::check()
3059         gets executed.
3060
3061         * NetworkProcess/NetworkResourceLoader.cpp:
3062         (WebKit::NetworkResourceLoader::start):
3063         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
3064         * NetworkProcess/NetworkResourceLoader.h:
3065
3066 2019-08-12  Jonathan Bedard  <jbedard@apple.com>
3067
3068         Tapping buttons in Data Detectors lookup previews doesn't work (Follow-up fix)
3069         https://bugs.webkit.org/show_bug.cgi?id=200579
3070         <rdar://problem/54056519>
3071
3072         Reviewed by Megan Gardner.
3073
3074         * Platform/spi/ios/UIKitSPI.h: Add _UIContextMenuStyle SPI.
3075
3076 2019-08-12  Chris Dumez  <cdumez@apple.com>
3077
3078         Add threading assertions to RefCounted
3079         https://bugs.webkit.org/show_bug.cgi?id=200507
3080
3081         Reviewed by Ryosuke Niwa.
3082
3083         Enable new RefCounted threading assertions for WebKit2
3084         (UIProcess + auxiliary processes).
3085
3086         * Shared/AuxiliaryProcess.cpp:
3087         (WebKit::AuxiliaryProcess::initialize):
3088         * Shared/Cocoa/WebKit2InitializeCocoa.mm:
3089         (WebKit::runInitializationCode):
3090         * Shared/WebKit2Initialize.cpp:
3091         (WebKit::InitializeWebKit2):
3092
3093 2019-08-12  Chris Dumez  <cdumez@apple.com>
3094
3095         Unreviewed, rolling out r248525.
3096
3097         Revert new threading assertions while I work on fixing the
3098         issues they exposed
3099
3100         Reverted changeset:
3101
3102         "Add threading assertions to RefCounted"
3103         https://bugs.webkit.org/show_bug.cgi?id=200507
3104         https://trac.webkit.org/changeset/248525
3105
3106 2019-08-12  Youenn Fablet  <youenn@apple.com>
3107
3108         Remove IDB-specific quota
3109         https://bugs.webkit.org/show_bug.cgi?id=196545
3110
3111         Reviewed by Alex Christensen.
3112
3113         * NetworkProcess/NetworkProcess.cpp:
3114         (WebKit::NetworkProcess::createIDBServer):
3115         (WebKit::NetworkProcess::addIndexedDatabaseSession):
3116         (WebKit::NetworkProcess::setIDBPerOriginQuota): Deleted.
3117         * NetworkProcess/NetworkProcess.h:
3118         * NetworkProcess/NetworkProcess.messages.in:
3119         * UIProcess/API/C/WKContext.cpp:
3120         (WKContextSetIDBPerOriginQuota): Deleted.
3121         * UIProcess/API/C/WKContextPrivate.h:
3122         * UIProcess/WebProcessPool.cpp:
3123         (WebKit::WebProcessPool::setIDBPerOriginQuota): Deleted.
3124         * UIProcess/WebProcessPool.h:
3125
3126 2019-08-11  Chris Dumez  <cdumez@apple.com>
3127
3128         Add threading assertions to RefCounted
3129         https://bugs.webkit.org/show_bug.cgi?id=200507
3130
3131         Reviewed by Ryosuke Niwa.
3132
3133         Enable new RefCounted threading assertions for WebKit2
3134         (UIProcess + auxiliary processes).
3135
3136         * Shared/AuxiliaryProcess.cpp:
3137         (WebKit::AuxiliaryProcess::initialize):
3138         * Shared/Cocoa/WebKit2InitializeCocoa.mm:
3139         (WebKit::runInitializationCode):
3140         * Shared/WebKit2Initialize.cpp:
3141         (WebKit::InitializeWebKit2):
3142
3143 2019-08-11  Wenson Hsieh  <wenson_hsieh@apple.com>
3144
3145         WebPage and ViewportConfiguration have differing notions of viewLayoutSize
3146         https://bugs.webkit.org/show_bug.cgi?id=200619
3147
3148         Reviewed by Tim Horton.
3149
3150         The notion of a "view layout size" exists on WebPage and WebPageProxy for the purpose of specifying an intrinsic
3151         content size for the entire web view on macOS. However, it also exists in ViewportConfiguration (as
3152         viewLayoutSize) and WebPageProxy (under the name m_viewportConfigurationViewLayoutSize) for the purposes of
3153         specifying the minimum layout size of the page's viewport.
3154
3155         This is especially confusing in WebPageProxy, which has both m_viewportConfigurationViewLayoutSize and
3156         m_viewLayoutSize. To remedy this, rename "*viewLayoutSize" for the purposes of specifying an intrinsic web view
3157         size to "*minimumSizeForAutoLayout" instead, which is consistent with the corresponding SPI property name on
3158         WKView.
3159
3160         No change in behavior.
3161
3162         * Shared/WebPageCreationParameters.cpp:
3163         (WebKit::WebPageCreationParameters::encode const):
3164         (WebKit::WebPageCreationParameters::decode):
3165         * Shared/WebPageCreationParameters.h:
3166         * UIProcess/API/Cocoa/WKWebView.mm:
3167         (-[WKWebView _minimumLayoutWidth]):
3168         (-[WKWebView _setMinimumLayoutWidth:]):
3169         * UIProcess/Cocoa/WebViewImpl.mm:
3170         (WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
3171         (WebKit::WebViewImpl::minimumSizeForAutoLayout const):
3172         (WebKit::WebViewImpl::setIntrinsicContentSize):
3173         * UIProcess/DrawingAreaProxy.h:
3174         (WebKit::DrawingAreaProxy::minimumSizeForAutoLayoutDidChange):
3175         (WebKit::DrawingAreaProxy::viewLayoutSizeDidChange): Deleted.
3176         * UIProcess/WebPageProxy.cpp:
3177         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
3178         * UIProcess/WebPageProxy.h:
3179         (WebKit::WebPageProxy::minimumSizeForAutoLayout const):
3180         (WebKit::WebPageProxy::viewLayoutSize const): Deleted.
3181         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
3182         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
3183         (WebKit::TiledCoreAnimationDrawingAreaProxy::minimumSizeForAutoLayoutDidChange):
3184         (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
3185         (WebKit::TiledCoreAnimationDrawingAreaProxy::willSendUpdateGeometry):
3186         (WebKit::TiledCoreAnimationDrawingAreaProxy::viewLayoutSizeDidChange): Deleted.
3187         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3188         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3189         * WebProcess/WebPage/WebPage.cpp:
3190         (WebKit::m_textAutoSizingAdjustmentTimer):
3191         (WebKit::WebPage::reinitializeWebPage):
3192         (WebKit::WebPage::setMinimumSizeForAutoLayout):
3193         (WebKit::WebPage::updateIntrinsicContentSizeIfNeeded):
3194         (WebKit::WebPage::setViewLayoutSize): Deleted.
3195         * WebProcess/WebPage/WebPage.h:
3196         (WebKit::WebPage::minimumSizeForAutoLayout const):
3197         (WebKit::WebPage::viewLayoutSize const): Deleted.
3198         * WebProcess/WebPage/WebPage.messages.in:
3199         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3200         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
3201
3202 2019-08-10  Alex Christensen  <achristensen@webkit.org>
3203
3204         Disable ContentChangeObserver TouchEvent adjustment on youtube.com on iOS in mobile browsing mode
3205         https://bugs.webkit.org/show_bug.cgi?id=200609
3206         <rdar://problem/54015403>
3207
3208         Reviewed by Maciej Stachowiak.
3209
3210         * Shared/WebsitePoliciesData.cpp:
3211         (WebKit::WebsitePoliciesData::encode const):
3212         (WebKit::WebsitePoliciesData::decode):
3213         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
3214         * Shared/WebsitePoliciesData.h:
3215         * UIProcess/API/APIWebsitePolicies.cpp:
3216         (API::WebsitePolicies::copy const):
3217         (API::WebsitePolicies::data):
3218         * UIProcess/API/APIWebsitePolicies.h:
3219         * UIProcess/ios/WebPageProxyIOS.mm:
3220         (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
3221
3222 2019-08-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
3223
3224         [iOS] Add a quirk for gmail.com messages on iPhone iOS13
3225         https://bugs.webkit.org/show_bug.cgi?id=200605
3226
3227         Reviewed by Maciej Stachowiak.
3228
3229         Use WebPage::platformUserAgent() to add the gmail.com quirk.
3230
3231         * UIProcess/ios/WebPageProxyIOS.mm:
3232         (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
3233         * WebProcess/WebPage/ios/WebPageIOS.mm:
3234         (WebKit::WebPage::platformUserAgent const):
3235
3236 2019-08-10  Tim Horton  <timothy_horton@apple.com>
3237
3238         Remove some more unused 32-bit code
3239         https://bugs.webkit.org/show_bug.cgi?id=200607
3240
3241         Reviewed by Alexey Proskuryakov.
3242
3243         * Modules/OSX.modulemap:
3244
3245 2019-08-09  Wenson Hsieh  <wenson_hsieh@apple.com>
3246
3247         [iOS 13] Google Docs/Slides/Sheets: paste often doesn't work and sometimes produces an error
3248         https://bugs.webkit.org/show_bug.cgi?id=200591
3249         <rdar://problem/54102238>
3250
3251         Reviewed by Ryosuke Niwa and Tim Horton.
3252
3253         Adopts UIKit SPI to avoid incrementing the general pasteboard's change count whenever an editable element is
3254         focused. This is due to how, in iOS 13, UIKit temporarily writes an image to the pasteboard when showing the
3255         keyboard, to determine whether or not to show the Memojis in the input view.
3256
3257         This causes UIPasteboard's changeCount to increment twice due to adding and then removing the image, which means
3258         that the changeCount sanity checks in the web process will race against the pasteboard gaining and then losing
3259         this temporary image.
3260
3261         Instead, the new -supportsImagePaste SPI may be used to short-circuit this step, and avoid updating the
3262         changeCount when UIKeyboardImpl's delegate changes.
3263
3264         * UIProcess/ios/WKContentViewInteraction.mm:
3265         (-[WKContentView supportsImagePaste]):
3266
3267 2019-08-09  Alex Christensen  <achristensen@webkit.org>
3268
3269         Remove unused Connection::sendWithReply
3270         https://bugs.webkit.org/show_bug.cgi?id=200590
3271
3272         Reviewed by Chris Dumez.
3273
3274         This was attempted in r245151, but rolled out in r245164 because my SecItemShim code didn't work well on non-main threads.
3275         Chris found a better solution for SecItemShim in r248014, making this unused code.  Let's remove it.
3276
3277         * Platform/IPC/Connection.cpp:
3278         (IPC::Connection::invalidate):
3279         (IPC::Connection::processIncomingSyncReply):
3280         (IPC::Connection::connectionDidClose):
3281         (IPC::Connection::sendMessageWithReply): Deleted.
3282         * Platform/IPC/Connection.h:
3283         (IPC::Connection::send):
3284         (IPC::Connection::sendWithReply): Deleted.
3285
3286 2019-08-09  Simon Fraser  <simon.fraser@apple.com>
3287
3288         [iOS WK2] Remove context menu hints on navigation
3289         https://bugs.webkit.org/show_bug.cgi?id=200588
3290         rdar://problem/54061796
3291
3292         Reviewed by Tim Horton.
3293
3294         Make sure the context menu hint doesn't linger across navigations by hosting it in its
3295         own container view (shared with drag previews), and hiding that view on navigation (unparenting
3296         may have bad consequences). We remove the view when the animation ends.
3297
3298         * UIProcess/ios/WKContentViewInteraction.h:
3299         * UIProcess/ios/WKContentViewInteraction.mm:
3300         (-[WKContentView _didCommitLoadForMainFrame]):
3301         (-[WKContentView containerViewForTargetedPreviews]):
3302         (-[WKContentView _hideContextMenu]):
3303         (-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):
3304
3305 2019-08-09  Alex Christensen  <achristensen@webkit.org>
3306
3307         Disable CSSOM View Scrolling API for IMDb iOS app
3308         https://bugs.webkit.org/show_bug.cgi?id=200586
3309         <rdar://problem/53645833>
3310
3311         Reviewed by Simon Fraser.
3312
3313         Change the CSSOMViewScrollingAPIEnabled default value to be off for the IMDb app's WKWebViews.
3314         I manually verified this is effective in those WKWebViews but no other WKWebViews and that it fixes the radar.
3315
3316         * Shared/WebPreferences.yaml:
3317         * Shared/WebPreferencesDefaultValues.cpp:
3318         (WebKit::defaultCSSOMViewScrollingAPIEnabled):
3319         * Shared/WebPreferencesDefaultValues.h:
3320
3321 2019-08-09  Tim Horton  <timothy_horton@apple.com>
3322
3323         Tapping buttons in Data Detectors lookup previews doesn't work
3324         https://bugs.webkit.org/show_bug.cgi?id=200579
3325         <rdar://problem/54056519>
3326
3327         Reviewed by Megan Gardner.
3328
3329         * Platform/spi/ios/UIKitSPI.h:
3330         * UIProcess/ios/WKContentViewInteraction.mm:
3331         (-[WKContentView _contextMenuInteraction:styleForMenuWithConfiguration:]):
3332         If a Data Detectors context menu wants the action menu style, provide it.
3333
3334         (-[WKContentView contextMenuInteraction:willPerformPreviewActionForMenuWithConfiguration:animator:]):
3335         If a Data Detectors context menu provides a view controller to present
3336         on context menu commit, present it. We present on top of the same view
3337         controller that is currently presenting the context menu, but modally
3338         instead of inside the context menu.
3339
3340         If a Data Detectors context menu instead provides a URL to launch on
3341         context menu commit, call openURL.
3342
3343         In both cases, change the commit style to pop, since we're committing
3344         instead of dismissing.
3345
3346 2019-08-08  Dean Jackson  <dino@apple.com>
3347
3348         REGRESSION (52279987): Most of the WKUIDelegate contextMenu delegate methods are not being called
3349         https://bugs.webkit.org/show_bug.cgi?id=200557
3350         <rdar://problem/53717962>
3351
3352         Reviewed by Wenson Hsieh.
3353
3354         UIKit changed the name of delegates recently. We ignored the warning because
3355         it was still calling the old methods. However, it will only do so for applications
3356         authored by Apple, breaking 3rd parties.
3357
3358         The change here is just adopting the new methods in place of the old ones.
3359         It does not change the API that WebKit vends (they still use the older names).
3360
3361         * UIProcess/ios/WKContentViewInteraction.mm:
3362         (-[WKContentView contextMenuInteraction:willDisplayMenuForConfiguration:animator:]):
3363         (-[WKContentView contextMenuInteraction:willPerformPreviewActionForMenuWithConfiguration:animator:]):
3364         (-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):
3365         (-[WKContentView contextMenuInteractionWillPresent:]): Deleted.
3366         (-[WKContentView contextMenuInteraction:willCommitWithAnimator:]): Deleted.
3367         (-[WKContentView contextMenuInteractionDidEnd:]): Deleted.
3368
3369 2019-08-08  Simon Fraser  <simon.fraser@apple.com>
3370
3371         [iOS WK2] Hide previews when an inner overflow or frame scrollview scrolls
3372         https://bugs.webkit.org/show_bug.cgi?id=200552
3373         rdar://problem/54086338
3374
3375         Reviewed by Wenson Hsieh.
3376
3377         Give UITargetedPreview the UIScrollView that the target element is inside of,
3378         so it can clean up if the user starts to scroll that view.
3379
3380         * Platform/spi/ios/UIKitSPI.h:
3381         * UIProcess/ios/WKContentViewInteraction.mm:
3382         (-[WKContentView _createTargetedPreviewIfPossible]):
3383
3384 2019-08-08  Chris Dumez  <cdumez@apple.com>
3385
3386         Add threading assertions to WebStorage code
3387         https://bugs.webkit.org/show_bug.cgi?id=200550
3388
3389         Reviewed by Geoffrey Garen.
3390
3391         Add threading assertions to WebStorage code for extra safety.
3392
3393         * NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
3394         (WebKit::LocalStorageNamespace::LocalStorageNamespace):
3395         (WebKit::LocalStorageNamespace::~LocalStorageNamespace):
3396         (WebKit::LocalStorageNamespace::getOrCreateStorageArea):
3397         (WebKit::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
3398         (WebKit::LocalStorageNamespace::clearAllStorageAreas):
3399         (WebKit::LocalStorageNamespace::ephemeralOrigins const):
3400         (WebKit::LocalStorageNamespace::cloneTo):
3401         * NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
3402         (WebKit::SessionStorageNamespace::SessionStorageNamespace):
3403         (WebKit::SessionStorageNamespace::~SessionStorageNamespace):
3404         (WebKit::SessionStorageNamespace::addAllowedConnection):
3405         (WebKit::SessionStorageNamespace::removeAllowedConnection):
3406         (WebKit::SessionStorageNamespace::getOrCreateStorageArea):
3407         (WebKit::SessionStorageNamespace::cloneTo):
3408         (WebKit::SessionStorageNamespace::origins const):
3409         (WebKit::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
3410         (WebKit::SessionStorageNamespace::clearAllStorageAreas):
3411         * NetworkProcess/WebStorage/StorageArea.cpp:
3412         (WebKit::StorageArea::StorageArea):
3413         (WebKit::StorageArea::~StorageArea):
3414         (WebKit::StorageArea::addListener):
3415         (WebKit::StorageArea::removeListener):
3416         (WebKit::StorageArea::hasListener const):
3417         (WebKit::StorageArea::clone const):
3418         (WebKit::StorageArea::setItem):
3419         (WebKit::StorageArea::setItems):
3420         (WebKit::StorageArea::removeItem):
3421         (WebKit::StorageArea::clear):
3422         (WebKit::StorageArea::items const):
3423         (WebKit::StorageArea::openDatabaseAndImportItemsIfNeeded const):
3424         (WebKit::StorageArea::dispatchEvents const):
3425         * NetworkProcess/WebStorage/StorageManager.cpp:
3426         (WebKit::StorageManager::createSessionStorageNamespace):
3427         (WebKit::StorageManager::destroySessionStorageNamespace):
3428         (WebKit::StorageManager::addAllowedSessionStorageNamespaceConnection):
3429         (WebKit::StorageManager::removeAllowedSessionStorageNamespaceConnection):
3430         (WebKit::StorageManager::cloneSessionStorageNamespace):
3431         (WebKit::StorageManager::processDidCloseConnection):
3432         (WebKit::StorageManager::getSessionStorageOrigins):
3433         (WebKit::StorageManager::deleteSessionStorageOrigins):
3434         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
3435         (WebKit::StorageManager::getLocalStorageOrigins):
3436         (WebKit::StorageManager::getLocalStorageOriginDetails):
3437         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
3438         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
3439         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
3440         (WebKit::StorageManager::waitUntilTasksFinished):
3441         (WebKit::StorageManager::suspend):
3442         (WebKit::StorageManager::resume):
3443         (WebKit::StorageManager::findStorageArea const):
3444         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
3445         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
3446         * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp:
3447         (WebKit::TransientLocalStorageNamespace::TransientLocalStorageNamespace):
3448         (WebKit::TransientLocalStorageNamespace::~TransientLocalStorageNamespace):
3449         (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea):
3450         (WebKit::TransientLocalStorageNamespace::origins const):
3451         (WebKit::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
3452         (WebKit::TransientLocalStorageNamespace::clearAllStorageAreas):
3453
3454 2019-08-08  Brent Fulgham  <bfulgham@apple.com>
3455
3456         [FTW] Get WebKit, WebKit2, and MiniBrowser building and executing
3457         https://bugs.webkit.org/show_bug.cgi?id=200539
3458         <rdar://problem/54082550>
3459
3460         Reviewed by Dean Jackson.
3461
3462         * PlatformFTW.cmake: Added.
3463         * Shared/ShareableBitmap.h:
3464         * Shared/win/ShareableBitmapDirect2D.cpp: Added.
3465         * UIProcess/BackingStore.cpp:
3466         * UIProcess/BackingStore.h:
3467         (WebKit::BackingStore::renderTarget):
3468         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
3469         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
3470         * UIProcess/win/BackingStoreDirect2D.cpp: Added.
3471         * UIProcess/win/WebInspectorProxyWin.cpp:
3472         (WebKit::WebInspectorProxy::inspectorPageURL):
3473         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3474         (WebKit::WebInspectorProxy::inspectorBaseURL):
3475         * UIProcess/win/WebView.cpp:
3476         (WebKit::WebView::paint):
3477         * UIProcess/win/WebView.h:
3478         * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
3479         (WebKit::DrawingAreaCoordinatedGraphics::display):
3480         * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
3481         * WebProcess/WebPage/win/WebInspectorUIWin.cpp:
3482         (WebKit::WebInspectorUI::localizedStringsURL):
3483         (WebKit::RemoteWebInspectorUI::localizedStringsURL):
3484         * WebProcess/win/WebProcessMainWin.cpp:
3485         (WebKit::WebProcessMainWin):
3486
3487 2019-08-08  Per Arne Vollan  <pvollan@apple.com>
3488
3489         [Mac] Use the PID of the WebContent process when issuing local file read sandbox extensions
3490         https://bugs.webkit.org/show_bug.cgi?id=200543
3491
3492         Reviewed by Brent Fulgham.
3493
3494         Adopt SPI to issue a process-specific sandbox extension for local file read, passing it the process
3495         identifier of the WebContent process.
3496
3497         * Shared/Cocoa/SandboxExtensionCocoa.mm:
3498         (WebKit::SandboxExtensionImpl::sandboxExtensionForType):
3499         (WebKit::SandboxExtension::createHandleForReadByPid):
3500         * Shared/SandboxExtension.h:
3501         * UIProcess/WebPageProxy.cpp:
3502         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
3503
3504 2019-08-08  Said Abou-Hallawa  <sabouhallawa@apple.com>
3505
3506         [iOS] Position image information should respect the image orientation
3507         https://bugs.webkit.org/show_bug.cgi?id=200487
3508
3509         Reviewed by Simon Fraser.
3510
3511         imagePositionInformation() should respect the image orientation when
3512         drawing an Image to a ShareableBitmap context.
3513
3514         boundsPositionInformation() already takes care of the image orientation
3515         because it gets RenderImage::enclosingBoundingBox().
3516
3517         * WebProcess/WebPage/ios/WebPageIOS.mm:
3518         (WebKit::imagePositionInformation):
3519
3520 2019-08-08  Timothy Hatcher  <timothy@apple.com>
3521
3522         Set WKWebView opaque based on drawsBackground in PageConfiguration.
3523         https://bugs.webkit.org/show_bug.cgi?id=200528
3524
3525         Reviewed by Tim Horton.
3526
3527         * UIProcess/API/Cocoa/WKWebView.mm:
3528         (-[WKWebView _initializeWithConfiguration:]): Set self.opaque = NO when !self.opaque || !pageConfiguration->drawsBackground().
3529         It is almost impossible to have !self.opaque be NO at this point, since we are still inside initWithFrame:. A subclass could
3530         override opaque and return NO, but checking pageConfiguration's drawsBackground is a good alternative.
3531         * WebProcess/WebPage/WebPage.h: Remove unused m_drawsBackground member.
3532
3533 2019-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
3534
3535         [iOS 13] Taps that interrupt momentum scrolling are recognized as clicks
3536         https://bugs.webkit.org/show_bug.cgi?id=200516
3537         <rdar://problem/53889373>
3538
3539         Reviewed by Tim Horton.
3540
3541         After <https://trac.webkit.org/r247656>, the -tracksImmediatelyWhileDecelerating property of WKScrollView and
3542         WKChildScrollView is set to NO. This means that if a user interacts with the page while the scroll view is
3543         decelerating (e.g. after momentum scrolling), the pan gesture recognizer will not be immediately recognized.
3544         This gives other gesture recognizers, such as the synthetic click (single tap) gesture a chance to instead
3545         recognize first. In this particular bug, this causes taps on the web view that are intended to only stop
3546         momentum scrolling to instead activate clickable elements beneath the touch, such as links and buttons.
3547
3548         To mitigate this, we add some logic to prevent the click gesture recognizer from firing in the case where the
3549         tap also causes the scroll view to decelerate. This heuristic is similar to the one introduced in r219310, which
3550         has the same purpose of hiding gestures that stop momentum scrolling from the page, and also consults
3551         -[UIScrollView _isInterruptingDeceleration].
3552
3553         Tests:  fast/scrolling/ios/click-events-during-momentum-scroll-in-main-frame.html
3554                 fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html
3555                 fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow.html
3556
3557         * UIProcess/ios/WKContentViewInteraction.mm:
3558         (-[WKContentView gestureRecognizerShouldBegin:]):
3559
3560         Return NO in the case of the single tap gesture if the UIScrollView most recently touched by the single tap
3561         gesture (or one of its enclosing scroll views, up to the main WKScrollView) is being interrupted while
3562         decelerating.
3563
3564         * UIProcess/ios/WKSyntheticTapGestureRecognizer.h:
3565         * UIProcess/ios/WKSyntheticTapGestureRecognizer.mm:
3566         (-[WKSyntheticTapGestureRecognizer reset]):
3567         (-[WKSyntheticTapGestureRecognizer touchesBegan:withEvent:]):
3568
3569         Teach WKSyntheticTapGestureRecognizer to keep track of the last WKScrollView that was touched, for later use in
3570         -gestureRecognizerShouldBegin:. To do this, we keep a weak reference to the first UIScrollView we find in the
3571         set of touches.
3572
3573         (-[WKSyntheticTapGestureRecognizer lastTouchedScrollView]):
3574
3575 2019-08-08  Dean Jackson  <dino@apple.com>
3576
3577         Use "safari" glyph for "Show Link Previews" contextual menu
3578         https://bugs.webkit.org/show_bug.cgi?id=200544
3579         <rdar://problem/54087842>
3580
3581         Reviewed by Tim Horton.
3582
3583         Use the system image for the compass.
3584
3585         * UIProcess/API/Cocoa/_WKElementAction.mm:
3586         (+[_WKElementAction imageForElementActionType:]):
3587
3588 2019-08-08  Chris Dumez  <cdumez@apple.com>
3589
3590         Move classes declared inside StorageManager.cpp into their own headers
3591         https://bugs.webkit.org/show_bug.cgi?id=200527
3592
3593         Reviewed by Alex Christensen.
3594
3595         Move classes declared inside StorageManager.cpp into their own headers
3596         for clarity. StorageManager.cpp was getting really big.
3597
3598         * NetworkProcess/WebStorage/LocalStorageNamespace.cpp: Added.
3599         (WebKit::LocalStorageNamespace::LocalStorageNamespace):
3600         (WebKit::LocalStorageNamespace::~LocalStorageNamespace):
3601         (WebKit::LocalStorageNamespace::getOrCreateStorageArea):
3602         (WebKit::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
3603         (WebKit::LocalStorageNamespace::clearAllStorageAreas):
3604         (WebKit::LocalStorageNamespace::ephemeralOrigins const):
3605         (WebKit::LocalStorageNamespace::cloneTo):
3606         * NetworkProcess/WebStorage/LocalStorageNamespace.h: Added.
3607         (WebKit::LocalStorageNamespace::create):
3608         (WebKit::LocalStorageNamespace::storageManager const):
3609         * NetworkProcess/WebStorage/SessionStorageNamespace.cpp: Added.
3610         (WebKit::SessionStorageNamespace::SessionStorageNamespace):
3611         (WebKit::SessionStorageNamespace::~SessionStorageNamespace):
3612         (WebKit::SessionStorageNamespace::addAllowedConnection):
3613         (WebKit::SessionStorageNamespace::removeAllowedConnection):
3614         (WebKit::SessionStorageNamespace::getOrCreateStorageArea):
3615         (WebKit::SessionStorageNamespace::cloneTo):
3616         (WebKit::SessionStorageNamespace::origins const):
3617         (WebKit::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
3618         (WebKit::SessionStorageNamespace::clearAllStorageAreas):
3619         * NetworkProcess/WebStorage/SessionStorageNamespace.h: Added.
3620         (WebKit::SessionStorageNamespace::create):
3621         (WebKit::SessionStorageNamespace::isEmpty const):
3622         (WebKit::SessionStorageNamespace::allowedConnections const):
3623         * NetworkProcess/WebStorage/StorageArea.cpp: Added.
3624         (WebKit::StorageArea::StorageArea):
3625         (WebKit::StorageArea::~StorageArea):
3626         (WebKit::StorageArea::addListener):
3627         (WebKit::StorageArea::removeListener):
3628         (WebKit::StorageArea::hasListener const):
3629         (WebKit::StorageArea::clone const):
3630         (WebKit::StorageArea::setItem):
3631         (WebKit::StorageArea::setItems):
3632         (WebKit::StorageArea::removeItem):
3633         (WebKit::StorageArea::clear):
3634         (WebKit::StorageArea::items const):
3635         (WebKit::StorageArea::openDatabaseAndImportItemsIfNeeded const):
3636         (WebKit::StorageArea::dispatchEvents const):
3637         * NetworkProcess/WebStorage/StorageArea.h: Added.
3638         (WebKit::StorageArea::create):
3639         (WebKit::StorageArea::securityOrigin const):
3640         (WebKit::StorageArea::isEphemeral const):
3641         * NetworkProcess/WebStorage/StorageManager.cpp:
3642         (WebKit::StorageManager::createLocalStorageMap):
3643         (WebKit::StorageManager::findStorageArea const):
3644         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
3645         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
3646         * NetworkProcess/WebStorage/StorageManager.h:
3647         (WebKit::StorageManager::create):
3648         (WebKit::StorageManager::localStorageDatabaseTracker const):
3649         (WebKit::StorageManager::workQueue const):
3650         * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp: Added.
3651         (WebKit::TransientLocalStorageNamespace::TransientLocalStorageNamespace):
3652         (WebKit::TransientLocalStorageNamespace::~TransientLocalStorageNamespace):
3653         (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea):
3654         (WebKit::TransientLocalStorageNamespace::origins const):
3655         (WebKit::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
3656         (WebKit::TransientLocalStorageNamespace::clearAllStorageAreas):
3657         * NetworkProcess/WebStorage/TransientLocalStorageNamespace.h: Added.
3658         (WebKit::TransientLocalStorageNamespace::create):
3659         * NetworkProcess/cache/NetworkCache.cpp:
3660         (WebKit::NetworkCache::canRequestUseSpeculativeRevalidation):
3661         * Sources.txt:
3662         * WebKit.xcodeproj/project.pbxproj:
3663
3664 2019-08-08  Rob Buis  <rbuis@igalia.com>
3665
3666         Add runtime flag for lazy image loading
3667         https://bugs.webkit.org/show_bug.cgi?id=199794
3668
3669         Reviewed by Darin Adler.
3670
3671         Add LazyImageLoading preference.
3672
3673         * Shared/WebPreferences.yaml:
3674         * UIProcess/API/C/WKPreferences.cpp:
3675         (WKPreferencesSetLazyImageLoadingEnabled):
3676         (WKPreferencesGetLazyImageLoadingEnabled):
3677         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3678
3679 2019-08-07  Chris Dumez  <cdumez@apple.com>
3680
3681         Turn some ITP threading ASSERTs into RELEASE_ASSERTs
3682         https://bugs.webkit.org/show_bug.cgi?id=200521
3683
3684         Reviewed by Ryosuke Niwa.
3685
3686         Turn some ITP threading ASSERTs into RELEASE_ASSERTs to help catch more bugs.
3687
3688         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
3689         (WebKit::ResourceLoadStatisticsMemoryStore::ResourceLoadStatisticsMemoryStore):
3690         (WebKit::ResourceLoadStatisticsMemoryStore::isEmpty const):
3691         * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp:
3692         (WebKit::ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage):
3693         (WebKit::ResourceLoadStatisticsPersistentStorage::~ResourceLoadStatisticsPersistentStorage):
3694         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
3695         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
3696         (WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore):
3697         (WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore):
3698
3699 2019-08-07  Kate Cheney  <katherine_cheney@apple.com>
3700
3701         Adopt non-deprecated CGColorSpace API
3702         https://bugs.webkit.org/show_bug.cgi?id=184358
3703
3704         Reviewed by Darin Adler.
3705
3706         * Shared/mac/ColorSpaceData.mm:
3707         (WebKit::ColorSpaceData::decode):
3708
3709         We changed the deprecated CGColorSpaceCreateWithICCProfile function to 
3710         CGColorSpaceCreateWithICCData. 
3711
3712 2019-08-07  Alex Christensen  <achristensen@webkit.org>
3713
3714         Remove speculative workaround for upload crash
3715         https://bugs.webkit.org/show_bug.cgi?id=200514
3716
3717         Reviewed by Geoffrey Garen.
3718
3719         This workaround didn't help anyways, and the crash has been resolved.  Let's clean up.
3720
3721         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3722         (-[WKNetworkSessionDelegate URLSession:task:needNewBodyStream:]):
3723
3724 2019-08-07  Chris Dumez  <cdumez@apple.com>
3725
3726         Regression(r247784) ResourceLoadStatisticsMemoryStore / ResourceLoadStatisticsPersistentStorage may get destroyed on the wrong thread
3727         https://bugs.webkit.org/show_bug.cgi?id=200517
3728
3729         Reviewed by Geoffrey Garen.
3730
3731         The issue is that WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore() is null checking
3732         m_persistentStorage and m_statisticsStore on the main thread, even though those members are initialized
3733         and destroyed on the background thread. As a result, if flushAndDestroyPersistentStore() is called *before*
3734         the background task to initialize those members has had a chance to run, then we'd return early without
3735         destroying those members. Later on, the background task would then initialize those data members and we
3736         would then destroy them on the main thread when the WebResourceLoadStatisticsStore is destroyed on the
3737         main thread.
3738
3739         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
3740         (WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore):
3741
3742 2019-08-06  Dean Jackson  <dino@apple.com>
3743
3744         Context menu on a universal link produces a blank preview
3745         https://bugs.webkit.org/show_bug.cgi?id=200485
3746         <rdar://problem/53699620>
3747
3748         Reviewed by Tim Horton.
3749
3750         If the context menu is activated on an iTunesStore URL, pass it
3751         on to DataDetectors, who should know how to handle it.
3752
3753         Two drive-by fixes:
3754         - make it clear that early returns do not produce a value. Instead call the
3755           completion handler first, then return.
3756         - The new API DataDetectors case doesn't need to worry about hiding link previews
3757           as DataDetectors itself will handle that.
3758
3759         * UIProcess/ios/WKContentViewInteraction.mm: If the URL is an iTunesStoreURL
3760         (as defined by CoreServices), let DataDetectors handle it.
3761         (-[WKContentView assignLegacyDataForContextMenuInteraction]):
3762         (-[WKContentView continueContextMenuInteraction:]):
3763         (-[WKContentView continueContextMenuInteractionWithDataDetectors:]): New method to
3764         use DataDetectors if possible.
3765
3766 2019-08-08  Simon Fraser  <simon.fraser@apple.com>
3767
3768         Add to InteractionInformationAtPosition information about whether the element is in a subscrollable region
3769         https://bugs.webkit.org/show_bug.cgi?id=200374
3770         rdar://problem/54095519
3771
3772         Reviewed by Tim Horton.
3773         
3774         Add InteractionInformationAtPosition.containerScrollingNodeID and initialize it in elementPositionInformation()
3775         by asking the scrolling coordinator.
3776         
3777         Also add a way to get from a ScrollingNodeID to a UIScrollView to RemoteScrollingCoordinatorProxy,
3778         which gets the scrolling node and asks the delegate for the UIView.
3779
3780         * Shared/ios/InteractionInformationAtPosition.h:
3781         * Shared/ios/InteractionInformationAtPosition.mm:
3782         (WebKit::InteractionInformationAtPosition::encode const):
3783         (WebKit::InteractionInformationAtPosition::decode):
3784         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
3785         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
3786         (WebKit::RemoteScrollingCoordinatorProxy::scrollViewForScrollingNodeID const):
3787         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
3788         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
3789         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollView const):
3790         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
3791         * WebProcess/WebPage/ios/WebPageIOS.mm:
3792         (WebKit::elementPositionInformation):
3793
3794 2019-08-07  Priyanka Agarwal  <pagarwal999@apple.com>
3795
3796         Allow clients to toggle a text input field between being viewable and having characters hidden while maintaining 
3797         a yellow auto-filled appearance
3798         https://bugs.webkit.org/show_bug.cgi?id=200037
3799         rdar://problem/51900961
3800
3801         Reviewed by Daniel Bates.
3802
3803         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
3804         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
3805         (-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilledAndViewable]):
3806         Accessor function for boolean which represents if the input element is autofilled and viewable.
3807
3808         (-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilledAndViewable:]):
3809         Setter function for boolean which represents if the input element is autofilled and viewable.
3810
3811         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3812         (WKBundleNodeHandleSetHTMLInputElementAutoFilledAndViewable):
3813         Accessor function for boolean which represents if the input element is autofilled and viewable.
3814
3815        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
3816         Creating function declaration for boolean setter.
3817
3818         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3819         Accessor function for boolean which represents if the input element is autofilled and viewable.
3820
3821         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFilledAndViewable const):
3822         Setter function for boolean which represents if the input element is autofilled and viewable.
3823
3824         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFilledAndViewable):
3825         Setter function for boolean which represents if the input element is autofilled and viewable.
3826
3827         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3828         Adding setter and getter functions for the boolean which represents if the input element is autofilled
3829         and viewable.
3830
3831 2019-08-07  Chris Dumez  <cdumez@apple.com>
3832
3833         Add more threading assertions to ITP code
3834         https://bugs.webkit.org/show_bug.cgi?id=200505
3835
3836         Reviewed by Brent Fulgham.
3837
3838         Add more threading assertions to ITP code to help catch bugs and protect against future bad usage.
3839
3840         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
3841         (WebKit::ResourceLoadStatisticsMemoryStore::isEmpty const):
3842         (WebKit::ResourceLoadStatisticsMemoryStore::setPersistentStorage):
3843         (WebKit::ResourceLoadStatisticsMemoryStore::incrementRecordsDeletedCountForDomains):
3844         (WebKit::ResourceLoadStatisticsMemoryStore::classifyPrevalentResources):
3845         (WebKit::ResourceLoadStatisticsMemoryStore::syncStorageIfNeeded):
3846         (WebKit::ResourceLoadStatisticsMemoryStore::syncStorageImmediately):
3847         (WebKit::ResourceLoadStatisticsMemoryStore::grandfatherDataForDomains):
3848         (WebKit::ResourceLoadStatisticsMemoryStore::ensurePrevalentResourcesForDebugMode):
3849         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
3850         (WebKit::ResourceLoadStatisticsStore::statisticsEpirationTime const):
3851         (WebKit::ResourceLoadStatisticsStore::mergeOperatingDates):
3852         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
3853         (WebKit::WebResourceLoadStatisticsStore::hasStorageAccessForFrame):
3854         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
3855         (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess):
3856         (WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):
3857         (WebKit::WebResourceLoadStatisticsStore::logFrameNavigation):
3858         (WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading):
3859         (WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading):
3860         (WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect):
3861         (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
3862         (WebKit::WebResourceLoadStatisticsStore::removePrevalentDomains):
3863         (WebKit::WebResourceLoadStatisticsStore::networkSession):
3864         (WebKit::WebResourceLoadStatisticsStore::invalidateAndCancel):
3865         (WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const):
3866         (WebKit::WebResourceLoadStatisticsStore::notifyPageStatisticsTelemetryFinished const):
3867
3868 2019-08-07  Ryan Haddad  <ryanhaddad@apple.com>
3869
3870         Unreviewed, rolling out r248330.
3871
3872         Breaks internal builds.
3873
3874         Reverted changeset:
3875
3876         "Context menu on a universal link produces a blank preview"
3877         https://bugs.webkit.org/show_bug.cgi?id=200485
3878         https://trac.webkit.org/changeset/248330
3879
3880 2019-08-06  Ryosuke Niwa  <rniwa@webkit.org>
3881
3882         [iPadOS] slides.google.com: tapping near cursor in a slide title focuses the speaker notes
3883         https://bugs.webkit.org/show_bug.cgi?id=200216
3884
3885         Reviewed by Wenson Hsieh.
3886
3887         The bug was caused by a race condition between Google slides removing inputmode="none" from the hidden
3888         content editable and updating the focused region upon receiving a pointerup event, which happens after
3889         the Google slides had already updated its page layout & coordinates based on new visual viewport with
3890         the software keyboard's boudning rect taken into account.
3891
3892         Delay bringing up the software keyboard for a inputmode change until all touches are released.
3893
3894         In the future, we could consider also delaying the software keyboard to be brought in general until
3895         touchend / pointerup events are dispatched but this is rather risky since that could affact random
3896         other websites while Google suites is the only major site to make use of inputmode="none".
3897
3898         This patch also reverts r243044, which was added for Google slides, since it's no longer needed and
3899         interferes with this patch by adding another way to bring up the software keyboard.
3900
3901         Note: Adjusting touchend / pointerup coordinates while the keyboard is being brought up doesn't work
3902         because the page had already updated the layout by then based on new visual viewport size.
3903
3904         Test: fast/forms/ios/inputmode-change-update-keyboard-after-pointerup.html
3905
3906         * UIProcess/WebPageProxy.cpp:
3907         (WebKit::WebPageProxy::handleTouchEventSynchronously): Call didReleaseAllTouchPoints when all
3908         touches are released.
3909         (WebKit::WebPageProxy::handleTouchEventAsynchronously): Ditto.
3910         (WebKit::WebPageProxy::handleTouchEvent): Ditto.
3911         * UIProcess/WebPageProxy.h:
3912         (WebKit::WebPageProxy::didReleaseAllTouchPoints): Added for non-iOS platforms.
3913         (WebKit::WebPageProxy::m_pendingInputModeChange): Added. Used when inputmode is changed while
3914         there is an on-going touch interaction.
3915         * UIProcess/ios/WebPageProxyIOS.mm:
3916         (WebKit::WebPageProxy::elementDidFocus): Clear m_pendingInputModeChange when a new element is focused.
3917         (WebKit::WebPageProxy::elementDidBlur): Ditto for bluring.
3918         (WebKit::WebPageProxy::focusedElementDidChangeInputMode): Don't bring up the software keyboard now if
3919         there are on-going touches by exiting early after setting m_pendingInputModeChange.
3920         (WebKit::WebPageProxy::didReleaseAllTouchPoints): Bring up the software keyboard if inputmode
3921         had changed from "none" to something else.
3922         * WebProcess/WebPage/WebPage.cpp:
3923         (WebKit::WebPage::dispatchTouchEvent): Removed the code added by r243044.
3924
3925 2019-08-06  Fujii Hironori  <Hironori.Fujii@sony.com>
3926
3927         ASSERTION FAILED: m_observers.isEmpty() if WKPageSetPageStateClient is used
3928         https://bugs.webkit.org/show_bug.cgi?id=200465
3929
3930         Reviewed by Alex Christensen.
3931
3932         PageLoadState::Observer should be removed before destructing
3933         WebPageProxy.
3934
3935         * UIProcess/WebPageProxy.cpp:
3936         (WebKit::WebPageProxy::~WebPageProxy): Call
3937         setPageLoadStateObserver with nullptr to remove
3938         PageLoadState::Observer.
3939
3940 2019-08-06  Chris Dumez  <cdumez@apple.com>
3941
3942         Add release assertions to help catch a bug in our WebProcessCache implementation
3943         https://bugs.webkit.org/show_bug.cgi?id=200483
3944
3945         Reviewed by Geoffrey Garen.
3946
3947         Add release assertions to help catch a bug in our WebProcessCache implementation. We
3948         have evidence (rdar://problem/53962494) that we have processes with a page which
3949         starts a provisional load while the process is in the WebProcessCache. This should
3950         not be possible.
3951
3952         * UIProcess/WebProcessProxy.cpp:
3953         (WebKit::WebProcessProxy::setIsInProcessCache):
3954         (WebKit::WebProcessProxy::addExistingWebPage):
3955
3956 2019-08-06  Dean Jackson  <dino@apple.com>
3957
3958         Context menu on a universal link produces a blank preview
3959         https://bugs.webkit.org/show_bug.cgi?id=200485
3960         <rdar://problem/53699620>
3961
3962         Reviewed by Dean Jackson.
3963
3964         If the context menu is activated on an iTunesStore URL, pass it
3965         on to DataDetectors, who should know how to handle it.
3966
3967         Two drive-by fixes:
3968         - make it clear that early returns do not produce a value. Instead call the
3969           completion handler first, then return.
3970         - The new API DataDetectors case doesn't need to worry about hiding link previews
3971           as DataDetectors itself will handle that.
3972
3973         * UIProcess/ios/WKContentViewInteraction.mm: If the URL is an iTunesStoreURL
3974         (as defined by CoreServices), let DataDetectors&