1 2017-12-21 Keith Rollin <krollin@apple.com>
3 Add optional logging of per-resource cookie information
4 https://bugs.webkit.org/show_bug.cgi?id=180883
5 <rdar://problem/35802295>
7 Reviewed by Brent Fulgham.
9 In order to support the tracking of the efficacy of Intelligent
10 Tracking Protection, add some logging of the cookie information
11 associated with each loaded resource. This logging is off by default
12 and is enabled with `defaults write -g WebKitLogCookieInformation
15 * NetworkProcess/NetworkProcess.cpp:
16 (WebKit::NetworkProcess::initializeNetworkProcess):
17 * NetworkProcess/NetworkProcess.h:
18 (WebKit::NetworkProcess::shouldLogCookieInformation const):
19 * NetworkProcess/NetworkProcessCreationParameters.cpp:
20 (WebKit::NetworkProcessCreationParameters::encode const):
21 (WebKit::NetworkProcessCreationParameters::decode):
22 * NetworkProcess/NetworkProcessCreationParameters.h:
23 * NetworkProcess/NetworkResourceLoader.cpp:
24 (WebKit::NetworkResourceLoader::didFinishLoading):
25 (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
26 (WebKit::NetworkResourceLoader::shouldLogCookieInformation const):
27 (WebKit::NetworkResourceLoader::logCookieInformation const):
28 * NetworkProcess/NetworkResourceLoader.h:
29 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
30 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
32 2017-12-21 Brent Fulgham <bfulgham@apple.com>
34 Unreviewed Debug build fix after r226217
36 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
38 2017-12-21 Jeremy Jones <jeremyj@apple.com>
40 Element fullscreen interface should display the location
41 https://bugs.webkit.org/show_bug.cgi?id=181006
42 rdar://problem/36143176
44 Reviewed by Simon Fraser.
46 Show a short user visible location string with a lock if secure and green when trusted.
48 Includes other interface cleanup and tweaks.
50 * UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
51 (-[_WKFullScreenViewController viewWillTransitionToSize:withTransitionCoordinator:]):
52 (-[_WKFullScreenViewController visualEffectViewWithFrame:]):
54 (-[_WKFullScreenViewController _updateLayoutMargins]):
55 (-[_WKFullScreenViewController viewDidLayoutSubviews]):
56 (-[_WKFullScreenViewController setLocation:secure:trustedName:trustedSite:]):
57 (-[_WKFullScreenViewController createSubviews]):
58 (-[_WKFullScreenViewController loadView]):
59 (-[_WKFullScreenViewController viewDidAppear:]):
60 (-[_WKFullScreenViewController hideCancelButton]):
61 (-[_WKFullScreenViewController showCancelButton:]):
62 (-[_WKFullscreenRootViewController setShowsStatusBar:]):
63 (-[_WKFullscreenRootViewController prefersStatusBarHidden]):
64 (-[WKFullScreenWindowController _invalidateEVOrganizationName]):
65 (-[WKFullScreenWindowController isSecure]):
66 (-[WKFullScreenWindowController _serverTrust]):
67 (-[WKFullScreenWindowController _EVOrganizationName]):
68 (-[WKFullScreenWindowController updateLocationInfo]):
69 (-[WKFullScreenWindowController enterFullScreen]):
70 (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
71 (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
72 (-[_WKFullScreenViewController prefersStatusBarHidden]): Deleted.
73 * WebKit.xcassets/Done.imageset/Contents.json: Removed.
74 * WebKit.xcassets/LockMini.imageset/Contents.json: Added.
75 * WebKit.xcassets/LockMini.imageset/NavigationBarLockMini@2x.pdf: Copied from Source/WebKit/WebKit.xcassets/Done.imageset/Done.pdf.
76 * WebKit.xcassets/LockMini.imageset/NavigationBarLockMini@3x.pdf: Renamed from Source/WebKit/WebKit.xcassets/Done.imageset/Done.pdf.
78 2017-12-21 Jeremy Jones <jeremyj@apple.com>
80 Enable picture-in-picture from inline element on suspend.
81 https://bugs.webkit.org/show_bug.cgi?id=180942
82 rdar://problem/34745234
84 Reviewed by Jer Noble.
86 Add support for video fullscreen standby and imporved fullscreen state transition process.
88 Video fullscreen standby allows a video element to have its fullscreen interface state created and
89 continuously updated so that it can quickly change presentation state on application state.
91 In order to accomplish this, this change allows the fullscreen presentation to decide when it needs
92 an updated inline rect, or the presence of the video layer.
94 This is conditionalized until mac supports this model.
96 * UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
97 * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
98 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
99 (WebKit::VideoFullscreenModelContext::requestUpdateInlineRect):
100 (WebKit::VideoFullscreenModelContext::requestVideoContentLayer):
101 (WebKit::VideoFullscreenModelContext::returnVideoContentLayer):
102 (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
103 (WebKit::VideoFullscreenManagerProxy::setInlineRect):
104 (WebKit::VideoFullscreenManagerProxy::setHasVideoContentLayer):
105 (WebKit::VideoFullscreenManagerProxy::requestUpdateInlineRect):
106 (WebKit::VideoFullscreenManagerProxy::requestVideoContentLayer):
107 (WebKit::VideoFullscreenManagerProxy::returnVideoContentLayer):
108 * WebProcess/FullScreen/WebFullScreenManager.cpp:
109 (WebKit::WebFullScreenManager::didEnterFullScreen):
110 (WebKit::WebFullScreenManager::willExitFullScreen):
111 * WebProcess/FullScreen/WebFullScreenManager.h:
112 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
113 (WebKit::WebChromeClient::supportsVideoFullscreenStandby):
114 (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement):
115 * WebProcess/WebCoreSupport/WebChromeClient.h:
116 * WebProcess/cocoa/VideoFullscreenManager.h:
117 (WebKit::VideoFullscreenInterfaceContext::fullscreenStandby const):
118 (WebKit::VideoFullscreenInterfaceContext::setFullscreenStandby):
119 * WebProcess/cocoa/VideoFullscreenManager.messages.in:
120 * WebProcess/cocoa/VideoFullscreenManager.mm:
121 (WebKit::VideoFullscreenManager::supportsVideoFullscreenStandby const):
122 (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
123 (WebKit::VideoFullscreenManager::requestUpdateInlineRect):
124 (WebKit::VideoFullscreenManager::requestVideoContentLayer):
125 (WebKit::VideoFullscreenManager::returnVideoContentLayer):
126 (WebKit::VideoFullscreenManager::didSetupFullscreen):
127 (WebKit::VideoFullscreenManager::didExitFullscreen):
128 (WebKit::VideoFullscreenManager::didCleanupFullscreen):
130 2017-12-20 Eric Carlson <eric.carlson@apple.com>
132 [MediaStream] Add screen capture IDL and stub functions
133 https://bugs.webkit.org/show_bug.cgi?id=181070
134 <rdar://problem/35555184>
136 Reviewed by Youenn Fablet.
138 * Shared/WebPreferences.yaml:
139 * UIProcess/API/Cocoa/WKPreferences.mm:
140 (-[WKPreferences _screenCaptureEnabled]):
141 (-[WKPreferences _setScreenCaptureEnabled:]):
142 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
143 * WebProcess/InjectedBundle/InjectedBundle.cpp:
144 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
146 2017-12-20 Youenn Fablet <youenn@apple.com>
148 Crash when clearing std::optional<WebKit::WebServiceWorkerFetchTaskClient::BlobLoader>
149 https://bugs.webkit.org/show_bug.cgi?id=181061
151 Reviewed by Alex Christensen.
153 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
154 (WebKit::WebServiceWorkerFetchTaskClient::didFinishBlobLoading): moving the object to not destroy 'this' too soon.
156 2017-12-20 Youenn Fablet <youenn@apple.com>
158 Support service worker interception of request with blob body
159 https://bugs.webkit.org/show_bug.cgi?id=181035
161 Reviewed by Chris Dumez.
163 In case of service worker, remove the connection check to get access to the blob registry.
164 Apply this for cloning blobs registered by another process.
166 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
167 (WebKit::NetworkBlobRegistry::registerBlobURL):
168 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
169 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
170 (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
171 * NetworkProcess/NetworkConnectionToWebProcess.h:
172 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
173 * WebProcess/FileAPI/BlobRegistryProxy.cpp:
174 (WebKit::BlobRegistryProxy::registerBlobURL):
176 2017-12-20 Daniel Bates <dabates@apple.com>
178 Remove Alternative Presentation Button
179 https://bugs.webkit.org/show_bug.cgi?id=180500
180 <rdar://problem/35891047>
182 Reviewed by Simon Fraser.
184 We no longer need the alternative presentation button.
186 * Configurations/FeatureDefines.xcconfig:
187 * UIProcess/API/APIUIClient.h:
188 (API::UIClient::didClickAlternativePresentationButton): Deleted.
189 * UIProcess/API/C/WKPageUIClient.h:
190 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
191 * UIProcess/Cocoa/UIDelegate.h:
192 * UIProcess/Cocoa/UIDelegate.mm:
193 (WebKit::UIDelegate::setDelegate):
194 (WebKit::UIDelegate::UIClient::didClickAlternativePresentationButton): Deleted.
195 * UIProcess/WebPageProxy.cpp:
196 (WebKit::WebPageProxy::handleAutoFillButtonClick):
197 (WebKit::WebPageProxy::handleAlternativePresentationButtonClick): Deleted.
198 * UIProcess/WebPageProxy.h:
199 * UIProcess/WebPageProxy.messages.in:
200 * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
201 (API::InjectedBundle::PageUIClient::didClickAutoFillButton):
202 (API::InjectedBundle::PageUIClient::didClickAlternativePresentationButton): Deleted.
203 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
204 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
205 (-[WKWebProcessPlugInFrame substituteElements:withAlternativePresentationButtonWithIdentifier:]): Deleted.
206 (-[WKWebProcessPlugInFrame removeAlternativePresentationButton:]): Deleted.
207 (-[WKWebProcessPlugInFrame elementsReplacedByAlternativePresentationButtonWithIdentifier:]): Deleted.
208 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
209 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
210 (WKBundleFrameFocus):
211 (WKBundleSubstituteWithAlternativePresentationButton): Deleted.
212 (WKBundleRemoveAlternativePresentationButton): Deleted.
213 (WKBundleElementsReplacedByAlternativePresentationButton): Deleted.
214 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
215 * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
216 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
217 (WebKit::InjectedBundlePageUIClient::didClickAlternativePresentationButton): Deleted.
218 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
219 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
220 (WebKit::WebChromeClient::handleAlternativePresentationButtonClick): Deleted.
221 * WebProcess/WebCoreSupport/WebChromeClient.h:
223 2017-12-20 Andy Estes <aestes@apple.com>
225 [Apple Pay] Tell PassKit whether Apple Pay JS or Payment Request was used to start an Apple Pay session
226 https://bugs.webkit.org/show_bug.cgi?id=181001
227 <rdar://problem/35479106>
229 Reviewed by Tim Horton.
231 * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
232 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::encode):
233 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode):
234 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
236 (WebKit::toPKPaymentRequest):
238 2017-12-20 Ms2ger <Ms2ger@igalia.com>
240 REGRESSION(r226160) Build broken when MEDIA_STREAM is disabled with MediaStreamRequest namespace confusion
241 https://bugs.webkit.org/show_bug.cgi?id=181026
243 Unreviewed build fix.
245 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
246 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
247 Remove UNUSED_PARAM macros that check for (undefined) members rather than params.
249 2017-12-19 Myles C. Maxfield <mmaxfield@apple.com>
251 Refactor user-installed font setting for clarity
252 https://bugs.webkit.org/show_bug.cgi?id=181013
254 Reviewed by Simon Fraser.
256 There are no clients of this SPI yet, so we can rename it to remove the
257 grammatical negative.
259 * Shared/WebPreferences.yaml:
260 * UIProcess/API/C/WKPreferences.cpp:
261 (WKPreferencesSetShouldAllowUserInstalledFonts):
262 (WKPreferencesGetShouldAllowUserInstalledFonts):
263 (WKPreferencesSetShouldDisallowUserInstalledFonts): Deleted.
264 (WKPreferencesGetShouldDisallowUserInstalledFonts): Deleted.
265 * UIProcess/API/C/WKPreferencesRefPrivate.h:
266 * UIProcess/API/Cocoa/WKPreferences.mm:
267 (-[WKPreferences _shouldAllowUserInstalledFonts]):
268 (-[WKPreferences _setShouldAllowUserInstalledFonts:]):
269 (-[WKPreferences _shouldDisallowUserInstalledFonts]): Deleted.
270 (-[WKPreferences _setShouldDisallowUserInstalledFonts:]): Deleted.
271 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
273 2017-12-19 Eric Carlson <eric.carlson@apple.com>
275 [MediaStream] Clean up RealtimeMediaSource interfaces
276 https://bugs.webkit.org/show_bug.cgi?id=180934
277 <rdar://problem/36108648>
279 Reviewed by Youenn Fablet.
281 * Shared/WebCoreArgumentCoders.h: Update CaptureDevice encoder.
283 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
284 (WebKit::UserMediaPermissionRequestManagerProxy::createPermissionRequest): Renamed from createRequest.
285 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Update for
287 (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Filter the
288 vector returned by getMediaStreamDevices.
289 (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Deleted.
290 * UIProcess/UserMediaPermissionRequestManagerProxy.h:
292 * UIProcess/UserMediaPermissionRequestProxy.cpp:
293 (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): Update for API change.
294 (WebKit::UserMediaPermissionRequestProxy::allow): Ditto.
295 * UIProcess/UserMediaPermissionRequestProxy.h:
296 (WebKit::UserMediaPermissionRequestProxy::create):
297 (WebKit::UserMediaPermissionRequestProxy::requestType const):
299 * UIProcess/WebPageProxy.cpp:
300 (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Ditto.
301 * UIProcess/WebPageProxy.h:
302 * UIProcess/WebPageProxy.messages.in:
304 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
305 (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): m_blockedRequests -> m_blockedUserMediaRequests.
306 (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest): Ditto.
307 (WebKit::UserMediaPermissionRequestManager::mediaCanStart): Ditto.
308 (WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps): Ditto.
309 * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
311 2017-12-19 Jer Noble <jer.noble@apple.com>
313 Playing media elements which call "pause(); play()" will have the play promise rejected.
314 https://bugs.webkit.org/show_bug.cgi?id=180781
315 <rdar://problem/33191377>
317 Reviewed by Eric Carlson.
319 shouldRequireUserGestureToLoadVideo() should default to false on Mac.
321 * UIProcess/API/Cocoa/WKWebView.mm:
322 (shouldRequireUserGestureToLoadVideo):
324 2017-12-19 Chris Dumez <cdumez@apple.com>
326 Handle Fetch should wait for the service worker's state to become activated
327 https://bugs.webkit.org/show_bug.cgi?id=180959
329 Reviewed by Youenn Fablet.
331 Handle Fetch should wait for the service worker's state to become activated when
332 it is currently activating.
335 - https://w3c.github.io/ServiceWorker/#on-fetch-request-algorithm (Step 16)
337 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
338 (WebKit::WebSWServerConnection::startFetch):
340 2017-12-19 Youenn Fablet <youenn@apple.com>
342 Service Worker should not clean HTTP headers added by the application or by fetch specification before service worker interception
343 https://bugs.webkit.org/show_bug.cgi?id=180939
345 Reviewed by Chris Dumez.
347 Passing referrer as an explicit parameter of StartFetch.
349 Cleaning request headers based on ResourceLoaderOptions.httpHeadersToKeep.
351 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
352 (WebKit::WebSWServerConnection::startFetch):
353 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
354 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
355 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
356 (WebKit::ServiceWorkerClientFetch::start):
357 * WebProcess/Storage/WebSWClientConnection.cpp:
358 (WebKit::WebSWClientConnection::startFetch):
359 * WebProcess/Storage/WebSWClientConnection.h:
360 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
361 (WebKit::WebSWContextManagerConnection::startFetch):
362 * WebProcess/Storage/WebSWContextManagerConnection.h:
363 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
365 2017-12-19 Andy Estes <aestes@apple.com>
367 [Apple Pay] Stop maintaining a list of payment networks
368 https://bugs.webkit.org/show_bug.cgi?id=180965
369 <rdar://problem/34696560>
371 Reviewed by Tim Horton.
373 * Shared/WebPageCreationParameters.cpp:
374 (WebKit::WebPageCreationParameters::encode const):
375 (WebKit::WebPageCreationParameters::decode):
376 * Shared/WebPageCreationParameters.h: Defined availablePaymentNetworks.
377 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
378 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
379 (WebKit::toSupportedNetworks):
380 (WebKit::WebPaymentCoordinatorProxy::availablePaymentNetworks): Called
381 +[PKPaymentRequest availableNetworks].
382 (WebKit::toSupportedNetwork): Deleted.
383 * UIProcess/WebPageProxy.cpp:
384 (WebKit::WebPageProxy::creationParameters): Set parameters.availablePaymentNetworks by
385 calling WebPaymentCoordinatorProxy::availablePaymentNetworks.
386 * WebProcess/WebPage/WebPage.cpp:
387 (WebKit::WebPage::WebPage): Set pageConfiguration.availablePaymentNetworks to
388 parameters.availablePaymentNetworks.
390 2017-12-18 Brady Eidson <beidson@apple.com>
392 Add ability to API test Service Workers via a custom protocol.
393 https://bugs.webkit.org/show_bug.cgi?id=180911
395 Reviewed by Chris Dumez.
397 This adds a set of "Service Workers can handle this" schemes to the scheme registry
398 and most of these WebKit changes are to support getting those values out to all processes.
400 Additionally, WebsiteDataRecords used to be file/http(s)-only. That seems bizarre and definitely
401 got in the way of testing. So I also added a way to allow any scheme to result in a valid record.
403 * Shared/ChildProcess.cpp:
404 (WebKit::ChildProcess::registerURLSchemeServiceWorkersCanHandle const):
405 * Shared/ChildProcess.h:
406 * Shared/ChildProcess.messages.in:
408 * Shared/Storage/StorageProcessCreationParameters.cpp:
409 (WebKit::StorageProcessCreationParameters::encode const):
410 (WebKit::StorageProcessCreationParameters::decode):
411 * Shared/Storage/StorageProcessCreationParameters.h:
413 * Shared/WebProcessCreationParameters.cpp:
414 (WebKit::WebProcessCreationParameters::encode const):
415 (WebKit::WebProcessCreationParameters::decode):
416 * Shared/WebProcessCreationParameters.h:
418 * StorageProcess/StorageProcess.cpp:
419 (WebKit::StorageProcess::initializeWebsiteDataStore):
421 * UIProcess/API/Cocoa/WKProcessPool.mm:
422 (-[WKProcessPool _registerURLSchemeServiceWorkersCanHandle:]):
423 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
425 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
426 (+[WKWebsiteDataStore _allowWebsiteDataRecordsForAllOrigins]):
427 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
429 * UIProcess/WebProcessPool.cpp:
430 (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
431 (WebKit::WebProcessPool::initializeNewWebProcess):
432 (WebKit::WebProcessPool::registerURLSchemeServiceWorkersCanHandle):
433 * UIProcess/WebProcessPool.h:
435 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
436 (WebKit::WebsiteDataStore::allowWebsiteDataRecordsForAllOrigins):
437 (WebKit::WebsiteDataStore::fetchDataAndApply):
438 * UIProcess/WebsiteData/WebsiteDataStore.h:
440 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
441 (WebKit::WebServiceWorkerProvider::handleFetch):
443 * WebProcess/WebProcess.cpp:
444 (WebKit::WebProcess::initializeWebProcess):
446 2017-12-18 Brady Eidson <beidson@apple.com>
448 Apps that use both WK1 and WK2 can crash creating a WKWebsiteDataStore.
449 https://bugs.webkit.org/show_bug.cgi?id=180953
451 Reviewed by Chris Dumez.
453 * UIProcess/WebsiteData/WebsiteDataStore.cpp: Make an isMainThread() asset be an isUIThread() assert.
455 2017-12-18 Brent Fulgham <bfulgham@apple.com>
457 [macOS, iOS] Add new mach lookup port for CoreMedia remote control
458 https://bugs.webkit.org/show_bug.cgi?id=180938
459 <rdar://problem/35447664>
461 Reviewed by Eric Carlson.
463 Update the app sandbox to support a new XPC endpoint for CoreMedia. This endpoint exposes
464 existing functions through a new, more-focused interface. This will (hopefully) allow us
465 to remove the more generic endpoints in a future update.
467 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
468 * WebProcess/com.apple.WebProcess.sb.in:
470 2017-12-18 Megan Gardner <megan_gardner@apple.com>
472 Support Autoscrolling in contenteditable for WK2
473 https://bugs.webkit.org/show_bug.cgi?id=180789
475 Reviewed by Simon Frasier and Wenson Hsieh.
477 Implements the UIKit protocol for autoscrolling and alerts the Web Process to start
478 (or stop) an autoscroll to the specified position. Allows for scrolling in contenteditable
481 * Platform/spi/ios/UIKitSPI.h:
482 * UIProcess/WebPageProxy.h:
483 * UIProcess/ios/WKContentViewInteraction.h:
484 * UIProcess/ios/WKContentViewInteraction.mm:
485 (-[WKContentView startAutoscroll:]):
486 (-[WKContentView cancelAutoscroll]):
487 (-[WKContentView scrollSelectionToVisible:]):
488 * UIProcess/ios/WebPageProxyIOS.mm:
489 (WebKit::WebPageProxy::startAutoscrollAtPosition):
490 (WebKit::WebPageProxy::cancelAutoscroll):
491 * WebProcess/WebPage/WebPage.h:
492 * WebProcess/WebPage/WebPage.messages.in:
493 * WebProcess/WebPage/ios/WebPageIOS.mm:
494 (WebKit::WebPage::startAutoscrollAtPosition):
495 (WebKit::WebPage::cancelAutoscroll):
497 2017-12-18 Youenn Fablet <youenn@apple.com>
499 Add support for response blob given to fetch events
500 https://bugs.webkit.org/show_bug.cgi?id=180894
502 Reviewed by Darin Adler.
504 In case of blob data, read it from Service Worker process and send it to WebProcess.
505 At some point, web process should be able to read it directly from NetworkProcess.
507 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
508 (WebKit::WebSWContextManagerConnection::startFetch):
509 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
510 (WebKit::WebServiceWorkerFetchTaskClient::WebServiceWorkerFetchTaskClient):
511 (WebKit::WebServiceWorkerFetchTaskClient::didReceiveFormData):
512 (WebKit::WebServiceWorkerFetchTaskClient::didReceiveBlobChunk):
513 (WebKit::WebServiceWorkerFetchTaskClient::didFinishBlobLoading):
514 (WebKit::WebServiceWorkerFetchTaskClient::didFinish):
515 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:
517 2017-12-18 Daniel Bates <dabates@apple.com>
519 Add SPI to query for the current and last auto fill button type and pass user data object to _webView:focusShouldStartInputSession:
520 https://bugs.webkit.org/show_bug.cgi?id=180774
521 <rdar://problem/36033832>
523 Reviewed by Tim Horton.
525 Have WKFocusedElementInfo own the optional user data object associated with the focused
526 element as opposed to having WKFormInputSession own it. This allows the Injected Bundle's
527 _webView:focusShouldStartInputSession: delegate callback to make use of this user data
528 to determine whether focus should start a new input session.
530 * UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
531 * UIProcess/ios/WKContentViewInteraction.mm:
532 (-[WKFormInputSession initWithContentView:focusedElementInfo:]):
533 (-[WKFormInputSession userObject]):
534 (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
535 (-[WKFocusedElementInfo userObject]):
536 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
537 (-[WKFormInputSession initWithContentView:focusedElementInfo:userObject:]): Deleted.
538 (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:]): Deleted.
539 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
540 (toWKAutoFillButtonType):
541 (-[WKWebProcessPlugInNodeHandle htmlInputElementAutoFillButtonType]):
542 (-[WKWebProcessPlugInNodeHandle htmlInputElementLastAutoFillButtonType]):
543 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:
544 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
545 (toWKAutoFillButtonType):
546 (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonType):
547 (WKBundleNodeHandleGetHTMLInputElementLastAutoFillButtonType):
548 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
549 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
550 (WebKit::InjectedBundleNodeHandle::htmlInputElementAutoFillButtonType const):
551 (WebKit::InjectedBundleNodeHandle::htmlInputElementLastAutoFillButtonType const):
552 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
554 2017-12-18 Carlos Garcia Campos <cgarcia@igalia.com>
556 [GTK][WPE] Add WebKitWebView::web-process-terminated signal and deprecate web-process-crashed
557 https://bugs.webkit.org/show_bug.cgi?id=180862
559 Reviewed by Michael Catanzaro.
561 Once the memory pressure web process monitor is enabled in bug #180861 the web process can be killed due to
562 memory limits. We need to expose the reason of the web process termination to allow applications handle the
565 * UIProcess/API/glib/WebKitNavigationClient.cpp:
566 * UIProcess/API/glib/WebKitWebView.cpp:
567 (webkit_web_view_class_init):
568 (webkitWebViewWebProcessTerminated):
569 (webkitWebViewWebProcessCrashed): Deleted.
570 * UIProcess/API/glib/WebKitWebViewPrivate.h:
571 * UIProcess/API/gtk/WebKitWebView.h:
572 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
573 * UIProcess/API/wpe/WebKitWebView.h:
575 2017-12-18 Carlos Garcia Campos <cgarcia@igalia.com>
577 [GTK][WPE] Enable WebProcess memory monitor
578 https://bugs.webkit.org/show_bug.cgi?id=180861
580 Reviewed by Michael Catanzaro.
582 For some reason this is only enabled in mac. We want to enable it also in GTK and WPE ports. This runs every 30
583 seconds to release memory or even kill the process if necessary. Carlos López has realized that in some
584 applications using video tags, the memory grows a lot and it's never released. It seems it's not memory leaked,
585 but simply large memory allocations (I guess it's gst allocating video frames) that make the heap grow. The
586 memory pressure calls malloc_trim that releases all that memory keeping the web process footprint stable.
588 * WebProcess/WebProcess.cpp:
589 (WebKit::WebProcess::initializeWebProcess):
591 2017-12-17 John Wilander <wilander@apple.com>
593 Storage Access API: Make document.hasStorageAccess() retrieve current status from the network process
594 https://bugs.webkit.org/show_bug.cgi?id=180681
595 <rdar://problem/35982161>
597 Reviewed by Alex Christensen.
599 This change makes an asynchronous request to the network process
600 to see if storage access has been granted for this frame, on this
601 page, for this domain.
603 * NetworkProcess/NetworkProcess.cpp:
604 (WebKit::NetworkProcess::hasStorageAccessForPrevalentDomains):
605 (WebKit::NetworkProcess::updateStorageAccessForPrevalentDomains):
606 * NetworkProcess/NetworkProcess.h:
607 * NetworkProcess/NetworkProcess.messages.in:
608 * UIProcess/Network/NetworkProcessProxy.cpp:
609 (WebKit::NetworkProcessProxy::hasStorageAccessForPrevalentDomains):
610 * UIProcess/Network/NetworkProcessProxy.h:
611 * UIProcess/WebPageProxy.cpp:
612 (WebKit::WebPageProxy::hasStorageAccess):
613 * UIProcess/WebPageProxy.h:
614 * UIProcess/WebPageProxy.messages.in:
615 * UIProcess/WebResourceLoadStatisticsStore.cpp:
616 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
617 (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
618 * UIProcess/WebResourceLoadStatisticsStore.h:
619 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
620 (WebKit::WebsiteDataStore::hasStorageAccessForPrevalentDomainsHandler):
621 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
622 (WebKit::WebsiteDataStore::hasStorageAccess):
623 * UIProcess/WebsiteData/WebsiteDataStore.h:
624 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
625 (WebKit::WebChromeClient::hasStorageAccess):
626 * WebProcess/WebCoreSupport/WebChromeClient.h:
627 * WebProcess/WebPage/WebPage.cpp:
628 (WebKit::WebPage::hasStorageAccess):
629 * WebProcess/WebPage/WebPage.h:
631 2017-12-16 Dan Bernstein <mitz@apple.com>
633 WKWebView has no equivalent of -[WebView setAlwaysShowVerticalScroller:]
634 https://bugs.webkit.org/show_bug.cgi?id=180613
635 <rdar://problem/35946124>
637 Reviewed by Geoff Garen.
639 Added _alwaysShowsHorizontalScroller and _alwaysShowsVerticalScroller properties to
642 * Shared/WebPageCreationParameters.cpp:
643 (WebKit::WebPageCreationParameters::encode const): Encode new alwaysShowsHorizontalScroller
644 and alwaysShowsVerticalScroller parameters.
645 (WebKit::WebPageCreationParameters::decode): Decode new parameters.
647 * Shared/WebPageCreationParameters.h: Added new alwaysShowsHorizontalScroller and
648 alwaysShowsVerticalScroller boolean parameters.
650 * UIProcess/API/Cocoa/WKWebView.mm:
651 (-[WKWebView _alwaysShowsHorizontalScroller]): New accessor that calls through to the
653 (-[WKWebView _setAlwaysShowsHorizontalScroller:]): Ditto.
654 (-[WKWebView _alwaysShowsVerticalScroller]): Ditto.
655 (-[WKWebView _setAlwaysShowsVerticalScroller:]): Ditto.
657 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declare new properties.
659 * UIProcess/WebPageProxy.cpp:
660 (WebKit::WebPageProxy::setAlwaysShowsHorizontalScroller): Update member variable and send
661 a message to the page.
662 (WebKit::WebPageProxy::setAlwaysShowsVerticalScroller): Ditto.
663 (WebKit::WebPageProxy::creationParameters): Initialize new parameters from the new member
666 * UIProcess/WebPageProxy.h:
667 (WebKit::WebPageProxy::alwaysShowsHorizontalScroller const): New getter.
668 (WebKit::WebPageProxy::alwaysShowsVerticalScroller const): Ditto.
670 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
671 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Factor
672 alwaysShowsHorizontalScroller and alwaysShowsVerticalScroller into the initial scroller
673 modes and scroller locks when creating the FrameView.
675 * WebProcess/WebPage/WebPage.cpp:
676 (WebKit::WebPage::WebPage): Initialize new m_alwaysShowsHorizontalScroller and
677 m_alwaysShowsVerticalScroller member variables from the corresponding new creation
679 (WebKit::WebPage::setAlwaysShowsHorizontalScroller): Update the member variable and set
680 new scrollbar mode on the frame view if needed.
681 (WebKit::WebPage::setAlwaysShowsVerticalScroller): Ditto.
683 * WebProcess/WebPage/WebPage.h:
684 (WebKit::WebPage::alwaysShowsHorizontalScroller const): New getter.
685 (WebKit::WebPage::alwaysShowsVerticalScroller const): Ditto.
687 * WebProcess/WebPage/WebPage.messages.in: Added new messages.
689 2017-12-16 Brady Eidson <beidson@apple.com>
691 Implement getting ServiceWorker registrations for the WKWebsiteDataStore API
692 https://bugs.webkit.org/show_bug.cgi?id=180886
694 Reviewed by Chris Dumez.
696 * StorageProcess/StorageProcess.cpp:
697 (WebKit::StorageProcess::fetchWebsiteData):
699 2017-12-16 Brent Fulgham <bfulgham@apple.com>
701 Plugin processes are repeatedly spun up to do nothing
702 https://bugs.webkit.org/show_bug.cgi?id=180885
703 <rdar://problem/36082564>
705 Reviewed by Geoffrey Garen.
707 Tested by TestWebKitAPI.
709 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
710 (WebKit::WebsiteDataStore::removeData): Don't ask plugins to remove data when no websites are
711 passed to the function.
713 2017-12-15 Chris Dumez <cdumez@apple.com>
715 Support updating a service worker registration's updateViaCache flag
716 https://bugs.webkit.org/show_bug.cgi?id=180888
718 Reviewed by Brady Eidson.
720 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
721 (WebKit::WebSWServerConnection::setRegistrationUpdateViaCache):
722 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
723 * WebProcess/Storage/WebSWClientConnection.messages.in:
725 2017-12-15 Alex Christensen <achristensen@webkit.org>
727 Introduce SPI _WKWebsitePolicies.websiteDataStore
728 https://bugs.webkit.org/show_bug.cgi?id=180880
729 <rdar://problem/35535328>
731 Reviewed by Andy Estes.
733 The SPI doesn't do anything yet, but it already has some restrictions and tests!
734 WKWebView._updateWebsitePolicies can't be used to update a WKWebsiteDataStore. Only during navigation.
735 Even during navigation, we are only supporting the default and ephemeral data stores right now.
736 This functionality won't be supported in the C API. This is enforced with RELEASE_ASSERTs.
737 If we change our minds, we can change them and add restrictions similar to the ObjC restrictions.
739 * Shared/WebsitePoliciesData.cpp:
740 (WebKit::WebsitePoliciesData::encode const):
741 (WebKit::WebsitePoliciesData::decode):
742 * Shared/WebsitePoliciesData.h:
743 * UIProcess/API/APIWebsitePolicies.cpp:
744 (API::WebsitePolicies::WebsitePolicies):
745 (API::WebsitePolicies::setWebsiteDataStore):
746 (API::WebsitePolicies::data):
747 * UIProcess/API/APIWebsitePolicies.h:
748 * UIProcess/API/C/WKFramePolicyListener.cpp:
749 (WKFramePolicyListenerUseWithPolicies):
750 * UIProcess/API/C/WKPage.cpp:
751 (WKPageUpdateWebsitePolicies):
752 * UIProcess/API/Cocoa/WKWebView.mm:
753 (-[WKWebView _updateWebsitePolicies:]):
754 * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
755 * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
756 (-[_WKWebsitePolicies websiteDataStore]):
757 (-[_WKWebsitePolicies setWebsiteDataStore:]):
758 * UIProcess/Cocoa/NavigationState.mm:
759 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
761 2017-12-15 Alex Christensen <achristensen@webkit.org>
765 * UIProcess/API/glib/WebKitPolicyDecision.cpp:
766 (webkit_policy_decision_use):
768 2017-12-15 Brent Fulgham <bfulgham@apple.com>
770 Avoid waking plugin process up unnecessarily
771 https://bugs.webkit.org/show_bug.cgi?id=180819
772 <rdar://problem/36051548>
774 Reviewed by Geoffrey Garen.
776 WebKit purges data from origins marked as prevalent on an hourly interval. This includes waking up plugins
777 and removing relevant data stored in those plugins. This causes multiple plugin processes to be spawned,
778 even though the user is not interacting with any plugins.
780 Instead, we should delay removing data from plugins until they are loaded due to the user interacting with
781 a website using a plugin.
783 Make the following changes:
784 1. When looking for plugin data related to prevalent sites, only examine plugin data if the relevant plugin
786 2. When the state of the active plugins changes, trigger a data removal check.
788 * Shared/WebsiteData/WebsiteDataFetchOption.h: Add a new option 'DoNotCreateProcesses'
789 * UIProcess/Plugins/PluginProcessManager.cpp:
790 (WebKit::PluginProcessManager::getPluginProcessConnection): Pass new argument 'Launch', since we always
791 want to launch processes in this case.
792 (WebKit::PluginProcessManager::fetchWebsiteData): Pass a new parameter 'processAccessType' so that the
793 caller can specify if they only want to examine already-active plugins, or if they want to spawn new
794 processes. Call the completion handler if we need to exit early when no process exists.
795 (WebKit::PluginProcessManager::deleteWebsiteData): Always launch new processes.
796 (WebKit::PluginProcessManager::deleteWebsiteDataForHostNames): Ditto.
797 (WebKit::PluginProcessManager::getOrCreatePluginProcess): Accept new parameter indicating if new processes
798 shoudl be launched. Also switch to C++ style loops.
799 * UIProcess/Plugins/PluginProcessManager.h:
800 * UIProcess/WebProcessProxy.cpp:
801 (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores): Use the
802 new 'DoNotCreatePrcesses' access type.
803 * UIProcess/WebResourceLoadStatisticsStore.cpp:
804 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords): Update the active plugin count when we
806 (WebKit::WebResourceLoadStatisticsStore::shouldRemoveDataRecords const): Return true if the active plugin
807 process count changed since the last time data was removed.
808 * UIProcess/WebResourceLoadStatisticsStore.h:
809 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
810 (WebKit::WebsiteDataStore::fetchDataAndApply): Check fetch option for new 'DoNotCreateProcesses' flag,
811 and tell the PluginProcessManager which mode we are using.
813 2017-12-15 Brady Eidson <beidson@apple.com>
815 Make sure only WebsiteDataStores with valid SessionIDs register themselves.
816 https://bugs.webkit.org/show_bug.cgi?id=180869
818 Reviewed by Chris Dumez.
820 Some code in WebsiteDataStore assumes an invalid SessionID is a possibility,
821 but we didn't account for that in the map added in r225935.
823 Seems prudent to make sure we're not doing hash table operations with invalid keys.
825 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
826 (WebKit::WebsiteDataStore::WebsiteDataStore):
827 (WebKit::WebsiteDataStore::~WebsiteDataStore):
828 (WebKit::WebsiteDataStore::maybeRegisterWithSessionIDMap):
829 (WebKit::WebsiteDataStore::existingNonDefaultDataStoreForSessionID):
830 * UIProcess/WebsiteData/WebsiteDataStore.h:
832 2017-12-14 Simon Fraser <simon.fraser@apple.com>
834 Rotating when zoomed in with fingers down can result in a broken tab
835 https://bugs.webkit.org/show_bug.cgi?id=180859
836 rdar://problem/34532817
838 Reviewed by Tim Horton.
840 If you zoom in fully, then, with two fingers down, rotate the iPhone and rotate back,
841 then the tab can get into a broken state where the WKContentView has a non-zero position
842 which may push it entirely off-screen. The tab never recovers.
844 This is caused by a bug in UIKit (rdar://problem/36065495) so work around it by always
845 re-setting the position of the content view after zooming. We initialize contentView.frame
846 from self.bounds, so setting the position (via "center") to the bounds origin should always be safe.
848 * UIProcess/API/Cocoa/WKWebView.mm:
849 (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
851 2017-12-15 Brady Eidson <beidson@apple.com>
853 API test WebKit.WebsiteDataStoreCustomPaths is failing
854 https://bugs.webkit.org/show_bug.cgi?id=180870
856 Reviewed by Chris Dumez.
858 To avoid unintentionally creating the default WebsiteDataStore we need to pass around the
859 relevant SessionID to more places.
861 * UIProcess/ServiceWorkerProcessProxy.cpp:
862 (WebKit::ServiceWorkerProcessProxy::start):
863 * UIProcess/ServiceWorkerProcessProxy.h:
865 * UIProcess/WebProcessPool.cpp:
866 (WebKit::WebProcessPool::getStorageProcessConnection):
867 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
868 * UIProcess/WebProcessPool.h:
870 * UIProcess/WebProcessProxy.cpp:
871 (WebKit::WebProcessProxy::getStorageProcessConnection):
872 * UIProcess/WebProcessProxy.h:
873 * UIProcess/WebProcessProxy.messages.in:
875 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
876 (WebKit::WebIDBConnectionToServer::messageSenderConnection):
878 * WebProcess/Databases/WebDatabaseProvider.cpp:
879 (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
881 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
882 (WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession):
883 (WebKit::WebServiceWorkerProvider::handleFetch):
885 * WebProcess/WebProcess.cpp:
886 (WebKit::WebProcess::ensureWebToStorageProcessConnection):
887 (WebKit::WebProcess::establishWorkerContextConnectionToStorageProcess):
888 * WebProcess/WebProcess.h:
889 * WebProcess/WebProcess.messages.in:
891 2017-12-15 Alex Christensen <achristensen@webkit.org>
893 Move WebKit::WebsitePolicies to API::WebsitePolicies
894 https://bugs.webkit.org/show_bug.cgi?id=180873
896 Reviewed by Joseph Pecoraro.
898 It's just an API data object now. I need it to be in the API namespace so we can
899 give it references to other API namespace objects without weird layering violations.
902 * Shared/WebsiteAutoplayPolicy.h: Added.
903 * Shared/WebsiteAutoplayQuirk.h: Added.
904 * Shared/WebsitePoliciesData.cpp:
905 (WebKit::WebsitePoliciesData::fromWebsitePolicies): Deleted.
906 * Shared/WebsitePoliciesData.h:
907 * UIProcess/API/APIWebsitePolicies.cpp: Added.
908 (API::WebsitePolicies::~WebsitePolicies):
909 (API::WebsitePolicies::data):
910 * UIProcess/API/APIWebsitePolicies.h: Copied from Source/WebKit/UIProcess/WebsitePolicies.h.
911 * UIProcess/API/C/WKAPICast.h:
912 * UIProcess/API/C/WKFramePolicyListener.cpp:
913 (WKFramePolicyListenerUseWithPolicies):
914 * UIProcess/API/C/WKPage.cpp:
915 (WKPageUpdateWebsitePolicies):
916 * UIProcess/API/C/WKWebsitePolicies.cpp:
917 (WKWebsitePoliciesGetTypeID):
918 (WKWebsitePoliciesCreate):
919 * UIProcess/API/Cocoa/WKWebView.mm:
920 (-[WKWebView _updateWebsitePolicies:]):
921 * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
922 * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
923 (-[_WKWebsitePolicies dealloc]):
924 (-[_WKWebsitePolicies init]):
925 * UIProcess/API/Cocoa/_WKWebsitePoliciesInternal.h:
926 (WebKit::wrapper): Deleted.
927 * UIProcess/Cocoa/NavigationState.mm:
928 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
929 * UIProcess/WebFormSubmissionListenerProxy.cpp:
930 * UIProcess/WebsitePolicies.h: Removed.
931 * WebKit.xcodeproj/project.pbxproj:
932 * WebProcess/WebPage/WebPage.cpp:
934 2017-12-14 Zan Dobersek <zdobersek@igalia.com>
936 Unreviewed GTK+ build fix after r225954.
938 * UIProcess/API/glib/WebKitPolicyDecision.cpp:
939 Explicitly include the WebsitePoliciesData.h header, avoiding build
940 failures due to incomplete WebsitePoliciesData type.
942 2017-12-14 David Kilzer <ddkilzer@apple.com>
944 Enable -Wstrict-prototypes for WebKit
945 <https://webkit.org/b/180757>
946 <rdar://problem/36024132>
948 Rubber-stamped by Joseph Pecoraro.
950 * Configurations/Base.xcconfig:
951 (CLANG_WARN_STRICT_PROTOTYPES): Add. Set to YES.
952 * Platform/spi/ios/UIKitSPI.h:
953 (_UIDragInteractionDefaultLiftDelay): Add 'void' to C function declaration.
954 (UIKeyboardEnabledInputModesAllowOneToManyShortcuts): Ditto.
956 2017-12-14 Alex Christensen <achristensen@webkit.org>
958 Serialize WebsitePoliciesData instead of WebsitePolicies
959 https://bugs.webkit.org/show_bug.cgi?id=180847
961 Reviewed by Joseph Pecoraro.
963 No change in behavior. This will allow me to add things to WebsitePolicies that have
964 a different form when serialized to another process.
966 Also, remove API::WebsitePolicies because the wrapper isn't necessary.
967 WebsitePolicies is now the API type that only exists in the UIProcess.
969 * Shared/WebsitePolicies.cpp: Removed.
970 * Shared/WebsitePolicies.h:
971 (WebKit::WebsitePolicies::contentBlockersEnabled const): Deleted.
972 (WebKit::WebsitePolicies::setContentBlockersEnabled): Deleted.
973 (WebKit::WebsitePolicies::allowedAutoplayQuirks const): Deleted.
974 (WebKit::WebsitePolicies::setAllowedAutoplayQuirks): Deleted.
975 (WebKit::WebsitePolicies::autoplayPolicy const): Deleted.
976 (WebKit::WebsitePolicies::setAutoplayPolicy): Deleted.
977 (WebKit::WebsitePolicies::customHeaderFields): Deleted.
978 (WebKit::WebsitePolicies::takeCustomHeaderFields): Deleted.
979 (WebKit::WebsitePolicies::setCustomHeaderFields): Deleted.
980 * Shared/WebsitePoliciesData.cpp: Copied from Source/WebKit/Shared/WebsitePolicies.cpp.
981 (WebKit::WebsitePoliciesData::fromWebsitePolicies):
982 (WebKit::WebsitePoliciesData::encode const):
983 (WebKit::WebsitePoliciesData::decode):
984 (WebKit::WebsitePoliciesData::applyToDocumentLoader):
985 (WebKit::WebsitePolicies::WebsitePolicies): Deleted.
986 (WebKit::WebsitePolicies::encode const): Deleted.
987 (WebKit::WebsitePolicies::decode): Deleted.
988 (WebKit::WebsitePolicies::applyToDocumentLoader): Deleted.
989 * Shared/WebsitePoliciesData.h: Added.
990 * UIProcess/API/APINavigationClient.h:
991 (API::NavigationClient::decidePolicyForNavigationAction):
992 (API::NavigationClient::decidePolicyForNavigationResponse):
993 * UIProcess/API/APIPolicyClient.h:
994 (API::PolicyClient::decidePolicyForNavigationAction):
995 (API::PolicyClient::decidePolicyForNewWindowAction):
996 (API::PolicyClient::decidePolicyForResponse):
997 * UIProcess/API/APIWebsitePolicies.cpp: Removed.
998 * UIProcess/API/APIWebsitePolicies.h: Removed.
999 * UIProcess/API/C/WKAPICast.h:
1000 * UIProcess/API/C/WKFramePolicyListener.cpp:
1001 (WKFramePolicyListenerUse):
1002 (WKFramePolicyListenerUseWithPolicies):
1003 * UIProcess/API/C/WKPage.cpp:
1004 (WKPageUpdateWebsitePolicies):
1005 (WKPageSetPagePolicyClient):
1006 (WKPageSetPageNavigationClient):
1007 * UIProcess/API/C/WKWebsitePolicies.cpp:
1008 (WKWebsitePoliciesGetTypeID):
1009 (WKWebsitePoliciesCreate):
1010 * UIProcess/API/Cocoa/WKWebView.mm:
1011 (-[WKWebView _updateWebsitePolicies:]):
1012 * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
1013 (-[_WKWebsitePolicies dealloc]):
1014 (-[_WKWebsitePolicies init]):
1015 * UIProcess/API/Cocoa/_WKWebsitePoliciesInternal.h:
1017 * UIProcess/Cocoa/NavigationState.mm:
1018 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1019 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
1020 * UIProcess/WebFrameListenerProxy.cpp:
1021 (WebKit::WebFrameListenerProxy::receivedPolicyDecision):
1022 * UIProcess/WebFrameListenerProxy.h:
1023 * UIProcess/WebFramePolicyListenerProxy.cpp:
1024 (WebKit::WebFramePolicyListenerProxy::use):
1025 (WebKit::WebFramePolicyListenerProxy::download):
1026 (WebKit::WebFramePolicyListenerProxy::ignore):
1027 * UIProcess/WebFramePolicyListenerProxy.h:
1028 * UIProcess/WebFrameProxy.cpp:
1029 (WebKit::WebFrameProxy::receivedPolicyDecision):
1030 * UIProcess/WebFrameProxy.h:
1031 * UIProcess/WebPageProxy.cpp:
1032 (WebKit::WebPageProxy::receivedPolicyDecision):
1033 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1034 (WebKit::WebPageProxy::updateWebsitePolicies):
1035 * UIProcess/WebPageProxy.h:
1036 * UIProcess/WebPageProxy.messages.in:
1037 * WebKit.xcodeproj/project.pbxproj:
1038 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1039 (WebKit::WebFrameLoaderClient::applyToDocumentLoader):
1040 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1041 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1042 * WebProcess/WebPage/WebFrame.cpp:
1043 (WebKit::WebFrame::didReceivePolicyDecision):
1044 * WebProcess/WebPage/WebFrame.h:
1045 * WebProcess/WebPage/WebPage.cpp:
1046 (WebKit::WebPage::didReceivePolicyDecision):
1047 (WebKit::WebPage::updateWebsitePolicies):
1048 * WebProcess/WebPage/WebPage.h:
1049 * WebProcess/WebPage/WebPage.messages.in:
1051 2017-12-14 Ryan Haddad <ryanhaddad@apple.com>
1053 Unreviewed, rolling out r225931.
1055 Breaks internal builds.
1059 "Fix Mac CMake build"
1060 https://bugs.webkit.org/show_bug.cgi?id=180835
1061 https://trac.webkit.org/changeset/225931
1063 2017-12-14 Chris Dumez <cdumez@apple.com>
1065 Clearing WebSite data on iOS does not clear the Fetch Cache
1066 https://bugs.webkit.org/show_bug.cgi?id=180846
1067 <rdar://problem/36060129>
1069 Reviewed by Youenn Fablet.
1071 When clearing WebSite data, construct the engine for the given sessionID
1072 if missing, instead of not clearing anything when the engine is missing.
1074 * NetworkProcess/NetworkProcess.cpp:
1075 (WebKit::NetworkProcess::deleteWebsiteData):
1076 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
1078 2017-12-14 Chris Dumez <cdumez@apple.com>
1080 self.importScripts() should obey updateViaCache inside service workers
1081 https://bugs.webkit.org/show_bug.cgi?id=180826
1083 Reviewed by Youenn Fablet.
1085 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1086 (WebKit::WebSWServerConnection::setRegistrationLastUpdateTime):
1087 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1088 * WebProcess/Storage/WebSWClientConnection.messages.in:
1090 2017-12-14 Yusuke Suzuki <utatane.tea@gmail.com>
1092 Drop Thread::tryCreate
1093 https://bugs.webkit.org/show_bug.cgi?id=180808
1095 Reviewed by Darin Adler.
1097 We still return bool since IconDatabase::open returns `false` if it is opened twice.
1099 * UIProcess/API/glib/IconDatabase.cpp:
1100 (WebKit::IconDatabase::open):
1101 * UIProcess/API/glib/IconDatabase.h:
1103 2017-12-14 Brady Eidson <beidson@apple.com>
1105 REGRESSION (r225789): API tests WKProcessPool.InitialWarmedProcessUsed and WebKit.WebsiteDataStoreCustomPaths are failing.
1106 https://bugs.webkit.org/show_bug.cgi?id=180722
1108 Reviewed by Chris Dumez.
1110 - Add a test-only accessor to get the number of WebProcesses hosting WebPages
1111 - Have WebsiteDataStore keep track of all instances so they can be looked up by SessionID
1112 - When the StorageProcess needs to establish a SW context connection on behalf of a specific SessionID,
1113 the UI process will now prefer using the WebsiteDataStore associated with that SessionID. This allows
1114 us to continue deferring creation of the default data store if it's not needed.
1116 * StorageProcess/StorageProcess.cpp:
1117 (WebKit::StorageProcess::connectionToContextProcessWasClosed):
1118 (WebKit::StorageProcess::createServerToContextConnection):
1119 * StorageProcess/StorageProcess.h:
1121 * StorageProcess/StorageToWebProcessConnection.cpp:
1122 (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
1124 * UIProcess/API/Cocoa/WKProcessPool.mm:
1125 (-[WKProcessPool _webPageContentProcessCount]):
1126 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1128 * UIProcess/Storage/StorageProcessProxy.cpp:
1129 (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcess):
1130 (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcessForExplicitSession):
1131 * UIProcess/Storage/StorageProcessProxy.h:
1132 * UIProcess/Storage/StorageProcessProxy.messages.in:
1134 * UIProcess/WebProcessPool.cpp:
1135 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
1136 * UIProcess/WebProcessPool.h:
1138 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1139 (WebKit::WebsiteDataStore::WebsiteDataStore):
1140 (WebKit::WebsiteDataStore::~WebsiteDataStore):
1141 (WebKit::WebsiteDataStore::existingDataStoreForSessionID):
1142 * UIProcess/WebsiteData/WebsiteDataStore.h:
1144 2017-12-14 John Wilander <wilander@apple.com>
1146 Storage Access API: Implement frame-specific access in the document.cookie layer
1147 https://bugs.webkit.org/show_bug.cgi?id=180682
1148 <rdar://problem/35982257>
1150 Reviewed by Alex Christensen.
1152 CookiesStrategy::cookiesForDOM(), CookiesStrategy::setCookiesFromDOM(),
1153 CookiesStrategy::cookieRequestHeaderFieldValue(), and
1154 CookiesStrategy::getRawCookies() now take optional parameters for
1155 frameID and pageID to allow frame-specific scoping of cookies.
1157 This change makes the return values of FrameLoaderClient::frameID()
1158 and FrameLoaderClient::pageID() std::optional<uint64_t> so that
1159 WebCore can call those getters and get the right return values in
1160 WebKit and std:nullopt in WebKitLegacy.
1162 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1163 (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
1164 (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
1165 (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
1166 (WebKit::NetworkConnectionToWebProcess::getRawCookies):
1167 * NetworkProcess/NetworkConnectionToWebProcess.h:
1168 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1169 * Shared/mac/CookieStorageShim.mm:
1170 (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
1171 * WebProcess/Network/WebLoaderStrategy.cpp:
1172 (WebKit::WebLoaderStrategy::scheduleLoad):
1173 Now handles the fact that FrameLoaderClient::frameID() and
1174 FrameLoaderClient::pageID() return an optional.
1175 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1176 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1177 (WebKit::WebFrameLoaderClient::pageID const):
1178 (WebKit::WebFrameLoaderClient::frameID const):
1179 Now return an optional.
1180 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1181 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1182 (WebKit::WebPlatformStrategies::cookiesForDOM):
1183 (WebKit::WebPlatformStrategies::setCookiesFromDOM):
1184 (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
1185 (WebKit::WebPlatformStrategies::getRawCookies):
1186 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1188 2017-12-14 Alex Christensen <achristensen@webkit.org>
1191 https://bugs.webkit.org/show_bug.cgi?id=180835
1193 Reviewed by Andy Estes.
1195 * PlatformMac.cmake:
1196 * Shared/WebsiteDataStoreParameters.cpp:
1197 (WebKit::WebsiteDataStoreParameters::ephemeralParametersWithSessionID):
1198 * Shared/WebsiteDataStoreParameters.h:
1199 * UIProcess/API/APIAttachment.h:
1200 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1201 (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
1202 * WebProcess/WebPage/WebPage.cpp:
1203 (WebKit::WebPage::setSessionID):
1205 2017-12-14 Alex Christensen <achristensen@webkit.org>
1207 Use move semantics for SandboxExtension::Handle
1208 https://bugs.webkit.org/show_bug.cgi?id=180792
1210 Reviewed by Andy Estes.
1212 Passing them around as const SandboxExtension::Handle& is wrong because ownership is transferred and they are consumed.
1213 It only works now because their contents are mutable, which isn't a good use of mutable.
1215 * NetworkProcess/Downloads/Download.cpp:
1216 (WebKit::Download::decideDestinationWithSuggestedFilename):
1217 (WebKit::Download::didDecideDownloadDestination):
1218 * NetworkProcess/Downloads/Download.h:
1219 * NetworkProcess/Downloads/DownloadManager.cpp:
1220 (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
1221 (WebKit::DownloadManager::resumeDownload):
1222 * NetworkProcess/Downloads/DownloadManager.h:
1223 * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
1224 (WebKit::Download::resume):
1225 * NetworkProcess/Downloads/ios/DownloadIOS.mm:
1226 (WebKit::Download::resume):
1227 * NetworkProcess/Downloads/mac/DownloadMac.mm:
1228 (WebKit::Download::resume):
1229 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1230 (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
1231 (WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob):
1232 * NetworkProcess/NetworkConnectionToWebProcess.h:
1233 * NetworkProcess/NetworkDataTask.h:
1234 (WebKit::NetworkDataTask::setPendingDownloadLocation):
1235 * NetworkProcess/NetworkDataTaskBlob.cpp:
1236 (WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
1237 * NetworkProcess/NetworkDataTaskBlob.h:
1238 * NetworkProcess/NetworkProcess.cpp:
1239 (WebKit::NetworkProcess::resumeDownload):
1240 (WebKit::NetworkProcess::continueDecidePendingDownloadDestination):
1241 * NetworkProcess/NetworkProcess.h:
1242 * NetworkProcess/NetworkResourceLoadParameters.cpp:
1243 (WebKit::NetworkResourceLoadParameters::decode):
1244 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1245 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1246 (WebKit::NetworkDataTaskCocoa::setPendingDownloadLocation):
1247 * Shared/SandboxExtension.h:
1248 (WebKit::SandboxExtension::create):
1249 * Shared/WebMemorySampler.cpp:
1250 (WebKit::WebMemorySampler::start):
1251 (WebKit::WebMemorySampler::initializeSandboxedLogFile):
1252 * Shared/WebMemorySampler.h:
1253 * Shared/mac/SandboxExtensionMac.mm:
1254 (WebKit::SandboxExtension::create):
1255 * StorageProcess/StorageProcess.cpp:
1256 (WebKit::StorageProcess::grantSandboxExtensionsForBlobs):
1257 * StorageProcess/StorageProcess.h:
1258 * UIProcess/Cocoa/WebViewImpl.mm:
1259 (WebKit::WebViewImpl::performDragOperation):
1260 * UIProcess/WebPageProxy.cpp:
1261 (WebKit::WebPageProxy::dragEntered):
1262 (WebKit::WebPageProxy::dragUpdated):
1263 (WebKit::WebPageProxy::dragExited):
1264 (WebKit::WebPageProxy::performDragOperation):
1265 (WebKit::WebPageProxy::performDragControllerAction):
1266 * UIProcess/WebPageProxy.h:
1267 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1268 (WebKit::InjectedBundle::create):
1269 * WebProcess/InjectedBundle/InjectedBundle.h:
1270 * WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp:
1271 (WebKit::MediaDeviceSandboxExtensions::operator[]):
1272 (WebKit::MediaDeviceSandboxExtensions::operator[] const): Deleted.
1273 * WebProcess/MediaStream/MediaDeviceSandboxExtensions.h:
1274 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1275 (WebKit::UserMediaPermissionRequestManager::grantUserMediaDeviceSandboxExtensions):
1276 * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
1277 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1278 (WebKit::WebPlatformStrategies::getPathnamesForType):
1279 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1280 (WebKit::WebBackForwardListProxy::goToItem):
1281 * WebProcess/WebPage/WebPage.cpp:
1282 (WebKit::WebPage::loadRequest):
1283 (WebKit::WebPage::reload):
1284 (WebKit::WebPage::performDragControllerAction):
1285 (WebKit::WebPage::grantUserMediaDeviceSandboxExtensions):
1286 (WebKit::WebPage::SandboxExtensionTracker::beginLoad):
1287 * WebProcess/WebPage/WebPage.h:
1288 * WebProcess/WebProcess.cpp:
1289 (WebKit::WebProcess::startMemorySampler):
1290 * WebProcess/WebProcess.h:
1292 2017-12-14 Alex Christensen <achristensen@webkit.org>
1294 Make WebsitePolicies a proper class with getters and setters
1295 https://bugs.webkit.org/show_bug.cgi?id=180788
1297 Reviewed by Andy Estes.
1299 Also introduce WebsitePolicies::applyToDocumentLoader to reduce duplicate code.
1300 This has a side-effect of now applying custom http header fields and content blocking enabled status
1301 when updating WebsitePolicies. This will result in these being applied when a user updates
1302 the per-site settings, and they weren't before.
1305 * Shared/WebsitePolicies.cpp: Added.
1306 (WebKit::WebsitePolicies::WebsitePolicies):
1307 (WebKit::WebsitePolicies::encode const):
1308 (WebKit::WebsitePolicies::decode):
1309 (WebKit::WebsitePolicies::applyToDocumentLoader):
1310 * Shared/WebsitePolicies.h:
1311 (WebKit::WebsitePolicies::contentBlockersEnabled const):
1312 (WebKit::WebsitePolicies::setContentBlockersEnabled):
1313 (WebKit::WebsitePolicies::allowedAutoplayQuirks const):
1314 (WebKit::WebsitePolicies::setAllowedAutoplayQuirks):
1315 (WebKit::WebsitePolicies::autoplayPolicy const):
1316 (WebKit::WebsitePolicies::setAutoplayPolicy):
1317 (WebKit::WebsitePolicies::customHeaderFields):
1318 (WebKit::WebsitePolicies::takeCustomHeaderFields):
1319 (WebKit::WebsitePolicies::setCustomHeaderFields):
1320 (WebKit::WebsitePolicies::encode const): Deleted.
1321 (WebKit::WebsitePolicies::decode): Deleted.
1322 * UIProcess/API/APIWebsitePolicies.h:
1323 * WebKit.xcodeproj/project.pbxproj:
1324 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1325 (WebKit::WebFrameLoaderClient::applyToDocumentLoader):
1326 * WebProcess/WebPage/WebPage.cpp:
1327 (WebKit::WebPage::updateWebsitePolicies):
1328 * WebProcess/WebPage/WebPage.h:
1330 2017-12-14 Chris Dumez <cdumez@apple.com>
1332 Enable Service Workers on iOS
1333 https://bugs.webkit.org/show_bug.cgi?id=180836
1335 Reviewed by Alex Christensen.
1337 * Shared/WebPreferencesDefaultValues.h:
1338 * UIProcess/WebProcessPool.cpp:
1339 Enable Service Workers on iOS.
1341 (WebKit::WebProcessPool::ensureNetworkProcess):
1342 Fall back to defaultCacheStorageDirectory() instead of the empty string
1343 for the cache storage directory, when we do not have a store.
1345 2017-12-14 Chris Dumez <cdumez@apple.com>
1347 Service worker script fetching currently always uses the network cache
1348 https://bugs.webkit.org/show_bug.cgi?id=180816
1350 Reviewed by Alex Christensen.
1352 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1353 (WebKit::WebSWServerConnection::startScriptFetchInClient):
1354 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1355 * WebProcess/Storage/WebSWClientConnection.messages.in:
1357 2017-12-14 Chris Dumez <cdumez@apple.com>
1359 StorageProcess::deleteWebsiteData() should ensure there is a SWServer for the given sessionID
1360 https://bugs.webkit.org/show_bug.cgi?id=180784
1362 Reviewed by Youenn Fablet.
1364 StorageProcess::deleteWebsiteData() should ensure there is a SWServer for the given sessionID
1365 instead of not clearing anything when no such SWServer exists.
1367 This will be useful on iOS once <rdar://problem/36034667> is fully fixed.
1369 * StorageProcess/StorageProcess.cpp:
1370 (WebKit::StorageProcess::deleteWebsiteData):
1371 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
1372 * UIProcess/API/APIProcessPoolConfiguration.cpp:
1373 (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
1375 2017-12-14 Chris Dumez <cdumez@apple.com>
1377 WebsiteDataStore::defaultDataStoreConfiguration() fails to set default value for serviceWorkerRegistrationDirectory
1378 https://bugs.webkit.org/show_bug.cgi?id=180794
1379 <rdar://problem/36034667>
1381 Reviewed by Youenn Fablet.
1383 Set the default IndexedDB and ServiceWorker database paths in WebsiteDataStore::defaultDataStoreConfiguration().
1384 Without this, the client is forced to set the expected path.
1386 * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
1387 (API::WebsiteDataStore::defaultDataStoreConfiguration):
1388 * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
1389 (API::WebsiteDataStore::defaultDataStoreConfiguration):
1391 2017-12-14 Joseph Pecoraro <pecoraro@apple.com>
1393 Web Inspector: Cmd-Option-R in docked inspector causes the inspector to reload instead of the inspected page
1394 https://bugs.webkit.org/show_bug.cgi?id=180775
1395 <rdar://problem/35964592>
1397 Reviewed by Brian Burg.
1399 * WebKit.xcodeproj/project.pbxproj:
1400 Remove old files add new files.
1402 * PlatformMac.cmake:
1403 * UIProcess/mac/WKWebInspectorWKWebView.h: Removed.
1404 * UIProcess/mac/WKWebInspectorWKWebView.mm: Removed.
1405 Remove unused WKWebInspectorWKWebView.
1407 * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:
1408 * UIProcess/mac/WKInspectorViewController.mm:
1409 (-[WKInspectorViewController dealloc]):
1410 (-[WKInspectorViewController webView]):
1411 (-[WKInspectorViewController inspectorWKWebViewReload:]):
1412 (-[WKInspectorViewController inspectorWKWebViewReloadFromOrigin:]):
1413 Handle WKWebView IBActions sent to the inspector frontend WKWebView.
1415 * UIProcess/mac/WKInspectorWKWebView.h:
1416 * UIProcess/mac/WKInspectorWKWebView.mm:
1417 (-[WKInspectorWKWebView tag]):
1418 (-[WKInspectorWKWebView inspectorWKWebViewDelegate]):
1419 (-[WKInspectorWKWebView setInspectorWKWebViewDelegate:]):
1420 (-[WKInspectorWKWebView reload:]):
1421 (-[WKInspectorWKWebView reloadFromOrigin:]):
1422 Move WKInspectorWKWebView into its own file. Include a delegate
1423 to handle reload IBActions that will want to override.
1425 2017-12-13 Chris Dumez <cdumez@apple.com>
1427 Fix copy/paste error in ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration()
1428 https://bugs.webkit.org/show_bug.cgi?id=180782
1430 Reviewed by Youenn Fablet.
1432 * UIProcess/API/APIProcessPoolConfiguration.cpp:
1433 (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
1435 2017-12-13 Daniel Bates <dabates@apple.com>
1437 Add more auto fill button types
1438 https://bugs.webkit.org/show_bug.cgi?id=180651
1439 <rdar://problem/35891125>
1441 <rdar://problem/35977943>
1443 Reviewed by Brent Fulgham.
1445 Adds enumerators for the new auto fill button types.
1447 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
1448 (toAutoFillButtonType):
1449 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:
1450 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1451 (toAutoFillButtonType):
1452 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1454 2017-12-13 Matt Lewis <jlewis3@apple.com>
1456 Unreviewed, rolling out r225864.
1458 This caused the Layout test step to crash out on Debug testers
1462 "REGRESSION (r225789): API tests
1463 WKProcessPool.InitialWarmedProcessUsed and
1464 WebKit.WebsiteDataStoreCustomPaths are failing."
1465 https://bugs.webkit.org/show_bug.cgi?id=180722
1466 https://trac.webkit.org/changeset/225864
1468 2017-12-13 Brady Eidson <beidson@apple.com>
1470 REGRESSION (r225789): API tests WKProcessPool.InitialWarmedProcessUsed and WebKit.WebsiteDataStoreCustomPaths are failing.
1471 https://bugs.webkit.org/show_bug.cgi?id=180722
1473 Reviewed by Chris Dumez.
1475 - Add a test-only accessor to get the number of WebProcesses hosting WebPages
1476 - Have WebsiteDataStore keep track of all instances so they can be looked up by SessionID
1477 - When the StorageProcess needs to establish a SW context connection on behalf of a specific SessionID,
1478 the UI process will now prefer using the WebsiteDataStore associated with that SessionID. This allows
1479 us to continue deferring creation of the default data store if it's not needed.
1481 * StorageProcess/StorageProcess.cpp:
1482 (WebKit::StorageProcess::connectionToContextProcessWasClosed):
1483 (WebKit::StorageProcess::createServerToContextConnection):
1484 * StorageProcess/StorageProcess.h:
1486 * StorageProcess/StorageToWebProcessConnection.cpp:
1487 (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
1489 * UIProcess/API/Cocoa/WKProcessPool.mm:
1490 (-[WKProcessPool _webPageContentProcessCount]):
1491 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1493 * UIProcess/Storage/StorageProcessProxy.cpp:
1494 (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcess):
1495 (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcessForExplicitSession):
1496 * UIProcess/Storage/StorageProcessProxy.h:
1497 * UIProcess/Storage/StorageProcessProxy.messages.in:
1499 * UIProcess/WebProcessPool.cpp:
1500 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
1501 * UIProcess/WebProcessPool.h:
1503 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1504 (WebKit::WebsiteDataStore::WebsiteDataStore):
1505 (WebKit::WebsiteDataStore::~WebsiteDataStore):
1506 (WebKit::WebsiteDataStore::existingDataStoreForSessionID):
1507 * UIProcess/WebsiteData/WebsiteDataStore.h:
1509 2017-12-13 Per Arne Vollan <pvollan@apple.com>
1511 REGRESSION(225597): Can't select a text box or web view on a page when VO is on.
1512 https://bugs.webkit.org/show_bug.cgi?id=180756
1513 <rdar://problem/35996158>
1515 Reviewed by Brent Fulgham.
1517 * Platform/IPC/mac/ConnectionMac.mm:
1518 (IPC::AccessibilityProcessSuspendedNotification):
1519 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1520 (WebKit::shouldLeakBoost):
1521 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
1522 * WebProcess/WebProcess.cpp:
1523 (WebKit::WebProcess::initializeProcess):
1525 2017-12-13 Brent Fulgham <bfulgham@apple.com>
1527 [iOS] Further Trim WebContent Process sandbox
1528 https://bugs.webkit.org/show_bug.cgi?id=180727
1529 <rdar://problem/18899506>
1531 Reviewed by Eric Carlson.
1533 Take another pass over the contents of the file and remove addition items that
1534 don't have call sites in WebKit.
1536 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1538 2017-12-13 Daniel Bates <dabates@apple.com>
1540 Move out-parameter in API::FormClient::willBeginInputSession() to the end of the parameter list
1541 https://bugs.webkit.org/show_bug.cgi?id=180754
1543 Reviewed by Wenson Hsieh.
1545 Group all in-parameters in the signature of API::FormClient::willBeginInputSession() at
1546 the front of the parameter list instead of interspersing in- and out- parameters.
1548 No functionality changed. So, no new tests.
1550 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1551 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
1552 * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
1553 (API::InjectedBundle::FormClient::willBeginInputSession):
1554 * WebProcess/WebPage/WebPage.cpp:
1555 (WebKit::WebPage::elementDidFocus):
1557 2017-12-13 Chris Dumez <cdumez@apple.com>
1559 [iOS] Take process assertion to prevent the service worker process from getting suspended
1560 https://bugs.webkit.org/show_bug.cgi?id=180735
1562 Reviewed by Brady Eidson.
1564 Take process assertion to prevent the service worker process from getting suspended while
1565 it is still needed. We use the same policy as for the network process, meaning that
1566 unsuspended WebContent processes prevent the service worker process from getting suspended.
1568 This patch still does not enable service workers on iOS. The demo at https://mdn.github.io/sw-test/
1569 appears to work. However, things are not working as expected for mobile.twitter.com where I
1570 see the fetches intercepted by the service worker fail when offline for some reason (unrelated
1571 to process suspension).
1573 * UIProcess/WebProcessPool.cpp:
1574 (WebKit::m_foregroundWebProcessCounter):
1575 (WebKit::m_backgroundWebProcessCounter):
1576 (WebKit::WebProcessPool::ensureNetworkProcess):
1577 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
1578 (WebKit::WebProcessPool::disconnectProcess):
1579 (WebKit::WebProcessPool::updateProcessAssertions):
1580 (WebKit::WebProcessPool::reinstateNetworkProcessAssertionState):
1581 * UIProcess/WebProcessPool.h:
1582 * UIProcess/WebProcessProxy.cpp:
1583 (WebKit::WebProcessProxy::didSetAssertionState):
1584 * UIProcess/WebProcessProxy.h:
1586 2017-12-13 Carlos Garcia Campos <cgarcia@igalia.com>
1588 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.3 release.
1590 * gtk/NEWS: Add release notes for 2.19.3.
1592 2017-12-12 Daniel Bates <dabates@apple.com>
1594 [WK] Add modern WebKit SPI to set auto fill button type and query if the auto fill button is enabled
1595 https://bugs.webkit.org/show_bug.cgi?id=180686
1597 Reviewed by Alex Christensen.
1599 * WebKit.xcodeproj/project.pbxproj:
1600 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
1601 (-[WKWebProcessPlugInNodeHandle isHTMLInputElementAutoFillButtonEnabled]):
1602 (toAutoFillButtonType):
1603 (-[WKWebProcessPlugInNodeHandle setHTMLInputElementAutoFillButtonEnabledWithButtonType:]):
1604 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h:
1605 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:
1607 2017-12-12 John Wilander <wilander@apple.com>
1609 Storage Access API: Implement frame-specific access in the network storage session layer
1610 https://bugs.webkit.org/show_bug.cgi?id=180679
1611 <rdar://problem/35982116>
1613 Reviewed by Alex Christensen.
1615 This changes adds frameID and pageID to what is communicated for
1616 storage access and also stored in the network process' table of
1617 partitioning exceptions.
1619 * NetworkProcess/NetworkDataTask.cpp:
1620 (WebKit::NetworkDataTask::create):
1621 Now stores frameID and pageID for the task for easy retrieval
1623 * NetworkProcess/NetworkProcess.cpp:
1624 (WebKit::NetworkProcess::updateStorageAccessForPrevalentDomains):
1625 * NetworkProcess/NetworkProcess.h:
1626 * NetworkProcess/NetworkProcess.messages.in:
1627 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1628 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1629 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
1630 (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
1631 These two methods now submit frameID and pageID to the
1632 partitioning query call.
1633 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1634 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1635 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
1636 These two methods now submit frameID and pageID to the
1637 partitioning query call.
1638 * UIProcess/Network/NetworkProcessProxy.cpp:
1639 (WebKit::NetworkProcessProxy::updateStorageAccessForPrevalentDomains):
1640 * UIProcess/Network/NetworkProcessProxy.h:
1641 * UIProcess/WebPageProxy.cpp:
1642 (WebKit::WebPageProxy::requestStorageAccess):
1643 * UIProcess/WebPageProxy.h:
1644 * UIProcess/WebPageProxy.messages.in:
1645 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1646 (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
1647 * UIProcess/WebResourceLoadStatisticsStore.h:
1648 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1649 (WebKit::WebsiteDataStore::updateStorageAccessForPrevalentDomainsHandler):
1650 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
1651 (WebKit::WebsiteDataStore::requestStorageAccess):
1652 * UIProcess/WebsiteData/WebsiteDataStore.h:
1653 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1654 (WebKit::WebChromeClient::requestStorageAccess):
1655 * WebProcess/WebCoreSupport/WebChromeClient.h:
1656 * WebProcess/WebPage/WebPage.cpp:
1657 (WebKit::WebPage::requestStorageAccess):
1658 * WebProcess/WebPage/WebPage.h:
1660 2017-12-12 Alex Christensen <achristensen@webkit.org>
1662 Modernize WebsiteDataStoreParameters and SandboxExtension::Handle decoding
1663 https://bugs.webkit.org/show_bug.cgi?id=180621
1665 Reviewed by Youenn Fablet.
1667 * NetworkProcess/NetworkProcessCreationParameters.cpp:
1668 (WebKit::NetworkProcessCreationParameters::decode):
1669 * NetworkProcess/NetworkResourceLoadParameters.cpp:
1670 (WebKit::NetworkResourceLoadParameters::decode):
1671 * Shared/LoadParameters.cpp:
1672 (WebKit::LoadParameters::decode):
1673 * Shared/SandboxExtension.h:
1675 (WebKit::SandboxExtension::Handle::decode): Deleted.
1676 * Shared/Storage/StorageProcessCreationParameters.cpp:
1677 (WebKit::StorageProcessCreationParameters::decode):
1678 * Shared/WebProcessCreationParameters.cpp:
1679 (WebKit::WebProcessCreationParameters::decode):
1680 * Shared/WebsiteDataStoreParameters.cpp:
1681 (WebKit::WebsiteDataStoreParameters::decode):
1682 * Shared/WebsiteDataStoreParameters.h:
1683 * Shared/mac/SandboxExtensionMac.mm:
1684 (WebKit::SandboxExtension::Handle::decode):
1685 (WebKit::SandboxExtension::HandleArray::HandleArray):
1686 (WebKit::SandboxExtension::HandleArray::encode const):
1687 (WebKit::SandboxExtension::HandleArray::decode):
1688 (WebKit::SandboxExtension::SandboxExtension):
1690 2017-12-12 John Wilander <wilander@apple.com>
1692 Dispatch resource load statistics telemetry on the main thread
1693 https://bugs.webkit.org/show_bug.cgi?id=180602
1694 <rdar://problem/35942205>
1696 Reviewed by Brent Fulgham.
1698 * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
1699 (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
1700 Now switches to the main thread for the telemetry submission
1701 through a webpage proxy. The reason is that the webpage we
1702 use may go away while we're still using it. This kind of
1703 telemetry isn't associated with a specific webpage but the
1704 infrastructure requires a webpage proxy.
1706 2017-12-12 Myles C. Maxfield <mmaxfield@apple.com>
1708 IPC code doesn't understand NSDictionaries with non-NSString keys
1709 https://bugs.webkit.org/show_bug.cgi?id=180307
1710 <rdar://problem/35812382>
1712 Reviewed by Alex Christensen.
1714 Variable fonts have a dictionary inside its descriptor which represents the values
1715 of all the axes of the variable font. Our IPC code wasn't expecting this.
1717 * Shared/mac/ArgumentCodersMac.mm:
1721 2017-12-12 Brent Fulgham <bfulgham@apple.com>
1723 Unreviewed build fix after r225763.
1725 Remove dangling close-parentheses character.
1727 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1729 2017-12-12 Zach Li <zachli@apple.com>
1731 [WK2] Expose image via WKBundleHitTestResult API.
1732 https://bugs.webkit.org/show_bug.cgi?id=180552.
1733 rdar://problem/23951521
1735 Reviewed by Simon Fraser.
1737 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
1738 (WKBundleHitTestResultGetImage):
1739 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
1741 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
1742 (WebKit::InjectedBundleHitTestResult::image const):
1743 Convert from WebCore::Image to WebImage by creating a WebImage
1744 and paint the WebCore::Image into its graphics context. For now,
1745 only handle bitmap images.
1746 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
1748 2017-12-12 Simon Fraser <simon.fraser@apple.com>
1750 Remove ColorSpaceDeviceRGB and most users of the obsolete deviceRGB colorspace
1751 https://bugs.webkit.org/show_bug.cgi?id=180689
1753 Reviewed by Tim Horton.
1755 Remove encoding of ColorSpaceDeviceRGB.
1757 * Shared/WebCoreArgumentCoders.h:
1759 2017-12-12 Brent Fulgham <bfulgham@apple.com>
1761 REGRESSION(r216941): Plugin Process can't access AppStore Plugin Service
1762 https://bugs.webkit.org/show_bug.cgi?id=180701
1763 <rdar://problem/35940948>
1765 Reviewed by Daniel Bates.
1767 The PluginProcess needs access to the AppStore Plugin XPC service.
1769 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1771 2017-12-12 Brady Eidson <beidson@apple.com>
1773 Make ServiceWorkers follow the DEFAULT_EXPERIMENTAL_FEATURES_ENABLED flag on Mac.
1774 <rdar://problem/35978311> and https://bugs.webkit.org/show_bug.cgi?id=180697
1776 Reviewed by Chris Dumez.
1778 * Shared/WebPreferences.yaml:
1779 * Shared/WebPreferencesDefaultValues.h:
1781 2017-12-12 Chris Dumez <cdumez@apple.com>
1783 Simplify IPC code between WebProcess and StorageProcess for serviceWorker.postMessage()
1784 https://bugs.webkit.org/show_bug.cgi?id=180683
1786 Reviewed by Brady Eidson.
1788 Merge the 2 code paths from calling postMessage() from a ServiceWorkerClient and from
1789 a ServiceWorker. Also, postMessage() now only IPCs an identifier from the WebContent
1790 process to the StorageProcess. The ServiceWorkerClientData is looked up on Storage
1791 process side from the identifier before being sent to the context process.
1793 * Scripts/webkit/messages.py:
1794 (forward_declarations_and_headers):
1796 * Shared/WebCoreArgumentCoders.cpp:
1797 (IPC::ArgumentCoder<ServiceWorkerOrClientIdentifier>::encode):
1798 (IPC::ArgumentCoder<ServiceWorkerOrClientIdentifier>::decode):
1799 * Shared/WebCoreArgumentCoders.h:
1800 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1801 (WebKit::WebSWServerConnection::postMessageToServiceWorker):
1802 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1803 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
1804 * WebProcess/Storage/WebSWClientConnection.cpp:
1805 (WebKit::WebSWClientConnection::postMessageToServiceWorker):
1806 * WebProcess/Storage/WebSWClientConnection.h:
1808 2017-12-12 Yusuke Suzuki <utatane.tea@gmail.com>
1810 [WTF] Thread::create should have Thread::tryCreate
1811 https://bugs.webkit.org/show_bug.cgi?id=180333
1813 Reviewed by Darin Adler.
1815 * UIProcess/API/glib/IconDatabase.cpp:
1816 (WebKit::IconDatabase::open):
1817 * UIProcess/linux/MemoryPressureMonitor.cpp:
1818 (WebKit::MemoryPressureMonitor::MemoryPressureMonitor):
1820 2017-12-11 Zan Dobersek <zdobersek@igalia.com>
1822 [CoordGraphics] Move UpdateAtlas, AreaAllocator into the platform layer
1823 https://bugs.webkit.org/show_bug.cgi?id=180641
1825 Reviewed by Michael Catanzaro.
1827 Move the UpdateAtlas and AreaAllocator classes into the platform layer,
1828 moving over build targets and adjust UpdateAtlas class references in
1829 CompositingCoordinator.
1831 * PlatformGTK.cmake:
1832 * PlatformWPE.cmake:
1833 * PlatformWin.cmake:
1834 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
1836 2017-12-11 Alex Christensen <achristensen@webkit.org>
1838 Add a WKPageGroupRef setter in WKWebViewConfiguration
1839 https://bugs.webkit.org/show_bug.cgi?id=180674
1840 <rdar://problem/35920392>
1842 Reviewed by Brady Eidson.
1844 There is a Mac app trying to transition to WKWebView, and it uses WKPageGroupRef extensively.
1845 To help it transition, we are temporarily giving it an ObjC way to use this organization for
1846 its UserContentControllers to be united per PageGroup before it transitions away from SPIs like
1847 WKBundleAddUserScript. Make it Mac-only to indicate that this should be transitioned away from,
1848 rather than adopted on iOS.
1850 No change in behavior for apps not using the new WKWebViewConfiguration._pageGroup SPI.
1852 * UIProcess/API/Cocoa/WKWebView.mm:
1853 (-[WKWebView _initializeWithConfiguration:]):
1854 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1855 (-[WKWebViewConfiguration copyWithZone:]):
1856 (-[WKWebViewConfiguration _pageGroup]):
1857 (-[WKWebViewConfiguration _setPageGroup:]):
1858 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1860 2017-12-11 Brent Fulgham <bfulgham@apple.com>
1862 [iOS] Remove unused services from WebContent Process sandbox
1863 https://bugs.webkit.org/show_bug.cgi?id=180670
1865 Reviewed by Eric Carlson.
1867 Pare down the set of sandbox exceptions in the iOS WebContent process sandbox to just
1868 those services actually in use:
1869 1. Remove unused code.
1870 2. Instead of defining a 'UIKit-app' function and calling it, just declare the individual sandbox
1871 commands inline. This will allow them to be more easily consolidated with other parts of the
1872 sandbox in a future step.
1874 This update should not change behavior.
1876 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1878 2017-12-11 Chris Dumez <cdumez@apple.com>
1880 Merge ServiceWorkerClientIdentifier into ServiceWorkerClientData
1881 https://bugs.webkit.org/show_bug.cgi?id=180669
1883 Reviewed by Youenn Fablet.
1885 Merge ServiceWorkerClientIdentifier into ServiceWorkerClientData, for consistency with
1886 ServiceWorkerIdentifier / ServiceWorkerData, and start simplifying the postMessage() code.
1888 * Scripts/webkit/messages.py:
1889 (forward_declarations_and_headers):
1891 * Shared/WebCoreArgumentCoders.cpp:
1892 (IPC::ArgumentCoder<ServiceWorkerOrClientData>::encode):
1893 (IPC::ArgumentCoder<ServiceWorkerOrClientData>::decode):
1894 * Shared/WebCoreArgumentCoders.h:
1895 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1896 (WebKit::WebSWServerConnection::~WebSWServerConnection):
1897 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromClient):
1898 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromServiceWorker):
1899 (WebKit::WebSWServerConnection::registerServiceWorkerClient):
1900 (WebKit::WebSWServerConnection::unregisterServiceWorkerClient):
1901 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1902 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
1903 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1904 (WebKit::WebSWServerToContextConnection::matchAllCompleted):
1905 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
1906 * WebProcess/Storage/WebSWClientConnection.cpp:
1907 (WebKit::WebSWClientConnection::registerServiceWorkerClient):
1908 (WebKit::WebSWClientConnection::unregisterServiceWorkerClient):
1909 * WebProcess/Storage/WebSWClientConnection.h:
1910 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1911 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorker):
1912 (WebKit::WebSWContextManagerConnection::matchAllCompleted):
1913 * WebProcess/Storage/WebSWContextManagerConnection.h:
1914 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
1916 2017-12-11 Youenn Fablet <youenn@apple.com>
1918 RTCPacketOptions::packet_id should be encoded as 32 bits integer.
1919 https://bugs.webkit.org/show_bug.cgi?id=180654
1921 Reviewed by Eric Carlson.
1923 packet_id is a 16 bit unsigned integer, but it can also take -1 if its value is not set.
1924 Before the patch, it was IPC encoded as a 16 bit signed integer which is not large enough.
1926 * Shared/RTCPacketOptions.cpp:
1927 (WebKit::RTCPacketOptions::encode const):
1928 (WebKit::RTCPacketOptions::decode):
1930 2017-12-11 Chris Dumez <cdumez@apple.com>
1932 Layout Test http/tests/workers/service/postmessage-after-sw-process-crash.https.html is flaky
1933 https://bugs.webkit.org/show_bug.cgi?id=180659
1935 Reviewed by Youenn Fablet.
1937 Fix flaky crash due to capturing an IPC::DataReference in a lambda, which would point to invalid
1938 memory when the lambda is called asynchronously.
1940 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1941 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromClient):
1942 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromServiceWorker):
1944 2017-12-11 Brent Fulgham <bfulgham@apple.com>
1946 [iOS] Don't import 'UIKit-apps.sb' to the WebContent process sandbox
1947 https://bugs.webkit.org/show_bug.cgi?id=180610
1948 <rdar://problem/18899506>
1950 Reviewed by Dean Jackson.
1952 Stop including 'system.sb', and just include the portions of that sandbox that we
1953 actually use in WebContent Process. This is the first step in some further sandbox
1956 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1958 2017-12-11 Yusuke Suzuki <utatane.tea@gmail.com>
1960 [WTF] Add Converter traits to StringHasher instead of function pointer
1961 https://bugs.webkit.org/show_bug.cgi?id=180656
1963 Reviewed by JF Bastien.
1965 * WebProcess/WebProcess.cpp:
1966 (WebKit::addCaseFoldedCharacters):
1968 2017-12-11 David Quesada <david_quesada@apple.com>
1970 Turn on ENABLE_APPLICATION_MANIFEST
1971 https://bugs.webkit.org/show_bug.cgi?id=180562
1972 rdar://problem/35924737
1974 Reviewed by Geoffrey Garen.
1976 * Configurations/FeatureDefines.xcconfig:
1978 2017-12-11 Dean Jackson <dino@apple.com>
1980 Add a runtime feature flag for ImageBitmap and OffscreenCanvas
1981 https://bugs.webkit.org/show_bug.cgi?id=180652
1982 <rdar://problem/35969611>
1984 Reviewed by Antoine Quint.
1986 Add an experimental feature flag for these interfaces.
1988 * Shared/WebPreferences.yaml:
1990 2017-12-10 Stephan Szabo <stephan.szabo@sony.com>
1992 APIClient.h uses things from <tuple> without including it explicitly
1993 https://bugs.webkit.org/show_bug.cgi?id=180609
1995 Reviewed by Darin Adler.
1997 * Shared/API/APIClient.h:
1999 2017-12-08 Youenn Fablet <youenn@apple.com>
2001 Service Worker should use a correct user agent
2002 https://bugs.webkit.org/show_bug.cgi?id=180566
2003 <rdar://problem/35926295>
2005 Reviewed by Chris Dumez.
2007 Addendum to landed patch.
2008 This change was removed from the last version of the patch but proves to be needed by Safari.
2010 * UIProcess/WebProcessPool.cpp:
2011 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
2012 Added back setting the user agent at start of service worker in case a page is already created.
2014 2017-12-08 Brady Eidson <beidson@apple.com>
2016 Delay some service worker operations until after the database import completes.
2017 https://bugs.webkit.org/show_bug.cgi?id=180573
2019 Reviewed by Chris Dumez.
2021 * StorageProcess/ServiceWorker/WebSWOriginStore.cpp:
2022 (WebKit::WebSWOriginStore::importComplete): Tell the Origin Table on all connects that
2023 the import is complete.
2024 (WebKit::WebSWOriginStore::registerSWServerConnection):
2025 * StorageProcess/ServiceWorker/WebSWOriginStore.h:
2027 * WebProcess/Storage/WebSWClientConnection.cpp:
2028 (WebKit::WebSWClientConnection::mayHaveServiceWorkerRegisteredForOrigin const):
2029 (WebKit::WebSWClientConnection::setSWOriginTableIsImported): Run deferred tasks!
2030 (WebKit::WebSWClientConnection::matchRegistration): If the import isn't complete yet, delay
2031 the match registration task until later.
2032 (WebKit::WebSWClientConnection::runOrDelayTask): Either send the message now or save off
2033 the task to wait until the import is complete.
2034 (WebKit::WebSWClientConnection::getRegistrations): If the import isn't complete yet, delay
2035 the get registrations task until later.
2036 (WebKit::WebSWClientConnection::initializeSWOriginTableAsEmpty): Deleted.
2037 * WebProcess/Storage/WebSWClientConnection.h:
2038 * WebProcess/Storage/WebSWClientConnection.messages.in:
2040 * WebProcess/Storage/WebSWOriginTable.cpp:
2041 (WebKit::WebSWOriginTable::setSharedMemory):
2042 * WebProcess/Storage/WebSWOriginTable.h:
2043 (WebKit::WebSWOriginTable::isImported const):
2044 (WebKit::WebSWOriginTable::setIsImported):
2045 (WebKit::WebSWOriginTable::isInitialized const): Deleted.
2046 (WebKit::WebSWOriginTable::initializeAsEmpty): Deleted.
2048 2017-12-08 Youenn Fablet <youenn@apple.com>
2050 Service Worker should use a correct user agent
2051 https://bugs.webkit.org/show_bug.cgi?id=180566
2052 <rdar://problem/35926295>
2054 Reviewed by Chris Dumez.
2056 Add support to set service worker user agent from UIProcess to service worker process.
2057 One user agent is currently supported per service worker process and it can be changed at any given time.
2058 Only new service worker will use the new value.
2059 Once a service worker is launched, it will stay with the same user agent value.
2061 This sets both navigator.userAgent and User-Agent header name used for fetch within a service worker.
2062 Compute the service worker process user agent by picking the last user agent set for a web page.
2064 * UIProcess/ServiceWorkerProcessProxy.cpp:
2065 (WebKit::ServiceWorkerProcessProxy::start):
2066 (WebKit::ServiceWorkerProcessProxy::setUserAgent):
2067 * UIProcess/ServiceWorkerProcessProxy.h:
2068 * UIProcess/WebPageProxy.cpp:
2069 (WebKit::WebPageProxy::setApplicationNameForUserAgent):
2070 * UIProcess/WebProcessPool.cpp:
2071 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
2072 (WebKit::WebProcessPool::createWebPage):
2073 (WebKit::WebProcessPool::updateServiceWorkerUserAgent):
2074 * UIProcess/WebProcessPool.h:
2075 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2076 (WebKit::WebSWContextManagerConnection::installServiceWorker):
2077 (WebKit::WebSWContextManagerConnection::setUserAgent):
2078 (WebKit::WebSWContextManagerConnection::removeFrameLoaderClient):
2079 * WebProcess/Storage/WebSWContextManagerConnection.h:
2080 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
2082 2017-12-07 Simon Fraser <simon.fraser@apple.com>
2084 Wrong caret position for input field inside a fixed position parent on iOS 11
2085 https://bugs.webkit.org/show_bug.cgi?id=176896
2086 rdar://problem/33726145
2088 Reviewed by Tim Horton.
2090 In r219668 I added code to compute a layout viewport rect in the web process, so that
2091 after programmatic scrolling, getBoundingClientRect() would return the correct values.
2092 However, that computation sometimes used a different visual viewport than the UI process,
2093 resulting in a different layout viewport being set. This would happen when the keyboard
2094 was visible, and the combination of this and zooming when focusing an input would result
2095 in a state where the scrolling tree contained notes computed with the bad layout viewport.
2096 This could cause apparently offset fixed elements, and bad caret positioning if those fixed
2097 elements contained the focused input.
2099 Fix by passing to the web process the same visual viewport rect that the UI process is using,
2100 namely "unobscuredContentRectRespectingInputViewBounds". This was already being set in
2101 VisibleContentRectUpdateInfo but wasn't encoded/decoded, so fix that. Set it as an optional<>
2102 on FrameView when different from the normal visual viewport, and return it from
2103 visualViewportRect().
2105 Some other minor logging changes.
2107 * Shared/VisibleContentRectUpdateInfo.cpp:
2108 (WebKit::VisibleContentRectUpdateInfo::encode const):
2109 (WebKit::VisibleContentRectUpdateInfo::decode):
2110 (WebKit::operator<<):
2111 * Shared/VisibleContentRectUpdateInfo.h:
2112 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2113 * WebProcess/WebPage/ios/WebPageIOS.mm:
2114 (WebKit::WebPage::updateVisibleContentRects):
2116 2017-12-06 Simon Fraser <simon.fraser@apple.com>
2118 When the iPhone keyboard is up, sometimes we never commit a stable update and re-show the caret
2119 https://bugs.webkit.org/show_bug.cgi?id=180498
2121 Reviewed by Tim Horton.
2123 When the keyboard is showing, we would think that the page was in a rubber-banding state
2124 because contentOffsetBoundedInValidRange() would always clamp the content offset to a different
2127 This happened because scrollView.contentInset don't change when the keyboard is showing,
2128 but UIKit actually consults scrollView.adjustedContentInset, which does. If we use
2129 scrollView.adjustedContentInset in this computation, we'll get a correct answer.
2131 Also rewrote the clamping logic to be more similar to what UIKit does internally when computing
2132 min/max content offset.
2134 * UIProcess/API/Cocoa/WKWebView.mm:
2135 (contentOffsetBoundedInValidRange):
2137 2017-12-08 Chris Dumez <cdumez@apple.com>
2139 Clearing all Website Data should remove service worker registrations on disk
2140 https://bugs.webkit.org/show_bug.cgi?id=180558
2142 Reviewed by Youenn Fablet.
2144 * StorageProcess/StorageProcess.cpp:
2145 (WebKit::StorageProcess::deleteWebsiteData):
2146 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
2148 2017-12-08 Youenn Fablet <youenn@apple.com>
2150 WebServiceWorkerProvider should use Cancellation error to notify DTL that it cannot handle a fetch
2151 https://bugs.webkit.org/show_bug.cgi?id=180584
2153 Reviewed by Alex Christensen.
2155 * WebProcess/Network/WebLoaderStrategy.cpp:
2156 (WebKit::WebLoaderStrategy::scheduleLoad):
2158 2017-12-08 Youenn Fablet <youenn@apple.com>
2160 Service Worker should use a correct SessionID
2161 https://bugs.webkit.org/show_bug.cgi?id=180585
2163 Reviewed by Alex Christensen.
2165 Store SessionID in SWServer and send it as part of service worker instantiation.
2166 Use it when creating service worker thread in service worker process.
2168 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
2169 (WebKit::WebSWServerToContextConnection::installServiceWorkerContext):
2170 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
2171 * StorageProcess/StorageProcess.cpp:
2172 (WebKit::StorageProcess::swServerForSession):
2173 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2174 (WebKit::WebSWContextManagerConnection::installServiceWorker):
2175 * WebProcess/Storage/WebSWContextManagerConnection.h:
2176 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
2178 2017-12-08 Youenn Fablet <youenn@apple.com>
2180 FetchResponse should keep unfiltered ResourceResponse so that it can be used in Service Worker
2181 https://bugs.webkit.org/show_bug.cgi?id=179641
2182 <rdar://problem/35923570>
2184 Reviewed by Alex Christensen.
2186 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
2187 (WebKit::ServiceWorkerClientFetch::didReceiveResponse): In case of opaque redirected response, handle it as a regular response.
2189 2017-12-08 Alex Christensen <achristensen@webkit.org>
2191 Remove unused code in WebPageGroup
2192 https://bugs.webkit.org/show_bug.cgi?id=180604
2194 Reviewed by Youenn Fablet.
2196 * UIProcess/WebPageGroup.cpp:
2197 (WebKit::WebPageGroup::userContentController):
2198 (WebKit::WebPageGroup::createNonNull): Deleted.
2199 (WebKit::WebPageGroup::preferencesDidChange): Deleted.
2200 * UIProcess/WebPageGroup.h:
2201 * UIProcess/WebProcessPool.cpp:
2202 (WebKit::WebProcessPool::WebProcessPool):
2204 2017-12-08 Alex Christensen <achristensen@webkit.org>
2206 Modernize APIWebsiteDataStore.h and WebProcessPool.h
2207 https://bugs.webkit.org/show_bug.cgi?id=180588
2209 Reviewed by Chris Dumez.
2211 pragma once, Ref instead of RefPtr, initializer list in header instead of literals in constructor.
2213 * UIProcess/API/APIWebsiteDataStore.h:
2214 * UIProcess/WebProcessPool.cpp:
2215 (WebKit::WebProcessPool::WebProcessPool):
2216 * UIProcess/WebProcessPool.h:
2218 2017-12-08 Yusuke Suzuki <utatane.tea@gmail.com>
2220 Remove pthread_once in favor of dispatch_once
2221 https://bugs.webkit.org/show_bug.cgi?id=180591
2223 Reviewed by Saam Barati.
2225 * PluginProcess/mac/PluginProcessMac.mm:
2226 (WebKit::shouldCallRealDebugger):
2227 (WebKit::initShouldCallRealDebugger): Deleted.
2229 2017-12-08 Chris Dumez <cdumez@apple.com>
2231 ProcessPoolConfiguration::copy() fails to copy the service worker path
2232 https://bugs.webkit.org/show_bug.cgi?id=180595
2234 Reviewed by Brady Eidson.
2236 * UIProcess/API/APIProcessPoolConfiguration.cpp:
2237 (API::ProcessPoolConfiguration::copy):
2239 2017-12-08 Chris Dumez <cdumez@apple.com>
2241 Different WebKitTestRunner instances should use different service worker registrations databases
2242 https://bugs.webkit.org/show_bug.cgi?id=180589
2244 Reviewed by Brady Eidson.
2246 * UIProcess/API/C/WKContextConfigurationRef.cpp:
2247 (WKContextConfigurationCopyServiceWorkerDatabaseDirectory):
2248 (WKContextConfigurationSetServiceWorkerDatabaseDirectory):
2249 * UIProcess/API/C/WKContextConfigurationRef.h:
2251 2017-12-08 Alex Christensen <achristensen@webkit.org>
2253 Pass std::optional<WebsitePolicies> instead of WebsitePolicies
2254 https://bugs.webkit.org/show_bug.cgi?id=180563
2256 Reviewed by Andy Estes.
2258 WebsitePolicies are only passed along when a decidePolicyForNavigationAction SPI completion handler
2259 is called with a valid _WKWebsitePolicies object. In other cases, we don't have one. Rather than
2260 making WebsitePolicies have a default value for everything that won't change policies, pass
2261 a std::optional<WebsitePolicies> which indicates better when we don't have new policies.
2263 No change in behavior, but this will enable me to add things to WebsitePolicies that have no default value.
2265 * Shared/WebsitePolicies.h:
2266 Make WebsitePolicies a class with public members because the IPC code generators don't understand std::optional<struct type>
2267 * UIProcess/API/C/WKAPICast.h:
2268 * UIProcess/Cocoa/NavigationState.mm:
2269 (WebKit::tryAppLink):
2270 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
2271 * UIProcess/WebFrameListenerProxy.cpp:
2272 (WebKit::WebFrameListenerProxy::receivedPolicyDecision):
2273 * UIProcess/WebFrameListenerProxy.h:
2274 * UIProcess/WebFramePolicyListenerProxy.cpp:
2275 (WebKit::WebFramePolicyListenerProxy::use):
2276 * UIProcess/WebFramePolicyListenerProxy.h:
2277 * UIProcess/WebFrameProxy.cpp:
2278 (WebKit::WebFrameProxy::receivedPolicyDecision):
2279 * UIProcess/WebFrameProxy.h:
2280 * UIProcess/WebPageProxy.cpp:
2281 (WebKit::WebPageProxy::receivedPolicyDecision):
2282 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2283 * UIProcess/WebPageProxy.h:
2284 * UIProcess/WebPageProxy.messages.in:
2285 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2286 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2287 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2288 * WebProcess/WebPage/WebFrame.cpp:
2289 (WebKit::WebFrame::didReceivePolicyDecision):
2290 * WebProcess/WebPage/WebFrame.h:
2291 * WebProcess/WebPage/WebPage.cpp:
2292 (WebKit::WebPage::didReceivePolicyDecision):
2293 * WebProcess/WebPage/WebPage.h:
2294 * WebProcess/WebPage/WebPage.messages.in:
2296 2017-12-08 Yusuke Suzuki <utatane.tea@gmail.com>
2298 [WTF] Remove remaining use of Mutex
2299 https://bugs.webkit.org/show_bug.cgi?id=180579
2301 Reviewed by Alex Christensen.
2303 Remove unused "BinarySemaphore.h".
2305 * Platform/IPC/win/ConnectionWin.cpp:
2307 2017-12-08 Michael Catanzaro <mcatanzaro@igalia.com>
2309 [GTK] WebInspectorProxyClient needs a virtual destructor
2310 https://bugs.webkit.org/show_bug.cgi?id=180533
2312 Reviewed by Carlos Garcia Campos.
2314 Otherwise the derived class portion of the object, WebKitInspectorClient, is not destroyed.
2316 * UIProcess/gtk/WebInspectorProxyClient.h:
2318 2017-12-07 Yousuke Kimoto <yousuke.kimoto@sony.com>
2320 [WinCairo] Fix ResourceError handling in ArgumentCoder for wincairo webkit
2321 https://bugs.webkit.org/show_bug.cgi?id=180483
2323 Reviewed by Alex Christensen.
2325 * Shared/curl/WebCoreArgumentCodersCurl.cpp:
2326 (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
2327 (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
2329 2017-12-07 Youenn Fablet <youenn@apple.com>
2331 StartFetch should take a ServiceWorkerIdentifier
2332 https://bugs.webkit.org/show_bug.cgi?id=180478
2334 Reviewed by Brady Eidson.
2336 Before the patch, StartFetch was taking an optional ServiceWorkerIdentifier.
2337 Now that every navigation fetch is querying its matching registration, it can no longer be optional.
2339 In the case there is a problem in running the service worker at start fetch time,
2340 answer to the WebProcess to go to network so that the request does not get stalled.
2342 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2343 (WebKit::WebSWServerConnection::startFetch):
2344 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2345 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
2346 * WebProcess/Storage/WebSWClientConnection.cpp:
2347 (WebKit::WebSWClientConnection::startFetch):
2348 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2349 (WebKit::WebSWContextManagerConnection::startFetch):
2350 * WebProcess/Storage/WebSWContextManagerConnection.h:
2351 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
2353 2017-12-07 Saam Barati <sbarati@apple.com>
2355 We need to grab the JSLock in InjectedBundle::createWebDataFromUint8Array
2356 https://bugs.webkit.org/show_bug.cgi?id=180492
2358 Reviewed by Alex Christensen.
2360 InjectedBundle::createWebDataFromUint8Array calls into WebCore APIs that allocate
2361 out of the JS heap. It's only legal to allocate out of the JS heap when holding the JS lock.
2363 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2364 (WebKit::InjectedBundle::createWebDataFromUint8Array):
2366 2017-12-07 Simon Fraser <simon.fraser@apple.com>
2368 Propagate WebKit2Logging channels to the Web Process
2369 https://bugs.webkit.org/show_bug.cgi?id=180517
2371 Reviewed by Tim Horton.
2373 If you set WebKit2Logging, you want those channels active in both the UI process and
2374 the web process, but without tricky 'defaults' gyrations, setting them in the web process
2377 Instead, send them through to the process via WebProcessCreationParameters, as we do
2378 for WebCoreLogging channels.
2380 * Platform/LogInitialization.h:
2381 * Platform/Logging.cpp:
2382 (WebKit::initializeLogChannelsIfNecessary):
2383 * Shared/WebProcessCreationParameters.cpp:
2384 (WebKit::WebProcessCreationParameters::encode const):
2385 (WebKit::WebProcessCreationParameters::decode):
2386 * Shared/WebProcessCreationParameters.h:
2387 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2388 (WebKit::WebProcessPool::platformInitializeWebProcess):
2389 * WebProcess/cocoa/WebProcessCocoa.mm:
2390 (WebKit::WebProcess::platformInitializeWebProcess):
2392 2017-12-07 Simon Fraser <simon.fraser@apple.com>
2394 Add logging for EditorState in RemoteLayerTree transactions
2395 https://bugs.webkit.org/show_bug.cgi?id=180515
2397 Reviewed by Wenson Hsieh.
2399 Make EditorState TextStream-able, and dump it in layer tree transactions.
2401 * Shared/EditorState.cpp:
2402 (WebKit::operator<<):
2403 * Shared/EditorState.h:
2404 * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
2405 (WebKit::RemoteLayerTreeTransaction::description const):
2407 2017-12-07 Youenn Fablet <youenn@apple.com>
2409 CacheStorage Cache should not remove any disk entry when clearing its memory representation
2410 https://bugs.webkit.org/show_bug.cgi?id=180546
2412 Reviewed by Brady Eidson.
2414 * NetworkProcess/cache/CacheStorageEngineCache.cpp:
2415 (WebKit::CacheStorage::Cache::clearMemoryRepresentation):
2417 2017-12-07 Myles C. Maxfield <mmaxfield@apple.com>
2419 [Cocoa] Add SPI to disallow user-installed fonts
2420 https://bugs.webkit.org/show_bug.cgi?id=180062
2421 <rdar://problem/35042408>
2423 Reviewed by Simon Fraser.
2425 * Shared/WebPreferences.yaml:
2426 * UIProcess/API/C/WKPreferences.cpp:
2427 (WKPreferencesSetShouldDisallowUserInstalledFonts):
2428 (WKPreferencesGetShouldDisallowUserInstalledFonts):
2429 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2430 * UIProcess/API/Cocoa/WKPreferences.mm:
2431 (-[WKPreferences _shouldDisallowUserInstalledFonts]):
2432 (-[WKPreferences _setShouldDisallowUserInstalledFonts:]):
2433 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2435 2017-12-07 David Quesada <david_quesada@apple.com>
2437 [Web App Manifest] Support display-mode media feature
2438 https://bugs.webkit.org/show_bug.cgi?id=180376
2439 rdar://problem/35837993
2441 Reviewed by Geoffrey Garen.
2443 * UIProcess/API/Cocoa/_WKApplicationManifest.h:
2444 * UIProcess/API/Cocoa/_WKApplicationManifest.mm:
2445 (-[_WKApplicationManifest initWithCoder:]):
2446 (-[_WKApplicationManifest encodeWithCoder:]):
2447 (-[_WKApplicationManifest displayMode]):
2449 2017-12-07 Chris Dumez <cdumez@apple.com>
2451 Unreviewed build fix after r225622.
2453 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2454 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromServiceWorker):
2456 2017-12-06 Chris Dumez <cdumez@apple.com>
2458 We should be able to recover after a Service Worker process crash
2459 https://bugs.webkit.org/show_bug.cgi?id=180477
2461 Reviewed by Brady Eidson and Youenn Fablet.
2463 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2464 (WebKit::WebSWServerConnection::startFetch):
2465 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromClient):
2466 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromServiceWorker):
2467 Update calls to SWServer::runServiceWorkerIfNecessary() that that it is asynchronous
2468 and takes in a lambda.
2470 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2471 (WebKit::WebSWServerConnection::ipcConnection const):
2472 Add getter for the underlying IPC connection.
2474 * StorageProcess/StorageProcess.cpp:
2475 (WebKit::StorageProcess::didClose):
2476 (WebKit::StorageProcess::connectionToContextProcessWasClosed):
2477 Move some code to connectionToContextProcessWasClosed() to avoid duplication.
2478 Also, relaunch the Service Worker process if it has exited but we still
2479 have SWServer connections to regular Web Processes.
2481 (WebKit::StorageProcess::needsServerToContextConnection const):
2482 Utility function to determine if we still need the service worker process.
2483 The current rule is that we need the service worker (aka "context") process
2484 if we still have SWServer connections to regular Web Processes.
2486 * StorageProcess/StorageProcess.h:
2488 * StorageProcess/StorageToWebProcessConnection.cpp:
2489 (WebKit::StorageToWebProcessConnection::didClose):
2490 If didClose() is called for the connection to the service worker context,
2491 let the StorageProcess know so that it can clear its state and relaunch
2492 the process if necessary.
2494 * UIProcess/API/C/WKContext.cpp:
2495 (WKContextTerminateServiceWorkerProcess):
2496 * UIProcess/API/C/WKContextPrivate.h:
2497 * UIProcess/API/Cocoa/WKProcessPool.mm:
2498 (-[WKProcessPool _terminateServiceWorkerProcess]):
2499 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2500 Add SPI to terminate the service worker process.
2502 * UIProcess/WebProcessPool.cpp:
2503 (WebKit::m_serviceWorkerProcessTerminationTimer):
2504 (WebKit::WebProcessPool::createNewWebProcess):
2505 (WebKit::WebProcessPool::disconnectProcess):
2506 (WebKit::WebProcessPool::terminateServiceWorkerProcess):
2507 * UIProcess/WebProcessPool.h:
2508 We used to shutdown the ServiceWorker process right away as soon as the last regular
2509 WebProcess was gone. We now give it a grace period of 5 seconds in case a new
2510 WebProcess gets launched shortly after.
2512 2017-12-02 Darin Adler <darin@apple.com>
2514 Modernize some aspects of text codecs, eliminate WebKit use of strcasecmp
2515 https://bugs.webkit.org/show_bug.cgi?id=180009
2517 Reviewed by Alex Christensen.
2519 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2520 (WebKit::initializeProtectionSpace): Use equalLettersIgnoringASCIICase instead
2523 2017-12-06 David Quesada <david_quesada@apple.com>
2525 [Web App Manifest] Add SPI for applying a manifest to a top-level browsing context
2526 https://bugs.webkit.org/show_bug.cgi?id=180368
2527 rdar://problem/34748067
2529 Reviewed by Geoffrey Garen.
2531 Add a new property WKWebViewConfiguration._applicationManifest to specify manifest
2532 to apply to application contexts (aka. top-level browsing contexts, i.e. web views).
2533 The manifest is ultimately stored on the MainFrame of the Pages created from the
2534 web view configuration.
2536 No new tests, no change in behavior.
2538 * Shared/WebPageCreationParameters.cpp:
2539 (WebKit::WebPageCreationParameters::encode const):
2540 (WebKit::WebPageCreationParameters::decode):
2541 * Shared/WebPageCreationParameters.h:
2542 * UIProcess/API/APIPageConfiguration.cpp:
2543 (API::PageConfiguration::copy const):
2544 (API::PageConfiguration::applicationManifest const):
2545 (API::PageConfiguration::setApplicationManifest):
2546 * UIProcess/API/APIPageConfiguration.h:
2547 * UIProcess/API/Cocoa/WKWebView.mm:
2548 (-[WKWebView _initializeWithConfiguration:]):
2549 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2550 (-[WKWebViewConfiguration copyWithZone:]):
2551 (-[WKWebViewConfiguration _applicationManifest]):
2552 (-[WKWebViewConfiguration _setApplicationManifest:]):
2553 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2554 * UIProcess/API/Cocoa/_WKApplicationManifestInternal.h:
2555 * UIProcess/WebPageProxy.cpp:
2556 (WebKit::WebPageProxy::creationParameters):
2557 * WebProcess/WebPage/WebPage.cpp:
2558 (WebKit::m_cpuLimit):
2560 2017-12-06 Jeff Miller <jeffm@apple.com>
2562 -[WKWebViewConfiguration copyWithZone] doesn't copy _groupIdentifier
2563 https://bugs.webkit.org/show_bug.cgi?id=180504
2565 Reviewed by Geoffrey Garen.
2567 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2568 (-[WKWebViewConfiguration copyWithZone:]):
2569 Copy _groupIdentifier.
2571 2017-12-06 David Quesada <david_quesada@apple.com>
2573 [Web App Manifest] Add SPI for fetching the manifest
2574 https://bugs.webkit.org/show_bug.cgi?id=180294
2575 rdar://problem/34747968
2577 Reviewed by Geoffrey Garen.
2579 Add a new method -[WKWebView _getApplicationManifestWithCompletionHandler:] to request
2580 the manifest associated with the current page.
2582 * Shared/API/APIObject.h:
2583 * Shared/Cocoa/APIObject.mm:
2584 (API::Object::newObject):
2585 * UIProcess/API/APIApplicationManifest.h: Copied from Source/WebCore/Modules/applicationmanifest/ApplicationManifest.h.
2586 Add a new API object type for application manifests.
2587 * UIProcess/API/C/WKPage.cpp:
2588 (WKPageGetApplicationManifest_b):
2589 Add a C version of this SPI for WebKitTestRunner.
2590 * UIProcess/API/C/WKPagePrivate.h:
2591 * UIProcess/API/Cocoa/WKWebView.mm:
2592 (-[WKWebView _getApplicationManifestWithCompletionHandler:]):
2593 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2594 * UIProcess/API/Cocoa/_WKApplicationManifest.h: Copied from Source/WebCore/Modules/applicationmanifest/ApplicationManifest.h.
2595 * UIProcess/API/Cocoa/_WKApplicationManifest.mm: Added.
2596 (-[_WKApplicationManifest initWithCoder:]):
2597 (-[_WKApplicationManifest encodeWithCoder:]):
2598 (+[_WKApplicationManifest applicationManifestFromJSON:manifestURL:documentURL:]):
2599 (-[_WKApplicationManifest _apiObject]):
2601 (-[_WKApplicationManifest name]):
2602 (-[_WKApplicationManifest shortName]):
2603 (-[_WKApplicationManifest applicationDescription]):
2604 (-[_WKApplicationManifest scope]):
2605 (-[_WKApplicationManifest startURL]):
2606 * UIProcess/API/Cocoa/_WKApplicationManifestInternal.h: Copied from Source/WebCore/Modules/applicationmanifest/ApplicationManifest.h.
2608 * UIProcess/WebPageProxy.cpp:
2609 (WebKit::WebPageProxy::applicationManifestCallback):
2610 (WebKit::WebPageProxy::getApplicationManifest):
2611 * UIProcess/WebPageProxy.h:
2612 * UIProcess/WebPageProxy.messages.in:
2613 * WebKit.xcodeproj/project.pbxproj:
2614 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2615 (WebKit::WebFrameLoaderClient::finishedLoadingApplicationManifest):
2616 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2617 * WebProcess/WebPage/WebPage.cpp:
2618 (WebKit::WebPage::getApplicationManifest):
2619 (WebKit::WebPage::didFinishLoadingApplicationManifest):
2620 * WebProcess/WebPage/WebPage.h:
2621 * WebProcess/WebPage/WebPage.messages.in:
2623 2017-12-06 Per Arne Vollan <pvollan@apple.com>
2625 The WebProcess should use the NSRunLoop runloop type.
2626 https://bugs.webkit.org/show_bug.cgi?id=179804
2627 <rdar://problem/14012823>
2629 Reviewed by Brent Fulgham.
2631 * Platform/IPC/mac/ConnectionMac.mm:
2632 (IPC::AccessibilityProcessSuspendedNotification):
2633 * Shared/ChildProcess.h:
2634 * Shared/mac/ChildProcessMac.mm:
2635 (WebKit::ChildProcess::launchServicesCheckIn):
2636 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2637 (WebKit::shouldLeakBoost):
2638 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
2639 * WebProcess/WebProcess.cpp:
2640 (WebKit::WebProcess::initializeProcess):
2642 2017-12-06 Nan Wang <n_wang@apple.com>
2644 AX: [iOS] Post accessibility notification when a web process changes its suspended state
2645 https://bugs.webkit.org/show_bug.cgi?id=180458
2646 <rdar://problem/35869115>
2648 Reviewed by Chris Dumez.
2650 Post accessibility notification with the pid information when a web process
2651 becomes suspended or resumes running.
2653 * WebProcess/WebProcess.cpp:
2654 (WebKit::WebProcess::actualPrepareToSuspend):
2655 (WebKit::WebProcess::processDidResume):
2656 * WebProcess/WebProcess.h:
2657 * WebProcess/cocoa/WebProcessCocoa.mm:
2658 (WebKit::WebProcess::accessibilityProcessSuspendedNotification):
2660 2017-12-06 Ryan Haddad <ryanhaddad@apple.com>
2662 Unreviewed build fix, removed unused lambda capture.
2664 * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
2665 (WebKit::CacheStorageEngineConnection::open):
2667 2017-12-06 John Wilander <wilander@apple.com>
2669 Storage Access API: Make document.hasStorageAccess a function and always allow access for same-origin iframes
2670 https://bugs.webkit.org/show_bug.cgi?id=176944
2671 <rdar://problem/34440658>
2673 Reviewed by Brent Fulgham.
2675 This change introduces document.hasStorageAccess() as a function which
2676 returns a promise instead of being a property. Since cookie access can
2677 be due to both a granted request and recent user interaction as first
2678 party, the WebKit::WebResourceLoadStatisticsStore needs to be consulted.
2680 * UIProcess/WebPageProxy.cpp:
2681 (WebKit::WebPageProxy::hasStorageAccess):
2682 * UIProcess/WebPageProxy.h:
2683 * UIProcess/WebPageProxy.messages.in:
2684 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2685 (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
2686 (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
2687 Now adds an entry for granted access. A bug found through testing.
2688 Switched from WTF::Function to WTF::CompletionHandler.
2689 * UIProcess/WebResourceLoadStatisticsStore.h:
2690 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2691 (WebKit::WebsiteDataStore::hasStorageAccess):
2692 (WebKit::WebsiteDataStore::requestStorageAccess):
2693 Switched from WTF::Function to WTF::CompletionHandler.
2694 * UIProcess/WebsiteData/WebsiteDataStore.h:
2695 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2696 (WebKit::WebChromeClient::hasStorageAccess):
2697 (WebKit::WebChromeClient::requestStorageAccess):
2698 Switched from WTF::Function to WTF::CompletionHandler.
2699 * WebProcess/WebCoreSupport/WebChromeClient.h:
2700 * WebProcess/WebPage/WebPage.cpp:
2701 (WebKit::WebPage::hasStorageAccess):
2702 (WebKit::WebPage::requestStorageAccess):
2703 Switched from WTF::Function to WTF::CompletionHandler.
2704 * WebProcess/WebPage/WebPage.h:
2706 2017-12-06 Youenn Fablet <youenn@apple.com>
2708 CacheStorageEngineConnection should protect its IPC Connection when doing asynchronous tasks
2709 https://bugs.webkit.org/show_bug.cgi?id=180461
2711 Reviewed by Chris Dumez.
2713 Protecting the IPC connection instead of the CacheStorageEngineConnection
2714 since CacheStorageEngineConnection only keeps a reference to the NetworkConnectionToWebProcess.
2716 * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
2717 (WebKit::CacheStorageEngineConnection::open):
2718 (WebKit::CacheStorageEngineConnection::remove):
2719 (WebKit::CacheStorageEngineConnection::caches):
2720 (WebKit::CacheStorageEngineConnection::retrieveRecords):
2721 (WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
2722 (WebKit::CacheStorageEngineConnection::putRecords):
2723 (WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
2725 2017-12-06 Zan Dobersek <zdobersek@igalia.com>
2727 [CoordGraphics] Introduce Nicosia::PaintingContext, add Cairo implementation
2728 https://bugs.webkit.org/show_bug.cgi?id=180239
2730 Reviewed by Michael Catanzaro.
2732 With Nicosia::Buffer now only providing the memory area into which the
2733 tile content was rasterized, we can simplify the BitmapTexture update
2734 greatly -- we don't have to create a BitmapImage anymore and retrieve
2735 memory pointer from the contained cairo_surface_t object. Instead, we
2736 just copy to GPU the memory that Nicosia::Buffer controls.
2738 * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
2739 (WebKit::CoordinatedBackingStoreTile::swapBuffers):
2741 2017-12-05 Brent Fulgham <bfulgham@apple.com>
2743 Limit user agent versioning to an upper bound
2744 https://bugs.webkit.org/show_bug.cgi?id=180365
2745 <rdar://problem/34550617>
2747 Reviewed by Joseph Pecoraro.
2749 * UIProcess/ios/WebPageProxyIOS.mm:
2750 (WebKit::WebPageProxy::standardUserAgent): Don't pass the WebKit bundle version when
2751 creatin the User Agent string.
2752 (WebKit::webKitBundleVersionString): Deleted.
2753 * UIProcess/mac/WebPageProxyMac.mm:
2754 (WebKit::WebPageProxy::standardUserAgent): Ditto.
2755 (WebKit::webKitBundleVersionString): Deleted.
2757 2017-12-05 Alex Christensen <achristensen@webkit.org>
2759 Fix crash when loading a file URL that does not have a fileSystemPath representation
2760 https://bugs.webkit.org/show_bug.cgi?id=180448
2761 <rdar://problem/22805921>
2763 Reviewed by Chris Dumez.
2765 * UIProcess/WebProcessProxy.cpp:
2766 (WebKit::WebProcessProxy::assumeReadAccessToBaseURL):
2767 Check if a String is null before adding it to a HashSet.
2769 2017-12-05 Youenn Fablet <youenn@apple.com>
2771 Implement https://w3c.github.io/ServiceWorker/#clients-claim
2772 https://bugs.webkit.org/show_bug.cgi?id=180261
2774 Reviewed by Chris Dumez.
2776 Add IPC plumbery for clients claim between ServiceWorker process and Storage process.
2778 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
2779 (WebKit::WebSWServerToContextConnection::claimCompleted):
2780 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
2781 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
2782 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2783 (WebKit::WebSWContextManagerConnection::claim):
2784 (WebKit::WebSWContextManagerConnection::claimCompleted):
2785 * WebProcess/Storage/WebSWContextManagerConnection.h:
2786 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
2788 2017-12-05 Chris Dumez <cdumez@apple.com>
2790 Add support for ServiceWorkerContainer.prototype.ready
2791 https://bugs.webkit.org/show_bug.cgi?id=180383
2793 Reviewed by Youenn Fablet.
2795 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2796 (WebKit::WebSWServerConnection::whenRegistrationReady):
2797 (WebKit::WebSWServerConnection::resolveRegistrationReadyRequests):
2798 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2799 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
2800 * WebProcess/Storage/WebSWClientConnection.cpp:
2801 (WebKit::WebSWClientConnection::matchRegistration):
2802 (WebKit::WebSWClientConnection::whenRegistrationReady):
2803 (WebKit::WebSWClientConnection::registrationReady):
2804 (WebKit::WebSWClientConnection::getRegistrations):
2805 * WebProcess/Storage/WebSWClientConnection.h:
2806 * WebProcess/Storage/WebSWClientConnection.messages.in:
2808 2017-12-05 Youenn Fablet <youenn@apple.com>
2810 Implement setting of service worker to client in SWServer without going to WebProcess
2811 https://bugs.webkit.org/show_bug.cgi?id=180382
2813 Reviewed by Chris Dumez.
2815 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
2816 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2817 (WebKit::WebSWServerConnection::registerServiceWorkerClient):
2818 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2819 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
2820 * WebProcess/Storage/WebSWClientConnection.cpp:
2821 (WebKit::WebSWClientConnection::registerServiceWorkerClient):
2822 (WebKit::WebSWClientConnection::serviceWorkerStartedControllingClient): Deleted.
2823 (WebKit::WebSWClientConnection::serviceWorkerStoppedControllingClient): Deleted.
2824 * WebProcess/Storage/WebSWClientConnection.h:
2826 2017-12-04 Chris Dumez <cdumez@apple.com>
2828 Support container.getRegistration() / getRegistrations() inside service workers
2829 https://bugs.webkit.org/show_bug.cgi?id=180360
2831 Reviewed by Youenn Fablet.
2833 * WebProcess/Storage/WebSWClientConnection.cpp:
2834 (WebKit::WebSWClientConnection::didMatchRegistration):
2835 (WebKit::WebSWClientConnection::didGetRegistrations):
2836 (WebKit::WebSWClientConnection::matchRegistration):
2837 (WebKit::WebSWClientConnection::getRegistrations):
2839 2017-12-04 Brady Eidson <beidson@apple.com>
2842 Get a directory path to SWServers for storing ServiceWorker registrations
2843 https://bugs.webkit.org/show_bug.cgi?id=180362
2847 * StorageProcess/StorageProcess.cpp:
2848 (WebKit::StorageProcess::swServerForSession): Change this ASSERT which is invalid in private browsing sessions.
2850 2017-12-04 Simon Fraser <simon.fraser@apple.com>
2852 Minor DisplayRefreshMonitor-related cleanup
2853 https://bugs.webkit.org/show_bug.cgi?id=179802
2855 Reviewed by Sam Weinig.
2857 Use RunLoopObserver::WellKnownRunLoopOrders. We want to fire before layer flushing.
2859 * UIProcess/WebPageProxy.cpp:
2860 (WebKit::m_configurationPreferenceValues):
2862 2017-12-04 Brent Fulgham <bfulgham@apple.com>
2864 Don't force creation of process pool when enabling resource load statistics
2865 https://bugs.webkit.org/show_bug.cgi?id=180374
2866 <rdar://problem/35545639>
2868 Reviewed by Alex Christensen.
2870 Pass appropriate arguments to the 'processPool' accessor so that we only get the
2871 set of existing process pools. We don't want to pay the cost of launching new
2872 process pools just to set this flag. The flag will be properly set when the pools
2873 are created as soon as a WebView is instantiated.
2875 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2876 (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
2878 2017-12-04 David Quesada <david_quesada@apple.com>
2880 Add a class for parsing application manifests
2881 https://bugs.webkit.org/show_bug.cgi?id=177973
2882 rdar://problem/34747949
2884 Reviewed by Geoffrey Garen.
2886 * Configurations/FeatureDefines.xcconfig: Add ENABLE_APPLICATION_MANIFEST feature flag.
2888 2017-12-04 Wenson Hsieh <wenson_hsieh@apple.com>
2890 Rename a static helper in TouchBarMenuItemData.cpp to match style guidelines.
2891 https://bugs.webkit.org/show_bug.cgi?id=180305
2893 Reviewed by Andy Estes.
2895 Style guidelines state that we should use bare words for getters, so getItemType should just be
2896 itemType. Since this collides with the itemType member variable, this patch also renames that
2897 member variable to the more concise "type".
2899 No change in behavior.
2901 * Shared/TouchBarMenuItemData.cpp:
2903 (WebKit::TouchBarMenuItemData::TouchBarMenuItemData):
2904 (WebKit::TouchBarMenuItemData::encode const):
2905 (WebKit::TouchBarMenuItemData::decode):
2906 (WebKit::getItemType): Deleted.
2907 * Shared/TouchBarMenuItemData.h:
2908 (WebKit::operator==):
2910 2017-12-04 Brian Burg <bburg@apple.com>
2912 Web Automation: add flag to preserve legacy page screenshot behavior
2913 https://bugs.webkit.org/show_bug.cgi?id=180313
2914 <rdar://problem/34379930>
2916 Reviewed by Joseph Pecoraro.
2918 For compatibility with JSON Wire Protocol implemented by Safari,
2919 we need to retain the ability to perform whole page contents
2920 snapshots using Automation.takeScreenshot. Add an extra flag,
2921 clipToViewport, which can be used by W3C-conforming drivers.
2923 * UIProcess/Automation/Automation.json: Add new flag.
2924 * UIProcess/Automation/WebAutomationSession.h:
2925 * UIProcess/Automation/WebAutomationSession.cpp:
2926 (WebKit::WebAutomationSession::takeScreenshot):
2927 * WebProcess/Automation/WebAutomationSessionProxy.h:
2928 * WebProcess/Automation/WebAutomationSessionProxy.messages.in:
2929 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
2930 (WebKit::snapshotRectForScreenshot):
2931 (WebKit::WebAutomationSessionProxy::takeScreenshot):
2932 If the flag is false, take a screenshot of the whole page contents.
2934 2017-12-04 JF Bastien <jfbastien@apple.com>
2936 Update std::expected to match libc++ coding style
2937 https://bugs.webkit.org/show_bug.cgi?id=180264
2939 Reviewed by Alex Christensen.
2941 Update various uses of Expected, mostly renaming valueOr and
2942 hasValue to the STL naming convention.
2944 * NetworkProcess/cache/CacheStorageEngine.cpp:
2945 (WebKit::CacheStorage::Engine::open):
2946 (WebKit::CacheStorage::Engine::retrieveCaches):
2947 (WebKit::CacheStorage::Engine::retrieveRecords):
2948 (WebKit::CacheStorage::Engine::putRecords):
2949 (WebKit::CacheStorage::Engine::deleteMatchingRecords):
2950 (WebKit::CacheStorage::Engine::fetchEntries):
2951 (WebKit::CacheStorage::Engine::clearMemoryRepresentation):
2952 * NetworkProcess/cache/CacheStorageEngineCache.cpp:
2953 (WebKit::CacheStorage::ReadRecordTaskCounter::appendRecord):
2954 (WebKit::CacheStorage::Cache::updateRecordToDisk):
2955 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2956 (WebKit::CacheStorage::Caches::initialize):
2957 (WebKit::CacheStorage::Caches::readCachesFromDisk):
2958 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
2959 (WebKit::NetworkRTCProvider::createResolver):
2960 * Platform/IPC/ArgumentCoders.h:
2962 2017-12-04 Brady Eidson <beidson@apple.com>
2964 Get a directory path to SWServers for storing ServiceWorker registrations.
2965 https://bugs.webkit.org/show_bug.cgi?id=180362
2967 Reviewed by Chris Dumez.
2969 This gets all of the plumbing in place for specifying a ServiceWorker registration storage path
2970 in a particular WebsiteDataStore.
2972 * Shared/Storage/StorageProcessCreationParameters.cpp:
2973 (WebKit::StorageProcessCreationParameters::encode const):
2974 (WebKit::StorageProcessCreationParameters::decode):
2975 * Shared/Storage/StorageProcessCreationParameters.h:
2977 * StorageProcess/StorageProcess.cpp:
2978 (WebKit::StorageProcess::initializeWebsiteDataStore):
2979 (WebKit::StorageProcess::swServerForSession):
2980 * StorageProcess/StorageProcess.h:
2982 * UIProcess/API/APIProcessPoolConfiguration.cpp:
2983 (API::ProcessPoolConfiguration::createWithLegacyOptions):
2984 (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
2985 (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
2986 * UIProcess/API/APIProcessPoolConfiguration.h:
2988 * UIProcess/API/APIWebsiteDataStore.h:
2989 * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2990 (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
2991 * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
2992 (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
2994 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2995 (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
2996 (WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):
2997 * UIProcess/WebProcessPool.cpp:
2998 (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
2999 * UIProcess/WebProcessPool.h:
3001 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3002 (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
3003 (WebKit::WebsiteDataStore::storageProcessParameters):
3004 * UIProcess/WebsiteData/WebsiteDataStore.h:
3005 (WebKit::WebsiteDataStore::resolvedServiceWorkerRegistrationDirectory const):
3007 * UIProcess/gtk/WebProcessPoolGtk.cpp:
3008 (WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):
3010 * UIProcess/wpe/WebProcessPoolWPE.cpp:
3011 (WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):
3013 2017-12-04 Frederic Wang <fwang@igalia.com>
3015 Make ScrollingTreeNode::enclosingFrameNode return the node itself for frame nodes
3016 https://bugs.webkit.org/show_bug.cgi?id=180353
3018 Reviewed by Antonio Gomes.
3020 This function was introduced in bug 175135 to solve a rendering bug with fixed positioned
3021 nodes in overflow nodes. For a frame node, the reference frame to use for fixed nodes is
3022 actually the frame node itself or otherwise we will get the same rendering bug. This patch
3023 makes enclosingFrameNode return the node itself when it is a frame node and renames it to
3024 clarify this behavior. Currently, enclosingFrameNode is not used for frame nodes so the
3025 behavior is unchanged.
3027 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
3028 (WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll): Use auto* and
3029 the new function name.
3031 2017-12-04 Michael Catanzaro <mcatanzaro@igalia.com>
3033 [GTK] Implement PAL::SleepDisabler
3034 https://bugs.webkit.org/show_bug.cgi?id=178485
3036 Reviewed by Carlos Garcia Campos.
3038 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3039 (webkitWebViewBaseDispose):
3040 (webkitWebViewBaseEnterFullScreen):
3041 (webkitWebViewBaseExitFullScreen):
3042 (screenSaverInhibitedCallback): Deleted.
3043 (webkitWebViewBaseSendInhibitMessageToScreenSaver): Deleted.
3044 (screenSaverProxyCreatedCallback): Deleted.
3045 (webkitWebViewBaseInhibitScreenSaver): Deleted.
3046 (webkitWebViewBaseUninhibitScreenSaver): Deleted.
3048 2017-12-03 Yusuke Suzuki <utatane.tea@gmail.com>
3050 WTF shouldn't have both Thread and ThreadIdentifier
3051 https://bugs.webkit.org/show_bug.cgi?id=180308
3053 Reviewed by Darin Adler.
3055 * UIProcess/API/glib/IconDatabase.cpp:
3056 * UIProcess/GenericCallback.h:
3057 (WebKit::GenericCallback::~GenericCallback):
3058 (WebKit::GenericCallback::performCallbackWithReturnValue):
3060 2017-12-03 Chris Dumez <cdumez@apple.com>
3062 Support serviceWorker.postMessage() inside service workers
3063 https://bugs.webkit.org/show_bug.cgi?id=180328
3065 Reviewed by Darin Adler.
3067 Support serviceWorker.postMessage() inside service workers.
3069 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3070 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromClient):
3071 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromServiceWorker):
3072 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
3073 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
3074 * WebProcess/Storage/WebSWClientConnection.cpp:
3075 (WebKit::WebSWClientConnection::postMessageToServiceWorker):
3076 * WebProcess/Storage/WebSWClientConnection.h:
3077 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
3078 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerFromClient):
3079 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerFromServiceWorker):
3080 * WebProcess/Storage/WebSWContextManagerConnection.h:
3081 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
3083 2017-12-03 Chris Dumez <cdumez@apple.com>
3085 Implement self.skipWaiting() inside service workers
3086 https://bugs.webkit.org/show_bug.cgi?id=180329
3088 Reviewed by Darin Adler.
3090 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
3091 (WebKit::WebSWServerToContextConnection::didFinishSkipWaiting):
3092 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
3093 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
3094 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
3095 (WebKit::WebSWContextManagerConnection::skipWaiting):
3096 (WebKit::WebSWContextManagerConnection::didFinishSkipWaiting):
3097 * WebProcess/Storage/WebSWContextManagerConnection.h:
3098 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
3100 2017-12-02 Youenn Fablet <youenn@apple.com>
3102 Implement https://w3c.github.io/ServiceWorker/#clients-getall
3103 https://bugs.webkit.org/show_bug.cgi?id=180276
3105 Reviewed by Chris Dumez.
3107 Add IPC plumbery for clients.matchAll between ServiceWorker process and Storage process.
3109 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
3110 (WebKit::WebSWServerToContextConnection::matchAllCompleted):
3111 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
3112 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
3113 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
3114 (WebKit::WebSWContextManagerConnection::matchAll):
3115 (WebKit::WebSWContextManagerConnection::matchAllCompleted):
3116 * WebProcess/Storage/WebSWContextManagerConnection.h:
3117 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
3119 2017-12-02 Joseph Pecoraro <pecoraro@apple.com>
3121 Remote Web Inspector window always shows up at the default size
3122 https://bugs.webkit.org/show_bug.cgi?id=180284
3123 <rdar://problem/35430255>
3125 Reviewed by Brian Burg.
3127 * UIProcess/mac/RemoteWebInspectorProxyMac.mm:
3128 (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
3129 Give remote web inspector windows an autosave name so that their frame can
3130 be automatically saved and restored by the system.
3132 2017-12-02 Simon Fraser <simon.fraser@apple.com>
3134 Add a log channel for viewports
3135 https://bugs.webkit.org/show_bug.cgi?id=180295
3137 Reviewed by Zalan Bujtas.
3139 Add a "Viewports" log channel to log viewport scaling information, and enhance the
3140 WebKit "VisibleRects" channel to log additional data for the same reason.
3142 * UIProcess/API/Cocoa/WKWebView.mm:
3143 (-[WKWebView _didCommitLayerTree:]):
3144 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
3145 (-[WKWebView _dispatchSetMinimumLayoutSize:]):
3146 (-[WKWebView _endAnimatedResize]):
3147 (-[WKWebView _resizeWhileHidingContentWithUpdates:]):
3148 * WebProcess/WebPage/WebPage.cpp:
3149 (WebKit::WebPage::setFixedLayoutSize):
3150 (WebKit::WebPage::mainFrameDidLayout):
3151 (WebKit::WebPage::didCommitLoad):
3152 * WebProcess/WebPage/ios/WebPageIOS.mm:
3153 (WebKit::scaleAfterViewportWidthChange):
3154 (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
3155 (WebKit::WebPage::dynamicViewportSizeUpdate):
3156 (WebKit::WebPage::resetViewportDefaultConfiguration):
3157 (WebKit::WebPage::viewportConfigurationChanged):
3158 (WebKit::WebPage::updateVisibleContentRects):
3160 2017-12-02 Carlos Garcia Campos <cgarcia@igalia.com>
3162 WebDriver: handle user prompts shown while executing scripts
3163 https://bugs.webkit.org/show_bug.cgi?id=179979
3165 Reviewed by Brian Burg.
3167 * UIProcess/Automation/Automation.json: Add UnexpectedAlertOpen error.
3168 * UIProcess/Automation/WebAutomationSession.cpp:
3169 (WebKit::WebAutomationSession::willShowJavaScriptDialog): Finish pending evaluateJavaScriptFunction operations
3170 with UnexpectedAlertOpen error.
3172 2017-12-02 Wenson Hsieh <wenson_hsieh@apple.com>
3174 Make some minor adjustments to TouchBarMenuData and TouchBarMenuItemData
3175 https://bugs.webkit.org/show_bug.cgi?id=180305
3177 Reviewed by Joseph Pecoraro.
3179 Mark some methods and parameters as const, use the default constructor in more places, and also remove a few
3180 extraneous imported headers.
3182 * Shared/TouchBarMenuData.cpp:
3183 (WebKit::TouchBarMenuData::TouchBarMenuData):
3185 Add a FIXME regarding the use of the 'id' attribute.
3187 (WebKit::TouchBarMenuData::decode):
3188 * Shared/TouchBarMenuData.h:
3189 (WebKit::TouchBarMenuData::items const):
3190 (WebKit::TouchBarMenuData::setID):
3191 (WebKit::TouchBarMenuData::isPageCustomized const):
3192 (WebKit::TouchBarMenuData::items): Deleted.
3193 (WebKit::TouchBarMenuData::isPageCustomized): Deleted.
3194 * Shared/TouchBarMenuItemData.cpp:
3195 (WebKit::getItemType):
3197 Change a helper method from a static class function to a static function in the implementation file.
3199 (WebKit::TouchBarMenuItemData::TouchBarMenuItemData):
3200 (WebKit::TouchBarMenuItemData::encode const):
3201 (WebKit::TouchBarMenuItemData::decode):
3202 (WebKit::TouchBarMenuItemData::getItemType): Deleted.
3203 * Shared/TouchBarMenuItemData.h:
3204 (WebKit::operator==):
3206 Remove the commandName member variable, since it doesn't make sense to propagate an event handler
3207 attribute from WebCore to the client layer.
3209 * UIProcess/WebPageProxy.messages.in:
3211 2017-12-01 Zan Dobersek <zdobersek@igalia.com>
3213 Unreviewed GTK+ debug build fix. Replace ASSERT_UNUSED() with UNUSED_PARAM()
3214 in WebKit::WebPage methods that used to operate on HTMLMenuElement pointer
3215 values (which have been converted to references).
3217 * WebProcess/WebPage/WebPage.cpp:
3218 (WebKit::WebPage::didInsertMenuElement):
3219 (WebKit::WebPage::didRemoveMenuElement):
3220 (WebKit::WebPage::didInsertMenuItemElement):
3221 (WebKit::WebPage::didRemoveMenuItemElement):
3223 2017-12-01 Simon Fraser <simon.fraser@apple.com>
3225 Reduce the number of calls to ViewportConfiguration::updateConfiguration()
3226 https://bugs.webkit.org/show_bug.cgi?id=180299
3228 Reviewed by Zalan Bujtas.
3230 There are several calls to ViewportConfiguration::setDefaultConfiguration() during loading
3231 with the same arguments. We can avoid unnecessary calls to updateConfiguration() by returning
3232 early if the configuration hasn't changed.
3234 Also move the fetching of ViewportConfiguration::xhtmlMobileParameters() from didReceiveMobileDocType()
3235 into resetViewportDefaultConfiguration() where we grab all the other default configs.
3237 * WebProcess/WebPage/WebPage.h:
3238 * WebProcess/WebPage/ios/WebPageIOS.mm:
3239 (WebKit::WebPage::didReceiveMobileDocType):
3240 (WebKit::WebPage::resetViewportDefaultConfiguration):
3242 2017-12-01 Aishwarya Nirmal <anirmal@apple.com>
3244 [Touch Bar Web API] Object representing Touch Bar Menu to send between Web and UI Processes
3245 https://bugs.webkit.org/show_bug.cgi?id=179714
3247 Reviewed by Wenson Hsieh.
3249 These changes define the TouchBarMenuData and TouchBarMenuItemData objects which draw information
3250 from touch bar HTMLMenuElement and HTMLMenuItemElement. These objects represent the contents of
3251 the page-customized touch bar. Changes to the html elements representing the touch bar are sent
3254 * Shared/TouchBarMenuData.cpp: Copied from Source/WebCore/html/HTMLMenuItemElement.cpp.
3255 (WebKit::TouchBarMenuData::TouchBarMenuData):
3256 (WebKit::TouchBarMenuData::addMenuItem):
3257 (WebKit::TouchBarMenuData::removeMenuItem):
3258 (WebKit::TouchBarMenuData::encode const):
3259 (WebKit::TouchBarMenuData::decode):
3260 * Shared/TouchBarMenuData.h: Copied from Source/WebCore/html/HTMLMenuItemElement.h.
3261 (WebKit::TouchBarMenuData::items):
3262 (WebKit::TouchBarMenuData::isPageCustomized):
3263 (WebKit::TouchBarMenuData::setIsPageCustomized):
3264 * Shared/TouchBarMenuItemData.cpp: Added.
3265 (WebKit::TouchBarMenuItemData::getItemType):
3266 (WebKit::TouchBarMenuItemData::TouchBarMenuItemData):
3267 (WebKit::TouchBarMenuItemData::encode const):
3268 (WebKit::TouchBarMenuItemData::decode):
3269 * Shared/TouchBarMenuItemData.h: Added.
3270 (WebKit::operator<):
3271 (WebKit::operator>):
3272 (WebKit::operator<=):
3273 (WebKit::operator>=):
3274 (WebKit::operator==):
3275 (WebKit::operator!=):
3276 * UIProcess/WebPageProxy.cpp:
3277 (WebKit::WebPageProxy::touchBarMenuDataChanged):
3278 (WebKit::WebPageProxy::touchBarMenuItemDataAdded):
3279 (WebKit::WebPageProxy::touchBarMenuItemDataRemoved):
3280 * UIProcess/WebPageProxy.h:
3281 (WebKit::WebPageProxy::touchBarMenuData const):
3282 * UIProcess/WebPageProxy.messages.in:
3283 * WebKit.xcodeproj/project.pbxproj:
3284 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3285 (WebKit::WebChromeClient::didInsertMenuElement):
3286 (WebKit::WebChromeClient::didRemoveMenuElement):
3287 (WebKit::WebChromeClient::didInsertMenuItemElement):
3288 (WebKit::WebChromeClient::didRemoveMenuItemElement):
3289 * WebProcess/WebCoreSupport/WebChromeClient.h:
3290 * WebProcess/WebPage/WebPage.cpp:
3291 (WebKit::WebPage::didInsertMenuElement):
3292 (WebKit::WebPage::didRemoveMenuElement):
3293 (WebKit::WebPage::didInsertMenuItemElement):
3294 (WebKit::WebPage::didRemoveMenuItemElement):
3295 (WebKit::WebPage::sendTouchBarMenuDataRemovedUpdate):
3296 (WebKit::WebPage::sendTouchBarMenuDataAddedUpdate):
3297 (WebKit::WebPage::sendTouchBarMenuItemDataAddedUpdate):
3298 (WebKit::WebPage::sendTouchBarMenuItemDataRemovedUpdate):
3299 * WebProcess/WebPage/WebPage.h:
3301 2017-12-01 Daniel Bates <dabates@apple.com>
3303 Alternative Presentation Button: Provide a way to query for the replaced elements
3304 https://bugs.webkit.org/show_bug.cgi?id=180114
3305 <rdar://problem/35710539>
3307 Reviewed by Tim Horton.
3309 Add SPI to query for the elements that were replaced by an Alternative Presentation Button.
3311 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
3312 (-[WKWebProcessPlugInFrame elementsReplacedByAlternativePresentationButtonWithIdentifier:]): Added.
3313 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
3314 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3315 (WKBundleElementsReplacedByAlternativePresentationButton): Added.
3316 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
3318 2017-12-01 Youenn Fablet <youenn@apple.com>
3320 Implement https://w3c.github.io/ServiceWorker/#clients-get
3321 https://bugs.webkit.org/show_bug.cgi?id=180167
3323 Reviewed by Chris Dumez.
3325 Add IPC plumbery for clientFromId between ServiceWorker process and Storage process.
3327 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
3328 (WebKit::WebSWServerToContextConnection::clientFromIdCompleted):
3329 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
3330 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
3331 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
3332 (WebKit::WebSWContextManagerConnection::findClientByIdentifier):
3333 (WebKit::WebSWContextManagerConnection::findClientByIdentifierCompleted):
3334 * WebProcess/Storage/WebSWContextManagerConnection.h:
3335 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
3337 2017-12-01 Brian Burg <bburg@apple.com>
3339 Web Inspector: move Inspector::Protocol::Array<T> to JSON namespace
3340 https://bugs.webkit.org/show_bug.cgi?id=173662
3342 Reviewed by Joseph Pecoraro.
3344 Adopt new type names.
3346 * UIProcess/Automation/WebAutomationSession.cpp:
3347 (WebKit::WebAutomationSession::getNextContext):
3348 (WebKit::WebAutomationSession::getBrowsingContexts):
3349 (WebKit::buildArrayForCookies):
3350 (WebKit::WebAutomationSession::getSessionPermissions):
3351 * UIProcess/Automation/WebAutomationSession.h:
3353 2017-12-01 Wenson Hsieh <wenson_hsieh@apple.com>
3355 [Attachment Support] Implement SPI for clients to update a given attachment's data
3356 https://bugs.webkit.org/show_bug.cgi?id=180184
3357 <rdar://problem/35355731>
3359 Reviewed by Tim Horton.
3361 Add plumbing to the web process for setting the attachment data (and optionally, the content type and/or file
3362 name) of a given attachment. See WebCore ChangeLog for more detail. Changes covered by new API tests.
3364 * UIProcess/API/APIAttachment.cpp:
3365 (API::Attachment::setDataAndContentType):
3366 * UIProcess/API/APIAttachment.h:
3367 * UIProcess/API/Cocoa/_WKAttachment.h:
3369 Add nullability annotations around _WKAttachment SPI methods.
3371 * UIProcess/API/Cocoa/_WKAttachment.mm:
3372 (-[_WKAttachment setData:newContentType:newFilename:completion:]):
3373 * UIProcess/WebPageProxy.cpp:
3374 (WebKit::WebPageProxy::setAttachmentDataAndContentType):
3375 * UIProcess/WebPageProxy.h:
3376 * WebProcess/WebPage/WebPage.cpp:
3377 (WebKit::WebPage::setAttachmentDataAndContentType):
3378 * WebProcess/WebPage/WebPage.h:
3379 * WebProcess/WebPage/WebPage.messages.in:
3381 2017-12-01 Brady Eidson <beidson@apple.com>
3383 Add Internals.terminateServiceWorker, and the ability to restart service workers for postMessage.
3384 https://bugs.webkit.org/show_bug.cgi?id=180170
3386 Reviewed by Chris Dumez.
3388 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3389 (WebKit::WebSWServerConnection::startFetch):
3390 (WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
3391 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
3392 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
3394 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
3395 (WebKit::WebSWServerToContextConnection::syncTerminateWorker):
3396 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
3398 * StorageProcess/StorageToWebProcessConnection.cpp:
3399 (WebKit::StorageToWebProcessConnection::didReceiveSyncMessage):
3401 * WebProcess/Storage/WebSWClientConnection.cpp:
3402 (WebKit::WebSWClientConnection::syncTerminateWorker):
3403 * WebProcess/Storage/WebSWClientConnection.h:
3405 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
3406 (WebKit::WebSWContextManagerConnection::terminateWorker):
3407 (WebKit::WebSWContextManagerConnection::syncTerminateWorker):
3408 * WebProcess/Storage/WebSWContextManagerConnection.h:
3409 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
3411 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
3412 (WebKit::WebToStorageProcessConnection::didReceiveSyncMessage):
3413 * WebProcess/Storage/WebToStorageProcessConnection.h:
3415 2017-12-01 Youenn Fablet <youenn@apple.com>
3417 Clear WebSWClientConnection in case storage process IPC connection is closing
3418 https://bugs.webkit.org/show_bug.cgi?id=180210
3420 Reviewed by Chris Dumez.
3422 Clear the sw connection maps when connection is closing.
3423 Call related completion handlers for each connection.
3425 * WebProcess/Storage/WebSWClientConnection.cpp:
3426 (WebKit::WebSWClientConnection::connectionToServerLost):
3427 * WebProcess/Storage/WebSWClientConnection.h:
3428 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
3429 (WebKit::WebToStorageProcessConnection::didClose):
3430 (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
3431 (WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession):
3432 * WebProcess/Storage/WebToStorageProcessConnection.h:
3434 2017-12-01 Eric Carlson <eric.carlson@apple.com>
3436 [MediaStream] Use CaptureDevice instead of device ID to identify devices
3437 https://bugs.webkit.org/show_bug.cgi?id=180206
3438 <rdar://problem/35775758>
3440 Reviewed by Youenn Fablet.
3442 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
3443 (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
3444 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
3445 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
3446 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3447 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
3448 (WebKit::UserMediaPermissionRequestManagerProxy::grantAccess):
3449 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
3450 * UIProcess/UserMediaPermissionRequestManagerProxy.h:
3451 * UIProcess/UserMediaPermissionRequestProxy.cpp:
3452 (WebKit::UserMediaPermissionRequestProxy::allow):
3453 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
3454 (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted):
3455 * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
3456 * WebProcess/WebPage/WebPage.cpp:
3457 (WebKit::WebPage::userMediaAccessWasGranted):
3458 * WebProcess/WebPage/WebPage.h:
3459 * WebProcess/WebPage/WebPage.messages.in:
3460 * WebProcess/cocoa/UserMediaCaptureManager.cpp:
3461 (WebKit::UserMediaCaptureManager::createCaptureSource):
3462 * WebProcess/cocoa/UserMediaCaptureManager.h:
3464 2017-12-01 Carlos Garcia Campos <cgarcia@igalia.com>
3466 WebDriver: link and partial links queries don't work in xhtml documents
3467 https://bugs.webkit.org/show_bug.cgi?id=180191
3469 Reviewed by Brian Burg.
3471 We convert the queries to use xpath, which works for html documents, but it doesn't work for xhtml. In case of
3472 xhtml we would need to provide a namespace resolver and elements would need to be prefixed with 'xhtml:'. It's
3473 easier to simply iterate the link elements and compare the text.
3475 Fixes: imported/w3c/webdriver/tests/retrieval/find_element_from_element.py::test_xhtml_namespace[link text-full link text]