1 2018-01-18 Chris Dumez <cdumez@apple.com>
3 We should be able to terminate service workers that are unresponsive
4 https://bugs.webkit.org/show_bug.cgi?id=181563
5 <rdar://problem/35280031>
7 Reviewed by Alex Christensen.
9 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
10 (WebKit::WebSWContextManagerConnection::terminateWorker):
11 Use a 10 second timeout for forcefully exiting the service worker process when
12 the service worker in question fails to terminate.
14 (WebKit::WebSWContextManagerConnection::syncTerminateWorker):
15 Use a 100ms timeout for forcefully exiting the service worker process when
16 the service worker in question fails to terminate. This method is only called
17 from the layout tests, which is why we use a very short timeout.
19 2018-01-18 Ryan Haddad <ryanhaddad@apple.com>
21 Unreviewed, suppress deprecation warnings to fix the build with a newer SDK.
23 * UIProcess/ios/WKPDFPageNumberIndicator.mm:
24 (-[WKPDFPageNumberIndicator _makeRoundedCorners]):
26 2018-01-18 Youenn Fablet <youenn@apple.com>
28 Do not go to the storage process when loading a main resource if there is no service worker registered
29 https://bugs.webkit.org/show_bug.cgi?id=181395
31 Reviewed by Chris Dumez.
33 Add a new web process creation parameter to know whether there is any service worker registered at web process creation time.
34 If there is none, the web process will then start to load HTTP resources from the network.
35 The connection to the storage process is then executed when receiving the first bytes of the main resource.
36 This connection is needed as other web processes may create service workers at any given time.
37 If there is one registered service worker, the web process will wait for its connection to the storage process to be active.
39 * Shared/WebProcessCreationParameters.cpp:
40 (WebKit::WebProcessCreationParameters::encode const):
41 (WebKit::WebProcessCreationParameters::decode):
42 * Shared/WebProcessCreationParameters.h:
43 * UIProcess/ServiceWorkerProcessProxy.cpp:
44 (WebKit::ServiceWorkerProcessProxy::hasRegisteredServiceWorkers):
45 * UIProcess/ServiceWorkerProcessProxy.h:
46 * UIProcess/WebProcessPool.cpp:
47 (WebKit::WebProcessPool::initializeNewWebProcess):
48 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
49 (WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession):
50 * WebProcess/Storage/WebServiceWorkerProvider.h:
51 * WebProcess/Storage/WebToStorageProcessConnection.h:
52 (WebKit::WebToStorageProcessConnection::existingServiceWorkerConnectionForSession):
53 * WebProcess/WebProcess.cpp:
54 (WebKit::WebProcess::initializeWebProcess):
56 2018-01-18 Chris Dumez <cdumez@apple.com>
58 Regression(r223149): WebProcessProxy::didClose() no longer refs WebPageProxy objects
59 https://bugs.webkit.org/show_bug.cgi?id=181771
60 <rdar://problem/36566237>
62 Reviewed by Brady Eidson.
64 * UIProcess/WebProcessProxy.cpp:
65 (WebKit::WebProcessProxy::didClose):
66 Use copyToVectorOf<RefPtr<WebPageProxy>>() to maintain pre-r223149 behavior
69 2018-01-18 Dan Bernstein <mitz@apple.com>
71 [Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
72 https://bugs.webkit.org/show_bug.cgi?id=181803
74 Reviewed by Tim Horton.
76 * Configurations/Base.xcconfig: Updated.
77 * Configurations/DebugRelease.xcconfig: Ditto.
78 * Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
79 * Configurations/Version.xcconfig: Updated.
80 * Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings
81 useful for defining settings that depend on the target macOS version.
83 2018-01-18 Chris Dumez <cdumez@apple.com>
85 Service Workers restored from persistent storage have 'redundant' state
86 https://bugs.webkit.org/show_bug.cgi?id=181749
87 <rdar://problem/36556486>
89 Reviewed by Youenn Fablet.
91 Allow service workers to intercept custom protocol loads as this is useful for
94 * WebProcess/Network/WebLoaderStrategy.cpp:
95 (WebKit::WebLoaderStrategy::scheduleLoad):
96 (WebKit::WebLoaderStrategy::tryLoadingUsingURLSchemeHandler):
97 * WebProcess/Network/WebLoaderStrategy.h:
99 2018-01-18 Brent Fulgham <bfulgham@apple.com>
101 REGRESSION(r225858): Sandbox violations due to blocked access to Spotlight search preferences
102 https://bugs.webkit.org/show_bug.cgi?id=181797
103 <rdar://problem/36546412>
105 Reviewed by Eric Carlson.
107 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add the read permission for
108 'com.apple.lookup.shared' to support DataDetectors.
110 2018-01-17 John Wilander <wilander@apple.com>
112 Resource Load Statistics: Block cookies for prevalent resources without user interaction
113 https://bugs.webkit.org/show_bug.cgi?id=177394
114 <rdar://problem/34613960>
116 Reviewed by Alex Christensen.
118 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
119 Now has m_hasBeenSetToUseStatelessCookieStorage to handle
121 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
122 (WebKit::NetworkDataTaskCocoa::statelessCookieStorage):
123 Returns singleton empty, deny-all cookie storage for cookie blocking.
124 The ugly pragma instructions for clang are because the NSString
125 parameter for _initWithIdentifier was not marked nullable pre-Sierra.
126 (WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):
127 Instead of just decision making, this now applies the policy.
128 (WebKit::NetworkDataTaskCocoa::applyCookiePartitioningPolicy):
130 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
131 Now blocks cookies for domains where cookies will be purged anyway.
132 (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
133 Now blocks cookies for domains where cookies will be purged anyway.
134 (WebKit::shouldChangePartition): Deleted.
135 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
136 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
137 Now downgrades for blocked cookies instead of partitioned cookies.
138 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
139 Now downgrades for blocked cookies instead of partitioned cookies.
142 2018-01-17 Stephan Szabo <stephan.szabo@sony.com>
144 [Curl] Use ResourceRequest::encodeWithPlatformData()
145 https://bugs.webkit.org/show_bug.cgi?id=181768
147 Reviewed by Alex Christensen.
149 * Shared/curl/WebCoreArgumentCodersCurl.cpp:
150 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
151 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
153 2018-01-17 Matt Lewis <jlewis3@apple.com>
155 Unreviewed, rolling out r227076.
157 This breaks internal builds
161 "Resource Load Statistics: Block cookies for prevalent
162 resources without user interaction"
163 https://bugs.webkit.org/show_bug.cgi?id=177394
164 https://trac.webkit.org/changeset/227076
166 2018-01-17 Michael Catanzaro <mcatanzaro@igalia.com>
168 WEBKIT_FRAMEWORK should not modify file-global include directories
169 https://bugs.webkit.org/show_bug.cgi?id=181656
171 Reviewed by Konstantin Tokarev.
176 2018-01-17 Youenn Fablet <youenn@apple.com>
178 Put fetch request keepAlive behind a runtime flag
179 https://bugs.webkit.org/show_bug.cgi?id=181592
181 Reviewed by Chris Dumez.
183 * Shared/WebPreferences.yaml:
184 * UIProcess/API/C/WKPreferences.cpp:
185 (WKPreferencesSetFetchAPIKeepAliveEnabled):
186 (WKPreferencesGetFetchAPIKeepAliveEnabled):
187 * UIProcess/API/C/WKPreferencesRefPrivate.h:
189 2018-01-17 John Wilander <wilander@apple.com>
191 Resource Load Statistics: Block cookies for prevalent resources without user interaction
192 https://bugs.webkit.org/show_bug.cgi?id=177394
193 <rdar://problem/34613960>
195 Reviewed by Alex Christensen.
197 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
198 Now has m_hasBeenSetToUseStatelessCookieStorage to handle
200 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
201 (WebKit::NetworkDataTaskCocoa::statelessCookieStorage):
202 Returns singleton empty, deny-all cookie storage for cookie blocking.
203 (WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):
204 Instead of just decision making, this now applies the policy.
205 (WebKit::NetworkDataTaskCocoa::applyCookiePartitioningPolicy):
207 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
208 Now blocks cookies for domains where cookies will be purged anyway.
209 (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
210 Now blocks cookies for domains where cookies will be purged anyway.
211 (WebKit::shouldChangePartition): Deleted.
212 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
213 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
214 Now downgrades for blocked cookies instead of partitioned cookies.
215 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
216 Now downgrades for blocked cookies instead of partitioned cookies.
218 2018-01-17 Daniel Bates <dabates@apple.com>
220 REGRESSION (r222795): Cardiogram never signs in
221 https://bugs.webkit.org/show_bug.cgi?id=181693
222 <rdar://problem/36286293>
224 Reviewed by Ryosuke Niwa.
226 Exempt Cardiogram from the XHR header restrictions in r222795.
228 Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers.
229 However Cardiogram also depends on such functionality.
231 * Shared/WebPreferences.yaml:
232 * UIProcess/API/Cocoa/WKWebView.mm:
233 (shouldAllowSettingAnyXHRHeaderFromFileURLs):
234 (-[WKWebView _initializeWithConfiguration:]):
235 * UIProcess/Cocoa/VersionChecks.h:
237 2018-01-17 Wenson Hsieh <wenson_hsieh@apple.com>
239 Add injected bundle SPI to replace subresource URLs when dropping or pasting rich content
240 https://bugs.webkit.org/show_bug.cgi?id=181637
241 <rdar://problem/36508471>
243 Reviewed by Tim Horton.
245 Add new injected bundle SPI, replacementURLForResource, which clients may use to provide a replacement URL to
246 represent an archive resource, given the resource's data and MIME type.
248 * WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
249 (API::InjectedBundle::EditorClient::replacementURLForResource):
250 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
251 * WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
253 Add replacementURLForResource, and also bump the current injected bundle editor client version to 2.
255 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
256 (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):
257 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
258 (WebKit::InjectedBundlePageEditorClient::replacementURLForResource):
259 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
260 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
261 (WebKit::WebEditorClient::replacementURLForResource):
262 * WebProcess/WebCoreSupport/WebEditorClient.h:
264 2018-01-17 Zan Dobersek <zdobersek@igalia.com>
266 [Cairo] Don't mirror global alpha and image interpolation quality state values in PlatformContextCairo
267 https://bugs.webkit.org/show_bug.cgi?id=181725
269 Reviewed by Carlos Garcia Campos.
271 * Shared/cairo/ShareableBitmapCairo.cpp:
272 (WebKit::ShareableBitmap::paint):
273 Adjust the PlatformContextCairo::drawSurfaceToContext() invocation.
274 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
275 (WebKit::convertCairoSurfaceToShareableBitmap): Ditto.
277 2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
279 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.6 release.
281 * gtk/NEWS: Add release notes for 2.19.6.
283 2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
285 [GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds
286 https://bugs.webkit.org/show_bug.cgi?id=179914
288 Reviewed by Žan Doberšek.
290 Add symbols detected by check-for-global-bss-symbols-in-webkigtk-libs to the version script.
292 * webkitglib-symbols.map:
294 2018-01-17 Youenn Fablet <youenn@apple.com>
296 Clear Caches volatile storage as a memory optimization.
297 https://bugs.webkit.org/show_bug.cgi?id=181643
299 Reviewed by Chris Dumez.
301 clearMemoryRepresentation clears m_caches which exposes data potentially stored in m_volatileStorage.
302 Clearing m_volatileStorage allows releasing some memory.
304 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
305 (WebKit::CacheStorage::Caches::clearMemoryRepresentation):
307 2018-01-17 Zan Dobersek <zdobersek@igalia.com>
309 [Cairo] Use one-time ShadowBlur objects when performing shadowing
310 https://bugs.webkit.org/show_bug.cgi?id=181720
312 Reviewed by Carlos Garcia Campos.
314 * Shared/cairo/ShareableBitmapCairo.cpp:
315 (WebKit::ShareableBitmap::paint):
316 Adjust the PlatformContextCairo::drawSurfaceToContext() invocation.
317 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
318 (WebKit::convertCairoSurfaceToShareableBitmap): Ditto.
320 2018-01-16 Fujii Hironori <Hironori.Fujii@sony.com>
322 [CMake] Remove WebCoreDerivedSources library target
323 https://bugs.webkit.org/show_bug.cgi?id=181664
325 Reviewed by Carlos Garcia Campos.
327 * CMakeLists.txt: Do not link WebCoreDerivedSources.
328 * PlatformGTK.cmake: Appended WebCore after WebCorePlatformGTK in WebKit_LIBRARIES.
329 * PlatformWin.cmake: Ditto.
331 2018-01-16 Alex Christensen <achristensen@webkit.org>
333 Merge sync and async code paths for getting context menus
334 https://bugs.webkit.org/show_bug.cgi?id=181423
336 Reviewed by Joseph Pecoraro.
338 What a mess. We had a code path for asynchronous context menu generation and a different one for synchronous context menu generation.
339 This makes it so there is just one. At the API level we see if there is an asynchronous delegate to call, then synchronous.
340 There is a subtle theoretical change in behaviour because m_page.contextMenuClient().showContextMenu is now called for the asynchronous
341 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!
343 * UIProcess/API/APIContextMenuClient.h:
344 (API::ContextMenuClient::getContextMenuFromProposedMenu):
345 (API::ContextMenuClient::getContextMenuFromProposedMenuAsync): Deleted.
346 * UIProcess/API/C/WKPage.cpp:
347 (WKPageSetPageContextMenuClient):
348 * UIProcess/API/glib/WebKitContextMenuClient.cpp:
349 * UIProcess/WebContextMenuProxy.h:
350 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
351 (WebKit::WebContextMenuProxyGtk::show):
352 (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems):
353 * UIProcess/gtk/WebContextMenuProxyGtk.h:
354 * UIProcess/mac/WebContextMenuProxyMac.h:
355 * UIProcess/mac/WebContextMenuProxyMac.mm:
356 (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
357 (WebKit::WebContextMenuProxyMac::showContextMenu):
358 * UIProcess/wpe/WebContextMenuProxyWPE.h:
360 2018-01-16 Michael Catanzaro <mcatanzaro@igalia.com>
362 Don't link WebKit target directly to JavaScriptCore
363 https://bugs.webkit.org/show_bug.cgi?id=181688
365 Reviewed by Alex Christensen.
367 It's safer if we only link to the next lower-layered lib in the stack, so let's just link
368 directly to WebCore instead.
370 And WPE doesn't need to specify it twice.
376 2018-01-16 Eric Carlson <eric.carlson@apple.com>
378 AVSampleBufferDisplayLayer should be flushed when application activates
379 https://bugs.webkit.org/show_bug.cgi?id=181623
380 <rdar://problem/36487738>
382 Reviewed by Darin Adler.
384 * WebProcess/WebPage/ios/WebPageIOS.mm:
385 (WebKit::WebPage::applicationWillResignActive): Call page.
386 (WebKit::WebPage::applicationDidEnterBackground): Ditto, let it call libWebRTCProvider.
387 (WebKit::WebPage::applicationWillEnterForeground): Call page.
388 (WebKit::WebPage::applicationDidBecomeActive): Ditto, let it call libWebRTCProvider.
390 2018-01-16 Zach Li <zachli@apple.com>
392 Add pop-up policy support in website policies.
393 https://bugs.webkit.org/show_bug.cgi?id=181544.
394 rdar://problem/30521400.
396 Reviewed by Alex Christensen.
398 * Shared/WebsitePoliciesData.cpp: Encode and decode
400 (WebKit::WebsitePoliciesData::encode const):
401 (WebKit::WebsitePoliciesData::decode):
402 (WebKit::WebsitePoliciesData::applyToDocumentLoader):
403 Apply the pop-up policy from website policies to the
406 * Shared/WebsitePoliciesData.h:
408 * Shared/WebsitePopUpPolicy.h:
409 Added for declaring enum WebsitePopUpPolicy.
411 * UIProcess/API/APIWforebsitePolicies.cpp:
412 Include pop-up policy in website policies.
413 (API::WebsitePolicies::WebsitePolicies):
414 (API::WebsitePolicies::data):
415 * UIProcess/API/APIWebsitePolicies.h:
417 * UIProcess/API/C/WKWebsitePolicies.cpp:
418 Added C API to get and set pop-up policy on
420 (WKWebsitePoliciesGetPopUpPolicy):
421 (WKWebsitePoliciesSetPopUpPolicy):
422 * UIProcess/API/C/WKWebsitePolicies.h:
424 * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
425 Added Obj-C API to get and set pop-up policy
427 * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
428 (-[_WKWebsitePolicies setPopUpPolicy:]):
429 (-[_WKWebsitePolicies popUpPolicy]):
431 * WebKit.xcodeproj/project.pbxproj:
432 Added WebsitePopUpPolicy.h.
434 2018-01-16 Fujii Hironori <Hironori.Fujii@sony.com>
436 [CMake][Mac] Fix the build errors
437 https://bugs.webkit.org/show_bug.cgi?id=181665
439 Reviewed by Alex Christensen.
441 * CMakeLists.txt: Added TouchBarMenuData.cpp and TouchBarMenuItemData.cpp to compile.
442 * PlatformMac.cmake: Added _WKApplicationManifest.mm, WKInspectorWKWebView.mm and WKInspectorWindow.mm to compile.
443 * UIProcess/API/Cocoa/WKProcessPool.mm:
444 (-[WKProcessPool _webPageContentProcessCount]): Call WebProcessPool::serviceWorkerProxy() only if ENABLE(SERVICE_WORKER).
446 2018-01-16 Wenson Hsieh <wenson_hsieh@apple.com>
448 [Attachment Support] Provide the `src` of an attachment to the UI delegate when an attachment is inserted
449 https://bugs.webkit.org/show_bug.cgi?id=181638
450 <rdar://problem/36508702>
452 Reviewed by Dan Bernstein.
454 Add a `source` parameter to the `didInsertAttachment` codepath for notifying WebKit2 clients when attachment
455 elements are inserted into the document.
457 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
458 * UIProcess/API/Cocoa/WKWebView.mm:
459 (-[WKWebView _didInsertAttachment:withSource:]):
460 (-[WKWebView _didInsertAttachment:]): Deleted.
461 * UIProcess/API/Cocoa/WKWebViewInternal.h:
462 * UIProcess/Cocoa/PageClientImplCocoa.h:
463 * UIProcess/Cocoa/PageClientImplCocoa.mm:
464 (WebKit::PageClientImplCocoa::didInsertAttachment):
465 * UIProcess/PageClient.h:
466 (WebKit::PageClient::didInsertAttachment):
467 * UIProcess/WebPageProxy.cpp:
468 (WebKit::WebPageProxy::didInsertAttachment):
469 * UIProcess/WebPageProxy.h:
470 * UIProcess/WebPageProxy.messages.in:
471 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
472 (WebKit::WebEditorClient::didInsertAttachment):
473 * WebProcess/WebCoreSupport/WebEditorClient.h:
475 2018-01-15 Youenn Fablet <youenn@apple.com>
477 ASSERTION FAILED: m_ptr under WebKit::CacheStorage::Caches::writeRecord
478 https://bugs.webkit.org/show_bug.cgi?id=181401
479 <rdar://problem/36379022>
481 Reviewed by Darin Adler.
483 m_isInitialized is true but m_storage is set to nullptr when calling writeRecord.
484 The only case seems to be if:
485 - We are doing persistent storage
486 - We are traversing the storage to do the initialization. At that point m_storage is set to a correct value.
487 - clearMemoryRepresentation is called, thus setting m_storage to nullptr and m_isInitialized to false.
488 We fix this by making clearMemoryRepresentation a no-op if we are initializing the caches.
489 clearMemoryRepresentation is about cleaning the in-memory information of the caches and the memory representation is empty at init time.
490 Nullifying m_storage is a memory consumption optimization.
492 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
493 (WebKit::CacheStorage::Caches::clearMemoryRepresentation):
495 2018-01-12 Wenson Hsieh <wenson_hsieh@apple.com>
497 Unreviewed, speculative build fix after r226899.
499 Add an empty implementation for PageClient::startDrag.
501 * UIProcess/PageClient.h:
502 (WebKit::PageClient::startDrag):
504 2018-01-12 Brent Fulgham <bfulgham@apple.com>
506 [iOS] Remove unneeded accessibility-related sandbox rules
507 https://bugs.webkit.org/show_bug.cgi?id=181619
508 <rdar://problem/36485356>
510 Reviewed by Eric Carlson.
512 Remove a number of sandbox exceptions that were in place for accessibility support. These are
513 not needed in the WebContent process, since Safari (not WebKit) handles the accessibility
516 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
518 2018-01-12 Keith Rollin <krollin@apple.com>
520 Logged JSON should escape "'s and \'s in strings.
521 https://bugs.webkit.org/show_bug.cgi?id=181608
523 Reviewed by Brent Fulgham.
525 * NetworkProcess/NetworkResourceLoader.cpp:
526 (WebKit::NetworkResourceLoader::logCookieInformation const):
528 2018-01-12 Megan Gardner <megan_gardner@apple.com>
530 Unreviewed, fixing error in UIKitSPI.h.
532 * Platform/spi/ios/UIKitSPI.h:
534 2018-01-12 Megan Gardner <megan_gardner@apple.com>
536 Implement MultiDocument protocol for restoring focus to a WKWebView
537 https://bugs.webkit.org/show_bug.cgi?id=181510
539 Reviewed by Dan Bernstein.
541 Support the UIKit protocol for restoring focus to a what previously had focus.
542 WebKit already knows what node was previously being focused by the DOM, we merely
543 need to be asked to turn the focus on again.
544 Resubmitting https://trac.webkit.org/changeset/226826 as it broke internal builds
546 * Platform/spi/ios/UIKitSPI.h:
547 * UIProcess/ios/WKContentViewInteraction.h:
548 * UIProcess/ios/WKContentViewInteraction.mm:
549 (-[WKContentView _restoreFocusWithToken:]):
550 (-[WKContentView _preserveFocusWithToken:destructively:]):
552 2018-01-12 Youenn Fablet <youenn@apple.com>
554 WebProcess should pass the registration identifier and not the worker identifier for fetch events
555 https://bugs.webkit.org/show_bug.cgi?id=181591
557 Reviewed by Chris Dumez.
559 Use service worker registration identifier to compute the active service worker identifier responsible to handle the fetch event.
561 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
562 (WebKit::WebSWServerConnection::startFetch):
563 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
564 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
565 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
566 (WebKit::ServiceWorkerClientFetch::start):
567 * WebProcess/Storage/WebSWClientConnection.cpp:
568 (WebKit::WebSWClientConnection::startFetch):
569 * WebProcess/Storage/WebSWClientConnection.h:
570 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
571 (WebKit::shouldHandleFetch):
573 2018-01-12 Ryan Haddad <ryanhaddad@apple.com>
575 Unreviewed, rolling out r226826.
577 Breaks internal builds.
581 "Implement MultiDocument protocol for restoring focus to a
583 https://bugs.webkit.org/show_bug.cgi?id=181510
584 https://trac.webkit.org/changeset/226826
586 2018-01-12 Wenson Hsieh <wenson_hsieh@apple.com>
588 [WK2] Unify macOS and iOS codepaths in the UI process when starting a drag
589 https://bugs.webkit.org/show_bug.cgi?id=181574
591 Reviewed by Tim Horton.
593 Rearrange some macOS drag start logic in the UI process so that it uses the same codepaths in WebPageProxy as
594 iOS. Namely, startDrag should just forward the DragItem and drag image handle along to the appropriate views on
595 each platform (WKContentView and WebViewImpl).
597 There should be no change in behavior.
599 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
601 Both macOS and iOS now funnel through this method.
603 * UIProcess/Cocoa/WebViewImpl.h:
604 * UIProcess/Cocoa/WebViewImpl.mm:
605 (WebKit::WebViewImpl::startDrag):
606 (WebKit::WebViewImpl::dragImageForView): Deleted.
608 Rename dragImageForView to startDrag. Move the call to didStartDrag() here, and call dragCancelled() in the
609 case where we bailed from starting the drag (due to failing to create a drag image).
611 * UIProcess/PageClient.h:
612 * UIProcess/ios/PageClientImplIOS.h:
613 * UIProcess/ios/PageClientImplIOS.mm:
614 (WebKit::PageClientImpl::setDragImage): Deleted.
616 Rename setDragImage to startDrag.
618 * UIProcess/mac/PageClientImplMac.h:
619 * UIProcess/mac/PageClientImplMac.mm:
620 (WebKit::PageClientImpl::startDrag):
621 (WebKit::PageClientImpl::setDragImage): Deleted.
622 * UIProcess/mac/WebPageProxyMac.mm:
623 (WebKit::WebPageProxy::startDrag): Deleted.
625 2018-01-12 Antoine Quint <graouts@apple.com>
627 Add support for the frames() timing function
628 https://bugs.webkit.org/show_bug.cgi?id=181585
629 <rdar://problem/36463317>
633 Add the ability to endode and decode the frames() timing function.
635 * Shared/WebCoreArgumentCoders.cpp:
636 (IPC::ArgumentCoder<FramesTimingFunction>::encode):
637 (IPC::ArgumentCoder<FramesTimingFunction>::decode):
638 * Shared/WebCoreArgumentCoders.h:
639 * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
640 (WebKit::PlatformCAAnimationRemote::Properties::encode const):
641 (WebKit::PlatformCAAnimationRemote::Properties::decode):
643 2018-01-11 Keith Miller <keith_miller@apple.com>
645 Rename ENABLE_ASYNC_ITERATION to ENABLE_JS_ASYNC_ITERATION
646 https://bugs.webkit.org/show_bug.cgi?id=181573
648 Reviewed by Simon Fraser.
650 * Configurations/FeatureDefines.xcconfig:
652 2018-01-11 Brent Fulgham <bfulgham@apple.com>
654 REGRESSION(r219530): ResourceLoadStatisticsPersistentStorage should be read-only in ephemeral sessions
655 https://bugs.webkit.org/show_bug.cgi?id=181136
656 <rdar://problem/36116604>
658 Reviewed by Chris Dumez.
660 Some uses of WebKit involve running a UIProcess as an ephemeral session for the life of the process. In this
661 case, we do not initialize the data path for the set of load statistics triggering an assertion.
663 We actually intended ephemeral sessions to consume the existing resource load data (presumably captured during
664 non-ephemeral browsing). This would be a read-only mode, where it would not add new entries to the load
665 statistics, but would take advantage of existing observations. Currently that does not happen (for this type
666 of WebKit embed), which forces each run as an ephemeral session to build up in-memory browsing data until it has
667 enough observations to begin modifying loads.
669 We need to set the ResourceLoadStatisticsPersistentStorage object to a "read only" mode in this case, so
670 that it read (but does not write) from this database.
672 Tested by ephemeral website data TestWebKitAPI tests.
674 * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
675 (WebKit::ResourceLoadStatisticsPersistentStorage::create): Added to allow creation of the right style of
677 (WebKit::ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage): Initialize the
679 (WebKit::ResourceLoadStatisticsPersistentStorage::asyncWriteTimerFired): RELEASE_ASSERT that we never run
680 this method when in "read only" mode.
681 (WebKit::ResourceLoadStatisticsPersistentStorage::writeMemoryStoreToDisk): Ditto.
682 (WebKit::ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore): Return early if asked to
683 schedule a write operation for a "read only" persistent store.
684 (WebKit::ResourceLoadStatisticsPersistentStorage::finishAllPendingWorkSynchronously): RELEASE_ASSERT if we
685 ever shut down in "read only" mode with an active write timer.
686 * UIProcess/ResourceLoadStatisticsPersistentStorage.h:
687 * UIProcess/WebResourceLoadStatisticsStore.cpp:
688 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): Pass a flag indicating whether the
689 storage session is ephemeral or not.
690 * UIProcess/WebResourceLoadStatisticsStore.h:
692 2018-01-11 Keith Rollin <krollin@apple.com>
694 Add optional logging of ITP-related user interaction information
695 https://bugs.webkit.org/show_bug.cgi?id=181556
697 Reviewed by Brent Fulgham.
699 In order to support the tracking of the efficacy of Intelligent
700 Tracking Protection, add some logging indicating when the user
701 interacts with a page in a way that affects cookie partitioning. This
702 logging is off by default, and is enabled with `defaults write -g
703 WebKitLogCookieInformation -bool true`.
705 * Shared/WebProcessCreationParameters.cpp:
706 (WebKit::WebProcessCreationParameters::encode const):
707 (WebKit::WebProcessCreationParameters::decode):
708 * Shared/WebProcessCreationParameters.h:
709 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
710 (WebKit::WebProcessPool::platformInitializeWebProcess):
711 * WebProcess/WebProcess.cpp:
712 (WebKit::WebProcess::initializeWebProcess):
714 2018-01-11 Megan Gardner <megan_gardner@apple.com>
716 Implement MultiDocument protocol for restoring focus to a WKWebView
717 https://bugs.webkit.org/show_bug.cgi?id=181510
719 Reviewed by Dan Bernstein.
721 Support the UIKit protocol for restoring focus to a what previously had focus.
722 WebKit already has a method to silently remove and replace focus, without telling the
723 web process about the unfocus and refocusing, so we're just using that.
725 * Platform/spi/ios/UIKitSPI.h:
726 * UIProcess/ios/WKContentViewInteraction.h:
727 * UIProcess/ios/WKContentViewInteraction.mm:
728 (-[WKContentView _restoreFocusWithToken:]):
729 (-[WKContentView _preserveFocusWithToken:destructively:]):
732 2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com>
734 Don't load inline data when requesting info for an attachment element backed by a file path
735 https://bugs.webkit.org/show_bug.cgi?id=181550
737 Reviewed by Tim Horton
739 See WebCore/ChangeLog for more information.
741 * UIProcess/API/Cocoa/_WKAttachment.mm:
742 (-[_WKAttachmentInfo initWithInfo:]):
743 (-[_WKAttachmentInfo fileLoadingError]):
744 (-[_WKAttachment requestInfo:]):
746 2018-01-11 Commit Queue <commit-queue@webkit.org>
748 Unreviewed, rolling out r226789 and r226794.
749 https://bugs.webkit.org/show_bug.cgi?id=181564
751 broke API tests (Requested by alexchristensen on #webkit).
755 "Merge sync and async code paths for getting context menus"
756 https://bugs.webkit.org/show_bug.cgi?id=181423
757 https://trac.webkit.org/changeset/226789
759 "Revert changes accidentally committed with r226789."
760 https://bugs.webkit.org/show_bug.cgi?id=181423
761 https://trac.webkit.org/changeset/226794
763 2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com>
765 Send PromisedBlobInfo to the client through DragItem instead of DragClient::prepareToDragPromisedBlob
766 https://bugs.webkit.org/show_bug.cgi?id=181497
768 Reviewed by Tim Horton.
770 Refactor drag and drop support for promised blob data, so that blob info is shipped across to the client layer
771 via DragItem in the DragClient::startDrag codepath, rather than via a separate prepareToDragPromisedBlob client
772 codepath that stages promised blob info.
774 * UIProcess/Cocoa/WebViewImpl.h:
775 * UIProcess/Cocoa/WebViewImpl.mm:
776 (WebKit::WebViewImpl::prepareToDragPromisedBlob): Deleted.
777 * UIProcess/PageClient.h:
778 (WebKit::PageClient::prepareToDragPromisedBlob): Deleted.
779 * UIProcess/WebPageProxy.cpp:
780 (WebKit::WebPageProxy::prepareToDragPromisedBlob): Deleted.
781 * UIProcess/WebPageProxy.h:
782 * UIProcess/WebPageProxy.messages.in:
783 * UIProcess/ios/PageClientImplIOS.h:
784 * UIProcess/ios/PageClientImplIOS.mm:
785 (WebKit::PageClientImpl::prepareToDragPromisedBlob): Deleted.
786 * UIProcess/ios/WKContentViewInteraction.h:
787 * UIProcess/ios/WKContentViewInteraction.mm:
788 (-[WKContentView _startDrag:item:]):
789 * UIProcess/mac/PageClientImplMac.h:
790 * UIProcess/mac/PageClientImplMac.mm:
791 (WebKit::PageClientImpl::prepareToDragPromisedBlob): Deleted.
792 * WebProcess/WebCoreSupport/WebDragClient.cpp:
793 (WebKit::WebDragClient::prepareToDragPromisedBlob): Deleted.
794 * WebProcess/WebCoreSupport/WebDragClient.h:
795 * WebProcess/WebPage/WebPage.cpp:
796 (WebKit::WebPage::prepareToDragPromisedBlob): Deleted.
797 * WebProcess/WebPage/WebPage.h:
799 2018-01-09 Per Arne Vollan <pvollan@apple.com>
801 VoiceOver does not work when the WebContent process is using NSRunLoop.
802 https://bugs.webkit.org/show_bug.cgi?id=181331
803 <rdar://problem/36408004>
805 Reviewed by Brent Fulgham.
807 When the WebContent process is using NSRunLoop instead of the NSApplication run loop,
808 accessibility must be initialized for VoiceOver to work. This patch also switches to
809 using NSRunLoop in the WebContent process.
811 * Configurations/WebContentService.xcconfig:
812 * Platform/IPC/mac/ConnectionMac.mm:
813 (IPC::AccessibilityProcessSuspendedNotification): Remove unneccessary workaround.
814 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist: Switch to NSRunLoop.
815 * WebProcess/cocoa/WebProcessCocoa.mm:
816 (WebKit::WebProcess::platformInitializeProcess): Initialize accessibility.
818 2018-01-11 Don Olmstead <don.olmstead@sony.com>
820 WebContextMenuListenerProxy.cpp not including config on first line
821 https://bugs.webkit.org/show_bug.cgi?id=181552
823 Reviewed by Alex Christensen.
825 * UIProcess/WebContextMenuListenerProxy.cpp:
827 2018-01-11 Youenn Fablet <youenn@apple.com>
829 Redirected iframe loading with Request.redirect=follow should fail
830 https://bugs.webkit.org/show_bug.cgi?id=181491
832 Reviewed by Alex Christensen.
834 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
835 (WebKit::ServiceWorkerClientFetch::validateResponse):
837 2018-01-11 Youenn Fablet <youenn@apple.com>
839 Replace WebRTCLegacyAPIDisabled by WebRTCLegacyAPIEnabled and switch off WebRTC legacy flag by default
840 https://bugs.webkit.org/show_bug.cgi?id=181480
842 Reviewed by Eric Carlson.
844 Renaming preference to WebRTCLegacyAPIEnabled for simplification and removing it from experimental feature.
845 Set it to off by default.
847 * Shared/WebPreferences.yaml:
848 * UIProcess/API/C/WKPreferences.cpp:
849 (WKPreferencesSetWebRTCLegacyAPIEnabled):
850 (WKPreferencesGetWebRTCLegacyAPIEnabled):
851 * UIProcess/API/Cocoa/WKPreferences.mm:
852 (-[WKPreferences _webRTCLegacyAPIEnabled]):
853 (-[WKPreferences _setWebRTCLegacyAPIEnabled:]):
854 * UIProcess/WebProcessPool.cpp:
855 (WebKit::WebProcessPool::ensureNetworkProcess):
856 * WebProcess/WebPage/WebPage.cpp:
857 (WebKit::WebPage::updatePreferences):
859 2018-01-11 Alex Christensen <achristensen@webkit.org>
861 Merge sync and async code paths for getting context menus
862 https://bugs.webkit.org/show_bug.cgi?id=181423
864 Reviewed by Joseph Pecoraro.
866 What a mess. We had a code path for asynchronous context menu generation and a different one for synchronous context menu generation.
867 This makes it so there is just one. At the API level we see if there is an asynchronous delegate to call, then synchronous.
868 There is a subtle theoretical change in behaviour because m_page.contextMenuClient().showContextMenu is now called for the asynchronous
869 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!
871 * UIProcess/API/APIContextMenuClient.h:
872 (API::ContextMenuClient::getContextMenuFromProposedMenu):
873 (API::ContextMenuClient::getContextMenuFromProposedMenuAsync): Deleted.
874 * UIProcess/API/C/WKPage.cpp:
875 (WKPageSetPageContextMenuClient):
876 * UIProcess/API/glib/WebKitContextMenuClient.cpp:
877 * UIProcess/WebContextMenuProxy.h:
878 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
879 (WebKit::WebContextMenuProxyGtk::show):
880 (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems):
881 * UIProcess/gtk/WebContextMenuProxyGtk.h:
882 * UIProcess/mac/WebContextMenuProxyMac.h:
883 * UIProcess/mac/WebContextMenuProxyMac.mm:
884 (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
885 (WebKit::WebContextMenuProxyMac::showContextMenu):
886 * UIProcess/wpe/WebContextMenuProxyWPE.h:
888 2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com>
890 [Attachment Support] Support dragging attachment elements out as files on iOS
891 https://bugs.webkit.org/show_bug.cgi?id=181199
892 <rdar://problem/36299316>
894 Reviewed by Tim Horton, Andy Estes and Joseph Pecoraro.
896 Implement support for registering and beginning a drag with promised blob info. See below for more detail.
898 * UIProcess/ios/WKContentViewInteraction.mm:
899 (-[WKDragSessionContext addTemporaryDirectory:]):
900 (-[WKDragSessionContext cleanUpTemporaryDirectories]):
902 Introduce WKDragSessionContext, which represents the localContext of a UIDragSession initiated in WebKit. The
903 blob promise dragging codepath uses this to register temporary directories when saving blob data to a location
904 on disk; when all data transfers are finished, or if the drag interaction is being reset, we then use
905 -cleanUpTemporaryDirectories to remove each temporary directory.
907 (existingLocalDragSessionContext):
908 (ensureLocalDragSessionContext):
910 Helper methods to set the UIDragSession's localContext to a WKDragSessionContext and query for any existing
913 (-[WKContentView cleanupInteraction]):
915 Before the content view's UIDragInteraction goes away, clean up any temporary directories added to the
918 (-[WKContentView _prepareToDragPromisedBlob:]):
920 When dragging with a promised blob, register a new item provider on the pasteboard representing the blob data,
921 along with any additional metadata associated with the blob. For the promise callback, call out to the network
922 process to write the blob data to a temporary path; when done, call the NSItemProvider's completion handler with
923 the temporary blob data location.
925 (-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
926 (-[WKContentView dragInteraction:sessionDidTransferItems:]):
928 Use this delegate hook as an opportunity to remove any temporary directories created when promised blob data is
929 requested upon drop. Since we know the drag session that has finished transferring data, we simply ask its local
930 context (a WKDragSessionContext) to remove any temporary filepaths it has created.
932 2018-01-10 Jeff Miller <jeffm@apple.com>
934 -[WKWebView _web_gestureEventWasNotHandledByWebCore:] should call -_gestureEventWasNotHandledByWebCore:
935 https://bugs.webkit.org/show_bug.cgi?id=181498
937 Reviewed by Alex Christensen.
939 WKView's API contract allows clients to override -_gestureEventWasNotHandledByWebCore:, and -[WKView
940 _web_gestureEventWasNotHandledByWebCore:] calls -_gestureEventWasNotHandledByWebCore: instead of
941 invoking WebViewImpl::gestureEventWasNotHandledByWebCoreFromViewOnly() directly. WKWebView should do
944 * UIProcess/API/Cocoa/WKWebView.mm:
945 (-[WKWebView _web_gestureEventWasNotHandledByWebCore:]):
946 Call -_gestureEventWasNotHandledByWebCore:, which will call gestureEventWasNotHandledByWebCoreFromViewOnly().
948 2018-01-10 Wenson Hsieh <wenson_hsieh@apple.com>
950 REGRESSION(r222507): Composition highlight doesn't render when using IME
951 https://bugs.webkit.org/show_bug.cgi?id=181485
952 <rdar://problem/35896516>
954 Reviewed by Ryosuke Niwa.
956 Add plumbing for a `suppressUnderline` argument when setting marked text.
958 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
959 (WKBundlePageSetComposition):
960 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
961 * WebProcess/WebPage/WebPage.cpp:
962 (WebKit::WebPage::setCompositionForTesting):
963 * WebProcess/WebPage/WebPage.h:
965 2018-01-10 Tim Horton <timothy_horton@apple.com>
967 REGRESSION (r213590): Swipe from edge to go to previous page is significantly slower than tapping back button on Twitter
968 https://bugs.webkit.org/show_bug.cgi?id=181269
969 <rdar://problem/35110344>
971 Reviewed by Simon Fraser.
973 * UIProcess/API/Cocoa/WKWebView.mm:
974 (-[WKWebView _processDidExit]):
975 (-[WKWebView _didCommitLayerTree:]):
976 When swiping to a page that set history.scrollRestoration = "manual",
977 we will never restore the scroll position. We will still restore
978 "state", but won't have a location. Currently, the code assumes that
979 it should wait to remove the swipe snapshot until the scroll position
980 is restored. Instead, wait until the "state" is restored, whether
981 or not that includes a scroll position/center point restoration.
983 Do this by making _firstTransactionIDAfterPageRestore an optional,
984 and reset it after it fires, so that we only run the restoration code
985 in _didCommitLayerTree for the first commit after state restoration,
986 not all subsequent commits. Then, tell ViewGestureController that
987 the scroll position has been restored even if the page opted out.
989 The reason that this is specific to pushState is that normal,
990 non-same-document loads bail from waiting for the scroll position
991 restoration in VGC::didReachMainFrameLoadTerminalState() (see the long
992 comment there for an explanation).
994 (-[WKWebView _beginBackSwipeForTesting]):
995 (-[WKWebView _completeBackSwipeForTesting]):
996 * Platform/spi/ios/UIKitSPI.h:
997 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
998 * UIProcess/Cocoa/ViewGestureController.h:
999 * UIProcess/ios/ViewGestureControllerIOS.mm:
1000 (-[WKSwipeTransitionController transitionForDirection:]):
1001 (WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
1002 (WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):
1003 * UIProcess/mac/ViewGestureControllerMac.mm:
1004 (WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
1005 (WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):
1006 Add a mechanism to forcefully test swipe back. Instead of simulating
1007 events like on Mac, we just talk to the UIKit internals and force
1008 the interaction to start, pause, and then complete when we want.
1010 2018-01-10 Brent Fulgham <bfulgham@apple.com>
1012 Use protectedThis for the 'updatePrevalentDomainsToPartitionOrBlockCookies' lambda
1013 https://bugs.webkit.org/show_bug.cgi?id=181452
1014 <rdar://problem/36416912>
1016 Reviewed by Chris Dumez.
1018 We forgot to use a 'protectedThis' back in r225006 for one of the lambdas used by
1019 the WebsiteDataStore for processing.
1021 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1022 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
1024 2018-01-09 John Wilander <wilander@apple.com>
1026 Storage Access API: Turn feature on by default in WebPreferences.yaml
1027 https://bugs.webkit.org/show_bug.cgi?id=181458
1029 Reviewed by Brent Fulgham.
1031 * Shared/WebPreferences.yaml:
1033 2018-01-09 Alex Christensen <achristensen@webkit.org>
1035 WKOpenPanelParameters SPI should return autoreleased objects
1036 https://bugs.webkit.org/show_bug.cgi?id=181457
1037 <rdar://problem/35884960>
1039 Reviewed by Tim Horton.
1041 In r226607 I made a mistake by returning an object that has been released.
1042 I instead follow a pattern of leaking and autoreleasing that we use elsewhere in the ObjC API.
1044 * UIProcess/API/Cocoa/WKOpenPanelParameters.mm:
1045 (-[WKOpenPanelParameters _acceptedMIMETypes]):
1046 (-[WKOpenPanelParameters _acceptedFileExtensions]):
1048 2018-01-09 Dan Bernstein <mitz@apple.com>
1050 Removed some empty directories that were left behind
1052 * WebProcess/Cookies/cf: Removed.
1053 * WebProcess/ios: Removed.
1055 2018-01-09 Paul Knight <pknight@apple.com>
1057 Don't record dynamic spelling corrections while in an ephemeral browsing session
1058 https://bugs.webkit.org/show_bug.cgi?id=181417
1059 <rdar://problem/33309104>
1061 Dynamic spelling correction responses are kept on disk. Avoid recording
1062 these responses when in an ephemeral session.
1064 Reviewed by Tim Horton and Wenson Hsieh.
1066 * UIProcess/mac/CorrectionPanel.h:
1067 * UIProcess/mac/CorrectionPanel.mm:
1068 (WebKit::CorrectionPanel::recordAutocorrectionResponse):
1069 Add a WebViewImpl parameter so we can query the current session.
1070 Return early before recording the response if the session is
1072 (WebKit::CorrectionPanel::handleAcceptedReplacement):
1073 Update a caller to include the new parameter.
1074 * UIProcess/mac/PageClientImplMac.mm:
1075 (WebKit::PageClientImpl::recordAutocorrectionResponse):
1078 2018-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
1080 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.5 release.
1082 * gtk/NEWS: Add release notes for 2.19.5.
1084 2018-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
1086 [GTK] Missing symbols exported in 2.19.4
1087 https://bugs.webkit.org/show_bug.cgi?id=181433
1089 Reviewed by Michael Catanzaro.
1091 Add missing WEBKIT_API to webkit_dom_dom_window_webkit_message_handlers_post_message().
1093 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h:
1094 * webkitglib-symbols.map: Remove webkit_media_player_debug from local.
1096 2018-01-09 Youenn Fablet <youenn@apple.com>
1098 SWClientConnection should not keep references to service worker jobs
1099 https://bugs.webkit.org/show_bug.cgi?id=181381
1101 Reviewed by Chris Dumez.
1103 Updated IPC handling based on WebCore refactoring.
1105 * Scripts/webkit/messages.py:
1106 (forward_declarations_and_headers):
1108 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1109 (WebKit::WebSWServerConnection::rejectJobInClient):
1110 (WebKit::WebSWServerConnection::resolveRegistrationJobInClient):
1111 (WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
1112 (WebKit::WebSWServerConnection::startScriptFetchInClient):
1113 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1114 * WebProcess/Storage/WebSWClientConnection.messages.in:
1116 2018-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
1118 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.4 release.
1120 * gtk/NEWS: Add release notes for 2.19.4.
1122 2018-01-09 Ali Juma <ajuma@chromium.org>
1124 Implement VisualViewport API events
1125 https://bugs.webkit.org/show_bug.cgi?id=179386
1127 Reviewed by Frédéric Wang.
1129 Change the default value of the VisualViewportAPI experimental feature flag to
1130 DEFAULT_EXPERIMENTAL_FEATURES_ENABLED. This patch completes the implementation
1131 of this feature as specified by https://wicg.github.io/visual-viewport/, so this
1132 feature is now ready for wider testing.
1134 * Shared/WebPreferences.yaml:
1136 2018-01-08 Alex Christensen <achristensen@webkit.org>
1138 Add WKNavigationDelegate SPI exposing WebProcess crash reason
1139 https://bugs.webkit.org/show_bug.cgi?id=181410
1140 <rdar://problem/36167199>
1142 Reviewed by Wenson Hsieh.
1144 We exposed it in the C SPI.
1146 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1147 * UIProcess/Cocoa/NavigationState.h:
1148 * UIProcess/Cocoa/NavigationState.mm:
1149 (WebKit::NavigationState::setNavigationDelegate):
1150 (WebKit::toWKProcessTerminationReason):
1151 (WebKit::NavigationState::NavigationClient::processDidTerminate):
1153 2018-01-08 Alex Christensen <achristensen@webkit.org>
1155 Make ObjC SPI equivalent to WKPageNavigationClient.decidePolicyForPluginLoad
1156 https://bugs.webkit.org/show_bug.cgi?id=181413
1157 <rdar://problem/36169005>
1159 Reviewed by Wenson Hsieh.
1161 * UIProcess/API/APINavigationClient.h:
1162 (API::NavigationClient::decidePolicyForPluginLoad):
1163 * UIProcess/API/C/WKPage.cpp:
1164 (WKPageSetPageNavigationClient):
1165 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1166 * UIProcess/Cocoa/NavigationState.h:
1167 * UIProcess/Cocoa/NavigationState.mm:
1168 (WebKit::NavigationState::setNavigationDelegate):
1169 (WebKit::toPluginModuleLoadPolicy):
1170 (WebKit::toWKPluginModuleLoadPolicy):
1171 (WebKit::NavigationState::NavigationClient::decidePolicyForPluginLoad):
1172 * UIProcess/WebPageProxy.cpp:
1173 (WebKit::WebPageProxy::findPlugin):
1175 2018-01-08 Ryosuke Niwa <rniwa@webkit.org>
1177 iOS build fix attempt after r226602.
1179 * UIProcess/API/C/WKContextMenuListener.cpp:
1180 (WKContextMenuListenerUseContextMenuItems):
1182 2018-01-08 Alex Christensen <achristensen@webkit.org>
1184 Add SPI for WKOpenPanelParameters._acceptedMIMETypes and _acceptedFileExtensions
1185 https://bugs.webkit.org/show_bug.cgi?id=181408
1186 <rdar://problem/35884960>
1188 Reviewed by Tim Horton.
1190 * UIProcess/API/Cocoa/WKOpenPanelParameters.mm:
1191 (-[WKOpenPanelParameters _acceptedMIMETypes]):
1192 (-[WKOpenPanelParameters _acceptedFileExtensions]):
1193 * UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h:
1194 * UIProcess/API/Cocoa/WKOpenPanelParametersPrivate.h: Added.
1195 * WebKit.xcodeproj/project.pbxproj:
1197 2018-01-08 Commit Queue <commit-queue@webkit.org>
1199 Unreviewed, rolling out r226532 and r226540.
1200 https://bugs.webkit.org/show_bug.cgi?id=181422
1202 jessie says basic browsing does not seem to work (Requested by
1203 alexchristensen on #webkit).
1205 Reverted changesets:
1207 "Add CSP support to service workers"
1208 https://bugs.webkit.org/show_bug.cgi?id=181385
1209 https://trac.webkit.org/changeset/226532
1211 "SWClientConnection should not keep references to service
1213 https://bugs.webkit.org/show_bug.cgi?id=181381
1214 https://trac.webkit.org/changeset/226540
1216 2018-01-08 Wenson Hsieh <wenson_hsieh@apple.com>
1218 [Attachment Support] Expose file name and content type of WKAttachment
1219 https://bugs.webkit.org/show_bug.cgi?id=181390
1220 <rdar://problem/36336837>
1222 Reviewed by Tim Horton.
1224 Add support for -[_WKAttachment requestInfo:], which fetches a snapshot of the attachment's state. This API is
1225 meant to be a replacement for -requestData: that provides additional metadata about the attachment.
1227 * Scripts/webkit/messages.py:
1229 * Shared/WebCoreArgumentCoders.cpp:
1230 (IPC::ArgumentCoder<AttachmentInfo>::encode):
1231 (IPC::ArgumentCoder<AttachmentInfo>::decode):
1232 * Shared/WebCoreArgumentCoders.h:
1234 Add IPC support for AttachmentInfo. Note that instead of using (encode|decode)SharedBuffer, we send and receive
1235 data references to the shared buffer.
1237 * UIProcess/API/APIAttachment.cpp:
1238 (API::Attachment::requestInfo):
1239 (API::Attachment::requestData): Deleted.
1240 * UIProcess/API/APIAttachment.h:
1242 Change requestData to requestInfo.
1244 * UIProcess/API/Cocoa/_WKAttachment.h:
1245 * UIProcess/API/Cocoa/_WKAttachment.mm:
1246 (-[_WKAttachmentInfo initWithInfo:]):
1247 (-[_WKAttachmentInfo data]):
1248 (-[_WKAttachmentInfo name]):
1249 (-[_WKAttachmentInfo filePath]):
1250 (-[_WKAttachmentInfo contentType]):
1251 (-[_WKAttachment requestInfo:]):
1252 (-[_WKAttachment requestData:]):
1254 Implement -requestInfo: by calling into APIAttachment, and reimplement -requestData: in terms of -requestInfo:.
1256 * UIProcess/WebPageProxy.cpp:
1257 (WebKit::WebPageProxy::attachmentInfoCallback):
1258 (WebKit::WebPageProxy::requestAttachmentInfo):
1259 (WebKit::WebPageProxy::sharedBufferCallback): Deleted.
1260 (WebKit::WebPageProxy::requestAttachmentData): Deleted.
1261 * UIProcess/WebPageProxy.h:
1262 * UIProcess/WebPageProxy.messages.in:
1264 Rename the SharedBufferCallback IPC message to AttachmentInfoCallback, and make it conditional on
1265 ATTACHMENT_ELEMENT. Rename requestAttachmentData to requestAttachmentInfo.
1267 * WebProcess/WebPage/WebPage.cpp:
1268 (WebKit::WebPage::requestAttachmentInfo):
1269 (WebKit::WebPage::invokeSharedBufferCallback): Deleted.
1270 (WebKit::WebPage::requestAttachmentData): Deleted.
1272 Rename requestAttachmentData to requestAttachmentInfo and adopt HTMLAttachmentElement::requestInfo.
1274 * WebProcess/WebPage/WebPage.h:
1275 * WebProcess/WebPage/WebPage.messages.in:
1277 2018-01-08 Alex Christensen <achristensen@webkit.org>
1279 Pass around Vector<Ref<WebContextMenuItem>> instead of WKArrayRef or Vector<WebContextMenuItemData>
1280 https://bugs.webkit.org/show_bug.cgi?id=181419
1282 Reviewed by Tim Horton.
1284 Passing a WKArrayRef to an API object is messy and was preventing me from moving things around and making ObjC SPI.
1285 No change in behavior. Just using different layering abstractions for the same data.
1287 * UIProcess/API/C/WKContextMenuListener.cpp:
1288 (WKContextMenuListenerUseContextMenuItems):
1289 * UIProcess/WebContextMenuListenerProxy.cpp:
1290 (WebKit::WebContextMenuListenerProxy::useContextMenuItems):
1291 * UIProcess/WebContextMenuListenerProxy.h:
1292 * UIProcess/WebContextMenuProxy.h:
1293 * UIProcess/mac/WebContextMenuProxyMac.h:
1294 * UIProcess/mac/WebContextMenuProxyMac.mm:
1295 (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
1296 (WebKit::WebContextMenuProxyMac::showContextMenu):
1298 2018-01-08 John Wilander <wilander@apple.com>
1300 Storage Access API: Remove access for all frames under a page when the page is closed
1301 https://bugs.webkit.org/show_bug.cgi?id=181398
1302 <rdar://problem/36357879>
1304 Reviewed by Alex Christensen.
1306 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1307 (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):
1308 * NetworkProcess/NetworkConnectionToWebProcess.h:
1309 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1310 * WebProcess/WebPage/WebPage.cpp:
1311 (WebKit::WebPage::close):
1313 2018-01-08 Youenn Fablet <youenn@apple.com>
1315 SWClientConnection should not keep references to service worker jobs
1316 https://bugs.webkit.org/show_bug.cgi?id=181381
1318 Reviewed by Chris Dumez.
1320 Updated IPC handling based on WebCore refactoring.
1322 * Scripts/webkit/messages.py:
1323 (forward_declarations_and_headers):
1325 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1326 (WebKit::WebSWServerConnection::rejectJobInClient):
1327 (WebKit::WebSWServerConnection::resolveRegistrationJobInClient):
1328 (WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
1329 (WebKit::WebSWServerConnection::startScriptFetchInClient):
1330 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1331 * WebProcess/Storage/WebSWClientConnection.messages.in:
1333 2018-01-08 Joseph Pecoraro <pecoraro@apple.com>
1335 [Cocoa] Web Inspector: Provide a way for clients to check if an NSWindow is a Web Inspector window
1336 https://bugs.webkit.org/show_bug.cgi?id=181361
1337 <rdar://problem/36332865>
1339 Reviewed by Darin Adler.
1341 * WebKit.xcodeproj/project.pbxproj:
1344 * Shared/API/Cocoa/_WKNSWindowExtras.h: Added.
1345 * Shared/API/Cocoa/_WKNSWindowExtras.mm: Added.
1346 (-[NSWindow _web_isWebInspectorWindow]):
1347 Method to determing if a window is being used for Web Inspector content.
1349 * UIProcess/mac/WKInspectorWindow.h: Added.
1350 * UIProcess/mac/WKInspectorWindow.mm: Added.
1351 Named subclass so we can use isKindOfClass.
1353 * UIProcess/mac/WebInspectorProxyMac.mm:
1354 (WebKit::WebInspectorProxy::createFrontendWindow):
1355 Use the named subclass.
1357 2018-01-08 Tim Horton <timothy_horton@apple.com>
1359 Build fix for WKPDFView
1360 https://bugs.webkit.org/show_bug.cgi?id=181399
1361 <rdar://problem/36311915>
1363 Reviewed by Simon Fraser.
1365 * UIProcess/ios/WKPDFView.mm:
1366 Disable deprecation warnings in this whole file.
1368 2018-01-08 Youenn Fablet <youenn@apple.com>
1370 Caches::writeCachesToDisk should assert that it is initialized
1371 https://bugs.webkit.org/show_bug.cgi?id=181383
1373 Reviewed by Alex Christensen.
1375 Add assertion to ensure caches is initialized
1377 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
1378 (WebKit::CacheStorage::Caches::writeCachesToDisk):
1380 2018-01-08 Youenn Fablet <youenn@apple.com>
1382 WebProcessPool::terminateServiceWorkerProcess should protect itself in debug builds
1383 https://bugs.webkit.org/show_bug.cgi?id=181384
1385 Reviewed by Chris Dumez.
1387 * UIProcess/WebProcessPool.cpp:
1388 (WebKit::WebProcessPool::terminateServiceWorkerProcess):
1390 2018-01-08 Frederic Wang <fwang@igalia.com>
1392 Unreviewed build fix after r226211.
1394 * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Use WK_IOS_TBA for iOS.
1396 2018-01-08 Youenn Fablet <youenn@apple.com>
1398 navigator.onLine does not work inside service workers
1399 https://bugs.webkit.org/show_bug.cgi?id=181079
1400 <rdar://problem/36178606>
1402 Reviewed by Darin Adler.
1404 Added support for a callback called for each service worker proxy creation.
1405 Callback is used by WTR to inject a self.internals object used for testing.
1407 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1408 (WKBundleSetServiceWorkerProxyCreationCallback):
1409 * WebProcess/InjectedBundle/API/c/WKBundle.h:
1410 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1411 (WebKit::InjectedBundle::setServiceWorkerProxyCreationCallback):
1412 * WebProcess/InjectedBundle/InjectedBundle.h:
1414 2018-01-07 David Kilzer <ddkilzer@apple.com>
1416 Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
1417 <https://webkit.org/b/181256>
1418 <rdar://problem/36281730>
1420 Reviewed by Darin Adler.
1422 * Configurations/Base.xcconfig:
1423 (WARNING_CFLAGS): Add -Wcast-qual.
1424 * NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:
1425 (WTF::Persistence::encodeCertificateChain): Include
1426 TypeCastsCF.h from WTF, and use
1427 checked_cf_cast<SecCertificateRef>() to fix warning.
1428 * Platform/cocoa/WKCrashReporter.mm:
1429 (WebKit::setCrashReportApplicationSpecificInformation):
1430 - Move `oldMessage` check above nullptr check to fix a leak when
1431 passing in nullptr after previously setting the crash string.
1432 - Change C-style cast to const_cast<char*>() to fix warning.
1433 * PluginProcess/mac/PluginProcessShim.mm:
1434 (WebKit::shim_shmat): Change C-style cast to
1435 const_cast<void*>() to fix warning.
1436 * Shared/Authentication/mac/AuthenticationManager.mac.mm:
1437 (WebKit::leafCertificate): Include TypeCastsCF.h from
1438 WTF, and use checked_cf_cast<SecCertificateRef>() to fix
1440 * Shared/cf/ArgumentCodersCF.cpp:
1441 (IPC::encode): Use static_cast<>(const_cast<void*>() to
1442 fix warnings since the CFTypeID has already been
1444 * Shared/mac/WebCoreArgumentCodersMac.mm:
1445 (IPC::decodeNSError): Use an `auto` variable to hold the
1446 CFMutableDictionaryRef, then WTFMove() to assign it back to
1448 * UIProcess/Cocoa/WebViewImpl.mm:
1449 (WebKit::takeWindowSnapshot): Include TypeCastsCF.h from
1450 WTF, and use checked_cf_cast<CGImageRef>() to fix
1453 2018-01-07 Konstantin Tokarev <annulen@yandex.ru>
1455 [cmake] Unset CMAKE_REQUIRED_LIBRARIES after check_function_exists test
1456 https://bugs.webkit.org/show_bug.cgi?id=181371
1458 Reviewed by Michael Catanzaro.
1460 This variable is used by check_function_exists internally, its value
1461 should be never used for anything else.
1465 2018-01-05 Dan Bernstein <mitz@apple.com>
1467 REGRESSION (r226218): iOS-only assets are installed on macOS
1468 https://bugs.webkit.org/show_bug.cgi?id=181362
1470 Reviewed by Anders Carlsson.
1472 * Configurations/WebKit.xcconfig: Exclude everything under Resources/ios when not targeting
1475 * Resources/ios: Added.
1476 * Resources/ios/iOS.xcassets: Moved from Source/WebKit/WebKit.xcassets.
1477 * Resources/ios/iOS.xcassets/LockMini.imageset/NavigationBarLockMini@2x.pdf: Set the
1478 svn:mime-type property.
1479 * Resources/ios/iOS.xcassets/LockMini.imageset/NavigationBarLockMini@3x.pdf: Ditto.
1481 * Resources/mac: Added.
1482 * Resources/mac/mediaIcon.pdf: Moved here…
1483 * Resources/mediaIcon.pdf: …from here.
1485 * WebKit.xcassets: Moved under Resources/ios.
1487 * WebKit.xcodeproj/project.pbxproj: Created an ios group under the Resources group, and
1488 cleaned up the mac group. Removed the Recovered References group.
1490 2018-01-05 John Wilander <wilander@apple.com>
1492 Storage Access API: Refactor to make naming accurate and explicit, simplify access table, and prepare for access removal for page
1493 https://bugs.webkit.org/show_bug.cgi?id=181357
1494 <rdar://problem/36331031>
1496 Reviewed by Alex Christensen.
1498 This change does the following:
1499 - Changes function and message names to reflect how this feature
1500 was eventually implemented, i.e. access per frame.
1501 - Makes it explicit that the UI process is only involved in
1502 granting storage access and not removing storage access.
1503 The latter is done directly by the web process.
1504 - Simplifies the network process' entry map since only needs to
1505 be able to give access to one domain in one frame at a time.
1506 Access goes away on frame navigation so there can only be one
1507 domain at a time per frame. Also, the map now uses pageIDs as
1508 main keys to prepare for efficient access removal for all
1509 frames under a page.
1510 - Fixes a bug in so that a cross-origin iframe with the same
1511 partition as the top frame correctly is handled as already
1514 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1515 (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
1516 (WebKit::NetworkConnectionToWebProcess::removeStorageAccess): Deleted.
1517 * NetworkProcess/NetworkConnectionToWebProcess.h:
1518 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1519 * NetworkProcess/NetworkProcess.cpp:
1520 (WebKit::NetworkProcess::hasStorageAccessForFrame):
1521 (WebKit::NetworkProcess::grantStorageAccessForFrame):
1522 (WebKit::NetworkProcess::hasStorageAccessForPrevalentDomains): Deleted.
1523 (WebKit::NetworkProcess::updateStorageAccessForPrevalentDomains): Deleted.
1524 * NetworkProcess/NetworkProcess.h:
1525 * NetworkProcess/NetworkProcess.messages.in:
1526 * UIProcess/Network/NetworkProcessProxy.cpp:
1527 (WebKit::NetworkProcessProxy::hasStorageAccessForFrame):
1528 (WebKit::NetworkProcessProxy::grantStorageAccessForFrame):
1529 (WebKit::NetworkProcessProxy::hasStorageAccessForPrevalentDomains): Deleted.
1530 (WebKit::NetworkProcessProxy::updateStorageAccessForPrevalentDomains): Deleted.
1531 * UIProcess/Network/NetworkProcessProxy.h:
1532 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1533 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
1534 (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
1535 (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
1536 * UIProcess/WebResourceLoadStatisticsStore.h:
1537 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1538 (WebKit::WebsiteDataStore::hasStorageAccessForFrameHandler):
1539 (WebKit::WebsiteDataStore::grantStorageAccessForFrameHandler):
1540 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
1541 (WebKit::WebsiteDataStore::hasStorageAccessForPrevalentDomainsHandler): Deleted.
1542 (WebKit::WebsiteDataStore::updateStorageAccessForPrevalentDomainsHandler): Deleted.
1543 * UIProcess/WebsiteData/WebsiteDataStore.h:
1544 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1545 (WebKit::WebFrameLoaderClient::detachedFromParent2):
1546 (WebKit::WebFrameLoaderClient::dispatchWillChangeDocument):
1548 2018-01-05 Youenn Fablet <youenn@apple.com>
1550 Implement Cache API partitioning based on ClientOrigin
1551 https://bugs.webkit.org/show_bug.cgi?id=181240
1553 Reviewed by Alex Christensen.
1555 open and retrieveCaches now take a ClientOrigin instead of a String.
1556 Updated cache filesystem path computation to take both client origin and top origin.
1558 When clearing an origin, caches whose client origin or top origin matches the origin are cleared.
1559 Caches are added to the web site data of their client origin with their corresponding cache size.
1560 Caches are added to the web site data of their top origin with a size equal to 0.
1562 Updated memory representation dumping used for test to include both top and client origins.
1564 * NetworkProcess/NetworkProcess.cpp:
1565 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
1566 * NetworkProcess/cache/CacheStorageEngine.cpp:
1567 (WebKit::CacheStorage::Engine::cachesRootPath):
1568 (WebKit::CacheStorage::Engine::open):
1569 (WebKit::CacheStorage::Engine::remove):
1570 (WebKit::CacheStorage::Engine::retrieveCaches):
1571 (WebKit::CacheStorage::Engine::readCachesFromDisk):
1572 (WebKit::CacheStorage::Engine::removeCaches):
1573 (WebKit::CacheStorage::Engine::fetchEntries):
1574 (WebKit::CacheStorage::Engine::clearCachesForOrigin):
1575 (WebKit::CacheStorage::Engine::clearMemoryRepresentation):
1576 (WebKit::CacheStorage::Engine::representation):
1577 * NetworkProcess/cache/CacheStorageEngine.h:
1578 * NetworkProcess/cache/CacheStorageEngineCache.cpp:
1579 (WebKit::CacheStorage::Cache::Cache):
1580 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
1581 (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
1582 (WebKit::CacheStorage::Caches::Caches):
1583 (WebKit::CacheStorage::Caches::storeOrigin):
1584 (WebKit::CacheStorage::Caches::readOrigin):
1585 (WebKit::CacheStorage::Caches::open):
1586 * NetworkProcess/cache/CacheStorageEngineCaches.h:
1587 (WebKit::CacheStorage::Caches::create):
1588 (WebKit::CacheStorage::Caches::origin const):
1589 * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
1590 (WebKit::CacheStorageEngineConnection::open):
1591 (WebKit::CacheStorageEngineConnection::caches):
1592 (WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
1593 * NetworkProcess/cache/CacheStorageEngineConnection.h:
1594 * NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
1595 * WebProcess/Cache/WebCacheStorageConnection.cpp:
1596 (WebKit::WebCacheStorageConnection::doOpen):
1597 (WebKit::WebCacheStorageConnection::doRetrieveCaches):
1598 (WebKit::WebCacheStorageConnection::clearMemoryRepresentation):
1599 * WebProcess/Cache/WebCacheStorageConnection.h:
1601 2018-01-05 Megan Gardner <megan_gardner@apple.com>
1603 Show Keyboard when re-launching WKWebView with a previously focused element
1604 https://bugs.webkit.org/show_bug.cgi?id=181353
1606 Reviewed by Tim Horton.
1608 When relaunching an app with a WKWebView, restore the keyboard if there was a previously
1609 focused element that was being assisted. The element was already being tracked, we just
1610 needed to not bail on showing the keyboard for instances where it was a state change that
1611 caused the element to be refocused.
1613 * UIProcess/PageClient.h:
1614 * UIProcess/WebPageProxy.h:
1615 * UIProcess/WebPageProxy.messages.in:
1616 * UIProcess/ios/PageClientImplIOS.h:
1617 * UIProcess/ios/PageClientImplIOS.mm:
1618 (WebKit::PageClientImpl::startAssistingNode):
1619 * UIProcess/ios/WKContentView.h:
1620 * UIProcess/ios/WKContentViewInteraction.h:
1621 * UIProcess/ios/WKContentViewInteraction.mm:
1622 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
1623 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Deleted.
1624 * UIProcess/ios/WebPageProxyIOS.mm:
1625 (WebKit::WebPageProxy::startAutoscrollAtPosition):
1626 (WebKit::WebPageProxy::startAssistingNode):
1627 * WebProcess/WebPage/WebPage.cpp:
1628 (WebKit::WebPage::setActivityState):
1629 (WebKit::WebPage::elementDidFocus):
1630 * WebProcess/WebPage/WebPage.h:
1632 2018-01-05 Alex Christensen <achristensen@webkit.org>
1634 Restrict navigation-time WKWebsiteDataStore swapping to main frame navigations
1635 https://bugs.webkit.org/show_bug.cgi?id=181217
1637 Reviewed by Tim Horton.
1639 If we swap during an iframe navigation, then we get a page in a strange state.
1640 The intent of the main frame navigation WKWebsiteDataStore swap is that
1641 that is a time when we can change storages without a page in an inconsistent state.
1643 * UIProcess/Cocoa/NavigationState.mm:
1644 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1646 2018-01-05 Alex Christensen <achristensen@webkit.org>
1648 Add WKBundleFrameCreateFrameHandle
1649 https://bugs.webkit.org/show_bug.cgi?id=181232
1650 <rdar://problem/35926696>
1652 Reviewed by Tim Horton.
1654 InjectedBundle clients wanting to sent a _WKFrameHandle cannot without this function.
1655 Before, they would just send the WKBundleFrameRef which would be changed into a WKFrameRef
1656 in the UIProcess by WebProcessProxy::transformHandlesToObjects, but there is no ObjC equivalent
1657 of WKFrameRef, so we were just getting a WKObject when we wanted a _WKFrameHandle.
1658 We can't change WebProcessProxy::transformHandlesToObjects without being incompatible with the
1659 existing C API, so let's add a way for clients to say "I want a _WKFrameHandle".
1661 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1662 (WKBundleFrameCreateFrameHandle):
1663 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1665 2018-01-05 Wenson Hsieh <wenson_hsieh@apple.com>
1667 [Attachment Support] Add a way to write blob data to a file URL from the UI process
1668 https://bugs.webkit.org/show_bug.cgi?id=181236
1670 Reviewed by Brady Eidson.
1672 Add support for writing a blob to a designated file path. In WebKit, this is mainly plumbing writeBlobToFilePath
1673 through WebPageProxy to the network process.
1675 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1676 (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
1678 Call out to the BlobRegistryImpl to write blobs to the file path. Additionally grant sandbox extensions for any
1679 file-backed blob parts corresponding to the given blob URL.
1681 (WebKit::NetworkBlobRegistry::filesInBlob):
1683 Introduce a version of filesInBlob that doesn't check against the NetworkConnectionToWebProcess. This is used
1684 when the UI process is the driver for writing a blob.
1686 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1687 * NetworkProcess/NetworkProcess.cpp:
1688 (WebKit::NetworkProcess::writeBlobToFilePath):
1690 Temporarily grant sandbox access to the given file path.
1692 * NetworkProcess/NetworkProcess.h:
1693 * NetworkProcess/NetworkProcess.messages.in:
1694 * Shared/WebCoreArgumentCoders.cpp:
1695 (IPC::ArgumentCoder<PromisedBlobInfo>::encode):
1696 (IPC::ArgumentCoder<PromisedBlobInfo>::decode):
1697 (IPC::ArgumentCoder<PromisedBlobData>::encode): Deleted.
1698 (IPC::ArgumentCoder<PromisedBlobData>::decode): Deleted.
1700 Remove PromisedBlobData (see WebCore/ChangeLog for more information).
1702 * Shared/WebCoreArgumentCoders.h:
1703 * UIProcess/Network/NetworkProcessProxy.cpp:
1704 (WebKit::NetworkProcessProxy::didClose):
1706 If the network process is terminated, flush any pending callbacks in m_writeBlobToFilePathCallbackMap, passing
1707 in a failure result (success := false) and clearing the callback map.
1709 (WebKit::NetworkProcessProxy::writeBlobToFilePath):
1710 (WebKit::NetworkProcessProxy::didWriteBlobToFilePath):
1711 * UIProcess/Network/NetworkProcessProxy.h:
1712 * UIProcess/Network/NetworkProcessProxy.messages.in:
1713 * UIProcess/WebPageProxy.cpp:
1714 (WebKit::WebPageProxy::writeBlobToFilePath):
1715 * UIProcess/WebPageProxy.h:
1717 2018-01-05 Dan Bernstein <mitz@apple.com>
1719 Add injected bundle equivalents of DOMHTMLDocument (DOMHTMLDocumentExtensions)
1720 https://bugs.webkit.org/show_bug.cgi?id=181345
1722 Reviewed by Tim Horton.
1724 * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h: Declared new methods.
1725 * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
1726 (-[WKDOMDocument createDocumentFragmentWithMarkupString:baseURL:]): Added. Calls WebCore’s
1727 createFragmentFromMarkup.
1728 (-[WKDOMDocument createDocumentFragmentWithText:]): Added. Calls WebCore’s
1729 createFragmentFromText.
1731 2018-01-05 Don Olmstead <don.olmstead@sony.com>
1733 [Curl] Add implementation stubs for Network Cache
1734 https://bugs.webkit.org/show_bug.cgi?id=181343
1736 Reviewed by Alex Christensen.
1738 * NetworkProcess/cache/NetworkCacheCodersCurl.cpp: Added.
1739 (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode):
1740 (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
1741 * NetworkProcess/cache/NetworkCacheDataCurl.cpp: Added.
1742 (WebKit::NetworkCache::Data::Data):
1743 (WebKit::NetworkCache::Data::empty):
1744 (WebKit::NetworkCache::Data::data const):
1745 (WebKit::NetworkCache::Data::isNull const):
1746 (WebKit::NetworkCache::Data::apply const):
1747 (WebKit::NetworkCache::Data::subrange const):
1748 (WebKit::NetworkCache::concatenate):
1749 (WebKit::NetworkCache::Data::adoptMap):
1750 * NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp: Added.
1751 (WebKit::NetworkCache::IOChannel::IOChannel):
1752 (WebKit::NetworkCache::IOChannel::~IOChannel):
1753 (WebKit::NetworkCache::IOChannel::open):
1754 (WebKit::NetworkCache::IOChannel::read):
1755 (WebKit::NetworkCache::IOChannel::write):
1756 * PlatformWin.cmake:
1758 2018-01-05 Don Olmstead <don.olmstead@sony.com>
1760 [Curl] Update method declarations in WebKit
1761 https://bugs.webkit.org/show_bug.cgi?id=181342
1763 Reviewed by Alex Christensen.
1765 * NetworkProcess/Downloads/curl/DownloadCurl.cpp:
1766 (WebKit::Download::resume):
1767 * NetworkProcess/curl/RemoteNetworkingContextCurl.cpp:
1768 (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Deleted.
1769 (WebKit::RemoteNetworkingContext::blockedError const): Deleted.
1771 2018-01-05 Don Olmstead <don.olmstead@sony.com>
1773 WebFullScreenManager should compile when ENABLE(VIDEO) is off
1774 https://bugs.webkit.org/show_bug.cgi?id=181338
1776 Reviewed by Alex Christensen.
1778 * WebProcess/FullScreen/WebFullScreenManager.cpp:
1779 (WebKit::WebFullScreenManager::didEnterFullScreen):
1780 (WebKit::WebFullScreenManager::willExitFullScreen):
1781 * WebProcess/FullScreen/WebFullScreenManager.h:
1783 2018-01-05 Andy Estes <aestes@apple.com>
1785 [Apple Pay] Disable Apple Pay on platforms that don't have PassKit.framework
1786 https://bugs.webkit.org/show_bug.cgi?id=181335
1787 <rdar://problem/36311296>
1789 Reviewed by Brady Eidson.
1791 When Safari is running in the macOS Base System, PassKit.framework is not available.
1792 If we fail to dlopen PassKit, we should disable Apple Pay.
1794 * UIProcess/API/C/WKPreferences.cpp:
1795 (WKPreferencesSetApplePayEnabled):
1796 * UIProcess/API/Cocoa/WKWebView.mm:
1797 (-[WKWebView _initializeWithConfiguration:]):
1798 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
1799 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1800 (WebKit::WebPaymentCoordinatorProxy::availablePaymentNetworks):
1801 (WebKit::WebPaymentCoordinatorProxy::platformSupportsPayments):
1803 2018-01-05 Dan Bernstein <mitz@apple.com>
1805 Fixed the build following AppKit API deprecations in a recent SDKs
1807 * UIProcess/mac/WKFullScreenWindowController.mm:
1808 (-[WKFullScreenWindowController enterFullScreen:]): Suppressed deprecation warnings.
1809 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto.
1810 (-[WKFullScreenWindowController exitFullScreen]): Ditto.
1811 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
1812 (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Ditto.
1813 (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto.
1814 (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Ditto.
1815 * UIProcess/mac/WKPrintingView.mm:
1816 (-[WKPrintingView _setAutodisplay:]): Ditto.
1818 2018-01-05 Matt Lewis <jlewis3@apple.com>
1820 Unreviewed, rolling out r226401.
1822 This caused timeouts on multiple platforms.
1826 "Implement Cache API partitioning based on ClientOrigin"
1827 https://bugs.webkit.org/show_bug.cgi?id=181240
1828 https://trac.webkit.org/changeset/226401
1830 2018-01-05 Joseph Pecoraro <pecoraro@apple.com>
1832 ServiceWorkers: Enable UserTiming / ResourceTiming
1833 https://bugs.webkit.org/show_bug.cgi?id=181297
1834 <rdar://problem/36307306>
1836 Reviewed by Youenn Fablet.
1838 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1839 (WebKit::WebSWContextManagerConnection::updatePreferencesStore):
1840 Enable Resource Timing / User Timing for the ServiceWorker process.
1842 2018-01-04 Zan Dobersek <zdobersek@igalia.com>
1844 Unreviewed GTK+ build fix.
1846 * UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp:
1847 (webkit_user_media_permission_is_for_audio_device):
1848 Call UserMediaPermissionRequestProxy::requiresAudioCapture().
1849 (webkit_user_media_permission_is_for_video_device):
1850 Call UserMediaPermissionRequestProxy::requiresVideoCapture().
1852 2018-01-04 Don Olmstead <don.olmstead@sony.com>
1854 [Curl] Fix compilation error in WebFrameNetworkingContext
1855 https://bugs.webkit.org/show_bug.cgi?id=181312
1857 Reviewed by Alex Christensen.
1859 * WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp:
1860 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
1862 2018-01-04 Tim Horton <timothy_horton@apple.com>
1864 WKWebView loses minimum layout size overrides that happen while the process is terminated
1865 https://bugs.webkit.org/show_bug.cgi?id=181306
1866 <rdar://problem/34398288>
1868 Reviewed by Dan Bernstein.
1870 * Shared/WebPageCreationParameters.cpp:
1871 (WebKit::WebPageCreationParameters::encode const):
1872 (WebKit::WebPageCreationParameters::decode):
1873 * Shared/WebPageCreationParameters.h:
1874 * UIProcess/API/Cocoa/WKWebView.mm:
1875 (-[WKWebView _didRelaunchProcess]): Deleted.
1876 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1877 * UIProcess/WebPageProxy.cpp:
1878 (WebKit::WebPageProxy::creationParameters):
1879 * UIProcess/WebPageProxy.h:
1880 * UIProcess/ios/PageClientImplIOS.mm:
1881 (WebKit::PageClientImpl::didRelaunchProcess):
1882 * UIProcess/ios/WebPageProxyIOS.mm:
1883 (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
1884 (WebKit::WebPageProxy::setForceAlwaysUserScalable):
1885 (WebKit::WebPageProxy::setMaximumUnobscuredSize):
1886 * WebProcess/WebPage/WebPage.cpp:
1887 (WebKit::WebPage::WebPage):
1888 Pass the current viewport minimum layout size and maximum unobscured size
1889 in the WebPageCreationParameters instead of re-sending them in _didRelaunchProcess.
1891 The previous approach was problematic when _dispatchSetMinimumLayoutSize:
1892 was changed to not re-send identical updates, because if the client calls
1893 _overrideLayoutParametersWithMinimumLayoutSize before the Web Content process
1894 is re-launched (after terminating), we would cache the size, attempt to send it,
1895 fail silently (because the process is not launched), and then in _didRelaunchProcess
1896 we would choose not to re-send (after the process is successfully relaunched)
1897 because we think we already sent the new value.
1899 Add isValid() checks to our message sends. Ideally send() would assert
1900 if the process is not alive to avoid problems like this, but it doesn't (yet).
1902 Get rid of WKWebView's _didRelaunchProcess, because it does nothing now.
1904 2018-01-04 Stephan Szabo <stephan.szabo@sony.com>
1906 NetworkProcess cache files use functions from unistd.h without explicitly including it
1907 https://bugs.webkit.org/show_bug.cgi?id=181261
1909 Reviewed by Alex Christensen.
1911 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
1912 * NetworkProcess/cache/NetworkCacheData.cpp:
1914 2018-01-04 Keith Rollin <krollin@apple.com>
1917 https://bugs.webkit.org/show_bug.cgi?id=181295
1918 <rdar://problem/35802295>
1920 Reviewed by Brent Fulgham.
1922 Fix a problem introduced in r226226 where the emitted JSON didn't
1923 include some required commas.
1925 * NetworkProcess/NetworkResourceLoader.cpp:
1926 (WebKit::NetworkResourceLoader::logCookieInformation const):
1928 2018-01-04 Eric Carlson <eric.carlson@apple.com>
1930 [MediaStream] Add Mock screen capture source
1931 https://bugs.webkit.org/show_bug.cgi?id=181291
1932 <rdar://problem/36298164>
1934 Reviewed by Dean Jackson.
1936 * Shared/WebCoreArgumentCoders.cpp:
1937 (IPC::ArgumentCoder<MediaConstraints>::decode):
1938 (IPC::ArgumentCoder<CaptureDevice>::encode): Deleted, moved to CaptureDevice.h
1939 (IPC::ArgumentCoder<CaptureDevice>::decode): Ditto.
1940 * Shared/WebCoreArgumentCoders.h:
1942 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add _WKCaptureDeviceDisplay.
1943 * UIProcess/Cocoa/UIDelegate.mm:
1944 (WebKit::requestUserMediaAuthorizationForDevices): Deal with display capture.
1945 (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Ditto.
1947 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1948 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied): requiresAudio -> requiresAudioCapture.
1949 (WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest const): Never reuse
1950 a previously granted display capture request.
1952 * UIProcess/UserMediaPermissionRequestProxy.cpp:
1953 (WebKit::UserMediaPermissionRequestProxy::allow): Search the eligible devices instead of asking
1954 the source center to find devices.
1955 * UIProcess/UserMediaPermissionRequestProxy.h:
1956 (WebKit::UserMediaPermissionRequestProxy::requiresAudioCapture const): Renamed.
1957 (WebKit::UserMediaPermissionRequestProxy::requiresVideoCapture const): Ditto.
1958 (WebKit::UserMediaPermissionRequestProxy::requiresDisplayCapture const): New.
1959 (WebKit::UserMediaPermissionRequestProxy::requiresAudio const): Deleted.
1960 (WebKit::UserMediaPermissionRequestProxy::requiresVideo const): Deleted.
1962 2018-01-04 Youenn Fablet <youenn@apple.com>
1964 FetchResponse should set its internal response text encoding name
1965 https://bugs.webkit.org/show_bug.cgi?id=181284
1967 Reviewed by Alex Christensen.
1969 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
1970 (WebKit::ServiceWorkerClientFetch::didReceiveResponse): Set default encoding to UTF-8.
1972 2018-01-04 Youenn Fablet <youenn@apple.com>
1974 Implement Cache API partitioning based on ClientOrigin
1975 https://bugs.webkit.org/show_bug.cgi?id=181240
1977 Reviewed by Alex Christensen.
1979 open and retrieveCaches now take a ClientOrigin instead of a String.
1980 Updated cache filesystem path computation to take both client origin and top origin.
1982 When clearing an origin, caches whose client origin or top origin matches the origin are cleared.
1983 Caches are added to the web site data of their client origin with their corresponding cache size.
1984 Caches are added to the web site data of their top origin with a size equal to 0.
1986 Updated memory representation dumping used for test to include both top and client origins.
1988 * NetworkProcess/NetworkProcess.cpp:
1989 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
1990 * NetworkProcess/cache/CacheStorageEngine.cpp:
1991 (WebKit::CacheStorage::Engine::cachesRootPath):
1992 (WebKit::CacheStorage::Engine::open):
1993 (WebKit::CacheStorage::Engine::remove):
1994 (WebKit::CacheStorage::Engine::retrieveCaches):
1995 (WebKit::CacheStorage::Engine::readCachesFromDisk):
1996 (WebKit::CacheStorage::Engine::removeCaches):
1997 (WebKit::CacheStorage::Engine::fetchEntries):
1998 (WebKit::CacheStorage::Engine::clearCachesForOrigin):
1999 (WebKit::CacheStorage::Engine::clearMemoryRepresentation):
2000 (WebKit::CacheStorage::Engine::representation):
2001 * NetworkProcess/cache/CacheStorageEngine.h:
2002 * NetworkProcess/cache/CacheStorageEngineCache.cpp:
2003 (WebKit::CacheStorage::Cache::Cache):
2004 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2005 (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
2006 (WebKit::CacheStorage::Caches::Caches):
2007 (WebKit::CacheStorage::Caches::storeOrigin):
2008 (WebKit::CacheStorage::Caches::readOrigin):
2009 (WebKit::CacheStorage::Caches::open):
2010 * NetworkProcess/cache/CacheStorageEngineCaches.h:
2011 (WebKit::CacheStorage::Caches::create):
2012 (WebKit::CacheStorage::Caches::origin const):
2013 * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
2014 (WebKit::CacheStorageEngineConnection::open):
2015 (WebKit::CacheStorageEngineConnection::caches):
2016 (WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
2017 * NetworkProcess/cache/CacheStorageEngineConnection.h:
2018 * NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
2019 * WebProcess/Cache/WebCacheStorageConnection.cpp:
2020 (WebKit::WebCacheStorageConnection::doOpen):
2021 (WebKit::WebCacheStorageConnection::doRetrieveCaches):
2022 (WebKit::WebCacheStorageConnection::clearMemoryRepresentation):
2023 * WebProcess/Cache/WebCacheStorageConnection.h:
2025 2018-01-04 Youenn Fablet <youenn@apple.com>
2027 Service Worker should expose redirect mode for navigation loads as manual
2028 https://bugs.webkit.org/show_bug.cgi?id=181067
2030 Reviewed by Alex Christensen.
2032 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
2033 (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
2035 2018-01-03 Wenson Hsieh <wenson_hsieh@apple.com>
2037 [Attachment Support] Create attachment elements when dropping files on iOS
2038 https://bugs.webkit.org/show_bug.cgi?id=181192
2039 <rdar://problem/36280945>
2041 Reviewed by Tim Horton.
2043 Make some minor adjustments for changes to the pasteboard in WebCore. See WebCore/ChangeLog for more detail.
2044 Teaches WebPasteboardProxy et. al. to plumb PasteboardItemInfo from the UI process to the web process via the
2045 new `InformationForItemAtIndex` codepath.
2047 * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
2048 (WebKit::WebPasteboardProxy::informationForItemAtIndex):
2049 (WebKit::WebPasteboardProxy::getFilenamesForDataInteraction): Deleted.
2050 * UIProcess/WebPasteboardProxy.h:
2051 * UIProcess/WebPasteboardProxy.messages.in:
2052 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2053 (WebKit::WebPlatformStrategies::informationForItemAtIndex):
2054 (WebKit::WebPlatformStrategies::getFilenamesForDataInteraction): Deleted.
2055 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2057 2018-01-03 Ting-Wei Lan <lantw44@gmail.com>
2059 Replace hard-coded paths in shebangs with #!/usr/bin/env
2060 https://bugs.webkit.org/show_bug.cgi?id=181040
2062 Reviewed by Alex Christensen.
2064 * Scripts/generate-forwarding-headers.pl:
2066 2018-01-03 Wenson Hsieh <wenson_hsieh@apple.com>
2068 [Attachment Support] Add plumbing for starting a drag with promised blob data
2069 https://bugs.webkit.org/show_bug.cgi?id=181201
2071 Reviewed by Tim Horton.
2073 Add boilerplate plumbing for PrepareToDragPromisedBlob, which delivers blob promises to the UI process when
2074 dragging, respectively.
2076 * Scripts/webkit/messages.py:
2078 * Shared/WebCoreArgumentCoders.cpp:
2079 (IPC::encodeTypesAndData):
2080 (IPC::decodeTypesAndData):
2081 (IPC::ArgumentCoder<PasteboardWebContent>::encode):
2082 (IPC::ArgumentCoder<PasteboardWebContent>::decode):
2083 (IPC::ArgumentCoder<PasteboardImage>::encode):
2084 (IPC::ArgumentCoder<PasteboardImage>::decode):
2085 (IPC::ArgumentCoder<PromisedBlobInfo>::encode):
2086 (IPC::ArgumentCoder<PromisedBlobInfo>::decode):
2088 Add IPC support PromisedBlobInfo's additionalTypes and additionalData.
2090 (IPC::encodeClientTypesAndData): Deleted.
2091 (IPC::decodeClientTypesAndData): Deleted.
2093 Rename these helper functions and move them to the top of the file.
2095 * UIProcess/Cocoa/WebViewImpl.h:
2096 * UIProcess/Cocoa/WebViewImpl.mm:
2097 (WebKit::WebViewImpl::prepareToDragPromisedBlob):
2098 * UIProcess/PageClient.h:
2099 (WebKit::PageClient::prepareToDragPromisedBlob):
2100 * UIProcess/WebPageProxy.cpp:
2101 (WebKit::WebPageProxy::prepareToDragPromisedBlob):
2102 * UIProcess/WebPageProxy.h:
2103 * UIProcess/WebPageProxy.messages.in:
2104 * UIProcess/ios/PageClientImplIOS.h:
2105 * UIProcess/ios/PageClientImplIOS.mm:
2106 (WebKit::PageClientImpl::prepareToDragPromisedBlob):
2107 * UIProcess/ios/WKContentViewInteraction.h:
2108 * UIProcess/ios/WKContentViewInteraction.mm:
2109 (-[WKContentView _prepareToDragPromisedBlob:]):
2110 * UIProcess/mac/PageClientImplMac.h:
2111 * UIProcess/mac/PageClientImplMac.mm:
2112 (WebKit::PageClientImpl::prepareToDragPromisedBlob):
2113 * WebProcess/WebCoreSupport/WebDragClient.cpp:
2114 (WebKit::WebDragClient::prepareToDragPromisedBlob):
2115 * WebProcess/WebCoreSupport/WebDragClient.h:
2116 * WebProcess/WebPage/WebPage.cpp:
2117 (WebKit::WebPage::prepareToDragPromisedBlob):
2118 * WebProcess/WebPage/WebPage.h:
2120 2018-01-03 David Kilzer <ddkilzer@apple.com>
2122 REGRESSION (r212929): WKSnapshotConfiguration may leak an NSNumber when deallocated
2123 <https://webkit.org/b/181274>
2125 Reviewed by Joseph Pecoraro.
2127 * UIProcess/API/Cocoa/WKSnapshotConfiguration.mm:
2128 (-[WKSnapshotConfiguration dealloc]): Implement method and
2129 release _snapshotWidth.
2131 2018-01-03 John Wilander <wilander@apple.com>
2133 Storage Access API: Refactor XPC for access removal to go straight from the web process to the network process
2134 https://bugs.webkit.org/show_bug.cgi?id=181270
2135 <rdar://problem/36289544>
2137 Reviewed by Alex Christensen.
2139 This change refactors how the web process tells the network process
2140 to remove storage access. Previously, this was done over the UI process
2141 just like requests for storage access. But since no further reasoning
2142 is needed, the message should go straight from the web process to the
2143 network process for performance reasons and to minimize the risk of a
2146 As a consequence, the XPC code for storage access removal in the UI
2149 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2150 (WebKit::NetworkConnectionToWebProcess::removeStorageAccess):
2151 * NetworkProcess/NetworkConnectionToWebProcess.h:
2152 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2153 * NetworkProcess/NetworkProcess.cpp:
2154 (WebKit::NetworkProcess::removeStorageAccess): Deleted.
2155 * NetworkProcess/NetworkProcess.h:
2156 * NetworkProcess/NetworkProcess.messages.in:
2157 * UIProcess/Network/NetworkProcessProxy.cpp:
2158 (WebKit::NetworkProcessProxy::removeStorageAccess): Deleted.
2159 * UIProcess/Network/NetworkProcessProxy.h:
2160 * UIProcess/WebPageProxy.cpp:
2161 (WebKit::WebPageProxy::requestStorageAccess):
2162 (WebKit::WebPageProxy::removeStorageAccess): Deleted.
2163 * UIProcess/WebPageProxy.h:
2164 * UIProcess/WebPageProxy.messages.in:
2165 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2166 (WebKit::WebsiteDataStore::requestStorageAccess):
2167 (WebKit::WebsiteDataStore::removeStorageAccess): Deleted.
2168 * UIProcess/WebsiteData/WebsiteDataStore.h:
2169 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2170 (WebKit::WebFrameLoaderClient::detachedFromParent2):
2171 (WebKit::WebFrameLoaderClient::dispatchWillChangeDocument):
2173 2018-01-03 David Kilzer <ddkilzer@apple.com>
2175 com.apple.WebKit.Networking crash in com.apple.Foundation: -[__NSOperationInternal _start:]
2176 <https://webkit.org/b/181272>
2177 <rdar://problem/35657310>
2179 Reviewed by Alex Christensen.
2181 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2182 (downgradeRequest): Remove unnecessary -autorelease.
2184 2018-01-03 Brent Fulgham <bfulgham@apple.com>
2186 [macOS] Constant frame dropping during Flash video playback
2187 https://bugs.webkit.org/show_bug.cgi?id=181249
2188 <rdar://problem/34843448>
2190 Reviewed by Eric Carlson.
2192 Review of logs during jerky flash video playback shows a few IOKit properties are being blocked by the sandbox,
2193 which prevents some high-efficiency codecs from being used. Add 'AppleGVAKeyDoesNotExist', 'IODVDBundleName', and
2194 'IOGVA*Encode' to the whitelist.
2196 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2198 2018-01-03 Michael Catanzaro <mcatanzaro@igalia.com>
2200 [GTK] Add web process API to detect when form is submitted via JavaScript
2201 https://bugs.webkit.org/show_bug.cgi?id=173915
2203 Reviewed by Carlos Garcia Campos.
2205 Epiphany relies on the DOM submit event to detect when a form has been submitted. However,
2206 for historical reasons, the submit event is not emitted when a form is submitted by
2207 JavaScript. It is therefore not currently possible for a web browser to reliably detect form
2208 submission and not possible to implement a robust password storage feature. In order to
2209 avoid this problem, this patch adds a new WebKitWebPage signal, will-submit-form, that
2210 browsers can use in preference to a DOM event listener.
2212 Unfortunately, this signal is not available for WPE because it depends on the DOM API.
2214 There are two submission events, WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT and
2215 WEBKIT_FORM_SUBMISSION_WILL_COMPLETE. WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT
2216 occurs earlier than WEBKIT_FORM_SUBMISSION_WILL_COMPLETE and can be used to retrieve form
2217 values before websites receive the DOM submit event. This is useful as some websites like
2218 to delete form values right before a submit would normally happen in order to attempt to
2219 defeat browser password managers. There are two tricks to note: JavaScript can cancel form
2220 submission immediately after this event occurs (by returning false in an onsubmit handler),
2221 and, for historical reasons, this event will not occur at all when form submission is
2222 triggered by JavaScript. WEBKIT_FORM_SUBMISSION_WILL_COMPLETE occurs next, and is more
2223 straightforward: it is always emitted when a form is about to be submitted, when it is too
2226 The recommended way to reliably retrieve password form values would be to watch for both
2227 events, use the form value detected in WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT
2228 if that event is emitted, and use the value detected later in
2229 WEBKIT_FORM_SUBMISSION_WILL_COMPLETE otherwise.
2231 Since one of the signal arguments is an enum, we now have to run glib-mkenums for the web
2232 process API. And that has resulted in this patch also adding GType goo for
2233 WebKitConsoleMessageLevel and WebKitConsoleMessageSource that was previously missing. Any
2234 applications that for some unlikely reason want to use these enums in properties or signals
2237 * PlatformGTK.cmake:
2238 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2239 * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
2240 (webkit_web_page_class_init):
2241 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
2242 * WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.cpp.template: Added.
2243 * WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.h.template: Added.
2245 2018-01-03 Carlos Garcia Campos <cgarcia@igalia.com>
2247 Unreviewed. Really fix plugin process after r226327.
2249 * PluginProcess/unix/PluginProcessMainUnix.cpp:
2251 2018-01-02 Brent Fulgham <bfulgham@apple.com>
2253 [macOS, iOS] Adopt new secure coding APIs in WebKit
2254 https://bugs.webkit.org/show_bug.cgi?id=181085
2255 <rdar://problem/34837397>
2257 Reviewed by Tim Horton.
2259 Update WebKit code to use NSSecureCoding when the underlying operating system supports it. Use new
2260 wrapper functions so the same code can be built on all supported OS releases, while enabling
2261 seure coding when possible.
2263 Note that NSView-based classes cannot be migrated at present due to AppKit not supporting NSSecureCoding
2264 in its class hierarchy.
2266 Tested by exising TestWebKitAPI tests for Coding and data transfer.
2268 * Platform/ios/AccessibilityIOS.mm:
2269 (WebKit::newAccessibilityRemoteToken): Encode using NSSecureCoding.
2270 * UIProcess/API/Cocoa/WKPreferences.h:
2271 * UIProcess/API/Cocoa/WKPreferences.mm:
2272 (+[WKPreferences supportsSecureCoding]): Added to enable NSSecureCoding.
2273 * UIProcess/API/Cocoa/WKProcessPool.h:
2274 * UIProcess/API/Cocoa/WKProcessPool.mm:
2275 (+[WKProcessPool supportsSecureCoding]): Ditto.
2276 * UIProcess/API/Cocoa/WKUserContentController.h:
2277 * UIProcess/API/Cocoa/WKUserContentController.mm:
2278 (+[WKUserContentController supportsSecureCoding]): Ditto.
2279 * UIProcess/API/Cocoa/WKWebView.mm:
2280 (-[WKWebView initWithCoder:]): Use coding initialization that supports secure coding if
2281 it is available in the supplied class.
2282 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2283 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2284 (+[WKWebViewConfiguration supportsSecureCoding]): Added to enable NSSecureCoding.
2285 (-[WKWebViewConfiguration initWithCoder:]): Use secure coding when possible.
2286 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2287 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2288 (+[WKWebsiteDataStore supportsSecureCoding]): Added to enable NSSecureCoding.
2289 * UIProcess/API/Cocoa/_WKApplicationManifest.h:
2290 * UIProcess/API/Cocoa/_WKApplicationManifest.mm:
2291 (+[_WKApplicationManifest supportsSecureCoding]): Added to enable NSSecureCoding.
2292 (-[_WKApplicationManifest initWithCoder:]): Use secure coding when possible.
2294 2017-12-28 Yusuke Suzuki <utatane.tea@gmail.com>
2296 Remove std::chrono completely
2297 https://bugs.webkit.org/show_bug.cgi?id=181186
2299 Reviewed by Alex Christensen.
2301 Use MonotonicTime, WallTime, and Seconds instead.
2302 Changes are mechanical ones.
2304 * NetworkProcess/NetworkProcess.cpp:
2305 (WebKit::NetworkProcess::deleteWebsiteData):
2306 * NetworkProcess/NetworkProcess.h:
2307 * NetworkProcess/NetworkProcess.messages.in:
2308 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2309 (WebKit::CacheStorage::Caches::clear):
2310 * NetworkProcess/cache/NetworkCache.cpp:
2311 (WebKit::NetworkCache::responseHasExpired):
2312 (WebKit::NetworkCache::responseNeedsRevalidation):
2313 (WebKit::NetworkCache::makeStoreDecision):
2314 (WebKit::NetworkCache::Cache::clear):
2315 (WebKit::NetworkCache::Cache::storeData):
2316 * NetworkProcess/cache/NetworkCache.h:
2317 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2318 (WebKit::NetworkCache::Entry::Entry):
2319 (WebKit::NetworkCache::Entry::asJSON const):
2320 * NetworkProcess/cache/NetworkCacheEntry.h:
2321 (WebKit::NetworkCache::Entry::timeStamp const):
2322 * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
2323 (WebKit::NetworkCache::fileTimes):
2324 (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
2325 * NetworkProcess/cache/NetworkCacheFileSystem.h:
2326 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2327 (WebKit::NetworkCache::IOChannel::IOChannel):
2328 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2329 (WebKit::NetworkCache::responseNeedsRevalidation):
2330 (WebKit::NetworkCache::canRevalidate):
2331 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2332 (WebKit::NetworkCache::Storage::readRecord):
2333 (WebKit::NetworkCache::Storage::clear):
2334 (WebKit::NetworkCache::computeRecordWorth):
2335 * NetworkProcess/cache/NetworkCacheStorage.h:
2336 Bump the cache version. We now change the data in persistent cache.
2337 * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
2338 (WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
2339 (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
2340 * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
2341 (WebKit::NetworkCache::SubresourceInfo::lastSeen const):
2342 (WebKit::NetworkCache::SubresourceInfo::firstSeen const):
2343 (WebKit::NetworkCache::SubresourcesEntry::timeStamp const):
2344 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2345 (WebKit::NetworkProcess::clearHSTSCache):
2346 (WebKit::clearNSURLCache):
2347 (WebKit::NetworkProcess::clearDiskCache):
2348 * NetworkProcess/curl/NetworkProcessCurl.cpp:
2349 (WebKit::NetworkProcess::clearDiskCache):
2350 * NetworkProcess/mac/NetworkProcessMac.mm:
2351 (WebKit::NetworkProcess::clearCacheForAllOrigins):
2352 * NetworkProcess/soup/NetworkProcessSoup.cpp:
2353 (WebKit::NetworkProcess::clearCacheForAllOrigins):
2354 (WebKit::NetworkProcess::clearDiskCache):
2355 * Platform/IPC/ArgumentCoders.cpp:
2356 (IPC::ArgumentCoder<WallTime>::encode):
2357 (IPC::ArgumentCoder<WallTime>::decode):
2358 (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode): Deleted.
2359 (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode): Deleted.
2360 * Platform/IPC/ArgumentCoders.h:
2361 * PluginProcess/PluginProcess.cpp:
2362 (WebKit::PluginProcess::deleteWebsiteData):
2363 * PluginProcess/PluginProcess.h:
2364 * PluginProcess/PluginProcess.messages.in:
2365 * Scripts/webkit/messages.py:
2367 * Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
2368 (WebKit::RemoteLayerBackingStore::lastDisplayTime const):
2369 * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
2370 (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
2371 (WebKit::RemoteLayerBackingStore::display):
2372 * Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
2373 * Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
2374 (WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
2375 (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
2376 * Shared/WebCoreArgumentCoders.cpp:
2377 (IPC::ArgumentCoder<RecentSearch>::decode):
2378 (IPC::ArgumentCoder<WallTime>::encode): Deleted.
2379 (IPC::ArgumentCoder<WallTime>::decode): Deleted.
2380 * Shared/WebCoreArgumentCoders.h:
2381 * StorageProcess/StorageProcess.cpp:
2382 (WebKit::StorageProcess::deleteWebsiteData):
2383 * StorageProcess/StorageProcess.h:
2384 * StorageProcess/StorageProcess.messages.in:
2385 * UIProcess/API/C/WKApplicationCacheManager.cpp:
2386 (WKApplicationCacheManagerDeleteAllEntries):
2387 * UIProcess/API/C/WKCookieManager.cpp:
2388 (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
2389 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
2390 (WKKeyValueStorageManagerDeleteAllEntries):
2391 * UIProcess/API/C/WKResourceCacheManager.cpp:
2392 (WKResourceCacheManagerClearCacheForAllOrigins):
2393 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2394 (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
2395 (WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval):
2396 (WKWebsiteDataStoreRemoveAllFetchCaches):
2397 (WKWebsiteDataStoreRemoveAllIndexedDatabases):
2398 (WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
2399 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2400 (toSystemClockTime):
2401 (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]):
2402 * UIProcess/API/glib/WebKitWebContext.cpp:
2403 (webkit_web_context_clear_cache):
2404 * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
2405 (webkit_website_data_manager_clear):
2406 * UIProcess/DrawingAreaProxy.h:
2407 * UIProcess/Network/NetworkProcessProxy.cpp:
2408 (WebKit::NetworkProcessProxy::deleteWebsiteData):
2409 * UIProcess/Network/NetworkProcessProxy.h:
2410 * UIProcess/Plugins/PluginProcessManager.cpp:
2411 (WebKit::PluginProcessManager::deleteWebsiteData):
2412 * UIProcess/Plugins/PluginProcessManager.h:
2413 * UIProcess/Plugins/PluginProcessProxy.cpp:
2414 (WebKit::PluginProcessProxy::deleteWebsiteData):
2415 * UIProcess/Plugins/PluginProcessProxy.h:
2416 * UIProcess/Storage/StorageProcessProxy.cpp:
2417 (WebKit::StorageProcessProxy::deleteWebsiteData):
2418 * UIProcess/Storage/StorageProcessProxy.h:
2419 * UIProcess/WebCookieManagerProxy.cpp:
2420 (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
2421 * UIProcess/WebCookieManagerProxy.h:
2422 * UIProcess/WebProcessProxy.cpp:
2423 (WebKit::WebProcessProxy::deleteWebsiteData):
2424 * UIProcess/WebProcessProxy.h:
2425 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2426 (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
2427 * UIProcess/WebResourceLoadStatisticsStore.h:
2428 * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
2429 (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
2430 * UIProcess/WebStorage/LocalStorageDatabaseTracker.h:
2431 * UIProcess/WebStorage/StorageManager.cpp:
2432 (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
2433 * UIProcess/WebStorage/StorageManager.h:
2434 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2435 (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
2436 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2437 (WebKit::WebsiteDataStore::removeData):
2438 (WebKit::WebsiteDataStore::removeMediaKeys):
2439 * UIProcess/WebsiteData/WebsiteDataStore.h:
2440 * UIProcess/gtk/WebPageProxyGtk.cpp:
2441 (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
2442 * UIProcess/wpe/WebPageProxyWPE.cpp:
2443 (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
2444 * WebProcess/Cookies/WebCookieManager.cpp:
2445 (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
2446 * WebProcess/Cookies/WebCookieManager.h:
2447 * WebProcess/Cookies/WebCookieManager.messages.in:
2448 * WebProcess/Plugins/PluginView.cpp:
2449 (WebKit::lastModifiedDateMS):
2450 * WebProcess/WebProcess.cpp:
2451 (WebKit::WebProcess::deleteWebsiteData):
2452 * WebProcess/WebProcess.h:
2453 * WebProcess/WebProcess.messages.in:
2455 2018-01-02 Wenson Hsieh <wenson_hsieh@apple.com>
2457 [Attachment Support] Introduce data structures and IPC support for writing promised blobs
2458 https://bugs.webkit.org/show_bug.cgi?id=181189
2460 Reviewed by Tim Horton.
2462 Add IPC support for PromisedBlobInfo and PromisedBlobData. See WebCore/ChangeLog for more detail.
2464 * Shared/WebCoreArgumentCoders.cpp:
2465 (IPC::ArgumentCoder<PromisedBlobData>::encode):
2466 (IPC::ArgumentCoder<PromisedBlobData>::decode):
2467 (IPC::ArgumentCoder<PromisedBlobInfo>::encode):
2468 (IPC::ArgumentCoder<PromisedBlobInfo>::decode):
2469 * Shared/WebCoreArgumentCoders.h:
2471 2018-01-02 Michael Catanzaro <mcatanzaro@igalia.com>
2473 REGRESSION(r223253): Broke ResourceLoadStatistics layout tests for non-Cocoa ports
2474 https://bugs.webkit.org/show_bug.cgi?id=181231
2476 Reviewed by Alex Christensen.
2478 Add new C API for use by WebKitTestRunner.
2480 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2481 (WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
2482 (WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
2483 * UIProcess/API/C/WKWebsiteDataStoreRef.h:
2485 2018-01-02 Jiewen Tan <jiewen_tan@apple.com>
2487 Add a WebAuthentication runtime feature flag
2488 https://bugs.webkit.org/show_bug.cgi?id=181220
2489 <rdar://problem/36055305>
2491 Reviewed by Brent Fulgham.
2493 Renames the CredentialManagement runtime feature flag into WebAuthentication.
2495 * Shared/WebPreferences.yaml:
2496 * UIProcess/API/C/WKPreferences.cpp:
2497 (WKPreferencesSetWebAuthenticationEnabled):
2498 (WKPreferencesGetWebAuthenticationEnabled):
2499 (WKPreferencesSetCredentialManagementEnabled): Deleted.
2500 (WKPreferencesGetCredentialManagementEnabled): Deleted.
2501 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2502 * WebProcess/WebPage/WebPage.cpp:
2503 (WebKit::WebPage::updatePreferences):
2505 2018-01-02 Michael Catanzaro <mcatanzaro@igalia.com>
2507 REGRESSION(r226327): [GTK] Plugin process is broken
2508 https://bugs.webkit.org/show_bug.cgi?id=181187
2510 Unreviewed, fix PluginProcessMainUnix after r226327.
2512 * PluginProcess/unix/PluginProcessMainUnix.cpp:
2514 2018-01-02 Tim Horton <timothy_horton@apple.com>
2516 Fix the build on platforms where UICurrentUserInterfaceIdiomIsPad is defined to false
2517 https://bugs.webkit.org/show_bug.cgi?id=181218
2519 Reviewed by Alex Christensen.
2521 * Platform/spi/ios/UIKitSPI.h:
2522 (currentUserInterfaceIdiomIsPad):
2523 * UIProcess/ios/SmartMagnificationController.mm:
2524 (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
2525 * UIProcess/ios/WKContentViewInteraction.mm:
2526 (-[WKFormInputSession setAccessoryViewCustomButtonTitle:]):
2527 (-[WKContentView _requiresKeyboardWhenFirstResponder]):
2528 (-[WKContentView _displayFormNodeInputView]):
2529 (-[WKContentView requiresAccessoryView]):
2530 (-[WKContentView _updateAccessory]):
2531 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2532 (-[WKAirPlayRoutePicker show:fromRect:]):
2533 * UIProcess/ios/forms/WKFileUploadPanel.mm:
2534 (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
2535 (-[WKFileUploadPanel _presentMenuOptionForCurrentInterfaceIdiom:]):
2536 * UIProcess/ios/forms/WKFormInputControl.mm:
2537 (-[WKDateTimePicker initWithView:datePickerMode:]):
2538 (-[WKFormInputControl initWithView:]):
2539 * UIProcess/ios/forms/WKFormSelectControl.mm:
2540 (-[WKFormSelectControl initWithView:]):
2541 On platforms where UICurrentUserInterfaceIdiomIsPad is defined to false,
2542 blocks that conditionally execute based on its value are unreachable.
2543 This causes the compiler to complain. Hide it away inside an inline function
2544 and make use of that everywhere we used to use the macro.
2546 2018-01-02 Alex Christensen <achristensen@webkit.org>
2548 Remove SVN file accidentally added in r226160
2549 https://bugs.webkit.org/show_bug.cgi?id=180934
2551 * UIProcess/WebPageProxy.cpp.orig: Removed.
2553 2018-01-02 Alex Christensen <achristensen@webkit.org>
2555 Use BlockPtrs and lambdas instead of new/delete to pass parameters to blocks in WebViewImpl::performDragOperation
2556 https://bugs.webkit.org/show_bug.cgi?id=180795
2558 Reviewed by Brent Fulgham.
2560 * UIProcess/Cocoa/WebViewImpl.mm:
2561 (WebKit::WebViewImpl::performDragOperation):
2563 2018-01-02 Michael Catanzaro <mcatanzaro@igalia.com>
2565 [WPE][GTK] Implement the assignment of ProcessIdentifiers to child processes
2566 https://bugs.webkit.org/show_bug.cgi?id=181187
2568 Reviewed by Brady Eidson.
2570 * Shared/ChildProcess.cpp: Make the ProcessIdentifier mandatory.
2571 (WebKit::ChildProcess::initialize):
2572 * Shared/unix/ChildProcessMain.cpp: Initialize ChildProcessInitializationParameters with the
2574 (WebKit::ChildProcessMainBase::parseCommandLine):
2575 * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp: Copy the ProcessIdentifier from
2576 LaunchOptions into argv.
2577 (WebKit::ProcessLauncher::launchProcess):
2578 * WebProcess/wpe/WebProcessMainWPE.cpp: Expect the WPE socket ID later in the command line.
2580 2018-01-02 Alex Christensen <achristensen@webkit.org>
2582 Use new WebsiteDataStore passed in through decidePolicyForNavigation SPI
2583 https://bugs.webkit.org/show_bug.cgi?id=180897
2584 <rdar://problem/35535328>
2586 Reviewed by Brent Fulgham.
2588 * Shared/WebsitePoliciesData.cpp:
2589 (WebKit::WebsitePoliciesData::applyToDocumentLoader):
2590 * UIProcess/Cocoa/NavigationState.mm:
2591 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
2592 * UIProcess/WebPageProxy.cpp:
2593 (WebKit::WebPageProxy::changeWebsiteDataStore):
2594 * UIProcess/WebPageProxy.h:
2595 * UIProcess/WebProcessPool.cpp:
2596 (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
2597 (WebKit::WebProcessPool::pageEndUsingWebsiteDataStore):
2598 (WebKit::WebProcessPool::pageAddedToProcess): Deleted.
2599 (WebKit::WebProcessPool::pageRemovedFromProcess): Deleted.
2600 * UIProcess/WebProcessPool.h:
2601 * UIProcess/WebProcessProxy.cpp:
2602 (WebKit::WebProcessProxy::addExistingWebPage):
2603 (WebKit::WebProcessProxy::removeWebPage):
2604 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2605 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
2607 2018-01-02 Alex Christensen <achristensen@webkit.org>
2609 Only use CookieStorageShim when we aren't using NetworkSession
2610 https://bugs.webkit.org/show_bug.cgi?id=180766
2612 Reviewed by Brent Fulgham.
2614 * Shared/mac/CookieStorageShim.h:
2615 * Shared/mac/CookieStorageShim.mm:
2616 * WebProcess/WebProcess.cpp:
2617 (WebKit::WebProcess::initializeWebProcess):
2619 2018-01-02 Alex Christensen <achristensen@webkit.org>
2621 Clean up context menu code
2622 https://bugs.webkit.org/show_bug.cgi?id=181074
2624 Reviewed by Brent Fulgham.
2626 Use Ref instead of RefPtr where possible.
2627 Use move semantics instead of copying from const references when possible.
2628 Remove dead iOS code. Reduce allocations. Add stub for WPE.
2630 * UIProcess/API/APIContextMenuClient.h:
2631 (API::ContextMenuClient::getContextMenuFromProposedMenu):
2632 (API::ContextMenuClient::getContextMenuFromProposedMenuAsync):
2633 (API::ContextMenuClient::showContextMenu):
2634 * UIProcess/API/C/WKPage.cpp:
2635 (WKPageSetPageContextMenuClient):
2636 * UIProcess/API/gtk/PageClientImpl.cpp:
2637 (WebKit::PageClientImpl::createContextMenuProxy):
2638 * UIProcess/API/gtk/PageClientImpl.h:
2639 * UIProcess/PageClient.h:
2640 * UIProcess/WebContextMenuListenerProxy.cpp:
2641 (WebKit::WebContextMenuListenerProxy::useContextMenuItems):
2642 * UIProcess/WebContextMenuProxy.cpp:
2643 (WebKit::WebContextMenuProxy::WebContextMenuProxy):
2644 * UIProcess/WebContextMenuProxy.h:
2645 * UIProcess/WebPageProxy.cpp:
2646 (WebKit::WebPageProxy::showContextMenu):
2647 (WebKit::WebPageProxy::internalShowContextMenu): Deleted.
2648 * UIProcess/WebPageProxy.h:
2649 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2650 (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems):
2651 (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
2652 * UIProcess/gtk/WebContextMenuProxyGtk.h:
2653 (WebKit::WebContextMenuProxyGtk::create):
2654 * UIProcess/ios/PageClientImplIOS.h:
2655 * UIProcess/ios/PageClientImplIOS.mm:
2656 (WebKit::PageClientImpl::createContextMenuProxy): Deleted.
2657 * UIProcess/mac/PageClientImplMac.h:
2658 * UIProcess/mac/PageClientImplMac.mm:
2659 (WebKit::PageClientImpl::createContextMenuProxy):
2660 * UIProcess/mac/WebContextMenuProxyMac.h:
2661 (WebKit::WebContextMenuProxyMac::create):
2662 * UIProcess/mac/WebContextMenuProxyMac.mm:
2663 (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
2664 (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
2665 (WebKit::WebContextMenuProxyMac::showContextMenu):
2667 == Rolled over to ChangeLog-2018-01-01 ==