1 2018-01-19 Zach Li <zacharyli323@gmail.com>
3 Expose Safe Browsing SPI
4 https://bugs.webkit.org/show_bug.cgi?id=181804
5 <rdar://problem/36626946>
7 Reviewed by Alex Christensen.
9 If client is using Apple internal SDK, then we can just import the header; if not,
10 then we declare necessary symbols that client will need.
12 * Configurations/WebKit.xcconfig:
13 Only link against SafariSafeBrowsing framework on macOS High Sierra
14 and iOS 11 and above. Weak link against SafariSafeBrowsing framework
15 because it is not present on the Base system.
17 * Platform/spi/Cocoa/SafeBrowsingSPI.h: Added.
19 * WebKit.xcodeproj/project.pbxproj:
20 Added SafeBrowsingSPI.h.
22 * WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/11/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd:
25 2018-01-18 Chris Dumez <cdumez@apple.com>
27 We should be able to terminate service workers that are unresponsive
28 https://bugs.webkit.org/show_bug.cgi?id=181563
29 <rdar://problem/35280031>
31 Reviewed by Alex Christensen.
33 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
34 (WebKit::WebSWContextManagerConnection::terminateWorker):
35 Use a 10 second timeout for forcefully exiting the service worker process when
36 the service worker in question fails to terminate.
38 (WebKit::WebSWContextManagerConnection::syncTerminateWorker):
39 Use a 100ms timeout for forcefully exiting the service worker process when
40 the service worker in question fails to terminate. This method is only called
41 from the layout tests, which is why we use a very short timeout.
43 2018-01-18 Ryan Haddad <ryanhaddad@apple.com>
45 Unreviewed, suppress deprecation warnings to fix the build with a newer SDK.
47 * UIProcess/ios/WKPDFPageNumberIndicator.mm:
48 (-[WKPDFPageNumberIndicator _makeRoundedCorners]):
50 2018-01-18 Youenn Fablet <youenn@apple.com>
52 Do not go to the storage process when loading a main resource if there is no service worker registered
53 https://bugs.webkit.org/show_bug.cgi?id=181395
55 Reviewed by Chris Dumez.
57 Add a new web process creation parameter to know whether there is any service worker registered at web process creation time.
58 If there is none, the web process will then start to load HTTP resources from the network.
59 The connection to the storage process is then executed when receiving the first bytes of the main resource.
60 This connection is needed as other web processes may create service workers at any given time.
61 If there is one registered service worker, the web process will wait for its connection to the storage process to be active.
63 * Shared/WebProcessCreationParameters.cpp:
64 (WebKit::WebProcessCreationParameters::encode const):
65 (WebKit::WebProcessCreationParameters::decode):
66 * Shared/WebProcessCreationParameters.h:
67 * UIProcess/ServiceWorkerProcessProxy.cpp:
68 (WebKit::ServiceWorkerProcessProxy::hasRegisteredServiceWorkers):
69 * UIProcess/ServiceWorkerProcessProxy.h:
70 * UIProcess/WebProcessPool.cpp:
71 (WebKit::WebProcessPool::initializeNewWebProcess):
72 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
73 (WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession):
74 * WebProcess/Storage/WebServiceWorkerProvider.h:
75 * WebProcess/Storage/WebToStorageProcessConnection.h:
76 (WebKit::WebToStorageProcessConnection::existingServiceWorkerConnectionForSession):
77 * WebProcess/WebProcess.cpp:
78 (WebKit::WebProcess::initializeWebProcess):
80 2018-01-18 Chris Dumez <cdumez@apple.com>
82 Regression(r223149): WebProcessProxy::didClose() no longer refs WebPageProxy objects
83 https://bugs.webkit.org/show_bug.cgi?id=181771
84 <rdar://problem/36566237>
86 Reviewed by Brady Eidson.
88 * UIProcess/WebProcessProxy.cpp:
89 (WebKit::WebProcessProxy::didClose):
90 Use copyToVectorOf<RefPtr<WebPageProxy>>() to maintain pre-r223149 behavior
93 2018-01-18 Dan Bernstein <mitz@apple.com>
95 [Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
96 https://bugs.webkit.org/show_bug.cgi?id=181803
98 Reviewed by Tim Horton.
100 * Configurations/Base.xcconfig: Updated.
101 * Configurations/DebugRelease.xcconfig: Ditto.
102 * Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
103 * Configurations/Version.xcconfig: Updated.
104 * Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings
105 useful for defining settings that depend on the target macOS version.
107 2018-01-18 Chris Dumez <cdumez@apple.com>
109 Service Workers restored from persistent storage have 'redundant' state
110 https://bugs.webkit.org/show_bug.cgi?id=181749
111 <rdar://problem/36556486>
113 Reviewed by Youenn Fablet.
115 Allow service workers to intercept custom protocol loads as this is useful for
118 * WebProcess/Network/WebLoaderStrategy.cpp:
119 (WebKit::WebLoaderStrategy::scheduleLoad):
120 (WebKit::WebLoaderStrategy::tryLoadingUsingURLSchemeHandler):
121 * WebProcess/Network/WebLoaderStrategy.h:
123 2018-01-18 Brent Fulgham <bfulgham@apple.com>
125 REGRESSION(r225858): Sandbox violations due to blocked access to Spotlight search preferences
126 https://bugs.webkit.org/show_bug.cgi?id=181797
127 <rdar://problem/36546412>
129 Reviewed by Eric Carlson.
131 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add the read permission for
132 'com.apple.lookup.shared' to support DataDetectors.
134 2018-01-17 John Wilander <wilander@apple.com>
136 Resource Load Statistics: Block cookies for prevalent resources without user interaction
137 https://bugs.webkit.org/show_bug.cgi?id=177394
138 <rdar://problem/34613960>
140 Reviewed by Alex Christensen.
142 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
143 Now has m_hasBeenSetToUseStatelessCookieStorage to handle
145 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
146 (WebKit::NetworkDataTaskCocoa::statelessCookieStorage):
147 Returns singleton empty, deny-all cookie storage for cookie blocking.
148 The ugly pragma instructions for clang are because the NSString
149 parameter for _initWithIdentifier was not marked nullable pre-Sierra.
150 (WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):
151 Instead of just decision making, this now applies the policy.
152 (WebKit::NetworkDataTaskCocoa::applyCookiePartitioningPolicy):
154 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
155 Now blocks cookies for domains where cookies will be purged anyway.
156 (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
157 Now blocks cookies for domains where cookies will be purged anyway.
158 (WebKit::shouldChangePartition): Deleted.
159 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
160 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
161 Now downgrades for blocked cookies instead of partitioned cookies.
162 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
163 Now downgrades for blocked cookies instead of partitioned cookies.
166 2018-01-17 Stephan Szabo <stephan.szabo@sony.com>
168 [Curl] Use ResourceRequest::encodeWithPlatformData()
169 https://bugs.webkit.org/show_bug.cgi?id=181768
171 Reviewed by Alex Christensen.
173 * Shared/curl/WebCoreArgumentCodersCurl.cpp:
174 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
175 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
177 2018-01-17 Matt Lewis <jlewis3@apple.com>
179 Unreviewed, rolling out r227076.
181 This breaks internal builds
185 "Resource Load Statistics: Block cookies for prevalent
186 resources without user interaction"
187 https://bugs.webkit.org/show_bug.cgi?id=177394
188 https://trac.webkit.org/changeset/227076
190 2018-01-17 Michael Catanzaro <mcatanzaro@igalia.com>
192 WEBKIT_FRAMEWORK should not modify file-global include directories
193 https://bugs.webkit.org/show_bug.cgi?id=181656
195 Reviewed by Konstantin Tokarev.
200 2018-01-17 Youenn Fablet <youenn@apple.com>
202 Put fetch request keepAlive behind a runtime flag
203 https://bugs.webkit.org/show_bug.cgi?id=181592
205 Reviewed by Chris Dumez.
207 * Shared/WebPreferences.yaml:
208 * UIProcess/API/C/WKPreferences.cpp:
209 (WKPreferencesSetFetchAPIKeepAliveEnabled):
210 (WKPreferencesGetFetchAPIKeepAliveEnabled):
211 * UIProcess/API/C/WKPreferencesRefPrivate.h:
213 2018-01-17 John Wilander <wilander@apple.com>
215 Resource Load Statistics: Block cookies for prevalent resources without user interaction
216 https://bugs.webkit.org/show_bug.cgi?id=177394
217 <rdar://problem/34613960>
219 Reviewed by Alex Christensen.
221 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
222 Now has m_hasBeenSetToUseStatelessCookieStorage to handle
224 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
225 (WebKit::NetworkDataTaskCocoa::statelessCookieStorage):
226 Returns singleton empty, deny-all cookie storage for cookie blocking.
227 (WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):
228 Instead of just decision making, this now applies the policy.
229 (WebKit::NetworkDataTaskCocoa::applyCookiePartitioningPolicy):
231 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
232 Now blocks cookies for domains where cookies will be purged anyway.
233 (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
234 Now blocks cookies for domains where cookies will be purged anyway.
235 (WebKit::shouldChangePartition): Deleted.
236 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
237 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
238 Now downgrades for blocked cookies instead of partitioned cookies.
239 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
240 Now downgrades for blocked cookies instead of partitioned cookies.
242 2018-01-17 Daniel Bates <dabates@apple.com>
244 REGRESSION (r222795): Cardiogram never signs in
245 https://bugs.webkit.org/show_bug.cgi?id=181693
246 <rdar://problem/36286293>
248 Reviewed by Ryosuke Niwa.
250 Exempt Cardiogram from the XHR header restrictions in r222795.
252 Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers.
253 However Cardiogram also depends on such functionality.
255 * Shared/WebPreferences.yaml:
256 * UIProcess/API/Cocoa/WKWebView.mm:
257 (shouldAllowSettingAnyXHRHeaderFromFileURLs):
258 (-[WKWebView _initializeWithConfiguration:]):
259 * UIProcess/Cocoa/VersionChecks.h:
261 2018-01-17 Wenson Hsieh <wenson_hsieh@apple.com>
263 Add injected bundle SPI to replace subresource URLs when dropping or pasting rich content
264 https://bugs.webkit.org/show_bug.cgi?id=181637
265 <rdar://problem/36508471>
267 Reviewed by Tim Horton.
269 Add new injected bundle SPI, replacementURLForResource, which clients may use to provide a replacement URL to
270 represent an archive resource, given the resource's data and MIME type.
272 * WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
273 (API::InjectedBundle::EditorClient::replacementURLForResource):
274 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
275 * WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
277 Add replacementURLForResource, and also bump the current injected bundle editor client version to 2.
279 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
280 (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):
281 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
282 (WebKit::InjectedBundlePageEditorClient::replacementURLForResource):
283 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
284 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
285 (WebKit::WebEditorClient::replacementURLForResource):
286 * WebProcess/WebCoreSupport/WebEditorClient.h:
288 2018-01-17 Zan Dobersek <zdobersek@igalia.com>
290 [Cairo] Don't mirror global alpha and image interpolation quality state values in PlatformContextCairo
291 https://bugs.webkit.org/show_bug.cgi?id=181725
293 Reviewed by Carlos Garcia Campos.
295 * Shared/cairo/ShareableBitmapCairo.cpp:
296 (WebKit::ShareableBitmap::paint):
297 Adjust the PlatformContextCairo::drawSurfaceToContext() invocation.
298 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
299 (WebKit::convertCairoSurfaceToShareableBitmap): Ditto.
301 2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
303 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.6 release.
305 * gtk/NEWS: Add release notes for 2.19.6.
307 2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
309 [GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds
310 https://bugs.webkit.org/show_bug.cgi?id=179914
312 Reviewed by Žan Doberšek.
314 Add symbols detected by check-for-global-bss-symbols-in-webkigtk-libs to the version script.
316 * webkitglib-symbols.map:
318 2018-01-17 Youenn Fablet <youenn@apple.com>
320 Clear Caches volatile storage as a memory optimization.
321 https://bugs.webkit.org/show_bug.cgi?id=181643
323 Reviewed by Chris Dumez.
325 clearMemoryRepresentation clears m_caches which exposes data potentially stored in m_volatileStorage.
326 Clearing m_volatileStorage allows releasing some memory.
328 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
329 (WebKit::CacheStorage::Caches::clearMemoryRepresentation):
331 2018-01-17 Zan Dobersek <zdobersek@igalia.com>
333 [Cairo] Use one-time ShadowBlur objects when performing shadowing
334 https://bugs.webkit.org/show_bug.cgi?id=181720
336 Reviewed by Carlos Garcia Campos.
338 * Shared/cairo/ShareableBitmapCairo.cpp:
339 (WebKit::ShareableBitmap::paint):
340 Adjust the PlatformContextCairo::drawSurfaceToContext() invocation.
341 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
342 (WebKit::convertCairoSurfaceToShareableBitmap): Ditto.
344 2018-01-16 Fujii Hironori <Hironori.Fujii@sony.com>
346 [CMake] Remove WebCoreDerivedSources library target
347 https://bugs.webkit.org/show_bug.cgi?id=181664
349 Reviewed by Carlos Garcia Campos.
351 * CMakeLists.txt: Do not link WebCoreDerivedSources.
352 * PlatformGTK.cmake: Appended WebCore after WebCorePlatformGTK in WebKit_LIBRARIES.
353 * PlatformWin.cmake: Ditto.
355 2018-01-16 Alex Christensen <achristensen@webkit.org>
357 Merge sync and async code paths for getting context menus
358 https://bugs.webkit.org/show_bug.cgi?id=181423
360 Reviewed by Joseph Pecoraro.
362 What a mess. We had a code path for asynchronous context menu generation and a different one for synchronous context menu generation.
363 This makes it so there is just one. At the API level we see if there is an asynchronous delegate to call, then synchronous.
364 There is a subtle theoretical change in behaviour because m_page.contextMenuClient().showContextMenu is now called for the asynchronous
365 case and it wasn't before, but the one C API client that uses this has nullptr as it's WKPageShowContextMenuCallback, so we won't break anything!
367 * UIProcess/API/APIContextMenuClient.h:
368 (API::ContextMenuClient::getContextMenuFromProposedMenu):
369 (API::ContextMenuClient::getContextMenuFromProposedMenuAsync): Deleted.
370 * UIProcess/API/C/WKPage.cpp:
371 (WKPageSetPageContextMenuClient):
372 * UIProcess/API/glib/WebKitContextMenuClient.cpp:
373 * UIProcess/WebContextMenuProxy.h:
374 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
375 (WebKit::WebContextMenuProxyGtk::show):
376 (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems):
377 * UIProcess/gtk/WebContextMenuProxyGtk.h:
378 * UIProcess/mac/WebContextMenuProxyMac.h:
379 * UIProcess/mac/WebContextMenuProxyMac.mm:
380 (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
381 (WebKit::WebContextMenuProxyMac::showContextMenu):
382 * UIProcess/wpe/WebContextMenuProxyWPE.h:
384 2018-01-16 Michael Catanzaro <mcatanzaro@igalia.com>
386 Don't link WebKit target directly to JavaScriptCore
387 https://bugs.webkit.org/show_bug.cgi?id=181688
389 Reviewed by Alex Christensen.
391 It's safer if we only link to the next lower-layered lib in the stack, so let's just link
392 directly to WebCore instead.
394 And WPE doesn't need to specify it twice.
400 2018-01-16 Eric Carlson <eric.carlson@apple.com>
402 AVSampleBufferDisplayLayer should be flushed when application activates
403 https://bugs.webkit.org/show_bug.cgi?id=181623
404 <rdar://problem/36487738>
406 Reviewed by Darin Adler.
408 * WebProcess/WebPage/ios/WebPageIOS.mm:
409 (WebKit::WebPage::applicationWillResignActive): Call page.
410 (WebKit::WebPage::applicationDidEnterBackground): Ditto, let it call libWebRTCProvider.
411 (WebKit::WebPage::applicationWillEnterForeground): Call page.
412 (WebKit::WebPage::applicationDidBecomeActive): Ditto, let it call libWebRTCProvider.
414 2018-01-16 Zach Li <zachli@apple.com>
416 Add pop-up policy support in website policies.
417 https://bugs.webkit.org/show_bug.cgi?id=181544.
418 rdar://problem/30521400.
420 Reviewed by Alex Christensen.
422 * Shared/WebsitePoliciesData.cpp: Encode and decode
424 (WebKit::WebsitePoliciesData::encode const):
425 (WebKit::WebsitePoliciesData::decode):
426 (WebKit::WebsitePoliciesData::applyToDocumentLoader):
427 Apply the pop-up policy from website policies to the
430 * Shared/WebsitePoliciesData.h:
432 * Shared/WebsitePopUpPolicy.h:
433 Added for declaring enum WebsitePopUpPolicy.
435 * UIProcess/API/APIWforebsitePolicies.cpp:
436 Include pop-up policy in website policies.
437 (API::WebsitePolicies::WebsitePolicies):
438 (API::WebsitePolicies::data):
439 * UIProcess/API/APIWebsitePolicies.h:
441 * UIProcess/API/C/WKWebsitePolicies.cpp:
442 Added C API to get and set pop-up policy on
444 (WKWebsitePoliciesGetPopUpPolicy):
445 (WKWebsitePoliciesSetPopUpPolicy):
446 * UIProcess/API/C/WKWebsitePolicies.h:
448 * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
449 Added Obj-C API to get and set pop-up policy
451 * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
452 (-[_WKWebsitePolicies setPopUpPolicy:]):
453 (-[_WKWebsitePolicies popUpPolicy]):
455 * WebKit.xcodeproj/project.pbxproj:
456 Added WebsitePopUpPolicy.h.
458 2018-01-16 Fujii Hironori <Hironori.Fujii@sony.com>
460 [CMake][Mac] Fix the build errors
461 https://bugs.webkit.org/show_bug.cgi?id=181665
463 Reviewed by Alex Christensen.
465 * CMakeLists.txt: Added TouchBarMenuData.cpp and TouchBarMenuItemData.cpp to compile.
466 * PlatformMac.cmake: Added _WKApplicationManifest.mm, WKInspectorWKWebView.mm and WKInspectorWindow.mm to compile.
467 * UIProcess/API/Cocoa/WKProcessPool.mm:
468 (-[WKProcessPool _webPageContentProcessCount]): Call WebProcessPool::serviceWorkerProxy() only if ENABLE(SERVICE_WORKER).
470 2018-01-16 Wenson Hsieh <wenson_hsieh@apple.com>
472 [Attachment Support] Provide the `src` of an attachment to the UI delegate when an attachment is inserted
473 https://bugs.webkit.org/show_bug.cgi?id=181638
474 <rdar://problem/36508702>
476 Reviewed by Dan Bernstein.
478 Add a `source` parameter to the `didInsertAttachment` codepath for notifying WebKit2 clients when attachment
479 elements are inserted into the document.
481 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
482 * UIProcess/API/Cocoa/WKWebView.mm:
483 (-[WKWebView _didInsertAttachment:withSource:]):
484 (-[WKWebView _didInsertAttachment:]): Deleted.
485 * UIProcess/API/Cocoa/WKWebViewInternal.h:
486 * UIProcess/Cocoa/PageClientImplCocoa.h:
487 * UIProcess/Cocoa/PageClientImplCocoa.mm:
488 (WebKit::PageClientImplCocoa::didInsertAttachment):
489 * UIProcess/PageClient.h:
490 (WebKit::PageClient::didInsertAttachment):
491 * UIProcess/WebPageProxy.cpp:
492 (WebKit::WebPageProxy::didInsertAttachment):
493 * UIProcess/WebPageProxy.h:
494 * UIProcess/WebPageProxy.messages.in:
495 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
496 (WebKit::WebEditorClient::didInsertAttachment):
497 * WebProcess/WebCoreSupport/WebEditorClient.h:
499 2018-01-15 Youenn Fablet <youenn@apple.com>
501 ASSERTION FAILED: m_ptr under WebKit::CacheStorage::Caches::writeRecord
502 https://bugs.webkit.org/show_bug.cgi?id=181401
503 <rdar://problem/36379022>
505 Reviewed by Darin Adler.
507 m_isInitialized is true but m_storage is set to nullptr when calling writeRecord.
508 The only case seems to be if:
509 - We are doing persistent storage
510 - We are traversing the storage to do the initialization. At that point m_storage is set to a correct value.
511 - clearMemoryRepresentation is called, thus setting m_storage to nullptr and m_isInitialized to false.
512 We fix this by making clearMemoryRepresentation a no-op if we are initializing the caches.
513 clearMemoryRepresentation is about cleaning the in-memory information of the caches and the memory representation is empty at init time.
514 Nullifying m_storage is a memory consumption optimization.
516 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
517 (WebKit::CacheStorage::Caches::clearMemoryRepresentation):
519 2018-01-12 Wenson Hsieh <wenson_hsieh@apple.com>
521 Unreviewed, speculative build fix after r226899.
523 Add an empty implementation for PageClient::startDrag.
525 * UIProcess/PageClient.h:
526 (WebKit::PageClient::startDrag):
528 2018-01-12 Brent Fulgham <bfulgham@apple.com>
530 [iOS] Remove unneeded accessibility-related sandbox rules
531 https://bugs.webkit.org/show_bug.cgi?id=181619
532 <rdar://problem/36485356>
534 Reviewed by Eric Carlson.
536 Remove a number of sandbox exceptions that were in place for accessibility support. These are
537 not needed in the WebContent process, since Safari (not WebKit) handles the accessibility
540 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
542 2018-01-12 Keith Rollin <krollin@apple.com>
544 Logged JSON should escape "'s and \'s in strings.
545 https://bugs.webkit.org/show_bug.cgi?id=181608
547 Reviewed by Brent Fulgham.
549 * NetworkProcess/NetworkResourceLoader.cpp:
550 (WebKit::NetworkResourceLoader::logCookieInformation const):
552 2018-01-12 Megan Gardner <megan_gardner@apple.com>
554 Unreviewed, fixing error in UIKitSPI.h.
556 * Platform/spi/ios/UIKitSPI.h:
558 2018-01-12 Megan Gardner <megan_gardner@apple.com>
560 Implement MultiDocument protocol for restoring focus to a WKWebView
561 https://bugs.webkit.org/show_bug.cgi?id=181510
563 Reviewed by Dan Bernstein.
565 Support the UIKit protocol for restoring focus to a what previously had focus.
566 WebKit already knows what node was previously being focused by the DOM, we merely
567 need to be asked to turn the focus on again.
568 Resubmitting https://trac.webkit.org/changeset/226826 as it broke internal builds
570 * Platform/spi/ios/UIKitSPI.h:
571 * UIProcess/ios/WKContentViewInteraction.h:
572 * UIProcess/ios/WKContentViewInteraction.mm:
573 (-[WKContentView _restoreFocusWithToken:]):
574 (-[WKContentView _preserveFocusWithToken:destructively:]):
576 2018-01-12 Youenn Fablet <youenn@apple.com>
578 WebProcess should pass the registration identifier and not the worker identifier for fetch events
579 https://bugs.webkit.org/show_bug.cgi?id=181591
581 Reviewed by Chris Dumez.
583 Use service worker registration identifier to compute the active service worker identifier responsible to handle the fetch event.
585 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
586 (WebKit::WebSWServerConnection::startFetch):
587 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
588 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
589 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
590 (WebKit::ServiceWorkerClientFetch::start):
591 * WebProcess/Storage/WebSWClientConnection.cpp:
592 (WebKit::WebSWClientConnection::startFetch):
593 * WebProcess/Storage/WebSWClientConnection.h:
594 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
595 (WebKit::shouldHandleFetch):
597 2018-01-12 Ryan Haddad <ryanhaddad@apple.com>
599 Unreviewed, rolling out r226826.
601 Breaks internal builds.
605 "Implement MultiDocument protocol for restoring focus to a
607 https://bugs.webkit.org/show_bug.cgi?id=181510
608 https://trac.webkit.org/changeset/226826
610 2018-01-12 Wenson Hsieh <wenson_hsieh@apple.com>
612 [WK2] Unify macOS and iOS codepaths in the UI process when starting a drag
613 https://bugs.webkit.org/show_bug.cgi?id=181574
615 Reviewed by Tim Horton.
617 Rearrange some macOS drag start logic in the UI process so that it uses the same codepaths in WebPageProxy as
618 iOS. Namely, startDrag should just forward the DragItem and drag image handle along to the appropriate views on
619 each platform (WKContentView and WebViewImpl).
621 There should be no change in behavior.
623 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
625 Both macOS and iOS now funnel through this method.
627 * UIProcess/Cocoa/WebViewImpl.h:
628 * UIProcess/Cocoa/WebViewImpl.mm:
629 (WebKit::WebViewImpl::startDrag):
630 (WebKit::WebViewImpl::dragImageForView): Deleted.
632 Rename dragImageForView to startDrag. Move the call to didStartDrag() here, and call dragCancelled() in the
633 case where we bailed from starting the drag (due to failing to create a drag image).
635 * UIProcess/PageClient.h:
636 * UIProcess/ios/PageClientImplIOS.h:
637 * UIProcess/ios/PageClientImplIOS.mm:
638 (WebKit::PageClientImpl::setDragImage): Deleted.
640 Rename setDragImage to startDrag.
642 * UIProcess/mac/PageClientImplMac.h:
643 * UIProcess/mac/PageClientImplMac.mm:
644 (WebKit::PageClientImpl::startDrag):
645 (WebKit::PageClientImpl::setDragImage): Deleted.
646 * UIProcess/mac/WebPageProxyMac.mm:
647 (WebKit::WebPageProxy::startDrag): Deleted.
649 2018-01-12 Antoine Quint <graouts@apple.com>
651 Add support for the frames() timing function
652 https://bugs.webkit.org/show_bug.cgi?id=181585
653 <rdar://problem/36463317>
657 Add the ability to endode and decode the frames() timing function.
659 * Shared/WebCoreArgumentCoders.cpp:
660 (IPC::ArgumentCoder<FramesTimingFunction>::encode):
661 (IPC::ArgumentCoder<FramesTimingFunction>::decode):
662 * Shared/WebCoreArgumentCoders.h:
663 * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
664 (WebKit::PlatformCAAnimationRemote::Properties::encode const):
665 (WebKit::PlatformCAAnimationRemote::Properties::decode):
667 2018-01-11 Keith Miller <keith_miller@apple.com>
669 Rename ENABLE_ASYNC_ITERATION to ENABLE_JS_ASYNC_ITERATION
670 https://bugs.webkit.org/show_bug.cgi?id=181573
672 Reviewed by Simon Fraser.
674 * Configurations/FeatureDefines.xcconfig:
676 2018-01-11 Brent Fulgham <bfulgham@apple.com>
678 REGRESSION(r219530): ResourceLoadStatisticsPersistentStorage should be read-only in ephemeral sessions
679 https://bugs.webkit.org/show_bug.cgi?id=181136
680 <rdar://problem/36116604>
682 Reviewed by Chris Dumez.
684 Some uses of WebKit involve running a UIProcess as an ephemeral session for the life of the process. In this
685 case, we do not initialize the data path for the set of load statistics triggering an assertion.
687 We actually intended ephemeral sessions to consume the existing resource load data (presumably captured during
688 non-ephemeral browsing). This would be a read-only mode, where it would not add new entries to the load
689 statistics, but would take advantage of existing observations. Currently that does not happen (for this type
690 of WebKit embed), which forces each run as an ephemeral session to build up in-memory browsing data until it has
691 enough observations to begin modifying loads.
693 We need to set the ResourceLoadStatisticsPersistentStorage object to a "read only" mode in this case, so
694 that it read (but does not write) from this database.
696 Tested by ephemeral website data TestWebKitAPI tests.
698 * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
699 (WebKit::ResourceLoadStatisticsPersistentStorage::create): Added to allow creation of the right style of
701 (WebKit::ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage): Initialize the
703 (WebKit::ResourceLoadStatisticsPersistentStorage::asyncWriteTimerFired): RELEASE_ASSERT that we never run
704 this method when in "read only" mode.
705 (WebKit::ResourceLoadStatisticsPersistentStorage::writeMemoryStoreToDisk): Ditto.
706 (WebKit::ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore): Return early if asked to
707 schedule a write operation for a "read only" persistent store.
708 (WebKit::ResourceLoadStatisticsPersistentStorage::finishAllPendingWorkSynchronously): RELEASE_ASSERT if we
709 ever shut down in "read only" mode with an active write timer.
710 * UIProcess/ResourceLoadStatisticsPersistentStorage.h:
711 * UIProcess/WebResourceLoadStatisticsStore.cpp:
712 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): Pass a flag indicating whether the
713 storage session is ephemeral or not.
714 * UIProcess/WebResourceLoadStatisticsStore.h:
716 2018-01-11 Keith Rollin <krollin@apple.com>
718 Add optional logging of ITP-related user interaction information
719 https://bugs.webkit.org/show_bug.cgi?id=181556
721 Reviewed by Brent Fulgham.
723 In order to support the tracking of the efficacy of Intelligent
724 Tracking Protection, add some logging indicating when the user
725 interacts with a page in a way that affects cookie partitioning. This
726 logging is off by default, and is enabled with `defaults write -g
727 WebKitLogCookieInformation -bool true`.
729 * Shared/WebProcessCreationParameters.cpp:
730 (WebKit::WebProcessCreationParameters::encode const):
731 (WebKit::WebProcessCreationParameters::decode):
732 * Shared/WebProcessCreationParameters.h:
733 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
734 (WebKit::WebProcessPool::platformInitializeWebProcess):
735 * WebProcess/WebProcess.cpp:
736 (WebKit::WebProcess::initializeWebProcess):
738 2018-01-11 Megan Gardner <megan_gardner@apple.com>
740 Implement MultiDocument protocol for restoring focus to a WKWebView
741 https://bugs.webkit.org/show_bug.cgi?id=181510
743 Reviewed by Dan Bernstein.
745 Support the UIKit protocol for restoring focus to a what previously had focus.
746 WebKit already has a method to silently remove and replace focus, without telling the
747 web process about the unfocus and refocusing, so we're just using that.
749 * Platform/spi/ios/UIKitSPI.h:
750 * UIProcess/ios/WKContentViewInteraction.h:
751 * UIProcess/ios/WKContentViewInteraction.mm:
752 (-[WKContentView _restoreFocusWithToken:]):
753 (-[WKContentView _preserveFocusWithToken:destructively:]):
756 2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com>
758 Don't load inline data when requesting info for an attachment element backed by a file path
759 https://bugs.webkit.org/show_bug.cgi?id=181550
761 Reviewed by Tim Horton
763 See WebCore/ChangeLog for more information.
765 * UIProcess/API/Cocoa/_WKAttachment.mm:
766 (-[_WKAttachmentInfo initWithInfo:]):
767 (-[_WKAttachmentInfo fileLoadingError]):
768 (-[_WKAttachment requestInfo:]):
770 2018-01-11 Commit Queue <commit-queue@webkit.org>
772 Unreviewed, rolling out r226789 and r226794.
773 https://bugs.webkit.org/show_bug.cgi?id=181564
775 broke API tests (Requested by alexchristensen on #webkit).
779 "Merge sync and async code paths for getting context menus"
780 https://bugs.webkit.org/show_bug.cgi?id=181423
781 https://trac.webkit.org/changeset/226789
783 "Revert changes accidentally committed with r226789."
784 https://bugs.webkit.org/show_bug.cgi?id=181423
785 https://trac.webkit.org/changeset/226794
787 2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com>
789 Send PromisedBlobInfo to the client through DragItem instead of DragClient::prepareToDragPromisedBlob
790 https://bugs.webkit.org/show_bug.cgi?id=181497
792 Reviewed by Tim Horton.
794 Refactor drag and drop support for promised blob data, so that blob info is shipped across to the client layer
795 via DragItem in the DragClient::startDrag codepath, rather than via a separate prepareToDragPromisedBlob client
796 codepath that stages promised blob info.
798 * UIProcess/Cocoa/WebViewImpl.h:
799 * UIProcess/Cocoa/WebViewImpl.mm:
800 (WebKit::WebViewImpl::prepareToDragPromisedBlob): Deleted.
801 * UIProcess/PageClient.h:
802 (WebKit::PageClient::prepareToDragPromisedBlob): Deleted.
803 * UIProcess/WebPageProxy.cpp:
804 (WebKit::WebPageProxy::prepareToDragPromisedBlob): Deleted.
805 * UIProcess/WebPageProxy.h:
806 * UIProcess/WebPageProxy.messages.in:
807 * UIProcess/ios/PageClientImplIOS.h:
808 * UIProcess/ios/PageClientImplIOS.mm:
809 (WebKit::PageClientImpl::prepareToDragPromisedBlob): Deleted.
810 * UIProcess/ios/WKContentViewInteraction.h:
811 * UIProcess/ios/WKContentViewInteraction.mm:
812 (-[WKContentView _startDrag:item:]):
813 * UIProcess/mac/PageClientImplMac.h:
814 * UIProcess/mac/PageClientImplMac.mm:
815 (WebKit::PageClientImpl::prepareToDragPromisedBlob): Deleted.
816 * WebProcess/WebCoreSupport/WebDragClient.cpp:
817 (WebKit::WebDragClient::prepareToDragPromisedBlob): Deleted.
818 * WebProcess/WebCoreSupport/WebDragClient.h:
819 * WebProcess/WebPage/WebPage.cpp:
820 (WebKit::WebPage::prepareToDragPromisedBlob): Deleted.
821 * WebProcess/WebPage/WebPage.h:
823 2018-01-09 Per Arne Vollan <pvollan@apple.com>
825 VoiceOver does not work when the WebContent process is using NSRunLoop.
826 https://bugs.webkit.org/show_bug.cgi?id=181331
827 <rdar://problem/36408004>
829 Reviewed by Brent Fulgham.
831 When the WebContent process is using NSRunLoop instead of the NSApplication run loop,
832 accessibility must be initialized for VoiceOver to work. This patch also switches to
833 using NSRunLoop in the WebContent process.
835 * Configurations/WebContentService.xcconfig:
836 * Platform/IPC/mac/ConnectionMac.mm:
837 (IPC::AccessibilityProcessSuspendedNotification): Remove unneccessary workaround.
838 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist: Switch to NSRunLoop.
839 * WebProcess/cocoa/WebProcessCocoa.mm:
840 (WebKit::WebProcess::platformInitializeProcess): Initialize accessibility.
842 2018-01-11 Don Olmstead <don.olmstead@sony.com>
844 WebContextMenuListenerProxy.cpp not including config on first line
845 https://bugs.webkit.org/show_bug.cgi?id=181552
847 Reviewed by Alex Christensen.
849 * UIProcess/WebContextMenuListenerProxy.cpp:
851 2018-01-11 Youenn Fablet <youenn@apple.com>
853 Redirected iframe loading with Request.redirect=follow should fail
854 https://bugs.webkit.org/show_bug.cgi?id=181491
856 Reviewed by Alex Christensen.
858 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
859 (WebKit::ServiceWorkerClientFetch::validateResponse):
861 2018-01-11 Youenn Fablet <youenn@apple.com>
863 Replace WebRTCLegacyAPIDisabled by WebRTCLegacyAPIEnabled and switch off WebRTC legacy flag by default
864 https://bugs.webkit.org/show_bug.cgi?id=181480
866 Reviewed by Eric Carlson.
868 Renaming preference to WebRTCLegacyAPIEnabled for simplification and removing it from experimental feature.
869 Set it to off by default.
871 * Shared/WebPreferences.yaml:
872 * UIProcess/API/C/WKPreferences.cpp:
873 (WKPreferencesSetWebRTCLegacyAPIEnabled):
874 (WKPreferencesGetWebRTCLegacyAPIEnabled):
875 * UIProcess/API/Cocoa/WKPreferences.mm:
876 (-[WKPreferences _webRTCLegacyAPIEnabled]):
877 (-[WKPreferences _setWebRTCLegacyAPIEnabled:]):
878 * UIProcess/WebProcessPool.cpp:
879 (WebKit::WebProcessPool::ensureNetworkProcess):
880 * WebProcess/WebPage/WebPage.cpp:
881 (WebKit::WebPage::updatePreferences):
883 2018-01-11 Alex Christensen <achristensen@webkit.org>
885 Merge sync and async code paths for getting context menus
886 https://bugs.webkit.org/show_bug.cgi?id=181423
888 Reviewed by Joseph Pecoraro.
890 What a mess. We had a code path for asynchronous context menu generation and a different one for synchronous context menu generation.
891 This makes it so there is just one. At the API level we see if there is an asynchronous delegate to call, then synchronous.
892 There is a subtle theoretical change in behaviour because m_page.contextMenuClient().showContextMenu is now called for the asynchronous
893 case and it wasn't before, but the one C API client that uses this has nullptr as it's WKPageShowContextMenuCallback, so we won't break anything!
895 * UIProcess/API/APIContextMenuClient.h:
896 (API::ContextMenuClient::getContextMenuFromProposedMenu):
897 (API::ContextMenuClient::getContextMenuFromProposedMenuAsync): Deleted.
898 * UIProcess/API/C/WKPage.cpp:
899 (WKPageSetPageContextMenuClient):
900 * UIProcess/API/glib/WebKitContextMenuClient.cpp:
901 * UIProcess/WebContextMenuProxy.h:
902 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
903 (WebKit::WebContextMenuProxyGtk::show):
904 (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems):
905 * UIProcess/gtk/WebContextMenuProxyGtk.h:
906 * UIProcess/mac/WebContextMenuProxyMac.h:
907 * UIProcess/mac/WebContextMenuProxyMac.mm:
908 (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
909 (WebKit::WebContextMenuProxyMac::showContextMenu):
910 * UIProcess/wpe/WebContextMenuProxyWPE.h:
912 2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com>
914 [Attachment Support] Support dragging attachment elements out as files on iOS
915 https://bugs.webkit.org/show_bug.cgi?id=181199
916 <rdar://problem/36299316>
918 Reviewed by Tim Horton, Andy Estes and Joseph Pecoraro.
920 Implement support for registering and beginning a drag with promised blob info. See below for more detail.
922 * UIProcess/ios/WKContentViewInteraction.mm:
923 (-[WKDragSessionContext addTemporaryDirectory:]):
924 (-[WKDragSessionContext cleanUpTemporaryDirectories]):
926 Introduce WKDragSessionContext, which represents the localContext of a UIDragSession initiated in WebKit. The
927 blob promise dragging codepath uses this to register temporary directories when saving blob data to a location
928 on disk; when all data transfers are finished, or if the drag interaction is being reset, we then use
929 -cleanUpTemporaryDirectories to remove each temporary directory.
931 (existingLocalDragSessionContext):
932 (ensureLocalDragSessionContext):
934 Helper methods to set the UIDragSession's localContext to a WKDragSessionContext and query for any existing
937 (-[WKContentView cleanupInteraction]):
939 Before the content view's UIDragInteraction goes away, clean up any temporary directories added to the
942 (-[WKContentView _prepareToDragPromisedBlob:]):
944 When dragging with a promised blob, register a new item provider on the pasteboard representing the blob data,
945 along with any additional metadata associated with the blob. For the promise callback, call out to the network
946 process to write the blob data to a temporary path; when done, call the NSItemProvider's completion handler with
947 the temporary blob data location.
949 (-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
950 (-[WKContentView dragInteraction:sessionDidTransferItems:]):
952 Use this delegate hook as an opportunity to remove any temporary directories created when promised blob data is
953 requested upon drop. Since we know the drag session that has finished transferring data, we simply ask its local
954 context (a WKDragSessionContext) to remove any temporary filepaths it has created.
956 2018-01-10 Jeff Miller <jeffm@apple.com>
958 -[WKWebView _web_gestureEventWasNotHandledByWebCore:] should call -_gestureEventWasNotHandledByWebCore:
959 https://bugs.webkit.org/show_bug.cgi?id=181498
961 Reviewed by Alex Christensen.
963 WKView's API contract allows clients to override -_gestureEventWasNotHandledByWebCore:, and -[WKView
964 _web_gestureEventWasNotHandledByWebCore:] calls -_gestureEventWasNotHandledByWebCore: instead of
965 invoking WebViewImpl::gestureEventWasNotHandledByWebCoreFromViewOnly() directly. WKWebView should do
968 * UIProcess/API/Cocoa/WKWebView.mm:
969 (-[WKWebView _web_gestureEventWasNotHandledByWebCore:]):
970 Call -_gestureEventWasNotHandledByWebCore:, which will call gestureEventWasNotHandledByWebCoreFromViewOnly().
972 2018-01-10 Wenson Hsieh <wenson_hsieh@apple.com>
974 REGRESSION(r222507): Composition highlight doesn't render when using IME
975 https://bugs.webkit.org/show_bug.cgi?id=181485
976 <rdar://problem/35896516>
978 Reviewed by Ryosuke Niwa.
980 Add plumbing for a `suppressUnderline` argument when setting marked text.
982 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
983 (WKBundlePageSetComposition):
984 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
985 * WebProcess/WebPage/WebPage.cpp:
986 (WebKit::WebPage::setCompositionForTesting):
987 * WebProcess/WebPage/WebPage.h:
989 2018-01-10 Tim Horton <timothy_horton@apple.com>
991 REGRESSION (r213590): Swipe from edge to go to previous page is significantly slower than tapping back button on Twitter
992 https://bugs.webkit.org/show_bug.cgi?id=181269
993 <rdar://problem/35110344>
995 Reviewed by Simon Fraser.
997 * UIProcess/API/Cocoa/WKWebView.mm:
998 (-[WKWebView _processDidExit]):
999 (-[WKWebView _didCommitLayerTree:]):
1000 When swiping to a page that set history.scrollRestoration = "manual",
1001 we will never restore the scroll position. We will still restore
1002 "state", but won't have a location. Currently, the code assumes that
1003 it should wait to remove the swipe snapshot until the scroll position
1004 is restored. Instead, wait until the "state" is restored, whether
1005 or not that includes a scroll position/center point restoration.
1007 Do this by making _firstTransactionIDAfterPageRestore an optional,
1008 and reset it after it fires, so that we only run the restoration code
1009 in _didCommitLayerTree for the first commit after state restoration,
1010 not all subsequent commits. Then, tell ViewGestureController that
1011 the scroll position has been restored even if the page opted out.
1013 The reason that this is specific to pushState is that normal,
1014 non-same-document loads bail from waiting for the scroll position
1015 restoration in VGC::didReachMainFrameLoadTerminalState() (see the long
1016 comment there for an explanation).
1018 (-[WKWebView _beginBackSwipeForTesting]):
1019 (-[WKWebView _completeBackSwipeForTesting]):
1020 * Platform/spi/ios/UIKitSPI.h:
1021 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1022 * UIProcess/Cocoa/ViewGestureController.h:
1023 * UIProcess/ios/ViewGestureControllerIOS.mm:
1024 (-[WKSwipeTransitionController transitionForDirection:]):
1025 (WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
1026 (WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):
1027 * UIProcess/mac/ViewGestureControllerMac.mm:
1028 (WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
1029 (WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):
1030 Add a mechanism to forcefully test swipe back. Instead of simulating
1031 events like on Mac, we just talk to the UIKit internals and force
1032 the interaction to start, pause, and then complete when we want.
1034 2018-01-10 Brent Fulgham <bfulgham@apple.com>
1036 Use protectedThis for the 'updatePrevalentDomainsToPartitionOrBlockCookies' lambda
1037 https://bugs.webkit.org/show_bug.cgi?id=181452
1038 <rdar://problem/36416912>
1040 Reviewed by Chris Dumez.
1042 We forgot to use a 'protectedThis' back in r225006 for one of the lambdas used by
1043 the WebsiteDataStore for processing.
1045 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1046 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
1048 2018-01-09 John Wilander <wilander@apple.com>
1050 Storage Access API: Turn feature on by default in WebPreferences.yaml
1051 https://bugs.webkit.org/show_bug.cgi?id=181458
1053 Reviewed by Brent Fulgham.
1055 * Shared/WebPreferences.yaml:
1057 2018-01-09 Alex Christensen <achristensen@webkit.org>
1059 WKOpenPanelParameters SPI should return autoreleased objects
1060 https://bugs.webkit.org/show_bug.cgi?id=181457
1061 <rdar://problem/35884960>
1063 Reviewed by Tim Horton.
1065 In r226607 I made a mistake by returning an object that has been released.
1066 I instead follow a pattern of leaking and autoreleasing that we use elsewhere in the ObjC API.
1068 * UIProcess/API/Cocoa/WKOpenPanelParameters.mm:
1069 (-[WKOpenPanelParameters _acceptedMIMETypes]):
1070 (-[WKOpenPanelParameters _acceptedFileExtensions]):
1072 2018-01-09 Dan Bernstein <mitz@apple.com>
1074 Removed some empty directories that were left behind
1076 * WebProcess/Cookies/cf: Removed.
1077 * WebProcess/ios: Removed.
1079 2018-01-09 Paul Knight <pknight@apple.com>
1081 Don't record dynamic spelling corrections while in an ephemeral browsing session
1082 https://bugs.webkit.org/show_bug.cgi?id=181417
1083 <rdar://problem/33309104>
1085 Dynamic spelling correction responses are kept on disk. Avoid recording
1086 these responses when in an ephemeral session.
1088 Reviewed by Tim Horton and Wenson Hsieh.
1090 * UIProcess/mac/CorrectionPanel.h:
1091 * UIProcess/mac/CorrectionPanel.mm:
1092 (WebKit::CorrectionPanel::recordAutocorrectionResponse):
1093 Add a WebViewImpl parameter so we can query the current session.
1094 Return early before recording the response if the session is
1096 (WebKit::CorrectionPanel::handleAcceptedReplacement):
1097 Update a caller to include the new parameter.
1098 * UIProcess/mac/PageClientImplMac.mm:
1099 (WebKit::PageClientImpl::recordAutocorrectionResponse):
1102 2018-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
1104 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.5 release.
1106 * gtk/NEWS: Add release notes for 2.19.5.
1108 2018-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
1110 [GTK] Missing symbols exported in 2.19.4
1111 https://bugs.webkit.org/show_bug.cgi?id=181433
1113 Reviewed by Michael Catanzaro.
1115 Add missing WEBKIT_API to webkit_dom_dom_window_webkit_message_handlers_post_message().
1117 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h:
1118 * webkitglib-symbols.map: Remove webkit_media_player_debug from local.
1120 2018-01-09 Youenn Fablet <youenn@apple.com>
1122 SWClientConnection should not keep references to service worker jobs
1123 https://bugs.webkit.org/show_bug.cgi?id=181381
1125 Reviewed by Chris Dumez.
1127 Updated IPC handling based on WebCore refactoring.
1129 * Scripts/webkit/messages.py:
1130 (forward_declarations_and_headers):
1132 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1133 (WebKit::WebSWServerConnection::rejectJobInClient):
1134 (WebKit::WebSWServerConnection::resolveRegistrationJobInClient):
1135 (WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
1136 (WebKit::WebSWServerConnection::startScriptFetchInClient):
1137 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1138 * WebProcess/Storage/WebSWClientConnection.messages.in:
1140 2018-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
1142 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.4 release.
1144 * gtk/NEWS: Add release notes for 2.19.4.
1146 2018-01-09 Ali Juma <ajuma@chromium.org>
1148 Implement VisualViewport API events
1149 https://bugs.webkit.org/show_bug.cgi?id=179386
1151 Reviewed by Frédéric Wang.
1153 Change the default value of the VisualViewportAPI experimental feature flag to
1154 DEFAULT_EXPERIMENTAL_FEATURES_ENABLED. This patch completes the implementation
1155 of this feature as specified by https://wicg.github.io/visual-viewport/, so this
1156 feature is now ready for wider testing.
1158 * Shared/WebPreferences.yaml:
1160 2018-01-08 Alex Christensen <achristensen@webkit.org>
1162 Add WKNavigationDelegate SPI exposing WebProcess crash reason
1163 https://bugs.webkit.org/show_bug.cgi?id=181410
1164 <rdar://problem/36167199>
1166 Reviewed by Wenson Hsieh.
1168 We exposed it in the C SPI.
1170 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1171 * UIProcess/Cocoa/NavigationState.h:
1172 * UIProcess/Cocoa/NavigationState.mm:
1173 (WebKit::NavigationState::setNavigationDelegate):
1174 (WebKit::toWKProcessTerminationReason):
1175 (WebKit::NavigationState::NavigationClient::processDidTerminate):
1177 2018-01-08 Alex Christensen <achristensen@webkit.org>
1179 Make ObjC SPI equivalent to WKPageNavigationClient.decidePolicyForPluginLoad
1180 https://bugs.webkit.org/show_bug.cgi?id=181413
1181 <rdar://problem/36169005>
1183 Reviewed by Wenson Hsieh.
1185 * UIProcess/API/APINavigationClient.h:
1186 (API::NavigationClient::decidePolicyForPluginLoad):
1187 * UIProcess/API/C/WKPage.cpp:
1188 (WKPageSetPageNavigationClient):
1189 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1190 * UIProcess/Cocoa/NavigationState.h:
1191 * UIProcess/Cocoa/NavigationState.mm:
1192 (WebKit::NavigationState::setNavigationDelegate):
1193 (WebKit::toPluginModuleLoadPolicy):
1194 (WebKit::toWKPluginModuleLoadPolicy):
1195 (WebKit::NavigationState::NavigationClient::decidePolicyForPluginLoad):
1196 * UIProcess/WebPageProxy.cpp:
1197 (WebKit::WebPageProxy::findPlugin):
1199 2018-01-08 Ryosuke Niwa <rniwa@webkit.org>
1201 iOS build fix attempt after r226602.
1203 * UIProcess/API/C/WKContextMenuListener.cpp:
1204 (WKContextMenuListenerUseContextMenuItems):
1206 2018-01-08 Alex Christensen <achristensen@webkit.org>
1208 Add SPI for WKOpenPanelParameters._acceptedMIMETypes and _acceptedFileExtensions
1209 https://bugs.webkit.org/show_bug.cgi?id=181408
1210 <rdar://problem/35884960>
1212 Reviewed by Tim Horton.
1214 * UIProcess/API/Cocoa/WKOpenPanelParameters.mm:
1215 (-[WKOpenPanelParameters _acceptedMIMETypes]):
1216 (-[WKOpenPanelParameters _acceptedFileExtensions]):
1217 * UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h:
1218 * UIProcess/API/Cocoa/WKOpenPanelParametersPrivate.h: Added.
1219 * WebKit.xcodeproj/project.pbxproj:
1221 2018-01-08 Commit Queue <commit-queue@webkit.org>
1223 Unreviewed, rolling out r226532 and r226540.
1224 https://bugs.webkit.org/show_bug.cgi?id=181422
1226 jessie says basic browsing does not seem to work (Requested by
1227 alexchristensen on #webkit).
1229 Reverted changesets:
1231 "Add CSP support to service workers"
1232 https://bugs.webkit.org/show_bug.cgi?id=181385
1233 https://trac.webkit.org/changeset/226532
1235 "SWClientConnection should not keep references to service
1237 https://bugs.webkit.org/show_bug.cgi?id=181381
1238 https://trac.webkit.org/changeset/226540
1240 2018-01-08 Wenson Hsieh <wenson_hsieh@apple.com>
1242 [Attachment Support] Expose file name and content type of WKAttachment
1243 https://bugs.webkit.org/show_bug.cgi?id=181390
1244 <rdar://problem/36336837>
1246 Reviewed by Tim Horton.
1248 Add support for -[_WKAttachment requestInfo:], which fetches a snapshot of the attachment's state. This API is
1249 meant to be a replacement for -requestData: that provides additional metadata about the attachment.
1251 * Scripts/webkit/messages.py:
1253 * Shared/WebCoreArgumentCoders.cpp:
1254 (IPC::ArgumentCoder<AttachmentInfo>::encode):
1255 (IPC::ArgumentCoder<AttachmentInfo>::decode):
1256 * Shared/WebCoreArgumentCoders.h:
1258 Add IPC support for AttachmentInfo. Note that instead of using (encode|decode)SharedBuffer, we send and receive
1259 data references to the shared buffer.
1261 * UIProcess/API/APIAttachment.cpp:
1262 (API::Attachment::requestInfo):
1263 (API::Attachment::requestData): Deleted.
1264 * UIProcess/API/APIAttachment.h:
1266 Change requestData to requestInfo.
1268 * UIProcess/API/Cocoa/_WKAttachment.h:
1269 * UIProcess/API/Cocoa/_WKAttachment.mm:
1270 (-[_WKAttachmentInfo initWithInfo:]):
1271 (-[_WKAttachmentInfo data]):
1272 (-[_WKAttachmentInfo name]):
1273 (-[_WKAttachmentInfo filePath]):
1274 (-[_WKAttachmentInfo contentType]):
1275 (-[_WKAttachment requestInfo:]):
1276 (-[_WKAttachment requestData:]):
1278 Implement -requestInfo: by calling into APIAttachment, and reimplement -requestData: in terms of -requestInfo:.
1280 * UIProcess/WebPageProxy.cpp:
1281 (WebKit::WebPageProxy::attachmentInfoCallback):
1282 (WebKit::WebPageProxy::requestAttachmentInfo):
1283 (WebKit::WebPageProxy::sharedBufferCallback): Deleted.
1284 (WebKit::WebPageProxy::requestAttachmentData): Deleted.
1285 * UIProcess/WebPageProxy.h:
1286 * UIProcess/WebPageProxy.messages.in:
1288 Rename the SharedBufferCallback IPC message to AttachmentInfoCallback, and make it conditional on
1289 ATTACHMENT_ELEMENT. Rename requestAttachmentData to requestAttachmentInfo.
1291 * WebProcess/WebPage/WebPage.cpp:
1292 (WebKit::WebPage::requestAttachmentInfo):
1293 (WebKit::WebPage::invokeSharedBufferCallback): Deleted.
1294 (WebKit::WebPage::requestAttachmentData): Deleted.
1296 Rename requestAttachmentData to requestAttachmentInfo and adopt HTMLAttachmentElement::requestInfo.
1298 * WebProcess/WebPage/WebPage.h:
1299 * WebProcess/WebPage/WebPage.messages.in:
1301 2018-01-08 Alex Christensen <achristensen@webkit.org>
1303 Pass around Vector<Ref<WebContextMenuItem>> instead of WKArrayRef or Vector<WebContextMenuItemData>
1304 https://bugs.webkit.org/show_bug.cgi?id=181419
1306 Reviewed by Tim Horton.
1308 Passing a WKArrayRef to an API object is messy and was preventing me from moving things around and making ObjC SPI.
1309 No change in behavior. Just using different layering abstractions for the same data.
1311 * UIProcess/API/C/WKContextMenuListener.cpp:
1312 (WKContextMenuListenerUseContextMenuItems):
1313 * UIProcess/WebContextMenuListenerProxy.cpp:
1314 (WebKit::WebContextMenuListenerProxy::useContextMenuItems):
1315 * UIProcess/WebContextMenuListenerProxy.h:
1316 * UIProcess/WebContextMenuProxy.h:
1317 * UIProcess/mac/WebContextMenuProxyMac.h:
1318 * UIProcess/mac/WebContextMenuProxyMac.mm:
1319 (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
1320 (WebKit::WebContextMenuProxyMac::showContextMenu):
1322 2018-01-08 John Wilander <wilander@apple.com>
1324 Storage Access API: Remove access for all frames under a page when the page is closed
1325 https://bugs.webkit.org/show_bug.cgi?id=181398
1326 <rdar://problem/36357879>
1328 Reviewed by Alex Christensen.
1330 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1331 (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):
1332 * NetworkProcess/NetworkConnectionToWebProcess.h:
1333 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1334 * WebProcess/WebPage/WebPage.cpp:
1335 (WebKit::WebPage::close):
1337 2018-01-08 Youenn Fablet <youenn@apple.com>
1339 SWClientConnection should not keep references to service worker jobs
1340 https://bugs.webkit.org/show_bug.cgi?id=181381
1342 Reviewed by Chris Dumez.
1344 Updated IPC handling based on WebCore refactoring.
1346 * Scripts/webkit/messages.py:
1347 (forward_declarations_and_headers):
1349 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1350 (WebKit::WebSWServerConnection::rejectJobInClient):
1351 (WebKit::WebSWServerConnection::resolveRegistrationJobInClient):
1352 (WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
1353 (WebKit::WebSWServerConnection::startScriptFetchInClient):
1354 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1355 * WebProcess/Storage/WebSWClientConnection.messages.in:
1357 2018-01-08 Joseph Pecoraro <pecoraro@apple.com>
1359 [Cocoa] Web Inspector: Provide a way for clients to check if an NSWindow is a Web Inspector window
1360 https://bugs.webkit.org/show_bug.cgi?id=181361
1361 <rdar://problem/36332865>
1363 Reviewed by Darin Adler.
1365 * WebKit.xcodeproj/project.pbxproj:
1368 * Shared/API/Cocoa/_WKNSWindowExtras.h: Added.
1369 * Shared/API/Cocoa/_WKNSWindowExtras.mm: Added.
1370 (-[NSWindow _web_isWebInspectorWindow]):
1371 Method to determing if a window is being used for Web Inspector content.
1373 * UIProcess/mac/WKInspectorWindow.h: Added.
1374 * UIProcess/mac/WKInspectorWindow.mm: Added.
1375 Named subclass so we can use isKindOfClass.
1377 * UIProcess/mac/WebInspectorProxyMac.mm:
1378 (WebKit::WebInspectorProxy::createFrontendWindow):
1379 Use the named subclass.
1381 2018-01-08 Tim Horton <timothy_horton@apple.com>
1383 Build fix for WKPDFView
1384 https://bugs.webkit.org/show_bug.cgi?id=181399
1385 <rdar://problem/36311915>
1387 Reviewed by Simon Fraser.
1389 * UIProcess/ios/WKPDFView.mm:
1390 Disable deprecation warnings in this whole file.
1392 2018-01-08 Youenn Fablet <youenn@apple.com>
1394 Caches::writeCachesToDisk should assert that it is initialized
1395 https://bugs.webkit.org/show_bug.cgi?id=181383
1397 Reviewed by Alex Christensen.
1399 Add assertion to ensure caches is initialized
1401 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
1402 (WebKit::CacheStorage::Caches::writeCachesToDisk):
1404 2018-01-08 Youenn Fablet <youenn@apple.com>
1406 WebProcessPool::terminateServiceWorkerProcess should protect itself in debug builds
1407 https://bugs.webkit.org/show_bug.cgi?id=181384
1409 Reviewed by Chris Dumez.
1411 * UIProcess/WebProcessPool.cpp:
1412 (WebKit::WebProcessPool::terminateServiceWorkerProcess):
1414 2018-01-08 Frederic Wang <fwang@igalia.com>
1416 Unreviewed build fix after r226211.
1418 * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Use WK_IOS_TBA for iOS.
1420 2018-01-08 Youenn Fablet <youenn@apple.com>
1422 navigator.onLine does not work inside service workers
1423 https://bugs.webkit.org/show_bug.cgi?id=181079
1424 <rdar://problem/36178606>
1426 Reviewed by Darin Adler.
1428 Added support for a callback called for each service worker proxy creation.
1429 Callback is used by WTR to inject a self.internals object used for testing.
1431 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1432 (WKBundleSetServiceWorkerProxyCreationCallback):
1433 * WebProcess/InjectedBundle/API/c/WKBundle.h:
1434 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1435 (WebKit::InjectedBundle::setServiceWorkerProxyCreationCallback):
1436 * WebProcess/InjectedBundle/InjectedBundle.h:
1438 2018-01-07 David Kilzer <ddkilzer@apple.com>
1440 Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
1441 <https://webkit.org/b/181256>
1442 <rdar://problem/36281730>
1444 Reviewed by Darin Adler.
1446 * Configurations/Base.xcconfig:
1447 (WARNING_CFLAGS): Add -Wcast-qual.
1448 * NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:
1449 (WTF::Persistence::encodeCertificateChain): Include
1450 TypeCastsCF.h from WTF, and use
1451 checked_cf_cast<SecCertificateRef>() to fix warning.
1452 * Platform/cocoa/WKCrashReporter.mm:
1453 (WebKit::setCrashReportApplicationSpecificInformation):
1454 - Move `oldMessage` check above nullptr check to fix a leak when
1455 passing in nullptr after previously setting the crash string.
1456 - Change C-style cast to const_cast<char*>() to fix warning.
1457 * PluginProcess/mac/PluginProcessShim.mm:
1458 (WebKit::shim_shmat): Change C-style cast to
1459 const_cast<void*>() to fix warning.
1460 * Shared/Authentication/mac/AuthenticationManager.mac.mm:
1461 (WebKit::leafCertificate): Include TypeCastsCF.h from
1462 WTF, and use checked_cf_cast<SecCertificateRef>() to fix
1464 * Shared/cf/ArgumentCodersCF.cpp:
1465 (IPC::encode): Use static_cast<>(const_cast<void*>() to
1466 fix warnings since the CFTypeID has already been
1468 * Shared/mac/WebCoreArgumentCodersMac.mm:
1469 (IPC::decodeNSError): Use an `auto` variable to hold the
1470 CFMutableDictionaryRef, then WTFMove() to assign it back to
1472 * UIProcess/Cocoa/WebViewImpl.mm:
1473 (WebKit::takeWindowSnapshot): Include TypeCastsCF.h from
1474 WTF, and use checked_cf_cast<CGImageRef>() to fix
1477 2018-01-07 Konstantin Tokarev <annulen@yandex.ru>
1479 [cmake] Unset CMAKE_REQUIRED_LIBRARIES after check_function_exists test
1480 https://bugs.webkit.org/show_bug.cgi?id=181371
1482 Reviewed by Michael Catanzaro.
1484 This variable is used by check_function_exists internally, its value
1485 should be never used for anything else.
1489 2018-01-05 Dan Bernstein <mitz@apple.com>
1491 REGRESSION (r226218): iOS-only assets are installed on macOS
1492 https://bugs.webkit.org/show_bug.cgi?id=181362
1494 Reviewed by Anders Carlsson.
1496 * Configurations/WebKit.xcconfig: Exclude everything under Resources/ios when not targeting
1499 * Resources/ios: Added.
1500 * Resources/ios/iOS.xcassets: Moved from Source/WebKit/WebKit.xcassets.
1501 * Resources/ios/iOS.xcassets/LockMini.imageset/NavigationBarLockMini@2x.pdf: Set the
1502 svn:mime-type property.
1503 * Resources/ios/iOS.xcassets/LockMini.imageset/NavigationBarLockMini@3x.pdf: Ditto.
1505 * Resources/mac: Added.
1506 * Resources/mac/mediaIcon.pdf: Moved here…
1507 * Resources/mediaIcon.pdf: …from here.
1509 * WebKit.xcassets: Moved under Resources/ios.
1511 * WebKit.xcodeproj/project.pbxproj: Created an ios group under the Resources group, and
1512 cleaned up the mac group. Removed the Recovered References group.
1514 2018-01-05 John Wilander <wilander@apple.com>
1516 Storage Access API: Refactor to make naming accurate and explicit, simplify access table, and prepare for access removal for page
1517 https://bugs.webkit.org/show_bug.cgi?id=181357
1518 <rdar://problem/36331031>
1520 Reviewed by Alex Christensen.
1522 This change does the following:
1523 - Changes function and message names to reflect how this feature
1524 was eventually implemented, i.e. access per frame.
1525 - Makes it explicit that the UI process is only involved in
1526 granting storage access and not removing storage access.
1527 The latter is done directly by the web process.
1528 - Simplifies the network process' entry map since only needs to
1529 be able to give access to one domain in one frame at a time.
1530 Access goes away on frame navigation so there can only be one
1531 domain at a time per frame. Also, the map now uses pageIDs as
1532 main keys to prepare for efficient access removal for all
1533 frames under a page.
1534 - Fixes a bug in so that a cross-origin iframe with the same
1535 partition as the top frame correctly is handled as already
1538 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1539 (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
1540 (WebKit::NetworkConnectionToWebProcess::removeStorageAccess): Deleted.
1541 * NetworkProcess/NetworkConnectionToWebProcess.h:
1542 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1543 * NetworkProcess/NetworkProcess.cpp:
1544 (WebKit::NetworkProcess::hasStorageAccessForFrame):
1545 (WebKit::NetworkProcess::grantStorageAccessForFrame):
1546 (WebKit::NetworkProcess::hasStorageAccessForPrevalentDomains): Deleted.
1547 (WebKit::NetworkProcess::updateStorageAccessForPrevalentDomains): Deleted.
1548 * NetworkProcess/NetworkProcess.h:
1549 * NetworkProcess/NetworkProcess.messages.in:
1550 * UIProcess/Network/NetworkProcessProxy.cpp:
1551 (WebKit::NetworkProcessProxy::hasStorageAccessForFrame):
1552 (WebKit::NetworkProcessProxy::grantStorageAccessForFrame):
1553 (WebKit::NetworkProcessProxy::hasStorageAccessForPrevalentDomains): Deleted.
1554 (WebKit::NetworkProcessProxy::updateStorageAccessForPrevalentDomains): Deleted.
1555 * UIProcess/Network/NetworkProcessProxy.h:
1556 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1557 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
1558 (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
1559 (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
1560 * UIProcess/WebResourceLoadStatisticsStore.h:
1561 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1562 (WebKit::WebsiteDataStore::hasStorageAccessForFrameHandler):
1563 (WebKit::WebsiteDataStore::grantStorageAccessForFrameHandler):
1564 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
1565 (WebKit::WebsiteDataStore::hasStorageAccessForPrevalentDomainsHandler): Deleted.
1566 (WebKit::WebsiteDataStore::updateStorageAccessForPrevalentDomainsHandler): Deleted.
1567 * UIProcess/WebsiteData/WebsiteDataStore.h:
1568 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1569 (WebKit::WebFrameLoaderClient::detachedFromParent2):
1570 (WebKit::WebFrameLoaderClient::dispatchWillChangeDocument):
1572 2018-01-05 Youenn Fablet <youenn@apple.com>
1574 Implement Cache API partitioning based on ClientOrigin
1575 https://bugs.webkit.org/show_bug.cgi?id=181240
1577 Reviewed by Alex Christensen.
1579 open and retrieveCaches now take a ClientOrigin instead of a String.
1580 Updated cache filesystem path computation to take both client origin and top origin.
1582 When clearing an origin, caches whose client origin or top origin matches the origin are cleared.
1583 Caches are added to the web site data of their client origin with their corresponding cache size.
1584 Caches are added to the web site data of their top origin with a size equal to 0.
1586 Updated memory representation dumping used for test to include both top and client origins.
1588 * NetworkProcess/NetworkProcess.cpp:
1589 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
1590 * NetworkProcess/cache/CacheStorageEngine.cpp:
1591 (WebKit::CacheStorage::Engine::cachesRootPath):
1592 (WebKit::CacheStorage::Engine::open):
1593 (WebKit::CacheStorage::Engine::remove):
1594 (WebKit::CacheStorage::Engine::retrieveCaches):
1595 (WebKit::CacheStorage::Engine::readCachesFromDisk):
1596 (WebKit::CacheStorage::Engine::removeCaches):
1597 (WebKit::CacheStorage::Engine::fetchEntries):
1598 (WebKit::CacheStorage::Engine::clearCachesForOrigin):
1599 (WebKit::CacheStorage::Engine::clearMemoryRepresentation):
1600 (WebKit::CacheStorage::Engine::representation):
1601 * NetworkProcess/cache/CacheStorageEngine.h:
1602 * NetworkProcess/cache/CacheStorageEngineCache.cpp:
1603 (WebKit::CacheStorage::Cache::Cache):
1604 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
1605 (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
1606 (WebKit::CacheStorage::Caches::Caches):
1607 (WebKit::CacheStorage::Caches::storeOrigin):
1608 (WebKit::CacheStorage::Caches::readOrigin):
1609 (WebKit::CacheStorage::Caches::open):
1610 * NetworkProcess/cache/CacheStorageEngineCaches.h:
1611 (WebKit::CacheStorage::Caches::create):
1612 (WebKit::CacheStorage::Caches::origin const):
1613 * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
1614 (WebKit::CacheStorageEngineConnection::open):
1615 (WebKit::CacheStorageEngineConnection::caches):
1616 (WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
1617 * NetworkProcess/cache/CacheStorageEngineConnection.h:
1618 * NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
1619 * WebProcess/Cache/WebCacheStorageConnection.cpp:
1620 (WebKit::WebCacheStorageConnection::doOpen):
1621 (WebKit::WebCacheStorageConnection::doRetrieveCaches):
1622 (WebKit::WebCacheStorageConnection::clearMemoryRepresentation):
1623 * WebProcess/Cache/WebCacheStorageConnection.h:
1625 2018-01-05 Megan Gardner <megan_gardner@apple.com>
1627 Show Keyboard when re-launching WKWebView with a previously focused element
1628 https://bugs.webkit.org/show_bug.cgi?id=181353
1630 Reviewed by Tim Horton.
1632 When relaunching an app with a WKWebView, restore the keyboard if there was a previously
1633 focused element that was being assisted. The element was already being tracked, we just
1634 needed to not bail on showing the keyboard for instances where it was a state change that
1635 caused the element to be refocused.
1637 * UIProcess/PageClient.h:
1638 * UIProcess/WebPageProxy.h:
1639 * UIProcess/WebPageProxy.messages.in:
1640 * UIProcess/ios/PageClientImplIOS.h:
1641 * UIProcess/ios/PageClientImplIOS.mm:
1642 (WebKit::PageClientImpl::startAssistingNode):
1643 * UIProcess/ios/WKContentView.h:
1644 * UIProcess/ios/WKContentViewInteraction.h:
1645 * UIProcess/ios/WKContentViewInteraction.mm:
1646 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
1647 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Deleted.
1648 * UIProcess/ios/WebPageProxyIOS.mm:
1649 (WebKit::WebPageProxy::startAutoscrollAtPosition):
1650 (WebKit::WebPageProxy::startAssistingNode):
1651 * WebProcess/WebPage/WebPage.cpp:
1652 (WebKit::WebPage::setActivityState):
1653 (WebKit::WebPage::elementDidFocus):
1654 * WebProcess/WebPage/WebPage.h:
1656 2018-01-05 Alex Christensen <achristensen@webkit.org>
1658 Restrict navigation-time WKWebsiteDataStore swapping to main frame navigations
1659 https://bugs.webkit.org/show_bug.cgi?id=181217
1661 Reviewed by Tim Horton.
1663 If we swap during an iframe navigation, then we get a page in a strange state.
1664 The intent of the main frame navigation WKWebsiteDataStore swap is that
1665 that is a time when we can change storages without a page in an inconsistent state.
1667 * UIProcess/Cocoa/NavigationState.mm:
1668 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1670 2018-01-05 Alex Christensen <achristensen@webkit.org>
1672 Add WKBundleFrameCreateFrameHandle
1673 https://bugs.webkit.org/show_bug.cgi?id=181232
1674 <rdar://problem/35926696>
1676 Reviewed by Tim Horton.
1678 InjectedBundle clients wanting to sent a _WKFrameHandle cannot without this function.
1679 Before, they would just send the WKBundleFrameRef which would be changed into a WKFrameRef
1680 in the UIProcess by WebProcessProxy::transformHandlesToObjects, but there is no ObjC equivalent
1681 of WKFrameRef, so we were just getting a WKObject when we wanted a _WKFrameHandle.
1682 We can't change WebProcessProxy::transformHandlesToObjects without being incompatible with the
1683 existing C API, so let's add a way for clients to say "I want a _WKFrameHandle".
1685 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1686 (WKBundleFrameCreateFrameHandle):
1687 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1689 2018-01-05 Wenson Hsieh <wenson_hsieh@apple.com>
1691 [Attachment Support] Add a way to write blob data to a file URL from the UI process
1692 https://bugs.webkit.org/show_bug.cgi?id=181236
1694 Reviewed by Brady Eidson.
1696 Add support for writing a blob to a designated file path. In WebKit, this is mainly plumbing writeBlobToFilePath
1697 through WebPageProxy to the network process.
1699 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1700 (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
1702 Call out to the BlobRegistryImpl to write blobs to the file path. Additionally grant sandbox extensions for any
1703 file-backed blob parts corresponding to the given blob URL.
1705 (WebKit::NetworkBlobRegistry::filesInBlob):
1707 Introduce a version of filesInBlob that doesn't check against the NetworkConnectionToWebProcess. This is used
1708 when the UI process is the driver for writing a blob.
1710 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1711 * NetworkProcess/NetworkProcess.cpp:
1712 (WebKit::NetworkProcess::writeBlobToFilePath):
1714 Temporarily grant sandbox access to the given file path.
1716 * NetworkProcess/NetworkProcess.h:
1717 * NetworkProcess/NetworkProcess.messages.in:
1718 * Shared/WebCoreArgumentCoders.cpp:
1719 (IPC::ArgumentCoder<PromisedBlobInfo>::encode):
1720 (IPC::ArgumentCoder<PromisedBlobInfo>::decode):
1721 (IPC::ArgumentCoder<PromisedBlobData>::encode): Deleted.
1722 (IPC::ArgumentCoder<PromisedBlobData>::decode): Deleted.
1724 Remove PromisedBlobData (see WebCore/ChangeLog for more information).
1726 * Shared/WebCoreArgumentCoders.h:
1727 * UIProcess/Network/NetworkProcessProxy.cpp:
1728 (WebKit::NetworkProcessProxy::didClose):
1730 If the network process is terminated, flush any pending callbacks in m_writeBlobToFilePathCallbackMap, passing
1731 in a failure result (success := false) and clearing the callback map.
1733 (WebKit::NetworkProcessProxy::writeBlobToFilePath):
1734 (WebKit::NetworkProcessProxy::didWriteBlobToFilePath):
1735 * UIProcess/Network/NetworkProcessProxy.h:
1736 * UIProcess/Network/NetworkProcessProxy.messages.in:
1737 * UIProcess/WebPageProxy.cpp:
1738 (WebKit::WebPageProxy::writeBlobToFilePath):
1739 * UIProcess/WebPageProxy.h:
1741 2018-01-05 Dan Bernstein <mitz@apple.com>
1743 Add injected bundle equivalents of DOMHTMLDocument (DOMHTMLDocumentExtensions)
1744 https://bugs.webkit.org/show_bug.cgi?id=181345
1746 Reviewed by Tim Horton.
1748 * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h: Declared new methods.
1749 * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
1750 (-[WKDOMDocument createDocumentFragmentWithMarkupString:baseURL:]): Added. Calls WebCore’s
1751 createFragmentFromMarkup.
1752 (-[WKDOMDocument createDocumentFragmentWithText:]): Added. Calls WebCore’s
1753 createFragmentFromText.
1755 2018-01-05 Don Olmstead <don.olmstead@sony.com>
1757 [Curl] Add implementation stubs for Network Cache
1758 https://bugs.webkit.org/show_bug.cgi?id=181343
1760 Reviewed by Alex Christensen.
1762 * NetworkProcess/cache/NetworkCacheCodersCurl.cpp: Added.
1763 (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode):
1764 (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
1765 * NetworkProcess/cache/NetworkCacheDataCurl.cpp: Added.
1766 (WebKit::NetworkCache::Data::Data):
1767 (WebKit::NetworkCache::Data::empty):
1768 (WebKit::NetworkCache::Data::data const):
1769 (WebKit::NetworkCache::Data::isNull const):
1770 (WebKit::NetworkCache::Data::apply const):
1771 (WebKit::NetworkCache::Data::subrange const):
1772 (WebKit::NetworkCache::concatenate):
1773 (WebKit::NetworkCache::Data::adoptMap):
1774 * NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp: Added.
1775 (WebKit::NetworkCache::IOChannel::IOChannel):
1776 (WebKit::NetworkCache::IOChannel::~IOChannel):
1777 (WebKit::NetworkCache::IOChannel::open):
1778 (WebKit::NetworkCache::IOChannel::read):
1779 (WebKit::NetworkCache::IOChannel::write):
1780 * PlatformWin.cmake:
1782 2018-01-05 Don Olmstead <don.olmstead@sony.com>
1784 [Curl] Update method declarations in WebKit
1785 https://bugs.webkit.org/show_bug.cgi?id=181342
1787 Reviewed by Alex Christensen.
1789 * NetworkProcess/Downloads/curl/DownloadCurl.cpp:
1790 (WebKit::Download::resume):
1791 * NetworkProcess/curl/RemoteNetworkingContextCurl.cpp:
1792 (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Deleted.
1793 (WebKit::RemoteNetworkingContext::blockedError const): Deleted.
1795 2018-01-05 Don Olmstead <don.olmstead@sony.com>
1797 WebFullScreenManager should compile when ENABLE(VIDEO) is off
1798 https://bugs.webkit.org/show_bug.cgi?id=181338
1800 Reviewed by Alex Christensen.
1802 * WebProcess/FullScreen/WebFullScreenManager.cpp:
1803 (WebKit::WebFullScreenManager::didEnterFullScreen):
1804 (WebKit::WebFullScreenManager::willExitFullScreen):
1805 * WebProcess/FullScreen/WebFullScreenManager.h:
1807 2018-01-05 Andy Estes <aestes@apple.com>
1809 [Apple Pay] Disable Apple Pay on platforms that don't have PassKit.framework
1810 https://bugs.webkit.org/show_bug.cgi?id=181335
1811 <rdar://problem/36311296>
1813 Reviewed by Brady Eidson.
1815 When Safari is running in the macOS Base System, PassKit.framework is not available.
1816 If we fail to dlopen PassKit, we should disable Apple Pay.
1818 * UIProcess/API/C/WKPreferences.cpp:
1819 (WKPreferencesSetApplePayEnabled):
1820 * UIProcess/API/Cocoa/WKWebView.mm:
1821 (-[WKWebView _initializeWithConfiguration:]):
1822 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
1823 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1824 (WebKit::WebPaymentCoordinatorProxy::availablePaymentNetworks):
1825 (WebKit::WebPaymentCoordinatorProxy::platformSupportsPayments):
1827 2018-01-05 Dan Bernstein <mitz@apple.com>
1829 Fixed the build following AppKit API deprecations in a recent SDKs
1831 * UIProcess/mac/WKFullScreenWindowController.mm:
1832 (-[WKFullScreenWindowController enterFullScreen:]): Suppressed deprecation warnings.
1833 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto.
1834 (-[WKFullScreenWindowController exitFullScreen]): Ditto.
1835 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
1836 (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Ditto.
1837 (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto.
1838 (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Ditto.
1839 * UIProcess/mac/WKPrintingView.mm:
1840 (-[WKPrintingView _setAutodisplay:]): Ditto.
1842 2018-01-05 Matt Lewis <jlewis3@apple.com>
1844 Unreviewed, rolling out r226401.
1846 This caused timeouts on multiple platforms.
1850 "Implement Cache API partitioning based on ClientOrigin"
1851 https://bugs.webkit.org/show_bug.cgi?id=181240
1852 https://trac.webkit.org/changeset/226401
1854 2018-01-05 Joseph Pecoraro <pecoraro@apple.com>
1856 ServiceWorkers: Enable UserTiming / ResourceTiming
1857 https://bugs.webkit.org/show_bug.cgi?id=181297
1858 <rdar://problem/36307306>
1860 Reviewed by Youenn Fablet.
1862 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1863 (WebKit::WebSWContextManagerConnection::updatePreferencesStore):
1864 Enable Resource Timing / User Timing for the ServiceWorker process.
1866 2018-01-04 Zan Dobersek <zdobersek@igalia.com>
1868 Unreviewed GTK+ build fix.
1870 * UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp:
1871 (webkit_user_media_permission_is_for_audio_device):
1872 Call UserMediaPermissionRequestProxy::requiresAudioCapture().
1873 (webkit_user_media_permission_is_for_video_device):
1874 Call UserMediaPermissionRequestProxy::requiresVideoCapture().
1876 2018-01-04 Don Olmstead <don.olmstead@sony.com>
1878 [Curl] Fix compilation error in WebFrameNetworkingContext
1879 https://bugs.webkit.org/show_bug.cgi?id=181312
1881 Reviewed by Alex Christensen.
1883 * WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp:
1884 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
1886 2018-01-04 Tim Horton <timothy_horton@apple.com>
1888 WKWebView loses minimum layout size overrides that happen while the process is terminated
1889 https://bugs.webkit.org/show_bug.cgi?id=181306
1890 <rdar://problem/34398288>
1892 Reviewed by Dan Bernstein.
1894 * Shared/WebPageCreationParameters.cpp:
1895 (WebKit::WebPageCreationParameters::encode const):
1896 (WebKit::WebPageCreationParameters::decode):
1897 * Shared/WebPageCreationParameters.h:
1898 * UIProcess/API/Cocoa/WKWebView.mm:
1899 (-[WKWebView _didRelaunchProcess]): Deleted.
1900 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1901 * UIProcess/WebPageProxy.cpp:
1902 (WebKit::WebPageProxy::creationParameters):
1903 * UIProcess/WebPageProxy.h:
1904 * UIProcess/ios/PageClientImplIOS.mm:
1905 (WebKit::PageClientImpl::didRelaunchProcess):
1906 * UIProcess/ios/WebPageProxyIOS.mm:
1907 (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
1908 (WebKit::WebPageProxy::setForceAlwaysUserScalable):
1909 (WebKit::WebPageProxy::setMaximumUnobscuredSize):
1910 * WebProcess/WebPage/WebPage.cpp:
1911 (WebKit::WebPage::WebPage):
1912 Pass the current viewport minimum layout size and maximum unobscured size
1913 in the WebPageCreationParameters instead of re-sending them in _didRelaunchProcess.
1915 The previous approach was problematic when _dispatchSetMinimumLayoutSize:
1916 was changed to not re-send identical updates, because if the client calls
1917 _overrideLayoutParametersWithMinimumLayoutSize before the Web Content process
1918 is re-launched (after terminating), we would cache the size, attempt to send it,
1919 fail silently (because the process is not launched), and then in _didRelaunchProcess
1920 we would choose not to re-send (after the process is successfully relaunched)
1921 because we think we already sent the new value.
1923 Add isValid() checks to our message sends. Ideally send() would assert
1924 if the process is not alive to avoid problems like this, but it doesn't (yet).
1926 Get rid of WKWebView's _didRelaunchProcess, because it does nothing now.
1928 2018-01-04 Stephan Szabo <stephan.szabo@sony.com>
1930 NetworkProcess cache files use functions from unistd.h without explicitly including it
1931 https://bugs.webkit.org/show_bug.cgi?id=181261
1933 Reviewed by Alex Christensen.
1935 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
1936 * NetworkProcess/cache/NetworkCacheData.cpp:
1938 2018-01-04 Keith Rollin <krollin@apple.com>
1941 https://bugs.webkit.org/show_bug.cgi?id=181295
1942 <rdar://problem/35802295>
1944 Reviewed by Brent Fulgham.
1946 Fix a problem introduced in r226226 where the emitted JSON didn't
1947 include some required commas.
1949 * NetworkProcess/NetworkResourceLoader.cpp:
1950 (WebKit::NetworkResourceLoader::logCookieInformation const):
1952 2018-01-04 Eric Carlson <eric.carlson@apple.com>
1954 [MediaStream] Add Mock screen capture source
1955 https://bugs.webkit.org/show_bug.cgi?id=181291
1956 <rdar://problem/36298164>
1958 Reviewed by Dean Jackson.
1960 * Shared/WebCoreArgumentCoders.cpp:
1961 (IPC::ArgumentCoder<MediaConstraints>::decode):
1962 (IPC::ArgumentCoder<CaptureDevice>::encode): Deleted, moved to CaptureDevice.h
1963 (IPC::ArgumentCoder<CaptureDevice>::decode): Ditto.
1964 * Shared/WebCoreArgumentCoders.h:
1966 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add _WKCaptureDeviceDisplay.
1967 * UIProcess/Cocoa/UIDelegate.mm:
1968 (WebKit::requestUserMediaAuthorizationForDevices): Deal with display capture.
1969 (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Ditto.
1971 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1972 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied): requiresAudio -> requiresAudioCapture.
1973 (WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest const): Never reuse
1974 a previously granted display capture request.
1976 * UIProcess/UserMediaPermissionRequestProxy.cpp:
1977 (WebKit::UserMediaPermissionRequestProxy::allow): Search the eligible devices instead of asking
1978 the source center to find devices.
1979 * UIProcess/UserMediaPermissionRequestProxy.h:
1980 (WebKit::UserMediaPermissionRequestProxy::requiresAudioCapture const): Renamed.
1981 (WebKit::UserMediaPermissionRequestProxy::requiresVideoCapture const): Ditto.
1982 (WebKit::UserMediaPermissionRequestProxy::requiresDisplayCapture const): New.
1983 (WebKit::UserMediaPermissionRequestProxy::requiresAudio const): Deleted.
1984 (WebKit::UserMediaPermissionRequestProxy::requiresVideo const): Deleted.
1986 2018-01-04 Youenn Fablet <youenn@apple.com>
1988 FetchResponse should set its internal response text encoding name
1989 https://bugs.webkit.org/show_bug.cgi?id=181284
1991 Reviewed by Alex Christensen.
1993 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
1994 (WebKit::ServiceWorkerClientFetch::didReceiveResponse): Set default encoding to UTF-8.
1996 2018-01-04 Youenn Fablet <youenn@apple.com>
1998 Implement Cache API partitioning based on ClientOrigin
1999 https://bugs.webkit.org/show_bug.cgi?id=181240
2001 Reviewed by Alex Christensen.
2003 open and retrieveCaches now take a ClientOrigin instead of a String.
2004 Updated cache filesystem path computation to take both client origin and top origin.
2006 When clearing an origin, caches whose client origin or top origin matches the origin are cleared.
2007 Caches are added to the web site data of their client origin with their corresponding cache size.
2008 Caches are added to the web site data of their top origin with a size equal to 0.
2010 Updated memory representation dumping used for test to include both top and client origins.
2012 * NetworkProcess/NetworkProcess.cpp:
2013 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2014 * NetworkProcess/cache/CacheStorageEngine.cpp:
2015 (WebKit::CacheStorage::Engine::cachesRootPath):
2016 (WebKit::CacheStorage::Engine::open):
2017 (WebKit::CacheStorage::Engine::remove):
2018 (WebKit::CacheStorage::Engine::retrieveCaches):
2019 (WebKit::CacheStorage::Engine::readCachesFromDisk):
2020 (WebKit::CacheStorage::Engine::removeCaches):
2021 (WebKit::CacheStorage::Engine::fetchEntries):
2022 (WebKit::CacheStorage::Engine::clearCachesForOrigin):
2023 (WebKit::CacheStorage::Engine::clearMemoryRepresentation):
2024 (WebKit::CacheStorage::Engine::representation):
2025 * NetworkProcess/cache/CacheStorageEngine.h:
2026 * NetworkProcess/cache/CacheStorageEngineCache.cpp:
2027 (WebKit::CacheStorage::Cache::Cache):
2028 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2029 (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
2030 (WebKit::CacheStorage::Caches::Caches):
2031 (WebKit::CacheStorage::Caches::storeOrigin):
2032 (WebKit::CacheStorage::Caches::readOrigin):
2033 (WebKit::CacheStorage::Caches::open):
2034 * NetworkProcess/cache/CacheStorageEngineCaches.h:
2035 (WebKit::CacheStorage::Caches::create):
2036 (WebKit::CacheStorage::Caches::origin const):
2037 * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
2038 (WebKit::CacheStorageEngineConnection::open):
2039 (WebKit::CacheStorageEngineConnection::caches):
2040 (WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
2041 * NetworkProcess/cache/CacheStorageEngineConnection.h:
2042 * NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
2043 * WebProcess/Cache/WebCacheStorageConnection.cpp:
2044 (WebKit::WebCacheStorageConnection::doOpen):
2045 (WebKit::WebCacheStorageConnection::doRetrieveCaches):
2046 (WebKit::WebCacheStorageConnection::clearMemoryRepresentation):
2047 * WebProcess/Cache/WebCacheStorageConnection.h:
2049 2018-01-04 Youenn Fablet <youenn@apple.com>
2051 Service Worker should expose redirect mode for navigation loads as manual
2052 https://bugs.webkit.org/show_bug.cgi?id=181067
2054 Reviewed by Alex Christensen.
2056 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
2057 (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
2059 2018-01-03 Wenson Hsieh <wenson_hsieh@apple.com>
2061 [Attachment Support] Create attachment elements when dropping files on iOS
2062 https://bugs.webkit.org/show_bug.cgi?id=181192
2063 <rdar://problem/36280945>
2065 Reviewed by Tim Horton.
2067 Make some minor adjustments for changes to the pasteboard in WebCore. See WebCore/ChangeLog for more detail.
2068 Teaches WebPasteboardProxy et. al. to plumb PasteboardItemInfo from the UI process to the web process via the
2069 new `InformationForItemAtIndex` codepath.
2071 * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
2072 (WebKit::WebPasteboardProxy::informationForItemAtIndex):
2073 (WebKit::WebPasteboardProxy::getFilenamesForDataInteraction): Deleted.
2074 * UIProcess/WebPasteboardProxy.h:
2075 * UIProcess/WebPasteboardProxy.messages.in:
2076 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2077 (WebKit::WebPlatformStrategies::informationForItemAtIndex):
2078 (WebKit::WebPlatformStrategies::getFilenamesForDataInteraction): Deleted.
2079 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2081 2018-01-03 Ting-Wei Lan <lantw44@gmail.com>
2083 Replace hard-coded paths in shebangs with #!/usr/bin/env
2084 https://bugs.webkit.org/show_bug.cgi?id=181040
2086 Reviewed by Alex Christensen.
2088 * Scripts/generate-forwarding-headers.pl:
2090 2018-01-03 Wenson Hsieh <wenson_hsieh@apple.com>
2092 [Attachment Support] Add plumbing for starting a drag with promised blob data
2093 https://bugs.webkit.org/show_bug.cgi?id=181201
2095 Reviewed by Tim Horton.
2097 Add boilerplate plumbing for PrepareToDragPromisedBlob, which delivers blob promises to the UI process when
2098 dragging, respectively.
2100 * Scripts/webkit/messages.py:
2102 * Shared/WebCoreArgumentCoders.cpp:
2103 (IPC::encodeTypesAndData):
2104 (IPC::decodeTypesAndData):
2105 (IPC::ArgumentCoder<PasteboardWebContent>::encode):
2106 (IPC::ArgumentCoder<PasteboardWebContent>::decode):
2107 (IPC::ArgumentCoder<PasteboardImage>::encode):
2108 (IPC::ArgumentCoder<PasteboardImage>::decode):
2109 (IPC::ArgumentCoder<PromisedBlobInfo>::encode):
2110 (IPC::ArgumentCoder<PromisedBlobInfo>::decode):
2112 Add IPC support PromisedBlobInfo's additionalTypes and additionalData.
2114 (IPC::encodeClientTypesAndData): Deleted.
2115 (IPC::decodeClientTypesAndData): Deleted.
2117 Rename these helper functions and move them to the top of the file.
2119 * UIProcess/Cocoa/WebViewImpl.h:
2120 * UIProcess/Cocoa/WebViewImpl.mm:
2121 (WebKit::WebViewImpl::prepareToDragPromisedBlob):
2122 * UIProcess/PageClient.h:
2123 (WebKit::PageClient::prepareToDragPromisedBlob):
2124 * UIProcess/WebPageProxy.cpp:
2125 (WebKit::WebPageProxy::prepareToDragPromisedBlob):
2126 * UIProcess/WebPageProxy.h:
2127 * UIProcess/WebPageProxy.messages.in:
2128 * UIProcess/ios/PageClientImplIOS.h:
2129 * UIProcess/ios/PageClientImplIOS.mm:
2130 (WebKit::PageClientImpl::prepareToDragPromisedBlob):
2131 * UIProcess/ios/WKContentViewInteraction.h:
2132 * UIProcess/ios/WKContentViewInteraction.mm:
2133 (-[WKContentView _prepareToDragPromisedBlob:]):
2134 * UIProcess/mac/PageClientImplMac.h:
2135 * UIProcess/mac/PageClientImplMac.mm:
2136 (WebKit::PageClientImpl::prepareToDragPromisedBlob):
2137 * WebProcess/WebCoreSupport/WebDragClient.cpp:
2138 (WebKit::WebDragClient::prepareToDragPromisedBlob):
2139 * WebProcess/WebCoreSupport/WebDragClient.h:
2140 * WebProcess/WebPage/WebPage.cpp:
2141 (WebKit::WebPage::prepareToDragPromisedBlob):
2142 * WebProcess/WebPage/WebPage.h:
2144 2018-01-03 David Kilzer <ddkilzer@apple.com>
2146 REGRESSION (r212929): WKSnapshotConfiguration may leak an NSNumber when deallocated
2147 <https://webkit.org/b/181274>
2149 Reviewed by Joseph Pecoraro.
2151 * UIProcess/API/Cocoa/WKSnapshotConfiguration.mm:
2152 (-[WKSnapshotConfiguration dealloc]): Implement method and
2153 release _snapshotWidth.
2155 2018-01-03 John Wilander <wilander@apple.com>
2157 Storage Access API: Refactor XPC for access removal to go straight from the web process to the network process
2158 https://bugs.webkit.org/show_bug.cgi?id=181270
2159 <rdar://problem/36289544>
2161 Reviewed by Alex Christensen.
2163 This change refactors how the web process tells the network process
2164 to remove storage access. Previously, this was done over the UI process
2165 just like requests for storage access. But since no further reasoning
2166 is needed, the message should go straight from the web process to the
2167 network process for performance reasons and to minimize the risk of a
2170 As a consequence, the XPC code for storage access removal in the UI
2173 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2174 (WebKit::NetworkConnectionToWebProcess::removeStorageAccess):
2175 * NetworkProcess/NetworkConnectionToWebProcess.h:
2176 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2177 * NetworkProcess/NetworkProcess.cpp:
2178 (WebKit::NetworkProcess::removeStorageAccess): Deleted.
2179 * NetworkProcess/NetworkProcess.h:
2180 * NetworkProcess/NetworkProcess.messages.in:
2181 * UIProcess/Network/NetworkProcessProxy.cpp:
2182 (WebKit::NetworkProcessProxy::removeStorageAccess): Deleted.
2183 * UIProcess/Network/NetworkProcessProxy.h:
2184 * UIProcess/WebPageProxy.cpp:
2185 (WebKit::WebPageProxy::requestStorageAccess):
2186 (WebKit::WebPageProxy::removeStorageAccess): Deleted.
2187 * UIProcess/WebPageProxy.h:
2188 * UIProcess/WebPageProxy.messages.in:
2189 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2190 (WebKit::WebsiteDataStore::requestStorageAccess):
2191 (WebKit::WebsiteDataStore::removeStorageAccess): Deleted.
2192 * UIProcess/WebsiteData/WebsiteDataStore.h:
2193 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2194 (WebKit::WebFrameLoaderClient::detachedFromParent2):
2195 (WebKit::WebFrameLoaderClient::dispatchWillChangeDocument):
2197 2018-01-03 David Kilzer <ddkilzer@apple.com>
2199 com.apple.WebKit.Networking crash in com.apple.Foundation: -[__NSOperationInternal _start:]
2200 <https://webkit.org/b/181272>
2201 <rdar://problem/35657310>
2203 Reviewed by Alex Christensen.
2205 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2206 (downgradeRequest): Remove unnecessary -autorelease.
2208 2018-01-03 Brent Fulgham <bfulgham@apple.com>
2210 [macOS] Constant frame dropping during Flash video playback
2211 https://bugs.webkit.org/show_bug.cgi?id=181249
2212 <rdar://problem/34843448>
2214 Reviewed by Eric Carlson.
2216 Review of logs during jerky flash video playback shows a few IOKit properties are being blocked by the sandbox,
2217 which prevents some high-efficiency codecs from being used. Add 'AppleGVAKeyDoesNotExist', 'IODVDBundleName', and
2218 'IOGVA*Encode' to the whitelist.
2220 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2222 2018-01-03 Michael Catanzaro <mcatanzaro@igalia.com>
2224 [GTK] Add web process API to detect when form is submitted via JavaScript
2225 https://bugs.webkit.org/show_bug.cgi?id=173915
2227 Reviewed by Carlos Garcia Campos.
2229 Epiphany relies on the DOM submit event to detect when a form has been submitted. However,
2230 for historical reasons, the submit event is not emitted when a form is submitted by
2231 JavaScript. It is therefore not currently possible for a web browser to reliably detect form
2232 submission and not possible to implement a robust password storage feature. In order to
2233 avoid this problem, this patch adds a new WebKitWebPage signal, will-submit-form, that
2234 browsers can use in preference to a DOM event listener.
2236 Unfortunately, this signal is not available for WPE because it depends on the DOM API.
2238 There are two submission events, WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT and
2239 WEBKIT_FORM_SUBMISSION_WILL_COMPLETE. WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT
2240 occurs earlier than WEBKIT_FORM_SUBMISSION_WILL_COMPLETE and can be used to retrieve form
2241 values before websites receive the DOM submit event. This is useful as some websites like
2242 to delete form values right before a submit would normally happen in order to attempt to
2243 defeat browser password managers. There are two tricks to note: JavaScript can cancel form
2244 submission immediately after this event occurs (by returning false in an onsubmit handler),
2245 and, for historical reasons, this event will not occur at all when form submission is
2246 triggered by JavaScript. WEBKIT_FORM_SUBMISSION_WILL_COMPLETE occurs next, and is more
2247 straightforward: it is always emitted when a form is about to be submitted, when it is too
2250 The recommended way to reliably retrieve password form values would be to watch for both
2251 events, use the form value detected in WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT
2252 if that event is emitted, and use the value detected later in
2253 WEBKIT_FORM_SUBMISSION_WILL_COMPLETE otherwise.
2255 Since one of the signal arguments is an enum, we now have to run glib-mkenums for the web
2256 process API. And that has resulted in this patch also adding GType goo for
2257 WebKitConsoleMessageLevel and WebKitConsoleMessageSource that was previously missing. Any
2258 applications that for some unlikely reason want to use these enums in properties or signals
2261 * PlatformGTK.cmake:
2262 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2263 * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
2264 (webkit_web_page_class_init):
2265 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
2266 * WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.cpp.template: Added.
2267 * WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.h.template: Added.
2269 2018-01-03 Carlos Garcia Campos <cgarcia@igalia.com>
2271 Unreviewed. Really fix plugin process after r226327.
2273 * PluginProcess/unix/PluginProcessMainUnix.cpp:
2275 2018-01-02 Brent Fulgham <bfulgham@apple.com>
2277 [macOS, iOS] Adopt new secure coding APIs in WebKit
2278 https://bugs.webkit.org/show_bug.cgi?id=181085
2279 <rdar://problem/34837397>
2281 Reviewed by Tim Horton.
2283 Update WebKit code to use NSSecureCoding when the underlying operating system supports it. Use new
2284 wrapper functions so the same code can be built on all supported OS releases, while enabling
2285 seure coding when possible.
2287 Note that NSView-based classes cannot be migrated at present due to AppKit not supporting NSSecureCoding
2288 in its class hierarchy.
2290 Tested by exising TestWebKitAPI tests for Coding and data transfer.
2292 * Platform/ios/AccessibilityIOS.mm:
2293 (WebKit::newAccessibilityRemoteToken): Encode using NSSecureCoding.
2294 * UIProcess/API/Cocoa/WKPreferences.h:
2295 * UIProcess/API/Cocoa/WKPreferences.mm:
2296 (+[WKPreferences supportsSecureCoding]): Added to enable NSSecureCoding.
2297 * UIProcess/API/Cocoa/WKProcessPool.h:
2298 * UIProcess/API/Cocoa/WKProcessPool.mm:
2299 (+[WKProcessPool supportsSecureCoding]): Ditto.
2300 * UIProcess/API/Cocoa/WKUserContentController.h:
2301 * UIProcess/API/Cocoa/WKUserContentController.mm:
2302 (+[WKUserContentController supportsSecureCoding]): Ditto.
2303 * UIProcess/API/Cocoa/WKWebView.mm:
2304 (-[WKWebView initWithCoder:]): Use coding initialization that supports secure coding if
2305 it is available in the supplied class.
2306 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2307 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2308 (+[WKWebViewConfiguration supportsSecureCoding]): Added to enable NSSecureCoding.
2309 (-[WKWebViewConfiguration initWithCoder:]): Use secure coding when possible.
2310 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2311 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2312 (+[WKWebsiteDataStore supportsSecureCoding]): Added to enable NSSecureCoding.
2313 * UIProcess/API/Cocoa/_WKApplicationManifest.h:
2314 * UIProcess/API/Cocoa/_WKApplicationManifest.mm:
2315 (+[_WKApplicationManifest supportsSecureCoding]): Added to enable NSSecureCoding.
2316 (-[_WKApplicationManifest initWithCoder:]): Use secure coding when possible.
2318 2017-12-28 Yusuke Suzuki <utatane.tea@gmail.com>
2320 Remove std::chrono completely
2321 https://bugs.webkit.org/show_bug.cgi?id=181186
2323 Reviewed by Alex Christensen.
2325 Use MonotonicTime, WallTime, and Seconds instead.
2326 Changes are mechanical ones.
2328 * NetworkProcess/NetworkProcess.cpp:
2329 (WebKit::NetworkProcess::deleteWebsiteData):
2330 * NetworkProcess/NetworkProcess.h:
2331 * NetworkProcess/NetworkProcess.messages.in:
2332 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2333 (WebKit::CacheStorage::Caches::clear):
2334 * NetworkProcess/cache/NetworkCache.cpp:
2335 (WebKit::NetworkCache::responseHasExpired):
2336 (WebKit::NetworkCache::responseNeedsRevalidation):
2337 (WebKit::NetworkCache::makeStoreDecision):
2338 (WebKit::NetworkCache::Cache::clear):
2339 (WebKit::NetworkCache::Cache::storeData):
2340 * NetworkProcess/cache/NetworkCache.h:
2341 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2342 (WebKit::NetworkCache::Entry::Entry):
2343 (WebKit::NetworkCache::Entry::asJSON const):
2344 * NetworkProcess/cache/NetworkCacheEntry.h:
2345 (WebKit::NetworkCache::Entry::timeStamp const):
2346 * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
2347 (WebKit::NetworkCache::fileTimes):
2348 (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
2349 * NetworkProcess/cache/NetworkCacheFileSystem.h:
2350 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2351 (WebKit::NetworkCache::IOChannel::IOChannel):
2352 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2353 (WebKit::NetworkCache::responseNeedsRevalidation):
2354 (WebKit::NetworkCache::canRevalidate):
2355 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2356 (WebKit::NetworkCache::Storage::readRecord):
2357 (WebKit::NetworkCache::Storage::clear):
2358 (WebKit::NetworkCache::computeRecordWorth):
2359 * NetworkProcess/cache/NetworkCacheStorage.h:
2360 Bump the cache version. We now change the data in persistent cache.
2361 * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
2362 (WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
2363 (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
2364 * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
2365 (WebKit::NetworkCache::SubresourceInfo::lastSeen const):
2366 (WebKit::NetworkCache::SubresourceInfo::firstSeen const):
2367 (WebKit::NetworkCache::SubresourcesEntry::timeStamp const):
2368 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2369 (WebKit::NetworkProcess::clearHSTSCache):
2370 (WebKit::clearNSURLCache):
2371 (WebKit::NetworkProcess::clearDiskCache):
2372 * NetworkProcess/curl/NetworkProcessCurl.cpp:
2373 (WebKit::NetworkProcess::clearDiskCache):
2374 * NetworkProcess/mac/NetworkProcessMac.mm:
2375 (WebKit::NetworkProcess::clearCacheForAllOrigins):
2376 * NetworkProcess/soup/NetworkProcessSoup.cpp:
2377 (WebKit::NetworkProcess::clearCacheForAllOrigins):
2378 (WebKit::NetworkProcess::clearDiskCache):
2379 * Platform/IPC/ArgumentCoders.cpp:
2380 (IPC::ArgumentCoder<WallTime>::encode):
2381 (IPC::ArgumentCoder<WallTime>::decode):
2382 (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode): Deleted.
2383 (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode): Deleted.
2384 * Platform/IPC/ArgumentCoders.h:
2385 * PluginProcess/PluginProcess.cpp:
2386 (WebKit::PluginProcess::deleteWebsiteData):
2387 * PluginProcess/PluginProcess.h:
2388 * PluginProcess/PluginProcess.messages.in:
2389 * Scripts/webkit/messages.py:
2391 * Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
2392 (WebKit::RemoteLayerBackingStore::lastDisplayTime const):
2393 * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
2394 (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
2395 (WebKit::RemoteLayerBackingStore::display):
2396 * Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
2397 * Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
2398 (WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
2399 (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
2400 * Shared/WebCoreArgumentCoders.cpp:
2401 (IPC::ArgumentCoder<RecentSearch>::decode):
2402 (IPC::ArgumentCoder<WallTime>::encode): Deleted.
2403 (IPC::ArgumentCoder<WallTime>::decode): Deleted.
2404 * Shared/WebCoreArgumentCoders.h:
2405 * StorageProcess/StorageProcess.cpp:
2406 (WebKit::StorageProcess::deleteWebsiteData):
2407 * StorageProcess/StorageProcess.h:
2408 * StorageProcess/StorageProcess.messages.in:
2409 * UIProcess/API/C/WKApplicationCacheManager.cpp:
2410 (WKApplicationCacheManagerDeleteAllEntries):
2411 * UIProcess/API/C/WKCookieManager.cpp:
2412 (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
2413 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
2414 (WKKeyValueStorageManagerDeleteAllEntries):
2415 * UIProcess/API/C/WKResourceCacheManager.cpp:
2416 (WKResourceCacheManagerClearCacheForAllOrigins):
2417 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2418 (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
2419 (WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval):
2420 (WKWebsiteDataStoreRemoveAllFetchCaches):
2421 (WKWebsiteDataStoreRemoveAllIndexedDatabases):
2422 (WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
2423 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2424 (toSystemClockTime):
2425 (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]):
2426 * UIProcess/API/glib/WebKitWebContext.cpp:
2427 (webkit_web_context_clear_cache):
2428 * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
2429 (webkit_website_data_manager_clear):
2430 * UIProcess/DrawingAreaProxy.h:
2431 * UIProcess/Network/NetworkProcessProxy.cpp:
2432 (WebKit::NetworkProcessProxy::deleteWebsiteData):
2433 * UIProcess/Network/NetworkProcessProxy.h:
2434 * UIProcess/Plugins/PluginProcessManager.cpp:
2435 (WebKit::PluginProcessManager::deleteWebsiteData):
2436 * UIProcess/Plugins/PluginProcessManager.h:
2437 * UIProcess/Plugins/PluginProcessProxy.cpp:
2438 (WebKit::PluginProcessProxy::deleteWebsiteData):
2439 * UIProcess/Plugins/PluginProcessProxy.h:
2440 * UIProcess/Storage/StorageProcessProxy.cpp:
2441 (WebKit::StorageProcessProxy::deleteWebsiteData):
2442 * UIProcess/Storage/StorageProcessProxy.h:
2443 * UIProcess/WebCookieManagerProxy.cpp:
2444 (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
2445 * UIProcess/WebCookieManagerProxy.h:
2446 * UIProcess/WebProcessProxy.cpp:
2447 (WebKit::WebProcessProxy::deleteWebsiteData):
2448 * UIProcess/WebProcessProxy.h:
2449 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2450 (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
2451 * UIProcess/WebResourceLoadStatisticsStore.h:
2452 * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
2453 (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
2454 * UIProcess/WebStorage/LocalStorageDatabaseTracker.h:
2455 * UIProcess/WebStorage/StorageManager.cpp:
2456 (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
2457 * UIProcess/WebStorage/StorageManager.h:
2458 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2459 (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
2460 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2461 (WebKit::WebsiteDataStore::removeData):
2462 (WebKit::WebsiteDataStore::removeMediaKeys):
2463 * UIProcess/WebsiteData/WebsiteDataStore.h:
2464 * UIProcess/gtk/WebPageProxyGtk.cpp:
2465 (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
2466 * UIProcess/wpe/WebPageProxyWPE.cpp:
2467 (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
2468 * WebProcess/Cookies/WebCookieManager.cpp:
2469 (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
2470 * WebProcess/Cookies/WebCookieManager.h:
2471 * WebProcess/Cookies/WebCookieManager.messages.in:
2472 * WebProcess/Plugins/PluginView.cpp:
2473 (WebKit::lastModifiedDateMS):
2474 * WebProcess/WebProcess.cpp:
2475 (WebKit::WebProcess::deleteWebsiteData):
2476 * WebProcess/WebProcess.h:
2477 * WebProcess/WebProcess.messages.in:
2479 2018-01-02 Wenson Hsieh <wenson_hsieh@apple.com>
2481 [Attachment Support] Introduce data structures and IPC support for writing promised blobs
2482 https://bugs.webkit.org/show_bug.cgi?id=181189
2484 Reviewed by Tim Horton.
2486 Add IPC support for PromisedBlobInfo and PromisedBlobData. See WebCore/ChangeLog for more detail.
2488 * Shared/WebCoreArgumentCoders.cpp:
2489 (IPC::ArgumentCoder<PromisedBlobData>::encode):
2490 (IPC::ArgumentCoder<PromisedBlobData>::decode):
2491 (IPC::ArgumentCoder<PromisedBlobInfo>::encode):
2492 (IPC::ArgumentCoder<PromisedBlobInfo>::decode):
2493 * Shared/WebCoreArgumentCoders.h:
2495 2018-01-02 Michael Catanzaro <mcatanzaro@igalia.com>
2497 REGRESSION(r223253): Broke ResourceLoadStatistics layout tests for non-Cocoa ports
2498 https://bugs.webkit.org/show_bug.cgi?id=181231
2500 Reviewed by Alex Christensen.
2502 Add new C API for use by WebKitTestRunner.
2504 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2505 (WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
2506 (WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
2507 * UIProcess/API/C/WKWebsiteDataStoreRef.h:
2509 2018-01-02 Jiewen Tan <jiewen_tan@apple.com>
2511 Add a WebAuthentication runtime feature flag
2512 https://bugs.webkit.org/show_bug.cgi?id=181220
2513 <rdar://problem/36055305>
2515 Reviewed by Brent Fulgham.
2517 Renames the CredentialManagement runtime feature flag into WebAuthentication.
2519 * Shared/WebPreferences.yaml:
2520 * UIProcess/API/C/WKPreferences.cpp:
2521 (WKPreferencesSetWebAuthenticationEnabled):
2522 (WKPreferencesGetWebAuthenticationEnabled):
2523 (WKPreferencesSetCredentialManagementEnabled): Deleted.
2524 (WKPreferencesGetCredentialManagementEnabled): Deleted.
2525 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2526 * WebProcess/WebPage/WebPage.cpp:
2527 (WebKit::WebPage::updatePreferences):
2529 2018-01-02 Michael Catanzaro <mcatanzaro@igalia.com>
2531 REGRESSION(r226327): [GTK] Plugin process is broken
2532 https://bugs.webkit.org/show_bug.cgi?id=181187
2534 Unreviewed, fix PluginProcessMainUnix after r226327.
2536 * PluginProcess/unix/PluginProcessMainUnix.cpp:
2538 2018-01-02 Tim Horton <timothy_horton@apple.com>
2540 Fix the build on platforms where UICurrentUserInterfaceIdiomIsPad is defined to false
2541 https://bugs.webkit.org/show_bug.cgi?id=181218
2543 Reviewed by Alex Christensen.
2545 * Platform/spi/ios/UIKitSPI.h:
2546 (currentUserInterfaceIdiomIsPad):
2547 * UIProcess/ios/SmartMagnificationController.mm:
2548 (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
2549 * UIProcess/ios/WKContentViewInteraction.mm:
2550 (-[WKFormInputSession setAccessoryViewCustomButtonTitle:]):
2551 (-[WKContentView _requiresKeyboardWhenFirstResponder]):
2552 (-[WKContentView _displayFormNodeInputView]):
2553 (-[WKContentView requiresAccessoryView]):
2554 (-[WKContentView _updateAccessory]):
2555 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2556 (-[WKAirPlayRoutePicker show:fromRect:]):
2557 * UIProcess/ios/forms/WKFileUploadPanel.mm:
2558 (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
2559 (-[WKFileUploadPanel _presentMenuOptionForCurrentInterfaceIdiom:]):
2560 * UIProcess/ios/forms/WKFormInputControl.mm:
2561 (-[WKDateTimePicker initWithView:datePickerMode:]):
2562 (-[WKFormInputControl initWithView:]):
2563 * UIProcess/ios/forms/WKFormSelectControl.mm:
2564 (-[WKFormSelectControl initWithView:]):
2565 On platforms where UICurrentUserInterfaceIdiomIsPad is defined to false,
2566 blocks that conditionally execute based on its value are unreachable.
2567 This causes the compiler to complain. Hide it away inside an inline function
2568 and make use of that everywhere we used to use the macro.
2570 2018-01-02 Alex Christensen <achristensen@webkit.org>
2572 Remove SVN file accidentally added in r226160
2573 https://bugs.webkit.org/show_bug.cgi?id=180934
2575 * UIProcess/WebPageProxy.cpp.orig: Removed.
2577 2018-01-02 Alex Christensen <achristensen@webkit.org>
2579 Use BlockPtrs and lambdas instead of new/delete to pass parameters to blocks in WebViewImpl::performDragOperation
2580 https://bugs.webkit.org/show_bug.cgi?id=180795
2582 Reviewed by Brent Fulgham.
2584 * UIProcess/Cocoa/WebViewImpl.mm:
2585 (WebKit::WebViewImpl::performDragOperation):
2587 2018-01-02 Michael Catanzaro <mcatanzaro@igalia.com>
2589 [WPE][GTK] Implement the assignment of ProcessIdentifiers to child processes
2590 https://bugs.webkit.org/show_bug.cgi?id=181187
2592 Reviewed by Brady Eidson.
2594 * Shared/ChildProcess.cpp: Make the ProcessIdentifier mandatory.
2595 (WebKit::ChildProcess::initialize):
2596 * Shared/unix/ChildProcessMain.cpp: Initialize ChildProcessInitializationParameters with the
2598 (WebKit::ChildProcessMainBase::parseCommandLine):
2599 * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp: Copy the ProcessIdentifier from
2600 LaunchOptions into argv.
2601 (WebKit::ProcessLauncher::launchProcess):
2602 * WebProcess/wpe/WebProcessMainWPE.cpp: Expect the WPE socket ID later in the command line.
2604 2018-01-02 Alex Christensen <achristensen@webkit.org>
2606 Use new WebsiteDataStore passed in through decidePolicyForNavigation SPI
2607 https://bugs.webkit.org/show_bug.cgi?id=180897
2608 <rdar://problem/35535328>
2610 Reviewed by Brent Fulgham.
2612 * Shared/WebsitePoliciesData.cpp:
2613 (WebKit::WebsitePoliciesData::applyToDocumentLoader):
2614 * UIProcess/Cocoa/NavigationState.mm:
2615 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
2616 * UIProcess/WebPageProxy.cpp:
2617 (WebKit::WebPageProxy::changeWebsiteDataStore):
2618 * UIProcess/WebPageProxy.h:
2619 * UIProcess/WebProcessPool.cpp:
2620 (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
2621 (WebKit::WebProcessPool::pageEndUsingWebsiteDataStore):
2622 (WebKit::WebProcessPool::pageAddedToProcess): Deleted.
2623 (WebKit::WebProcessPool::pageRemovedFromProcess): Deleted.
2624 * UIProcess/WebProcessPool.h:
2625 * UIProcess/WebProcessProxy.cpp:
2626 (WebKit::WebProcessProxy::addExistingWebPage):
2627 (WebKit::WebProcessProxy::removeWebPage):
2628 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2629 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
2631 2018-01-02 Alex Christensen <achristensen@webkit.org>
2633 Only use CookieStorageShim when we aren't using NetworkSession
2634 https://bugs.webkit.org/show_bug.cgi?id=180766
2636 Reviewed by Brent Fulgham.
2638 * Shared/mac/CookieStorageShim.h:
2639 * Shared/mac/CookieStorageShim.mm:
2640 * WebProcess/WebProcess.cpp:
2641 (WebKit::WebProcess::initializeWebProcess):
2643 2018-01-02 Alex Christensen <achristensen@webkit.org>
2645 Clean up context menu code
2646 https://bugs.webkit.org/show_bug.cgi?id=181074
2648 Reviewed by Brent Fulgham.
2650 Use Ref instead of RefPtr where possible.
2651 Use move semantics instead of copying from const references when possible.
2652 Remove dead iOS code. Reduce allocations. Add stub for WPE.
2654 * UIProcess/API/APIContextMenuClient.h:
2655 (API::ContextMenuClient::getContextMenuFromProposedMenu):
2656 (API::ContextMenuClient::getContextMenuFromProposedMenuAsync):
2657 (API::ContextMenuClient::showContextMenu):
2658 * UIProcess/API/C/WKPage.cpp:
2659 (WKPageSetPageContextMenuClient):
2660 * UIProcess/API/gtk/PageClientImpl.cpp:
2661 (WebKit::PageClientImpl::createContextMenuProxy):
2662 * UIProcess/API/gtk/PageClientImpl.h:
2663 * UIProcess/PageClient.h:
2664 * UIProcess/WebContextMenuListenerProxy.cpp:
2665 (WebKit::WebContextMenuListenerProxy::useContextMenuItems):
2666 * UIProcess/WebContextMenuProxy.cpp:
2667 (WebKit::WebContextMenuProxy::WebContextMenuProxy):
2668 * UIProcess/WebContextMenuProxy.h:
2669 * UIProcess/WebPageProxy.cpp:
2670 (WebKit::WebPageProxy::showContextMenu):
2671 (WebKit::WebPageProxy::internalShowContextMenu): Deleted.
2672 * UIProcess/WebPageProxy.h:
2673 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2674 (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems):
2675 (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
2676 * UIProcess/gtk/WebContextMenuProxyGtk.h:
2677 (WebKit::WebContextMenuProxyGtk::create):
2678 * UIProcess/ios/PageClientImplIOS.h:
2679 * UIProcess/ios/PageClientImplIOS.mm:
2680 (WebKit::PageClientImpl::createContextMenuProxy): Deleted.
2681 * UIProcess/mac/PageClientImplMac.h:
2682 * UIProcess/mac/PageClientImplMac.mm:
2683 (WebKit::PageClientImpl::createContextMenuProxy):
2684 * UIProcess/mac/WebContextMenuProxyMac.h:
2685 (WebKit::WebContextMenuProxyMac::create):
2686 * UIProcess/mac/WebContextMenuProxyMac.mm:
2687 (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
2688 (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
2689 (WebKit::WebContextMenuProxyMac::showContextMenu):
2691 == Rolled over to ChangeLog-2018-01-01 ==