1 2017-10-18 Chris Dumez <cdumez@apple.com>
3 Unreviewed, fix build error after r223608 with some SDKs.
5 * StorageProcess/StorageProcess.cpp:
6 (WebKit::StorageProcess::ensureSWOriginStoreForSession):
8 2017-10-18 Chris Dumez <cdumez@apple.com>
10 Add an efficient data structure for WebCore to query if there is a Service Worker registered for a given origin
11 https://bugs.webkit.org/show_bug.cgi?id=177876
12 <rdar://problem/34813129>
14 Reviewed by Ryosuke Niwa.
16 Introduce a Service Worker origin store which gets populated / updated on the StorageProcess side
17 and queried on the WebContent process side via the WebSWOriginTable so that the WebProcess can
18 efficiently check if there is a ServiceWorker registered for a given origin without actually doing
19 an IPC to the StorageProcess.
21 For efficiency, the hash table is backed by SharedMemory so we only pass shared memory handles
22 between the StorageProcess and the WebProcesses.
24 We currently add entries to the WebSWOriginStore whenever a service worker registration succeeds
25 on the StorageProcess side. We also clear this store whenever the API to clear service worker
26 registrations is called. Code to query the WebSWOriginTable from the WebContent process side is
27 there but currently only used by Internals for testing. We will later leverage this code when
28 integrating with Fetch API.
31 * Shared/SharedStringHashStore.h:
32 (WebKit::SharedStringHashStore::Client::didUpdateSharedStringHashes):
33 * Shared/SharedStringHashTable.cpp:
34 (WebKit::SharedStringHashTable::clear):
35 * StorageProcess/ServiceWorker/WebSWOriginStore.cpp: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp.
36 (WebKit::WebSWOriginStore::WebSWOriginStore):
37 (WebKit::WebSWOriginStore::add):
38 (WebKit::WebSWOriginStore::remove):
39 (WebKit::WebSWOriginStore::clear):
40 (WebKit::WebSWOriginStore::registerSWServerConnection):
41 (WebKit::WebSWOriginStore::unregisterSWServerConnection):
42 (WebKit::WebSWOriginStore::sendStoreHandle):
43 (WebKit::WebSWOriginStore::didInvalidateSharedMemory):
44 * StorageProcess/ServiceWorker/WebSWOriginStore.h: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.h.
45 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
46 (WebKit::WebSWServerConnection::WebSWServerConnection):
47 (WebKit::WebSWServerConnection::resolveJobInClient):
48 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
49 (WebKit::WebSWServerConnection::sessionID const):
50 * StorageProcess/StorageProcess.cpp:
51 (WebKit::StorageProcess::deleteWebsiteData):
52 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
53 (WebKit::StorageProcess::ensureSWOriginStoreForSession):
54 (WebKit::StorageProcess::swOriginStoreForSession const):
55 (WebKit::StorageProcess::serviceWorkerContextStarted):
56 (WebKit::StorageProcess::registerSWServerConnection):
57 (WebKit::StorageProcess::unregisterSWServerConnection):
58 * StorageProcess/StorageProcess.h:
59 * StorageProcess/StorageProcess.messages.in:
60 * WebKit.xcodeproj/project.pbxproj:
61 * WebProcess/Storage/WebSWClientConnection.cpp:
62 (WebKit::WebSWClientConnection::WebSWClientConnection):
63 (WebKit::WebSWClientConnection::hasServiceWorkerRegisteredForOrigin const):
64 (WebKit::WebSWClientConnection::setSWOriginTableSharedMemory):
65 * WebProcess/Storage/WebSWClientConnection.h:
66 * WebProcess/Storage/WebSWClientConnection.messages.in:
67 * WebProcess/Storage/WebSWOriginTable.cpp: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.h.
68 (WebKit::WebSWOriginTable::contains const):
69 (WebKit::WebSWOriginTable::setSharedMemory):
70 * WebProcess/Storage/WebSWOriginTable.h: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.h.
71 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
72 (WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession):
73 * WebProcess/Storage/WebServiceWorkerProvider.h:
74 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
75 (WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession):
76 * WebProcess/Storage/WebToStorageProcessConnection.h:
77 * WebProcess/WebProcess.cpp:
78 (WebKit::WebProcess::startServiceWorkerContext):
80 2017-10-16 Andy Estes <aestes@apple.com>
82 [Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and ApplePayError
83 https://bugs.webkit.org/show_bug.cgi?id=178191
84 <rdar://problem/34906367>
86 Reviewed by Tim Horton.
88 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
91 2017-10-17 Sam Weinig <sam@webkit.org>
93 [Settings] Generate Settings.h/cpp
94 https://bugs.webkit.org/show_bug.cgi?id=178361
96 Reviewed by Dean Jackson.
101 Delete the old Settings.h from the forwarding
102 headers directory to allow the build to work.
104 2017-10-17 John Wilander <wilander@apple.com>
106 Add and remove cookie partition accordingly in intermediary redirect requests
107 https://bugs.webkit.org/show_bug.cgi?id=178369
108 <rdar://problem/34467603>
110 Reviewed by Brent Fulgham.
112 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
113 (WebKit::shouldChangePartition):
114 Convenience function. Comment documents the logic.
115 (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
116 Now adds and removes cookie partition based on the
117 redirect-to URL's domain.
118 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
119 (WKBundleResourceLoadStatisticsNotifyObserver):
121 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
123 2017-10-17 Youenn Fablet <youenn@apple.com>
125 Cache API implementation should be able to compute storage size for WebKit client applications.
126 https://bugs.webkit.org/show_bug.cgi?id=178350
128 Reviewed by Chris Dumez.
130 When gathering data from DOM Cache, we compute the size as follows:
131 - If Caches object is not persistent, size is zero
132 - If Caches object is persistent, we use the size computed by NetworkCache::Storage.
133 Covered by updated tests.
135 * NetworkProcess/cache/CacheStorageEngine.cpp:
136 (WebKit::CacheStorage::ReadOriginsTaskCounter::create):
137 (WebKit::CacheStorage::ReadOriginsTaskCounter::addOrigin):
138 (WebKit::CacheStorage::Engine::fetchEntries):
139 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
140 (WebKit::CacheStorage::Caches::storageSize const):
141 * NetworkProcess/cache/CacheStorageEngineCaches.h:
142 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
143 (WKWebsiteDataStoreGetFetchCacheSizeForOrigin):
144 * UIProcess/API/C/WKWebsiteDataStoreRef.h:
146 2017-10-17 Keith Miller <keith_miller@apple.com>
148 Change WebCore sources to work with unified source builds
149 https://bugs.webkit.org/show_bug.cgi?id=178229
151 Rubber stamped by Tim Horton.
153 * Configurations/FeatureDefines.xcconfig:
155 2017-10-16 Wenson Hsieh <wenson_hsieh@apple.com>
157 Unreviewed, fix the iOS build after r223431
159 Remove an unused variable captured in a lambda.
161 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
162 (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
164 2017-10-12 Matt Rajca <mrajca@apple.com>
166 Add API support for quirk that lets an arbitrary click allow auto-play.
167 https://bugs.webkit.org/show_bug.cgi?id=178227
169 Reviewed by Alex Christensen.
171 Instead of hardcoding sites in WebCore, let API clients control which websites opt into the quirk that lets
172 an arbitrary click allow auto-play via website policies.
174 * Shared/WebsitePolicies.h:
175 * UIProcess/API/C/WKWebsitePolicies.cpp:
176 (WKWebsitePoliciesSetAllowedAutoplayQuirks):
177 (WKWebsitePoliciesGetAllowedAutoplayQuirks):
178 * UIProcess/API/C/WKWebsitePolicies.h:
179 * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
180 * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
181 (-[_WKWebsitePolicies setAllowedAutoplayQuirks:]):
182 (-[_WKWebsitePolicies allowedAutoplayQuirks]):
183 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
184 (WebKit::WebFrameLoaderClient::applyToDocumentLoader):
185 * WebProcess/WebPage/WebPage.cpp:
186 (WebKit::WebPage::updateWebsitePolicies):
188 2017-10-16 Andy Estes <aestes@apple.com>
190 [Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and ApplePayError
191 https://bugs.webkit.org/show_bug.cgi?id=178191
192 <rdar://problem/34906367>
194 Reviewed by Tim Horton.
196 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
199 2017-10-16 Tim Horton <timothy_horton@apple.com>
201 Safari crashes after searching PDF (under [WKPDFView zoom:to:atPoint:kind:])
202 https://bugs.webkit.org/show_bug.cgi?id=178358
203 <rdar://problem/34676899>
205 Reviewed by Wenson Hsieh.
207 * UIProcess/ios/WKPDFView.mm:
208 (-[WKPDFView _didFindMatch:]):
209 UIPDFSelection can return a null rect as the selection's bounds.
210 We can't zoom to a null rect (and doing so results in CA throwing an
213 2017-10-16 Alex Christensen <achristensen@webkit.org>
215 Add a _WKThumbnailView initializer with a WKWebView
216 https://bugs.webkit.org/show_bug.cgi?id=178351
217 <rdar://problem/34979453>
219 Reviewed by Tim Horton.
221 * UIProcess/API/Cocoa/WKWebView.mm:
222 (-[WKWebView _page]):
223 (-[WKWebView _setThumbnailView:]):
224 (-[WKWebView _thumbnailView]):
225 (-[WKWebView _setIgnoresAllEvents:]):
226 (-[WKWebView _ignoresAllEvents]):
227 * UIProcess/API/Cocoa/WKWebViewInternal.h:
228 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
229 * UIProcess/API/Cocoa/_WKThumbnailView.h:
230 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
231 (-[_WKThumbnailView initWithFrame:fromWKWebView:]):
232 (-[_WKThumbnailView _viewWasUnparented]):
233 (-[_WKThumbnailView _viewWasParented]):
235 2017-10-16 Alex Christensen <achristensen@webkit.org>
237 Expose more WKView properties as WKWebViewPrivate SPI
238 https://bugs.webkit.org/show_bug.cgi?id=178349
239 <rdar://problem/34980919>
241 Reviewed by Tim Horton.
243 _backgroundExtendsBeyondPage was already exposed on iOS, but we need it on Mac, too.
244 A few other properties also need exposing.
246 * UIProcess/API/Cocoa/WKWebView.mm:
247 (toAPIScrollbarStyle):
248 (toCoreScrollbarStyle):
249 (-[WKWebView _setBackgroundExtendsBeyondPage:]):
250 (-[WKWebView _backgroundExtendsBeyondPage]):
251 (-[WKWebView _setOverlayScrollbarStyle:]):
252 (-[WKWebView _overlayScrollbarStyle]):
253 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
255 2017-10-16 Chris Dumez <cdumez@apple.com>
257 Log using differential privacy domains where the WebContent process crashes
258 https://bugs.webkit.org/show_bug.cgi?id=178346
259 <rdar://problem/33293830>
261 Reviewed by Alex Christensen.
263 * UIProcess/WebPageProxy.cpp:
264 (WebKit::WebPageProxy::reload):
265 (WebKit::WebPageProxy::currentURL const):
266 (WebKit::WebPageProxy::processDidTerminate):
267 * UIProcess/WebPageProxy.h:
268 * UIProcess/WebProcessProxy.cpp:
269 (WebKit::WebProcessProxy::didClose):
271 2017-10-16 Youenn Fablet <youenn@apple.com>
273 Activate Cache API by default
274 https://bugs.webkit.org/show_bug.cgi?id=178186
276 Reviewed by Chris Dumez.
278 * Shared/WebPreferencesDefinitions.h:
280 2017-10-16 Sam Weinig <sam@webkit.org>
282 [Settings] Remove all custom code from Settings.h/cpp
283 https://bugs.webkit.org/show_bug.cgi?id=178330
285 Reviewed by Simon Fraser.
287 * Shared/WebPreferencesDefinitions.h:
288 * UIProcess/API/C/WKPreferences.cpp:
289 (WKPreferencesSetFrameFlatteningEnabled):
290 (WKPreferencesGetFrameFlatteningEnabled):
291 * UIProcess/API/glib/WebKitSettings.cpp:
292 (webkit_settings_get_enable_frame_flattening):
293 (webkit_settings_set_enable_frame_flattening):
294 * WebProcess/InjectedBundle/InjectedBundle.cpp:
295 (WebKit::InjectedBundle::setFrameFlatteningEnabled):
297 Update for naming changes of FrameFlattening now that it is an enum class.
299 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
300 (WebKit::WebChromeClient::contentsSizeChanged const):
302 Ge the effectiveFrameFlattening from the FrameView, rather than the Settings.
304 2017-10-16 Chris Dumez <cdumez@apple.com>
306 [WK2][NetworkSession] Add support for resuming downloads
307 https://bugs.webkit.org/show_bug.cgi?id=177625
308 <rdar://problem/34345975>
310 Reviewed by Alex Christensen.
312 Add support for resuming downloads for the WK2 NETWORK_SESSION code path.
314 This was tested manually. I was unable to write an API test because our tests
315 do not run an HTTP server and CFNetwork does not seem to generate resume data
316 when cancelling a download over non-HTTP.
318 * NetworkProcess/Downloads/Download.cpp:
319 (WebKit::Download::didReceiveChallenge):
320 (WebKit::Download::continueCanAuthenticateAgainstProtectionSpace):
321 * NetworkProcess/Downloads/Download.h:
322 * NetworkProcess/Downloads/DownloadManager.cpp:
323 (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
324 (WebKit::DownloadManager::resumeDownload):
325 * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
326 (WebKit::Download::resume):
327 This currently includes a workaround for <rdar://problem/34745171>. We update the
328 resume data to include the NSURLSessionResumeInfoLocalPath key with the final
329 destination path so that CFNetwork looks for the temporary data at the right
332 * NetworkProcess/cocoa/NetworkSessionCocoa.h:
333 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
334 (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
335 (WebKit::NetworkSessionCocoa::downloadTaskWithResumeData):
336 * Shared/Authentication/AuthenticationManager.cpp:
337 (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
338 * Shared/Authentication/AuthenticationManager.h:
340 2017-10-16 Adrian Perez de Castro <aperez@igalia.com>
342 [WPE] Build failure due to invalid cast of EGLNativeWindowType when targetting 64-bit ARM
343 https://bugs.webkit.org/show_bug.cgi?id=178090
345 Reviewed by Michael Catanzaro.
347 EGLNativeWindowType can be aliased to a different type depending (at least) on the EGL
348 implementation, its build options, and the libepoxy build options. Using "static_cast"
349 works when it is a numeric value and the width of the value needs to be optionally
350 extended to 64 bits (e.g. the EGL type is "int" in a 32-bit CPU) but not for pointers,
351 and using "reinterpret_cast" works when the size of a pointer is 64 bits but not in other
352 cases. Therefore it seems reasonable to use a plain C cast expression to solve this
353 particular situation.
355 * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
356 (WebKit::AcceleratedSurfaceWPE::window const): Use a good old plain C cast expression.
358 2017-10-16 Chris Dumez <cdumez@apple.com>
360 Clicks on Link with download attribute causes all (other) links to trigger download when clicked
361 https://bugs.webkit.org/show_bug.cgi?id=178267
362 <rdar://problem/34985016>
364 Reviewed by Darin Adler.
366 When clicking on an anchor with the download attribute, the m_syncNavigationActionHasDownloadAttribute
367 flag on WebPageProxy would get set. This flag would not get reset right away and instead, it would get
368 updated during the next call to WebPageProxy::decidePolicyForNavigationAction(). The issue is that if
369 you later click on a link with target="_blank", WebPageProxy::decidePolicyForNewWindowAction() gets
370 called instead of WebPageProxy::decidePolicyForNavigationAction() and we do not reset the
371 m_syncNavigationActionHasDownloadAttribute flag and we force a download.
373 To address the problem, I got rid of this flag on WebPageProxy and it is error-prone and should really
374 not be at page-level. Instead, I added a shouldForceDownload flag on the navigation object. It makes
375 more sense to associate the flag with the navigation and makes it less error-prone.
377 * UIProcess/API/APINavigation.h:
378 (API::Navigation::setShouldForceDownload):
379 (API::Navigation::shouldForceDownload const):
380 * UIProcess/WebPageProxy.cpp:
381 (WebKit::WebPageProxy::receivedPolicyDecision):
382 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
383 * UIProcess/WebPageProxy.h:
385 2017-10-16 Ryan Haddad <ryanhaddad@apple.com>
387 Unreviewed, rolling out r223271.
389 This change introduced LayoutTest failures on WK1.
393 "Use asynchronous ResourceHandleClient calls for WebKit1"
394 https://bugs.webkit.org/show_bug.cgi?id=160677
395 https://trac.webkit.org/changeset/223271
397 2017-10-13 Youenn Fablet <youenn@apple.com>
399 Implement listing origins for which CacheStorage is storing data
400 https://bugs.webkit.org/show_bug.cgi?id=178236
402 Reviewed by Chris Dumez.
404 Cache storage is split on per-origin folders which name is obfuscated through salting.
405 To retrieve the origin for each folder, an origin file is now stored within each folder.
406 This file contains the actual origin.
408 Adding support to get the list of origin by iterating through each folder and
409 getting the actual origin by reading the content of the 'origin' file.
411 Adding C API for WebKitTestRunner.
413 * NetworkProcess/cache/CacheStorageEngine.cpp:
414 (WebKit::CacheStorage::Engine::fetchEntries):
415 (WebKit::CacheStorage::ReadOriginsTaskCounter::create):
416 (WebKit::CacheStorage::ReadOriginsTaskCounter::~ReadOriginsTaskCounter):
417 (WebKit::CacheStorage::ReadOriginsTaskCounter::addOrigin):
418 (WebKit::CacheStorage::ReadOriginsTaskCounter::ReadOriginsTaskCounter):
419 * NetworkProcess/cache/CacheStorageEngine.h:
420 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
421 (WebKit::CacheStorage::cachesOriginFilename):
422 (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
423 (WebKit::CacheStorage::Caches::Caches):
424 (WebKit::CacheStorage::Caches::storeOrigin):
425 (WebKit::CacheStorage::Caches::readOrigin):
426 (WebKit::CacheStorage::Caches::initialize):
427 * NetworkProcess/cache/CacheStorageEngineCaches.h:
428 (WebKit::CacheStorage::Caches::origin const):
429 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
430 (WKWebsiteDataStoreGetFetchCacheOrigins):
431 * UIProcess/API/C/WKWebsiteDataStoreRef.h:
433 2017-10-13 Alex Christensen <achristensen@webkit.org>
435 Fix API tests after r223269.
436 https://bugs.webkit.org/show_bug.cgi?id=178246
438 * UIProcess/API/APIContentRuleListStore.cpp:
439 (API::ContentRuleListStore::getContentRuleListSource):
440 Version 10 also has the ability to recover content rule list source.
442 2017-10-11 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
444 [GLib] WebKitNavigationAction should tell whether it is a redirect
445 https://bugs.webkit.org/show_bug.cgi?id=178178
447 There is no good way to know whether a given navigation action has been caused
448 by a redirect through the glib API. This is necessary to implement some app mode
449 heuristics for Epiphany.
451 Reviewed by Carlos Garcia Campos.
453 * UIProcess/API/glib/WebKitNavigationAction.cpp:
454 (webkit_navigation_action_is_redirect): returns whether the navigation action is a redirect.
455 * UIProcess/API/glib/WebKitNavigationActionPrivate.h: add isRedirect to the wrapper object.
456 (_WebKitNavigationAction::_WebKitNavigationAction):
457 * UIProcess/API/gtk/WebKitNavigationAction.h: add the new API.
458 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: ditto.
459 * UIProcess/API/wpe/WebKitNavigationAction.h: ditto.
461 2017-10-12 Brady Eidson <beidson@apple.com>
464 https://bugs.webkit.org/show_bug.cgi?id=178187
466 Reviewed by Andy Estes.
468 * WebProcess/WebProcess.cpp:
469 (WebKit::WebProcess::startServiceWorkerContext):
471 2017-10-12 Alex Christensen <achristensen@webkit.org>
473 Remove unnecessary includes in WebKit
474 https://bugs.webkit.org/show_bug.cgi?id=178235
476 Reviewed by Tim Horton.
478 * Platform/IPC/ArgumentCoders.h:
479 * WebProcess/WebProcess.cpp:
480 * WebProcess/WebStorage/StorageAreaImpl.h:
482 2017-10-12 Alex Christensen <achristensen@webkit.org>
484 Increment ContentRuleListStore::CurrentContentRuleListFileVersion
485 https://bugs.webkit.org/show_bug.cgi?id=178246
486 <rdar://problem/34890057>
488 Reviewed by Tim Horton.
490 * UIProcess/API/APIContentRuleListStore.h:
491 Things are crashing. Something isn't binary reverse compatible.
492 Probably something related to r222602.
493 This is why we have a version number to update.
495 2017-10-12 Alex Christensen <achristensen@webkit.org>
497 Expose some of WKView's WebViewImpl accessors through WKWebViewPrivate
498 https://bugs.webkit.org/show_bug.cgi?id=178240
499 <rdar://problem/34962720>
501 Reviewed by Tim Horton.
503 Also renamed createFullScreenWindow to fullScreenWindow to reflect the fact that it returns
504 an autoreleased NSWindow so we don't make the same naming mistake in the WKWebView SPI.
506 * UIProcess/API/Cocoa/WKWebView.mm:
507 (-[WKWebView _dismissContentRelativeChildWindows]):
508 (-[WKWebView _setFrame:andScrollBy:]):
509 (-[WKWebView _setTotalHeightOfBanners:]):
510 (-[WKWebView _totalHeightOfBanners]):
511 (-[WKWebView _beginDeferringViewInWindowChanges]):
512 (-[WKWebView _endDeferringViewInWindowChanges]):
513 (-[WKWebView _endDeferringViewInWindowChangesSync]):
514 (-[WKWebView _gestureEventWasNotHandledByWebCore:]):
515 (-[WKWebView _setIgnoresNonWheelEvents:]):
516 (-[WKWebView _ignoresNonWheelEvents]):
517 (-[WKWebView _setCustomSwipeViews:]):
518 (-[WKWebView _setCustomSwipeViewsTopContentInset:]):
519 (-[WKWebView _tryToSwipeWithEvent:ignoringPinnedState:]):
520 (-[WKWebView _setDidMoveSwipeSnapshotCallback:]):
521 (-[WKWebView _fullScreenPlaceholderView]):
522 (-[WKWebView _fullScreenWindow]):
523 (-[WKWebView _disableFrameSizeUpdates]):
524 (-[WKWebView _enableFrameSizeUpdates]):
525 (-[WKWebView _canChangeFrameLayout:]):
526 (-[WKWebView _underlayColor]):
527 (-[WKWebView _setUnderlayColor:]):
528 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
529 * UIProcess/API/mac/WKView.mm:
530 (-[WKView createFullScreenWindow]):
531 * UIProcess/Cocoa/WebViewImpl.h:
532 * UIProcess/Cocoa/WebViewImpl.mm:
533 (WebKit::WebViewImpl::fullScreenWindowController):
534 (WebKit::WebViewImpl::fullScreenWindow):
535 (WebKit::WebViewImpl::createFullScreenWindow): Deleted.
537 2017-10-12 Youenn Fablet <youenn@apple.com>
539 Layout Test http/tests/cache-storage/cache-clearing.https.html is failing
540 https://bugs.webkit.org/show_bug.cgi?id=178200
542 Reviewed by Chris Dumez.
544 Deleting only the per-origin folders inside the CacheStorage engine root folder.
546 * NetworkProcess/cache/CacheStorageEngine.cpp:
547 (WebKit::CacheStorage::Engine::clearAllCaches):
548 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
549 (WKWebsiteDataStoreRemoveAllFetchCaches):
550 (WKWebsiteDataStoreRemoveFetchCacheForOrigin):
551 * UIProcess/API/C/WKWebsiteDataStoreRef.h:
553 2017-10-12 Chris Dumez <cdumez@apple.com>
555 [Mac] Add support for MouseEvent.buttons
556 https://bugs.webkit.org/show_bug.cgi?id=178214
558 Reviewed by Ryosuke Niwa.
561 (WebKit::WebMouseEvent::buttons const):
562 * Shared/WebEventConversion.cpp:
563 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
564 * Shared/WebMouseEvent.cpp:
565 (WebKit::WebMouseEvent::WebMouseEvent):
566 (WebKit::WebMouseEvent::encode const):
567 (WebKit::WebMouseEvent::decode):
568 * Shared/mac/WebEventFactory.mm:
569 (WebKit::currentlyPressedMouseButtons):
570 (WebKit::WebEventFactory::createWebMouseEvent):
571 * WebProcess/Plugins/PDF/PDFPlugin.mm:
572 (WebKit::PDFPlugin::showContextMenuAtPoint):
573 * WebProcess/Plugins/PluginView.cpp:
574 (WebKit::PluginView::createWebEvent const):
575 * WebProcess/WebPage/WebPage.cpp:
576 (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
577 (WebKit::WebPage::simulateMouseDown):
578 (WebKit::WebPage::simulateMouseUp):
579 (WebKit::WebPage::simulateMouseMotion):
581 2017-10-12 Youenn Fablet <youenn@apple.com>
583 Add API to clean CacheStorage data
584 https://bugs.webkit.org/show_bug.cgi?id=178034
588 * Shared/WebsiteData/WebsiteDataType.h: fixing the DOMCache value.
590 2017-10-12 Stephan Szabo <stephan.szabo@sony.com>
592 [WinCairo] add WebProcess files for wincairo webkit
593 https://bugs.webkit.org/show_bug.cgi?id=178024
595 Reviewed by Alex Christensen.
598 * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Added.
599 (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
600 (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
601 * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp: Added.
602 (WebKit::InjectedBundle::initialize):
603 (WebKit::InjectedBundle::setBundleParameter):
604 (WebKit::InjectedBundle::setBundleParameters):
605 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
606 * WebProcess/Plugins/Netscape/win/PluginProxyWin.cpp: Added.
607 (WebKit::PluginProxy::needsBackingStore const):
608 * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp: Added.
609 (WebKit::WebContextMenuClient::lookUpInDictionary):
610 (WebKit::WebContextMenuClient::isSpeaking):
611 (WebKit::WebContextMenuClient::speak):
612 (WebKit::WebContextMenuClient::stopSpeaking):
613 * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.cpp: Added.
614 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
615 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
616 (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
617 (WebKit::WebFrameNetworkingContext::storageSession const):
618 (WebKit::WebFrameNetworkingContext::webFrameLoaderClient const):
619 (WebKit::WebFrameNetworkingContext::blockedError const):
620 * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h: Added.
621 (WebKit::WebFrameNetworkingContext::create):
622 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Added.
623 (WebKit::WebPopupMenu::setUpPlatformData):
624 * WebProcess/WebPage/win/WebInspectorUIWin.cpp: Added.
625 (WebKit::WebInspectorUI::canSave):
626 (WebKit::WebInspectorUI::localizedStringsURL):
627 (WebKit::RemoteWebInspectorUI::localizedStringsURL):
628 * WebProcess/WebPage/win/WebPageWin.cpp: Added.
629 (WebKit::WebPage::platformInitialize):
630 (WebKit::WebPage::platformDetach):
631 (WebKit::WebPage::platformEditorState const):
632 (WebKit::WebPage::platformPreferencesDidChange):
633 (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
634 (WebKit::WebPage::platformHasLocalDataForURL):
635 (WebKit::WebPage::cachedResponseMIMETypeForURL):
636 (WebKit::WebPage::platformCanHandleRequest):
637 (WebKit::WebPage::cachedSuggestedFilenameForURL):
638 (WebKit::WebPage::cachedResponseDataForURL):
639 (WebKit::WebPage::platformUserAgent const):
640 (WebKit::WebPage::interpretKeyEvent):
641 * WebProcess/WebProcess.cpp:
642 (WebKit::WebProcess::ensureWebToStorageProcessConnection):
643 * WebProcess/win/WebProcessWin.cpp: Added.
644 (loadResourceIntoBuffer):
645 (WebKit::WebProcess::platformInitializeWebProcess):
646 (WebKit::WebProcess::platformTerminate):
647 (WebKit::WebProcess::platformSetCacheModel):
649 2017-10-12 David Kilzer <ddkilzer@apple.com>
651 [iOS] Fix -Wunused-lambda-capture warnings in WebCore/WebKit with new clang compiler
652 <https://webkit.org/b/178226>
654 Reviewed by Chris Fleizach.
656 * UIProcess/ios/WKContentViewInteraction.mm:
657 (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:withFlags:]):
658 - Remove unused lambda variable 'touch' which was also passed as
660 (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
661 - Remove unused lambda variable 'gestureState' which was also
662 passed as an argument.
663 (-[WKContentView _simulateLongPressActionAtLocation:]):
664 - Remove unused lambda variable 'location'.
666 2017-10-12 John Wilander <wilander@apple.com>
668 ResourceLoadObserver::logFrameNavigation() should use redirectResponse.url()
669 https://bugs.webkit.org/show_bug.cgi?id=175257
670 <rdar://problem/33359866>
672 Reviewed by Brent Fulgham.
674 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
675 (-[WKWebsiteDataStore _resourceLoadStatisticsIsRegisteredAsSubFrameUnder:topFrameHost:completionHandler:]):
676 (-[WKWebsiteDataStore _resourceLoadStatisticsIsRegisteredAsRedirectingTo:hostRedirectedTo:completionHandler:]):
678 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
679 * UIProcess/WebResourceLoadStatisticsStore.cpp:
680 (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubFrameUnder):
681 (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsRedirectingTo):
683 * UIProcess/WebResourceLoadStatisticsStore.h:
685 2017-10-12 Andy Estes <aestes@apple.com>
687 [iOS] Conditionally rename DatabaseProcess to StorageProcess when building for iOS devices
688 https://bugs.webkit.org/show_bug.cgi?id=178181
689 <rdar://problem/33660282>
691 Reviewed by Dan Bernstein.
693 * Configurations/BaseTarget.xcconfig:
694 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
695 (WebKit::serviceName):
696 * WebKit.xcodeproj/project.pbxproj:
698 2017-10-12 Youenn Fablet <youenn@apple.com>
700 CacheStorage persistent folder should be in /Library/Cache
701 https://bugs.webkit.org/show_bug.cgi?id=178193
703 Reviewed by Brady Eidson.
705 * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
706 (API::WebsiteDataStore::defaultCacheStorageDirectory): Making CacheStorage
707 directory a subfolder of Caches folder.
708 (API::WebsiteDataStore::defaultDataStoreConfiguration):
709 * UIProcess/WebProcessPool.cpp:
710 (WebKit::legacyWebsiteDataStoreConfiguration):
711 (WebKit::WebProcessPool::ensureNetworkProcess): Make sure the web site data store
712 has the right cache directory path. Also make sure that the quota is set even if there is no folder specified.
713 Quota may still be useful in case of non persistent sessions.
714 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
715 (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
716 * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
717 (API::WebsiteDataStore::defaultCacheStorageDirectory):
719 2017-10-11 Sam Weinig <sam@webkit.org>
721 Remove out-parameter variants of copyToVector
722 https://bugs.webkit.org/show_bug.cgi?id=178155
724 Reviewed by Tim Horton.
726 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
727 (-[_WKRemoteObjectInterface debugDescription]):
728 * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
730 * UIProcess/WebPageProxy.cpp:
731 (WebKit::WebPageProxy::resetState):
732 * UIProcess/WebProcessPool.cpp:
733 (WebKit::WebProcessPool::createNewWebProcess):
734 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
735 (WebKit::WebsiteDataStore::parameters):
736 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
737 (WebKit::WebsiteDataStore::pendingCookies const):
738 * UIProcess/ios/ProcessAssertionIOS.mm:
739 (-[WKProcessAssertionBackgroundTaskManager _notifyClientsOfImminentSuspension]):
740 * WebProcess/Cookies/WebCookieManager.cpp:
741 (WebKit::WebCookieManager::getHostnamesWithCookies):
742 * WebProcess/Geolocation/WebGeolocationManager.cpp:
743 (WebKit::WebGeolocationManager::didChangePosition):
744 (WebKit::WebGeolocationManager::didFailToDeterminePosition):
745 * WebProcess/Network/WebLoaderStrategy.cpp:
746 (WebKit::WebLoaderStrategy::internallyFailedLoadTimerFired):
748 Replace out-parameter based copyToVector, with one that returns a Vector.
750 2017-10-11 Jaehun Lim <ljaehun.lim@samsung.com>
756 Add ENABLE(SERVICE_WORKER) guard.
758 * UIProcess/WebProcessPool.cpp:
759 (WebKit::WebProcessPool::createWebPage):
761 2017-10-11 Youenn Fablet <youenn@apple.com>
763 Add API to clean CacheStorage data
764 https://bugs.webkit.org/show_bug.cgi?id=178034
768 * NetworkProcess/NetworkProcess.cpp:
769 (WebKit::NetworkProcess::fetchWebsiteData): Fixing lifetime of aggregator.
771 2017-10-11 Youenn Fablet <youenn@apple.com>
773 Add API to clean CacheStorage data
774 https://bugs.webkit.org/show_bug.cgi?id=178034
776 Reviewed by Chris Dumez.
778 Introducing a new website data type for DOMCache.
779 Adding API to delete DOMCache for a given origin or for all origins.
780 This is added to WKWebsiteDataStore.
782 Cleaning a CacheStorage will remove all data in the Cache object but the object will stay live
783 for the duration of the NetworkProcess.
784 This allows ensuring that once a cache is cleaned, WebProcess will update to this new state.
786 Fetching of WebsiteData for DOMCache is not implemented yet since we do not keep a list of all origins for which we have data.
788 * NetworkProcess/NetworkProcess.cpp:
789 (WebKit::fetchDOMCacheEntries):
790 (WebKit::NetworkProcess::fetchWebsiteData):
791 (WebKit::NetworkProcess::deleteWebsiteData):
792 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
793 * NetworkProcess/cache/CacheStorageEngine.cpp:
794 (WebKit::CacheStorage::Engine::cachesRootPath):
795 (WebKit::CacheStorage::Engine::fetchEntries):
796 (WebKit::CacheStorage::ClearTasksHandler::ClearTasksHandler):
797 (WebKit::CacheStorage::ClearTasksHandler::~ClearTasksHandler):
798 (WebKit::CacheStorage::Engine::clearEngines):
799 (WebKit::CacheStorage::Engine::clearCachesForOrigins):
800 (WebKit::CacheStorage::Engine::readCachesFromDisk):
801 (WebKit::CacheStorage::deleteFolder):
802 (WebKit::CacheStorage::Engine::clearCaches):
803 (WebKit::CacheStorage::Engine::unlock): Removing the assertion as Cache objects are removed when clearing data.
804 * NetworkProcess/cache/CacheStorageEngine.h:
805 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
806 (WebKit::CacheStorage::Caches::Caches):
807 (WebKit::CacheStorage::Caches::clear):
808 * NetworkProcess/cache/CacheStorageEngineCaches.h:
809 (WebKit::CacheStorage::Caches::create):
810 * Shared/WebsiteData/WebsiteDataType.h:
811 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
812 (WKWebsiteDataStoreRemoveAllDOMCaches):
813 (WKWebsiteDataStoreRemoveDOMCacheForOrigin):
814 * UIProcess/API/C/WKWebsiteDataStoreRef.h:
815 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
816 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
818 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
819 (WebKit::toWebsiteDataType):
820 (WebKit::toWKWebsiteDataTypes):
821 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
822 (+[WKWebsiteDataStore allWebsiteDataTypes]):
823 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
824 (WebKit::computeNetworkProcessAccessTypeForDataFetch):
825 (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
827 2017-10-11 Chris Dumez <cdumez@apple.com>
829 [Geolocation] Expose Coordinates.floorLevel
830 https://bugs.webkit.org/show_bug.cgi?id=178173
831 <rdar://problem/34918936>
833 Reviewed by Ryosuke Niwa.
835 * UIProcess/API/C/WKGeolocationPosition.cpp:
836 (WKGeolocationPositionCreate):
837 (WKGeolocationPositionCreate_b):
838 (WKGeolocationPositionCreate_c):
839 * UIProcess/API/C/WKGeolocationPosition.h:
841 2017-10-11 Youenn Fablet <youenn@apple.com>
843 Bump default cache storage quota to 20MB
844 https://bugs.webkit.org/show_bug.cgi?id=178132
846 Reviewed by Alex Christensen.
848 Adding the ability to set the quota per origin through WebsiteDataStore.
849 Moving cache storage directory setting also in WebsiteDataStore.
851 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
852 (WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
853 * NetworkProcess/NetworkProcess.cpp:
854 (WebKit::NetworkProcess::initializeNetworkProcess):
855 * NetworkProcess/mac/RemoteNetworkingContext.mm:
856 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
857 * Shared/WebsiteDataStoreParameters.cpp:
858 (WebKit::WebsiteDataStoreParameters::encode const):
859 (WebKit::WebsiteDataStoreParameters::decode):
860 * Shared/WebsiteDataStoreParameters.h:
861 * UIProcess/API/APIProcessPoolConfiguration.cpp:
862 (API::ProcessPoolConfiguration::createWithLegacyOptions):
863 (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
864 (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
865 (API::ProcessPoolConfiguration::copy):
866 * UIProcess/API/APIProcessPoolConfiguration.h:
867 * UIProcess/API/C/WKContextConfigurationRef.cpp:
868 * UIProcess/API/C/WKContextConfigurationRef.h:
869 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
870 (-[WKWebsiteDataStore _cacheStoragePerOriginQuota]):
871 (-[WKWebsiteDataStore _setCacheStoragePerOriginQuota:]):
872 (-[WKWebsiteDataStore _cacheStorageDirectory]):
873 (-[WKWebsiteDataStore _setCacheStorageDirectory:]):
874 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
875 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
876 * UIProcess/WebProcessPool.cpp:
877 (WebKit::legacyWebsiteDataStoreConfiguration):
878 (WebKit::WebProcessPool::ensureNetworkProcess):
879 (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
880 * UIProcess/WebProcessPool.h:
881 * UIProcess/WebsiteData/WebsiteDataStore.h:
882 (WebKit::WebsiteDataStore::cacheStoragePerOriginQuota const):
883 (WebKit::WebsiteDataStore::setCacheStoragePerOriginQuota):
884 (WebKit::WebsiteDataStore::cacheStorageDirectory const):
885 (WebKit::WebsiteDataStore::setCacheStorageDirectory):
887 2017-10-11 Myles C. Maxfield <mmaxfield@apple.com>
889 Allow PAL to log messages
890 https://bugs.webkit.org/show_bug.cgi?id=171523
892 Reviewed by Alex Christensen.
894 * Platform/Logging.h:
895 * Scripts/generate-forwarding-headers.pl:
897 2017-10-11 Ryosuke Niwa <rniwa@webkit.org>
899 Sanitize URL in pasteboard for other applications and cross origin content
900 https://bugs.webkit.org/show_bug.cgi?id=178060
901 <rdar://problem/34874518>
903 Reviewed by Wenson Hsieh.
905 Plubmed the origin identifier through IPC from Pasteboard in WebContent process to PlatformPasteboard in UIProcess.
907 * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
908 (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
909 * UIProcess/WebPasteboardProxy.cpp:
910 (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
911 * UIProcess/WebPasteboardProxy.h:
912 * UIProcess/WebPasteboardProxy.messages.in:
913 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
914 (WebKit::WebPlatformStrategies::typesSafeForDOMToReadAndWrite):
915 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
917 2017-10-11 Chris Dumez <cdumez@apple.com>
919 Modernize Geolocation code
920 https://bugs.webkit.org/show_bug.cgi?id=178148
922 Reviewed by Ryosuke Niwa.
924 * Shared/WebGeolocationPosition.cpp:
925 (WebKit::WebGeolocationPosition::create):
926 (WebKit::WebGeolocationPosition::~WebGeolocationPosition):
927 * Shared/WebGeolocationPosition.h:
928 (WebKit::WebGeolocationPosition::timestamp const):
929 (WebKit::WebGeolocationPosition::latitude const):
930 (WebKit::WebGeolocationPosition::longitude const):
931 (WebKit::WebGeolocationPosition::accuracy const):
932 (WebKit::WebGeolocationPosition::altitude const):
933 (WebKit::WebGeolocationPosition::altitudeAccuracy const):
934 (WebKit::WebGeolocationPosition::heading const):
935 (WebKit::WebGeolocationPosition::speed const):
936 (WebKit::WebGeolocationPosition::corePosition const):
937 (WebKit::WebGeolocationPosition::WebGeolocationPosition):
938 * UIProcess/API/C/WKGeolocationPosition.cpp:
939 (WKGeolocationPositionCreate_b):
940 * UIProcess/API/Cocoa/_WKGeolocationPosition.mm:
942 * UIProcess/API/glib/WebKitGeolocationProvider.cpp:
943 (WebKit::WebKitGeolocationProvider::notifyPositionChanged):
944 * UIProcess/WebGeolocationManagerProxy.cpp:
945 (WebKit::WebGeolocationManagerProxy::providerDidChangePosition):
946 * UIProcess/ios/WKGeolocationProviderIOS.mm:
947 (-[WKLegacyCoreLocationProvider positionChanged:]):
948 * WebProcess/Geolocation/WebGeolocationManager.cpp:
949 (WebKit::WebGeolocationManager::didChangePosition):
950 * WebProcess/Geolocation/WebGeolocationManager.h:
951 * WebProcess/Geolocation/WebGeolocationManager.messages.in:
952 * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
953 (WebKit::WebGeolocationClient::lastPosition):
954 * WebProcess/WebCoreSupport/WebGeolocationClient.h:
956 2017-10-11 Brady Eidson <beidson@apple.com>
958 Add a SW context process (where SW scripts will actually execute).
959 https://bugs.webkit.org/show_bug.cgi?id=178156
961 Reviewed by Andy Estes.
963 This patch adds an auxiliary "ServiceWorker context" WebProcess to a WebProcessPool.
965 This process is where ServiceWorker scripts will execute, separate from the client WebProcess
966 hosting the page(s) they are serving.
968 This patch also adds all of the plumbing to pass along a fetched service worker script to this
969 context WebProcess, as well as message back failure to actually start the script so we can test.
971 Touches lots of code sites but is basically just a lot of plumbing.
973 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
974 (WebKit::WebSWServerConnection::WebSWServerConnection):
975 (WebKit::WebSWServerConnection::startServiceWorkerContext):
976 (WebKit::WebSWServerConnection::sendToContextProcess):
977 (WebKit::WebSWServerConnection::setContextConnection):
978 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
980 * StorageProcess/StorageProcess.cpp:
981 (WebKit::StorageProcess::workerContextProcessConnection):
982 (WebKit::StorageProcess::createWorkerContextProcessConnection):
983 (WebKit::StorageProcess::didGetWorkerContextProcessConnection):
984 (WebKit::StorageProcess::serviceWorkerContextFailedToStart):
985 (WebKit::StorageProcess::registerSWServerConnection):
986 (WebKit::StorageProcess::unregisterSWServerConnection):
987 * StorageProcess/StorageProcess.h:
988 * StorageProcess/StorageProcess.messages.in:
990 * StorageProcess/StorageToWebProcessConnection.cpp:
991 (WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection):
992 (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
993 (WebKit::StorageToWebProcessConnection::removeSWServerConnection):
994 (WebKit::StorageToWebProcessConnection::workerContextProcessConnectionCreated):
995 * StorageProcess/StorageToWebProcessConnection.h:
997 * UIProcess/Storage/StorageProcessProxy.cpp:
998 (WebKit::StorageProcessProxy::create):
999 (WebKit::StorageProcessProxy::StorageProcessProxy):
1000 (WebKit::StorageProcessProxy::didClose):
1001 (WebKit::StorageProcessProxy::getWorkerContextProcessConnection):
1002 (WebKit::StorageProcessProxy::didGetWorkerContextProcessConnection):
1003 * UIProcess/Storage/StorageProcessProxy.h:
1004 * UIProcess/Storage/StorageProcessProxy.messages.in:
1006 * UIProcess/WebProcessPool.cpp:
1007 (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
1008 (WebKit::WebProcessPool::getWorkerContextProcessConnection):
1009 (WebKit::WebProcessPool::didGetWorkerContextProcessConnection):
1010 (WebKit::WebProcessPool::disconnectProcess):
1011 (WebKit::WebProcessPool::createWebPage):
1012 * UIProcess/WebProcessPool.h:
1014 * UIProcess/WebProcessProxy.cpp:
1015 (WebKit::WebProcessProxy::didGetWorkerContextConnection):
1016 * UIProcess/WebProcessProxy.h:
1017 * UIProcess/WebProcessProxy.messages.in:
1019 * WebProcess/WebProcess.cpp:
1020 (WebKit::WebProcess::getWorkerContextConnection):
1021 (WebKit::WebProcess::startServiceWorkerContext):
1022 * WebProcess/WebProcess.h:
1023 * WebProcess/WebProcess.messages.in:
1025 2017-10-11 Don Olmstead <don.olmstead@sony.com>
1027 Remove ENABLE_NETWORK_CACHE
1028 https://bugs.webkit.org/show_bug.cgi?id=177424
1030 Reviewed by Antti Koivisto.
1032 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1033 (WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache):
1034 * NetworkProcess/NetworkConnectionToWebProcess.h:
1035 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1036 * NetworkProcess/NetworkProcess.cpp:
1037 (WebKit::fetchDiskCacheEntries):
1038 (WebKit::clearDiskCacheEntries):
1039 (WebKit::NetworkProcess::setCacheModel):
1040 * NetworkProcess/NetworkProcess.h:
1041 (WebKit::NetworkProcess::cache):
1042 * NetworkProcess/NetworkProcessCreationParameters.cpp:
1043 (WebKit::NetworkProcessCreationParameters::encode const):
1044 (WebKit::NetworkProcessCreationParameters::decode):
1045 * NetworkProcess/NetworkProcessCreationParameters.h:
1046 * NetworkProcess/NetworkResourceLoader.cpp:
1047 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1048 (WebKit::NetworkResourceLoader::canUseCachedRedirect const):
1049 (WebKit::NetworkResourceLoader::start):
1050 (WebKit::NetworkResourceLoader::retrieveCacheEntry):
1051 (WebKit::NetworkResourceLoader::startNetworkLoad):
1052 (WebKit::NetworkResourceLoader::abort):
1053 (WebKit::NetworkResourceLoader::didReceiveResponse):
1054 (WebKit::NetworkResourceLoader::didReceiveBuffer):
1055 (WebKit::NetworkResourceLoader::didFinishLoading):
1056 (WebKit::NetworkResourceLoader::didFailLoading):
1057 (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
1058 (WebKit::NetworkResourceLoader::continueWillSendRequest):
1059 (WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
1060 * NetworkProcess/NetworkResourceLoader.h:
1061 * NetworkProcess/cache/NetworkCache.cpp:
1062 * NetworkProcess/cache/NetworkCache.h:
1063 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
1064 * NetworkProcess/cache/NetworkCacheBlobStorage.h:
1065 * NetworkProcess/cache/NetworkCacheCoders.cpp:
1066 * NetworkProcess/cache/NetworkCacheCoders.h:
1067 * NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:
1068 * NetworkProcess/cache/NetworkCacheCodersSoup.cpp:
1069 * NetworkProcess/cache/NetworkCacheData.cpp:
1070 * NetworkProcess/cache/NetworkCacheData.h:
1071 * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
1072 * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
1073 * NetworkProcess/cache/NetworkCacheEntry.cpp:
1074 * NetworkProcess/cache/NetworkCacheEntry.h:
1075 * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
1076 * NetworkProcess/cache/NetworkCacheFileSystem.h:
1077 * NetworkProcess/cache/NetworkCacheIOChannel.h:
1078 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1079 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1080 * NetworkProcess/cache/NetworkCacheKey.cpp:
1081 * NetworkProcess/cache/NetworkCacheKey.h:
1082 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1083 * NetworkProcess/cache/NetworkCacheStatistics.h:
1084 * NetworkProcess/cache/NetworkCacheStorage.cpp:
1085 * NetworkProcess/cache/NetworkCacheStorage.h:
1086 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1087 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1088 (WebKit::NetworkProcess::clearDiskCache):
1089 * NetworkProcess/ios/NetworkProcessIOS.mm:
1090 (WebKit::NetworkProcess::clearCacheForAllOrigins):
1091 * NetworkProcess/soup/NetworkProcessSoup.cpp:
1092 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1093 (WebKit::NetworkProcess::clearDiskCache):
1094 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1095 (WebKit::registerUserDefaultsIfNeeded):
1096 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1097 (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
1098 (WebKit::WebProcessPool::isNetworkCacheEnabled):
1099 * UIProcess/soup/WebProcessPoolSoup.cpp:
1100 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1101 * WebProcess/Network/WebLoaderStrategy.cpp:
1102 (WebKit::WebLoaderStrategy::storeDerivedDataToCache):
1105 2017-10-11 Michael Catanzaro <mcatanzaro@igalia.com>
1107 Unreviewed, rolling out r223146.
1109 Better to not expose cairo in the WPE API
1113 "[WPE] Header cairo.h is used in GLib API headers but cannot
1115 https://bugs.webkit.org/show_bug.cgi?id=178100
1116 http://trac.webkit.org/changeset/223146
1118 2017-09-27 Frederic Wang <fwang@igalia.com>
1120 [iOS] Do not flatten frames when async frame scrolling is enabled
1121 https://bugs.webkit.org/show_bug.cgi?id=173704
1123 Reviewed by Simon Fraser.
1125 This patch disables frame flattening when async frame scrolling is enabled on iOS, as
1126 otherwise you can not scroll them. Once iframe scrolling is implemented in iOS (bug 149264),
1127 developers and beta testers will be able to check it by enabling "Async Frame Scrolling"
1128 in the "Experimental WebKit Features" menu of Safari iOS.
1130 Test: platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling.html
1132 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1133 (WebKit::WebChromeClient::contentsSizeChanged): Use effectiveFrameFlattening() introduced in
1136 2017-10-10 Ryosuke Niwa <rniwa@webkit.org>
1138 Enable custom pasteboard data in DumpRenderTree and WebKitTestRunner
1139 https://bugs.webkit.org/show_bug.cgi?id=178154
1141 Reviewed by Wenson Hsieh.
1143 Plumbed customPasteboardDataEnabled flag to be used in WebKitTestRunner.
1145 * Shared/WebPreferencesDefinitions.h:
1146 * UIProcess/API/C/WKPreferences.cpp:
1147 (WKPreferencesSetCustomPasteboardDataEnabled):
1148 (WKPreferencesGetCustomPasteboardDataEnabled):
1149 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1150 * WebProcess/WebPage/WebPage.cpp:
1151 (WebKit::WebPage::updatePreferences):
1153 2017-10-10 Adrian Perez de Castro <aperez@igalia.com>
1155 [WPE] Remove the possibility of installing the old WebKit2 C API
1156 https://bugs.webkit.org/show_bug.cgi?id=178125
1158 Reviewed by Michael Catanzaro.
1160 * PlatformWPE.cmake: Remove support for installing the deprecated C API.
1162 2017-10-10 Chris Dumez <cdumez@apple.com>
1164 [WK2] Add API to clear service worker registrations
1165 https://bugs.webkit.org/show_bug.cgi?id=178085
1166 <rdar://problem/34866025>
1168 Reviewed by Ryosuke Niwa.
1170 Add API to clear service worker registrations. Although the request to
1171 clear the registration is passed on to the StorageProcess, it is currently
1172 a no-op on StorageProcess side until we actually persist service worker
1173 registrations on disk.
1175 * Shared/WebsiteData/WebsiteDataType.h:
1176 * StorageProcess/StorageProcess.cpp:
1177 (WebKit::StorageProcess::fetchWebsiteData):
1178 (WebKit::StorageProcess::deleteWebsiteData):
1179 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
1180 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1181 (WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
1182 * UIProcess/API/C/WKWebsiteDataStoreRef.h:
1183 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1184 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1185 (dataTypesToString):
1186 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1187 (WebKit::toWebsiteDataType):
1188 (WebKit::toWKWebsiteDataTypes):
1189 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1190 (+[WKWebsiteDataStore allWebsiteDataTypes]):
1191 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1192 (WebKit::WebsiteDataStore::fetchDataAndApply):
1193 (WebKit::WebsiteDataStore::removeData):
1195 2017-10-10 Commit Queue <commit-queue@webkit.org>
1197 Unreviewed, rolling out r223130.
1198 https://bugs.webkit.org/show_bug.cgi?id=178147
1200 Breaks the build when EGLNativeWindowType is a pointer
1201 (Requested by aperezdc on #webkit).
1205 "[WPE] Build failure due to invalid cast of
1206 EGLNativeWindowType when targetting 64-bit ARM"
1207 https://bugs.webkit.org/show_bug.cgi?id=178090
1208 http://trac.webkit.org/changeset/223130
1210 2017-10-10 Sam Weinig <sam@webkit.org>
1212 Replace copyKeysToVector/copyValuesToVector with copyToVector(map.keys())/copyToVector(map.values())
1213 https://bugs.webkit.org/show_bug.cgi?id=178102
1215 Reviewed by Tim Horton.
1217 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1218 (WebKit::NetworkConnectionToWebProcess::didClose):
1219 * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
1220 (WebKit::dumpChangedLayers):
1221 * UIProcess/API/glib/WebKitWebContext.cpp:
1222 (webkitWebContextInvalidateCustomProtocolRequests):
1223 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1224 (webkitWebViewBaseContainerForall):
1225 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
1226 (-[WKWebViewContentProviderRegistry _mimeTypesWithCustomContentProviders]):
1227 * UIProcess/GenericCallback.h:
1228 (WebKit::invalidateCallbackMap):
1229 * UIProcess/WebProcessProxy.cpp:
1230 (WebKit::WebProcessProxy::shutDown):
1231 (WebKit::WebProcessProxy::didClose):
1232 (WebKit::WebProcessProxy::didBecomeUnresponsive):
1233 (WebKit::WebProcessProxy::didBecomeResponsive):
1234 (WebKit::WebProcessProxy::willChangeIsResponsive):
1235 (WebKit::WebProcessProxy::didChangeIsResponsive):
1236 (WebKit::WebProcessProxy::disconnectFramesFromPage):
1237 (WebKit::WebProcessProxy::frameCountInPage const):
1238 (WebKit::WebProcessProxy::requestTermination):
1239 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1240 (WebKit::NPRuntimeObjectMap::invalidate):
1241 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1242 (WebKit::NetscapePlugin::stopAllStreams):
1243 * WebProcess/Plugins/PluginView.cpp:
1244 (WebKit::PluginView::cancelAllStreams):
1245 * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
1246 (WebKit::RemoteLayerTreeContext::buildTransaction):
1247 * WebProcess/WebProcess.cpp:
1248 (WebKit::WebProcess::didClose):
1250 2017-10-10 Adrian Perez de Castro <aperez@igalia.com>
1252 [WPE] Header cairo.h is used in GLib API headers but cannot be found
1253 https://bugs.webkit.org/show_bug.cgi?id=178100
1255 Reviewed by Michael Catanzaro.
1257 * wpe/wpe-webkit.pc.in: Add Cairo to the "Requires" field, so its flags get pulled
1258 in and the "cairo.h", used in the WPE WebKit GLib API headers, can be found.
1260 2017-10-10 Michael Catanzaro <mcatanzaro@igalia.com>
1262 CSS constant properties should not be enabled by default
1263 https://bugs.webkit.org/show_bug.cgi?id=177416
1265 Reviewed by Darin Adler.
1267 * Shared/WebPreferencesDefinitions.h:
1269 2017-10-10 Brady Eidson <beidson@apple.com>
1271 Random StorageProcess and SWServer cleanup.
1272 https://bugs.webkit.org/show_bug.cgi?id=178141
1274 Reviewed by Andy Estes.
1276 -StorageProcess should own the set of SWServers
1277 -Some renaming and cleanup
1279 * StorageProcess/StorageProcess.cpp:
1280 (WebKit::StorageProcess::createStorageToWebProcessConnection):
1281 (WebKit::StorageProcess::swServerForSession):
1282 * StorageProcess/StorageProcess.h:
1283 (WebKit::StorageProcess::queue):
1285 * StorageProcess/StorageToWebProcessConnection.cpp:
1286 (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
1287 * StorageProcess/StorageToWebProcessConnection.h:
1289 2017-10-10 Michael Catanzaro <mcatanzaro@igalia.com>
1291 Unreviewed, rolling out r223136.
1293 Forgot to update GTK API header
1297 "[WPE] Header cairo.h is used in GLib API headers but cannot
1299 https://bugs.webkit.org/show_bug.cgi?id=178100
1300 http://trac.webkit.org/changeset/223136
1302 2017-10-10 Adrian Perez de Castro <aperez@igalia.com>
1304 [WPE] Header cairo.h is used in GLib API headers but cannot be found
1305 https://bugs.webkit.org/show_bug.cgi?id=178100
1307 Reviewed by Žan Doberšek.
1309 Instead of including <cairo.h>, it is better to forward-declare cairo_surface_t,
1310 which is the one and only Cairo declaration needed by the WPE API header.
1312 * UIProcess/API/glib/WebKitFaviconDatabase.cpp: Add inclusion of <cairo.h>.
1313 * UIProcess/API/glib/WebKitWebView.cpp: Add inclusion of <cairo.h>.
1314 * UIProcess/API/wpe/WebKitFaviconDatabase.h: Add forward declaration of cairo_surface_t.
1316 2017-10-10 Adrian Perez de Castro <aperez@igalia.com>
1318 [WPE] Cannot link against libWPEWebkit due to wrong contents of wpe-webkit.pc
1319 https://bugs.webkit.org/show_bug.cgi?id=178133
1321 Reviewed by Žan Doberšek.
1323 * wpe/wpe-webkit.pc.in: Remove "-lWPE" and replace "Requires.private" with a plain "Requires".
1325 2017-10-10 Adrian Perez de Castro <aperez@igalia.com>
1327 [WPE] Build failure due to invalid cast of EGLNativeWindowType when targetting 64-bit ARM
1328 https://bugs.webkit.org/show_bug.cgi?id=178090
1330 Reviewed by Žan Doberšek.
1332 * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
1333 (WebKit::AcceleratedSurfaceWPE::window const): Use static_cast instead of reinterpret_cast,
1334 this way extending values of EGLNativeWindowType to 64 bits is allowed.
1336 2017-10-10 Adrian Perez de Castro <aperez@igalia.com>
1338 [WPE] GLib API headers WebKitScriptDialog.h and WebKitFileChooserRequest.h are not installed
1339 https://bugs.webkit.org/show_bug.cgi?id=178104
1341 Reviewed by Žan Doberšek.
1343 * PlatformWPE.cmake: Add missing header paths to the WPE_API_INSTALLED_HEADERS variable.
1345 2017-10-10 Adrian Perez de Castro <aperez@igalia.com>
1347 [WPE][CMake] The “install” target should install all public API headers
1348 https://bugs.webkit.org/show_bug.cgi?id=176475
1350 Reviewed by Žan Doberšek.
1352 Install the WPE port GLib-based API headers. The deprecated C API is still available,
1353 but disabled by default behind the "EXPORT_DEPRECATED_WEBKIT2_C_API" CMake option.
1355 * PlatformWPE.cmake: Always install "wpe-webkit.pc" and the GLib C API for WPE.
1357 2017-10-09 Jeremy Jones <jeremyj@apple.com>
1359 Fix typo of virtual keyword in PageClientImplIOS.h
1360 https://bugs.webkit.org/show_bug.cgi?id=178088
1362 Reviewed by Simon Fraser.
1364 This compile error happens when FULLSCREEN_API is enabled for iOS.
1365 Remove the redundant virtual keyword since function is marked override.
1367 * UIProcess/ios/PageClientImplIOS.h:
1369 2017-10-09 Chris Dumez <cdumez@apple.com>
1371 [iOS][WK2] Tiles outsides the viewport are sometimes missing after relaunching a crashes WebProcess
1372 https://bugs.webkit.org/show_bug.cgi?id=178095
1373 <rdar://problem/34415016>
1375 Reviewed by Simon Fraser.
1377 Make sure we reset WKWebView._hasScheduledVisibleRectUpdate to NO in WKWebView._processDidExit.
1378 _scheduleVisibleContentRectUpdateAfterScrollInView would otherwise return early because
1379 WKWebView._hasScheduledVisibleRectUpdate is always YES. Normally,
1380 _addUpdateVisibleContentRectPreCommitHandler sets a CATransaction commit handler that
1381 resets _hasScheduledVisibleRectUpdate to NO, but it does not do so when ![webView _isValid]
1382 (which is true when the WebProcess has crashed.
1384 Also reset WKWebView._commitDidRestoreScrollPosition to NO in WKWebView._processDidExit even
1385 though it does not seem to be the cause of this bug. It seems to make sense to reset this member
1386 when the process crashes.
1388 * UIProcess/API/Cocoa/WKWebView.mm:
1389 (-[WKWebView _processDidExit]):
1391 2017-10-09 Youenn Fablet <youenn@apple.com>
1393 Add quota to cache API
1394 https://bugs.webkit.org/show_bug.cgi?id=177552
1396 Reviewed by Alex Christensen.
1398 Adding support for quota checking in CacheStorage::Caches.
1399 It is passed to NetworkProcess at creation time.
1400 Default quota size is configured to 400Ko by origin per default.
1401 This value is suitable for testing.
1402 Future patch should raise this default value and allows configuring it.
1404 Quota is computed based on the response body size.
1405 This size is padded at WebCore for opaque responses.
1406 Size is stored persistently as opaque response padded size should remain stable.
1407 See https://github.com/whatwg/storage/issues/31 for the rationale about this padding.
1409 In case of putting several records at the same time, the size of all records
1410 is computed so that all records will be written or rejected together.
1412 Sending QuotaExceeded error when quota is exceeded.
1413 Future effort should allow asking UIProcess for quota extension.
1415 * NetworkProcess/NetworkProcess.cpp:
1416 (WebKit::NetworkProcess::cacheStoragePerOriginQuota const):
1417 * NetworkProcess/NetworkProcess.h:
1418 * NetworkProcess/NetworkProcessCreationParameters.cpp:
1419 (WebKit::NetworkProcessCreationParameters::encode const):
1420 (WebKit::NetworkProcessCreationParameters::decode):
1421 * NetworkProcess/NetworkProcessCreationParameters.h:
1422 * NetworkProcess/cache/CacheStorageEngine.cpp:
1423 (WebKit::CacheStorage::Engine::readCachesFromDisk):
1424 * NetworkProcess/cache/CacheStorageEngineCache.cpp:
1425 (WebKit::CacheStorage::Cache::toRecordInformation):
1426 (WebKit::CacheStorage::isolatedCopy):
1427 (WebKit::CacheStorage::Cache::open):
1428 (WebKit::CacheStorage::Cache::storeRecords):
1429 (WebKit::CacheStorage::Cache::put):
1430 (WebKit::CacheStorage::Cache::writeRecordToDisk):
1431 (WebKit::CacheStorage::Cache::updateRecordToDisk):
1432 (WebKit::CacheStorage::Cache::removeRecordFromDisk):
1433 (WebKit::CacheStorage::Cache::encode):
1434 (WebKit::CacheStorage::Cache::decodeRecordHeader):
1435 (WebKit::CacheStorage::Cache::decode):
1436 * NetworkProcess/cache/CacheStorageEngineCache.h:
1437 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
1438 (WebKit::CacheStorage::Caches::Caches):
1439 (WebKit::CacheStorage::Caches::initialize):
1440 (WebKit::CacheStorage::Caches::initializeSize):
1441 (WebKit::CacheStorage::Caches::requestSpace):
1442 (WebKit::CacheStorage::Caches::writeRecord):
1443 (WebKit::CacheStorage::Caches::removeRecord):
1444 (WebKit::CacheStorage::Caches::removeCacheEntry):
1445 * NetworkProcess/cache/CacheStorageEngineCaches.h:
1446 (WebKit::CacheStorage::Caches::create):
1447 (WebKit::CacheStorage::Caches::hasEnoughSpace const):
1448 * NetworkProcess/cache/NetworkCacheStorage.cpp:
1449 (WebKit::NetworkCache::Storage::traverse):
1450 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1451 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1452 * Shared/WebCoreArgumentCoders.cpp:
1453 (IPC::ArgumentCoder<DOMCacheEngine::Record>::encode):
1454 (IPC::ArgumentCoder<DOMCacheEngine::Record>::decode):
1455 * UIProcess/API/APIProcessPoolConfiguration.cpp:
1456 (API::ProcessPoolConfiguration::copy):
1457 * UIProcess/API/APIProcessPoolConfiguration.h:
1458 * UIProcess/WebProcessPool.cpp:
1459 (WebKit::WebProcessPool::ensureNetworkProcess):
1461 2017-10-09 Sam Weinig <sam@webkit.org>
1463 Make HashMap::keys() and HashMap::values() work with WTF::map/WTF::copyToVector
1464 https://bugs.webkit.org/show_bug.cgi?id=178072
1466 Reviewed by Darin Adler.
1468 * Shared/AsyncRequest.h:
1469 (WebKit::AsyncRequestMap::values):
1470 * UIProcess/WebProcessProxy.h:
1471 (WebKit::WebProcessProxy::pages const):
1473 Update for type change for HashMap::values().
1475 2017-10-09 Jeremy Jones <jeremyj@apple.com>
1477 Incorrect fullscreen animation when element has a transform.
1478 https://bugs.webkit.org/show_bug.cgi?id=177558
1479 rdar://problem/29603741
1481 Reviewed by Jer Noble.
1483 Use a bit of code from element fullscreen to do this correctly for video fullscreen.
1484 The key is to get the absolute quad from the renderer. This will work for scaling,
1485 But since we still take the bounding box, it won't work for rotations.
1487 * WebProcess/cocoa/VideoFullscreenManager.mm:
1488 (WebKit::inlineVideoFrame):
1490 2017-10-09 Robin Morisset <rmorisset@apple.com>
1492 Make the names of the options consistent
1493 https://bugs.webkit.org/show_bug.cgi?id=177933
1495 Reviewed by Saam Barati.
1497 * NetworkProcess/capture/json.hpp:
1498 * Platform/IPC/Connection.cpp:
1499 (IPC::Connection::connectionDidClose):
1500 * UIProcess/API/Cocoa/WKWebView.mm:
1501 (-[WKWebView _keyboardWillHide:]):
1502 * UIProcess/WebPageProxy.cpp:
1503 (WebKit::WebPageProxy::runModal):
1504 * UIProcess/mac/WebInspectorProxyMac.mm:
1505 (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1506 * WebProcess/WebPage/ios/WebPageIOS.mm:
1507 (WebKit::WebPage::selectWithGesture):
1509 2017-10-09 Adrian Perez de Castro <aperez@igalia.com>
1511 [WPE][GTK] Propagate libepoxy compiler flags obtained from pkg-config
1512 https://bugs.webkit.org/show_bug.cgi?id=178081
1514 Reviewed by Carlos Alberto Lopez Perez.
1516 * CMakeLists.txt: Use ${LIBEPOXY_DEFINITIONS} for building WebKit.
1518 2017-10-08 Tim Horton <timothy_horton@apple.com>
1520 mediaPlaybackRequiresUserAction API replacement annotation is wrong
1521 https://bugs.webkit.org/show_bug.cgi?id=178063
1523 Reviewed by Dan Bernstein.
1525 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1526 mediaPlaybackRequiresUserAction suggests that you should use
1527 requiresUserActionForMediaPlayback instead, but that is also deprecated.
1528 Instead, follow the chain and suggest mediaTypesRequiringUserActionForPlayback.
1530 2017-10-06 Wenson Hsieh <wenson_hsieh@apple.com>
1532 [iOS WK2] API tests added in r222991 are failing in iOS 11 test runners
1533 https://bugs.webkit.org/show_bug.cgi?id=178037
1535 Reviewed by Tim Horton.
1537 This patch carries out some minor cleanup around UIKitSPI.h in WebKit2, so that the internal SDK isn't required
1538 to implement -[WKContentView insertTextSuggestion:].
1540 * Platform/spi/ios/UIKitSPI.h:
1541 * UIProcess/ios/WKContentViewInteraction.mm:
1542 (-[WKContentView insertTextSuggestion:]):
1544 2017-10-06 Chris Dumez <cdumez@apple.com>
1546 [Beacon][Cocoa] Beacon requests with BufferSource payload should not have a Content-Type HTTP header
1547 https://bugs.webkit.org/show_bug.cgi?id=178027
1548 <rdar://problem/34748470>
1550 Reviewed by Youenn Fablet.
1552 Use new NSURLSessionConfiguration._suppressedAutoAddedHTTPHeaders CFNetwork SPI to
1553 make sure that CFNetwork never adds a Content-Type HTTP headers to our requests
1554 when we did not add one.
1556 This is covered by the following tests on newer OSes:
1557 - imported/w3c/web-platform-tests/beacon/headers/header-content-type.html
1558 - http/tests/blink/sendbeacon/beacon-same-origin.html
1560 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1561 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1563 2017-10-06 Aishwarya Nirmal <anirmal@apple.com>
1565 [iOS] Respect the "caret-color" CSS property when editing
1566 https://bugs.webkit.org/show_bug.cgi?id=177489
1567 <rdar://problem/34600419>
1569 Reviewed by Tim Horton.
1571 This change adds support for the caret-color property on iOS.
1573 * Shared/EditorState.cpp:
1574 (WebKit::EditorState::PostLayoutData::encode const):
1575 (WebKit::EditorState::PostLayoutData::decode):
1576 * Shared/EditorState.h:
1577 * UIProcess/ios/WKContentViewInteraction.mm:
1578 (-[WKContentView insertionPointColor]):
1579 * WebProcess/WebPage/ios/WebPageIOS.mm:
1580 (WebKit::WebPage::platformEditorState const):
1582 2017-10-06 Brian Burg <bburg@apple.com>
1584 Web Inspector: clicking in Inspector webview clears the selection in the inspected page
1585 https://bugs.webkit.org/show_bug.cgi?id=178014
1586 <rdar://problem/12706857>
1588 Reviewed by Timothy Hatcher.
1590 If the Inspector is docked to the inspected view, clicking on the Inspector
1591 webview will cause selection in the inspected view to be lost. This is because
1592 the selection is lost when the web view resigns first responder.
1594 Add a check in maintainsInactiveSelection to always retain selection if
1595 Web Inspector is open. This approach seems simpler than trying to sync a client's
1596 usage of WKPageSetMaintainsInactiveSelection with overrides that need to be applied
1597 and unapplied when an inspector web view is shown or hidden.
1599 * UIProcess/WebPageProxy.cpp:
1600 (WebKit::WebPageProxy::maintainsInactiveSelection const):
1601 (WebKit::WebPageProxy::inspector const): Drive by, use nullptr.
1603 * UIProcess/WebPageProxy.h:
1604 (WebKit::WebPageProxy::maintainsInactiveSelection const): Deleted.
1606 2017-10-06 Alex Christensen <achristensen@webkit.org>
1608 Add more infrastructure to apply custom headers to same-origin requests
1609 https://bugs.webkit.org/show_bug.cgi?id=177629
1611 Reviewed by Ryosuke Niwa.
1613 * UIProcess/API/C/WKWebsitePolicies.cpp:
1614 (WKWebsitePoliciesCopyCustomHeaderFields):
1615 (WKWebsitePoliciesSetCustomHeaderFields):
1616 * UIProcess/API/C/WKWebsitePolicies.h:
1617 * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
1618 * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
1619 (-[_WKWebsitePolicies customHeaderFields]):
1620 (-[_WKWebsitePolicies setCustomHeaderFields:]):
1622 Make the SPI for setting custom header fields take a dictionary<String, String>
1623 instead of an array of Strings with colons. This matches NSURLRequest and other
1624 APIs that deal with header fields.
1626 2017-10-06 Wenson Hsieh <wenson_hsieh@apple.com>
1628 [iOS] Tweak support for classifying form controls (followup to r222487)
1629 https://bugs.webkit.org/show_bug.cgi?id=177917
1630 <rdar://problem/34820122>
1632 Reviewed by Dean Jackson.
1634 This patch follows up with <http://trac.webkit.org/r222487>. It combines the functionality of two SPI hooks
1635 implemented on WKContentView into a single method that vends a context dictionary, and additionally addresses an
1636 issue with the original implementation, wherein some cached state on WebPageProxy is set upon starting node
1637 assistance, but is never unset when stopping node assistance, nor set anywhere else. See per-method comments for
1640 * UIProcess/WebPageProxy.h:
1642 Remove members m_acceptsAutofilledLoginCredentials and m_representingPageURL from WebPageProxy. This state is
1643 retrieved from the AssistedNodeInformation struct when starting node assistance, but is never reset anywhere
1644 else. Instead of introducing new members to remember this state, we can just use the WKContentView's current
1645 assisted node information.
1647 This also means that programmatically focusing forms (without user gesture) will no longer cause WKContentView
1648 to accept autofilled login credentials, since we bail out of node assistance and don't begin an input session.
1650 * UIProcess/ios/WKContentView.mm:
1651 (-[WKContentView acceptsAutofilledLoginCredentials]): Deleted.
1652 (-[WKContentView representingPageURL]): Deleted.
1653 * UIProcess/ios/WKContentViewInteraction.mm:
1654 (-[WKContentView _autofillContext]):
1656 Merge functionality of the previous two SPI hooks, such that -_autofillContext will return a non-null dictionary
1657 containing the URL of the focused element's document if and only if WKContentView accepts autofilled login
1658 credentials, and there exists a representing page URL.
1660 When the page stops assisting the focused node, we set the AssistedNodeInformation's element type to None, so we
1661 additionally bail and return nil if the element type is None. As an aside, it seems a more reasonable approach to
1662 resetting state upon stopping node assistance is to just completely reset _assistedNodeInformation to its initial
1663 value, i.e. via _assistedNodeInformation = { }. It's not clear whether there are behaviors relying on the fact
1664 that all members but the element type in the content view's assisted node information could be stale, so this
1665 seems worthy of some investigation.
1667 * UIProcess/ios/WebPageProxyIOS.mm:
1668 (WebKit::WebPageProxy::startAssistingNode):
1669 (WebKit::WebPageProxy::acceptsAutofilledLoginCredentials): Deleted.
1670 (WebKit::WebPageProxy::representingPageURL): Deleted.
1672 2017-10-06 Yousuke Kimoto <yousuke.kimoto@sony.com>
1674 [WinCairo] Add shared curl files
1675 https://bugs.webkit.org/show_bug.cgi?id=177999
1677 Reviewed by Alex Christensen.
1679 * PlatformWin.cmake:
1680 * Shared/Authentication/curl/AuthenticationManagerCurl.cpp: Added.
1681 (WebKit::AuthenticationManager::receivedCredential):
1682 (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
1683 (WebKit::AuthenticationManager::receivedCancellation):
1684 (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
1685 (WebKit::AuthenticationManager::receivedChallengeRejection):
1686 * Shared/curl/WebCoreArgumentCodersCurl.cpp: Added.
1687 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
1688 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
1689 (IPC::ArgumentCoder<CertificateInfo>::encode):
1690 (IPC::ArgumentCoder<CertificateInfo>::decode):
1691 (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
1692 (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
1693 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
1694 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData):
1695 (IPC::ArgumentCoder<Credential>::encodePlatformData):
1696 (IPC::ArgumentCoder<Credential>::decodePlatformData):
1698 2017-10-06 Brent Fulgham <bfulgham@apple.com>
1700 Sandbox rules block PluginProcess using "File Open/Save" dialogs
1701 https://bugs.webkit.org/show_bug.cgi?id=177965
1702 <rdar://problem/33976846>
1704 Reviewed by Alexey Proskuryakov.
1706 Update the PluginProcess sandboxes to allow the same XPC services as
1707 the WebContent process. Also allow access to the openAndSavePanelServices.
1709 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1711 2017-10-06 Brady Eidson <beidson@apple.com>
1713 Add (entirely incorrect) fetching of ServiceWorker scripts.
1714 https://bugs.webkit.org/show_bug.cgi?id=176179
1716 Reviewed by Andy Estes.
1718 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1719 (WebKit::WebSWServerConnection::startScriptFetchInClient):
1720 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1721 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
1723 * WebProcess/Storage/WebSWClientConnection.cpp:
1724 (WebKit::WebSWClientConnection::finishFetchingScriptInServer):
1725 * WebProcess/Storage/WebSWClientConnection.h:
1726 * WebProcess/Storage/WebSWClientConnection.messages.in:
1728 2017-10-05 Carlos Garcia Campos <cgarcia@igalia.com>
1730 [GTK][WPE] Add API to configure and enable resource load statistics
1731 https://bugs.webkit.org/show_bug.cgi?id=177943
1733 Reviewed by Michael Catanzaro.
1735 Add new WebKitWebsiteDataManager construct only property to set the directory where the persistent stats are
1736 stored, and methods to enable resource load statistics and query whether it's currently enabled. Also add a new
1737 Website data type to be able to remove the persistent stats using WebKitWebsiteDataManager existing API.
1739 * UIProcess/API/glib/WebKitWebContext.cpp:
1740 (websiteDataStoreConfigurationForWebProcessPoolConfiguration):
1741 (webkitWebContextConstructed):
1742 * UIProcess/API/glib/WebKitWebsiteData.cpp:
1743 (recordContainsSupportedDataTypes):
1744 (toWebKitWebsiteDataTypes):
1745 * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
1746 (webkitWebsiteDataManagerGetProperty):
1747 (webkitWebsiteDataManagerSetProperty):
1748 (webkitWebsiteDataManagerConstructed):
1749 (webkit_website_data_manager_class_init):
1750 (webkitWebsiteDataManagerGetDataStore):
1751 (webkit_website_data_manager_get_resource_load_stats_directory):
1752 (webkit_website_data_manager_set_resource_load_stats_enabled):
1753 (webkit_website_data_manager_get_resource_load_stats_enabled):
1754 (toWebsiteDataTypes):
1755 * UIProcess/API/gtk/WebKitWebsiteData.h:
1756 * UIProcess/API/gtk/WebKitWebsiteDataManager.h:
1757 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1758 * UIProcess/API/wpe/WebKitWebsiteData.h:
1759 * UIProcess/API/wpe/WebKitWebsiteDataManager.h:
1761 2017-10-05 Carlos Garcia Campos <cgarcia@igalia.com>
1763 [GTK][WPE] All resource load statistics tests added in r212183 crash in GTK bots, timeout in GTK and WPE bots since r219049
1764 https://bugs.webkit.org/show_bug.cgi?id=168171
1766 Reviewed by Chris Dumez.
1768 Add C API to handle all resource load statistics requests made by the layout tests.
1770 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1771 (WKWebsiteDataStoreSetStatisticsLastSeen):
1772 (WKWebsiteDataStoreSetStatisticsPrevalentResource):
1773 (WKWebsiteDataStoreIsStatisticsPrevalentResource):
1774 (WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
1775 (WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
1776 (WKWebsiteDataStoreSetStatisticsGrandfathered):
1777 (WKWebsiteDataStoreIsStatisticsGrandfathered):
1778 (WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
1779 (WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
1780 (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
1781 (WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction):
1782 (WKWebsiteDataStoreSetStatisticsTimeToLiveCookiePartitionFree):
1783 (WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords):
1784 (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
1785 (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
1786 (WKWebsiteDataStoreStatisticsSubmitTelemetry):
1787 (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenDataRecordsWereScanned):
1788 (WKWebsiteDataStoreSetStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
1789 (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenTelemetryWasCaptured):
1790 (WKWebsiteDataStoreSetStatisticsMinimumTimeBetweenDataRecordsRemoval):
1791 (WKWebsiteDataStoreSetStatisticsGrandfatheringTime):
1792 (WKWebsiteDataStoreSetStatisticsMaxStatisticsEntries):
1793 (WKWebsiteDataStoreSetStatisticsPruneEntriesDownTo):
1794 (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
1795 (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
1796 (WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval):
1797 (WKWebsiteDataStoreStatisticsResetToConsistentState):
1798 * UIProcess/API/C/WKWebsiteDataStoreRef.h:
1800 2017-10-05 Tim Horton <timothy_horton@apple.com>
1802 Fix the Mac CMake build
1803 https://bugs.webkit.org/show_bug.cgi?id=177985
1805 Unreviewed build fix.
1808 * PlatformMac.cmake:
1809 After r222917, there's one more piece of WebKitSystemInterface left.
1810 And some missing bits of PaymentRequest.
1812 2017-10-05 Keith Miller <keith_miller@apple.com>
1814 Unreviewed, tapi builds without optimization so we should have TAPI passes -DRELEASE_WITHOUT_OPTIMIZATIONS.
1816 * Configurations/Base.xcconfig:
1818 2017-10-05 Jer Noble <jer.noble@apple.com>
1820 [Cocoa] Enable ENABLE_ENCRYPTED_MEDIA build-time setting
1821 https://bugs.webkit.org/show_bug.cgi?id=177261
1823 Reviewed by Eric Carlson.
1825 * Configurations/FeatureDefines.xcconfig:
1827 2017-10-05 Alex Christensen <achristensen@webkit.org>
1829 Add ObjC equivalent of WKPageNavigationClient.didChangeBackForwardList
1830 https://bugs.webkit.org/show_bug.cgi?id=177966
1831 <rdar://problem/22387135>
1833 Reviewed by Tim Horton.
1835 * UIProcess/API/APINavigationClient.h:
1836 (API::NavigationClient::didChangeBackForwardList):
1837 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1838 * UIProcess/Cocoa/NavigationState.h:
1839 * UIProcess/Cocoa/NavigationState.mm:
1840 (WebKit::NavigationState::setNavigationDelegate):
1841 (WebKit::NavigationState::NavigationClient::didFailToInitializePlugIn):
1842 (WebKit::NavigationState::NavigationClient::didChangeBackForwardList):
1843 (WebKit::NavigationState::NavigationClient::willPerformClientRedirect):
1844 (WebKit::NavigationState::NavigationClient::didCancelClientRedirect):
1845 (WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
1846 (WebKit::NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace):
1847 (WebKit::NavigationState::NavigationClient::processDidTerminate):
1848 (WebKit::NavigationState::NavigationClient::processDidBecomeResponsive):
1849 (WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive):
1850 (WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
1851 (WebKit::NavigationState::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame):
1852 (WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
1853 (WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
1854 (WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
1855 (WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
1856 * UIProcess/WebPageProxy.cpp:
1857 (WebKit::WebPageProxy::didChangeBackForwardList):
1859 2017-10-05 Alex Christensen <achristensen@webkit.org>
1861 Add ObjC SPI with userInfo corresponding to WKPageNavigationClient's decidePolicyForNavigationAction, didStartProvisionalNavigation, and didFailNavigation
1862 https://bugs.webkit.org/show_bug.cgi?id=177974
1863 <rdar://problem/22888802>
1865 Reviewed by Tim Horton.
1867 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1868 * UIProcess/Cocoa/NavigationState.h:
1869 * UIProcess/Cocoa/NavigationState.mm:
1870 (WebKit::NavigationState::setNavigationDelegate):
1871 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1872 (WebKit::NavigationState::NavigationClient::didStartProvisionalNavigation):
1873 (WebKit::NavigationState::NavigationClient::didFailNavigationWithError):
1874 * UIProcess/Cocoa/UIDelegate.mm:
1875 (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1877 2017-10-05 John Wilander <wilander@apple.com>
1879 Storage Access API: Web process should ask UI process for grant/deny
1880 https://bugs.webkit.org/show_bug.cgi?id=176941
1881 <rdar://problem/34440036>
1883 Reviewed by Chris Dumez and Sam Weinig.
1885 This patch adds infrastructure to let WebCore::Document call
1886 WebKit::WebResourceLoadStatisticsStore and ask for storage
1887 access on behalf of an iframe. The communication goes through
1888 the ChromeClient since we might want to add a native prompt.
1889 From the ChromeClient it continues to the WebPage which
1890 messages the WebPageProxy. The WebPageProxy calls the
1891 WebsiteDataStore which owns the WebResourceLoadStatisticsStore.
1892 A uint64_t is used to match the right callback with the boolean
1895 * UIProcess/WebPageProxy.cpp:
1896 (WebKit::WebPageProxy::requestStorageAccess):
1897 * UIProcess/WebPageProxy.h:
1898 * UIProcess/WebPageProxy.messages.in:
1899 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1900 (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
1901 * UIProcess/WebResourceLoadStatisticsStore.h:
1902 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1903 (WebKit::WebsiteDataStore::requestStorageAccess):
1904 * UIProcess/WebsiteData/WebsiteDataStore.h:
1905 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1906 (WebKit::WebChromeClient::requestStorageAccess):
1907 * WebProcess/WebCoreSupport/WebChromeClient.h:
1908 * WebProcess/WebPage/WebPage.cpp:
1909 (WebKit::nextRequestStorageAccessContextId):
1910 (WebKit::WebPage::requestStorageAccess):
1911 (WebKit::WebPage::storageAccessResponse):
1912 * WebProcess/WebPage/WebPage.h:
1913 * WebProcess/WebPage/WebPage.messages.in:
1915 2017-10-05 Chris Dumez <cdumez@apple.com>
1917 Drop unused parameters for CookiesStrategy::cookiesEnabled()
1918 https://bugs.webkit.org/show_bug.cgi?id=177957
1920 Reviewed by Alex Christensen.
1922 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1923 (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
1924 * NetworkProcess/NetworkConnectionToWebProcess.h:
1925 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1926 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1927 (WebKit::WebPlatformStrategies::cookiesEnabled):
1928 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1930 2017-10-05 Tim Horton <timothy_horton@apple.com>
1932 Make progress toward properly-formed XPC services in the Mac CMake build
1933 https://bugs.webkit.org/show_bug.cgi?id=177918
1935 Reviewed by Alex Christensen.
1938 * PlatformMac.cmake:
1939 Turn on the storage process on Mac, and fix its build.
1940 Move XPC services to Versions/A/XPCServices and add the toplevel
1941 XPCServices as a symlink of that.
1942 Run the XPC services' Info.plists through configure_file, and substitute
1943 the important variables (most critically the bundle identifier).
1944 Factor out the service setup so we don't keep duplicating it as it
1945 gets more complicated.
1947 2017-10-05 Andy Estes <aestes@apple.com>
1949 [Payment Request] Add a payment method that supports Apple Pay
1950 https://bugs.webkit.org/show_bug.cgi?id=177850
1952 Reviewed by Youenn Fablet.
1954 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1955 (toShippingMethod): Converted the NSDecimalNumber amount to a string rather than an integer.
1956 (WebKit::toDecimalNumber): used -decimalNumberWithString:locale: rather than
1957 -initWithMantissa:exponent:isNegative: to create an NSDecimalNumber.
1958 (WebKit::toPKPaymentSummaryItem):
1959 (WebKit::toPKShippingMethod):
1961 2017-10-05 Youenn Fablet <youenn@apple.com>
1963 Make LibWebRTCProvider port agnostic
1964 https://bugs.webkit.org/show_bug.cgi?id=177747
1966 Reviewed by Alex Christensen & Alex Garcia.
1968 * WebProcess/Network/webrtc/LibWebRTCProvider.h: Making sure Mac/iOS provider creates the codec factories.
1970 2017-10-04 Alex Christensen <achristensen@webkit.org>
1972 Stop linking with WebKitSystemInterface
1973 https://bugs.webkit.org/show_bug.cgi?id=177915
1975 Reviewed by Antti Koivisto.
1977 * Configurations/DebugRelease.xcconfig:
1978 * WebKit.xcodeproj/project.pbxproj:
1980 2017-10-04 Alex Christensen <achristensen@webkit.org>
1982 Remove unnecessary includes of WebKitSystemInterface on Cocoa platforms
1983 https://bugs.webkit.org/show_bug.cgi?id=177912
1985 Reviewed by Saam Barati.
1987 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1988 * NetworkProcess/mac/NetworkProcessMac.mm:
1989 * NetworkProcess/mac/RemoteNetworkingContext.mm:
1990 * Platform/IPC/mac/ConnectionMac.mm:
1991 * Platform/mac/LayerHostingContext.mm:
1992 * PluginProcess/mac/PluginProcessMac.mm:
1993 * PluginProcess/mac/PluginProcessShim.mm:
1994 * Shared/ios/ChildProcessIOS.mm:
1995 * Shared/mac/ChildProcessMac.mm:
1996 * Shared/mac/SandboxExtensionMac.mm:
1997 * Shared/mac/WebCoreArgumentCodersMac.mm:
1998 * Shared/mac/WebEventFactory.mm:
1999 * StorageProcess/ios/StorageProcessIOS.mm:
2000 * StorageProcess/mac/StorageProcessMac.mm:
2001 * UIProcess/API/Cocoa/WKWebView.mm:
2002 * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
2003 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
2004 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2005 * UIProcess/Cocoa/WebViewImpl.mm:
2006 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2007 * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
2008 * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
2009 * UIProcess/mac/PageClientImplMac.mm:
2010 * UIProcess/mac/WKTextInputWindowController.mm:
2011 * UIProcess/mac/WebContextMenuProxyMac.mm:
2012 * UIProcess/mac/WebPopupMenuProxyMac.mm:
2013 * UIProcess/mac/WindowServerConnection.mm:
2014 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2015 * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
2016 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2017 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2018 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2019 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2020 * WebProcess/WebPage/ios/WebPageIOS.mm:
2021 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
2022 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
2023 * WebProcess/WebPage/mac/WebPageMac.mm:
2024 * WebProcess/cocoa/WebProcessCocoa.mm:
2026 2017-10-04 Youenn Fablet <youenn@apple.com>
2028 rtc::PacketOptions should have its own IPC encoding/decoding routines
2029 https://bugs.webkit.org/show_bug.cgi?id=177812
2031 Reviewed by Alex Christensen.
2033 Replacing rtc::PacketOptions IPC encoding/decoding from passing the structure as individual parameters to the structure as a parameter.
2034 Introducing WebKit::RTCPacketOptions as a wrapper around it for which encode/decode routines are added.
2035 Updating code using rtc::PacketOptions accordingly.
2037 * NetworkProcess/webrtc/NetworkRTCSocket.cpp:
2038 (WebKit::NetworkRTCSocket::sendTo):
2039 * NetworkProcess/webrtc/NetworkRTCSocket.h:
2040 * NetworkProcess/webrtc/NetworkRTCSocket.messages.in:
2041 * Platform/IPC/Decoder.cpp:
2042 (IPC::Decoder::operator>>):
2043 (IPC::Decoder::decode):
2044 * Platform/IPC/Decoder.h:
2045 * Platform/IPC/Encoder.cpp:
2046 (IPC::Encoder::encode):
2047 * Platform/IPC/Encoder.h:
2048 * Shared/RTCPacketOptions.cpp: Added.
2049 (WebKit::RTCPacketOptions::encode const):
2050 (WebKit::RTCPacketOptions::decode):
2051 * Shared/RTCPacketOptions.h: Added.
2052 * WebKit.xcodeproj/project.pbxproj:
2053 * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
2054 (WebKit::LibWebRTCSocket::SendTo):
2056 2017-10-04 Don Olmstead <don.olmstead@sony.com>
2058 Include Pasteboard.h for all in WebCoreArgumentCoders
2059 https://bugs.webkit.org/show_bug.cgi?id=177902
2061 Reviewed by Alex Christensen.
2063 * Shared/WebCoreArgumentCoders.cpp:
2065 2017-10-04 David Kilzer <ddkilzer@apple.com>
2067 Remove unused variables in lambdas for network process cache
2068 <https://webkit.org/b/177878>
2069 <rdar://problem/34038482>
2071 Reviewed by Tim Horton.
2073 * NetworkProcess/cache/CacheStorageEngine.cpp:
2074 (WebKit::CacheStorage::Engine::open):
2075 (WebKit::CacheStorage::Engine::putRecords):
2076 (WebKit::CacheStorage::Engine::deleteMatchingRecords):
2077 * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
2078 (WebKit::CacheStorageEngineConnection::reference):
2079 - Remove unused |this| from lambda captures.
2081 2017-10-04 Stephan Szabo <stephan.szabo@sony.com>
2083 [WinCairo] add PLATFORM(WIN) configurations to config.h
2084 https://bugs.webkit.org/show_bug.cgi?id=177846
2086 Reviewed by Alex Christensen.
2090 2017-10-04 Adrian Perez de Castro <aperez@igalia.com>
2092 [GTK] WebKit2GTK+ does not handle touchmove and touchend events correctly
2093 https://bugs.webkit.org/show_bug.cgi?id=158531
2095 Reviewed by Carlos Alberto Lopez Perez.
2097 Do not bypass WebCore event handling when receiving touch events.
2099 Based on a patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>.
2100 Thanks to Carlos Garnacho <carlosg@gnome.org> for helping out reviewing the code.
2102 * UIProcess/API/gtk/PageClientImpl.cpp:
2103 (WebKit::PageClientImpl::doneWithTouchEvent): Make sure touchend reaches gesture controller if touchbegin evet got to it.
2104 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2105 (webkitWebViewBaseTouchEvent): Do not invoke gesture controller directly by bypassing WebCore event handling.
2106 * UIProcess/gtk/GestureController.cpp:
2107 (WebKit::GestureController::reset): Added.
2108 (WebKit::GestureController::handleEvent): Reset gesture controller when touchpadupdate/end is received without touchbegin.
2109 (WebKit::GestureController::Gesture::reset): Added.
2110 * UIProcess/gtk/GestureController.h:
2112 2017-10-04 Michael Catanzaro <mcatanzaro@igalia.com>
2114 Unreviewed WPE build fix after r222837
2115 https://bugs.webkit.org/show_bug.cgi?id=177449
2117 * Shared/wpe/WebEventFactory.cpp:
2118 (WebKit::wallTimeForEventTime):
2120 2017-10-04 Ryosuke Niwa <rniwa@webkit.org>
2122 Use blob URL when pasting RTFD instead of overriding DocumentLoader
2123 https://bugs.webkit.org/show_bug.cgi?id=177801
2124 <rdar://problem/34542270>
2126 Reviewed by Wenson Hsieh.
2128 Fixed the assertion failure when RTFD content is empty.
2130 * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
2131 (WebKit::WebPasteboardProxy::getPasteboardBufferForType):
2133 2017-10-04 Michael Catanzaro <mcatanzaro@igalia.com>
2135 REGRESSION(r222392): [WPE][GTK] Many forms tests are failing due to broken event timestamps
2136 https://bugs.webkit.org/show_bug.cgi?id=177449
2138 Reviewed by Chris Dumez.
2140 * Shared/wpe/WebEventFactory.cpp:
2141 (WebKit::wallTimeForEventTime):
2143 2017-10-03 Brent Fulgham <bfulgham@apple.com>
2145 Correct nullptr dereference during shutdown
2146 https://bugs.webkit.org/show_bug.cgi?id=177845
2147 <rdar://problem/33651405>
2149 Reviewed by Chris Dumez.
2151 It looks like the ResourceLoadStatisticsPersistentStorage destructor is calling code that attempts
2152 to use member variables in its owning class (WebResourceLoadStatisticsStore). Since these may have
2153 already been destroyed, they are in an invalid state when accessed.
2155 * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
2156 (WebKit::ResourceLoadStatisticsPersistentStorage::~ResourceLoadStatisticsPersistentStorage): Do not call
2157 finishAllPendingWorkSynchronously() in the destructor, since it relies on the m_memoryStore to be
2158 a reference to completely valid object.
2159 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2160 (WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore): Instead, call
2161 'finishAllPendingWorkSynchronously' here, when the object is still in a known valid state.
2163 2017-10-03 Alex Christensen <achristensen@webkit.org>
2165 Moderize WebKit's back forward list code
2166 https://bugs.webkit.org/show_bug.cgi?id=177843
2168 Reviewed by Tim Horton.
2170 Use Ref instead of RefPtr when possible.
2171 Use references instead of pointers when possible.
2172 Remove unnecessary null checks.
2173 Reduce unnecessary Vector copying.
2175 * Shared/SessionState.h:
2176 * Shared/WebBackForwardListItem.h:
2177 * UIProcess/API/APILoaderClient.h:
2178 (API::LoaderClient::didChangeBackForwardList):
2179 (API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
2180 * UIProcess/API/C/WKPage.cpp:
2181 (WKPageSetPageLoaderClient):
2182 * UIProcess/WebBackForwardList.cpp:
2183 (WebKit::WebBackForwardList::pageClosed):
2184 (WebKit::WebBackForwardList::addItem):
2185 (WebKit::WebBackForwardList::goToItem):
2186 (WebKit::WebBackForwardList::currentItem const):
2187 (WebKit::WebBackForwardList::backItem const):
2188 (WebKit::WebBackForwardList::forwardItem const):
2189 (WebKit::WebBackForwardList::itemAtIndex const):
2190 (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit const):
2191 (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit const):
2192 (WebKit::WebBackForwardList::removeAllItems):
2193 (WebKit::WebBackForwardList::clear):
2194 (WebKit::WebBackForwardList::backForwardListState const):
2195 (WebKit::WebBackForwardList::restoreFromState):
2196 * UIProcess/WebBackForwardList.h:
2197 * UIProcess/WebPageProxy.cpp:
2198 (WebKit::WebPageProxy::reattachToWebProcessWithItem):
2199 (WebKit::WebPageProxy::initializeWebPage):
2200 (WebKit::WebPageProxy::didChangeBackForwardList):
2201 (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
2202 (WebKit::WebPageProxy::backForwardGoToItem):
2203 * UIProcess/WebPageProxy.h:
2204 * UIProcess/WebProcessProxy.cpp:
2205 (WebKit::WebProcessProxy::registerNewWebBackForwardListItem):
2206 * UIProcess/WebProcessProxy.h:
2207 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2208 (WebKit::WebBackForwardListProxy::itemAtIndex):
2210 2017-10-03 Chris Dumez <cdumez@apple.com>
2212 SharedStringHashStore should support removing hashes
2213 https://bugs.webkit.org/show_bug.cgi?id=177770
2215 Reviewed by Alex Christensen.
2217 SharedStringHashStore should support removing hashes. It currently only supports adding hashes or
2218 clearing all of them, which is sufficient for the VisitedLinkStore but will not be for Service
2221 * Shared/SharedStringHashStore.cpp:
2222 (WebKit::SharedStringHashStore::SharedStringHashStore):
2223 (WebKit::SharedStringHashStore::add):
2224 (WebKit::SharedStringHashStore::remove):
2225 (WebKit::SharedStringHashStore::contains):
2226 (WebKit::SharedStringHashStore::clear):
2227 (WebKit::SharedStringHashStore::resizeTable):
2228 (WebKit::SharedStringHashStore::pendingOperationsTimerFired):
2229 * Shared/SharedStringHashStore.h:
2230 * Shared/SharedStringHashTable.cpp:
2231 (WebKit::SharedStringHashTable::remove):
2232 * Shared/SharedStringHashTable.h:
2233 * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
2234 * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
2235 (-[_WKVisitedLinkStore containsVisitedLinkWithURL:]):
2236 (-[_WKVisitedLinkStore removeVisitedLinkWithURL:]):
2237 * UIProcess/VisitedLinkStore.cpp:
2238 (WebKit::VisitedLinkStore::containsVisitedLinkHash):
2239 (WebKit::VisitedLinkStore::removeVisitedLinkHash):
2240 (WebKit::VisitedLinkStore::didUpdateSharedStringHashes):
2241 * UIProcess/VisitedLinkStore.h:
2243 2017-10-03 Alex Christensen <achristensen@webkit.org>
2245 Fix API tests after r222794.
2246 https://bugs.webkit.org/show_bug.cgi?id=177825
2248 * UIProcess/WebPageProxy.cpp:
2249 (WebKit::WebPageProxy::willGoToBackForwardListItem):
2250 Sometimes there's no navigation client.
2252 2017-10-03 Alex Christensen <achristensen@webkit.org>
2254 Add ObjC equivalent of WKPageLoaderClient.pluginDidFail
2255 https://bugs.webkit.org/show_bug.cgi?id=177787
2256 <rdar://problem/22387633>
2258 Reviewed by Tim Horton.
2260 * UIProcess/API/APILoaderClient.h:
2261 (API::LoaderClient::didFailToInitializePlugin):
2262 * UIProcess/API/APINavigationClient.h:
2263 (API::NavigationClient::canHandleDidFailToInitializePlugIn const):
2264 (API::NavigationClient::didFailToInitializePlugIn):
2265 * UIProcess/API/C/WKPage.cpp:
2266 (WKPageSetPageLoaderClient):
2267 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2268 * UIProcess/Cocoa/NavigationState.h:
2269 * UIProcess/Cocoa/NavigationState.mm:
2270 (WebKit::NavigationState::setNavigationDelegate):
2271 (WebKit::NavigationState::NavigationClient::canHandleDidFailToInitializePlugIn const):
2272 (WebKit::NavigationState::NavigationClient::didFailToInitializePlugIn):
2273 * UIProcess/WebPageProxy.cpp:
2274 (WebKit::WebPageProxy::didFailToInitializePlugin):
2276 2017-10-03 Adrian Perez de Castro <aperez@igalia.com>
2278 [GTK] Prefer -webkit-system-font
2279 https://bugs.webkit.org/show_bug.cgi?id=177814
2281 Reviewed by Carlos Garcia Campos.
2283 Use "font-family: -webkit-system-font" instead of "font: menu".
2285 * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
2286 (WebKit::RemoteInspectorProtocolHandler::handleRequest): Edited HTML snippet.
2288 2017-10-03 Alex Christensen <achristensen@webkit.org>
2290 Add ObjC SPI equivalent to WKPageLoaderClient.willGoToBackForwardListItem
2291 https://bugs.webkit.org/show_bug.cgi?id=177825
2292 <rdar://problem/22387505>
2294 Reviewed by Tim Horton.
2296 * UIProcess/API/APILoaderClient.h:
2297 (API::LoaderClient::willGoToBackForwardListItem):
2298 * UIProcess/API/APINavigationClient.h:
2299 (API::NavigationClient::canHandleWillGoToBackForwardListItem const):
2300 (API::NavigationClient::willGoToBackForwardListItem):
2301 * UIProcess/API/C/WKPage.cpp:
2302 (WKPageSetPageLoaderClient):
2303 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2304 * UIProcess/Cocoa/NavigationState.h:
2305 * UIProcess/Cocoa/NavigationState.mm:
2306 (WebKit::NavigationState::setNavigationDelegate):
2307 (WebKit::NavigationState::NavigationClient::canHandleWillGoToBackForwardListItem const):
2308 (WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):
2309 * UIProcess/WebPageProxy.cpp:
2310 (WebKit::WebPageProxy::willGoToBackForwardListItem):
2311 * UIProcess/WebPageProxy.h:
2312 * UIProcess/WebPageProxy.messages.in:
2313 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2314 (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem const):
2316 2017-10-03 Michael Catanzaro <mcatanzaro@igalia.com>
2318 REGRESSION(r222392): [WPE][GTK] Many forms tests are failing due to broken event timestamps
2319 https://bugs.webkit.org/show_bug.cgi?id=177449
2321 Reviewed by Chris Dumez.
2323 * Shared/gtk/WebEventFactory.cpp:
2324 (WebKit::WebEventFactory::createWebMouseEvent):
2325 (WebKit::WebEventFactory::createWebWheelEvent):
2326 (WebKit::WebEventFactory::createWebKeyboardEvent):
2327 (WebKit::WebEventFactory::createWebTouchEvent):
2328 * Shared/wpe/WebEventFactory.cpp:
2329 (WebKit::wallTimeForEventTime):
2330 (WebKit::WebEventFactory::createWebKeyboardEvent):
2331 (WebKit::WebEventFactory::createWebMouseEvent):
2332 (WebKit::WebEventFactory::createWebWheelEvent):
2333 (WebKit::WebEventFactory::createWebTouchEvent):
2335 2017-10-03 Carlos Garcia Campos <cgarcia@igalia.com>
2337 [GTK][WPE] WebProcess should run cleanup on quit to release resources
2338 https://bugs.webkit.org/show_bug.cgi?id=168126
2340 Reviewed by Michael Catanzaro.
2342 Do not call exit on sync message send failure for GTK and WPE ports.
2344 * WebProcess/WebProcess.cpp:
2345 (WebKit::WebProcess::initializeConnection):
2347 2017-10-02 Ryosuke Niwa <rniwa@webkit.org>
2349 Move more code into PasteboardCustomData
2350 https://bugs.webkit.org/show_bug.cgi?id=177795
2352 Reviewed by Wenson Hsieh.
2354 Added the support for encoding and decoding the origin string in PasteboardCustomData.
2356 * Shared/WebCoreArgumentCoders.cpp:
2357 (IPC::ArgumentCoder<PasteboardCustomData>::encode):
2358 (IPC::ArgumentCoder<PasteboardCustomData>::decode):
2360 2017-10-02 Adrian Perez de Castro <aperez@igalia.com>
2362 [GTK] Do not hardcode font family in served remote inspector HTML snippets
2363 https://bugs.webkit.org/show_bug.cgi?id=177742
2365 Reviewed by Carlos Garcia Campos.
2367 Instead of hardcoding Cantarell as the font used for the HTML snippets served
2368 by the remote inspector handler, use "font: menu" to obtain the system UI
2369 font, plus a "font-size" rule for adjusting the size.
2371 * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
2372 (WebKit::RemoteInspectorProtocolHandler::handleRequest): Change the
2373 CSS rules in the served snippet.
2375 2017-10-02 Joseph Pecoraro <pecoraro@apple.com>
2377 Web Inspector: Include Beacon and Ping requests in Network tab
2378 https://bugs.webkit.org/show_bug.cgi?id=177641
2379 <rdar://problem/33086839>
2381 Reviewed by Chris Dumez.
2383 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2384 (WebKit::NetworkConnectionToWebProcess::loadPing):
2385 (WebKit::NetworkConnectionToWebProcess::didFinishPingLoad):
2386 * NetworkProcess/NetworkConnectionToWebProcess.h:
2387 * NetworkProcess/PingLoad.cpp:
2388 (WebKit::PingLoad::PingLoad):
2389 (WebKit::PingLoad::didFinish):
2390 (WebKit::PingLoad::didReceiveResponseNetworkSession):
2391 * NetworkProcess/PingLoad.h:
2392 * WebProcess/Network/NetworkProcessConnection.cpp:
2393 (WebKit::NetworkProcessConnection::didFinishPingLoad):
2394 * WebProcess/Network/NetworkProcessConnection.h:
2395 * WebProcess/Network/NetworkProcessConnection.messages.in:
2396 * WebProcess/Network/WebLoaderStrategy.cpp:
2397 (WebKit::WebLoaderStrategy::networkProcessCrashed):
2398 (WebKit::WebLoaderStrategy::startPingLoad):
2399 (WebKit::WebLoaderStrategy::didFinishPingLoad):
2400 * WebProcess/Network/WebLoaderStrategy.h:
2401 Pass an optional ResourceResponse back to the ping completion handler.
2403 2017-10-02 Alex Christensen <achristensen@webkit.org>
2405 REGRESSION: API tests WebKit.ProcessDidTerminateRequestedByClient and WebKit.ProcessDidTerminateWithReasonCrash are timing out
2406 https://bugs.webkit.org/show_bug.cgi?id=177764
2408 Reviewed by Chris Dumez.
2410 * UIProcess/API/C/WKPage.cpp:
2411 (WKPageSetPageNavigationClient):
2412 I shouldn't have reverted the A API telling the listener to continue if there's no client function.
2414 2017-10-02 Carlos Garcia Campos <cgarcia@igalia.com>
2416 [WPE][GTK] Crash in webkit_web_resource_get_data_finish()
2417 https://bugs.webkit.org/show_bug.cgi?id=177107
2419 Reviewed by Michael Catanzaro.
2421 Handle errors in webkit_web_resource_get_data() callback.
2423 * UIProcess/API/glib/WebKitWebResource.cpp:
2424 (resourceDataCallback):
2425 (webkit_web_resource_get_data):
2427 2017-10-02 Olivier Blin <olivier.blin@softathome.com>
2429 [WPE] Fix UIProcess build with GStreamer and without VIDEO
2430 https://bugs.webkit.org/show_bug.cgi?id=177753
2432 Reviewed by Michael Catanzaro.
2434 GStreamer builds fail when WebAudio is enabled but VIDEO disabled.
2435 This is the WPE counterpart of bug 153135.
2437 * UIProcess/API/wpe/PageClientImpl.h:
2439 2017-10-02 Alex Christensen <achristensen@webkit.org>
2441 Expose more WKPreferences SPI to match C SPI
2442 https://bugs.webkit.org/show_bug.cgi?id=177697
2444 * UIProcess/API/Cocoa/WKPreferences.mm:
2445 (-[WKPreferences _javaEnabledForLocalFiles]):
2446 (-[WKPreferences _setPlugInsEnabled:]): Deleted.
2447 (-[WKPreferences _plugInsEnabled]): Deleted.
2448 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2449 _javaEnabledForLocalFiles should return the correct value.
2450 _plugInsEnabled has public API. This SPI is not needed.
2452 2017-10-02 Alex Christensen <achristensen@webkit.org>
2454 REGRESSION(r214201): WebProcess hangs during policy decisions
2455 https://bugs.webkit.org/show_bug.cgi?id=177590
2456 <rdar://problem/33362929>
2458 Reviewed by Andy Estes.
2460 This is like r222431 but for trunk instead of a branch.
2461 It includes the same regression API test so I don't make the same mistake again.
2463 * UIProcess/API/C/WKPage.cpp:
2464 (WKPageSetPageNavigationClient):
2465 * UIProcess/WebPageProxy.cpp:
2466 (WebKit::WebPageProxy::receivedPolicyDecision):
2467 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2468 (WebKit::WebPageProxy::decidePolicyForResponseSync):
2469 * UIProcess/WebPageProxy.h:
2470 * UIProcess/WebPageProxy.messages.in:
2471 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2472 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2473 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2474 (WebKit::WebFrameLoaderClient::applyToDocumentLoader):
2475 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2476 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2477 * WebProcess/WebPage/WebDocumentLoader.cpp:
2478 (WebKit::WebDocumentLoader::setNavigationID):
2479 * WebProcess/WebPage/WebFrame.cpp:
2480 (WebKit::WebFrame::setUpPolicyListener):
2481 (WebKit::WebFrame::invalidatePolicyListener):
2482 (WebKit::WebFrame::didReceivePolicyDecision):
2483 * WebProcess/WebPage/WebFrame.h:
2484 * WebProcess/WebPage/WebPage.cpp:
2485 (WebKit::WebPage::didReceivePolicyDecision):
2486 * WebProcess/WebPage/WebPage.h:
2487 * WebProcess/WebPage/WebPage.messages.in:
2489 2017-10-02 Alex Christensen <achristensen@webkit.org>
2491 Remove unnecessary copy of SessionID in WebPageProxy
2492 https://bugs.webkit.org/show_bug.cgi?id=177702
2494 Reviewed by Darin Adler.
2496 * UIProcess/WebPageProxy.cpp:
2497 (WebKit::WebPageProxy::sessionID const):
2498 (WebKit::WebPageProxy::creationParameters):
2499 * UIProcess/WebPageProxy.h:
2500 (WebKit::WebPageProxy::sessionID const): Deleted.
2502 2017-10-02 Alex Christensen <achristensen@webkit.org>
2504 Expose more WKPreferences SPI to match C SPI
2505 https://bugs.webkit.org/show_bug.cgi?id=177697
2506 <rdar://problem/24110556>
2508 Reviewed by Darin Adler.
2510 * UIProcess/API/Cocoa/WKPreferences.mm:
2511 (-[WKPreferences _setJavaEnabledForLocalFiles:]):
2512 (-[WKPreferences _javaEnabledForLocalFiles]):
2513 (-[WKPreferences _setCanvasUsesAcceleratedDrawing:]):
2514 (-[WKPreferences _canvasUsesAcceleratedDrawing]):
2515 (-[WKPreferences _setAcceleratedCompositingEnabled:]):
2516 (-[WKPreferences _acceleratedCompositingEnabled]):
2517 (-[WKPreferences _setDefaultTextEncodingName:]):
2518 (-[WKPreferences _defaultTextEncodingName]):
2519 (-[WKPreferences _setNeedsSiteSpecificQuirks:]):
2520 (-[WKPreferences _needsSiteSpecificQuirks]):
2521 (-[WKPreferences _setAuthorAndUserStylesEnabled:]):
2522 (-[WKPreferences _authorAndUserStylesEnabled]):
2523 (-[WKPreferences _setDOMTimersThrottlingEnabled:]):
2524 (-[WKPreferences _domTimersThrottlingEnabled]):
2525 (-[WKPreferences _setWebArchiveDebugModeEnabled:]):
2526 (-[WKPreferences _webArchiveDebugModeEnabled]):
2527 (-[WKPreferences _setLocalFileContentSniffingEnabled:]):
2528 (-[WKPreferences _localFileContentSniffingEnabled]):
2529 (-[WKPreferences _setUsesPageCache:]):
2530 (-[WKPreferences _usesPageCache]):
2531 (-[WKPreferences _setPageCacheSupportsPlugins:]):
2532 (-[WKPreferences _pageCacheSupportsPlugins]):
2533 (-[WKPreferences _setShouldPrintBackgrounds:]):
2534 (-[WKPreferences _shouldPrintBackgrounds]):
2535 (-[WKPreferences _setWebSecurityEnabled:]):
2536 (-[WKPreferences _webSecurityEnabled]):
2537 (-[WKPreferences _setUniversalAccessFromFileURLsAllowed:]):
2538 (-[WKPreferences _universalAccessFromFileURLsAllowed]):
2539 (-[WKPreferences _setAVFoundationEnabled:]):
2540 (-[WKPreferences _avFoundationEnabled]):
2541 (-[WKPreferences _setSuppressesIncrementalRendering:]):
2542 (-[WKPreferences _suppressesIncrementalRendering]):
2543 (-[WKPreferences _setAsynchronousPluginInitializationEnabled:]):
2544 (-[WKPreferences _asynchronousPluginInitializationEnabled]):
2545 (-[WKPreferences _setArtificialPluginInitializationDelayEnabled:]):
2546 (-[WKPreferences _artificialPluginInitializationDelayEnabled]):
2547 (-[WKPreferences _setCookieEnabled:]):
2548 (-[WKPreferences _cookieEnabled]):
2549 (-[WKPreferences _setPlugInSnapshottingEnabled:]):
2550 (-[WKPreferences _plugInSnapshottingEnabled]):
2551 (-[WKPreferences _setQTKitEnabled:]):
2552 (-[WKPreferences _qtKitEnabled]):
2553 (-[WKPreferences _setSubpixelCSSOMElementMetricsEnabled:]):
2554 (-[WKPreferences _subpixelCSSOMElementMetricsEnabled]):
2555 (-[WKPreferences _setMediaSourceEnabled:]):
2556 (-[WKPreferences _mediaSourceEnabled]):
2557 (-[WKPreferences _setViewGestureDebuggingEnabled:]):
2558 (-[WKPreferences _viewGestureDebuggingEnabled]):
2559 (-[WKPreferences _setCSSAnimationTriggersEnabled:]):
2560 (-[WKPreferences _cssAnimationTriggersEnabled]):
2561 (-[WKPreferences _setStandardFontFamily:]):
2562 (-[WKPreferences _standardFontFamily]):
2563 (-[WKPreferences _setNotificationsEnabled:]):
2564 (-[WKPreferences _notificationsEnabled]):
2565 (-[WKPreferences _setBackspaceKeyNavigationEnabled:]):
2566 (-[WKPreferences _backspaceKeyNavigationEnabled]):
2567 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2569 2017-10-02 Carlos Garcia Campos <cgarcia@igalia.com>
2571 [GTK][WPE] Enable interactive forms validation by default
2572 https://bugs.webkit.org/show_bug.cgi?id=177737
2574 Reviewed by Michael Catanzaro.
2576 It's currently disabled for no reason.
2578 * Shared/WebPreferencesDefinitions.h:
2580 2017-10-02 Michael Catanzaro <mcatanzaro@igalia.com>
2582 Remove ENABLE_CSS_REGIONS
2583 https://bugs.webkit.org/show_bug.cgi?id=177689
2585 Reviewed by Darin Adler.
2587 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
2588 (webkit_dom_element_get_webkit_region_overset):
2589 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.h:
2590 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
2591 (webkit_dom_element_get_webkit_region_overset): Deleted.
2592 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
2594 2017-09-30 Darin Adler <darin@apple.com>
2596 Have IPC::Connection::Client objects consistently invalidate the connection when destroyed
2597 https://bugs.webkit.org/show_bug.cgi?id=177708
2599 Reviewed by Anders Carlsson.
2601 I ran into an intermittent crash when running regression tests. It looked like a connection
2602 client was being called after it was destroyed. I did an audit of the all the connection
2603 clients to make sure they all invalidate their connection before they are destroyed.
2605 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2606 (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): Invalidate the
2607 connection since this object opened the connection. There is no obvious
2608 guarantee that the connection will already be invalid when this is destroyed.
2609 * StorageProcess/StorageToWebProcessConnection.cpp:
2610 (WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection): Ditto.
2611 * UIProcess/Plugins/PluginProcessProxy.cpp:
2612 (WebKit::PluginProcessProxy::~PluginProcessProxy): Ditto.
2613 * WebProcess/Network/NetworkProcessConnection.cpp:
2614 (WebKit::NetworkProcessConnection::~NetworkProcessConnection): Ditto.
2615 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
2616 (WebKit::WebToStorageProcessConnection::~WebToStorageProcessConnection): Ditto.
2618 * StorageProcess/StorageToWebProcessConnection.h: Derive privately rather than publicly
2619 from IPC::Connection::Client because we can, and this means we don't have to study quite
2620 as much code to understand how this is used as a connection client.
2621 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h: Ditto.
2622 * WebProcess/Storage/WebToStorageProcessConnection.h: Ditto.
2623 * WebProcess/WebPage/WebInspector.h: Ditto.
2624 * WebProcess/WebPage/WebInspectorUI.h: Ditto.
2626 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2627 (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer): Added a comment about a
2628 reference cycle cycle leading to a leak that I believe exists here.
2630 2017-09-29 Alex Christensen <achristensen@webkit.org>
2632 REGRESSION: ASSERTION FAILED: m_provisionalURL.isEmpty() in WebKit::FrameLoadState::didStartProvisionalLoad
2633 https://bugs.webkit.org/show_bug.cgi?id=177491
2635 Reviewed by Andy Estes.
2637 * WebProcess/WebPage/WebFrame.cpp:
2638 (WebKit::WebFrame::setUpWillSubmitFormListener):
2639 (WebKit::WebFrame::continueWillSubmitForm):
2640 (WebKit::WebFrame::invalidatePolicyListener):
2641 Speculative fix for a flaky assertion.
2642 Restore the clearing of the policy listeners we used to have when form submission was treated as a policy.
2644 2017-09-29 Chris Dumez <cdumez@apple.com>
2646 http/tests/preconnect/link-rel-preconnect-https.html is flaky
2647 https://bugs.webkit.org/show_bug.cgi?id=177673
2649 Reviewed by Alex Christensen.
2651 Update PreconnectTask to query the client when a certificate needs to be
2652 validated. This allows WebKitTestRunner to ignore invalid certificates
2653 and this causes http/tests/preconnect/link-rel-preconnect-https.html
2654 to pass consistently.
2656 To avoid duplicating code, PreconnectTask now uses NetworkLoad internally
2657 instead of using a NetworkDataTask directly.
2659 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2660 (WebKit::NetworkConnectionToWebProcess::preconnectTo):
2661 * NetworkProcess/NetworkConnectionToWebProcess.h:
2662 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2663 * NetworkProcess/NetworkLoad.h:
2664 * NetworkProcess/NetworkProcess.cpp:
2665 (WebKit::generateCanAuthenticateIdentifier):
2666 (WebKit::NetworkProcess::canAuthenticateAgainstProtectionSpace):
2667 (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
2668 (WebKit::NetworkProcess::preconnectTo):
2669 * NetworkProcess/NetworkProcess.h:
2670 * NetworkProcess/NetworkResourceLoadParameters.cpp:
2671 (WebKit::NetworkResourceLoadParameters::encode const):
2672 (WebKit::NetworkResourceLoadParameters::decode):
2673 * NetworkProcess/PreconnectTask.cpp:
2674 (WebKit::PreconnectTask::PreconnectTask):
2675 (WebKit::PreconnectTask::~PreconnectTask):
2676 (WebKit::PreconnectTask::willSendRedirectedRequest):
2677 (WebKit::PreconnectTask::didReceiveResponse):
2678 (WebKit::PreconnectTask::didReceiveBuffer):
2679 (WebKit::PreconnectTask::didFinishLoading):
2680 (WebKit::PreconnectTask::didFailLoading):
2681 (WebKit::PreconnectTask::didSendData):
2682 (WebKit::PreconnectTask::canAuthenticateAgainstProtectionSpaceAsync):
2683 (WebKit::PreconnectTask::continueCanAuthenticateAgainstProtectionSpace):
2684 (WebKit::PreconnectTask::frameID const):
2685 (WebKit::PreconnectTask::pageID const):
2686 * NetworkProcess/PreconnectTask.h:
2687 * WebProcess/Network/WebLoaderStrategy.cpp:
2688 (WebKit::WebLoaderStrategy::preconnectTo):
2689 * WebProcess/Network/WebLoaderStrategy.h:
2691 2017-09-29 Alex Christensen <achristensen@webkit.org>
2693 Expose WebPreferences::webGLEnabled through WKPreferences
2694 https://bugs.webkit.org/show_bug.cgi?id=177692
2695 <rdar://problem/24110556>
2697 Reviewed by Andy Estes.
2699 * UIProcess/API/Cocoa/WKPreferences.mm:
2700 (-[WKPreferences _setWebGLEnabled:]):
2701 (-[WKPreferences _webGLEnabled]):
2702 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2704 2017-09-29 Chris Dumez <cdumez@apple.com>
2706 [WK2][NETWORK_SESSION] Move some authentication-related code to avoid duplication
2707 https://bugs.webkit.org/show_bug.cgi?id=177667
2709 Reviewed by Alex Christensen.
2711 Move some authentication-related code to avoid duplication.
2712 This is a preparation code supporting Download authentication
2713 as Download uses a NSURLSessionDownloadTask and not a
2716 * NetworkProcess/NetworkDataTask.h:
2717 (WebKit::NetworkDataTask::setSuggestedFilename):
2718 * NetworkProcess/NetworkLoad.cpp:
2719 (WebKit::NetworkLoad::didReceiveChallenge):
2720 (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
2721 * NetworkProcess/NetworkSession.cpp:
2722 (WebKit::NetworkSession::allowsSpecificHTTPSCertificateForHost):
2723 * NetworkProcess/NetworkSession.h:
2724 * NetworkProcess/PreconnectTask.cpp:
2725 (WebKit::PreconnectTask::didReceiveChallenge):
2726 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
2727 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2728 (WebKit::NetworkDataTaskCocoa::didReceiveChallenge):
2729 * NetworkProcess/cocoa/NetworkSessionCocoa.h:
2730 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2731 (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
2732 (WebKit::certificatesMatch):
2733 (WebKit::NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost):
2735 2017-09-29 Alex Christensen <achristensen@webkit.org>
2737 Fix WKWebViewConfigurationPrivate after r222663
2738 https://bugs.webkit.org/show_bug.cgi?id=177644
2740 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2741 (-[WKWebViewConfiguration init]):
2742 (-[WKWebViewConfiguration copyWithZone:]):
2743 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2745 2017-09-29 Chris Dumez <cdumez@apple.com>
2747 Split some logic out of VisitedLinkStore and make it reusable
2748 https://bugs.webkit.org/show_bug.cgi?id=177575
2750 Reviewed by Alex Christensen.
2752 Split some logic out of VisitedLinkStore and make it reusable for other purposes than
2753 visited links and from other processes than the UIProcess.
2755 The plan is to reuse the new SharedStringHashStore for Service Worker registration
2756 on StorageProcess side and querying on WebContent process side.
2759 * Shared/SharedStringHashStore.cpp: Added.
2760 (WebKit::nextPowerOf2):
2761 (WebKit::tableSizeForKeyCount):
2762 (WebKit::SharedStringHashStore::SharedStringHashStore):
2763 (WebKit::SharedStringHashStore::createSharedMemoryHandle):
2764 (WebKit::SharedStringHashStore::add):
2765 (WebKit::SharedStringHashStore::clear):
2766 (WebKit::SharedStringHashStore::resizeTable):
2767 (WebKit::SharedStringHashStore::pendingSharedStringHashesTimerFired):
2768 * Shared/SharedStringHashStore.h: Copied from Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.h.
2769 (WebKit::SharedStringHashStore::Client::~Client):
2770 (WebKit::SharedStringHashStore::isEmpty const):
2771 * Shared/SharedStringHashTable.cpp: Renamed from Source/WebKit/Shared/VisitedLinkTable.cpp.
2772 (WebKit::SharedStringHashTable::SharedStringHashTable):
2773 (WebKit::SharedStringHashTable::~SharedStringHashTable):
2774 (WebKit::SharedStringHashTable::setSharedMemory):
2775 (WebKit::SharedStringHashTable::add):
2776 (WebKit::SharedStringHashTable::contains const):
2777 (WebKit::SharedStringHashTable::clear):
2778 * Shared/SharedStringHashTable.h: Renamed from Source/WebKit/Shared/VisitedLinkTable.h.
2779 * UIProcess/API/C/WKContext.cpp:
2780 (WKContextAddVisitedLink):
2781 * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
2782 (-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
2783 * UIProcess/VisitedLinkStore.cpp:
2784 (WebKit::VisitedLinkStore::VisitedLinkStore):
2785 (WebKit::VisitedLinkStore::addProcess):
2786 (WebKit::VisitedLinkStore::addVisitedLinkHash):
2787 (WebKit::VisitedLinkStore::removeAll):
2788 (WebKit::VisitedLinkStore::addVisitedLinkHashFromPage):
2789 (WebKit::VisitedLinkStore::sendStoreHandleToProcess):
2790 (WebKit::VisitedLinkStore::didInvalidateSharedMemory):
2791 (WebKit::VisitedLinkStore::didAddSharedStringHashes):
2792 * UIProcess/VisitedLinkStore.h:
2793 * UIProcess/WebProcessPool.cpp:
2794 * UIProcess/WebProcessPool.h:
2795 * UIProcess/WebProcessProxy.h:
2796 * WebKit.xcodeproj/project.pbxproj:
2797 * WebProcess/WebPage/VisitedLinkTableController.cpp:
2798 (WebKit::VisitedLinkTableController::isLinkVisited):
2799 (WebKit::VisitedLinkTableController::addVisitedLink):
2800 (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
2801 * WebProcess/WebPage/VisitedLinkTableController.h:
2802 * WebProcess/WebPage/VisitedLinkTableController.messages.in:
2804 2017-09-28 Alex Christensen <achristensen@webkit.org>
2806 Add WKWebViewConfiguration SPI equivalent to WKPageConfigurationSetBackgroundCPULimit
2807 https://bugs.webkit.org/show_bug.cgi?id=177644
2808 <rdar://problem/34338698>
2810 Reviewed by Geoffrey Garen.
2812 WKPageConfigurationSetBackgroundCPULimit is a setter of a std::optional<double> with no accessor.
2813 It's never set to 0 in practice, so I guess the ObjC equivalent is a double that is zero or nonzero.
2815 * UIProcess/API/Cocoa/WKWebView.mm:
2816 (-[WKWebView _initializeWithConfiguration:]):
2817 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2818 (-[WKWebViewConfiguration _setCPULimit:]):
2819 (-[WKWebViewConfiguration _cpuLimit]):
2820 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2822 2017-09-28 Ryosuke Niwa <rniwa@webkit.org>
2824 Image pasting is not working on tineye.com / gmail.com / GitHub.com due to lack of support for DataTransfer.items
2825 https://bugs.webkit.org/show_bug.cgi?id=170449
2826 <rdar://problem/31432525>
2828 Reviewed by Wenson Hsieh.
2830 Add sandbox extensions for files in the pasteboard to make copying & pasting image files work.
2831 This is what we do for drag & drop but we should consider adding a mechanism to rekoke the extension in the future.
2833 * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
2834 (WebKit::WebPasteboardProxy::getPasteboardPathnamesForType): Add sandbox extensions to the pasted files.
2835 * UIProcess/WebPasteboardProxy.h:
2836 * UIProcess/WebPasteboardProxy.messages.in:
2837 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2838 (WebKit::WebPlatformStrategies::getPathnamesForType): Consume the sandbox tokens sent by the UI process permanently
2839 since WebCore will now create File objects for these pasted files.
2841 2017-09-29 Wenson Hsieh <wenson_hsieh@apple.com>
2843 [iOS WK2] Implement -[WKContentView hasText] for compatibility with the UITextInput protocol
2844 https://bugs.webkit.org/show_bug.cgi?id=177662
2845 <rdar://problem/33410373>
2847 Reviewed by Tim Horton.
2849 Implements -[WKContentView hasText] by propagating a flag through post-layout editor state.
2851 * Shared/EditorState.cpp:
2852 (WebKit::EditorState::PostLayoutData::encode const):
2853 (WebKit::EditorState::PostLayoutData::decode):
2854 * Shared/EditorState.h:
2856 Add a new flag to EditorState indicating whether or not the current editable root containing the selection has
2857 any plain text. Add IPC support for this new flag.
2859 * UIProcess/ios/WKContentViewInteraction.mm:
2860 (-[WKContentView hasText]):
2861 * WebProcess/WebPage/ios/WebPageIOS.mm:
2862 (WebKit::computeEditableRootHasContentAndPlainText):
2864 Add a new helper to compute whether or not the editable root has any content, and any plain text. This
2865 is used as the last cached value for -hasText on WKContentView that we will deliver to UIKit. Some important
2866 things to note here:
2867 - If post layout data already indicates that we have selected some plain text, or that there is a plain text
2868 character near the selection, just set the flags to true and bail, since the editable root necessarily has
2869 content that is plain text.
2870 - If hasContent is false, don't even bother computing hasPlainText, because it must also be false.
2871 - Otherwise, use hasAnyPlainText to compute the value of hasPlainText, which is a faster variant of plainText.
2872 These optimizations help us avoid doing extra work at all when running Speedometer, apart from checking the
2873 values of a few PostLayoutData flags. This also fixes the value of hasContent, which was previously always false
2874 if we had a range selection rather than a caret selection even when the editable root has content, because the
2875 logic to compute the value of hasContent only existed in the branch where we have a caret selection.
2877 (WebKit::WebPage::platformEditorState const):
2879 2017-09-28 Timothy Horton <timothy_horton@apple.com>
2881 Fix the macOS CMake build
2885 2017-09-28 Timothy Horton <timothy_horton@apple.com>
2887 Revise deployment target macros from r222620
2889 Rubber-stamped by Wenson Hsieh.
2891 * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
2892 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2893 (WebKit::PDFPlugin::pdfDocumentDidLoad):
2895 2017-09-28 Aishwarya Nirmal <anirmal@apple.com>
2897 Request for PDF URL targets for specific pages, sections, etc.
2898 https://bugs.webkit.org/show_bug.cgi?id=177582
2899 <rdar://problem/5692679>
2901 Reviewed by Tim Horton.
2903 This change sets the URL fragment for scroll anchoring in PDFs.
2905 * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
2906 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2907 (WebKit::PDFPlugin::pdfDocumentDidLoad):
2909 2017-09-28 Ross Kirsling <ross.kirsling@sony.com>
2911 [PAL] Move HysteresisActivity into PAL
2912 https://bugs.webkit.org/show_bug.cgi?id=177516
2914 Reviewed by Alex Christensen.
2916 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2917 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
2918 * Shared/WebSQLiteDatabaseTracker.cpp:
2919 (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
2920 (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
2921 * Shared/WebSQLiteDatabaseTracker.h:
2922 * WebProcess/WebPage/WebPage.cpp:
2923 (WebKit::m_pageScrolledHysteresis):
2924 (WebKit::m_userActivityHysteresis):
2925 (WebKit::WebPage::updateUserActivity):
2926 * WebProcess/WebPage/WebPage.h:
2927 * WebProcess/WebProcess.cpp:
2928 (WebKit::WebProcess::WebProcess):
2929 * WebProcess/WebProcess.h:
2931 2017-09-28 Chris Dumez <cdumez@apple.com>
2933 Add support for <link rel=preconnect>
2934 https://bugs.webkit.org/show_bug.cgi?id=177474
2935 <rdar://problem/33141380>
2937 Reviewed by Alex Christensen.
2939 Add support for <link rel=preconnect>:
2940 - https://w3c.github.io/resource-hints/#preconnect
2942 Also add corresponding native private API.
2944 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2945 (WebKit::NetworkConnectionToWebProcess::preconnectTo):
2946 (WebKit::NetworkConnectionToWebProcess::didFinishPreconnection):
2947 * NetworkProcess/NetworkConnectionToWebProcess.h:
2948 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2949 * NetworkProcess/NetworkDataTask.cpp:
2950 (WebKit::NetworkDataTask::create):
2951 * NetworkProcess/NetworkLoadParameters.h:
2952 * NetworkProcess/NetworkProcess.cpp:
2953 (WebKit::NetworkProcess::preconnectTo):
2954 * NetworkProcess/NetworkProcess.h:
2955 * NetworkProcess/NetworkProcess.messages.in:
2956 * NetworkProcess/PreconnectTask.cpp: Added.
2957 (WebKit::PreconnectTask::PreconnectTask):
2958 (WebKit::PreconnectTask::~PreconnectTask):
2959 (WebKit::PreconnectTask::willPerformHTTPRedirection):
2960 (WebKit::PreconnectTask::didReceiveChallenge):
2961 (WebKit::PreconnectTask::didReceiveResponseNetworkSession):
2962 (WebKit::PreconnectTask::didReceiveData):
2963 (WebKit::PreconnectTask::didCompleteWithError):
2964 (WebKit::PreconnectTask::didSendData):
2965 (WebKit::PreconnectTask::wasBlocked):
2966 (WebKit::PreconnectTask::cannotShowURL):
2967 (WebKit::PreconnectTask::didFinish):
2968 * NetworkProcess/PreconnectTask.h: Copied from Source/WebKit/NetworkProcess/NetworkLoadParameters.h.
2969 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
2970 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2971 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
2972 * Shared/WebCoreArgumentCoders.h:
2973 * Shared/WebPreferencesDefinitions.h:
2974 * UIProcess/API/C/WKContext.cpp:
2975 (WKContextPreconnectToServer):
2976 * UIProcess/API/C/WKContextPrivate.h:
2977 * UIProcess/API/Cocoa/WKProcessPool.mm:
2978 (-[WKProcessPool _preconnectToServer:]):
2979 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2980 * UIProcess/WebProcessPool.cpp:
2981 (WebKit::WebProcessPool::preconnectToServer):
2982 * UIProcess/WebProcessPool.h:
2983 * WebKit.xcodeproj/project.pbxproj:
2984 * WebProcess/Network/NetworkProcessConnection.cpp:
2985 (WebKit::NetworkProcessConnection::didFinishPreconnection):
2986 * WebProcess/Network/NetworkProcessConnection.h:
2987 * WebProcess/Network/NetworkProcessConnection.messages.in:
2988 * WebProcess/Network/WebLoaderStrategy.cpp:
2989 (WebKit::WebLoaderStrategy::networkProcessCrashed):
2990 (WebKit::generateLoadIdentifier):
2991 (WebKit::WebLoaderStrategy::startPingLoad):
2992 (WebKit::WebLoaderStrategy::preconnectTo):
2993 (WebKit::WebLoaderStrategy::didFinishPreconnection):
2994 * WebProcess/Network/WebLoaderStrategy.h:
2995 * WebProcess/WebPage/WebPage.cpp:
2996 (WebKit::WebPage::updatePreferences):
2999 2017-09-28 Zan Dobersek <zdobersek@igalia.com>
3001 [Cairo] Remove the cairo_glyph_t complexity from GlyphBuffer
3002 https://bugs.webkit.org/show_bug.cgi?id=177598
3004 Reviewed by Carlos Garcia Campos.
3006 * Shared/API/c/cairo/WKImageCairo.cpp: Explicitly include the <cairo.h>
3007 header here now that it's not included in GlyphBuffer.h.
3008 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp: Ditto.
3010 2017-09-27 Alex Christensen <achristensen@webkit.org>
3012 Add WKContentRuleList notify action type
3013 https://bugs.webkit.org/show_bug.cgi?id=177013
3014 <rdar://problem/31073936>
3016 Reviewed by Darin Adler.
3018 * NetworkProcess/PingLoad.cpp:
3019 (WebKit::PingLoad::processContentExtensionRulesForLoad):
3020 * UIProcess/API/APINavigationClient.h:
3021 (API::NavigationClient::contentRuleListNotification):
3022 * UIProcess/API/C/WKPage.cpp:
3023 (WKPageSetPageNavigationClient):
3024 * UIProcess/API/C/WKPageNavigationClient.h:
3025 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
3026 * UIProcess/Cocoa/NavigationState.h:
3027 * UIProcess/Cocoa/NavigationState.mm:
3028 (WebKit::NavigationState::setNavigationDelegate):
3029 (WebKit::NavigationState::NavigationClient::contentRuleListNotification):
3030 * UIProcess/WebPageProxy.cpp:
3031 (WebKit::WebPageProxy::contentRuleListNotification):
3032 * UIProcess/WebPageProxy.h:
3033 * UIProcess/WebPageProxy.messages.in:
3034 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3035 (WebKit::WebChromeClient::contentRuleListNotification):
3036 * WebProcess/WebCoreSupport/WebChromeClient.h:
3038 2017-09-27 Wenson Hsieh <wenson_hsieh@apple.com>
3040 Drag event DataTransfer has unexpected types "dyn.ah62d4..."
3041 https://bugs.webkit.org/show_bug.cgi?id=172526
3042 <rdar://problem/32396081>
3044 Reviewed by Ryosuke Niwa.
3046 Add boilerplate plumbing and encoder/decoder support for new pasteboard codepaths. See WebCore ChangeLog for
3049 * Scripts/webkit/messages.py:
3051 * Shared/WebCoreArgumentCoders.cpp:
3052 (IPC::ArgumentCoder<PasteboardCustomData>::encode):
3053 (IPC::ArgumentCoder<PasteboardCustomData>::decode):
3055 Add encoder/decoder support for PasteboardCustomData.
3057 (IPC::ArgumentCoder<PasteboardWebContent>::encode):
3058 (IPC::ArgumentCoder<PasteboardWebContent>::decode):
3060 Encode and decode dataInHTMLFormat.
3062 * Shared/WebCoreArgumentCoders.h:
3063 * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
3064 (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
3065 (WebKit::WebPasteboardProxy::writeCustomData):
3066 * UIProcess/WebPasteboardProxy.cpp:
3067 (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
3068 (WebKit::WebPasteboardProxy::writeCustomData):
3069 * UIProcess/WebPasteboardProxy.h:
3070 * UIProcess/WebPasteboardProxy.messages.in:
3071 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3072 (WebKit::WebPlatformStrategies::typesSafeForDOMToReadAndWrite):
3073 (WebKit::WebPlatformStrategies::writeCustomData):
3074 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3076 2017-09-27 Alex Christensen <achristensen@webkit.org>
3078 Allow modern decoding of std::optional<T>
3079 https://bugs.webkit.org/show_bug.cgi?id=177519
3081 Reviewed by Tim Horton.
3083 * Platform/IPC/ArgumentCoders.h:
3084 (IPC::ArgumentCoder<std::optional<T>>::decode):
3085 * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
3086 (IPC::ArgumentCoder<WebCore::PaymentAuthorizationResult>::decode):
3087 (IPC::ArgumentCoder<WebCore::PaymentError>::decode):
3088 (IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):
3089 (IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::decode):
3090 (IPC::ArgumentCoder<WebCore::ShippingMethodUpdate>::decode):
3091 * Shared/WebCoreArgumentCoders.cpp:
3092 (IPC::ArgumentCoder<IntPoint>::decode):
3093 (IPC::ArgumentCoder<IntSize>::decode):
3094 * Shared/WebCoreArgumentCoders.h:
3095 * Shared/WebPageCreationParameters.cpp:
3096 (WebKit::WebPageCreationParameters::decode):
3098 2017-09-27 Commit Queue <commit-queue@webkit.org>
3100 Unreviewed, rolling out r222541.
3101 https://bugs.webkit.org/show_bug.cgi?id=177580
3103 WebCore isn't ready for the asynchronousness this was going to
3104 enable (Requested by alexchristensen on #webkit).
3108 "Pass a completion handler instead of a
3109 WebFramePolicyListenerProxy during policy decisions"
3110 https://bugs.webkit.org/show_bug.cgi?id=177509
3111 http://trac.webkit.org/changeset/222541
3113 2017-09-27 Tina Liu <iting_liu@apple.com>
3115 Expose setShouldSuppressFirstResponderChanges() as WKView SPI
3116 https://bugs.webkit.org/show_bug.cgi?id=177513
3117 <rdar://problem/34669220>
3119 Reviewed by Wenson Hsieh.
3121 We already have setShouldSuppressFirstResponderChanges() SPI on WKWebView; Expose it on
3122 WKView as well for clients using legacy WebKit.
3124 * UIProcess/API/Cocoa/WKViewPrivate.h:
3125 * UIProcess/API/mac/WKView.mm:
3126 (-[WKView _setShouldSuppressFirstResponderChanges:]):
3128 2017-09-27 Chris Dumez <cdumez@apple.com>
3130 Have PingLoad take a CompletionHandler
3131 https://bugs.webkit.org/show_bug.cgi?id=177549
3133 Reviewed by Youenn Fablet.
3135 Have PingLoad take a CompletionHandler instead of relying on it calling on method on the
3136 NetworkConnectionToWebProcess when it is done.
3138 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3139 (WebKit::NetworkConnectionToWebProcess::loadPing):
3140 * NetworkProcess/PingLoad.cpp:
3141 (WebKit::PingLoad::PingLoad):
3142 (WebKit::PingLoad::didFinish):
3143 * NetworkProcess/PingLoad.h:
3145 2017-09-26 Alex Christensen <achristensen@webkit.org>
3147 Pass a completion handler instead of a WebFramePolicyListenerProxy during policy decisions
3148 https://bugs.webkit.org/show_bug.cgi?id=177509
3150 Reviewed by Tim Horton.
3152 This makes WebFramePolicyListenerProxy just a wrapper around a WTF::Function which is only needed for the C and glib APIs.
3153 This is a step towards making WebPageProxy::DecidePolicyForResponseSync and WebPageProxy::DecidePolicyForNavigationAction asynchronous.
3155 This patch has no change in behavior.
3158 * UIProcess/API/APINavigationClient.h:
3159 (API::NavigationClient::decidePolicyForNavigationAction):
3160 (API::NavigationClient::decidePolicyForNavigationResponse):
3161 * UIProcess/API/APIPolicyClient.h:
3162 (API::PolicyClient::decidePolicyForNavigationAction):
3163 (API::PolicyClient::decidePolicyForNewWindowAction):
3164 (API::PolicyClient::decidePolicyForResponse):
3165 * UIProcess/API/C/WKFramePolicyListener.cpp:
3166 (WKFramePolicyListenerUseWithPolicies):
3167 * UIProcess/API/C/WKPage.cpp:
3168 (WKPageSetPagePolicyClient):
3169 (WKPageSetPageNavigationClient):
3170 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3171 * UIProcess/API/glib/WebKitPolicyClient.cpp:
3172 * UIProcess/Automation/WebAutomationSession.cpp:
3173 * UIProcess/Cocoa/NavigationState.h:
3174 * UIProcess/Cocoa/NavigationState.mm:
3175 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
3176 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
3177 * UIProcess/Cocoa/WebViewImpl.mm:
3178 * UIProcess/RemoteWebInspectorProxy.cpp:
3179 * UIProcess/WebFormSubmissionListenerProxy.h:
3180 * UIProcess/WebFrameListenerProxy.cpp: Removed.
3181 * UIProcess/WebFrameListenerProxy.h: Removed.
3182 * UIProcess/WebFramePolicyListenerProxy.cpp:
3183 (WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
3184 (WebKit::WebFramePolicyListenerProxy::~WebFramePolicyListenerProxy):
3185 (WebKit::WebFramePolicyListenerProxy::create):
3186 (WebKit::WebFramePolicyListenerProxy::use):
3187 (WebKit::WebFramePolicyListenerProxy::download):
3188 (WebKit::WebFramePolicyListenerProxy::ignore):
3189 * UIProcess/WebFramePolicyListenerProxy.h:
3190 (WebKit::WebFramePolicyListenerProxy::create): Deleted.
3192 (WebKit::WebFramePolicyListenerProxy::operator new): Deleted.
3193 * UIProcess/WebFrameProxy.cpp:
3194 (WebKit::WebFrameProxy::webProcessWillShutDown):
3195 (WebKit::WebFrameProxy::receivedPolicyDecision): Deleted.
3196 (WebKit::WebFrameProxy::setUpPolicyListenerProxy): Deleted.
3197 * UIProcess/WebFrameProxy.h:
3198 * UIProcess/WebInspectorProxy.cpp:
3199 * UIProcess/WebPageProxy.cpp:
3200 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3201 (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
3202 (WebKit::WebPageProxy::decidePolicyForResponseSync):
3203 (WebKit::WebPageProxy::receivedPolicyDecision): Deleted.
3204 (WebKit::WebPageProxy::decidePolicyForResponse): Deleted.
3205 * UIProcess/WebPageProxy.h:
3206 * UIProcess/mac/ViewGestureControllerMac.mm:
3207 * WebKit.xcodeproj/project.pbxproj:
3209 2017-09-26 Brian Burg <bburg@apple.com>
3211 Web Automation: overflow:hidden elements with no children are mistakenly reported as not visible
3212 https://bugs.webkit.org/show_bug.cgi?id=177514
3213 <rdar://problem/31936291>
3215 Reviewed by Joseph Pecoraro.
3217 * UIProcess/Automation/atoms/ElementDisplayed.js:
3218 (isShown.isElementSubtreeHiddenByOverflow):
3219 Array.prototype.every returns true when passed an empty list, so we need
3220 to check for the case where the element has no children and return 'false'.
3222 2017-09-26 Youenn Fablet <youenn@apple.com>
3224 [Cocoa] Add a modern WKPreferences switch to disable WebRTC
3225 https://bugs.webkit.org/show_bug.cgi?id=176638
3226 <rdar://problem/34335158>
3228 Reviewed by Alex Christensen.
3230 * UIProcess/API/Cocoa/WKPreferences.mm:
3231 (-[WKPreferences _peerConnectionEnabled]):
3232 (-[WKPreferences _setPeerConnectionEnabled:]):
3233 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3235 2017-09-26 Brent Fulgham <bfulgham@apple.com>
3237 Harden our access to the vector of URL schemes.
3238 https://bugs.webkit.org/show_bug.cgi?id=177470
3239 <rdar://problem/33881522>
3241 Reviewed by Chris Dumez.
3243 Instead of asserting, use MESSAGE_CHECK so that we actually refuse to access an invalid iterator.
3245 * UIProcess/WebPageProxy.cpp:
3246 (WebKit::WebPageProxy::startURLSchemeTask):
3247 (WebKit::WebPageProxy::stopURLSchemeTask):
3249 2017-09-26 Jer Noble <jer.noble@apple.com>
3251 Thrown ObjC exception when right clicking on <img> containing mp4 link
3252 https://bugs.webkit.org/show_bug.cgi?id=177370
3254 Reviewed by Darin Adler.
3256 Creating a NSImage from mp4 data will fail and return nil; do a nil-check before attempting
3257 to put the results into a NSMutableArray.
3259 * UIProcess/mac/WebContextMenuProxyMac.mm:
3260 (WebKit::WebContextMenuProxyMac::createShareMenuItem):
3262 2017-09-26 Brian Burg <bburg@apple.com>
3264 Web Automation: add commands to get and set user permissions for pages in an automation session
3265 https://bugs.webkit.org/show_bug.cgi?id=177405
3266 <rdar://problem/34493846>
3268 Reviewed by Joseph Pecoraro.
3270 To test some Web APIs via WebDriver, it needs to be possible to simulate a user accepting or
3271 denying requests for elevated permissions, such as getUserMedia() or geolocation.
3273 This patch adds a generic way for a test to configure the automation session's
3274 simulated user action that will happen every time a specific permission is requested.
3275 A test can set a "session permission", trigger the permission request via Web API,
3276 and then verify that the page behaves correctly when the user accepted or denied the request.
3278 A proposal will follow shortly to expose this functionality via a new REST API endpoint.
3280 * UIProcess/Automation/Automation.json: Add get/set commands.
3282 * UIProcess/Automation/WebAutomationSession.cpp:
3283 (WebKit::WebAutomationSession::getSessionPermissions):
3284 (WebKit::WebAutomationSession::setSessionPermissions):
3285 For now, store the permission value in a member of the session. The getUserMedia
3286 permission only needs a bool, but there is no reason we couldn't use more complicated
3287 values for permissions (i.e., strings, numbers, arrays, objects) someday.
3289 (WebKit::WebAutomationSession::shouldAllowGetUserMediaForPage const):
3290 Expose the specific decision to be taken based on whether the request is allowed or denied.
3292 * UIProcess/Automation/WebAutomationSession.h:
3293 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3294 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
3295 If the page is under automation, then simulate the user action according to the
3296 current values of permissions set for the session.
3298 2017-09-25 Alex Christensen <achristensen@webkit.org>
3300 Make PolicyAction an encodable enum class
3301 https://bugs.webkit.org/show_bug.cgi?id=177480
3303 Reviewed by Antti Koivisto.
3305 * NetworkProcess/Downloads/DownloadManager.cpp:
3306 (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
3307 (WebKit::DownloadManager::cancelDownload):
3308 * NetworkProcess/NetworkCORSPreflightChecker.cpp:
3309 (WebKit::NetworkCORSPreflightChecker::didReceiveResponseNetworkSession):
3310 * NetworkProcess/NetworkDataTask.cpp:
3311 (WebKit::NetworkDataTask::didReceiveResponse):
3312 * NetworkProcess/NetworkDataTaskBlob.cpp:
3313 (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
3314 * NetworkProcess/NetworkLoad.cpp:
3315 (WebKit::NetworkLoad::~NetworkLoad):
3316 (WebKit::NetworkLoad::continueDidReceiveResponse):
3317 (WebKit::NetworkLoad::notifyDidReceiveResponse):
3318 * NetworkProcess/PingLoad.cpp:
3319 (WebKit::PingLoad::didReceiveResponseNetworkSession):
3320 * NetworkProcess/capture/NetworkDataTaskReplay.cpp:
3321 (WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):
3322 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3323 (toNSURLSessionResponseDisposition):
3324 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3325 (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
3326 * Scripts/webkit/messages.py:
3328 * UIProcess/WebFormSubmissionListenerProxy.h:
3329 * UIProcess/WebFrameListenerProxy.h:
3330 (WebKit::WebFrameListenerProxy::navigation): Deleted.
3331 * UIProcess/WebFramePolicyListenerProxy.cpp:
3332 (WebKit::WebFramePolicyListenerProxy::use):
3333 (WebKit::WebFramePolicyListenerProxy::download):
3334 (WebKit::WebFramePolicyListenerProxy::ignore):
3335 * UIProcess/WebPageProxy.cpp:
3336 (WebKit::WebPageProxy::receivedPolicyDecision):
3337 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3338 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3339 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
3340 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
3341 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3342 * WebProcess/WebPage/WebFrame.cpp:
3343 (WebKit::WebFrame::invalidatePolicyListener):
3344 * WebProcess/WebPage/WebPage.cpp:
3345 (WebKit::WebPage::didReceivePolicyDecision):
3346 * WebProcess/WebPage/WebPage.h:
3347 * WebProcess/WebPage/WebPage.messages.in:
3349 2017-09-25 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
3351 [WinCairo] Share default value of font family preferences among non-cocoa builds
3352 https://bugs.webkit.org/show_bug.cgi?id=177479
3354 Reviewed by Yusuke Suzuki.
3356 * Shared/WebPreferencesDefinitions.h:
3358 2017-09-25 Frederik Riedel <riedel@apple.com>
3360 Expose way to set values of classified form controls as {Legacy WebKit, WebKit} SPI
3361 https://bugs.webkit.org/show_bug.cgi?id=174394
3362 <rdar://problem/33183504>
3364 Reviewed by Ryosuke Niwa.
3366 * Platform/spi/ios/UIKitSPI.h:
3367 * Shared/AssistedNodeInformation.cpp:
3368 (WebKit::AssistedNodeInformation::encode const):
3369 Encodes additional node information, including if the node is part of a login screen.
3370 (WebKit::AssistedNodeInformation::decode):
3371 Decodes the additional assisted node information.
3372 * Shared/AssistedNodeInformation.h:
3373 * UIProcess/WebPageProxy.h:
3374 * UIProcess/ios/WKContentView.mm:
3375 (-[WKContentView acceptsAutofilledLoginCredentials]):
3376 Determines if the WKContentView shows a login screen.
3377 (-[WKContentView representingPageUrl]):
3378 Returns the URL of the currently displayed web page.
3379 * UIProcess/ios/WKContentViewInteraction.mm:
3380 (-[WKContentView insertTextSuggestion:]):
3381 Inserts the login credentials into the Web View.
3382 * UIProcess/ios/WebPageProxyIOS.mm:
3383 (WebKit::WebPageProxy::startAssistingNode):
3384 Transfer the additional assistednode information (acceptsAutofilledLoginCredentials and representingPageUrl).
3385 (WebKit::WebPageProxy::acceptsAutofilledLoginCredentials):
3386 Returns if the Web View shows a login screen.
3387 (WebKit::WebPageProxy::representingPageUrl):
3388 Returns the Web View's URL.
3389 (WebKit::WebPageProxy::autofillLoginCredentials):
3390 Insert the credentials into the Web View.
3391 * WebProcess/WebPage/WebPage.h:
3392 * WebProcess/WebPage/WebPage.messages.in:
3393 * WebProcess/WebPage/ios/WebPageIOS.mm:
3394 (WebKit::WebPage::getAssistedNodeInformation): Transports the information if the currently
3395 highlighted node accepts autofilled login credentials.
3396 (WebKit::WebPage::autofillLoginCredentials): Fills the login credentials into the
3399 2017-09-25 Youenn Fablet <youenn@apple.com>
3401 WebRTC video does not resume receiving when switching back to Safari 11 on iOS
3402 https://bugs.webkit.org/show_bug.cgi?id=175472
3403 <rdar://problem/33860863>
3405 Reviewed by Darin Adler.
3407 Notifying LibWebRTC of backgrounding/foregrouding.
3409 * WebProcess/WebPage/ios/WebPageIOS.mm:
3410 (WebKit::WebPage::applicationDidEnterBackground):
3411 (WebKit::WebPage::applicationWillEnterForeground):
3413 2017-09-25 Sam Weinig <sam@webkit.org>
3415 Remove unused EditorClient functions
3416 https://bugs.webkit.org/show_bug.cgi?id=177463
3418 Reviewed by Alex Christensen.
3420 Remove unused EditorClient functions.
3422 * WebProcess/WebCoreSupport/WebEditorClient.h:
3423 * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
3424 (WebKit::WebEditorClient::canonicalizeURL): Deleted.
3425 (WebKit::WebEditorClient::canonicalizeURLString): Deleted.
3426 (WebKit::WebEditorClient::writeDataToPasteboard): Deleted.
3427 (WebKit::WebEditorClient::supportedPasteboardTypesForCurrentSelection): Deleted.
3428 (WebKit::WebEditorClient::readDataFromPasteboard): Deleted.
3429 (WebKit::WebEditorClient::pasteboardChangeCount): Deleted.
3430 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3431 (WebKit::WebEditorClient::canonicalizeURL): Deleted.
3432 (WebKit::WebEditorClient::canonicalizeURLString): Deleted.
3434 2017-09-25 Alex Christensen <achristensen@webkit.org>
3436 Make Attribute an enum class
3437 https://bugs.webkit.org/show_bug.cgi?id=177414
3439 Reviewed by Yusuke Suzuki.
3441 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3442 (WebKit::JSNPObject::getOwnPropertySlot):
3444 2017-09-25 Alex Christensen <achristensen@webkit.org>
3446 Stop using PolicyCallback
3447 https://bugs.webkit.org/show_bug.cgi?id=176088
3449 Reviewed by Andy Estes.
3451 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3452 * WebProcess/WebPage/WebFrame.cpp:
3453 (WebKit::WebFrame::invalidatePolicyListener):
3454 * WebProcess/WebPage/WebFrame.h:
3455 * WebProcess/WebPage/WebInspector.cpp:
3457 2017-09-25 Chris Dumez <cdumez@apple.com>
3459 [WK2] Add API to query if a download was user-initiated
3460 https://bugs.webkit.org/show_bug.cgi?id=177435
3461 <rdar://problem/34498422>
3463 Reviewed by Alex Christensen.
3465 Add C and Cocoa private API to query if a download was user-initiated.
3467 For clarity, we now construct navigation object for subframe loads
3468 as well (we used to do so only for main frame loads). This allows us
3469 to store the user-intiated flag and the redirect chain on the navigation
3470 object instead of the WebFrameProxy.
3472 * UIProcess/API/APINavigation.cpp:
3473 (API::Navigation::Navigation):
3474 (API::Navigation::appendRedirectionURL):
3475 * UIProcess/API/APINavigation.h:
3476 (API::Navigation::takeRedirectChain):
3477 (API::Navigation::setWasUserInitiated):
3478 (API::Navigation::wasUserInitiated const):
3479 * UIProcess/API/C/WKDownload.cpp:
3480 (WKDownloadGetWasUserInitiated):