1 2017-08-17 Chris Dumez <cdumez@apple.com>
3 Regression(r220817): We should only copy the original request headers for Ping loads
4 https://bugs.webkit.org/show_bug.cgi?id=175679
6 Reviewed by Youenn Fablet.
8 For performance reason, we should only copy the original request headers for Ping loads
9 (Beacon at the moment), not for all CachedResourceRequests.
11 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
12 (WebKit::NetworkConnectionToWebProcess::loadPing):
13 * NetworkProcess/NetworkConnectionToWebProcess.h:
14 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
15 * NetworkProcess/NetworkResourceLoadParameters.cpp:
16 (WebKit::NetworkResourceLoadParameters::encode const):
17 (WebKit::NetworkResourceLoadParameters::decode):
18 * NetworkProcess/NetworkResourceLoadParameters.h:
19 * NetworkProcess/PingLoad.cpp:
20 (WebKit::PingLoad::PingLoad):
21 (WebKit::PingLoad::willPerformHTTPRedirection):
22 (WebKit::PingLoad::makeCrossOriginAccessRequest):
23 (WebKit::PingLoad::makeSimpleCrossOriginAccessRequest):
24 (WebKit::PingLoad::originalRequestHeaders const): Deleted.
25 * NetworkProcess/PingLoad.h:
26 * WebProcess/Network/WebLoaderStrategy.cpp:
27 (WebKit::WebLoaderStrategy::createPingHandle):
28 * WebProcess/Network/WebLoaderStrategy.h:
30 2017-08-17 Don Olmstead <don.olmstead@sony.com>
32 [PAL] Relocate SessionID to root
33 https://bugs.webkit.org/show_bug.cgi?id=175684
35 Reviewed by Alex Christensen.
37 * NetworkProcess/Downloads/Download.h:
38 * NetworkProcess/Downloads/DownloadManager.cpp:
39 * NetworkProcess/NetworkCORSPreflightChecker.h:
40 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
41 * NetworkProcess/NetworkLoad.cpp:
42 * NetworkProcess/NetworkLoadParameters.h:
43 * NetworkProcess/NetworkProcess.cpp:
44 * NetworkProcess/NetworkProcess.h:
45 * NetworkProcess/NetworkResourceLoadParameters.h:
46 * NetworkProcess/NetworkSession.h:
47 * NetworkProcess/NetworkSocketStream.h:
48 * NetworkProcess/RemoteNetworkingContext.h:
49 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
50 * Scripts/webkit/messages.py:
51 (forward_declarations_and_headers.templates): Deleted.
52 (class_template_headers.template): Deleted.
53 * Shared/ChildProcess.cpp:
54 * Shared/SessionTracker.h:
55 * Shared/Storage/StorageProcessCreationParameters.h:
56 * Shared/WebCoreArgumentCoders.cpp:
57 * Shared/WebPageCreationParameters.h:
58 * Shared/WebProcessCreationParameters.h:
59 * Shared/WebsiteDataStoreParameters.h:
60 * Shared/mac/CookieStorageShim.mm:
61 * StorageProcess/IndexedDB/WebIDBConnectionToClient.h:
62 * StorageProcess/StorageProcess.cpp:
63 * StorageProcess/StorageProcess.h:
64 * StorageProcess/StorageToWebProcessConnection.h:
65 * UIProcess/API/APIPageConfiguration.h:
66 * UIProcess/API/APIWebsiteDataStore.h:
67 * UIProcess/API/glib/WebKitCookieManager.cpp:
68 * UIProcess/Plugins/PlugInAutoStartProvider.h:
69 * UIProcess/WebCookieManagerProxy.h:
70 * UIProcess/WebProcessPool.cpp:
71 * UIProcess/WebProcessPool.h:
72 * UIProcess/WebProcessProxy.h:
73 * UIProcess/WebsiteData/WebsiteDataStore.h:
74 * WebProcess/Cookies/WebCookieManager.h:
75 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
76 * WebProcess/Databases/WebDatabaseProvider.cpp:
77 * WebProcess/InjectedBundle/InjectedBundle.cpp:
78 * WebProcess/Network/NetworkProcessConnection.cpp:
79 * WebProcess/Network/WebLoaderStrategy.cpp:
80 * WebProcess/Network/WebSocketStream.cpp:
81 * WebProcess/Network/WebSocketStream.h:
82 * WebProcess/Storage/WebToStorageProcessConnection.h:
83 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
84 * WebProcess/WebCoreSupport/WebPlugInClient.h:
85 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
86 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
87 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
88 * WebProcess/WebPage/WebPage.cpp:
89 * WebProcess/WebProcess.h:
91 2017-08-17 Chris Dumez <cdumez@apple.com>
93 REGRESSION (r220601): Crash under ProcessAssertion::markAsInvalidated()
94 https://bugs.webkit.org/show_bug.cgi?id=175685
95 <rdar://problem/33868623>
97 Reviewed by Sam Weinig.
99 After r220601, it is no longer safe to call a default-initialized WTF::Function.
101 * UIProcess/ios/ProcessAssertionIOS.mm:
102 (WebKit::ProcessAssertion::markAsInvalidated):
104 2017-08-17 Andreas Kling <akling@apple.com>
106 Disable CSS regions at compile time
107 https://bugs.webkit.org/show_bug.cgi?id=175630
109 Reviewed by Antti Koivisto.
111 * Configurations/FeatureDefines.xcconfig:
113 2017-08-17 Wenson Hsieh <wenson_hsieh@apple.com>
115 [iOS] Respect type fidelities when copying image elements to the pasteboard
116 https://bugs.webkit.org/show_bug.cgi?id=175638
117 <rdar://problem/26556043>
119 Reviewed by Ryosuke Niwa.
121 Currently, we treat the case when copying an image enclosed by a link by only writing a URL to the pasteboard.
122 This patch tweaks logic in WebPage::performActionOnElement to write both an image and a link to the pasteboard
123 if the hit-tested image element is enclosed by an anchor.
125 * Platform/spi/ios/UIKitSPI.h:
126 * WebProcess/WebPage/ios/WebPageIOS.mm:
127 (WebKit::containingLinkElement):
129 Tweak this helper to be more restrictive when finding an enclosing 'link' -- only return an element if isLink()
130 is true, and it is an HTMLAnchorElement. Currently, the isLink() also matches HTMLLinkElements, but this isn't
133 (WebKit::WebPage::performActionOnElement):
135 2017-08-17 Jacobo Aragunde Pérez <jaragunde@igalia.com>
137 [WPE][GTK] Ensure proper casting of data in gvariants
138 https://bugs.webkit.org/show_bug.cgi?id=175667
140 Reviewed by Michael Catanzaro.
142 g_variant_builder_add requires data to have the correct width for their types, using
143 casting if necessary. Corrected a call where a single precision float was being put
144 into a double precision parameter without a cast.
146 * UIProcess/API/glib/WebKitWebViewSessionState.cpp:
149 2017-08-17 Don Olmstead <don.olmstead@sony.com>
151 [PAL] Move SessionID into PAL
152 https://bugs.webkit.org/show_bug.cgi?id=174192
154 Reviewed by Antti Koivisto.
156 * NetworkProcess/Downloads/Download.cpp:
157 (WebKit::Download::Download):
158 * NetworkProcess/Downloads/Download.h:
159 (WebKit::Download::Download):
160 * NetworkProcess/Downloads/DownloadManager.cpp:
161 (WebKit::DownloadManager::startDownload):
162 (WebKit::DownloadManager::resumeDownload):
163 * NetworkProcess/Downloads/DownloadManager.h:
164 (WebKit::DownloadManager::startDownload):
165 * NetworkProcess/NetworkCORSPreflightChecker.h:
166 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
167 (WebKit::NetworkConnectionToWebProcess::createSocketStream):
168 (WebKit::storageSession):
169 (WebKit::NetworkConnectionToWebProcess::startDownload):
170 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
171 (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
172 (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
173 (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
174 (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
175 (WebKit::NetworkConnectionToWebProcess::getRawCookies):
176 (WebKit::NetworkConnectionToWebProcess::deleteCookie):
177 (WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
178 * NetworkProcess/NetworkConnectionToWebProcess.h:
179 (WebKit::NetworkConnectionToWebProcess::startDownload):
180 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
181 * NetworkProcess/NetworkLoad.cpp:
182 * NetworkProcess/NetworkLoadParameters.h:
183 * NetworkProcess/NetworkProcess.cpp:
184 (WebKit::NetworkProcess::initializeNetworkProcess):
185 (WebKit::NetworkProcess::destroySession):
186 (WebKit::fetchDiskCacheEntries):
187 (WebKit::NetworkProcess::fetchWebsiteData):
188 (WebKit::NetworkProcess::deleteWebsiteData):
189 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
190 (WebKit::NetworkProcess::downloadRequest):
191 (WebKit::NetworkProcess::resumeDownload):
192 * NetworkProcess/NetworkProcess.h:
193 * NetworkProcess/NetworkProcess.messages.in:
194 * NetworkProcess/NetworkResourceLoadParameters.h:
195 * NetworkProcess/NetworkResourceLoader.h:
196 * NetworkProcess/NetworkSession.cpp:
197 (WebKit::NetworkSession::create):
198 (WebKit::NetworkSession::defaultSession):
199 (WebKit::NetworkSession::NetworkSession):
200 * NetworkProcess/NetworkSession.h:
201 (WebKit::NetworkSession::sessionID const):
202 * NetworkProcess/NetworkSocketStream.cpp:
203 (WebKit::NetworkSocketStream::create):
204 (WebKit::NetworkSocketStream::NetworkSocketStream):
205 * NetworkProcess/NetworkSocketStream.h:
206 * NetworkProcess/RemoteNetworkingContext.h:
207 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
208 (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
209 * NetworkProcess/cocoa/NetworkSessionCocoa.h:
210 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
211 (WebKit::configurationForSessionID):
212 (WebKit::NetworkSessionCocoa::create):
213 (WebKit::NetworkSessionCocoa::defaultSession):
214 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
215 * NetworkProcess/soup/NetworkSessionSoup.cpp:
216 (WebKit::NetworkSessionSoup::NetworkSessionSoup):
217 * NetworkProcess/soup/NetworkSessionSoup.h:
218 * Scripts/webkit/messages.py:
219 (forward_declarations_and_headers.templates): Deleted.
220 (class_template_headers.template): Deleted.
221 * Shared/ChildProcess.cpp:
222 (WebKit::ChildProcess::initialize):
223 * Shared/SessionTracker.cpp:
224 (WebKit::staticSessionMap):
225 (WebKit::SessionTracker::networkSession):
226 (WebKit::SessionTracker::setSession):
227 (WebKit::SessionTracker::destroySession):
228 * Shared/SessionTracker.h:
229 * Shared/Storage/StorageProcessCreationParameters.h:
230 * Shared/WebCoreArgumentCoders.cpp:
231 * Shared/WebCoreArgumentCoders.h:
232 * Shared/WebPageCreationParameters.h:
233 * Shared/WebProcessCreationParameters.h:
234 * Shared/WebsiteDataStoreParameters.h:
235 * Shared/mac/CookieStorageShim.mm:
236 (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
237 * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp:
238 (WebKit::WebIDBConnectionToClient::create):
239 (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
240 * StorageProcess/IndexedDB/WebIDBConnectionToClient.h:
241 * StorageProcess/StorageProcess.cpp:
242 (WebKit::StorageProcess::idbServer):
243 (WebKit::StorageProcess::fetchWebsiteData):
244 (WebKit::StorageProcess::deleteWebsiteData):
245 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
246 * StorageProcess/StorageProcess.h:
247 * StorageProcess/StorageProcess.messages.in:
248 * StorageProcess/StorageToWebProcessConnection.cpp:
249 (WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer):
250 * StorageProcess/StorageToWebProcessConnection.h:
251 * StorageProcess/StorageToWebProcessConnection.messages.in:
252 * UIProcess/API/APIPageConfiguration.cpp:
253 (API::PageConfiguration::setWebsiteDataStore):
254 (API::PageConfiguration::sessionID):
255 (API::PageConfiguration::setSessionID):
256 * UIProcess/API/APIPageConfiguration.h:
257 * UIProcess/API/APIWebsiteDataStore.cpp:
258 (API::WebsiteDataStore::defaultDataStore):
259 (API::WebsiteDataStore::createLegacy):
260 (API::WebsiteDataStore::WebsiteDataStore):
261 * UIProcess/API/APIWebsiteDataStore.h:
262 * UIProcess/API/C/WKCookieManager.cpp:
263 (WKCookieManagerGetHostnamesWithCookies):
264 (WKCookieManagerDeleteCookiesForHostname):
265 (WKCookieManagerDeleteAllCookies):
266 (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
267 (WKCookieManagerSetHTTPCookieAcceptPolicy):
268 (WKCookieManagerGetHTTPCookieAcceptPolicy):
269 (WKCookieManagerStartObservingCookieChanges):
270 (WKCookieManagerStopObservingCookieChanges):
271 * UIProcess/API/Cocoa/WKProcessPool.mm:
272 (-[WKProcessPool _setCookieAcceptPolicy:]):
273 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
274 (-[WKWebsiteDataStore _initWithConfiguration:]):
275 * UIProcess/API/glib/WebKitCookieManager.cpp:
276 (webkit_cookie_manager_set_accept_policy):
277 (webkit_cookie_manager_get_accept_policy):
278 * UIProcess/Network/NetworkProcessProxy.cpp:
279 (WebKit::NetworkProcessProxy::fetchWebsiteData):
280 (WebKit::NetworkProcessProxy::deleteWebsiteData):
281 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
282 * UIProcess/Network/NetworkProcessProxy.h:
283 * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
284 (WebKit::PlugInAutoStartProvider::PlugInAutoStartProvider):
285 (WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
286 (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy const):
287 (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
288 (WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):
289 * UIProcess/Plugins/PlugInAutoStartProvider.h:
290 * UIProcess/Storage/StorageProcessProxy.cpp:
291 (WebKit::StorageProcessProxy::fetchWebsiteData):
292 (WebKit::StorageProcessProxy::deleteWebsiteData):
293 (WebKit::StorageProcessProxy::deleteWebsiteDataForOrigins):
294 * UIProcess/Storage/StorageProcessProxy.h:
295 * UIProcess/WebCookieManagerProxy.cpp:
296 (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
297 (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
298 (WebKit::WebCookieManagerProxy::deleteAllCookies):
299 (WebKit::WebCookieManagerProxy::deleteCookie):
300 (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
301 (WebKit::WebCookieManagerProxy::setCookie):
302 (WebKit::WebCookieManagerProxy::setCookies):
303 (WebKit::WebCookieManagerProxy::getAllCookies):
304 (WebKit::WebCookieManagerProxy::getCookies):
305 (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
306 (WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
307 (WebKit::WebCookieManagerProxy::setCookieObserverCallback):
308 (WebKit::WebCookieManagerProxy::registerObserver):
309 (WebKit::WebCookieManagerProxy::unregisterObserver):
310 (WebKit::WebCookieManagerProxy::cookiesDidChange):
311 (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
312 (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
313 * UIProcess/WebCookieManagerProxy.h:
314 * UIProcess/WebCookieManagerProxy.messages.in:
315 * UIProcess/WebPageProxy.h:
316 (WebKit::WebPageProxy::sessionID const):
317 * UIProcess/WebProcessPool.cpp:
318 (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
319 (WebKit::WebProcessPool::createNewWebProcess):
320 (WebKit::WebProcessPool::createWebPage):
321 (WebKit::WebProcessPool::pageAddedToProcess):
322 (WebKit::WebProcessPool::pageRemovedFromProcess):
323 (WebKit::WebProcessPool::download):
324 (WebKit::WebProcessPool::resumeDownload):
325 (WebKit::WebProcessPool::addPlugInAutoStartOriginHash):
326 (WebKit::WebProcessPool::plugInDidReceiveUserInteraction):
327 * UIProcess/WebProcessPool.h:
328 * UIProcess/WebProcessPool.messages.in:
329 * UIProcess/WebProcessProxy.cpp:
330 (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
331 (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):
332 (WebKit::WebProcessProxy::fetchWebsiteData):
333 (WebKit::WebProcessProxy::deleteWebsiteData):
334 (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
335 * UIProcess/WebProcessProxy.h:
336 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
337 (WebKit::WebsiteDataStore::createNonPersistent):
338 (WebKit::WebsiteDataStore::create):
339 (WebKit::WebsiteDataStore::WebsiteDataStore):
340 (WebKit::WebsiteDataStore::~WebsiteDataStore):
341 * UIProcess/WebsiteData/WebsiteDataStore.h:
342 (WebKit::WebsiteDataStore::sessionID const):
343 * WebProcess/Cookies/WebCookieManager.cpp:
344 (WebKit::WebCookieManager::getHostnamesWithCookies):
345 (WebKit::WebCookieManager::deleteCookiesForHostname):
346 (WebKit::WebCookieManager::deleteAllCookies):
347 (WebKit::WebCookieManager::deleteCookie):
348 (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
349 (WebKit::WebCookieManager::getAllCookies):
350 (WebKit::WebCookieManager::getCookies):
351 (WebKit::WebCookieManager::setCookie):
352 (WebKit::WebCookieManager::setCookies):
353 (WebKit::WebCookieManager::notifyCookiesDidChange):
354 (WebKit::WebCookieManager::startObservingCookieChanges):
355 (WebKit::WebCookieManager::stopObservingCookieChanges):
356 * WebProcess/Cookies/WebCookieManager.h:
357 * WebProcess/Cookies/WebCookieManager.messages.in:
358 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
359 (WebKit::WebIDBConnectionToServer::create):
360 (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
361 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
362 * WebProcess/Databases/WebDatabaseProvider.cpp:
363 (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
364 * WebProcess/Databases/WebDatabaseProvider.h:
365 * WebProcess/InjectedBundle/InjectedBundle.cpp:
366 (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
367 * WebProcess/Network/NetworkProcessConnection.cpp:
368 (WebKit::NetworkProcessConnection::didCacheResource):
369 * WebProcess/Network/NetworkProcessConnection.h:
370 * WebProcess/Network/NetworkProcessConnection.messages.in:
371 * WebProcess/Network/WebLoaderStrategy.cpp:
372 (WebKit::WebLoaderStrategy::scheduleLoad):
373 (WebKit::WebLoaderStrategy::loadResourceSynchronously):
374 (WebKit::WebLoaderStrategy::createPingHandle):
375 * WebProcess/Network/WebSocketProvider.cpp:
376 (WebKit::WebSocketProvider::createSocketStreamHandle):
377 * WebProcess/Network/WebSocketProvider.h:
378 * WebProcess/Network/WebSocketStream.cpp:
379 (WebKit::WebSocketStream::create):
380 (WebKit::WebSocketStream::WebSocketStream):
381 * WebProcess/Network/WebSocketStream.h:
382 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
383 (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
384 * WebProcess/Storage/WebToStorageProcessConnection.h:
385 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
386 (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
387 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
388 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
389 (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
390 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
391 * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
392 (WebKit::WebPlugInClient::didStartFromOrigin):
393 * WebProcess/WebCoreSupport/WebPlugInClient.h:
394 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
395 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
396 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
397 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
398 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
399 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
400 * WebProcess/WebPage/WebFrame.cpp:
401 (WebKit::WebFrame::startDownload):
402 (WebKit::WebFrame::convertMainResourceLoadToDownload):
403 * WebProcess/WebPage/WebFrame.h:
404 * WebProcess/WebPage/WebPage.cpp:
405 (WebKit::WebPage::setSessionID):
406 (WebKit::WebPage::updatePreferences):
407 * WebProcess/WebPage/WebPage.h:
408 (WebKit::WebPage::sessionID const):
409 * WebProcess/WebProcess.cpp:
410 (WebKit::m_webSQLiteDatabaseTracker):
411 (WebKit::WebProcess::ensurePrivateBrowsingSession):
412 (WebKit::WebProcess::destroySession):
413 (WebKit::WebProcess::isPlugInAutoStartOriginHash):
414 (WebKit::WebProcess::plugInDidStartFromOrigin):
415 (WebKit::WebProcess::didAddPlugInAutoStartOriginHash):
416 (WebKit::WebProcess::resetPlugInAutoStartOriginDefaultHashes):
417 (WebKit::WebProcess::resetPlugInAutoStartOriginHashes):
418 (WebKit::WebProcess::plugInDidReceiveUserInteraction):
419 (WebKit::WebProcess::fetchWebsiteData):
420 (WebKit::WebProcess::deleteWebsiteData):
421 (WebKit::WebProcess::deleteWebsiteDataForOrigins):
422 * WebProcess/WebProcess.h:
423 * WebProcess/WebProcess.messages.in:
425 2017-08-17 Joseph Pecoraro <pecoraro@apple.com>
427 Fix typo: setUpInectedBundleClient
428 https://bugs.webkit.org/show_bug.cgi?id=175655
430 Reviewed by Andreas Kling.
432 * UIProcess/API/Cocoa/WKProcessGroup.mm:
433 (setUpInjectedBundleClient):
434 (-[WKProcessGroup initWithInjectedBundleURL:]):
436 2017-08-17 Carlos Garcia Campos <cgarcia@igalia.com>
438 [GTK][WPE] Add NTLM authentication enabled API
439 https://bugs.webkit.org/show_bug.cgi?id=122952
441 Reviewed by Michael Catanzaro.
443 Add API to WebKitWebContext to enable/disable NTLM authentication.
445 * NetworkProcess/NetworkProcess.h:
446 * NetworkProcess/NetworkProcess.messages.in:
447 * NetworkProcess/NetworkProcessCreationParameters.cpp:
448 (WebKit::NetworkProcessCreationParameters::encode const):
449 (WebKit::NetworkProcessCreationParameters::decode):
450 * NetworkProcess/NetworkProcessCreationParameters.h:
451 * NetworkProcess/soup/NetworkProcessSoup.cpp:
452 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
453 (WebKit::NetworkProcess::setNTLMAuthenticationEnabled):
454 * UIProcess/API/glib/WebKitWebContext.cpp:
455 (webkit_web_context_get_ntlm_authentication_enabled):
456 (webkit_web_context_set_ntlm_authentication_enabled):
457 * UIProcess/API/gtk/WebKitWebContext.h:
458 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
459 * UIProcess/API/wpe/WebKitWebContext.h:
460 * UIProcess/WebProcessPool.h:
461 * UIProcess/soup/WebProcessPoolSoup.cpp:
462 (WebKit::WebProcessPool::setNTLMAuthenticationEnabled):
464 2017-08-16 Andy Estes <aestes@apple.com>
466 [Apple Pay] Rename PaymentRequest to ApplePaySessionPaymentRequest
467 https://bugs.webkit.org/show_bug.cgi?id=175648
469 Reviewed by Tim Horton.
471 * Scripts/webkit/messages.py:
473 * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
474 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::encode):
475 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode):
476 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ContactFields>::encode):
477 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ContactFields>::decode):
478 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::LineItem>::encode):
479 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::LineItem>::decode):
480 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::MerchantCapabilities>::encode):
481 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::MerchantCapabilities>::decode):
482 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ShippingMethod>::encode):
483 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ShippingMethod>::decode):
484 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::TotalAndLineItems>::encode):
485 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::TotalAndLineItems>::decode):
486 (IPC::ArgumentCoder<PaymentRequest>::encode): Deleted.
487 (IPC::ArgumentCoder<PaymentRequest>::decode): Deleted.
488 (IPC::ArgumentCoder<PaymentRequest::ContactFields>::encode): Deleted.
489 (IPC::ArgumentCoder<PaymentRequest::ContactFields>::decode): Deleted.
490 (IPC::ArgumentCoder<PaymentRequest::LineItem>::encode): Deleted.
491 (IPC::ArgumentCoder<PaymentRequest::LineItem>::decode): Deleted.
492 (IPC::ArgumentCoder<PaymentRequest::MerchantCapabilities>::encode): Deleted.
493 (IPC::ArgumentCoder<PaymentRequest::MerchantCapabilities>::decode): Deleted.
494 (IPC::ArgumentCoder<PaymentRequest::ShippingMethod>::encode): Deleted.
495 (IPC::ArgumentCoder<PaymentRequest::ShippingMethod>::decode): Deleted.
496 (IPC::ArgumentCoder<PaymentRequest::TotalAndLineItems>::encode): Deleted.
497 (IPC::ArgumentCoder<PaymentRequest::TotalAndLineItems>::decode): Deleted.
498 * Shared/WebCoreArgumentCoders.h:
499 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
500 (WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
501 (WebKit::WebPaymentCoordinatorProxy::didSelectShippingMethod):
502 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
503 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
504 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
505 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
507 (WebKit::toPKContactFields):
508 (WebKit::toPKAddressField):
509 (WebKit::toPKPaymentSummaryItemType):
510 (WebKit::toPKPaymentSummaryItem):
511 (WebKit::toPKPaymentSummaryItems):
512 (WebKit::toPKMerchantCapabilities):
513 (WebKit::toPKShippingType):
514 (WebKit::toPKShippingMethod):
515 (WebKit::toPKPaymentRequest):
516 * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
517 (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
518 * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
519 (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
520 * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
521 (WebKit::WebPaymentCoordinator::showPaymentUI):
522 (WebKit::WebPaymentCoordinator::didSelectShippingMethod):
523 * WebProcess/ApplePay/WebPaymentCoordinator.h:
524 * WebProcess/ApplePay/WebPaymentCoordinator.messages.in:
526 2017-08-16 Chris Dumez <cdumez@apple.com>
528 Cross origin Beacon requests with a ArrayBuffer / ArrayBufferView payload should not do a CORS preflight
529 https://bugs.webkit.org/show_bug.cgi?id=175628
530 <rdar://problem/33919278>
532 Reviewed by Geoffrey Garen.
534 Cross origin Beacon requests with a ArrayBuffer / ArrayBufferView payload should not do a CORS preflight.
535 To achieve this, the following changes were made:
536 1. Revert r220779 which caused us to use a non CORS-safelisted Content-Type header for such payload
537 2. Teach PingLoad how to deal with "simple" cross origin requests (i.e. Don't assume we need a CORS
538 preflight merely because the fetch mode is set to "cors").
540 * NetworkProcess/NetworkCORSPreflightChecker.cpp:
541 (WebKit::NetworkCORSPreflightChecker::startPreflight):
542 * NetworkProcess/NetworkResourceLoadParameters.cpp:
543 (WebKit::NetworkResourceLoadParameters::encode const):
544 (WebKit::NetworkResourceLoadParameters::decode):
545 * NetworkProcess/NetworkResourceLoadParameters.h:
546 * NetworkProcess/PingLoad.cpp:
547 (WebKit::PingLoad::PingLoad):
548 (WebKit::PingLoad::loadRequest):
549 (WebKit::PingLoad::originalRequestHeaders const):
550 (WebKit::PingLoad::willPerformHTTPRedirection):
551 (WebKit::PingLoad::isAllowedRedirect const):
552 (WebKit::PingLoad::makeCrossOriginAccessRequest):
553 (WebKit::PingLoad::makeSimpleCrossOriginAccessRequest):
554 (WebKit::PingLoad::makeCrossOriginAccessRequestWithPreflight):
555 (WebKit::PingLoad::preflightSuccess):
556 * NetworkProcess/PingLoad.h:
557 * WebProcess/Network/WebLoaderStrategy.cpp:
558 (WebKit::WebLoaderStrategy::createPingHandle):
559 * WebProcess/Network/WebLoaderStrategy.h:
561 2017-08-16 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
563 [PAL] Move spi/ios and spi/win directories into PAL
564 https://bugs.webkit.org/show_bug.cgi?id=175171
566 Reviewed by Antti Koivisto.
568 * UIProcess/Cocoa/NavigationState.mm:
569 * UIProcess/ios/WKActionSheetAssistant.h:
570 * UIProcess/ios/WKActionSheetAssistant.mm:
571 * UIProcess/ios/WKContentViewInteraction.mm:
572 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
573 * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
574 * WebProcess/cocoa/WebProcessCocoa.mm:
576 2017-08-16 Miguel Gomez <magomez@igalia.com>
578 [GTK] Crash of WebProcess with on-demand AC
579 https://bugs.webkit.org/show_bug.cgi?id=171161
581 Reviewed by Carlos Garcia Campos.
583 Set the viewOverlayRootLayer to the previous layerTreeHost if it exists. This avoids a
584 crash when reusing the previous layerTreeHost, because it would keep a reference to an
585 already destroyed viewOverlayRootLayer.
587 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
588 (WebKit::AcceleratedDrawingArea::attachViewOverlayGraphicsLayer):
590 2017-08-16 Zan Dobersek <zdobersek@igalia.com>
592 [CoordGraphics] Simplify CoordinatedGraphicsScene state updates
593 https://bugs.webkit.org/show_bug.cgi?id=175528
594 <rdar://problem/33876795>
596 Reviewed by Carlos Garcia Campos.
598 Hold the information about state updates in ThreadedCompositor, in the
599 m_attributes struct. This way we don't need to store the updates in
600 functors and accumulate them in the CoordinatedGraphicsScene class, but
601 instead just apply any pending state update or atlas removal before the
604 This removes the need to update the CoordinatedGraphicsScene object from
605 the main thread with data that ultimately has to be handled on the
606 composition thread. Similarly, when updating CoordinatedGraphicsScene, we
607 only need to synchronize on the m_attributes lock object once in order to
608 retrieve the scene update information, instead of having each functor do
611 Outside of CoordinatedGraphicsScene and ThreadedCompositor classes, the
612 CompositingCoordinator class now passes the atlases-to-remove Vector by
613 a const lvalue reference down to ThreadedCompositor, and then manually
614 clears the Vector. Before the Vector was passed as an rvalue reference,
615 depending on the ThreadedCompositor code to clear out the original Vector
616 object by moving its resources into the functor object. This doesn't occur
617 anymore because the Vector object is now appended to another Vector.
619 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
620 (WebKit::CoordinatedGraphicsScene::applyStateChanges):
621 (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
622 (WebKit::CoordinatedGraphicsScene::detach):
623 (WebKit::CoordinatedGraphicsScene::setActive):
624 (WebKit::CoordinatedGraphicsScene::syncRemoteContent): Deleted.
625 (WebKit::CoordinatedGraphicsScene::appendUpdate): Deleted.
626 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
627 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
628 (WebKit::ThreadedCompositor::renderLayerTree):
629 (WebKit::ThreadedCompositor::updateSceneState):
630 (WebKit::ThreadedCompositor::releaseUpdateAtlases):
631 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
632 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
633 (WebKit::CompositingCoordinator::flushPendingLayerChanges):
634 (WebKit::CompositingCoordinator::releaseAtlases):
635 (WebKit::CompositingCoordinator::clearUpdateAtlases):
636 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
637 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
638 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
639 (WebKit::ThreadedCoordinatedLayerTreeHost::releaseUpdateAtlases):
640 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
642 2017-08-16 Andy Estes <aestes@apple.com>
644 [Payment Request] Add an ENABLE flag and an experimental feature preference
645 https://bugs.webkit.org/show_bug.cgi?id=175622
647 Reviewed by Tim Horton.
649 * Configurations/FeatureDefines.xcconfig:
650 * Shared/WebPreferencesDefinitions.h:
651 * UIProcess/API/C/WKPreferences.cpp:
652 (WKPreferencesSetPaymentRequestEnabled):
653 (WKPreferencesGetPaymentRequestEnabled):
654 * UIProcess/API/C/WKPreferencesRefPrivate.h:
655 * WebProcess/WebPage/WebPage.cpp:
656 (WebKit::WebPage::updatePreferences):
658 2017-08-15 Carlos Garcia Campos <cgarcia@igalia.com>
660 [GTK][WPE] WebKitAutomationSession should set session client to nullptr on dispose
661 https://bugs.webkit.org/show_bug.cgi?id=175564
663 Reviewed by Carlos Alberto Lopez Perez.
665 WebAutomationSession expects its client to be nullptr in the destructor.
667 * UIProcess/API/glib/WebKitAutomationSession.cpp:
668 (webkitAutomationSessionDispose):
670 2017-08-15 Tim Horton <timothy_horton@apple.com>
672 WKSnapshotConfiguration is missing from the WebKit umbrella header
673 https://bugs.webkit.org/show_bug.cgi?id=175614
674 <rdar://problem/33812691>
676 Reviewed by Dan Bernstein.
678 * Shared/API/Cocoa/WebKit.h:
679 Add WKSnapshotConfiguration, which is a public header.
681 2017-08-15 Simon Fraser <simon.fraser@apple.com>
683 Allow WebCore logging channels to be set from the UI process
684 https://bugs.webkit.org/show_bug.cgi?id=175608
686 Reviewed by Tim Horton.
688 The UI process can now read the "WebCoreLogging" default, and pass it to the web process
689 via WebProcessCreationParameters, where WebProcess::platformInitializeWebProcess() uses
690 it to set up WebCore logging channels. Note that these will override channels read from
691 the web process user defaults domain (but those are hard to set anyway).
693 * Shared/WebProcessCreationParameters.cpp:
694 (WebKit::WebProcessCreationParameters::encode const):
695 (WebKit::WebProcessCreationParameters::decode):
696 * Shared/WebProcessCreationParameters.h:
697 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
698 (WebKit::WebProcessPool::platformInitializeWebProcess):
699 * WebProcess/cocoa/WebProcessCocoa.mm:
700 (WebKit::WebProcess::platformInitializeWebProcess):
702 2017-08-15 Don Olmstead <don.olmstead@sony.com>
704 [PAL] Move Sleep classes into PAL
705 https://bugs.webkit.org/show_bug.cgi?id=175456
707 Reviewed by Ryosuke Niwa.
709 * UIProcess/mac/WKFullScreenWindowController.h:
710 * UIProcess/mac/WKFullScreenWindowController.mm:
712 2017-08-15 Youenn Fablet <youenn@apple.com>
714 [Cache API] Adding generic support for CacheStorage and Cache methods
715 https://bugs.webkit.org/show_bug.cgi?id=175455
717 Reviewed by Chris Dumez.
719 * WebKit.xcodeproj/project.pbxproj:
720 * WebProcess/Cache/WebCacheStorageProvider.h: Added.
721 * WebProcess/WebPage/WebPage.cpp:
722 (WebKit::m_cpuLimit):
723 * WebProcess/WebProcess.cpp:
724 (WebKit::WebProcess::WebProcess):
725 * WebProcess/WebProcess.h:
726 (WebKit::WebProcess::cacheStorageProvider):
728 2017-08-15 Michael Catanzaro <mcatanzaro@igalia.com>
730 Unreviewed, rolling out r220700.
736 "[CoordGraphics] Simplify CoordinatedGraphicsScene state
738 https://bugs.webkit.org/show_bug.cgi?id=175528
739 http://trac.webkit.org/changeset/220700
741 2017-08-15 Carlos Garcia Campos <cgarcia@igalia.com>
743 WebDriver: timeout when JavaScript alert is shown in onload handler
744 https://bugs.webkit.org/show_bug.cgi?id=175315
745 <rdar://problem/33788294>
747 Reviewed by Brian Burg.
749 When a JavaScript alert is shown in an onload handler, the alert prevents the load from finishing in case of
750 normal page load strategy, so navigation commands or any other command for which we wait for navigation to
751 complete end up timing out. There are two selenium tests covering this that are currently timing out:
752 testShouldHandleAlertOnPageLoad and testShouldHandleAlertOnPageLoadUsingGet. The spec says that in case of page
753 load timeout we should only fail with timeout error when there isn't an active alert dialog. If the next command
754 expects an alert it will just work, otherwise it will fail with UnexpectedAlertOpen error when trying to handle
758 https://w3c.github.io/webdriver/webdriver-spec.html#dfn-wait-for-navigation-to-complete
760 * UIProcess/Automation/WebAutomationSession.cpp:
761 (WebKit::WebAutomationSession::waitForNavigationToComplete): Do not wait for the timeout when the page is
762 loading and there's an active alert in case of normal page load strategy.
763 (WebKit::WebAutomationSession::respondToPendingPageNavigationCallbacksWithTimeout): Respond with timeout unless
764 the page is showing a JavaScript dialog.
765 (WebKit::WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout): Ditto.
766 (WebKit::WebAutomationSession::loadTimerFired): Use respondToPendingPageNavigationCallbacksWithTimeout() and
767 respondToPendingFrameNavigationCallbacksWithTimeout().
768 (WebKit::WebAutomationSession::willShowJavaScriptDialog): The page is about to show a JavaScript dialog, so
769 we wait until the next run loop iteration to give time for the client to show the dialog, then check if page is
770 loading and the dialog is still present. If that's the case we finish all normal strategy pending navigations.
771 * UIProcess/Automation/WebAutomationSession.h:
772 * UIProcess/WebPageProxy.cpp:
773 (WebKit::WebPageProxy::runJavaScriptAlert): If controlled by automation, notify the session.
774 (WebKit::WebPageProxy::runJavaScriptConfirm): Ditto.
775 (WebKit::WebPageProxy::runJavaScriptPrompt): Ditto.
776 (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): Ditto.
778 2017-08-14 Carlos Garcia Campos <cgarcia@igalia.com>
780 WebDriver: handle click events on option elements
781 https://bugs.webkit.org/show_bug.cgi?id=174710
782 <rdar://problem/33459305>
784 Reviewed by Brian Burg.
786 Add selectOptionElement method to automation to select an option element according to the WebDriver
790 https://w3c.github.io/webdriver/webdriver-spec.html#element-click
792 * UIProcess/Automation/Automation.json: Add selectOptionElement method and ElementNotSelectable error.
793 * UIProcess/Automation/WebAutomationSession.cpp:
794 (WebKit::WebAutomationSession::selectOptionElement):Send SelectOptionElement message to the web process.
795 (WebKit::WebAutomationSession::didSelectOptionElement): Notify the driver.
796 * UIProcess/Automation/WebAutomationSession.h:
797 * UIProcess/Automation/WebAutomationSession.messages.in: Add DidSelectOptionElement message.
798 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
799 (WebKit::elementContainer): Helper to get the container of an element according to the spec.
800 (WebKit::WebAutomationSessionProxy::computeElementLayout): Use the container element to scroll the view and
801 compute the in-view center point.
802 (WebKit::WebAutomationSessionProxy::selectOptionElement): Use HTMLSelectElement::optionSelectedByUser().
803 * WebProcess/Automation/WebAutomationSessionProxy.h:
804 * WebProcess/Automation/WebAutomationSessionProxy.messages.in: Add SelectOptionElement message.
806 2017-08-14 Simon Fraser <simon.fraser@apple.com>
808 Remove Proximity Events and related code
809 https://bugs.webkit.org/show_bug.cgi?id=175545
811 Reviewed by Daniel Bates.
813 No platform enables Proximity Events, so remove code inside ENABLE(PROXIMITY_EVENTS)
814 and other related code.
817 * Configurations/FeatureDefines.xcconfig:
818 * WebProcess/WebCoreSupport/WebDeviceProximityClient.cpp: Removed.
819 * WebProcess/WebCoreSupport/WebDeviceProximityClient.h: Removed.
820 * WebProcess/WebPage/WebPage.cpp:
821 (WebKit::m_cpuLimit):
823 2017-08-14 Simon Fraser <simon.fraser@apple.com>
825 Remove ENABLE(REQUEST_AUTOCOMPLETE) code, which was disabled everywhere
826 https://bugs.webkit.org/show_bug.cgi?id=175504
828 Reviewed by Sam Weinig.
830 * Configurations/FeatureDefines.xcconfig:
831 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
832 (WebKit::WebFrameLoaderClient::didRequestAutocomplete): Deleted.
833 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
835 2017-08-14 Simon Fraser <simon.fraser@apple.com>
837 Remove ENABLE_VIEW_MODE_CSS_MEDIA and related code
838 https://bugs.webkit.org/show_bug.cgi?id=175557
842 No port cares about the ENABLE(VIEW_MODE_CSS_MEDIA) feature, so remove it.
844 * Configurations/FeatureDefines.xcconfig:
846 2017-08-14 Andy Estes <aestes@apple.com>
848 [Apple Pay] Add support for phonetic contact names
849 https://bugs.webkit.org/show_bug.cgi?id=175537
850 <rdar://problem/32002644>
852 Reviewed by Tim Horton.
854 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: Soft-linked PKContactFieldPhoneticName.
855 (WebKit::toPKContactFields): Added code to append PKContactFieldPhoneticName to result if
856 contactFields.phoneticName is true.
857 (WebKit::toNSError): Specified PKContactFieldPhoneticName as the contact field for
858 PaymentError::ContactField::PhoneticName.
860 2017-08-14 Tim Horton <timothy_horton@apple.com>
862 Only create directory and sandbox extension handle for storage directories if they are set
863 https://bugs.webkit.org/show_bug.cgi?id=175522
865 Reviewed by Brady Eidson.
867 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
868 (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
869 If using a non-persistent WebsiteDataStore, all the storage directories
870 are unset, but we still try to create them and make sandbox extensions
871 for them. This has no effect except a ton of noisy logging, but that
872 is reason enough to stop.
874 This is similar to r216053, but for more directories.
876 2017-08-14 Zan Dobersek <zdobersek@igalia.com>
878 [CoordGraphics] Simplify CoordinatedGraphicsScene state updates
879 https://bugs.webkit.org/show_bug.cgi?id=175528
881 Reviewed by Carlos Garcia Campos.
883 Hold the information about state updates in ThreadedCompositor, in the
884 m_attributes struct. This way we don't need to store the updates in
885 functors and accumulate them in the CoordinatedGraphicsScene class, but
886 instead just apply any pending state update or atlas removal before the
889 This removes the need to update the CoordinatedGraphicsScene object from
890 the main thread with data that ultimately has to be handled on the
891 composition thread. Similarly, when updating CoordinatedGraphicsScene, we
892 only need to synchronize on the m_attributes lock object once in order to
893 retrieve the scene update information, instead of having each functor do
896 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
897 (WebKit::CoordinatedGraphicsScene::applyStateChanges):
898 (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
899 (WebKit::CoordinatedGraphicsScene::detach):
900 (WebKit::CoordinatedGraphicsScene::setActive):
901 (WebKit::CoordinatedGraphicsScene::syncRemoteContent): Deleted.
902 (WebKit::CoordinatedGraphicsScene::appendUpdate): Deleted.
903 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
904 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
905 (WebKit::ThreadedCompositor::renderLayerTree):
906 (WebKit::ThreadedCompositor::updateSceneState):
907 (WebKit::ThreadedCompositor::releaseUpdateAtlases):
908 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
910 2017-08-14 Carlos Garcia Campos <cgarcia@igalia.com>
912 [GTK][WPE] Avoid emitting WebKitFaviconDatabase::favicon-changed multiple times while setting an icon
913 https://bugs.webkit.org/show_bug.cgi?id=175531
915 Reviewed by Michael Catanzaro.
917 When webkitFaviconDatabaseSetIconForPageURL() is called, both setIconURLForPageURL() and setIconDataForIconURL()
918 might notify the client, which ends up emitting the WebKitFaviconDatabase::favicon-changed signal and calling
919 webkitFaviconDatabaseSetIconURLForPageURL(). Both things are already done by
920 webkitFaviconDatabaseSetIconForPageURL() itself, so we can just ignore the client notification while setting a
923 * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
924 (webkitFaviconDatabaseSetIconURLForPageURL): Return early if isSettingIcon is true.
925 (webkitFaviconDatabaseSetIconForPageURL): Set isSettingIcon to true for the scope.
927 2017-08-14 Carlos Garcia Campos <cgarcia@igalia.com>
929 [GTK][WPE] Crash in IconDatabase::IconRecord::setImageData()
930 https://bugs.webkit.org/show_bug.cgi?id=175527
932 Reviewed by Žan Doberšek.
934 The problem is that when setImageData() is called from IconDatabase::readFromDatabase() the shared buffer might
935 be nullptr, because getImageDataForIconURLFromSQLDatabase() returns nullptr if the icon data is not in the database.
937 * UIProcess/API/glib/IconDatabase.cpp:
938 (WebKit::IconDatabase::IconRecord::setImageData): Return early if passed in buffer is nullptr.
940 2017-08-14 Zan Dobersek <zdobersek@igalia.com>
942 [ThreadedCompositor] Improve composition and update state handling
943 https://bugs.webkit.org/show_bug.cgi?id=172448
945 Reviewed by Carlos Garcia Campos.
947 In the ThreadedCompositor and related classes, we now track composition
948 and scene update states separately. This enables properly piping in the
949 DisplayRefreshMonitor object, leveraging it for both display refresh
950 notifications and signalling to the client that the scene update is
953 In CompositingRunLoop, two separate states are now used, one for
954 compositing and the other for scene update. Access to both should be done
955 while the related Lock object is held. The pending update state is also
956 tracked in order to schedule any required updates as soon as the current
957 state update is completed.
959 In ThreadedCompositor, the information about client notification and
960 update completion coordination is now also kept under a Lock object,
961 moving away from atomics. DisplayRefreshMonitor can now utilize just
962 two methods in order to either schedule an update or report that update
965 * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
966 (WebKit::CompositingRunLoop::CompositingRunLoop):
967 (WebKit::CompositingRunLoop::scheduleUpdate):
968 (WebKit::CompositingRunLoop::stopUpdates):
969 (WebKit::CompositingRunLoop::compositionCompleted):
970 (WebKit::CompositingRunLoop::updateCompleted):
971 (WebKit::CompositingRunLoop::updateTimerFired):
972 (WebKit::CompositingRunLoop::isActive): Deleted.
973 * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
974 (WebKit::CompositingRunLoop::stateLock):
975 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
976 (WebKit::m_displayRefreshMonitor):
977 (WebKit::ThreadedCompositor::sceneUpdateFinished):
978 (WebKit::ThreadedCompositor::updateSceneState):
979 (WebKit::ThreadedCompositor::requestDisplayRefreshMonitorUpdate):
980 (WebKit::ThreadedCompositor::handleDisplayRefreshMonitorUpdate):
981 (WebKit::ThreadedCompositor::renderNextFrameIfNeeded): Deleted.
982 (WebKit::ThreadedCompositor::completeCoordinatedUpdateIfNeeded): Deleted.
983 (WebKit::ThreadedCompositor::coordinateUpdateCompletionWithClient): Deleted.
984 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
985 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
986 (WebKit::ThreadedDisplayRefreshMonitor::requestRefreshCallback):
987 (WebKit::ThreadedDisplayRefreshMonitor::displayRefreshCallback):
989 2017-08-13 Manuel Rego Casasnovas <rego@igalia.com>
991 Composition underline color is always black
992 https://bugs.webkit.org/show_bug.cgi?id=174675
994 Reviewed by Ryosuke Niwa.
996 This patch uses the current color of the text instead of black
997 for the composition underline marker.
998 This makes it visible in the case we have a black/dark background.
1000 * UIProcess/Cocoa/WebViewImpl.mm:
1001 (WebKit::extractUnderlines): If NSUnderlineColorAttributeName
1002 is not present use text color for composition underline.
1003 (WebKit::WebViewImpl::setMarkedText): Use text color
1004 for composition underline in the plain text case.
1005 * UIProcess/gtk/InputMethodFilter.cpp:
1006 (WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
1007 Use text color for composition underline.
1008 (WebKit::InputMethodFilter::updatePreedit): Ditto.
1009 * WebProcess/WebPage/WebPage.cpp:
1010 (WebKit::WebPage::setCompositionForTesting): Ditto.
1012 2017-08-13 Adrian Perez de Castro <aperez@igalia.com>
1014 [WPE] Implement WebCore::standardUserAgent()
1015 https://bugs.webkit.org/show_bug.cgi?id=175507
1017 Reviewed by Carlos Alberto Lopez Perez.
1019 Implement missing User-Agent handling for the WPE port by sharing the code with the GTK+ port.
1021 * UIProcess/API/glib/WebKitSettings.cpp: Remove preprocessor conditionals for the WPE port.
1022 (webkit_settings_set_user_agent):
1023 (webkit_settings_set_user_agent_with_application_details):
1024 * UIProcess/wpe/WebPageProxyWPE.cpp:
1025 (WebKit::WebPageProxy::standardUserAgent): Remove hardcoded value and make use of WebCore::standardUserAgent().
1027 2017-08-11 Ryosuke Niwa <rniwa@webkit.org>
1029 Replace DATA_TRANSFER_ITEMS by a runtime flag and add a stub implementation
1030 https://bugs.webkit.org/show_bug.cgi?id=175474
1031 <rdar://problem/33844628>
1033 Reviewed by Wenson Hsieh.
1035 Replaced the build flag by a runtime flag and disabled the feature by default.
1037 * Configurations/FeatureDefines.xcconfig:
1038 * Shared/WebPreferencesDefinitions.h:
1039 * UIProcess/API/C/WKPreferences.cpp:
1040 (WKPreferencesSetDataTransferItemsEnabled): Added to be used by WebKitTestRunner.
1041 (WKPreferencesGetDataTransferItemsEnabled): Ditto.
1042 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1043 * WebProcess/WebPage/WebPage.cpp:
1044 (WebKit::WebPage::updatePreferences):
1046 2017-08-10 Sam Weinig <sam@webkit.org>
1048 WTF::Function does not allow for reference / non-default constructible return types
1049 https://bugs.webkit.org/show_bug.cgi?id=175244
1051 Reviewed by Chris Dumez.
1053 * UIProcess/WebResourceLoadStatisticsStore.h:
1054 Update the default value for the updateCookiePartitioningForDomainsHandler parameter to be an
1055 empty lambda, rather than default initialization, which leads to a null WTF::Function. This allows
1056 us to remove support for calling null WTF::Function. No change in behavior.
1058 2017-08-11 Adrian Perez de Castro <aperez@igalia.com>
1060 [WPE] Build failure with Clang 4.0.1: no matching conversion for functional-style cast from 'pointer' (aka 'unsigned short *') to 'WTF::String'
1061 https://bugs.webkit.org/show_bug.cgi?id=175477
1063 Reviewed by Žan Doberšek.
1065 * Shared/wpe/WebEventFactory.cpp:
1066 (WebKit::singleCharacterStringForKeyEvent): Cast to UChar* to make
1067 compiler choose the correct WTF::String constructor.
1069 2017-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
1071 [Soup] Cannot access HTTPS sites using a HTTP proxy that requires authentication
1072 https://bugs.webkit.org/show_bug.cgi?id=175378
1074 Reviewed by Sergio Villar Senin.
1076 In case of HTTPS resource with a proxy, libsoup uses a tunnel internally, that uses its own SoupMessage during
1077 the proxy authentication. We were ignoring authentication requests for other messages.
1079 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1080 (WebKit::NetworkDataTaskSoup::authenticateCallback): Only return early if the message does't match and it's not
1081 HTTPS resource over a proxy.
1082 (WebKit::NetworkDataTaskSoup::authenticate): Use the soup message from the authentication challenge.
1083 (WebKit::NetworkDataTaskSoup::continueAuthenticate): Ditto.
1085 2017-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
1087 [Soup] Do not spawn the network process to setup cookie persistent storage
1088 https://bugs.webkit.org/show_bug.cgi?id=175424
1090 Reviewed by Sergio Villar Senin.
1092 The persistent storage configuration is saved and passed to network process as creation parameters, so we don't
1093 need to spawn the network process to configure it, when it's created eventually it will use the configuration.
1095 * UIProcess/soup/WebCookieManagerProxySoup.cpp:
1096 (WebKit::WebCookieManagerProxy::setCookiePersistentStorage): Use sendToNetworkingProcess() instead of
1097 endToNetworkingProcessRelaunchingIfNecessary().
1099 2017-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
1101 [GTK][WPE] Assertion failure in TimerBase inside WebCore::IconRecord::setImageData
1102 https://bugs.webkit.org/show_bug.cgi?id=173866
1103 <rdar://problem/33122050>
1105 Reviewed by Michael Catanzaro.
1107 IconDatabase creates and destroys IconRecord objects in both database and main thread. If the IconRecord has a
1108 valid icon, its Image could be created in one thread and destroyed in another, something that is not expected to
1109 happen, because Image has a Timer member. Since we have all the data and we are decoding it right after creating
1110 the Image, we don't really need to keep the Image object around, we could simply take a reference of the encoded
1111 data and the decoded native image to be returned by synchronousIconForPageURL().
1113 * UIProcess/API/glib/IconDatabase.cpp:
1114 (WebKit::IconDatabase::IconRecord::image): Return NativeImagePtr now.
1115 (WebKit::IconDatabase::IconRecord::setImageData): Create a BitmapImage to decode it and keep a reference to the
1116 encoded data and decoded native image.
1117 (WebKit::IconDatabase::IconRecord::snapshot const): Use m_imageData to get the encoded data.
1118 (WebKit::IconDatabase::synchronousIconForPageURL): Return the native image and whether the icon is known or not.
1119 (WebKit::IconDatabase::IconRecord::loadImageFromResource): Deleted.
1120 * UIProcess/API/glib/IconDatabase.h:
1121 * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
1122 (getIconSurfaceSynchronously): Use new API.
1124 2017-08-10 Dan Bernstein <mitz@apple.com>
1126 Restored svn:ignore values that went missing when the project got renamed.
1128 * WebKit.xcodeproj: Added property svn:ignore.
1130 2017-08-10 Brady Eidson <beidson@apple.com>
1132 Rename the source files for the WTF persistent coders.
1133 https://bugs.webkit.org/show_bug.cgi?id=175441
1135 Reviewed by Tim Horton.
1137 * NetworkProcess/cache/NetworkCacheCoders.h:
1138 * NetworkProcess/cache/NetworkCacheKey.cpp:
1139 * NetworkProcess/cache/NetworkCacheKey.h:
1140 * UIProcess/API/APIContentRuleListStore.cpp:
1142 2017-08-10 John Wilander <wilander@apple.com>
1144 Resource Load Statistics: Increase grandfathering time to 7 days
1145 https://bugs.webkit.org/show_bug.cgi?id=175414
1146 <rdar://problem/33818046>
1148 Reviewed by Brent Fulgham.
1150 * UIProcess/WebResourceLoadStatisticsStore.h:
1152 2017-08-10 John Wilander <wilander@apple.com>
1154 Resource Load Statistics: Add significant figures to telemetry calls
1155 https://bugs.webkit.org/show_bug.cgi?id=175442
1156 <rdar://problem/33834834>
1158 Reviewed by Brent Fulgham.
1160 With this change, logged values are allowed to have 3 significant figures
1161 as opposed to today's 0 which is wrong.
1163 * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
1164 (WebKit::submitTopList):
1165 (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
1167 2017-08-10 Mark Lam <mark.lam@apple.com>
1169 Apply the UNLIKELY macro to some unlikely things.
1170 https://bugs.webkit.org/show_bug.cgi?id=175440
1171 <rdar://problem/33834767>
1173 Reviewed by Yusuke Suzuki.
1175 * WebProcess/WebPage/WebPage.cpp:
1176 (WebKit::WebPage::getBytecodeProfile):
1178 2017-08-10 Chris Dumez <cdumez@apple.com>
1180 Turn on support for Beacon API by default in STP
1181 https://bugs.webkit.org/show_bug.cgi?id=175445
1182 <rdar://problem/33836379>
1184 Reviewed by Youenn Fablet.
1186 * Shared/WebPreferencesDefinitions.h:
1188 2017-08-10 Ross Kirsling <ross.kirsling@sony.com>
1190 Fix iOS simulator build after change "[WTF] Move TextStream into WTF"
1191 https://bugs.webkit.org/show_bug.cgi?id=175211
1193 Reviewed by Myles C. Maxfield.
1195 * UIProcess/API/Cocoa/WKWebView.mm:
1196 (-[WKWebView _scrollByContentOffset:]):
1197 (-[WKWebView _navigationGestureDidBegin]):
1199 2017-08-10 Chris Dumez <cdumez@apple.com>
1201 [Beacon] Do connect-src CSP check on redirects as well
1202 https://bugs.webkit.org/show_bug.cgi?id=175410
1203 <rdar://problem/33815470>
1205 Reviewed by Youenn Fablet.
1207 Pass CSP Response headers to the NetworkProcess via NetworkResourceLoadParameters
1208 when doing a PingLoad. This allows PingLoad to do CSP checks (in particular
1209 connect-src ones) in case the ping load gets redirected. Those checks need to be
1210 done on the NetworkProcess side at this point because there is no guarantee the
1211 WebContent process is still around.
1213 To do the CSP checks, PingLoad lazily reconstructs a ContentSecurityPolicy object
1214 from the CSP response headers.
1216 * NetworkProcess/NetworkResourceLoadParameters.cpp:
1217 (WebKit::NetworkResourceLoadParameters::encode const):
1218 (WebKit::NetworkResourceLoadParameters::decode):
1219 * NetworkProcess/NetworkResourceLoadParameters.h:
1220 * NetworkProcess/PingLoad.cpp:
1221 (WebKit::PingLoad::willPerformHTTPRedirection):
1222 (WebKit::PingLoad::contentSecurityPolicy):
1223 * NetworkProcess/PingLoad.h:
1224 * WebProcess/Network/WebLoaderStrategy.cpp:
1225 (WebKit::WebLoaderStrategy::createPingHandle):
1226 * WebProcess/Network/WebLoaderStrategy.h:
1228 2017-08-10 Brian Burg <bburg@apple.com>
1230 WKPreferences should conform to NSCopying
1231 https://bugs.webkit.org/show_bug.cgi?id=175303
1232 <rdar://problem/33764939>
1234 Reviewed by Dan Bernstein.
1236 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1237 Add conformance in the private header, as there is not consensus that this
1240 * UIProcess/API/Cocoa/WKPreferences.mm:
1241 (-[WKPreferences copyWithZone:]):
1242 Copy the wrapped WebPreferences instance and return its wrapper.
1244 2017-08-10 Michael Catanzaro <mcatanzaro@igalia.com>
1246 REGRESSION(r220515) [GTK][CMake] Build with ENABLE_GEOLOCATION fails on Debian Jessie
1247 https://bugs.webkit.org/show_bug.cgi?id=175426
1249 Reviewed by Carlos Alberto Lopez Perez.
1251 * PlatformGTK.cmake:
1253 2017-08-10 Brady Eidson <beidson@apple.com>
1255 Add ServiceWorkerJob.
1256 https://bugs.webkit.org/show_bug.cgi?id=175241
1258 Reviewed by Tim Horton.
1261 * WebKit.xcodeproj/project.pbxproj:
1263 * WebProcess/Storage/WebServiceWorkerProvider.cpp: Added.
1264 (WebKit::WebServiceWorkerProvider::singleton):
1265 (WebKit::WebServiceWorkerProvider::WebServiceWorkerProvider):
1266 (WebKit::WebServiceWorkerProvider::scheduleJob):
1267 * WebProcess/Storage/WebServiceWorkerProvider.h: Added.
1269 * WebProcess/WebProcess.cpp:
1270 (WebKit::WebProcess::initializeWebProcess):
1272 2017-08-10 Tim Horton <timothy_horton@apple.com>
1274 Remove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
1275 https://bugs.webkit.org/show_bug.cgi?id=175436
1276 <rdar://problem/33667497>
1278 Reviewed by Simon Fraser.
1280 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1281 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1282 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1283 (WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):
1285 2017-08-10 Michael Catanzaro <mcatanzaro@igalia.com>
1287 Remove ENABLE_GAMEPAD_DEPRECATED
1288 https://bugs.webkit.org/show_bug.cgi?id=175361
1290 Reviewed by Carlos Garcia Campos.
1292 * Configurations/FeatureDefines.xcconfig:
1294 2017-08-10 Zan Dobersek <zdobersek@igalia.com>
1296 [GTK] Don't use --whole-archive linking flags for the WebKit2 target libraries
1297 https://bugs.webkit.org/show_bug.cgi?id=175416
1299 Reviewed by Carlos Garcia Campos.
1301 * PlatformGTK.cmake: Drop the ADD_WHOLE_ARCHIVE_TO_LIBRARIES instruction
1302 for the WebKit2 target. This unnecessarily bundles complete archive
1303 files both into the main .so library as well as single executables that
1304 are linked against the WebKit2 target.
1306 2017-08-09 Chris Dumez <cdumez@apple.com>
1308 Disable Beacon API on WK1 DRT and WK2 when not using NETWORK_SESSION
1309 https://bugs.webkit.org/show_bug.cgi?id=175401
1311 Reviewed by Brady Eidson.
1313 * UIProcess/API/C/WKPreferences.cpp:
1314 (WKPreferencesSetBeaconAPIEnabled):
1315 (WKPreferencesGetBeaconAPIEnabled):
1316 * WebProcess/WebPage/WebPage.cpp:
1317 (WebKit::WebPage::updatePreferences):
1320 2017-08-09 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
1322 [PAL] Move spi/cocoa and spi/cg directories into PAL
1323 https://bugs.webkit.org/show_bug.cgi?id=175175
1325 Reviewed by Myles C. Maxfield.
1327 * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:
1328 * NetworkProcess/Downloads/mac/DownloadMac.mm:
1329 * Platform/cocoa/SharedMemoryCocoa.cpp:
1330 * Platform/mac/LayerHostingContext.mm:
1331 * Shared/Cocoa/DataDetectionResult.mm:
1332 * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
1333 * Shared/cf/CookieStorageUtilsCF.mm:
1334 * Shared/ios/InteractionInformationAtPosition.mm:
1335 * Shared/mac/HangDetectionDisablerMac.mm:
1336 * Shared/mac/RemoteLayerBackingStore.mm:
1337 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1338 * UIProcess/API/Cocoa/WKWebView.mm:
1339 * UIProcess/API/mac/WKView.mm:
1340 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
1341 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1342 * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
1343 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
1344 * UIProcess/Cocoa/WebViewImpl.h:
1345 * UIProcess/Cocoa/WebViewImpl.mm:
1346 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1347 * UIProcess/ios/ViewGestureControllerIOS.mm:
1348 * UIProcess/ios/WKContentView.mm:
1349 * UIProcess/ios/WKContentViewInteraction.mm:
1350 * UIProcess/ios/WKPDFPageNumberIndicator.mm:
1351 * UIProcess/ios/WKScrollView.mm:
1352 * UIProcess/mac/RemoteLayerTreeHost.mm:
1353 * UIProcess/mac/ServicesController.mm:
1354 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1355 * UIProcess/mac/ViewGestureControllerMac.mm:
1356 * UIProcess/mac/ViewSnapshotStore.mm:
1357 * UIProcess/mac/WKViewLayoutStrategy.mm:
1358 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1359 * WebProcess/WebPage/WebPage.cpp:
1360 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1361 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1362 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1363 * WebProcess/cocoa/WebProcessCocoa.mm:
1365 2017-08-09 John Wilander <wilander@apple.com>
1367 Resource Load Statistics: Increase grandfathering time to 3 days
1368 https://bugs.webkit.org/show_bug.cgi?id=175414
1369 <rdar://problem/33818046>
1371 Reviewed by Brent Fulgham.
1373 * UIProcess/WebResourceLoadStatisticsStore.h:
1375 2017-08-09 Jeremy Jones <jeremyj@apple.com>
1377 Invalidate PlaybackSessionManager in same fashion as VideoFullscreenManager.
1378 https://bugs.webkit.org/show_bug.cgi?id=175399
1379 rdar://problem/33663344
1381 Reviewed by Eric Carlson.
1383 Invalidate PlaybackSessionManager when WebPage is destructed.
1385 * WebProcess/WebPage/WebPage.cpp:
1386 (WebKit::WebPage::~WebPage):
1387 * WebProcess/cocoa/PlaybackSessionManager.h:
1388 * WebProcess/cocoa/PlaybackSessionManager.mm:
1389 (WebKit::PlaybackSessionManager::~PlaybackSessionManager):
1390 (WebKit::PlaybackSessionManager::invalidate):
1392 2017-08-09 Don Olmstead <don.olmstead@sony.com>
1394 [WTF] Move TextStream into WTF
1395 https://bugs.webkit.org/show_bug.cgi?id=175211
1397 Reviewed by Myles C. Maxfield.
1399 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1400 * Shared/VisibleContentRectUpdateInfo.cpp:
1401 * Shared/VisibleContentRectUpdateInfo.h:
1402 * Shared/mac/RemoteLayerTreeTransaction.mm:
1403 * UIProcess/API/Cocoa/WKWebView.mm:
1404 * UIProcess/ios/WKContentView.mm:
1405 * UIProcess/ios/WKContentViewInteraction.h:
1406 * UIProcess/ios/WKContentViewInteraction.mm:
1407 (WebKit::operator<<):
1408 * UIProcess/ios/WebPageProxyIOS.mm:
1409 * WebProcess/WebPage/ios/WebPageIOS.mm:
1410 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1411 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1413 2017-08-09 Andy Estes <aestes@apple.com>
1415 Part 3 of: Rename DatabaseProcess to StorageProcess
1416 https://bugs.webkit.org/show_bug.cgi?id=175034
1418 Reviewed by Brady Eidson.
1420 We tried renaming com.apple.WebKit.Databases to com.apple.WebKit.Storage in r219986, but
1421 this prevented trunk WebKit from running on iOS 11 devices. This is because launchd keeps a
1422 codesigned cache of XPC services, and refuses to launch services that aren't in the cache.
1424 It's not possibe for us to rebuild the cache with the new service name (only Apple's
1425 production build system can do this), and disabling the cache or opting WebKit's XPC
1426 services out of the cache might have a negative impact on our performance testing.
1428 For now we'll retain the name "com.apple.WebKit.Databases" on iOS 11 devices to work around
1429 this issue. If we find a way to allow the new service to run without impacting performance,
1430 we can revert this change.
1432 We will rename the service to "com.apple.WebKit.Storage" on macOS and iOS Simulator, and in
1433 a follow-up patch we'll use the new service name on post-iOS 11 device builds.
1435 * Configurations/BaseTarget.xcconfig: Defined WK_STORAGE_SERVICE_PRODUCT_NAME to be
1436 com.apple.WebKit.Databases by default, and overrode it to com.apple.WebKit.Storage on macOS
1438 * Configurations/StorageService.xcconfig: Changed PRODUCT_NAME to $(WK_STORAGE_SERVICE_PRODUCT_NAME).
1439 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1440 (WebKit::serviceName): Changed to return "com.apple.WebKit.Storage" on macOS and
1441 iOS Simulator platforms.
1442 * WebKit.xcodeproj/project.pbxproj: Updated the "Copy XPC services for engineering builds"
1443 build phase to use WK_STORAGE_SERVICE_PRODUCT_NAME.
1445 2017-08-09 Commit Queue <commit-queue@webkit.org>
1447 Unreviewed, rolling out r220466, r220477, and r220487.
1448 https://bugs.webkit.org/show_bug.cgi?id=175411
1450 This change broke existing API tests and follow up fixes did
1451 not resolve all the issues. (Requested by ryanhaddad on
1454 Reverted changesets:
1456 https://bugs.webkit.org/show_bug.cgi?id=175244
1457 http://trac.webkit.org/changeset/220466
1459 "WTF::Function does not allow for reference / non-default
1460 constructible return types"
1461 https://bugs.webkit.org/show_bug.cgi?id=175244
1462 http://trac.webkit.org/changeset/220477
1464 https://bugs.webkit.org/show_bug.cgi?id=175244
1465 http://trac.webkit.org/changeset/220487
1467 2017-08-09 Chris Dumez <cdumez@apple.com>
1469 [Beacon][NetworkSession] Support CORS-preflighting on redirects
1470 https://bugs.webkit.org/show_bug.cgi?id=175386
1471 <rdar://problem/33801370>
1473 Reviewed by Youenn Fablet.
1475 Add support to Beacon for doing CORS-preflighting upon redirect to a different
1478 * NetworkProcess/NetworkCORSPreflightChecker.h:
1479 * NetworkProcess/PingLoad.cpp:
1480 (WebKit::PingLoad::PingLoad):
1481 (WebKit::PingLoad::~PingLoad):
1482 (WebKit::PingLoad::loadRequest):
1483 (WebKit::PingLoad::securityOrigin const):
1484 (WebKit::PingLoad::willPerformHTTPRedirection):
1485 (WebKit::PingLoad::didReceiveResponseNetworkSession):
1486 (WebKit::PingLoad::needsCORSPreflight const):
1487 (WebKit::PingLoad::doCORSPreflight):
1488 * NetworkProcess/PingLoad.h:
1490 2017-08-09 Jeremy Jones <jeremyj@apple.com>
1492 Use MPAVRoutingController instead of deprecated versions.
1493 https://bugs.webkit.org/show_bug.cgi?id=175063
1494 rdar://problem/33301230
1496 Reviewed by Tim Horton.
1498 Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.
1500 * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
1501 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1502 (-[WKAirPlayRoutePicker dealloc]):
1503 (-[WKAirPlayRoutePicker show:fromRect:]):
1504 (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
1505 (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
1506 (-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
1507 (-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
1508 (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
1509 (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
1510 (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.
1512 2017-08-09 Sam Weinig <sam@webkit.org>
1514 WTF::Function does not allow for reference / non-default constructible return types
1515 https://bugs.webkit.org/show_bug.cgi?id=175244
1517 Reviewed by Chris Dumez.
1519 * UIProcess/WebResourceLoadStatisticsStore.h:
1520 Update the default value for the updateCookiePartitioningForDomainsHandler parameter to be an
1521 empty lambda, rather than default initialization, which leads to a null WTF::Function. This allows
1522 us to remove support for calling null WTF::Function. No change in behavior.
1524 2017-08-09 Wenson Hsieh <wenson_hsieh@apple.com>
1526 [iOS DnD] ENABLE_DRAG_SUPPORT should be turned off for iOS 10 and enabled by default
1527 https://bugs.webkit.org/show_bug.cgi?id=175392
1528 <rdar://problem/33783207>
1530 Reviewed by Tim Horton and Megan Gardner.
1532 Tweak FeatureDefines to enable drag and drop by default, and disable only on unsupported platforms (i.e. iOS 10).
1534 * Configurations/FeatureDefines.xcconfig:
1536 2017-08-09 Brady Eidson <beidson@apple.com>
1538 ServiceWorker experimental feature should not be on by default (definitely not ready).
1539 https://bugs.webkit.org/show_bug.cgi?id=175389
1541 Rubberstamped by Andy Estes.
1543 * Shared/WebPreferencesDefinitions.h: false, not DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
1545 2017-08-09 Ryan Haddad <ryanhaddad@apple.com>
1547 Unreviewed, rolling out r220457.
1549 This change introduced API test failures.
1553 "WTF::Function does not allow for reference / non-default
1554 constructible return types"
1555 https://bugs.webkit.org/show_bug.cgi?id=175244
1556 http://trac.webkit.org/changeset/220457
1558 2017-08-09 Daniel Bates <dabates@apple.com>
1560 REGRESSION (r219013): OAuth flows are broken when redirecting back to application after authentication
1561 https://bugs.webkit.org/show_bug.cgi?id=175247
1562 <rdar://problem/33679804>
1564 Reviewed by Brady Eidson.
1566 Add SPI WKNavigationAction._isRedirect to query whether the navigation was in response to receiving
1567 a redirect response. The majority of the WebKit change is plumbing this knowledge through to connect
1570 * Shared/NavigationActionData.cpp:
1571 (WebKit::NavigationActionData::encode const):
1572 (WebKit::NavigationActionData::decode):
1573 Encode and decode the boolean NavigationActionData::isRedirect.
1574 * Shared/NavigationActionData.h:
1575 * UIProcess/API/APINavigationAction.h:
1576 * UIProcess/API/Cocoa/WKNavigationAction.mm:
1577 (-[WKNavigationAction _isRedirect]): Added.
1578 * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
1579 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1580 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Set NavigationActionData::isRedirect
1581 depending on whether the navigation is in response to receiving a redirect response.
1582 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1584 2017-08-09 Sam Weinig <sam@webkit.org>
1586 WTF::Function does not allow for reference / non-default constructible return types
1587 https://bugs.webkit.org/show_bug.cgi?id=175244
1589 Reviewed by Chris Dumez.
1591 * UIProcess/WebResourceLoadStatisticsStore.h:
1592 Update the default value for the updateCookiePartitioningForDomainsHandler parameter to be an
1593 empty lambda, rather than default initialization, which leads to a null WTF::Function. This allows
1594 us to remove support for calling null WTF::Function. No change in behavior.
1596 2017-08-08 Wenson Hsieh <wenson_hsieh@apple.com>
1598 Unreviewed, rolling out r220393.
1600 This patch regresses the performance of WebPage::editorState.
1604 "[iOS WK2] WKWebView schedules nonstop layout after pressing
1605 cmb+b,i,u inside a contenteditable div"
1606 https://bugs.webkit.org/show_bug.cgi?id=175116
1607 http://trac.webkit.org/changeset/220393
1609 2017-08-08 Chris Dumez <cdumez@apple.com>
1611 [Beacon] Add support for CORS-preflighting for WK2 / NETWORK_SESSION
1612 https://bugs.webkit.org/show_bug.cgi?id=175264
1613 <rdar://problem/33547793>
1615 Reviewed by Youenn Fablet.
1617 Implement CORS-preflighting for beacons with a payload that has a non
1618 safelisted MIME type, as per:
1619 - https://w3c.github.io/beacon/#privacy
1620 - https://www.w3.org/TR/beacon/#sec-processing-model
1622 CORS-preflighting is completely handled on Network Process side because
1623 a beacon request can outlive its page and therefore its WebContent
1624 process. This requires us to pass a little more information to the
1625 Network process, in particular the source origin and the corsMode.
1627 The current implementation does not currently deal with CORS preflights
1628 needed upon a redirect. This will be added in a follow-up.
1631 * NetworkProcess/NetworkCORSPreflightChecker.cpp: Added.
1632 (WebKit::NetworkCORSPreflightChecker::NetworkCORSPreflightChecker):
1633 (WebKit::NetworkCORSPreflightChecker::~NetworkCORSPreflightChecker):
1634 (WebKit::NetworkCORSPreflightChecker::startPreflight):
1635 (WebKit::NetworkCORSPreflightChecker::willPerformHTTPRedirection):
1636 (WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):
1637 (WebKit::NetworkCORSPreflightChecker::didReceiveResponseNetworkSession):
1638 (WebKit::NetworkCORSPreflightChecker::didReceiveData):
1639 (WebKit::NetworkCORSPreflightChecker::didCompleteWithError):
1640 (WebKit::NetworkCORSPreflightChecker::didSendData):
1641 (WebKit::NetworkCORSPreflightChecker::wasBlocked):
1642 (WebKit::NetworkCORSPreflightChecker::cannotShowURL):
1643 * NetworkProcess/NetworkCORSPreflightChecker.h: Added.
1644 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1645 (WebKit::NetworkConnectionToWebProcess::loadPing):
1646 * NetworkProcess/NetworkConnectionToWebProcess.h:
1647 * NetworkProcess/NetworkResourceLoadParameters.cpp:
1648 (WebKit::NetworkResourceLoadParameters::encode const):
1649 (WebKit::NetworkResourceLoadParameters::decode):
1650 * NetworkProcess/NetworkResourceLoadParameters.h:
1651 * NetworkProcess/PingLoad.cpp: Added.
1652 (WebKit::PingLoad::PingLoad):
1653 (WebKit::PingLoad::~PingLoad):
1654 (WebKit::PingLoad::startNetworkLoad):
1655 (WebKit::PingLoad::willPerformHTTPRedirection):
1656 (WebKit::PingLoad::didReceiveChallenge):
1657 (WebKit::PingLoad::didReceiveResponseNetworkSession):
1658 (WebKit::PingLoad::didReceiveData):
1659 (WebKit::PingLoad::didCompleteWithError):
1660 (WebKit::PingLoad::didSendData):
1661 (WebKit::PingLoad::wasBlocked):
1662 (WebKit::PingLoad::cannotShowURL):
1663 (WebKit::PingLoad::timeoutTimerFired):
1664 (WebKit::PingLoad::needsCORSPreflight const):
1665 (WebKit::PingLoad::doCORSPreflight):
1666 * NetworkProcess/PingLoad.h:
1667 * WebKit.xcodeproj/project.pbxproj:
1668 * WebProcess/Network/WebLoaderStrategy.cpp:
1669 (WebKit::WebLoaderStrategy::createPingHandle):
1670 * WebProcess/Network/WebLoaderStrategy.h:
1672 2017-08-08 Megan Gardner <megan_gardner@apple.com>
1674 Remove old and unused pointIsInAssistedNode definition
1675 https://bugs.webkit.org/show_bug.cgi?id=175335
1677 Stage removal here to allow removal from UIKit.
1678 Replaced by textInteractionGesture:shouldBeginAtPoint:
1680 Reviewed by Tim Horton.
1682 * Platform/spi/ios/UIKitSPI.h:
1683 * UIProcess/ios/WKContentViewInteraction.mm:
1684 (-[WKContentView pointIsInAssistedNode:]): Deleted.
1686 2017-08-08 Michael Catanzaro <mcatanzaro@igalia.com>
1688 Unreviewed, fix Ubuntu LTS build
1689 https://bugs.webkit.org/show_bug.cgi?id=174490
1691 * UIProcess/glib/RemoteInspectorClient.cpp:
1692 (WebKit::RemoteInspectorClient::RemoteInspectorClient):
1694 2017-08-08 Wenson Hsieh <wenson_hsieh@apple.com>
1696 Unreviewed, fix the Mac debug build after r220418.
1698 * UIProcess/Cocoa/WebViewImpl.mm:
1699 (WebKit::WebViewImpl::prepareForMoveToWindow):
1701 2017-08-08 Wenson Hsieh <wenson_hsieh@apple.com>
1703 [Mac WK2] WebViewImpl should hold a weak pointer to its WKWebView or WKView
1704 https://bugs.webkit.org/show_bug.cgi?id=175302
1705 <rdar://problem/33762116>
1707 Reviewed by Tim Horton.
1709 Refactor WebViewImpl's m_view from a raw pointer to a WeakObjCPtr to ensure that it is automatically cleared out
1710 when the WKWebView or WKView are destroyed, and also changes several places where we implicitly block capture
1711 the WebViewImpl to only capture a WeakPtr to the WebViewImpl. Most of the changes here are boilerplate
1712 adjustments for how m_view is now a weak pointer.
1714 Test: WKWebViewMacEditingTests.DoNotCrashWhenInterpretingKeyEventWhileDeallocatingView.
1716 * Shared/mac/WeakObjCPtr.h:
1717 (WebKit::WeakObjCPtr::operator ValueType * const):
1718 * UIProcess/Cocoa/WebViewImpl.h:
1719 * UIProcess/Cocoa/WebViewImpl.mm:
1720 (WebKit::WebViewImpl::updateTouchBar):
1721 (WebKit::WebViewImpl::updateMediaTouchBar):
1722 (WebKit::WebViewImpl::WebViewImpl):
1723 (WebKit::WebViewImpl::~WebViewImpl):
1724 (WebKit::WebViewImpl::window):
1725 (WebKit::WebViewImpl::resignFirstResponder):
1726 (WebKit::WebViewImpl::isFocused const):
1727 (WebKit::WebViewImpl::renewGState):
1728 (WebKit::WebViewImpl::setFrameAndScrollBy):
1729 (WebKit::WebViewImpl::updateWindowAndViewFrames):
1730 (WebKit::WebViewImpl::updateLayer):
1731 (WebKit::WebViewImpl::printOperationWithPrintInfo):
1732 (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
1733 (WebKit::WebViewImpl::setLayoutMode):
1734 (WebKit::WebViewImpl::intrinsicDeviceScaleFactor const):
1735 (WebKit::WebViewImpl::windowDidBecomeKey):
1736 (WebKit::WebViewImpl::windowDidResignKey):
1737 (WebKit::WebViewImpl::windowDidChangeScreen):
1738 (WebKit::WebViewImpl::mightBeginDragWhileInactive):
1739 (WebKit::WebViewImpl::acceptsFirstMouse):
1740 (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
1741 (WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
1742 (WebKit::WebViewImpl::viewWillMoveToWindow):
1743 (WebKit::WebViewImpl::viewDidMoveToWindow):
1744 (WebKit::WebViewImpl::viewDidChangeBackingProperties):
1745 (WebKit::WebViewImpl::hitTest):
1746 (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
1747 (WebKit::WebViewImpl::colorSpace):
1748 (WebKit::WebViewImpl::prepareForMoveToWindow):
1749 (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
1750 (WebKit::WebViewImpl::pressureChangeWithEvent):
1751 (WebKit::WebViewImpl::fullScreenWindowController):
1752 (WebKit::WebViewImpl::executeSavedCommandBySelector):
1753 (WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
1754 (WebKit::WebViewImpl::handleRequestedCandidates):
1755 (WebKit::WebViewImpl::preferencesDidChange):
1756 (WebKit::WebViewImpl::setTextIndicator):
1757 (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
1758 (WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
1759 (WebKit::WebViewImpl::sendToolTipMouseExited):
1760 (WebKit::WebViewImpl::sendToolTipMouseEntered):
1761 (WebKit::WebViewImpl::toolTipChanged):
1762 (WebKit::WebViewImpl::setAcceleratedCompositingRootLayer):
1763 (WebKit::WebViewImpl::updateThumbnailViewLayer):
1764 (WebKit::WebViewImpl::setInspectorAttachmentView):
1765 (WebKit::WebViewImpl::inspectorAttachmentView):
1766 (WebKit::WebViewImpl::draggedImage):
1767 (WebKit::WebViewImpl::draggingEntered):
1768 (WebKit::WebViewImpl::draggingUpdated):
1769 (WebKit::WebViewImpl::draggingExited):
1770 (WebKit::WebViewImpl::performDragOperation):
1771 (WebKit::WebViewImpl::hitTestForDragTypes):
1772 (WebKit::WebViewImpl::startWindowDrag):
1773 (WebKit::WebViewImpl::dragImageForView):
1774 (WebKit::WebViewImpl::setPromisedDataForImage):
1775 (WebKit::WebViewImpl::setPromisedDataForAttachment):
1776 (WebKit::WebViewImpl::takeViewSnapshot):
1777 (WebKit::WebViewImpl::scrollWheel):
1778 (WebKit::WebViewImpl::magnifyWithEvent):
1779 (WebKit::WebViewImpl::rotateWithEvent):
1780 (WebKit::WebViewImpl::doneWithKeyEvent):
1781 (WebKit::WebViewImpl::interpretKeyEvent):
1782 (WebKit::WebViewImpl::firstRectForCharacterRange):
1783 (WebKit::WebViewImpl::characterIndexForPoint):
1784 (WebKit::WebViewImpl::performKeyEquivalent):
1785 (WebKit::WebViewImpl::keyUp):
1786 (WebKit::WebViewImpl::keyDown):
1787 (WebKit::WebViewImpl::mouseMoved):
1788 (WebKit::WebViewImpl::windowIsFrontWindowUnderMouse):
1789 (WebKit::WebViewImpl::userInterfaceLayoutDirection):
1791 2017-08-08 Filip Pizlo <fpizlo@apple.com>
1793 Baseline JIT should do caging
1794 https://bugs.webkit.org/show_bug.cgi?id=175037
1796 Reviewed by Mark Lam.
1798 Use a better API to disable disabling the primitive gigacage.
1800 * WebProcess/WebProcess.cpp:
1801 (WebKit::m_webSQLiteDatabaseTracker):
1802 (WebKit::primitiveGigacageDisabled): Deleted.
1804 2017-08-08 John Wilander <wilander@apple.com>
1806 Resource Load Statistics: Clear web processes' state on history removal
1807 https://bugs.webkit.org/show_bug.cgi?id=175271
1808 <rdar://problem/33756560>
1810 Reviewed by Chris Dumez.
1812 https://bugs.webkit.org/show_bug.cgi?id=175090 introduced state
1813 in the web process and that state needs to be cleared when the
1814 UI process' statistics are cleared as part of history removal.
1816 * UIProcess/WebProcessPool.cpp:
1817 (WebKit::WebProcessPool::clearResourceLoadStatistics):
1818 * UIProcess/WebProcessPool.h:
1819 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1820 (WebKit::WebsiteDataStore::removeData):
1821 (WebKit::WebsiteDataStore::clearResourceLoadStatisticsInWebProcesses):
1822 * UIProcess/WebsiteData/WebsiteDataStore.h:
1823 * WebProcess/WebProcess.cpp:
1824 (WebKit::WebProcess::clearResourceLoadStatistics):
1825 * WebProcess/WebProcess.h:
1826 * WebProcess/WebProcess.messages.in:
1828 2017-08-08 Adrian Perez de Castro <aperez@igalia.com>
1830 [WPE] Implement WebsiteDataStore::defaultApplicationCacheDirectory() and friends
1831 https://bugs.webkit.org/show_bug.cgi?id=175322
1833 Reviewed by Carlos Garcia Campos.
1835 This makes WPE use the same implementation as the GTK+ port, with a preprocessor switch to choose the name of
1836 the base directory inside the user XDG cache directory.
1838 * PlatformGTK.cmake: Add APIWebsiteDataStoreGLib.cpp to the build sources and remove APIWebsiteDataStoreGtk.cpp.
1839 * PlatformWPE.cmake: Add APIWebsiteDataStoreGLib.cpp to the built sources.
1840 * UIProcess/API/APIWebsiteDataStore.cpp: Remove now dead code.
1841 * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: Renamed from Source/WebKit/UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp.
1842 (API::WebsiteDataStore::defaultApplicationCacheDirectory):
1843 (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
1844 (API::WebsiteDataStore::defaultLocalStorageDirectory):
1845 (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
1846 (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
1847 (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory):
1849 2017-08-08 Ryan Haddad <ryanhaddad@apple.com>
1851 Unreviewed, rolling out r220368.
1853 This change caused WK1 tests to exit early with crashes.
1857 "Baseline JIT should do caging"
1858 https://bugs.webkit.org/show_bug.cgi?id=175037
1859 http://trac.webkit.org/changeset/220368
1861 2017-08-08 Michael Catanzaro <mcatanzaro@igalia.com>
1863 [CMake] Properly test if compiler supports compiler flags
1864 https://bugs.webkit.org/show_bug.cgi?id=174490
1866 Reviewed by Konstantin Tokarev.
1869 * PlatformGTK.cmake:
1871 2017-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
1873 Web Automation: setUserInputForCurrentJavaScriptPrompt should fail if current dialog is not a prompt
1874 https://bugs.webkit.org/show_bug.cgi?id=175261
1876 Reviewed by Brian Burg.
1878 According to the spec, send alert text command should fail if the current dialog is not a prompt. This patch
1879 adds JavaScriptDialogType enum to API::AutomationSessionClient and a new virtual method to ask the client about
1880 the type of the current dialog. WebAutomationSession::setUserInputForCurrentJavaScriptPrompt() uses the new
1881 client method to check the type of the current dialog and fail in case it's not a prompt. Cocoa needs an
1882 implementation, for now it always returns Prompt as the type to keep compatibility.
1884 18.4 Send Alert Text.
1885 https://w3c.github.io/webdriver/webdriver-spec.html#send-alert-text
1887 This fixes selenium test testSettingTheValueOfAnAlertThrows.
1889 * UIProcess/API/APIAutomationSessionClient.h:
1890 (API::AutomationSessionClient::typeOfCurrentJavaScriptDialogOnPage):
1891 * UIProcess/API/glib/WebKitAutomationSession.cpp:
1892 * UIProcess/API/glib/WebKitWebView.cpp:
1893 (webkitWebViewGetCurrentScriptDialogType):
1894 * UIProcess/API/glib/WebKitWebViewPrivate.h:
1895 * UIProcess/Automation/Automation.json:
1896 * UIProcess/Automation/WebAutomationSession.cpp:
1897 (WebKit::WebAutomationSession::setUserInputForCurrentJavaScriptPrompt):
1898 * UIProcess/Cocoa/AutomationSessionClient.h:
1899 * UIProcess/Cocoa/AutomationSessionClient.mm:
1900 (WebKit::AutomationSessionClient::typeOfCurrentJavaScriptDialogOnPage):
1902 2017-08-08 Wenson Hsieh <wenson_hsieh@apple.com>
1904 [iOS WK2] WKWebView schedules nonstop layout after pressing cmb+b,i,u inside a contenteditable div
1905 https://bugs.webkit.org/show_bug.cgi?id=175116
1906 <rdar://problem/28279301>
1908 Reviewed by Darin Adler and Ryosuke Niwa.
1910 Refactors WebPage::editorState to only use the StyleProperties derived from EditingStyle, instead of inserting
1911 and removing a temporary node to figure out the style. Also adds hooks to notify the UI delegate of EditorState
1914 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1915 * UIProcess/API/Cocoa/WKWebView.mm:
1917 (dictionaryRepresentationForEditorState):
1918 (-[WKWebView _didChangeEditorState]):
1920 Alerts the private UI delegate of UI-side EditorState updates.
1922 (-[WKWebView _web_editorStateDidChange]):
1923 (-[WKWebView _executeEditCommand:argument:completion:]):
1924 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1925 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1926 * UIProcess/API/mac/WKView.mm:
1927 (-[WKView _web_editorStateDidChange]):
1928 * UIProcess/Cocoa/WebViewImpl.h:
1929 * UIProcess/Cocoa/WebViewImpl.mm:
1930 (WebKit::WebViewImpl::selectionDidChange):
1931 * UIProcess/WebPageProxy.cpp:
1932 (WebKit::WebPageProxy::executeEditCommand):
1934 Change executeEditCommand(name, callback) to executeEditCommand(name, argument, callback) and lift out of iOS
1935 platform code and into WebPage.cpp.
1937 * UIProcess/WebPageProxy.h:
1938 * UIProcess/ios/WKContentViewInteraction.mm:
1939 (-[WKContentView executeEditCommandWithCallback:]):
1940 (-[WKContentView _selectionChanged]):
1941 * UIProcess/ios/WebPageProxyIOS.mm:
1942 (WebKit::WebPageProxy::executeEditCommand): Deleted.
1944 Move the iOS-specific implementation of executeEditCommand that invokes a callback when the web process responds
1945 out of WebPageProxyIOS, and into cross-platform WebPageProxy code. Additionally, add a parameter for the edit
1948 * WebProcess/WebPage/WebPage.cpp:
1949 (WebKit::WebPage::editorState const):
1951 Use EditingStyle::styleAtSelectionStart instead of Editor::styleForSelectionStart when computing an EditorState.
1952 Tweak bold, italic and underline to use EditingStyle TriStates.
1954 (WebKit::shouldEnsureEditorStateUpdateAfterExecutingCommand):
1955 (WebKit::WebPage::executeEditCommandWithCallback):
1956 * WebProcess/WebPage/WebPage.h:
1957 * WebProcess/WebPage/WebPage.messages.in:
1958 * WebProcess/WebPage/ios/WebPageIOS.mm:
1959 (WebKit::WebPage::executeEditCommandWithCallback): Deleted.
1961 2017-08-08 Zan Dobersek <zdobersek@igalia.com>
1963 [TexMap] Don't expose GraphicsContext3D object
1964 https://bugs.webkit.org/show_bug.cgi?id=175310
1966 Reviewed by Carlos Garcia Campos.
1968 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1969 (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
1970 Stop using GraphicsContext3D directly and instead use the
1971 TextureMapper::clearColor() method to achieve the same result.
1973 2017-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
1975 [GTK] Implement JavaScript dialog methods of API::AutomationSessionClient
1976 https://bugs.webkit.org/show_bug.cgi?id=175259
1978 Reviewed by Michael Catanzaro.
1980 Move the default implementation of WebKitScriptDialog from WebKitWebView platform specific files to their own
1981 files. Implement all JavaScript dialog methods of API::AutomationSessionClient in WebKitAutomationSession. For
1982 now it only works when the user doesn't override WebKitWebView::script-dialog signal and default implementation
1985 * PlatformGTK.cmake: Add new files to compilation.
1986 * PlatformWPE.cmake: Ditto.
1987 * UIProcess/API/glib/WebKitAutomationSession.cpp:
1988 (webkitAutomationSessionCreate): Pass the WebKitWebContext to the constructor and keep a pointer to it in session.
1989 * UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
1990 * UIProcess/API/glib/WebKitScriptDialogPrivate.h:
1991 * UIProcess/API/glib/WebKitWebContext.cpp:
1992 * UIProcess/API/glib/WebKitWebView.cpp:
1993 (webkitWebViewRunJavaScriptAlert): Set the currently script dialog for the scope of the function.
1994 (webkitWebViewRunJavaScriptConfirm): Ditto.
1995 (webkitWebViewRunJavaScriptPrompt): Ditto.
1996 (webkitWebViewRunJavaScriptBeforeUnloadConfirm): Ditto.
1997 (webkitWebViewIsShowingScriptDialog): Ask current dialog if there's one.
1998 (webkitWebViewGetCurrentScriptDialogMessage): Ditto.
1999 (webkitWebViewSetCurrentScriptDialogUserInput): Ditto.
2000 (webkitWebViewAcceptCurrentScriptDialog): Ditto.
2001 (webkitWebViewDismissCurrentScriptDialog): Ditto.
2002 * UIProcess/API/glib/WebKitWebViewPrivate.h:
2003 * UIProcess/API/gtk/WebKitScriptDialogGtk.cpp: Added.
2004 (webkitWebViewCreateJavaScriptDialog): Moved from WebKitWebViewGtk.cpp.
2005 (webkitScriptDialogRun): Run the dialog, this code is moved from WebKitWebViewGtk.cpp.
2006 (webkitScriptDialogIsRunning): Return true if the script dialog has a native dialog running.
2007 (webkitScriptDialogAccept): Send Ok or Close response to the native dialog depending on the dialog type.
2008 (webkitScriptDialogDismiss): Send Close response to the native dialog.
2009 (webkitScriptDialogSetUserInput): Set the given text on the prompt dialog entry.
2010 * UIProcess/API/gtk/WebKitWebViewGtk.cpp:
2011 (webkitWebViewScriptDialog): Simply call webkitScriptDialogRun() now.
2012 * UIProcess/API/wpe/WebKitScriptDialogWPE.cpp: Copied from Source/WebKit/UIProcess/API/glib/WebKitAutomationSessionPrivate.h.
2013 (webkitScriptDialogRun):
2014 (webkitScriptDialogIsRunning):
2015 (webkitScriptDialogAccept):
2016 (webkitScriptDialogDismiss):
2017 (webkitScriptDialogSetUserInput):
2019 2017-08-07 Devin Rousso <drousso@apple.com>
2021 Web Inspector: Preview Canvas path when viewing a recording
2022 https://bugs.webkit.org/show_bug.cgi?id=174967
2024 Reviewed by Brian Burg.
2026 * Shared/WebPreferencesDefinitions.h:
2027 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2028 * UIProcess/API/C/WKPreferences.cpp:
2029 (WKPreferencesSetInspectorAdditionsEnabled):
2030 (WKPreferencesGetInspectorAdditionsEnabled):
2031 * WebProcess/WebPage/WebPage.cpp:
2032 (WebKit::WebPage::updatePreferences):
2033 Add plumbing for new InspectorAdditions runtime flag.
2035 * WebProcess/WebPage/WebInspectorUI.cpp:
2036 (WebKit::WebInspectorUI::WebInspectorUI):
2037 Enable InspectorAdditions by default in the WebInspector page.
2039 2017-08-07 Filip Pizlo <fpizlo@apple.com>
2041 Baseline JIT should do caging
2042 https://bugs.webkit.org/show_bug.cgi?id=175037
2044 Reviewed by Mark Lam.
2046 Use a better API to disable disabling the primitive gigacage.
2048 * WebProcess/WebProcess.cpp:
2049 (WebKit::m_webSQLiteDatabaseTracker):
2050 (WebKit::primitiveGigacageDisabled): Deleted.
2052 2017-08-06 Filip Pizlo <fpizlo@apple.com>
2054 Primitive auxiliaries and JSValue auxiliaries should have separate gigacages
2055 https://bugs.webkit.org/show_bug.cgi?id=174919
2057 Reviewed by Keith Miller.
2059 The disable callback is all about the primitive gigacage.
2061 * WebProcess/WebProcess.cpp:
2062 (WebKit::primitiveGigacageDisabled):
2063 (WebKit::m_webSQLiteDatabaseTracker):
2064 (WebKit::gigacageDisabled): Deleted.
2066 2017-08-07 Brian Burg <bburg@apple.com>
2068 Remove CANVAS_PATH compilation guard
2069 https://bugs.webkit.org/show_bug.cgi?id=175207
2071 Reviewed by Sam Weinig.
2073 * Configurations/FeatureDefines.xcconfig:
2075 2017-08-07 Carlos Alberto Lopez Perez <clopez@igalia.com>
2077 [WPE][CMake] Only pass pkg-config CFLAGS from (E)GL when not using libepoxy.
2078 https://bugs.webkit.org/show_bug.cgi?id=175125
2080 Reviewed by Michael Catanzaro.
2082 * CMakeLists.txt: When using libepoxy avoid passing the CFLAGS from (E)GL,
2083 and instead pass the libepoxy ones.
2085 2017-08-07 Carlos Alberto Lopez Perez <clopez@igalia.com>
2087 [GTK][WPE] CFLAGS from pkg-config for (E)GL are not passed to WebKit
2088 https://bugs.webkit.org/show_bug.cgi?id=175125
2090 Unreviewed follow-up fix after r220326.
2092 * CMakeLists.txt: Move the block appending to WebKit2_LIBRARIES
2093 below where the list itself is created.
2095 2017-08-05 Carlos Garcia Campos <cgarcia@igalia.com>
2097 [GTK][WPE] Add API to provide browser information required by automation
2098 https://bugs.webkit.org/show_bug.cgi?id=175130
2100 Reviewed by Michael Catanzaro.
2102 When a new automation session is started, the web driver receives some required capabilities from the client,
2103 like browser name and version. The session should be rejected if those required capabilities don't match with
2104 the actual browser that is launched. We don't know that information in WebKit, so we need to add API so that
2105 users can provide it when a new session request is made. This patch adds boxed object WebKitApplicationInfo that
2106 can be used to set the application name and version. This object can be set to a WebKitAutomationSession when
2107 WebKitWebContext::automation-started signal is emitted.
2109 * PlatformGTK.cmake:
2110 * PlatformWPE.cmake:
2111 * UIProcess/API/glib/WebKitApplicationInfo.cpp: Added.
2112 (webkit_application_info_new):
2113 (webkit_application_info_ref):
2114 (webkit_application_info_unref):
2115 (webkit_application_info_set_name):
2116 (webkit_application_info_get_name):
2117 (webkit_application_info_set_version):
2118 (webkit_application_info_get_version):
2119 * UIProcess/API/glib/WebKitAutomationSession.cpp:
2120 (webkitAutomationSessionDispose):
2121 (webkit_automation_session_class_init):
2122 (webkitAutomationSessionGetBrowserName):
2123 (webkitAutomationSessionGetBrowserVersion):
2124 (webkit_automation_session_set_application_info):
2125 (webkit_automation_session_get_application_info):
2126 * UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
2127 * UIProcess/API/glib/WebKitWebContext.cpp:
2128 * UIProcess/API/gtk/WebKitApplicationInfo.h: Added.
2129 * UIProcess/API/gtk/WebKitAutomationSession.h:
2130 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2131 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
2132 * UIProcess/API/gtk/webkit2.h:
2133 * UIProcess/API/wpe/WebKitApplicationInfo.h: Added.
2134 * UIProcess/API/wpe/WebKitAutomationSession.h:
2135 * UIProcess/API/wpe/webkit.h:
2137 2017-08-06 Carlos Alberto Lopez Perez <clopez@igalia.com>
2139 [GTK][WPE] CFLAGS from pkg-config for (E)GL are not passed to WebKit
2140 https://bugs.webkit.org/show_bug.cgi?id=175125
2142 Reviewed by Michael Catanzaro.
2144 Some platforms define cflags on the (E)GL pkg-config files that we
2145 need to pass to the build system when including the (E)GL headers.
2146 And we are already doing this when building WebCore (after r184954).
2148 But now we need to do this also on WebKit (former WebKit2) because
2149 we include (E)GL headers (and make use of them) on the UIProcess.
2153 2017-08-05 Carlos Garcia Campos <cgarcia@igalia.com>
2155 WebDriver: Implement page load strategy
2156 https://bugs.webkit.org/show_bug.cgi?id=175183
2158 Reviewed by Brian Burg.
2160 Split pending navigation maps into normal and eager, and use one or the other depending on the received page
2161 load strategy. We need to keep different maps for every page load strategy because every command could use a
2164 * UIProcess/Automation/WebAutomationSession.cpp:
2165 (WebKit::WebAutomationSession::waitForNavigationToComplete): Extract page load strategy from parameter and pass
2166 it to waitForNavigationToCompleteOnPage() and waitForNavigationToCompleteOnFrame().
2167 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage): Return early if page load strategy is
2168 none. Otherwise at the pening callback to the normal or eager map depeding on the page load straegy.
2169 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame): Ditto.
2170 (WebKit::respondToPendingNavigationCallbacksWithTimeout): Helper to send pening navigation callback in case of
2172 (WebKit::WebAutomationSession::loadTimerFired): Call finishPendingNavigationsWithTimeoutFailure() with all the maps.
2173 (WebKit::WebAutomationSession::navigateBrowsingContext): Extract page load strategy from parameter and pass it
2174 to waitForNavigationToCompleteOnPage().
2175 (WebKit::WebAutomationSession::goBackInBrowsingContext): Ditto.
2176 (WebKit::WebAutomationSession::goForwardInBrowsingContext): Ditto.
2177 (WebKit::WebAutomationSession::reloadBrowsingContext): Ditto.
2178 (WebKit::WebAutomationSession::navigationOccurredForFrame): Use the normal maps.
2179 (WebKit::WebAutomationSession::documentLoadedForFrame): Stop timeout timer and dispatch eager pending navigations.
2180 * UIProcess/Automation/WebAutomationSession.h:
2181 * UIProcess/WebPageProxy.cpp:
2182 (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): Notify the automation session.
2184 2017-08-05 Carlos Garcia Campos <cgarcia@igalia.com>
2186 WebDriver: use in-view center point for clicks instead of bounding box center point
2187 https://bugs.webkit.org/show_bug.cgi?id=174863
2189 Reviewed by Simon Fraser.
2191 Change computeElementLayout to also return the in-view center point and whether it's obscured by another
2194 * UIProcess/Automation/Automation.json: Add optional inViewCenterPoint to the result and isObscured.
2195 * UIProcess/Automation/WebAutomationSession.cpp:
2196 (WebKit::WebAutomationSession::didComputeElementLayout): Handle inViewCenterPoint and isObscured.
2197 * UIProcess/Automation/WebAutomationSession.h:
2198 * UIProcess/Automation/WebAutomationSession.messages.in:
2199 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
2200 (WebKit::elementInViewClientCenterPoint): Get the client in-view center point and whether it's obscured
2201 according to the spec.
2202 (WebKit::WebAutomationSessionProxy::computeElementLayout): Pass inViewCenterPoint and isObscured to
2203 DidComputeElementLayout message.
2205 2017-08-05 Brian Burg <bburg@apple.com>
2207 Web Automation: files selected for upload should be matched against 'accept' attribute values case-insensitively
2208 https://bugs.webkit.org/show_bug.cgi?id=175191
2209 <rdar://problem/33725790>
2211 Reviewed by Carlos Garcia Campos.
2213 Values of the "accept" attribute are to be compared in a case-insensitive manner, per
2214 https://html.spec.whatwg.org/multipage/input.html#file-upload-state-(type=file)
2216 Except for converting MIME types and extensions to lowercase, most of these changes
2217 were lost in a rebase prior to landing the patch.
2219 * UIProcess/Automation/WebAutomationSession.cpp:
2220 (WebKit::fileCanBeAcceptedForUpload): Fix some issues:
2221 - Handle a file ending in a period.
2222 - Handle MIME type inference failing.
2223 - Convert extensions and MIMEs to lower case, per specification.
2225 (WebKit::WebAutomationSession::handleRunOpenPanel):
2226 - Strip the leading period from file extensions.
2227 - These range converters crash unless the API::Array is retained by a local variable.
2229 2017-08-04 Youenn Fablet <youenn@apple.com>
2231 [Cache API] Add Cache and CacheStorage IDL definitions
2232 https://bugs.webkit.org/show_bug.cgi?id=175201
2234 Reviewed by Brady Eidson.
2236 * Shared/WebPreferencesDefinitions.h:
2237 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2238 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2239 * WebProcess/WebPage/WebPage.cpp:
2240 (WebKit::WebPage::updatePreferences):
2242 2017-08-04 Brian Burg <bburg@apple.com>
2244 Expose WKPreferences SPI for toggling mock capture devices prompt
2245 https://bugs.webkit.org/show_bug.cgi?id=175227
2246 <rdar://problem/33734528>
2248 Reviewed by Youenn Fablet.
2250 * UIProcess/API/Cocoa/WKPreferences.mm:
2251 (-[WKPreferences _mockCaptureDevicesPromptEnabled]):
2252 (-[WKPreferences _setMockCaptureDevicesPromptEnabled:]):
2253 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2255 2017-08-04 Brian Burg <bburg@apple.com>
2257 Fix typo in WKPreferences _iceCandidateFiltertingEnabled property
2258 https://bugs.webkit.org/show_bug.cgi?id=175224
2260 Reviewed by Tim Horton.
2262 * UIProcess/API/Cocoa/WKPreferences.mm:
2263 (-[WKPreferences _iceCandidateFilteringEnabled]):
2264 (-[WKPreferences _iceCandidateFiltertingEnabled]): Deleted.
2265 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2267 2017-08-04 Chris Dumez <cdumez@apple.com>
2269 [Beacon] Update sendBeacon to use the CachedResourceLoader
2270 https://bugs.webkit.org/show_bug.cgi?id=175192
2271 <rdar://problem/33725923>
2273 Reviewed by Youenn Fablet.
2275 Deal with new Beacon CachedResource type.
2277 * WebProcess/Network/WebLoaderStrategy.cpp:
2278 (WebKit::maximumBufferingTime):
2280 2017-08-04 John Wilander <wilander@apple.com>
2282 Resource Load Statistics: Report user interaction immediately, but only when needed
2283 https://bugs.webkit.org/show_bug.cgi?id=175090
2284 <rdar://problem/33685546>
2286 Reviewed by Chris Dumez.
2288 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2289 (WKBundleClearResourceLoadStatistics):
2290 Test infrastructure. Ends up calling
2291 WebCore::ResourceLoadObserver::clearState().
2292 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2294 2017-08-04 Matt Lewis <jlewis3@apple.com>
2296 Unreviewed, rolling out r220288.
2298 This broke multiple builds.
2302 "Use MPAVRoutingController instead of deprecated versions."
2303 https://bugs.webkit.org/show_bug.cgi?id=175063
2304 http://trac.webkit.org/changeset/220288
2306 2017-08-04 Jeremy Jones <jeremyj@apple.com>
2308 Use MPAVRoutingController instead of deprecated versions.
2309 https://bugs.webkit.org/show_bug.cgi?id=175063
2310 rdar://problem/33301230
2312 Reviewed by Tim Horton.
2314 Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.
2316 * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
2317 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2318 (-[WKAirPlayRoutePicker dealloc]):
2319 (-[WKAirPlayRoutePicker show:fromRect:]):
2320 (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
2321 (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
2322 (-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
2323 (-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
2324 (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
2325 (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
2326 (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.
2328 2017-08-04 Tim Horton <timothy_horton@apple.com>
2330 viewport-fit changes during animated resize can cause layout size to get stuck
2331 https://bugs.webkit.org/show_bug.cgi?id=175169
2332 <rdar://problem/33684697>
2334 Reviewed by Simon Fraser.
2336 If we get a commit that changes viewport-fit state while an animated
2337 resize is underway, and that change causes the client to push a new
2338 minimumLayoutSizeOverride, the new size will be lost forever, and we
2339 will get stuck laying out at the wrong size.
2341 This is because we unconditionally apply avoidsUnsafeArea for every commit,
2342 while most other changes that come in from a commit are ignored if we're
2343 inside animated resize. To fix, also ignore avoidsUnsafeArea changes during
2344 animated resize, by moving the code that keeps track of it into WKWebView
2345 like all of the rest, and read it out of the commit in didCommitLayerTree
2346 *after* the animated-resize early-return.
2348 Also, fix the associated layout tests by adding a missing assignment
2349 in _computedContentInset, which was broken in r220138.
2351 * UIProcess/API/Cocoa/WKWebView.mm:
2352 (-[WKWebView _initializeWithConfiguration:]):
2353 (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
2354 (-[WKWebView _processDidExit]):
2355 (-[WKWebView _didCommitLayerTree:]):
2356 (-[WKWebView _setAvoidsUnsafeArea:]):
2357 (-[WKWebView _safeAreaShouldAffectObscuredInsets]):
2358 (-[WKWebView _didChangeAvoidsUnsafeArea:]): Deleted.
2359 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2360 * UIProcess/PageClient.h:
2361 * UIProcess/WebPageProxy.cpp:
2362 (WebKit::WebPageProxy::resetState):
2363 (WebKit::WebPageProxy::setAvoidsUnsafeArea): Deleted.
2364 * UIProcess/WebPageProxy.h:
2365 (WebKit::WebPageProxy::avoidsUnsafeArea const): Deleted.
2366 * UIProcess/ios/PageClientImplIOS.h:
2367 * UIProcess/ios/PageClientImplIOS.mm:
2368 (WebKit::PageClientImpl::didChangeAvoidsUnsafeArea): Deleted.
2369 * UIProcess/ios/WebPageProxyIOS.mm:
2370 (WebKit::WebPageProxy::didCommitLayerTree):
2372 2017-08-04 Matt Lewis <jlewis3@apple.com>
2374 Unreviewed, rolling out r220271.
2376 Rolling out due to Layout Test failing on iOS Simulator.
2380 "Remove STREAMS_API compilation guard"
2381 https://bugs.webkit.org/show_bug.cgi?id=175165
2382 http://trac.webkit.org/changeset/220271
2384 2017-08-03 Sam Weinig <sam@webkit.org>
2386 [Cleanup] Remove ScriptGlobalObject
2387 https://bugs.webkit.org/show_bug.cgi?id=175173
2389 Reviewed by Darin Adler.
2391 * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
2392 (WebKit::RemoteWebInspectorUI::windowObjectCleared):
2393 * WebProcess/WebPage/WebInspectorUI.cpp:
2394 (WebKit::WebInspectorUI::windowObjectCleared):
2395 Remove call to ScriptGlobalObject::set and use addSelfToGlobalObjectInWorld instead.
2397 2017-08-03 Brian Burg <bburg@apple.com>
2399 [Cocoa] Web Automation: copy JavaScript atoms to WebKit.framework private headers
2400 https://bugs.webkit.org/show_bug.cgi?id=175088
2401 <rdar://problem/33685818>
2403 Reviewed by Joseph Pecoraro.
2405 * WebKit.xcodeproj/project.pbxproj:
2406 - Add a Copy Files phase to WebKit.framework.
2407 - Copy atoms to the atoms/ directory in WebKit.framework/PrivateHeaders/.
2409 2017-08-04 Ryan Haddad <ryanhaddad@apple.com>
2411 Unreviewed, rolling out r220268.
2413 This change caused assertion failures on macOS and iOS Debug
2418 "Resource Load Statistics: Report user interaction
2419 immediately, but only when needed"
2420 https://bugs.webkit.org/show_bug.cgi?id=175090
2421 http://trac.webkit.org/changeset/220268
2423 2017-08-04 Andreas Kling <akling@apple.com>
2425 NetworkLoad should always invoke its redirect completion handler
2426 https://bugs.webkit.org/show_bug.cgi?id=175179
2427 <rdar://problem/33464999>
2429 Reviewed by Chris Dumez.
2431 Make sure the redirect completion handler is always invoked,
2432 just like we already did for the response completion handler.
2434 * NetworkProcess/NetworkLoad.cpp:
2435 (WebKit::NetworkLoad::~NetworkLoad):
2437 2017-08-04 Youenn Fablet <youenn@apple.com>
2439 Remove STREAMS_API compilation guard
2440 https://bugs.webkit.org/show_bug.cgi?id=175165
2442 Reviewed by Darin Adler.
2444 * Configurations/FeatureDefines.xcconfig:
2445 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2446 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2448 2017-08-04 Brady Eidson <beidson@apple.com>
2450 Enable ServiceWorkers at runtime for WebKitTestRunner.
2451 https://bugs.webkit.org/show_bug.cgi?id=175174
2453 Reviewed by Youenn Fablet.
2455 * UIProcess/WebPreferences.cpp:
2456 (WebKit::WebPreferences::enableAllExperimentalFeatures):
2458 2017-08-04 John Wilander <wilander@apple.com>
2460 Resource Load Statistics: Report user interaction immediately, but only when needed
2461 https://bugs.webkit.org/show_bug.cgi?id=175090
2462 <rdar://problem/33685546>
2464 Reviewed by Chris Dumez.
2466 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2467 (WKBundleClearResourceLoadStatistics):
2468 Test infrastructure. Ends up calling
2469 WebCore::ResourceLoadObserver::clearState().
2470 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2472 2017-08-04 Antti Koivisto <antti@apple.com>
2474 Network cache should be usable as non-singleton
2475 https://bugs.webkit.org/show_bug.cgi?id=175139
2477 Reviewed by Sam Weinig.
2479 We might want to use it as a non-singleton in the future (for example as a backend for the cache API).
2481 This patch makes NetworkCache::Cache and NetworkCache::Storage refcounted objects and takes
2482 care to ref them properly during asynchronous operations.
2484 The patch doesn't actually create any non-shared instances, it just adds the capability.
2486 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2487 (WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache):
2488 * NetworkProcess/NetworkProcess.cpp:
2489 (WebKit::fetchDiskCacheEntries):
2490 (WebKit::clearDiskCacheEntries):
2491 (WebKit::NetworkProcess::setCacheModel):
2492 * NetworkProcess/NetworkProcess.h:
2493 (WebKit::NetworkProcess::cache):
2495 Move the shared cache instance to the network process singleton.
2497 * NetworkProcess/NetworkResourceLoader.cpp:
2498 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2500 Include shared cache as a reffed member for non-ephemeral instances.
2502 (WebKit::NetworkResourceLoader::canUseCache const):
2503 (WebKit::NetworkResourceLoader::retrieveCacheEntry):
2504 (WebKit::NetworkResourceLoader::abort):
2505 (WebKit::NetworkResourceLoader::didReceiveResponse):
2506 (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
2507 (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
2508 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
2509 * NetworkProcess/NetworkResourceLoader.h:
2510 * NetworkProcess/cache/NetworkCache.cpp:
2511 (WebKit::NetworkCache::Cache::open):
2513 Open now returns null if it fails.
2514 Add RegisterNotify option to set up notify trigger for the shared instance.
2516 (WebKit::NetworkCache::Cache::Cache):
2517 (WebKit::NetworkCache::Cache::~Cache):
2521 (WebKit::NetworkCache::dumpFileChanged):
2522 (WebKit::NetworkCache::Cache::setCapacity):
2523 (WebKit::NetworkCache::Cache::retrieve):
2525 Protect the cache instance during asynchronous operations.
2527 (WebKit::NetworkCache::Cache::store):
2528 (WebKit::NetworkCache::Cache::storeRedirect):
2529 (WebKit::NetworkCache::Cache::remove):
2530 (WebKit::NetworkCache::Cache::traverse):
2531 (WebKit::NetworkCache::Cache::dumpContentsToFile):
2532 (WebKit::NetworkCache::Cache::clear):
2533 (WebKit::NetworkCache::Cache::recordsPath const):
2534 (WebKit::NetworkCache::Cache::retrieveData):
2535 (WebKit::NetworkCache::Cache::storeData):
2536 (WebKit::NetworkCache::singleton): Deleted.
2537 (WebKit::NetworkCache::Cache::initialize): Deleted.
2538 * NetworkProcess/cache/NetworkCache.h:
2539 (WebKit::NetworkCache::Cache::canUseSharedMemoryForBodyData const):
2540 (WebKit::NetworkCache::Cache::isEnabled const): Deleted.
2542 Remove isEnabled() state as a cache object now always represents an enabled cache.
2544 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2545 (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord const):
2546 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
2547 (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
2548 (WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse):
2549 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
2550 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2551 (WebKit::NetworkCache::Statistics::initialize):
2552 (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
2553 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2554 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
2555 (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
2556 (WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):
2558 Operations now ref the storage. They are already deleted in the main thread so
2559 proper destruction is taken care of.
2561 (WebKit::NetworkCache::Storage::open):
2562 (WebKit::NetworkCache::Storage::~Storage):
2563 (WebKit::NetworkCache::Storage::synchronize):
2565 This and other asynchronous methods now protect the Storage instance.
2567 (WebKit::NetworkCache::Storage::remove):
2568 (WebKit::NetworkCache::Storage::retrieve):
2569 (WebKit::NetworkCache::Storage::store):
2570 (WebKit::NetworkCache::Storage::traverse):
2571 (WebKit::NetworkCache::Storage::clear):
2572 (WebKit::NetworkCache::Storage::shrink):
2573 (WebKit::NetworkCache::Storage::deleteOldVersions):
2574 * NetworkProcess/cache/NetworkCacheStorage.h:
2575 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2576 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2577 (WebKit::NetworkProcess::clearDiskCache):
2578 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2579 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2580 * NetworkProcess/soup/NetworkProcessSoup.cpp:
2581 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2582 (WebKit::NetworkProcess::clearDiskCache):
2584 2017-08-04 Frederic Wang <fwang@igalia.com>
2586 ScrollingTreeOverflowScrollingNodeIOS uses the wrong fixed position rectangle
2587 https://bugs.webkit.org/show_bug.cgi?id=175135
2589 Reviewed by Simon Fraser.
2591 This patch modifies ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll so
2592 that it uses the fixed position rectangle relative of the first frame ancestor instead of
2593 the one of the main frame. This makes it consistent with ScrollingTreeFrameScrollingNodeIOS
2594 and RenderLayerCompositor. This fixes some flickering issues on iOS.
2596 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2597 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll): Use the fixed
2598 position rect of a non-main frame if there is one.
2600 2017-08-03 Brian Burg <bburg@apple.com>
2602 Remove ENABLE(WEB_SOCKET) guards
2603 https://bugs.webkit.org/show_bug.cgi?id=167044
2605 Reviewed by Joseph Pecoraro.
2607 * Configurations/FeatureDefines.xcconfig:
2608 * WebProcess/Network/WebSocketProvider.cpp:
2609 * WebProcess/Network/WebSocketProvider.h:
2611 2017-08-03 Chris Dumez <cdumez@apple.com>
2613 Multiple Layout tests from web-platform-tests/beacon/ are timing out.
2614 https://bugs.webkit.org/show_bug.cgi?id=175076
2615 <rdar://problem/33704752>
2617 Reviewed by Alexey Proskuryakov.
2619 * NetworkProcess/NetworkLoad.cpp:
2620 (WebKit::NetworkLoad::completeAuthenticationChallenge):
2621 In the NETWORK_SESSION code path, we did not ask the client about server trust evaluation
2622 when the clientCredentialPolicy was CannotAskClientForCredentials. This is because the
2623 same delegate is used for HTTP authentication and server trust evaluation in the
2624 NETWORK_SESSION code path. To align both code paths, we now ask the client about server
2625 trust evaluation even if the policy CannotAskClientForCredentials. This allows WKTR
2626 to trust certificates for localhost / 127.0.0.1 unconditionally and consistently.
2628 2017-08-03 Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp>
2630 [PAL] Move spi/cf directory into PAL
2631 https://bugs.webkit.org/show_bug.cgi?id=175057
2633 Reviewed by Antti Koivisto.
2635 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2636 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2637 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2638 * NetworkProcess/ios/NetworkProcessIOS.mm:
2639 * NetworkProcess/mac/NetworkLoadMac.mm:
2640 * NetworkProcess/mac/NetworkProcessMac.mm:
2641 * Shared/cf/CookieStorageUtilsCF.h:
2642 * Shared/mac/ChildProcessMac.mm:
2643 * Shared/mac/CookieStorageShim.mm:
2644 * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
2645 * UIProcess/API/Cocoa/WKProcessPool.mm:
2646 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2647 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2648 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2649 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
2650 * UIProcess/WebsiteData/WebsiteDataStore.h:
2651 * UIProcess/mac/WebCookieManagerProxyMac.mm:
2652 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2653 * WebProcess/cocoa/WebProcessCocoa.mm:
2655 2017-08-03 Youenn Fablet <youenn@apple.com>
2657 Remove FETCH_API compilation guard
2658 https://bugs.webkit.org/show_bug.cgi?id=175154
2660 Reviewed by Chris Dumez.
2662 * Configurations/FeatureDefines.xcconfig:
2663 * WebProcess/WebPage/WebPage.cpp:
2664 (WebKit::WebPage::updatePreferences):
2666 2017-08-03 Matt Lewis <jlewis3@apple.com>
2668 Unreviewed, rolling out r220209.
2670 This caused internal build failures.
2674 "Use MPAVRoutingController instead of deprecated versions."
2675 https://bugs.webkit.org/show_bug.cgi?id=175063
2676 http://trac.webkit.org/changeset/220209
2678 2017-08-02 Brian Burg <bburg@apple.com>
2680 Web Automation: consider file extensions in the "accept" attribute when deciding if a file can be uploaded
2681 https://bugs.webkit.org/show_bug.cgi?id=175081
2683 Reviewed by Joseph Pecoraro.
2685 * UIProcess/Automation/WebAutomationSession.cpp:
2686 (WebKit::fileCanBeAcceptedForUpload):
2687 (WebKit::WebAutomationSession::handleRunOpenPanel):
2688 In cases where a file has an extension, try to match it against the
2689 accepted extensions list. Give up if there's no extension. Otherwise,
2690 proceed as normal to infer a MIME type based on the extension.
2691 In cases where extension-less files are inside hidden folders, the MIME
2692 inference will fail as well.
2694 2017-08-03 Brady Eidson <beidson@apple.com>
2696 Add SW IDLs and stub out basic functionality.
2697 https://bugs.webkit.org/show_bug.cgi?id=175115
2699 Reviewed by Chris Dumez.
2701 * Configurations/FeatureDefines.xcconfig:
2703 * Shared/WebPreferencesDefinitions.h:
2705 * UIProcess/WebPreferences.cpp:
2706 (WebKit::WebPreferences::enableAllExperimentalFeatures): Explicitly skip SW for now.
2707 The ramifications to layouttests are complicated, and we'd like to follow up in a
2710 * WebProcess/WebPage/WebPage.cpp:
2711 (WebKit::WebPage::updatePreferences):
2713 2017-08-03 Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp>
2715 [WebKit] Sort Xcode project file
2716 https://bugs.webkit.org/show_bug.cgi?id=175122
2718 Reviewed by Antti Koivisto.
2720 * WebKit.xcodeproj/project.pbxproj:
2722 2017-08-02 Sam Weinig <sam@webkit.org>
2724 [WebIDL] Convert MutationCallback to be a normal generated callback
2725 https://bugs.webkit.org/show_bug.cgi?id=174140
2727 Reviewed by Darin Adler.
2729 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
2730 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.cpp:
2731 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilterPrivate.h:
2732 Pass, now necessary, Document to NativeNodeFilter constructor.
2734 2017-08-03 Jeremy Jones <jeremyj@apple.com>
2736 Use MPAVRoutingController instead of deprecated versions.
2737 https://bugs.webkit.org/show_bug.cgi?id=175063
2738 rdar://problem/33301230
2740 Reviewed by Tim Horton.
2742 Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.
2744 * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
2745 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2746 (-[WKAirPlayRoutePicker dealloc]):
2747 (-[WKAirPlayRoutePicker show:fromRect:]):
2748 (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
2749 (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
2750 (-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
2751 (-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
2752 (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
2753 (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
2754 (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.
2756 2017-08-03 Chris Dumez <cdumez@apple.com>
2758 Improve our support for referrer policies
2759 https://bugs.webkit.org/show_bug.cgi?id=175069
2760 <rdar://problem/33677313>
2762 Reviewed by Darin Adler.
2764 * WebProcess/Network/WebLoaderStrategy.cpp:
2765 (WebKit::WebLoaderStrategy::loadResource):
2766 (WebKit::WebLoaderStrategy::schedulePluginStreamLoad):
2768 2017-08-02 Chris Dumez <cdumez@apple.com>
2770 NetworkResourceLoader::setDefersLoading() may cause start() to be called multiple times
2771 https://bugs.webkit.org/show_bug.cgi?id=175109
2772 <rdar://problem/33363169>
2774 Reviewed by Brady Eidson.
2776 If NetworkResourceLoader::setDefersLoading(false) is called by the client while m_networkLoad is null
2777 then we call NetworkResourceLoader::start() to start the load. This is needed in the case where
2778 a NetworkResourceLoader is constructed in deferred mode so that the load can later be started via
2779 setDefersLoading(). However, it is possible for setDefersLoading(false) to be called when start()
2780 has already been called, which causes start() to be called multiple times and leads to an assertion
2783 Normally, setDefersLoading(false) returns without calling start() if m_networkLoad is not null. It
2784 relies on m_networkLoad being non-null to determine if start() should be called. This is bad because
2785 start() checks the disk cache asynchronously *before* calling startNetworkLoad() and initializing
2786 m_networkLoad. Therefore, if setDefersLoading(false) is called *while* we are checking the cache,
2787 then we will call incorrectly call start() again.
2789 In the case of the radar, this happens when we:
2790 1. Call start() and check the disk cache
2791 2. Retrieve a cached redirect from the cache, which causes a WillSendRequest IPC to be sent to the
2793 3. The WebProcess calls setDefersLoading(true), sends the ContinueWillSendRequest IPC back and
2794 then calls setDefersLoading(false)
2796 The call to continueWillSendRequest() causes us to retrieve the redirected entry from the cache,
2797 asynchronously, which will return no entry and start a load.
2798 The later call to setDefersLoading(false) causes us to call start() again and we end up back to step 1.
2800 * NetworkProcess/NetworkResourceLoader.cpp:
2801 (WebKit::NetworkResourceLoader::start):
2802 (WebKit::NetworkResourceLoader::setDefersLoading):
2803 * NetworkProcess/NetworkResourceLoader.h:
2805 2017-08-02 Andreas Kling <akling@apple.com>
2807 NetworkRTCProvider::createResolver() leaks CFHost objects
2808 https://bugs.webkit.org/show_bug.cgi?id=175103
2809 <rdar://problem/33690347>
2811 Reviewed by Youenn Fablet.
2813 Add a missing adoptCF() so we don't leak the CFHost.
2815 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
2816 (WebKit::NetworkRTCProvider::createResolver):
2818 2017-08-02 Jeremy Jones <jeremyj@apple.com>
2820 Remove unused and obsolete setting mediaDocumentEntersFullscreenAutomatically
2821 https://bugs.webkit.org/show_bug.cgi?id=175080
2823 Reviewed by Jon Lee.
2825 This is obsolete because of the alternate solution in
2826 https://bugs.webkit.org/show_bug.cgi?id=174850
2828 * Shared/WebPreferencesDefinitions.h:
2829 * UIProcess/API/Cocoa/WKPreferences.mm:
2830 (-[WKPreferences _setMediaDocumentEntersFullscreenAutomatically:]): Deleted.
2831 (-[WKPreferences _mediaDocumentEntersFullscreenAutomatically]): Deleted.
2832 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2833 * WebProcess/WebPage/WebPage.cpp:
2834 (WebKit::WebPage::updatePreferences):
2836 2017-08-02 Filip Pizlo <fpizlo@apple.com>
2838 We should be OK with the gigacage being disabled on gmalloc
2839 https://bugs.webkit.org/show_bug.cgi?id=175082
2841 Reviewed by Michael Saboff.
2843 * WebProcess/WebProcess.cpp:
2844 (WebKit::m_webSQLiteDatabaseTracker):
2846 2017-08-02 Brian Burg <bburg@apple.com>
2848 Web Automation: files selected for upload should be checked against values of the 'accept' attribute
2849 https://bugs.webkit.org/show_bug.cgi?id=174803
2850 <rdar://problem/33514190>
2852 Reviewed by Carlos Garcia Campos.
2854 Use the parsed values of the file input element's "accept" attribute to reject
2855 files that don't match the specified values. This is normally done by Safari
2856 using NSOpenPanel, but since a real open panel isn't shown during automation,
2857 it needs to be done here.
2859 Support for limiting accepted files by file extensions will be added when the
2860 same is implemented in the normal code path for the C and Objective-C APIs.
2862 This change is covered by internal WebDriver tests that will be rewritten for the
2863 public Webdriver W3C test suite someday, when safaridriver runs those tests itself.
2865 * UIProcess/Automation/WebAutomationSession.cpp:
2866 (WebKit::WebAutomationSession::handleRunOpenPanel):
2867 Since we already have the proposed files, there's no need to compute a list of
2868 supported extensions based on wildcard MIME types. First check the extension,
2869 then the inferred MIME type for the extension, and then the wildcard MIME type
2870 if the inferred type is not an exact match.
2872 2017-08-02 Tim Horton <timothy_horton@apple.com>
2874 WKPDFView doesn't respect safe area insets
2875 https://bugs.webkit.org/show_bug.cgi?id=175046
2876 <rdar://problem/33558386>
2878 Reviewed by Wenson Hsieh.
2880 * Platform/spi/ios/UIKitSPI.h:
2883 * UIProcess/API/Cocoa/WKWebView.mm:
2884 (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
2885 Drive-by fix two small custom content view issues:
2887 - Reset _scrollViewBackgroundColor; it is used to early-return from
2888 updating the background color if it hasn't changed, but if you go from a
2889 site with (for example) a white background, to a PDF, to another site
2890 with a white background, we will early-return and not reset the background
2891 color from the grey WKPDFView background.
2893 - When installing a custom content view, scroll to the origin. We miss
2894 the usual mechanism for scrolling to the origin when custom content views
2895 are installed, so do it here.
2897 (-[WKWebView _effectiveObscuredInsetEdgesAffectedBySafeArea]):
2898 Ignore _obscuredInsetEdgesAffectedBySafeArea for custom content views.
2899 This is fairly arbitrary, and we should find a different way to
2900 express different edge sets for different kinds of content (perhaps
2901 bake this into default viewports?), but for now this works.
2903 (-[WKWebView _computedContentInset]):
2904 Use _effectiveObscuredInsetEdgesAffectedBySafeArea instead of the ivar directly.
2906 (-[WKWebView _safeAreaShouldAffectObscuredInsets]):
2907 Force safe areas to not affect obscured insets for custom content views,
2908 so that it's up to every custom content view to take safe areas into
2911 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2912 Expose _computedUnobscuredSafeAreaInset for WKPDFView's use.
2914 * UIProcess/ios/WKPDFView.mm:
2915 (-[WKPDFView web_setMinimumSize:]):
2916 Avoid rebuilding the WKPDFView if the minimum size didn't change.
2918 (-[WKPDFView _offsetForPageNumberIndicator]):
2919 Take unobscured safe area insets into account when insetting
2920 the page number indicator.
2922 (-[WKPDFView web_computedContentInsetDidChange]):
2923 Watch for unobscured safe area inset changes, and apply them to the
2924 layout of the WKPDFView.
2926 (-[WKPDFView _computePageAndDocumentFrames]):
2927 Make it possible to only update the WKPDFView's size and position, without
2928 rebuilding its subviews, if the width did not change. This prevents lots
2929 of flashing of the child UIPDFPageViews when the unobscured safe area
2930 insets change dynamically.
2932 Take the safe area insets into account when determining what width
2935 (-[WKPDFView _updateDocumentFrame]):
2936 Take the safe area insets into account when positioning the WKPDFView
2937 inside the WKScrollView.
2939 2017-08-02 John Wilander <wilander@apple.com>
2941 ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel() should check the return value of storagePath()
2942 https://bugs.webkit.org/show_bug.cgi?id=175055
2943 <rdar://problem/32671352>
2945 Reviewed by David Kilzer.
2947 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp:
2948 (WebKit::ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel):
2949 Now uses dispatch_once() instead of NeverDestroyed and checks the
2950 return value of storagePath() before using it to load the model.
2952 2017-08-01 Brian Burg <bburg@apple.com>
2954 HTML file input elements do not support file extensions in the "accept" attribute
2955 https://bugs.webkit.org/show_bug.cgi?id=95698
2956 <rdar://problem/12231850>
2958 Reviewed by Darin Adler.
2960 Plumb accepted file extensions out to the C API.
2961 The Cocoa API will be improved in a later patch.
2963 * Shared/WebCoreArgumentCoders.cpp:
2964 (IPC::ArgumentCoder<FileChooserSettings>::encode):
2965 (IPC::ArgumentCoder<FileChooserSettings>::decode):
2966 * UIProcess/API/APIOpenPanelParameters.cpp:
2967 (API::OpenPanelParameters::acceptFileExtensions const):
2968 * UIProcess/API/APIOpenPanelParameters.h:
2969 * UIProcess/API/C/WKOpenPanelParametersRef.cpp:
2970 (WKOpenPanelParametersCopyAcceptedFileExtensions):
2971 * UIProcess/API/C/WKOpenPanelParametersRef.h:
2973 2017-08-02 Fujii Hironori <Hironori.Fujii@sony.com>
2975 Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
2976 https://bugs.webkit.org/show_bug.cgi?id=175010
2977 <rdar://problem/33647818>
2979 Reviewed by Alex Christensen.
2981 * UIProcess/API/APIContentRuleListStore.cpp:
2982 (API::ContentRuleListStore::compileContentRuleList):
2983 Call QualifiedName::init().
2985 2017-08-01 Chris Dumez <cdumez@apple.com>
2987 Add initial support for navigator.sendBeacon
2988 https://bugs.webkit.org/show_bug.cgi?id=175007
2989 <rdar://problem/33547728>
2991 Reviewed by Sam Weinig.
2993 Add experimental feature flag for the Beacon API, disabled by default.
2995 * Shared/WebPreferencesDefinitions.h:
2996 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2997 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2998 * WebProcess/WebPage/WebPage.cpp:
2999 (WebKit::WebPage::updatePreferences):
3001 2017-08-01 Filip Pizlo <fpizlo@apple.com>
3003 Bmalloc and GC should put auxiliaries (butterflies, typed array backing stores) in a gigacage (separate multi-GB VM region)
3004 https://bugs.webkit.org/show_bug.cgi?id=174727
3006 Reviewed by Mark Lam.
3008 The WebProcess should never disable the Gigacage by allocating typed arrays outside the Gigacage. So,
3009 we add a callback that crashes the process.
3011 * WebProcess/WebProcess.cpp:
3012 (WebKit::gigacageDisabled):
3013 (WebKit::m_webSQLiteDatabaseTracker):
3015 2017-08-01 Brian Burg <bburg@apple.com>
3017 Web Automation: add event to notify service when a page's main frame window object has cleared
3018 https://bugs.webkit.org/show_bug.cgi?id=174987
3019 <rdar://problem/36602634>
3021 Reviewed by Carlos Garcia Campos.
3023 * UIProcess/Automation/Automation.json: Add new event.
3025 * UIProcess/Automation/WebAutomationSession.h:
3026 * UIProcess/Automation/WebAutomationSession.cpp:
3027 (WebKit::WebAutomationSession::navigationOccurredForFrame):
3028 (WebKit::WebAutomationSession::willClosePage):
3029 When a WebPage navigates or closes, send the browsingContextCleared event.
3030 Any element handles for elements in the browsing context are no longer valid.
3032 * UIProcess/WebPageProxy.cpp:
3033 (WebKit::WebPageProxy::close):
3034 Add a new hook into the active automation session so it is notified when a page closes.
3036 2017-08-01 Brady Eidson <beidson@apple.com>
3038 API test URLSchemeHandler.Exceptions is Exiting out early on macOS Debug..
3039 https://bugs.webkit.org/show_bug.cgi?id=175030
3041 Reviewed by Andy Estes.
3043 * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
3044 (WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Release the API wrapped on the next
3045 spin of the runloop.
3047 2017-08-01 Brady Eidson <beidson@apple.com>
3049 Part 2 of: Rename DatabaseProcess to StorageProcess.
3050 https://bugs.webkit.org/show_bug.cgi?id=174880
3052 Reviewed by Andy Estes.
3054 Rename some more variables, classes, etc. to reflect the change.
3056 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3057 (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
3059 * NetworkProcess/NetworkProcess.cpp:
3060 (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs):
3061 (WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs):
3062 (WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
3063 (WebKit::NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
3064 * NetworkProcess/NetworkProcess.h:
3065 * NetworkProcess/NetworkProcess.messages.in:
3067 * Shared/ProcessExecutablePath.h:
3068 * Shared/gtk/ProcessExecutablePathGtk.cpp:
3069 (WebKit::executablePathOfStorageProcess):
3070 (WebKit::executablePathOfDatabaseProcess): Deleted.
3071 * Shared/wpe/ProcessExecutablePathWPE.cpp:
3072 (WebKit::executablePathOfStorageProcess):
3073 (WebKit::executablePathOfDatabaseProcess): Deleted.
3075 * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp:
3076 (WebKit::WebIDBConnectionToClient::putOrAdd):
3078 * StorageProcess/StorageProcess.cpp:
3079 (WebKit::StorageProcess::initializeWebsiteDataStore):
3080 (WebKit::StorageProcess::postStorageTask):
3081 (WebKit::StorageProcess::performNextStorageTask):
3082 (WebKit::StorageProcess::createStorageToWebProcessConnection):
3083 (WebKit::StorageProcess::fetchWebsiteData):
3084 (WebKit::StorageProcess::postDatabaseTask): Deleted.
3085 (WebKit::StorageProcess::performNextDatabaseTask): Deleted.
3086 (WebKit::StorageProcess::createDatabaseToWebProcessConnection): Deleted.
3087 * StorageProcess/StorageProcess.h:
3088 * StorageProcess/StorageProcess.messages.in:
3089 * StorageProcess/mac/StorageProcessMac.mm:
3090 (WebKit::StorageProcess::initializeProcessName):
3092 * UIProcess/API/C/WKContext.cpp:
3093 (WKContextGetDatabaseProcessIdentifier):
3095 * UIProcess/API/Cocoa/WKProcessPool.mm:
3096 (-[WKProcessPool _terminateStorageProcess]):
3097 (-[WKProcessPool _storageProcessIdentifier]):
3098 (-[WKProcessPool _terminateDatabaseProcess]): Deleted.
3099 (-[WKProcessPool _databaseProcessIdentifier]): Deleted.
3100 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3102 * UIProcess/ChildProcessProxy.cpp:
3103 (WebKit::ChildProcessProxy::getLaunchOptions):
3105 * UIProcess/Launcher/ProcessLauncher.h:
3106 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
3107 (WebKit::ProcessLauncher::launchProcess):
3108 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3109 (WebKit::serviceName):
3110 * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp:
3111 (WebKit::ProcessLauncher::launchProcess):
3113 * UIProcess/Network/NetworkProcessProxy.cpp:
3114 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs):
3115 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
3116 * UIProcess/Network/NetworkProcessProxy.h:
3117 * UIProcess/Network/NetworkProcessProxy.messages.in:
3119 * UIProcess/Storage/StorageProcessProxy.cpp:
3120 (WebKit::StorageProcessProxy::getLaunchOptions):
3121 (WebKit::StorageProcessProxy::getStorageProcessConnection):
3122 (WebKit::StorageProcessProxy::didClose):
3123 (WebKit::StorageProcessProxy::didCreateStorageToWebProcessConnection):
3124 (WebKit::StorageProcessProxy::didFinishLaunching):
3125 (WebKit::StorageProcessProxy::getDatabaseProcessConnection): Deleted.
3126 (WebKit::StorageProcessProxy::didCreateDatabaseToWebProcessConnection): Deleted.
3127 * UIProcess/Storage/StorageProcessProxy.h:
3128 * UIProcess/Storage/StorageProcessProxy.messages.in:
3130 * UIProcess/WebContextClient.cpp:
3131 (WebKit::WebContextClient::storageProcessDidCrash):
3132 (WebKit::WebContextClient::databaseProcessDidCrash): Deleted.
3133 * UIProcess/WebContextClient.h:
3135 * UIProcess/WebProcessPool.cpp:
3136 (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
3137 (WebKit::WebProcessPool::getStorageProcessConnection):
3138 (WebKit::WebProcessPool::storageProcessCrashed):
3139 (WebKit::WebProcessPool::pageAddedToProcess):
3140 (WebKit::WebProcessPool::storageProcessIdentifier):
3141 (WebKit::WebProcessPool::terminateStorageProcess):
3142 (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Deleted.
3143 (WebKit::WebProcessPool::getDatabaseProcessConnection): Deleted.
3144 (WebKit::WebProcessPool::databaseProcessCrashed): Deleted.
3145 (WebKit::WebProcessPool::databaseProcessIdentifier): Deleted.
3146 (WebKit::WebProcessPool::terminateDatabaseProcess): Deleted.
3147 * UIProcess/WebProcessPool.h:
3148 (WebKit::WebProcessPool::sendToStorageProcessRelaunchingIfNecessary):
3149 (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary): Deleted.
3151 * UIProcess/WebProcessProxy.cpp:
3152 (WebKit::WebProcessProxy::getStorageProcessConnection):
3153 (WebKit::WebProcessProxy::getDatabaseProcessConnection): Deleted.
3154 * UIProcess/WebProcessProxy.h:
3155 * UIProcess/WebProcessProxy.messages.in:
3157 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3158 (WebKit::WebsiteDataStore::fetchDataAndApply):
3159 (WebKit::WebsiteDataStore::removeData):
3160 (WebKit::WebsiteDataStore::storageProcessParameters):
3161 (WebKit::WebsiteDataStore::databaseProcessParameters): Deleted.
3162 * UIProcess/WebsiteData/WebsiteDataStore.h:
3164 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3165 (WebKit::WebIDBConnectionToServer::messageSenderConnection):
3166 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
3168 * WebProcess/Databases/WebDatabaseProvider.cpp:
3169 (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
3171 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
3172 (WebKit::WebToStorageProcessConnection::WebToStorageProcessConnection):
3173 (WebKit::WebToStorageProcessConnection::~WebToStorageProcessConnection):
3174 (WebKit::WebToStorageProcessConnection::didReceiveMessage):
3175 (WebKit::WebToStorageProcessConnection::didClose):
3176 (WebKit::WebToStorageProcessConnection::didReceiveInvalidMessage):
3177 (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
3178 (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection): Deleted.
3179 (WebKit::WebToDatabaseProcessConnection::~WebToDatabaseProcessConnection): Deleted.
3180 (WebKit::WebToDatabaseProcessConnection::didReceiveMessage): Deleted.
3181 (WebKit::WebToDatabaseProcessConnection::didClose): Deleted.
3182 (WebKit::WebToDatabaseProcessConnection::didReceiveInvalidMessage): Deleted.
3183 (WebKit::WebToDatabaseProcessConnection::idbConnectionToServerForSession): Deleted.
3184 * WebProcess/Storage/WebToStorageProcessConnection.h:
3185 (WebKit::WebToStorageProcessConnection::create):
3186 (WebKit::WebToDatabaseProcessConnection::create): Deleted.
3187 (WebKit::WebToDatabaseProcessConnection::connection): Deleted.
3189 * WebProcess/WebProcess.cpp:
3190 (WebKit::WebProcess::webToStorageProcessConnectionClosed):
3191 (WebKit::WebProcess::webToStorageProcessConnection):
3192 (WebKit::WebProcess::ensureWebToStorageProcessConnection):
3193 (WebKit::WebProcess::webToDatabaseProcessConnectionClosed): Deleted.
3194 (WebKit::WebProcess::webToDatabaseProcessConnection): Deleted.
3195 (WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Deleted.
3196 * WebProcess/WebProcess.h:
3198 2017-08-01 Brady Eidson <beidson@apple.com>
3200 Part 1 of: Rename DatabaseProcess to StorageProcess.
3201 https://bugs.webkit.org/show_bug.cgi?id=174879
3203 Reviewed by Andy Estes.
3205 This patch is all about renaming source files and renaming the process itself (touching build system files, etc etc).
3207 Some renaming in actual code did result (Some class/struct names, method names, etc)
3209 Part 2 (174880) will go through and update all references in code itself from "Database" to "Storage"
3212 * DerivedSources.make:
3213 * PlatformGTK.cmake:
3214 * PlatformMac.cmake:
3215 * PlatformWPE.cmake:
3216 * WebKit.xcodeproj/project.pbxproj:
3218 * Configurations/StorageService.xcconfig: Renamed from Source/WebKit/Configurations/DatabaseService.xcconfig.
3219 * StorageProcess/EntryPoint/mac/XPCService/StorageService/Info.plist: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist.
3220 * StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Renamed from Source/WebKit/DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in.
3222 * Shared/Storage/StorageProcessCreationParameters.cpp: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.cpp.
3223 * Shared/Storage/StorageProcessCreationParameters.h: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.h.
3225 * StorageProcess/EntryPoint/mac/XPCService/StorageServiceEntryPoint.mm: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm.
3226 * StorageProcess/EntryPoint/unix/StorageProcessMain.cpp: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
3228 * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp.
3229 * StorageProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h.
3230 * StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in.
3232 * StorageProcess/StorageProcess.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.cpp.
3233 * StorageProcess/StorageProcess.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.h.
3234 * StorageProcess/StorageProcess.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.messages.in.
3236 * StorageProcess/StorageToWebProcessConnection.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.cpp.
3237 * StorageProcess/StorageToWebProcessConnection.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.h.
3238 * StorageProcess/StorageToWebProcessConnection.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.messages.in.
3240 * StorageProcess/gtk/StorageProcessMainGtk.cpp: Renamed from Source/WebKit/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp.
3241 * StorageProcess/ios/StorageProcessIOS.mm: Renamed from Source/WebKit/DatabaseProcess/ios/DatabaseProcessIOS.mm.
3242 * StorageProcess/mac/StorageProcessMac.mm: Renamed from Source/WebKit/DatabaseProcess/mac/DatabaseProcessMac.mm.
3243 * StorageProcess/unix/StorageProcessMainUnix.h: Renamed from Source/WebKit/DatabaseProcess/unix/DatabaseProcessMainUnix.h.
3244 * UIProcess/Network/NetworkProcessProxy.cpp:
3246 * UIProcess/Storage/StorageProcessProxy.cpp: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.cpp.
3247 * UIProcess/Storage/StorageProcessProxy.h: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.h.
3248 * UIProcess/Storage/StorageProcessProxy.messages.in: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.messages.in.
3250 * UIProcess/WebContextSupplement.h:
3251 * UIProcess/WebProcessPool.cpp:
3252 * UIProcess/WebProcessPool.h:
3253 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3254 * UIProcess/WebsiteData/WebsiteDataStore.h:
3255 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3256 * WebProcess/Databases/WebDatabaseProvider.cpp:
3258 * WebProcess/Storage/WebToStorageProcessConnection.cpp: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.cpp.
3259 * WebProcess/Storage/WebToStorageProcessConnection.h: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.h.
3261 * WebProcess/WebProcess.cpp:
3263 2017-08-01 Michael Catanzaro <mcatanzaro@igalia.com>
3265 [CMake] WebKitFS.cmake depends on options set in Option cmake files that are included later
3266 https://bugs.webkit.org/show_bug.cgi?id=174855
3268 Reviewed by Carlos Garcia Campos.
3270 Don't create derived sources directory here anymore.
3272 * PlatformGTK.cmake:
3273 * PlatformMac.cmake:
3274 * PlatformWPE.cmake:
3276 2017-07-31 Daniel Bates <dabates@apple.com>
3278 WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction() may not be able to
3279 determine page that initiated navigation
3280 https://bugs.webkit.org/show_bug.cgi?id=174531
3282 Remove a comment from WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction()
3283 about determining the originating page independently from the originating frame. There
3284 does not seem to be much value to fixing this. We can always revisit this issue if we
3285 discover a strong motivating example. See <https://bugs.webkit.org/show_bug.cgi?id=174531#c1>
3288 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3289 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3291 2017-07-31 Sam Weinig <sam@webkit.org>
3293 Remove unnecessary exceptions from storage code
3294 https://bugs.webkit.org/show_bug.cgi?id=174572
3296 Reviewed by Chris Dumez.
3298 * WebProcess/Storage/StorageAreaImpl.cpp:
3299 (WebKit::StorageAreaImpl::canAccessStorage): Deleted.
3300 * WebProcess/Storage/StorageAreaImpl.h:
3301 * WebProcess/Storage/StorageNamespaceImpl.cpp:
3302 Remove canAccessStorage. It is no longer called.
3304 2017-07-30 Brady Eidson <beidson@apple.com>
3306 Add URLSchemeHandler API tests that verify the lack of URLSchemeTask object leaks.
3307 https://bugs.webkit.org/show_bug.cgi?id=174958
3309 Reviewed by Darin Adler.
3311 * UIProcess/API/APIURLSchemeTask.h:
3313 * UIProcess/API/C/WKTestingSupport.cpp:
3314 (WKGetAPIURLSchemeTaskInstanceCount):
3315 (WKGetWebURLSchemeTaskInstanceCount):
3316 * UIProcess/API/C/WKTestingSupport.h:
3318 * UIProcess/WebURLSchemeTask.h:
3320 * WebKit.xcodeproj/project.pbxproj:
3322 2017-07-29 Yusuke Suzuki <utatane.tea@gmail.com>
3324 Unreviewed, build fix for GTK and WPE about StorageProcess renaming
3327 * PlatformGTK.cmake:
3328 * PlatformMac.cmake:
3329 * PlatformWPE.cmake:
3331 2017-07-28 Brent Fulgham <bfulgham@apple.com>
3333 [Mac][WebKit2] WebKit sandbox errors while streaming Netflix
3334 https://bugs.webkit.org/show_bug.cgi?id=174955
3335 <rdar://problem/33583994>
3337 Reviewed by Alex Christensen.
3339 Wider testing with the stricter sandboxing rules identified three more IOKit properties we need to expose:
3341 - CEAPixelRepetition
3344 * WebProcess/com.apple.WebProcess.sb.in:
3346 2017-07-28 Commit Queue <commit-queue@webkit.org>
3348 Unreviewed, rolling out r219986.
3349 https://bugs.webkit.org/show_bug.cgi?id=174962
3351 "broke PLT on iOS (rdar://problem/33602751)" (Requested by
3356 "Part 1 of: Rename DatabaseProcess to StorageProcess."
3357 https://bugs.webkit.org/show_bug.cgi?id=174879
3358 http://trac.webkit.org/changeset/219986
3360 2017-07-28 Commit Queue <commit-queue@webkit.org>
3362 Unreviewed, rolling out r219990.
3363 https://bugs.webkit.org/show_bug.cgi?id=174961
3365 "broke PLT on iOS (rdar://problem/33602751)" (Requested by
3370 "Part 2 of: Rename DatabaseProcess to StorageProcess."
3371 https://bugs.webkit.org/show_bug.cgi?id=174880
3372 http://trac.webkit.org/changeset/219990
3374 2017-07-28 Brady Eidson <beidson@apple.com>
3376 API tests that use URLSchemeHandler are failing.
3377 https://bugs.webkit.org/show_bug.cgi?id=174950
3379 Reviewed by Alex Christensen.
3381 Make sure that in all cases where we remove the last task from the page->task map...
3382 ...We also remove the map itself.
3384 * UIProcess/WebURLSchemeHandler.cpp:
3385 (WebKit::WebURLSchemeHandler::stopTask):
3386 (WebKit::WebURLSchemeHandler::taskCompleted):
3387 (WebKit::WebURLSchemeHandler::removeTaskFromPageMap):
3388 * UIProcess/WebURLSchemeHandler.h:
3390 2017-07-28 Brady Eidson <beidson@apple.com>
3392 WKURLSchemeTaskImpl instances are being abandoned (except if the task is stopped).
3393 <rdar://problem/33568276> and https://bugs.webkit.org/show_bug.cgi?id=174895
3395 Reviewed by Alex Christensen.
3397 There was a lot going on here:
3398 - There was an unbroken cycle between URLSchemeHandlers and URLSchemeTasks
3399 - WKURLSchemeTasks were not destroying their API::URLSchemeTask implementation object
3400 - When a WKWebView was dealloc'ed, it was not cleaning up the related UIProcess tasks
3401 - If the NetworkingProcess crashed, WebProcesses were not cleaning up their tasks
3402 (and therefore the UIProcess tasks were also not getting cleaned up)
3403 - If a WebProcess crashed, the UIProcess was not cleaning up the related tasks
3405 * UIProcess/API/Cocoa/WKURLSchemeTask.mm:
3406 (-[WKURLSchemeTaskImpl dealloc]): Call API::~URLSchemeTask
3408 * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h:
3409 * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
3410 (WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Clear out the API wrapper map
3411 so the wrapper and implementation object can both be destroyed.
3413 * UIProcess/WebPageProxy.cpp:
3414 (WebKit::WebPageProxy::close): Call stopAllURLSchemeTasks.
3415 (WebKit::WebPageProxy::processDidTerminate): Call stopAllURLSchemeTasks.
3416 (WebKit::WebPageProxy::stopAllURLSchemeTasks):
3417 * UIProcess/WebPageProxy.h:
3419 * UIProcess/WebURLSchemeHandler.cpp:
3420 (WebKit::WebURLSchemeHandler::startTask):
3421 (WebKit::WebURLSchemeHandler::stopAllTasksForPage):
3422 (WebKit::WebURLSchemeHandler::stopTask):
3423 (WebKit::WebURLSchemeHandler::taskCompleted):
3424 * UIProcess/WebURLSchemeHandler.h:
3426 * UIProcess/WebURLSchemeTask.cpp:
3427 (WebKit::WebURLSchemeTask::WebURLSchemeTask):
3428 * UIProcess/WebURLSchemeTask.h:
3429 (WebKit::WebURLSchemeTask::pageID): Store separate from the WebPage so messaging
3430 is possible even after the WebPage* has been cleared.
3432 * WebProcess/WebPage/WebPage.cpp:
3433 (WebKit::WebPage::stopAllURLSchemeTasks):
3434 * WebProcess/WebPage/WebPage.h:
3436 * WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:
3437 (WebKit::WebURLSchemeHandlerProxy::stopAllTasks):
3438 (WebKit::WebURLSchemeHandlerProxy::taskDidComplete):
3439 (WebKit::WebURLSchemeHandlerProxy::taskDidStopLoading):
3440 (WebKit::WebURLSchemeHandlerProxy::removeTask):
3441 * WebProcess/WebPage/WebURLSchemeHandlerProxy.h:
3443 * WebProcess/WebProcess.cpp:
3444 (WebKit::WebProcess::networkProcessConnectionClosed): Call stopAllURLSchemeTasks
3447 2017-07-28 Frederic Wang <fwang@igalia.cpm>
3449 Fix typo in scrollPositionChangedViaDelegatedScrolling
3450 https://bugs.webkit.org/show_bug.cgi?id=174937
3452 Reviewed by Wenson Hsieh.
3454 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
3455 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
3456 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
3458 2017-07-28 Jeremy Jones <jeremyj@apple.com>