1 2018-10-26 Chris Dumez <cdumez@apple.com>
3 [PSON] Avoid tearing down the drawing area when suspending a WebPage due to process-swap
4 https://bugs.webkit.org/show_bug.cgi?id=190879
6 Reviewed by Antti Koivisto.
8 Avoid tearing down the drawing area when suspending a WebPage due to process-swap. We really only need to reset
9 the drawing area upon resuming the WebPage. There is no strict need to destroy the drawing area on suspension
10 and this has caused various crashes because code usually assumes we always have a drawing area.
12 This patch also drops various drawing area null checks that were added to address PSON crashes.
14 * UIProcess/SuspendedPageProxy.cpp:
15 (WebKit::SuspendedPageProxy::tearDownDrawingAreaInWebProcess): Deleted.
16 * UIProcess/SuspendedPageProxy.h:
17 * UIProcess/WebPageProxy.cpp:
18 (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
19 (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
20 (WebKit::WebPageProxy::didCompletePageTransition):
21 (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
22 * UIProcess/WebPageProxy.h:
23 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
24 (WebKit::WebChromeClient::invalidateContentsAndRootView):
25 (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
26 (WebKit::WebChromeClient::contentsSizeChanged const):
27 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
28 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
29 * WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:
30 (WebKit::RemoteScrollingCoordinator::scheduleTreeStateCommit):
31 * WebProcess/WebPage/WebPage.cpp:
32 (WebKit::WebPage::reinitializeWebPage):
33 (WebKit::WebPage::exitAcceleratedCompositingMode):
34 (WebKit::WebPage::setIsSuspended):
35 (WebKit::WebPage::tearDownDrawingAreaForSuspend): Deleted.
36 * WebProcess/WebPage/WebPage.h:
37 * WebProcess/WebPage/WebPage.messages.in:
39 2018-10-26 Antti Koivisto <antti@apple.com>
41 Use random() instead of begin() to limit cache sizes
42 https://bugs.webkit.org/show_bug.cgi?id=190957
44 Reviewed by Chris Dumez.
46 * UIProcess/WebProcessPool.cpp:
47 (WebKit::WebProcessPool::didCollectPrewarmInformation):
49 2018-10-26 Chris Dumez <cdumez@apple.com>
51 Modernize / Simplify IPC::Connection::sendOutgoingMessage()
52 https://bugs.webkit.org/show_bug.cgi?id=190931
54 Reviewed by Alex Christensen.
56 * Platform/IPC/mac/ConnectionMac.mm:
57 (IPC::Connection::sendOutgoingMessage):
59 2018-10-26 Jer Noble <jer.noble@apple.com>
61 Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI
62 https://bugs.webkit.org/show_bug.cgi?id=190951
63 <rdar://problem/45213065>
65 Reviewed by Alex Christensen.
67 Add an asyncronous reply request to VideoFullscreenManager.
69 Drive-by fix: messages.py generates "WTFMove(*arg1, *arg2)" instead of "WTFMove(*arg1), WTFMove(*arg2)"
70 in its reply handler generation.
72 * Platform/IPC/MessageSender.h:
73 (IPC::MessageSender::sendWithAsyncReply):
74 * Scripts/webkit/messages.py:
75 * UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
76 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
77 (WebKit::VideoFullscreenModelContext::requestRouteSharingPolicyAndContextUID):
78 * WebProcess/cocoa/VideoFullscreenManager.h:
79 * WebProcess/cocoa/VideoFullscreenManager.messages.in:
80 * WebProcess/cocoa/VideoFullscreenManager.mm:
81 (WebKit::VideoFullscreenManager::requestRouteSharingPolicyAndContextUID):
83 2018-10-25 Michael Catanzaro <mcatanzaro@igalia.com>
85 Unreviewed, another try at fixing the GTK build with sandbox enabled
87 * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
88 (WebKit::memfd_create): Deleted.
90 2018-10-25 Antoine Quint <graouts@apple.com>
92 [Web Animations] Turn Web Animations CSS Integration off by default
93 https://bugs.webkit.org/show_bug.cgi?id=190901
95 Reviewed by Dean Jackson.
97 * Shared/WebPreferences.yaml:
99 2018-10-25 Michael Catanzaro <mcatanzaro@igalia.com>
101 Unreviewed, try to fix GTK build with sandbox enabled
103 * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
105 2018-10-25 Claudio Saavedra <csaavedra@igalia.com>
107 [WPE][GTK] Follow-up fixes to the certificate coders
108 https://bugs.webkit.org/show_bug.cgi?id=190900
110 Reviewed by Michael Catanzaro.
112 Cleanup the GRefPtr mess I created earlier. Also we now bail out
113 if any certificate in the chain has no data instead of returning a
116 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
117 (IPC::ArgumentCoder<CertificateInfo>::encode):
118 (IPC::ArgumentCoder<CertificateInfo>::decode):
120 2018-10-25 Zan Dobersek <zdobersek@igalia.com>
122 [GTK][AC] Resizing the window doesn't always update the visible rect
123 https://bugs.webkit.org/show_bug.cgi?id=189743
125 Reviewed by Michael Catanzaro.
127 Disassociate resizing that can be done on an AcceleratedSurface object
128 between "host resizes" and "client resizes".
130 The former is done from ThreadedCoordinatedLayerTreeHost directly, and
131 is currently used only for GTK on X11, where a new pixmap object is
132 created on each resize, which affects the context ID that is based on
133 that pixmap object's address.
135 The latter is done from the composition thread. It's used for GTK on
136 Wayland and WPE. In both cases, the underlying window object does not
137 change on each resize, but it's necessary to perform the actual resize
138 on the composition thread.
140 So far it hasn't been performed there, which ended up pushing sizes of
141 the WebKit view and the underlying window object out of sync during
142 resizing, leaving parts of window unrendered.
144 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
145 (WebKit::ThreadedCompositor::renderLayerTree):
146 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
147 * WebProcess/WebPage/AcceleratedSurface.cpp:
148 (WebKit::AcceleratedSurface::hostResize):
149 (WebKit::AcceleratedSurface::resize): Deleted.
150 * WebProcess/WebPage/AcceleratedSurface.h:
151 (WebKit::AcceleratedSurface::clientResize):
152 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
153 (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
154 (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
155 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
156 * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp:
157 (WebKit::AcceleratedSurfaceWayland::clientResize):
158 (WebKit::AcceleratedSurfaceWayland::resize): Deleted.
159 * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h:
160 * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
161 (WebKit::AcceleratedSurfaceX11::hostResize):
162 (WebKit::AcceleratedSurfaceX11::resize): Deleted.
163 * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:
164 * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
165 (WebKit::AcceleratedSurfaceWPE::clientResize):
166 (WebKit::AcceleratedSurfaceWPE::resize): Deleted.
167 * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.h:
169 2018-10-24 Alexey Proskuryakov <ap@apple.com>
171 Clean up some obsolete macOS version guards
172 https://bugs.webkit.org/show_bug.cgi?id=190887
174 Reviewed by Dan Bernstein.
176 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
177 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
178 (WebKit::WebProcessPool::platformInitializeWebProcess):
180 2018-10-24 Megan Gardner <megan_gardner@apple.com>
182 Turn on Conic Gradients
183 https://bugs.webkit.org/show_bug.cgi?id=190810
185 Reviewed by Tim Horton.
187 Remove conic gradients from experimental features and turn it on always.
189 * Configurations/FeatureDefines.xcconfig:
190 * Shared/WebPreferences.yaml:
192 2018-10-24 Said Abou-Hallawa <sabouhallawa@apple.com>
194 Cleanup: MIMETypeRegistry functions
195 https://bugs.webkit.org/show_bug.cgi?id=190838
197 Reviewed by Simon Fraser.
199 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
200 (-[WKWebViewContentProviderRegistry initWithConfiguration:]):
202 2018-10-24 Chris Dumez <cdumez@apple.com>
204 REGRESSION (r237257): [iOS] Crashes in com.apple.WebKit: WebKit::RemoteScrollingCoordinator::scheduleTreeStateCommit
205 https://bugs.webkit.org/show_bug.cgi?id=190804
207 Reviewed by Alex Christensen.
209 Fix null-dereference of the drawing area in RemoteScrollingCoordinator::scheduleTreeStateCommit.
210 With process-swap-on-navigation enabled, suspended pages' drawing area gets torn down.
212 * WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:
213 (WebKit::RemoteScrollingCoordinator::scheduleTreeStateCommit):
215 2018-10-24 Claudio Saavedra <csaavedra@igalia.com>
217 [WPE][GTK] Cleanups to the certificate decoder
218 https://bugs.webkit.org/show_bug.cgi?id=190867
220 Reviewed by Žan Doberšek.
222 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
223 (IPC::ArgumentCoder<CertificateInfo>::decode):
225 2018-10-24 Claudio Saavedra <csaavedra@igalia.com>
227 [WPE][GTK] Cleanups to the certificate encoder
228 https://bugs.webkit.org/show_bug.cgi?id=190865
230 Reviewed by Žan Doberšek.
232 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
233 (IPC::ArgumentCoder<CertificateInfo>::encode):
235 2018-10-23 Ryan Haddad <ryanhaddad@apple.com>
237 Unreviewed, rolling out r237261.
239 The layout test for this change crashes under GuardMalloc.
243 "Handle MDNS resolution of candidates through libwebrtc
245 https://bugs.webkit.org/show_bug.cgi?id=190681
246 https://trac.webkit.org/changeset/237261
248 2018-10-23 David Kilzer <ddkilzer@apple.com>
250 Fix false positive leaks when using custom -init methods that don't start with -init
251 <https://webkit.org/b/190818>
252 <rdar://problem/45476042>
254 Reviewed by Dan Bernstein.
256 * UIProcess/Cocoa/WKWebViewContentProvider.h:
257 (-[WKWebViewContentProvider web_initWithFrame:webView:mimeType:]):
258 Add attribute to make this behave like an -init method.
260 2018-10-23 Chris Dumez <cdumez@apple.com>
262 [PSON] Add support for cross-site client-side redirects
263 https://bugs.webkit.org/show_bug.cgi?id=190806
264 <rdar://problem/45047344>
266 Reviewed by Geoffrey Garen.
268 * Shared/LoadParameters.cpp:
269 (WebKit::LoadParameters::encode const):
270 (WebKit::LoadParameters::decode):
271 * Shared/LoadParameters.h:
272 * Shared/NavigationActionData.cpp:
273 (WebKit::NavigationActionData::encode const):
274 (WebKit::NavigationActionData::decode):
275 * Shared/NavigationActionData.h:
276 * Shared/WebBackForwardListItem.cpp:
277 (WebKit::WebBackForwardListItem::setSuspendedPage):
278 * UIProcess/API/APINavigation.h:
279 (API::Navigation::setLockHistory):
280 (API::Navigation::lockHistory const):
281 (API::Navigation::setLockBackForwardList):
282 (API::Navigation::lockBackForwardList const):
283 (API::Navigation::setClientRedirectSourceForHistory):
284 (API::Navigation::clientRedirectSourceForHistory const):
285 * UIProcess/API/APINavigationClient.h:
286 (API::NavigationClient::willPerformClientRedirect):
287 (API::NavigationClient::didPerformClientRedirect):
288 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
289 * UIProcess/Cocoa/NavigationState.h:
290 * UIProcess/Cocoa/NavigationState.mm:
291 (WebKit::NavigationState::setNavigationDelegate):
292 (WebKit::NavigationState::NavigationClient::didPerformClientRedirect):
293 * UIProcess/FrameLoadState.h:
294 (WebKit::FrameLoadState::setURL):
295 * UIProcess/WebPageProxy.cpp:
296 (WebKit::WebPageProxy::loadRequestWithNavigation):
297 (WebKit::WebPageProxy::continueNavigationInNewProcess):
298 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
299 (WebKit::WebPageProxy::didPerformClientRedirect):
300 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
301 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
302 * WebProcess/WebPage/WebPage.cpp:
303 (WebKit::WebPage::loadRequest):
304 (WebKit::WebPage::setCurrentHistoryItemForReattach):
305 * WebProcess/WebPage/WebPage.h:
306 * WebProcess/WebPage/WebPage.messages.in:
308 2018-10-23 Claudio Saavedra <csaavedra@igalia.com>
310 [WPE][GTK] Pass full certificate chain in CertificateInfo coder
311 https://bugs.webkit.org/show_bug.cgi?id=190789
313 Reviewed by Michael Catanzaro.
315 When the network process serializes certificate data to other
316 processes through the argument coders, the certificate chain, if
317 present, is lost. In practice this means that applications using
318 the public API to process certificate info have no details on the
319 certificate chain, other than the very basics included in the
320 certificate. Serialize the entire chain if available in the
323 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
324 (IPC::ArgumentCoder<CertificateInfo>::encode): Encode the
325 certificate chain if present.
326 (IPC::ArgumentCoder<CertificateInfo>::decode): Decode the
327 entire certificate chain and rebuild it.
329 2018-10-22 Keith Rollin <krollin@apple.com>
331 Use Location = "Relative to Build Products" rather than "Relative to Group"
332 https://bugs.webkit.org/show_bug.cgi?id=190781
334 Reviewed by Alexey Proskuryakov.
336 Almost all Derived Files are included in Xcode projects with the
337 Location attribute set to "Relative to Group". While this currently
338 works, the Derived Files can no longer be found when enabling XCBuild
339 (which has stricter requirements). Fix this by setting the Location
340 attribute to "Relative to Build Products".
342 * WebKit.xcodeproj/project.pbxproj:
344 2018-10-22 Tim Horton <timothy_horton@apple.com>
346 Don't waste time under -setupInteraction under -initWithFrame for unparented WKWebViews
347 https://bugs.webkit.org/show_bug.cgi?id=190801
348 <rdar://problem/43674361>
350 Reviewed by Megan Gardner.
352 * UIProcess/ios/WKContentView.mm:
353 (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
354 (-[WKContentView didMoveToWindow]):
355 Defer the first call to WKContentViewInteraction's -setupInteraction
356 until the view is parented. This avoids a few milliseconds of unnecessary
357 work for views that are never parented.
359 * UIProcess/ios/WKContentViewInteraction.h:
360 * UIProcess/ios/WKContentViewInteraction.mm:
361 (-[WKContentView setupInteraction]):
362 (-[WKContentView cleanupInteraction]):
363 Keep track of the current state of WKContentViewInteraction's gestures.
364 Use this to make it OK to call -setupInteraction multiple times.
366 2018-10-22 Chris Dumez <cdumez@apple.com>
368 Deque's contains() and findIf() should be const
369 https://bugs.webkit.org/show_bug.cgi?id=190796
371 Reviewed by Antti Koivisto.
373 Mark method as const now that Deque's implementation allows it to be.
375 * UIProcess/WebProcessPool.cpp:
376 (WebKit::WebProcessPool::hasSuspendedPageProxyFor const):
377 (WebKit::WebProcessPool::hasSuspendedPageProxyFor): Deleted.
378 * UIProcess/WebProcessPool.h:
380 2018-10-19 Brent Fulgham <bfulgham@apple.com>
382 Allow WebContent process to check some file system features
383 https://bugs.webkit.org/show_bug.cgi?id=190768
384 <rdar://problem/45377609>
386 Reviewed by Alexey Proskuryakov.
388 This patch unblocks some IOKit properties that are needed by lower level frameworks to make decisions
389 about how to efficiently use the file system.
391 * WebProcess/com.apple.WebProcess.sb.in:
393 2018-10-19 Stephan Szabo <stephan.szabo@sony.com>
395 [WinCairo] Search terms are not saved for <input type="search">
396 https://bugs.webkit.org/show_bug.cgi?id=188174
398 Reviewed by Fujii Hironori.
400 Add support for saving the search terms for <input
401 type="search"> to a SQLite database, replacing the
402 CF-based implementation for Windows and adding support
403 for non-legacy WebKit.
405 * UIProcess/win/WebPageProxyWin.cpp:
406 (WebKit::WebPageProxy::saveRecentSearches): Use SQLite database
407 implementation in WebCore::SearchPopupMenuDB to save search
409 (WebKit::WebPageProxy::loadRecentSearches): Use SQLite database
410 implementation in WebCore::SearchPopupMenuDB to load search
413 2018-10-19 Alex Christensen <achristensen@webkit.org>
415 WebDataListSuggestionsDropdown should use a WeakPtr
416 https://bugs.webkit.org/show_bug.cgi?id=190763
417 <rdar://problem/45417449>
419 Reviewed by Tim Horton.
421 Nothing suspicious here. It's just good practice to not keep raw pointers that aren't reset when the object they point to are destroyed.
423 * UIProcess/WebDataListSuggestionsDropdown.cpp:
424 (WebKit::WebDataListSuggestionsDropdown::WebDataListSuggestionsDropdown):
425 (WebKit::WebDataListSuggestionsDropdown::close):
426 * UIProcess/WebDataListSuggestionsDropdown.h:
427 (WebKit::WebDataListSuggestionsDropdown::Client::~Client): Deleted.
428 * UIProcess/WebPageProxy.h:
429 * UIProcess/ios/WebDataListSuggestionsDropdownIOS.h:
430 * UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
431 (WebKit::WebDataListSuggestionsDropdownIOS::create):
432 (WebKit::WebDataListSuggestionsDropdownIOS::WebDataListSuggestionsDropdownIOS):
433 (WebKit::WebDataListSuggestionsDropdownIOS::close):
434 (WebKit::WebDataListSuggestionsDropdownIOS::didSelectOption):
435 * UIProcess/mac/WebDataListSuggestionsDropdownMac.h:
436 * UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
437 (WebKit::WebDataListSuggestionsDropdownMac::create):
438 (WebKit::WebDataListSuggestionsDropdownMac::WebDataListSuggestionsDropdownMac):
439 (WebKit::WebDataListSuggestionsDropdownMac::didSelectOption):
440 (WebKit::WebDataListSuggestionsDropdownMac::selectOption):
442 2018-10-19 Wenson Hsieh <wenson_hsieh@apple.com>
444 [iOS] [Datalist] Can't pick datalist suggestions in a stock WKWebView
445 https://bugs.webkit.org/show_bug.cgi?id=190621
446 <rdar://problem/45310649>
448 Reviewed by Tim Horton.
450 Fixes the bug by refactoring datalist suggestion information on iOS; currently, we override text suggestions on
451 _WKFormInputSession. This only works for a few internal clients (including Safari) that set a _WKInputDelegate
452 and also implement either -_webView:willStartInputSession: or -_webView:didStartInputSession:, which is
453 necessary in order to ensure that WebKit creates and maintains a form input session.
455 The two pieces of information that datalist code needs to vend to WKContentView are a list of UITextSuggestions
456 and a custom input view, which are both currently properties of _WKFormInputSession. This patch lifts these out
457 of the input session and makes them properties of WKContentView, which are used in
458 WebDataListSuggestionsDropdownIOS.
460 Test: fast/forms/datalist/datalist-textinput-suggestions-order.html
462 * UIProcess/ios/WKContentViewInteraction.h:
463 * UIProcess/ios/WKContentViewInteraction.mm:
465 Add new properties to WKContentView: an input view for datalist suggestions, and a list of text suggestions.
467 (-[WKFormInputSession setSuggestions:]):
468 (-[WKContentView setupInteraction]):
469 (-[WKContentView cleanupInteraction]):
470 (-[WKContentView _endEditing]):
472 Pull out common logic when resigning first responder or tabbing to the next or previous text field into a new
473 helper. This helper notifies `_inputPeripheral`, `_formInputSession`, and `_dataListTextSuggestionsInputView`
474 when editing has ended; the input peripheral and suggestions input view use this chance to send the value of the
475 form control to the web process.
477 (-[WKContentView resignFirstResponderForWebView]):
478 (-[WKContentView inputView]):
480 If a custom input view is not set but we have an input view for a datalist's text suggestions, use the datalist
483 (-[WKContentView accessoryTab:]):
484 (-[WKContentView _stopAssistingNode]):
486 Clear datalist state on WKContentView.
488 (-[WKContentView dataListTextSuggestionsInputView]):
489 (-[WKContentView dataListTextSuggestions]):
490 (-[WKContentView setDataListTextSuggestionsInputView:]):
491 (-[WKContentView setDataListTextSuggestions:]):
492 (-[WKContentView updateTextSuggestionsForInputDelegate]):
494 Pull out logic for setting suggestions on UIKit's `inputDelegate` (i.e. UIKeyboardImpl). We now first consult
495 internally-vended text suggestions from _WKFormInputSession; if an internal client has not overridden our text
496 suggestions, then we simply use suggestions from the current datalist (if present).
498 * UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
499 (-[WKDataListSuggestionsPicker updateWithInformation:]):
500 (-[WKDataListSuggestionsPicker showSuggestionsDropdown:activationType:]):
501 (-[WKDataListSuggestionsPicker invalidate]):
502 (-[WKDataListSuggestionsPopover updateWithInformation:]):
503 (-[WKDataListSuggestionsPopover showSuggestionsDropdown:activationType:]):
504 (-[WKDataListSuggestionsPopover didSelectOptionAtIndex:]):
506 Change all the places that currently manipulate WKContentView's form input session to directly set text
507 suggestions and the text suggestion input view on the content view instead.
509 2018-10-19 John Wilander <wilander@apple.com>
511 Only cap lifetime of persistent cookies created client-side through document.cookie when resource load statistics is enabled
512 https://bugs.webkit.org/show_bug.cgi?id=190687
513 <rdar://problem/45349024>
515 Reviewed by Alex Christensen.
517 This patch adds the following:
518 - The WebProcessPool now tells the WebsiteDataStore when a network process has
520 - The WebsiteDataStore in turn tells the WebResourceLoadStatisticsStore when
521 a network process has been created.
522 - The WebResourceLoadStatisticsStore makes sure to update the network processes
523 with its cookie policy when it's notified that a network process has been
526 In addition, this patch changes the following:
527 - The ResourceLoadStatisticsMemoryStore no longer keeps track of which domains
528 it has told the network process to block cookies for. The reason is that
529 we cannot assume that there is only one network process so we should
530 always send complete blocking data.
531 - The ResourceLoadStatisticsMemoryStore's functions for communicating cookie
532 blocking state to the network process no longer take and forward the
533 "clear first" parameter. This is because complete data is sent every time
534 and thus the network process' set is always cleared on an update.
535 - Removes WebsiteDataStore::networkProcessDidCrash() and
536 WebResourceLoadStatisticsStore::scheduleCookieBlockingStateReset() since
537 the call site---WebProcessPool::ensureNetworkProcess()---now calls
538 WebsiteDataStore::didCreateNetworkProcess() after a network process
539 crash and the state sync for cookie blocking is triggered.
541 * NetworkProcess/NetworkProcess.cpp:
542 (WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
543 (WebKit::NetworkProcess::setShouldCapLifetimeForClientSideCookies):
544 * NetworkProcess/NetworkProcess.h:
545 * NetworkProcess/NetworkProcess.messages.in:
546 * UIProcess/Network/NetworkProcessProxy.cpp:
547 (WebKit::NetworkProcessProxy::updatePrevalentDomainsToBlockCookiesFor):
548 (WebKit::NetworkProcessProxy::setShouldCapLifetimeForClientSideCookies):
549 (WebKit::NetworkProcessProxy::didSetShouldCapLifetimeForClientSideCookies):
550 * UIProcess/Network/NetworkProcessProxy.h:
551 * UIProcess/Network/NetworkProcessProxy.messages.in:
552 * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
553 (WebKit::ResourceLoadStatisticsMemoryStore::clear):
554 (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
555 (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlockingForDomains):
556 (WebKit::ResourceLoadStatisticsMemoryStore::clearBlockingStateForDomains):
557 (WebKit::ResourceLoadStatisticsMemoryStore::resetCookieBlockingState): Deleted.
558 * UIProcess/ResourceLoadStatisticsMemoryStore.h:
559 * UIProcess/WebProcessPool.cpp:
560 (WebKit::WebProcessPool::ensureNetworkProcess):
561 * UIProcess/WebResourceLoadStatisticsStore.cpp:
562 (WebKit::WebResourceLoadStatisticsStore::didCreateNetworkProcess):
563 (WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdateForDomains):
564 (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
565 (WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
566 (WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingStateReset): Deleted.
567 * UIProcess/WebResourceLoadStatisticsStore.h:
568 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
569 (WebKit::WebsiteDataStore::updatePrevalentDomainsToBlockCookiesFor):
570 (WebKit::WebsiteDataStore::setShouldCapLifetimeForClientSideCookies):
571 (WebKit::WebsiteDataStore::didCreateNetworkProcess):
572 (WebKit::WebsiteDataStore::networkProcessDidCrash): Deleted.
573 * UIProcess/WebsiteData/WebsiteDataStore.h:
575 2018-10-19 Alex Christensen <achristensen@webkit.org>
579 * Scripts/webkit/messages_unittest.py:
581 2018-10-19 Alex Christensen <achristensen@webkit.org>
586 * Scripts/webkit/MessageReceiver-expected.cpp:
587 * Scripts/webkit/Messages-expected.h:
589 2018-10-19 Alex Christensen <achristensen@webkit.org>
591 Mark LegacySync IPC messages
592 https://bugs.webkit.org/show_bug.cgi?id=190759
594 Reviewed by Tim Horton.
596 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
597 * NetworkProcess/NetworkProcess.messages.in:
598 * NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
599 * Platform/IPC/HandleMessage.h:
600 (IPC::handleMessageLegacySync):
601 * PluginProcess/PluginControllerProxy.messages.in:
602 * Scripts/webkit/messages.py:
603 * Shared/Plugins/NPObjectMessageReceiver.messages.in:
604 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
605 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
606 * UIProcess/Plugins/PluginProcessProxy.messages.in:
607 * UIProcess/WebFullScreenManagerProxy.messages.in:
608 * UIProcess/WebPageProxy.messages.in:
609 * UIProcess/WebPasteboardProxy.messages.in:
610 * UIProcess/WebProcessPool.messages.in:
611 * UIProcess/WebProcessProxy.messages.in:
612 * UIProcess/WebStorage/StorageManager.messages.in:
613 * UIProcess/mac/SecItemShimProxy.messages.in:
614 * WebProcess/Plugins/PluginProcessConnection.messages.in:
615 * WebProcess/Plugins/PluginProxy.messages.in:
616 * WebProcess/WebPage/WebPage.messages.in:
617 * WebProcess/WebProcess.messages.in:
619 2018-10-19 Alex Christensen <achristensen@webkit.org>
621 Update and add python tests after r237294
622 https://bugs.webkit.org/show_bug.cgi?id=190746
624 * Scripts/Makefile: Added to help updating expectations.
625 * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
626 * Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
627 (Messages::WebPage::TestAsyncMessage::callReply):
628 (Messages::WebPage::TestAsyncMessage::cancelReply):
629 (Messages::WebPage::TestAsyncMessage::send):
630 (WebKit::WebPage::didReceiveMessage):
631 * Scripts/webkit/MessagesSuperclass-expected.h:
632 (Messages::WebPage::TestAsyncMessage::receiverName):
633 (Messages::WebPage::TestAsyncMessage::name):
634 (Messages::WebPage::TestAsyncMessage::asyncMessageReplyName):
635 (Messages::WebPage::TestAsyncMessage::TestAsyncMessage):
636 (Messages::WebPage::TestAsyncMessage::arguments const):
637 * Scripts/webkit/test-superclass-messages.in:
638 Adding the extra newline made python tests fail.
639 I also added more tests for the new functionality introduced in r237924.
641 2018-10-19 Alex Christensen <achristensen@webkit.org>
643 Introduce CompletionHandler-based Async IPC messages with replies
644 https://bugs.webkit.org/show_bug.cgi?id=190746
646 Reviewed by Tim Horton.
648 Before this patch, to make an asynchronous IPC message with a reply you had to find two objects that
649 can talk to each other, make two new message types, send a generated identifier, keep track of that
650 identifier, make a HashMap somewhere to store the object waiting for the response, and hook it all up.
651 What a mess. No wonder people take shortcuts and make strange design decisions.
653 Now, you can just use a CompletionHandler and mark the reply as Async in *.messages.in.
654 I've adopted this with a message whose behavior is covered by the storage/indexeddb/modern/blob-cursor.html
655 layout test and many others. I intent to refine and further adopt this incrementally.
657 * NetworkProcess/NetworkProcess.cpp:
658 (WebKit::NetworkProcess::getSandboxExtensionsForBlobFiles):
659 (WebKit::NetworkProcess::didGetSandboxExtensionsForBlobFiles): Deleted.
660 * NetworkProcess/NetworkProcess.h:
661 * NetworkProcess/NetworkProcess.messages.in:
662 This is representative of how code will be simplified with greater adoption.
663 * NetworkProcess/NetworkResourceLoadParameters.cpp:
664 (WebKit::NetworkResourceLoadParameters::decode):
665 Modernize HandleArray decoding.
666 * Platform/IPC/Connection.cpp:
667 (IPC::Connection::dispatchMessage):
668 (IPC::nextAsyncReplyHandlerID):
669 (IPC::asyncReplyHandlerMap):
670 Handle async replies when looking at incoming messages from the sending process.
671 * Platform/IPC/Connection.h:
672 (IPC::Connection::sendWithAsyncReply):
673 Send a message with an async reply and prepare the reply receiver.
674 * Platform/IPC/Encoder.h:
675 Make the uint64_t encoder public so we can use it when encoding the listenerID.
676 * Platform/IPC/HandleMessage.h:
677 (IPC::handleMessageAsync):
678 Handle an asynchronous message with a reply from the receiving process.
679 This is similar to how DelayedReply messages are handled, but the listenerID is automatically captured and sent back.
680 * Scripts/webkit/messages.py:
681 Generate code for async message replies.
682 * Shared/Databases/IndexedDB/WebIDBResult.cpp:
683 (WebKit::WebIDBResult::decode):
684 * Shared/SandboxExtension.h:
685 (WebKit::SandboxExtension::HandleArray::at):
686 (WebKit::SandboxExtension::HandleArray::decode):
687 * Shared/WebProcessCreationParameters.cpp:
688 (WebKit::WebProcessCreationParameters::decode):
689 * Shared/mac/SandboxExtensionMac.mm:
690 (WebKit::SandboxExtension::HandleArray::decode):
691 Modernize the decoding of HandleArray to work with generated decoding.
692 * UIProcess/Network/NetworkProcessProxy.cpp:
693 (WebKit::NetworkProcessProxy::getSandboxExtensionsForBlobFiles):
694 * UIProcess/Network/NetworkProcessProxy.h:
695 * UIProcess/Network/NetworkProcessProxy.messages.in:
696 This is also representative of how code will be simplified with greater adoption.
697 * WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp:
698 (WebKit::MediaDeviceSandboxExtensions::decode):
699 Modernize HandleArray decoding.
701 2018-10-19 Chris Dumez <cdumez@apple.com>
703 [PSON] WebPageProxy::didCompletePageTransition() may interact with a SuspendedPageProxy from a previous navigation
704 https://bugs.webkit.org/show_bug.cgi?id=190717
706 Reviewed by Antti Koivisto.
708 WebPageProxy::didCompletePageTransition() may interact with a SuspendedPageProxy from a previous navigation. We need
709 to reset m_lastSuspendedPage whenever the page starts a new navigation as m_lastSuspendedPage is only updated when
710 we process-swap otherwise.
712 Also rename the data member to m_pageSuspendedDueToCurrentNavigation for clarity.
714 In a follow-up, I will see if I can get rid of this data member entirely or maybe move it to the Navigation
717 * UIProcess/WebPageProxy.cpp:
718 (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
719 (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
720 (WebKit::WebPageProxy::didCompletePageTransition):
721 (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
723 2018-10-18 Eric Carlson <eric.carlson@apple.com>
725 [MediaStream] Allow ports to optionally do screen capture in the UI process
726 https://bugs.webkit.org/show_bug.cgi?id=190728
727 <rdar://problem/45376824>
729 Reviewed by Jer Noble and Tim Horton.
731 * Shared/WebProcessCreationParameters.cpp:
732 (WebKit::WebProcessCreationParameters::encode const): Encode shouldCaptureDisplayInUIProcess.
733 (WebKit::WebProcessCreationParameters::decode): Decode shouldCaptureDisplayInUIProcess.
734 * Shared/WebProcessCreationParameters.h:
736 * UIProcess/API/APIProcessPoolConfiguration.cpp:
737 (API::ProcessPoolConfiguration::copy): Copy shouldCaptureDisplayInUIProcess.
738 * UIProcess/API/APIProcessPoolConfiguration.h:
740 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
741 (WebKit::UserMediaCaptureManagerProxy::SourceProxy::remoteVideoSampleAvailable):
742 (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): Remove
743 RealtimeMediaSource::Type parameter, CaptureDevice has the same information. Deal with display
745 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
746 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
748 * UIProcess/WebProcessPool.cpp:
749 (WebKit::WebProcessPool::initializeNewWebProcess): Copy shouldCaptureDisplayInUIProcess.
751 * WebProcess/cocoa/UserMediaCaptureManager.cpp:
752 (WebKit::UserMediaCaptureManager::Source::Source): Only allocate a ring buffer for Audio sources.
753 (WebKit::UserMediaCaptureManager::Source::~Source): Same for deallocate.
754 (WebKit::UserMediaCaptureManager::Source::storage): m_ringBuffer is a pointer.
755 (WebKit::UserMediaCaptureManager::Source::setStorage): Ditto.
756 (WebKit::UserMediaCaptureManager::Source::setRingBufferFrameBounds): Ditto.
757 (WebKit::UserMediaCaptureManager::Source::audioSamplesAvailable): Ditto.
758 (WebKit::UserMediaCaptureManager::Source::remoteVideoSampleAvailable): Create a
759 PixelBuffer-backed media sample and call videoSampleAvailable.
760 (WebKit::UserMediaCaptureManager::~UserMediaCaptureManager): Clear the audio and display capture
762 (WebKit::UserMediaCaptureManager::initialize): Set the audio and display capture factory overrides.
763 (WebKit::UserMediaCaptureManager::createCaptureSource):
764 (WebKit::UserMediaCaptureManager::remoteVideoSampleAvailable):
765 * WebProcess/cocoa/UserMediaCaptureManager.h:
766 * WebProcess/cocoa/UserMediaCaptureManager.messages.in:
768 2018-10-18 Truitt Savell <tsavell@apple.com>
770 Unreviewed, rolling out r237272.
772 Broke on device iOS builds and Windows builds
776 "[MediaStream] Allow ports to optionally do screen capture in
778 https://bugs.webkit.org/show_bug.cgi?id=190728
779 https://trac.webkit.org/changeset/237272
781 2018-10-18 Jer Noble <jer.noble@apple.com>
783 Enable WKPreferences._lowPowerVideoAudioBufferSizeEnabled by default
784 https://bugs.webkit.org/show_bug.cgi?id=190315
786 Reviewed by Eric Carlson.
788 This preference is disabled for WebKitLegacy because it can interact poorly with clients' own use of audio.
789 It can be enabled for WebKit since it will only affect the WebProcess and not the client process.
791 * Shared/WebPreferences.yaml:
793 2018-10-18 Eric Carlson <eric.carlson@apple.com>
795 [MediaStream] Allow ports to optionally do screen capture in the UI process
796 https://bugs.webkit.org/show_bug.cgi?id=190728
797 <rdar://problem/45376824>
799 Reviewed by Jer Noble and Tim Horton.
801 * Shared/WebProcessCreationParameters.cpp:
802 (WebKit::WebProcessCreationParameters::encode const): Encode shouldCaptureDisplayInUIProcess.
803 (WebKit::WebProcessCreationParameters::decode): Decode shouldCaptureDisplayInUIProcess.
804 * Shared/WebProcessCreationParameters.h:
806 * UIProcess/API/APIProcessPoolConfiguration.cpp:
807 (API::ProcessPoolConfiguration::copy): Copy shouldCaptureDisplayInUIProcess.
808 * UIProcess/API/APIProcessPoolConfiguration.h:
810 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
811 (WebKit::UserMediaCaptureManagerProxy::SourceProxy::remoteVideoSampleAvailable):
812 (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): Remove
813 RealtimeMediaSource::Type parameter, CaptureDevice has the same information. Deal with display
815 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
816 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
818 * UIProcess/WebProcessPool.cpp:
819 (WebKit::WebProcessPool::initializeNewWebProcess): Copy shouldCaptureDisplayInUIProcess.
821 * WebProcess/cocoa/UserMediaCaptureManager.cpp:
822 (WebKit::UserMediaCaptureManager::Source::Source): Only allocate a ring buffer for Audio sources.
823 (WebKit::UserMediaCaptureManager::Source::~Source): Same for deallocate.
824 (WebKit::UserMediaCaptureManager::Source::storage): m_ringBuffer is a pointer.
825 (WebKit::UserMediaCaptureManager::Source::setStorage): Ditto.
826 (WebKit::UserMediaCaptureManager::Source::setRingBufferFrameBounds): Ditto.
827 (WebKit::UserMediaCaptureManager::Source::audioSamplesAvailable): Ditto.
828 (WebKit::UserMediaCaptureManager::Source::remoteVideoSampleAvailable): Create a
829 PixelBuffer-backed media sample and call videoSampleAvailable.
830 (WebKit::UserMediaCaptureManager::~UserMediaCaptureManager): Clear the audio and display capture
832 (WebKit::UserMediaCaptureManager::initialize): Set the audio and display capture factory overrides.
833 (WebKit::UserMediaCaptureManager::createCaptureSource):
834 (WebKit::UserMediaCaptureManager::remoteVideoSampleAvailable):
835 * WebProcess/cocoa/UserMediaCaptureManager.h:
836 * WebProcess/cocoa/UserMediaCaptureManager.messages.in:
838 2018-10-18 Chris Dumez <cdumez@apple.com>
840 [PSON] SuspendedPages do not report meaningful domains in Activity Monitor
841 https://bugs.webkit.org/show_bug.cgi?id=190721
842 <rdar://problem/45059699>
844 Reviewed by Alex Christensen.
846 SuspendedPages do not report meaningful domains in Activity Monitor, which makes
849 * WebProcess/cocoa/WebProcessCocoa.mm:
851 (WebKit::WebProcess::updateActivePages):
853 2018-10-18 Alexey Proskuryakov <ap@apple.com>
855 Switch from PLATFORM(IOS) to PLATFORM(IOS_FAMILY)
856 https://bugs.webkit.org/show_bug.cgi?id=190729
858 Reviewed by Tim Horton.
860 * DerivedSources.make:
861 * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
862 (WebKit::Download::resume):
863 * NetworkProcess/NetworkActivityTracker.h:
864 * NetworkProcess/NetworkProcess.h:
865 * NetworkProcess/NetworkProcessCreationParameters.cpp:
866 (WebKit::NetworkProcessCreationParameters::encode const):
867 (WebKit::NetworkProcessCreationParameters::decode):
868 * NetworkProcess/NetworkProcessCreationParameters.h:
869 * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
870 (WebKit::NetworkCache::isSafeToUseMemoryMapForPath):
871 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
872 (WebKit::updateTaskWithFirstPartyForSameSiteCookies):
873 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
874 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
875 (WebKit::NetworkProcess::sourceApplicationAuditData const):
876 (WebKit::NetworkProcess::platformSyncAllCookies):
877 * NetworkProcess/cocoa/NetworkSessionCocoa.h:
878 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
879 (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
880 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
881 * NetworkProcess/ios/NetworkProcessIOS.mm:
882 * Platform/IPC/mac/ConnectionMac.mm:
883 (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
884 (IPC::Connection::receiveSourceEventHandler):
885 (IPC::AccessibilityProcessSuspendedNotification):
886 * Platform/ios/AccessibilityIOS.mm:
887 * Platform/mac/LayerHostingContext.mm:
888 (WebKit::LayerHostingContext::createForExternalHostingProcess):
889 * Platform/spi/Cocoa/DeviceIdentitySPI.h:
890 * Platform/spi/ios/CelestialSPI.h:
891 * Platform/spi/ios/FrontBoardServicesSPI.h:
892 * PluginProcess/mac/PluginProcessShim.mm:
893 * Shared/API/Cocoa/WKDataDetectorTypesInternal.h:
894 * Shared/API/Cocoa/WebKit.m:
895 * Shared/AssistedNodeInformation.cpp:
896 * Shared/AssistedNodeInformation.h:
897 * Shared/CacheModel.cpp:
898 (WebKit::calculateURLCacheSizes):
899 * Shared/ChildProcess.cpp:
900 * Shared/Cocoa/APIObject.mm:
901 (API::Object::newObject):
902 * Shared/Cocoa/WebKit2InitializeCocoa.mm:
903 (WebKit::runInitializationCode):
904 * Shared/DrawingAreaInfo.h:
905 * Shared/EditorState.cpp:
906 (WebKit::EditorState::encode const):
907 (WebKit::EditorState::decode):
908 (WebKit::EditorState::PostLayoutData::encode const):
909 (WebKit::EditorState::PostLayoutData::decode):
910 (WebKit::operator<<):
911 * Shared/EditorState.h:
912 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
913 (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
914 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
915 (WebKit::XPCServiceMain):
916 * Shared/NativeWebKeyboardEvent.h:
917 * Shared/NativeWebMouseEvent.h:
918 * Shared/NativeWebTouchEvent.h:
919 * Shared/PrintInfo.cpp:
920 (WebKit::PrintInfo::encode const):
921 (WebKit::PrintInfo::decode):
922 * Shared/PrintInfo.h:
923 * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h:
924 * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
925 (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
926 * Shared/SessionState.cpp:
927 (WebKit::FrameState::encode const):
928 (WebKit::FrameState::decode):
929 * Shared/SessionState.h:
930 * Shared/WebCoreArgumentCoders.cpp:
931 * Shared/WebCoreArgumentCoders.h:
933 * Shared/WebEventConversion.cpp:
934 (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
935 * Shared/WebKeyboardEvent.cpp:
936 * Shared/WebPageCreationParameters.cpp:
937 (WebKit::WebPageCreationParameters::encode const):
938 (WebKit::WebPageCreationParameters::decode):
939 * Shared/WebPageCreationParameters.h:
940 * Shared/WebPlatformTouchPoint.cpp:
941 * Shared/WebPreferences.yaml:
942 * Shared/WebPreferencesDefaultValues.cpp:
943 (defaultPassiveTouchListenersAsDefaultOnDocument):
944 (defaultCustomPasteboardDataEnabled):
945 * Shared/WebPreferencesDefaultValues.h:
946 * Shared/WebProcessCreationParameters.cpp:
947 (WebKit::WebProcessCreationParameters::encode const):
948 (WebKit::WebProcessCreationParameters::decode):
949 * Shared/WebProcessCreationParameters.h:
950 * Shared/WebTouchEvent.cpp:
951 * Shared/cf/ArgumentCodersCF.cpp:
954 * Shared/cf/ArgumentCodersCF.h:
955 * Shared/ios/ChildProcessIOS.mm:
956 * Shared/ios/InteractionInformationAtPosition.h:
957 * Shared/ios/InteractionInformationAtPosition.mm:
958 * Shared/ios/InteractionInformationRequest.cpp:
959 * Shared/ios/InteractionInformationRequest.h:
960 * Shared/ios/NativeWebKeyboardEventIOS.mm:
961 * Shared/ios/NativeWebMouseEventIOS.mm:
962 * Shared/ios/NativeWebTouchEventIOS.mm:
963 * Shared/ios/WebIOSEventFactory.h:
964 * Shared/ios/WebIOSEventFactory.mm:
965 * Shared/ios/WebIconUtilities.h:
966 * Shared/ios/WebIconUtilities.mm:
967 * Shared/mac/ArgumentCodersMac.h:
968 * Shared/mac/ArgumentCodersMac.mm:
969 * Shared/mac/SandboxExtensionMac.mm:
970 * Shared/mac/SecItemShim.cpp:
971 (WebKit::initializeSecItemShim):
972 * UIProcess/API/APIPageConfiguration.cpp:
973 (API::PageConfiguration::copy const):
974 * UIProcess/API/APIPageConfiguration.h:
975 * UIProcess/API/APIProcessPoolConfiguration.cpp:
976 (API::ProcessPoolConfiguration::copy):
977 * UIProcess/API/APIProcessPoolConfiguration.h:
978 * UIProcess/API/APIUIClient.h:
979 * UIProcess/API/C/WKInspector.cpp:
980 * UIProcess/API/C/WKPage.cpp:
981 (WKPageSetIgnoresViewportScaleLimits):
982 * UIProcess/API/C/mac/WKContextPrivateMac.mm:
983 (WKContextIsPlugInUpdateAvailable):
984 * UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
985 * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
986 (API::WebsiteDataStore::defaultApplicationCacheDirectory):
987 (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory):
988 (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory):
989 * UIProcess/API/Cocoa/WKNavigationAction.mm:
990 (-[WKNavigationAction description]):
991 * UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.mm:
992 * UIProcess/API/Cocoa/WKPreviewElementInfo.mm:
993 * UIProcess/API/Cocoa/WKProcessGroup.mm:
994 (IGNORE_WARNINGS_BEGIN):
995 * UIProcess/API/Cocoa/WKProcessPool.mm:
996 (-[WKProcessPool _pluginProcessCount]):
997 * UIProcess/API/Cocoa/WKWebView.mm:
998 (shouldRequireUserGestureToLoadVideo):
1000 (-[WKWebView _initializeWithConfiguration:]):
1001 (-[WKWebView _setUpSQLiteDatabaseTrackerClient]):
1002 (-[WKWebView dealloc]):
1003 (-[WKWebView allowsLinkPreview]):
1004 (-[WKWebView setAllowsLinkPreview:]):
1005 (-[WKWebView _countStringMatches:options:maxCount:]):
1006 (-[WKWebView _findString:options:maxCount:]):
1007 (-[WKWebView _hideFindUI]):
1008 (-[WKWebView _scrollPerformanceData]):
1009 (-[WKWebView _allowsMediaDocumentInlinePlayback]):
1010 (-[WKWebView _setAllowsMediaDocumentInlinePlayback:]):
1011 (-[WKWebView _contentsOfUserInterfaceItem:]):
1012 (-[WKWebView _internalDoAfterNextPresentationUpdate:withoutWaitingForPainting:withoutWaitingForAnimatedResize:]):
1013 (-[WKWebView _doAfterNextVisibleContentRectUpdate:]):
1014 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1015 (-[WKWebViewConfiguration init]):
1016 (-[WKWebViewConfiguration encodeWithCoder:]):
1017 (-[WKWebViewConfiguration initWithCoder:]):
1018 (-[WKWebViewConfiguration copyWithZone:]):
1019 (defaultApplicationNameForUserAgent):
1020 * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
1021 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1022 * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
1023 (-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:userInfo:]):
1024 * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
1025 * UIProcess/API/Cocoa/_WKAttachment.mm:
1026 * UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm:
1027 * UIProcess/API/Cocoa/_WKElementAction.mm:
1028 * UIProcess/API/Cocoa/_WKElementActionInternal.h:
1029 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
1030 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
1031 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1032 (-[WKPaymentAuthorizationViewControllerDelegate invalidate]):
1033 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:handler:]):
1034 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectPaymentMethod:handler:]):
1035 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:handler:]):
1036 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:handler:]):
1037 (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
1038 (WebKit::toPKPaymentRequest):
1039 (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentSession):
1040 (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection):
1041 (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
1042 (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):
1043 * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
1044 * UIProcess/ApplicationStateTracker.h:
1045 * UIProcess/ApplicationStateTracker.mm:
1046 * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
1047 * UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
1048 * UIProcess/BackgroundProcessResponsivenessTimer.cpp:
1049 (WebKit::BackgroundProcessResponsivenessTimer::shouldBeActive const):
1050 * UIProcess/ChildProcessProxy.cpp:
1051 (WebKit::ChildProcessProxy::shutDownProcess):
1052 * UIProcess/Cocoa/DownloadClient.h:
1053 * UIProcess/Cocoa/DownloadClient.mm:
1054 (WebKit::DownloadClient::takeActivityToken):
1055 (WebKit::DownloadClient::releaseActivityTokenIfNecessary):
1056 * UIProcess/Cocoa/LayerRepresentation.h:
1057 * UIProcess/Cocoa/NavigationState.h:
1058 * UIProcess/Cocoa/NavigationState.mm:
1059 (WebKit::NavigationState::NavigationState):
1060 (WebKit::NavigationState::didChangeIsLoading):
1061 * UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
1062 * UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in:
1063 * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
1064 * UIProcess/Cocoa/UIDelegate.h:
1065 * UIProcess/Cocoa/UIDelegate.mm:
1066 (WebKit::UIDelegate::setDelegate):
1067 (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
1068 * UIProcess/Cocoa/VersionChecks.h:
1069 * UIProcess/Cocoa/VersionChecks.mm:
1070 (WebKit::linkedOnOrAfter):
1071 * UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
1072 * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
1073 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
1074 (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
1075 (WebKit::VideoFullscreenManagerProxy::exitFullscreen):
1076 (WebKit::VideoFullscreenManagerProxy::preparedToReturnToInline):
1077 (WebKit::VideoFullscreenManagerProxy::setVideoLayerFrame):
1078 * UIProcess/Cocoa/ViewGestureController.h:
1079 * UIProcess/Cocoa/WKShareSheet.mm:
1080 (-[WKShareSheet presentWithParameters:completionHandler:]):
1081 * UIProcess/Cocoa/WKWebViewContentProvider.h:
1082 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.h:
1083 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
1084 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1085 * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
1086 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1087 (WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
1088 (WebKit::WebProcessPool::platformInitializeWebProcess):
1089 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1090 (WebKit::WebProcessPool::registerNotificationObservers):
1091 (WebKit::WebProcessPool::unregisterNotificationObservers):
1092 * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm:
1093 (WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider):
1094 * UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm:
1095 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1096 (WebKit::shouldLeakBoost):
1097 (WebKit::systemDirectoryPath):
1098 (WebKit::ProcessLauncher::launchProcess):
1099 * UIProcess/Network/NetworkProcessProxy.cpp:
1100 (WebKit::NetworkProcessProxy::didFinishLaunching):
1101 * UIProcess/PageClient.h:
1102 * UIProcess/ProcessAssertion.cpp:
1103 * UIProcess/ProcessAssertion.h:
1104 * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
1105 * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
1106 (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
1107 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1108 (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation const):
1109 (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
1110 (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
1111 (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
1112 * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
1113 (WebKit::RemoteLayerTreeHost::clearLayers):
1114 (WebKit::RemoteLayerTreeHost::detachRootLayer):
1115 * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
1116 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
1117 * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
1118 * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
1119 (WebKit::RemoteScrollingTree::createScrollingTreeNode):
1120 * UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
1121 * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
1122 * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1123 * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1124 * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1125 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
1126 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
1127 * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
1128 * UIProcess/WKImagePreviewViewController.h:
1129 * UIProcess/WKImagePreviewViewController.mm:
1130 * UIProcess/WKInspectorHighlightView.h:
1131 * UIProcess/WKInspectorHighlightView.mm:
1132 * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
1133 (WebKit::LocalAuthenticatorInternal::buildAuthData):
1134 (WebKit::LocalAuthenticator::makeCredential):
1135 (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserConsented):
1136 (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):
1137 (WebKit::LocalAuthenticator::getAssertion):
1138 (WebKit::LocalAuthenticator::continueGetAssertionAfterUserConsented):
1139 * UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
1140 (WebKit::LocalConnection::getUserConsent const):
1141 (WebKit::LocalConnection::getAttestation const):
1142 * UIProcess/WebAuthentication/Cocoa/LocalService.mm:
1143 (WebKit::LocalService::isAvailable):
1144 * UIProcess/WebFullScreenManagerProxy.cpp:
1145 (WebKit::WebFullScreenManagerProxy::supportsFullScreen):
1146 * UIProcess/WebGeolocationManagerProxy.cpp:
1147 * UIProcess/WebGeolocationManagerProxy.h:
1148 * UIProcess/WebInspectorProxy.cpp:
1149 * UIProcess/WebOpenPanelResultListenerProxy.cpp:
1150 * UIProcess/WebOpenPanelResultListenerProxy.h:
1151 * UIProcess/WebPageProxy.cpp:
1152 (WebKit::m_resetRecentCrashCountTimer):
1153 (WebKit::WebPageProxy::finishAttachingToWebProcess):
1154 (WebKit::WebPageProxy::initializeWebPage):
1155 (WebKit::WebPageProxy::close):
1156 (WebKit::WebPageProxy::viewDidLeaveWindow):
1157 (WebKit::WebPageProxy::updateThrottleState):
1158 (WebKit::WebPageProxy::waitForDidUpdateActivityState):
1159 (WebKit::WebPageProxy::didCommitLoadForFrame):
1160 (WebKit::WebPageProxy::exitFullscreenImmediately):
1161 (WebKit::WebPageProxy::runJavaScriptAlert):
1162 (WebKit::WebPageProxy::runJavaScriptConfirm):
1163 (WebKit::WebPageProxy::runJavaScriptPrompt):
1164 (WebKit::WebPageProxy::pageDidScroll):
1165 (WebKit::WebPageProxy::processDidTerminate):
1166 (WebKit::WebPageProxy::resetState):
1167 (WebKit::WebPageProxy::resetStateAfterProcessExited):
1168 (WebKit::WebPageProxy::creationParameters):
1169 (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
1170 (WebKit::WebPageProxy::hasActiveVideoForControlsManager const):
1171 (WebKit::WebPageProxy::requestControlledElementID const):
1172 (WebKit::WebPageProxy::isPlayingVideoInEnhancedFullscreen const):
1173 * UIProcess/WebPageProxy.h:
1174 * UIProcess/WebPageProxy.messages.in:
1175 * UIProcess/WebPasteboardProxy.h:
1176 * UIProcess/WebPasteboardProxy.messages.in:
1177 * UIProcess/WebProcessPool.cpp:
1178 (WebKit::WebProcessPool::ensureNetworkProcess):
1179 (WebKit::WebProcessPool::initializeNewWebProcess):
1180 (WebKit::WebProcessPool::updateProcessAssertions):
1181 (WebKit::WebProcessPool::reinstateNetworkProcessAssertionState):
1182 * UIProcess/WebProcessPool.h:
1183 * UIProcess/WebProcessProxy.cpp:
1184 (WebKit::isMainThreadOrCheckDisabled):
1185 (WebKit::WebProcessProxy::didFinishLaunching):
1186 (WebKit::WebProcessProxy::didSetAssertionState):
1187 * UIProcess/WebProcessProxy.h:
1188 * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
1189 (WebKit::LocalStorageDatabaseTracker::databasePath const):
1190 * UIProcess/WebStorage/LocalStorageDatabaseTracker.h:
1191 * UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm:
1192 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
1193 * UIProcess/_WKWebViewPrintFormatter.mm:
1194 * UIProcess/_WKWebViewPrintFormatterInternal.h:
1195 * UIProcess/ios/DragDropInteractionState.h:
1196 * UIProcess/ios/DragDropInteractionState.mm:
1197 * UIProcess/ios/InputViewUpdateDeferrer.h:
1198 * UIProcess/ios/InputViewUpdateDeferrer.mm:
1199 * UIProcess/ios/LayerRepresentation.mm:
1200 * UIProcess/ios/PageClientImplIOS.h:
1201 * UIProcess/ios/PageClientImplIOS.mm:
1202 * UIProcess/ios/ProcessAssertionIOS.mm:
1203 * UIProcess/ios/ResourceLoadStatisticsPersistentStorageIOS.mm:
1204 * UIProcess/ios/SmartMagnificationController.h:
1205 * UIProcess/ios/SmartMagnificationController.messages.in:
1206 * UIProcess/ios/SmartMagnificationController.mm:
1207 * UIProcess/ios/TextCheckerIOS.mm:
1208 * UIProcess/ios/ViewGestureControllerIOS.mm:
1209 * UIProcess/ios/WKActionSheet.h:
1210 * UIProcess/ios/WKActionSheet.mm:
1211 * UIProcess/ios/WKActionSheetAssistant.h:
1212 * UIProcess/ios/WKActionSheetAssistant.mm:
1213 * UIProcess/ios/WKApplicationStateTrackingView.h:
1214 * UIProcess/ios/WKApplicationStateTrackingView.mm:
1215 * UIProcess/ios/WKContentView.mm:
1216 * UIProcess/ios/WKContentViewInteraction.h:
1217 * UIProcess/ios/WKContentViewInteraction.mm:
1218 * UIProcess/ios/WKGeolocationProviderIOS.h:
1219 * UIProcess/ios/WKGeolocationProviderIOS.mm:
1220 * UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm:
1221 * UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.h:
1222 * UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.mm:
1223 * UIProcess/ios/WKKeyboardScrollingAnimator.h:
1224 * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
1225 * UIProcess/ios/WKPDFPageNumberIndicator.h:
1226 * UIProcess/ios/WKPDFPageNumberIndicator.mm:
1227 * UIProcess/ios/WKPasswordView.h:
1228 * UIProcess/ios/WKPasswordView.mm:
1229 * UIProcess/ios/WKScrollView.h:
1230 * UIProcess/ios/WKScrollView.mm:
1231 * UIProcess/ios/WKSyntheticClickTapGestureRecognizer.h:
1232 * UIProcess/ios/WKSyntheticClickTapGestureRecognizer.m:
1233 * UIProcess/ios/WKWebEvent.h:
1234 * UIProcess/ios/WKWebEvent.mm:
1235 * UIProcess/ios/WebDataListSuggestionsDropdownIOS.h:
1236 * UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
1237 * UIProcess/ios/WebPageProxyIOS.mm:
1238 * UIProcess/ios/WebProcessProxyIOS.mm:
1239 * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
1240 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1241 * UIProcess/ios/forms/WKFileUploadPanel.h:
1242 * UIProcess/ios/forms/WKFileUploadPanel.mm:
1243 * UIProcess/ios/forms/WKFormColorControl.h:
1244 * UIProcess/ios/forms/WKFormColorControl.mm:
1245 * UIProcess/ios/forms/WKFormColorPicker.h:
1246 * UIProcess/ios/forms/WKFormColorPicker.mm:
1247 * UIProcess/ios/forms/WKFormInputControl.h:
1248 * UIProcess/ios/forms/WKFormInputControl.mm:
1249 * UIProcess/ios/forms/WKFormPopover.h:
1250 * UIProcess/ios/forms/WKFormPopover.mm:
1251 * UIProcess/ios/forms/WKFormSelectControl.h:
1252 * UIProcess/ios/forms/WKFormSelectControl.mm:
1253 * UIProcess/ios/forms/WKFormSelectPicker.h:
1254 * UIProcess/ios/forms/WKFormSelectPicker.mm:
1255 * UIProcess/ios/forms/WKFormSelectPopover.h:
1256 * UIProcess/ios/forms/WKFormSelectPopover.mm:
1257 * UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.cpp:
1258 * UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.h:
1259 * UIProcess/ios/fullscreen/WKFullScreenViewController.h:
1260 * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
1261 * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h:
1262 * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
1263 * UIProcess/ios/fullscreen/WKFullscreenStackView.h:
1264 * UIProcess/ios/fullscreen/WKFullscreenStackView.mm:
1265 * UIProcess/mac/LegacySessionStateCoding.cpp:
1266 (WebKit::encodeFrameStateNode):
1267 (WebKit::decodeBackForwardTreeNode):
1268 * UIProcess/mac/PageClientImplMac.h:
1269 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1270 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1271 * UIProcess/mac/ViewSnapshotStore.mm:
1272 * UIProcess/mac/WKFullScreenWindowController.mm:
1273 * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
1274 (WebContentServiceInitializer):
1275 * WebProcess/FullScreen/WebFullScreenManager.cpp:
1276 (WebKit::WebFullScreenManager::videoControlsManagerDidChange):
1277 (WebKit::WebFullScreenManager::willEnterFullScreen):
1278 (WebKit::WebFullScreenManager::didEnterFullScreen):
1279 (WebKit::WebFullScreenManager::willExitFullScreen):
1280 * WebProcess/Geolocation/WebGeolocationManager.cpp:
1281 * WebProcess/Geolocation/WebGeolocationManager.h:
1282 * WebProcess/Geolocation/WebGeolocationManager.messages.in:
1283 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
1284 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1285 * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
1286 * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
1287 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1288 (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):
1289 * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
1290 (WebKit::toFrameState):
1291 (WebKit::applyFrameState):
1292 * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
1293 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1294 (WebKit::WebChromeClient::windowRect):
1295 (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement):
1296 * WebProcess/WebCoreSupport/WebChromeClient.h:
1297 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1298 * WebProcess/WebCoreSupport/WebEditorClient.h:
1299 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1300 (WebKit::WebFrameLoaderClient::dispatchDidLayout):
1301 (WebKit::WebFrameLoaderClient::saveViewStateToItem):
1302 (WebKit::WebFrameLoaderClient::restoreViewState):
1303 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1304 (WebKit::WebFrameLoaderClient::objectContentType):
1305 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1306 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1307 (WebKit::WebInspectorClient::highlight):
1308 (WebKit::WebInspectorClient::hideHighlight):
1309 * WebProcess/WebCoreSupport/WebInspectorClient.h:
1310 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1311 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1312 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
1313 * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
1314 * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
1315 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1316 * WebProcess/WebPage/DrawingArea.cpp:
1317 (WebKit::DrawingArea::create):
1318 * WebProcess/WebPage/DrawingArea.h:
1319 * WebProcess/WebPage/FindController.cpp:
1320 (WebKit::FindController::findString):
1321 * WebProcess/WebPage/FindController.h:
1322 * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:
1323 (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
1324 * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
1325 * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
1326 (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1327 (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
1328 * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
1329 (WebKit::ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture):
1330 (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
1331 (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
1332 * WebProcess/WebPage/ViewGestureGeometryCollector.h:
1333 * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
1334 * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
1335 * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h:
1336 * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
1337 * WebProcess/WebPage/WebFrame.h:
1338 * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
1339 * WebProcess/WebPage/WebOpenPanelResultListener.h:
1340 * WebProcess/WebPage/WebPage.cpp:
1341 (WebKit::m_cpuLimit):
1342 (WebKit::WebPage::~WebPage):
1343 (WebKit::WebPage::scalePage):
1344 (WebKit::WebPage::setUseFixedLayout):
1345 (WebKit::WebPage::disabledAdaptationsDidChange):
1346 (WebKit::WebPage::viewportPropertiesDidChange):
1347 (WebKit::WebPage::pageDidScroll):
1348 (WebKit::WebPage::mouseEvent):
1349 (WebKit::WebPage::updatePreferences):
1350 (WebKit::WebPage::willCommitLayerTree):
1351 (WebKit::WebPage::didFlushLayerTreeAtTime):
1352 (WebKit::WebPage::mainFrameDidLayout):
1353 (WebKit::WebPage::resetAssistedNodeForFrame):
1354 (WebKit::WebPage::elementDidFocus):
1355 (WebKit::WebPage::elementDidBlur):
1356 (WebKit::WebPage::willReplaceMultipartContent):
1357 (WebKit::WebPage::didReplaceMultipartContent):
1358 (WebKit::WebPage::didCommitLoad):
1359 * WebProcess/WebPage/WebPage.h:
1360 * WebProcess/WebPage/WebPage.messages.in:
1361 * WebProcess/WebPage/ios/FindControllerIOS.mm:
1362 * WebProcess/WebPage/ios/WebPageIOS.mm:
1363 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1364 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1365 (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
1366 * WebProcess/WebPage/mac/WebPageMac.mm:
1367 * WebProcess/WebProcess.cpp:
1368 (WebKit::WebProcess::WebProcess):
1369 (WebKit::WebProcess::initializeConnection):
1370 (WebKit::WebProcess::initializeWebProcess):
1371 (WebKit::WebProcess::actualPrepareToSuspend):
1372 (WebKit::WebProcess::cancelPrepareToSuspend):
1373 (WebKit::WebProcess::processDidResume):
1374 * WebProcess/WebProcess.h:
1375 * WebProcess/cocoa/PlaybackSessionManager.h:
1376 * WebProcess/cocoa/PlaybackSessionManager.messages.in:
1377 * WebProcess/cocoa/PlaybackSessionManager.mm:
1378 * WebProcess/cocoa/VideoFullscreenManager.h:
1379 * WebProcess/cocoa/VideoFullscreenManager.messages.in:
1380 * WebProcess/cocoa/VideoFullscreenManager.mm:
1381 (WebKit::VideoFullscreenManager::supportsVideoFullscreen const):
1382 (WebKit::VideoFullscreenManager::supportsVideoFullscreenStandby const):
1383 (WebKit::VideoFullscreenManager::didSetupFullscreen):
1384 (WebKit::VideoFullscreenManager::didExitFullscreen):
1385 * WebProcess/cocoa/WebProcessCocoa.mm:
1386 (WebKit::WebProcess::platformInitializeWebProcess):
1387 (WebKit::WebProcess::initializeProcessName):
1388 (WebKit::registerWithAccessibility):
1389 (WebKit::WebProcess::sourceApplicationAuditData const):
1390 (WebKit::WebProcess::initializeSandbox):
1391 * WebProcess/mac/SecItemShimLibrary.mm:
1394 2018-10-18 Alex Christensen <achristensen@webkit.org>
1396 Clean up FrameLoader two-state enums
1397 https://bugs.webkit.org/show_bug.cgi?id=190731
1399 Reviewed by Chris Dumez.
1401 * NetworkProcess/NetworkProcess.h:
1402 * NetworkProcess/NetworkProcess.messages.in:
1403 * Shared/WebCoreArgumentCoders.h:
1404 * UIProcess/WebPageProxy.cpp:
1405 (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
1406 * UIProcess/WebPageProxy.h:
1407 * UIProcess/WebPageProxy.messages.in:
1408 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1409 (WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
1410 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1412 2018-10-18 Youenn Fablet <youenn@apple.com>
1414 Handle MDNS resolution of candidates through libwebrtc directly
1415 https://bugs.webkit.org/show_bug.cgi?id=190681
1417 Reviewed by Eric Carlson.
1419 Add support for AsyncResolver to resolve MDNS.
1420 This basically reuse the code path used to resolve STUN server addresses.
1421 Removed MDNS specific resolution.
1422 Use existing CFHost resolution mechanism to do the actual resolution.
1424 * NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
1425 (WebKit::NetworkMDNSRegister::registerMDNSName):
1426 * NetworkProcess/webrtc/NetworkMDNSRegister.messages.in:
1427 * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
1428 (WebKit::LibWebRTCProvider::createPeerConnection):
1429 * WebProcess/Network/webrtc/LibWebRTCProvider.h:
1430 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
1431 * WebProcess/Network/webrtc/WebMDNSRegister.cpp:
1432 * WebProcess/Network/webrtc/WebMDNSRegister.h:
1433 * WebProcess/Network/webrtc/WebMDNSRegister.messages.in:
1435 2018-10-18 Chris Dumez <cdumez@apple.com>
1437 [PSON] Cap number of SuspendedPageProxy objects and allow a WebPageProxy to have more than one
1438 https://bugs.webkit.org/show_bug.cgi?id=190688
1439 <rdar://problem/45354095>
1441 Reviewed by Antti Koivisto.
1443 Cap number of SuspendedPageProxy objects to 3 to avoid accumulating too many "suspended" processes.
1445 Also allow a WebPageProxy to have more than one SuspendedPageProxy so that PageCache now works for
1446 more than 1 history navigation (up to 3 with the suspended page limit in this patch).
1448 The following cleanup / refactoring was made to support this:
1449 - The SuspendedPageProxy objects are now owned by the WebProcessPool instead of the WebPageProxy.
1450 The WebProcessPool is in charge of limiting the number of SuspendedPageProxy objects by dropping
1451 the oldest one whenever a WebPageProxy tries to add a new one and we've already reached the limit.
1452 - WebProcessProxy no longer needs to know anything about suspended pages, which simplifies the
1453 code quite a bit. Instead, the SuspendedPageProxy objects now register themselves as
1454 IPC::MessageReceivers with their WebProcessProxy. The SuspendedPageProxy also take care of
1455 calling maybeShutdown() on their WebProcessProxy when they get destroyed.
1457 * UIProcess/SuspendedPageProxy.cpp:
1458 (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
1459 (WebKit::SuspendedPageProxy::tearDownDrawingAreaInWebProcess):
1460 (WebKit::SuspendedPageProxy::unsuspend):
1461 (WebKit::SuspendedPageProxy::didFinishLoad):
1462 (WebKit::SuspendedPageProxy::didReceiveSyncMessage):
1463 * UIProcess/SuspendedPageProxy.h:
1464 * UIProcess/WebPageProxy.cpp:
1465 (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
1466 (WebKit::WebPageProxy::swapToWebProcess):
1467 (WebKit::WebPageProxy::close):
1468 (WebKit::WebPageProxy::continueNavigationInNewProcess):
1469 (WebKit::WebPageProxy::didCompletePageTransition):
1470 (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
1471 * UIProcess/WebPageProxy.h:
1472 * UIProcess/WebProcessPool.cpp:
1473 (WebKit::WebProcessPool::disconnectProcess):
1474 (WebKit::WebProcessPool::processForNavigationInternal):
1475 (WebKit::WebProcessPool::addSuspendedPageProxy):
1476 (WebKit::WebProcessPool::removeAllSuspendedPageProxiesForPage):
1477 (WebKit::WebProcessPool::takeSuspendedPageProxy):
1478 (WebKit::WebProcessPool::hasSuspendedPageProxyFor):
1479 * UIProcess/WebProcessPool.h:
1480 * UIProcess/WebProcessProxy.cpp:
1481 (WebKit::WebProcessProxy::didReceiveMessage):
1482 (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
1483 (WebKit::WebProcessProxy::canTerminateChildProcess):
1484 (WebKit::WebProcessProxy::requestTermination):
1485 * UIProcess/WebProcessProxy.h:
1487 2018-10-17 Wenson Hsieh <wenson_hsieh@apple.com>
1489 Enable the datalist element by default on iOS and macOS
1490 https://bugs.webkit.org/show_bug.cgi?id=190594
1491 <rdar://problem/45281159>
1493 Reviewed by Ryosuke Niwa and Tim Horton.
1495 * Configurations/FeatureDefines.xcconfig:
1496 * Platform/spi/ios/UIKitSPI.h:
1498 Add SPI to UITextSuggestion.
1500 * Shared/WebPreferences.yaml:
1501 * Shared/WebPreferencesDefaultValues.h:
1502 * UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
1503 (-[WKDataListSuggestionCell setText:]):
1504 (-[WKDataListSuggestionTable initWithElementRect:]):
1506 Fix the 32-bit macOS build with ENABLE(DATALIST_ELEMENT).
1508 2018-10-17 Andy Estes <aestes@apple.com>
1510 [Apple Pay] Increment the API version to 5
1511 https://bugs.webkit.org/show_bug.cgi?id=190686
1512 <rdar://problem/45348523>
1514 Reviewed by Simon Fraser.
1516 * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
1517 (WebKit::WebPaymentCoordinator::supportsVersion):
1519 2018-10-17 Alex Christensen <achristensen@webkit.org>
1521 BackForwardClient needs to be able to support UIProcess-only back/forward lists
1522 https://bugs.webkit.org/show_bug.cgi?id=190675
1524 Reviewed by Chris Dumez.
1526 * UIProcess/WebBackForwardList.cpp:
1527 (WebKit::WebBackForwardList::itemAtIndex const):
1528 (WebKit::WebBackForwardList::backListCount const):
1529 (WebKit::WebBackForwardList::forwardListCount const):
1530 * UIProcess/WebBackForwardList.h:
1531 * UIProcess/WebPageProxy.cpp:
1532 (WebKit::WebPageProxy::backForwardBackListCount):
1533 (WebKit::WebPageProxy::backForwardForwardListCount):
1534 * UIProcess/WebPageProxy.h:
1535 * UIProcess/WebPageProxy.messages.in:
1536 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1537 (WebKit::WebBackForwardListProxy::itemAtIndex):
1538 (WebKit::WebBackForwardListProxy::backListCount const):
1539 (WebKit::WebBackForwardListProxy::forwardListCount const):
1540 * WebProcess/WebPage/WebBackForwardListProxy.h:
1541 * WebProcess/WebPage/WebPage.cpp:
1542 (WebKit::WebPage::dumpHistoryForTesting):
1544 2018-10-17 Ali Juma <ajuma@chromium.org>
1546 Flaky IntersectionObserver web platform tests involving style updates
1547 https://bugs.webkit.org/show_bug.cgi?id=189091
1549 Reviewed by Simon Fraser.
1551 Add a WebPage::willDisplayPage bottleneck that gets called when flushing layers
1552 or, in the non-composited case, when rendering the page into a bitmap.
1554 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1555 (WebKit::AcceleratedDrawingArea::updateBackingStoreState):
1556 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1557 (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
1558 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1559 (WebKit::DrawingAreaImpl::display):
1560 * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
1561 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1562 * WebProcess/WebPage/WebPage.cpp:
1563 (WebKit::WebPage::willDisplayPage):
1564 * WebProcess/WebPage/WebPage.h:
1565 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1566 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1568 2018-10-16 Patrick Griffis <pgriffis@igalia.com>
1570 [GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox
1571 https://bugs.webkit.org/show_bug.cgi?id=190619
1573 Reviewed by Michael Catanzaro.
1575 We have to generate a /.flatpak-info file for xdg-desktop-portal
1576 to properly treat us as a sandboxed application.
1578 * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
1579 (WebKit::createSealedMemFdWithData):
1581 (WebKit::XDGDBusProxyLauncher::setPermissions):
1582 (WebKit::createFlatpakInfo):
1583 (WebKit::bubblewrapSpawn):
1585 2018-10-16 Sihui Liu <sihui_liu@apple.com>
1587 Add a switch for Web SQL
1588 https://bugs.webkit.org/show_bug.cgi?id=190271
1590 Reviewed by Ryosuke Niwa.
1592 * Shared/WebPreferences.yaml:
1593 * UIProcess/API/C/WKPreferences.cpp:
1594 (WKPreferencesSetWebSQLDisabled):
1595 (WKPreferencesGetWebSQLDisabled):
1596 * UIProcess/API/C/WKPreferencesRef.h:
1598 2018-10-16 Alex Christensen <achristensen@webkit.org>
1600 Remove InjectedBundleBackForwardList
1601 https://bugs.webkit.org/show_bug.cgi?id=190640
1603 Reviewed by Chris Dumez.
1605 These objects are only used in testing now, so I made a replacement to be used for testing,
1606 WKBundlePageDumpHistoryForTesting and WKBundleClearHistoryForTesting.
1607 The existence of these objects is problematic with process swapping and the true back/forward list being in the UIProcess.
1610 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
1611 (WKBundleBackForwardListGetTypeID):
1612 (WKBundleBackForwardListCopyItemAtIndex):
1613 (WKBundleBackForwardListGetBackListCount):
1614 (WKBundleBackForwardListGetForwardListCount):
1615 (WKBundleBackForwardListClear):
1616 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.h:
1617 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
1618 (WKBundleBackForwardListItemGetTypeID):
1619 (WKBundleBackForwardListItemIsSame):
1620 (WKBundleBackForwardListItemCopyURL):
1621 (WKBundleBackForwardListItemCopyTarget):
1622 (WKBundleBackForwardListItemIsTargetItem):
1623 (WKBundleBackForwardListItemCopyChildren):
1624 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
1625 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1626 (WKBundlePageDumpHistoryForTesting):
1627 (WKBundleClearHistoryForTesting):
1628 (WKBundlePageGetBackForwardList):
1629 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1630 * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp: Removed.
1631 * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h: Removed.
1632 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp: Removed.
1633 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h: Removed.
1634 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1635 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1636 * WebProcess/WebPage/WebPage.cpp:
1637 (WebKit::WebPage::~WebPage):
1638 (WebKit::dumpHistoryItem):
1639 (WebKit::WebPage::dumpHistoryForTesting):
1640 (WebKit::WebPage::clearHistory):
1641 (WebKit::WebPage::didReceiveSyncMessage):
1642 (WebKit::WebPage::backForwardList): Deleted.
1643 * WebProcess/WebPage/WebPage.h:
1645 2018-10-16 Timothy Hatcher <timothy@apple.com>
1647 Add <meta name="supported-color-schemes"> to control what color schemes the page supports
1648 https://bugs.webkit.org/show_bug.cgi?id=190526
1649 rdar://problem/45230140
1651 Reviewed by Dean Jackson.
1653 * UIProcess/mac/WKPrintingView.mm:
1654 (-[WKPrintingView drawRect:]): Update use of LocalDefaultSystemAppearance.
1655 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1656 (WebKit::InjectedBundleRangeHandle::renderedImage): Ditto.
1657 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1658 (WebKit::PDFPlugin::paintControlForLayerInContext): Ditto.
1659 * WebProcess/WebPage/WebPage.cpp:
1660 (WebKit::WebPage::drawRect): Ditto.
1662 2018-10-16 Justin Michaud <justin_michaud@apple.com>
1664 Implement feature flag and bindings for CSS Painting API
1665 https://bugs.webkit.org/show_bug.cgi?id=190237
1667 Reviewed by Ryosuke Niwa.
1669 * Configurations/FeatureDefines.xcconfig:
1670 * Shared/WebPreferences.yaml:
1671 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1672 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1674 2018-10-16 Philippe Normand <pnormand@igalia.com>
1676 [GLib] Build error with RemoteInspector disabled
1677 https://bugs.webkit.org/show_bug.cgi?id=190623
1679 Reviewed by Michael Catanzaro.
1681 Compilation guards added to ensure the build still works when the
1682 Remote WebInspector has been disabled.
1684 * UIProcess/API/glib/WebKitAutomationSession.cpp:
1685 * UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
1686 * UIProcess/RemoteWebInspectorProxy.cpp:
1688 2018-10-16 Patrick Griffis <pgriffis@igalia.com>
1690 [GTK][WPE] Fix sandbox on distros with suid bubblewrap
1691 https://bugs.webkit.org/show_bug.cgi?id=190616
1693 Reviewed by Michael Catanzaro.
1695 * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
1696 (WebKit::bubblewrapSpawn):
1698 2018-10-16 Alex Christensen <achristensen@webkit.org>
1700 Replace HistoryItem* with HistoryItem& where possible
1701 https://bugs.webkit.org/show_bug.cgi?id=190617
1703 Reviewed by Chris Dumez.
1705 * WebProcess/WebCoreSupport/SessionStateConversion.h:
1706 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1707 (WebKit::WK2NotifyHistoryItemChanged):
1708 (WebKit::WebBackForwardListProxy::goToItem):
1709 * WebProcess/WebPage/WebBackForwardListProxy.h:
1711 2018-10-16 Philippe Normand <pnormand@igalia.com>
1713 Unreviewed, another GTK build fix after r237146
1715 * UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp:
1716 (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
1718 2018-10-15 Justin Fan <justin_fan@apple.com>
1720 Add WebGPU 2018 feature flag and experimental feature flag
1721 https://bugs.webkit.org/show_bug.cgi?id=190509
1723 Reviewed by Dean Jackson.
1725 Re-add ENABLE_WEBGPU, an experimental feature flag, and a RuntimeEnabledFeature
1726 for the 2018 WebGPU prototype.
1728 * Configurations/FeatureDefines.xcconfig:
1729 * Shared/WebPreferences.yaml:
1730 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1731 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1733 2018-10-15 Alex Christensen <achristensen@webkit.org>
1735 Fix API tests after r237146
1737 * Shared/WebPageGroupData.cpp:
1738 (WebKit::WebPageGroupData::decode):
1739 I accidentally changed the decoder.
1741 2018-10-15 Sihui Liu <sihui_liu@apple.com>
1743 HSTS cache entries cannot be removed by origin
1744 https://bugs.webkit.org/show_bug.cgi?id=190455
1745 <rdar://problem/45181322>
1747 Reviewed by Chris Dumez.
1749 The SPI _CFNetworkResetHSTS does not recognize url without protocol, so we need to add protocol manually.
1751 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1752 (WebKit::NetworkProcess::deleteHSTSCacheForHostNames):
1754 2018-10-15 Alex Christensen <achristensen@webkit.org>
1756 Fix GTK build, even though bots are not working right now.
1758 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1759 (WebKit::WebInspectorProxy::platformCreateFrontendPage):
1761 2018-10-15 Alex Christensen <achristensen@webkit.org>
1763 Fix WinCairo build after r237146
1765 * UIProcess/win/WebInspectorProxyWin.cpp:
1766 (WebKit::WebInspectorProxy::platformCreateFrontendPage):
1768 2018-10-15 Chris Dumez <cdumez@apple.com>
1770 REGRESSION (r236512): [ Mac WK2 ] Layout Test editing/undo/undo-smart-delete-word.html is flaky
1771 https://bugs.webkit.org/show_bug.cgi?id=190375
1772 <rdar://problem/45177807>
1774 Reviewed by Ryosuke Niwa.
1776 The test is doing the following:
1777 > document.execCommand("Delete"); document.execCommand("Undo");
1779 Both operation are synchronous and rely on synchronous IPC from the WebProcess to the UIProcess.
1780 However, for the undo operation to succeed, the first command need to have been registered with
1781 with the UIProcess via the WebPageProxy::RegisterEditCommandForUndo IPC to the UIProcess, which
1784 After r236512, the UIProcess no longer processes incoming sync / async IPC in order and thus,
1785 it is possible for the WebPageProxy::ExecuteUndoRedo synchronous IPC to get processed by the
1786 UIProcess *before* the WebPageProxy::RegisterEditCommandForUndo asynchronous IPC for the
1787 previous "Delete" command. As a result, canUndo would return false and we would fail to undo.
1789 To address the issue, use SendOption::DispatchMessageEvenWhenWaitingForSyncReply flag when sending
1790 the WebPageProxy::RegisterEditCommandForUndo IPC, so that it gets processed in order with regards
1791 to surrounding synchronous IPC.
1793 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1794 (WebKit::WebEditorClient::registerUndoStep):
1796 2018-10-15 Alex Christensen <achristensen@webkit.org>
1798 Modernize BackForwardClient.h
1799 https://bugs.webkit.org/show_bug.cgi?id=190610
1801 Reviewed by Chris Dumez.
1803 * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
1804 (WebKit::InjectedBundleBackForwardList::clear):
1805 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1806 (WebKit::WebSWContextManagerConnection::installServiceWorker):
1807 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1808 (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
1809 (WebKit::WebBackForwardListProxy::backListCount const):
1810 (WebKit::WebBackForwardListProxy::forwardListCount const):
1811 (WebKit::WebBackForwardListProxy::backListCount): Deleted.
1812 (WebKit::WebBackForwardListProxy::forwardListCount): Deleted.
1813 * WebProcess/WebPage/WebBackForwardListProxy.h:
1814 (WebKit::WebBackForwardListProxy::create):
1815 * WebProcess/WebPage/WebPage.cpp:
1816 (WebKit::m_cpuLimit):
1817 (WebKit::WebPage::restoreSessionInternal):
1819 2018-10-15 Timothy Hatcher <timothy@apple.com>
1821 Add support for prefers-color-scheme media query
1822 https://bugs.webkit.org/show_bug.cgi?id=190499
1823 rdar://problem/45212025
1825 Reviewed by Dean Jackson.
1827 * Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
1828 * Shared/WebPreferences.yaml: Added DarkModeCSSEnabled as experimental.
1830 2018-10-15 Patrick Griffis <pgriffis@igalia.com>
1832 Remove StorageProcess leftover
1833 https://bugs.webkit.org/show_bug.cgi?id=190591
1835 Reviewed by Michael Catanzaro.
1837 The process was deleted.
1839 * Shared/ChildProcess.h:
1840 * Shared/mac/ChildProcessMac.mm:
1841 (WebKit::processStorageClass):
1842 (WebKit::sandboxDirectory):
1843 * UIProcess/ChildProcessProxy.cpp:
1844 (WebKit::ChildProcessProxy::getLaunchOptions):
1845 * UIProcess/Launcher/ProcessLauncher.h:
1846 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1847 (WebKit::serviceName):
1849 2018-10-15 Alex Christensen <achristensen@webkit.org>
1851 Remove unused parameters of WebPageGroupData
1852 https://bugs.webkit.org/show_bug.cgi?id=190600
1854 Reviewed by Chris Dumez.
1856 visibleToInjectedBundle and visibleToHistoryClient are both always true.
1857 This removes a mysterious check in the history code.
1859 * Shared/WebPageGroupData.cpp:
1860 (WebKit::WebPageGroupData::encode const):
1861 (WebKit::WebPageGroupData::decode):
1862 * Shared/WebPageGroupData.h:
1863 * UIProcess/WebPageGroup.cpp:
1864 (WebKit::WebPageGroup::create):
1865 (WebKit::pageGroupData):
1866 (WebKit::WebPageGroup::WebPageGroup):
1867 * UIProcess/WebPageGroup.h:
1868 (WebKit::WebPageGroup::WebPageGroup):
1869 (WebKit::WebPageGroup::create):
1870 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1871 (WebKit::WebFrameLoaderClient::updateGlobalHistory):
1872 (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
1873 (WebKit::WebFrameLoaderClient::setTitle):
1874 * WebProcess/WebPage/WebPage.cpp:
1875 (WebKit::WebPage::create):
1876 (WebKit::WebPage::close):
1877 * WebProcess/WebPage/WebPageGroupProxy.cpp:
1878 (WebKit::WebPageGroupProxy::create):
1879 * WebProcess/WebPage/WebPageGroupProxy.h:
1880 (WebKit::WebPageGroupProxy::pageGroupID const):
1881 (WebKit::WebPageGroupProxy::isVisibleToInjectedBundle const): Deleted.
1882 (WebKit::WebPageGroupProxy::isVisibleToHistoryClient const): Deleted.
1884 2018-10-15 Chris Dumez <cdumez@apple.com>
1886 Experiment: target=_blank on anchors should imply rel=noopener
1887 https://bugs.webkit.org/show_bug.cgi?id=190481
1889 Reviewed by Alex Christensen.
1891 * Shared/WebPreferences.yaml:
1893 2018-10-15 Alex Christensen <achristensen@webkit.org>
1895 Remove unused parameters from FrameLoaderClient::createFrame
1896 https://bugs.webkit.org/show_bug.cgi?id=190587
1898 Reviewed by Chris Dumez.
1900 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1901 (WebKit::WebFrameLoaderClient::createFrame):
1902 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1904 2018-10-15 Wenson Hsieh <wenson_hsieh@apple.com>
1906 [iOS] Can't select text after dismissing the keyboard when changing focus
1907 https://bugs.webkit.org/show_bug.cgi?id=190563
1908 <rdar://problem/44613559>
1910 Reviewed by Tim Horton.
1912 In r230686, we switched from using UIWKSelectionAssistant to UIWKTextInteractionAssistant for handling selection
1913 in non-editable content on iOS; as such, when an editable element loses focus, instead of switching from the
1914 text interaction assistant to the web selection assistant as we've previously done, we now reset our text
1915 interaction assistant by calling `-[UIWKTextInteractionAssistant setGestureRecognizers]`, which removes all of
1916 the current text selection gesture recognizers from WKContentView and regenerates them by building up a tree of
1917 `UITextInteraction`s and adding them to the assistant (see `-[UITextInteractionAssistant
1918 addGestureRecognizersToView:]`). In particular, `_UITextSelectionForceGesture` is the gesture recognizer used to
1919 trigger text selection when long pressing.
1921 After dismissing the keyboard by tapping the "Done" button, the UITextInteractions and gesture recognizers on
1922 the interaction assistant include:
1926 <UITextIndirectNonEditableInteraction>
1927 <_UIKeyboardBasedNonEditableTextSelectionInteraction>
1928 ↳ "_UIKeyboardTextSelectionGestureForcePress" → <_UITextSelectionForceGesture>
1930 However, after the keyboard dismisses due to an editable element losing focus, the UITextInteractions on the
1931 interaction assistant look like this:
1935 <UITextIndirectNonEditableInteraction>
1937 Subsequently, the lack of a `_UIKeyboardBasedNonEditableTextSelectionInteraction` makes text selection by long
1938 pressing impossible, since the `_UITextSelectionForceGesture` is never introduced to `WKContentView`. In UIKit,
1939 `UITextIndirectNonEditableInteraction` only adds `_UIKeyboardBasedNonEditableTextSelectionInteraction` as a
1940 child if the text input view — in our case, WKContentView — is missing an input delegate (see `-initWithView:`).
1941 In the case where the Done button is used to dismiss the keyboard, WKContentView loses first responder, and the
1942 input delegate of WKContentView is cleared out early on, before we call `-stopAssistingKeyboard`:
1944 -[WKContentView(WKInteraction) setInputDelegate:]
1945 -[UIKeyboardImpl setDelegate:force:]
1946 -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:]
1947 -[UIResponder _finishResignFirstResponder]
1948 -[UIResponder resignFirstResponder]
1949 -[WKContentView(WKInteraction) resignFirstResponderForWebView]
1950 -[UIKeyboardImpl dismissKeyboard]
1952 However, in the case where the focused element is blurred, we end up clearing out the delegate in
1953 `-_stopAssistingNode`, *after* we've already called `-setGestureRecognizers` on the interaction assistant. This
1954 means UIKit will skip adding `_UIKeyboardBasedNonEditableTextSelectionInteraction` to the text interaction
1957 -[WKContentView(WKInteraction) setInputDelegate:]
1958 -[UIKeyboardImpl setDelegate:force:]
1959 -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:]
1960 -[UIResponder(UIResponderInputViewAdditions) reloadInputViews]
1961 -[WKContentView(WKInteraction) _stopAssistingNode]
1963 To fix this, we simply reset our `inputDelegate` earlier in `_stopAssistingKeyboard` instead of waiting until
1964 we reload input views. This ensures that UIKit sets up the text interaction assistant's gestures when changing
1965 focus in the same way as we would when the keyboard is dismissed via `-resignFirstResponder` (e.g. when pressing
1968 Test: editing/selection/ios/select-text-after-changing-focus.html
1970 * UIProcess/ios/WKContentViewInteraction.mm:
1971 (-[WKContentView setupInteraction]):
1972 (-[WKContentView setUpTextSelectionAssistant]):
1973 (-[WKContentView _startAssistingKeyboard]):
1974 (-[WKContentView _stopAssistingKeyboard]):
1975 (-[WKContentView useSelectionAssistantWithGranularity:]): Deleted.
1977 Additionally rename this to -setUpTextSelectionAssistant and remove the selection granularity argument. This was
1978 previously used to switch between web and text interaction assistants.
1980 2018-10-15 Remy Demarest <rdemarest@apple.com>
1982 Web Inspector: RDM: Toolbar hidden in when Inspector is docked to side.
1983 https://bugs.webkit.org/show_bug.cgi?id=190545
1984 rdar://problem/44674500
1986 Reviewed by Brian Burg.
1988 When the inspector is placed next to the web view it uses its _topContentInset and _totalHeightOfBanners
1989 to lay out the inspector so it does not underlap the window toolbar, but this technique does not work when
1990 in responsive design mode because of the different attachment view. This patch fixes the issue by using
1991 -[NSWindow contentLayoutRect] to figure out the height of the inspector instead of relying on the content
1992 insets of the web view. This requires observing -contentLayoutRect and ensure we only observe its changes
1993 when the view is actually on the screen.
1995 * UIProcess/WebInspectorProxy.h:
1996 Declare helpers to add/remove observer on the attached inspector window.
1998 * UIProcess/mac/WKInspectorViewController.h:
1999 * UIProcess/mac/WKInspectorViewController.mm:
2000 (-[WKInspectorViewController inspectorWKWebView:willMoveToWindow:]):
2001 (-[WKInspectorViewController inspectorWKWebViewDidMoveToWindow:]):
2003 * UIProcess/mac/WKInspectorWKWebView.h:
2004 * UIProcess/mac/WKInspectorWKWebView.mm:
2005 (-[WKInspectorWKWebView viewWillMoveToWindow:]):
2006 (-[WKInspectorWKWebView viewDidMoveToWindow]):
2008 * UIProcess/mac/WebInspectorProxyMac.mm:
2009 (-[WKWebInspectorProxyObjCAdapter observeValueForKeyPath:ofObject:change:context:]): Update inspector layout
2010 whenever the contentLayoutRect changes. Except when live resizing since the attachment view also sends
2011 notifications at the same time.
2012 (-[WKWebInspectorProxyObjCAdapter inspectorViewController:willMoveToWindow:]):
2013 (-[WKWebInspectorProxyObjCAdapter inspectorViewControllerDidMoveToWindow:]):
2014 (WebKit::WebInspectorProxy::attachmentWillMoveFromWindow): Remove the observer only if we set it up before.
2015 (WebKit::WebInspectorProxy::attachmentDidMoveToWindow): Set up the observer and immediately update the frame
2016 of the inspector since it just moved to its final destination.
2017 (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Adjust the frame of the attached inspector based
2018 on the contentLayoutRect of the window rather than the topContentInset of the web view.
2020 2018-10-15 Wenson Hsieh <wenson_hsieh@apple.com>
2022 Changing view scale should zoom to initial scale if the page is already at initial scale
2023 https://bugs.webkit.org/show_bug.cgi?id=190570
2024 <rdar://problem/45261877>
2026 Reviewed by Tim Horton.
2028 r237087 added support for changing the view scale on iOS, by making it possible to let the minimum layout size
2029 be a factor of the view size; this allows internal clients to change page zoom levels on iOS. Currently,
2030 changing the page zoom level automatically zooms to the new initial scale only if the user has not manually
2031 scaled the page before, even if the page is already at initial scale (e.g. after the user double taps to zoom on
2032 a small element, and double taps again to zoom back out to initial scale).
2034 This patch makes some minor adjustments to automatically zoom to the new initial scale after changing the view
2035 scale, as long as the page was at initial scale when changing zoom levels.
2037 Test: fast/viewport/ios/initial-scale-after-changing-view-scale.html
2039 * WebProcess/WebPage/WebPage.h:
2040 * WebProcess/WebPage/ios/WebPageIOS.mm:
2041 (WebKit::areEssentiallyEqualAsFloat):
2043 Move this function further up in the file, so that we can use it in `setViewportConfigurationViewLayoutSize`.
2045 (WebKit::WebPage::setViewportConfigurationViewLayoutSize):
2047 If the page is near initial scale and the zoom level changes, zoom to the new initial scale.
2049 (WebKit::WebPage::viewportConfigurationChanged):
2051 Make this take a new enum argument that determines whether we want to zoom to initial scale as a result of the
2052 viewport configuration change (`No` by default).
2054 2018-10-15 Chris Dumez <cdumez@apple.com>
2056 Restrict browsing context lookup by name to frames that are related to one another
2057 https://bugs.webkit.org/show_bug.cgi?id=190475
2059 Reviewed by Alex Christensen.
2061 * WebProcess/Plugins/PluginView.cpp:
2062 (WebKit::PluginView::performJavaScriptURLRequest):
2064 2018-10-15 Alex Christensen <achristensen@webkit.org>
2066 Fix assertion after r237102
2067 https://bugs.webkit.org/show_bug.cgi?id=190459
2069 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2070 (WebKit::InjectedBundlePageLoaderClient::InjectedBundlePageLoaderClient):
2071 Shipping Safari still uses shouldGoToBackForwardListItem, so only assert on
2072 newer platforms like we do in WKPageSetPageLoaderClient.
2074 2018-10-15 Alex Christensen <achristensen@webkit.org>
2076 Shrink more enum classes
2077 https://bugs.webkit.org/show_bug.cgi?id=190540
2079 Reviewed by Chris Dumez.
2081 * NetworkProcess/NetworkConnectionToWebProcess.h:
2082 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2083 * NetworkProcess/NetworkDataTask.h:
2084 * NetworkProcess/NetworkProcess.h:
2085 * NetworkProcess/NetworkProcess.messages.in:
2086 * Shared/Authentication/AuthenticationChallengeDisposition.h:
2087 * Shared/Authentication/AuthenticationManager.h:
2088 * Shared/Authentication/AuthenticationManager.messages.in:
2089 * Shared/DragControllerAction.h:
2090 * Shared/LayerTreeContext.h:
2091 * Shared/UndoOrRedo.h:
2092 * UIProcess/Authentication/AuthenticationDecisionListener.h:
2093 * UIProcess/Cocoa/WebViewImpl.h:
2094 * UIProcess/Network/NetworkProcessProxy.h:
2095 * UIProcess/Network/NetworkProcessProxy.messages.in:
2096 * UIProcess/Notifications/WebNotification.h:
2097 * UIProcess/Notifications/WebNotificationManagerProxy.h:
2098 * UIProcess/PageClient.h:
2099 * UIProcess/UserContent/WebUserContentControllerProxy.h:
2100 * UIProcess/WebPageProxy.h:
2101 * UIProcess/WebPageProxy.messages.in:
2102 * UIProcess/ios/PageClientImplIOS.h:
2103 * UIProcess/ios/WKContentViewInteraction.h:
2104 * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
2105 * WebProcess/Automation/WebAutomationSessionProxy.messages.in:
2106 * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
2107 * WebProcess/Storage/WebSWClientConnection.messages.in:
2108 * WebProcess/UserContent/InjectUserScriptImmediately.h:
2109 * WebProcess/UserContent/WebUserContentController.h:
2110 * WebProcess/UserContent/WebUserContentController.messages.in:
2111 * WebProcess/WebPage/WebPage.h:
2112 * WebProcess/WebPage/WebPage.messages.in:
2114 2018-10-15 Michael Catanzaro <mcatanzaro@igalia.com>
2116 Add new files missing from previous commit.
2118 * Source/cmake/FindLibseccomp.cmake: Added.
2120 2018-10-15 Patrick Griffis <pgriffis@igalia.com>
2122 [GTK][WPE] Implement subprocess sandboxing
2123 https://bugs.webkit.org/show_bug.cgi?id=188568
2125 Reviewed by Michael Catanzaro.
2127 This implements sandboxing of WebKitWebProcesses.
2129 The sandbox is opt-in at runtime as it is a behavior change.
2130 See webkit_web_context_set_sandbox_enabled() and the
2131 WEBKIT_FORCE_SANDBOX env var for developers.
2133 This is Linux specific using Namespaces, Seccomp, and a DBus proxy service.
2134 This introduces three new dependencies:
2137 - libseccomp library
2138 - xdg-dbus-proxy executable
2140 The use of xdg-dbus-proxy will ideally be replaced once upstream DBus
2141 gains the same filtering abilities which is a work in progress.
2143 Currently the sandbox is not completed and there are a few large holes:
2145 - Pulseaudio: The Pipewire project will solve this.
2146 - DRI device access: No immediate solutions planned.
2147 - Webcam device access: Pipewire will also solve this.
2148 - Webprocess network access: Will require GStreamer changes.
2149 - DConf access: Custom proxy planned.
2150 - X11 access: Wayland solves this.
2152 That is not an exhaustive list but are the noteworthy ones. Filesystem access
2153 is still an evolving list as problems are found as is specific DBus name access.
2155 * PlatformGTK.cmake:
2156 * PlatformWPE.cmake:
2159 * UIProcess/API/glib/WebKitWebContext.cpp:
2160 (webkit_web_context_set_sandbox_enabled):
2161 (webkit_web_context_get_sandbox_enabled):
2162 * UIProcess/API/gtk/WebKitWebContext.h:
2163 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2164 * UIProcess/API/wpe/WebKitWebContext.h:
2165 * UIProcess/ChildProcessProxy.cpp:
2166 (WebKit::ChildProcessProxy::getLaunchOptions):
2167 * UIProcess/ChildProcessProxy.h:
2168 (WebKit::ChildProcessProxy::platformGetLaunchOptions):
2169 * UIProcess/Launcher/ProcessLauncher.h:
2170 * UIProcess/Launcher/glib/BubblewrapLauncher.cpp: Added.
2171 (WebKit::memfd_create):
2173 (WebKit::XDGDBusProxyLauncher::setAddress):
2174 (WebKit::XDGDBusProxyLauncher::isRunning const):
2175 (WebKit::XDGDBusProxyLauncher::path const):
2176 (WebKit::XDGDBusProxyLauncher::proxyPath const):
2177 (WebKit::XDGDBusProxyLauncher::setPermissions):
2178 (WebKit::XDGDBusProxyLauncher::launch):
2179 (WebKit::XDGDBusProxyLauncher::childSetupFunc):
2180 (WebKit::XDGDBusProxyLauncher::makeProxyPath):
2181 (WebKit::XDGDBusProxyLauncher::dbusAddressToPath):
2182 (WebKit::bindIfExists):
2183 (WebKit::bindDBusSession):
2185 (WebKit::bindDconf):
2186 (WebKit::bindWayland):
2187 (WebKit::bindPulse):
2188 (WebKit::bindFonts):
2189 (WebKit::bindGtkData):
2191 (WebKit::bindPathVar):
2192 (WebKit::bindGStreamerData):
2193 (WebKit::bindOpenGL):
2195 (WebKit::bindSymlinksRealPath):
2196 (WebKit::setupSeccomp):
2197 (WebKit::bubblewrapSpawn):
2198 * UIProcess/Launcher/glib/BubblewrapLauncher.h: Added.
2199 * UIProcess/Launcher/glib/FlatpakLauncher.cpp: Added.
2200 (WebKit::flatpakSpawn):
2201 * UIProcess/Launcher/glib/FlatpakLauncher.h: Added.
2202 * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
2203 (WebKit::isInsideFlatpak):
2204 (WebKit::ProcessLauncher::launchProcess):
2205 * UIProcess/Plugins/PluginProcessProxy.cpp:
2206 (WebKit::PluginProcessProxy::getLaunchOptions):
2207 * UIProcess/Plugins/PluginProcessProxy.h:
2208 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2209 (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes):
2210 * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
2211 (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes):
2212 * UIProcess/WebProcessPool.h:
2213 * UIProcess/WebProcessProxy.cpp:
2214 (WebKit::WebProcessProxy::platformGetLaunchOptions):
2215 * UIProcess/WebProcessProxy.h:
2216 * UIProcess/glib/WebProcessProxyGLib.cpp: Added.
2217 (WebKit::WebProcessProxy::platformGetLaunchOptions):
2219 2018-10-15 Alex Christensen <achristensen@webkit.org>
2221 Add a temporarily off by default preference for doing safe browsing checks
2222 https://bugs.webkit.org/show_bug.cgi?id=190522
2224 Reviewed by Chris Dumez.
2226 Safe browsing development has taken longer than anticipated.
2227 To prevent the unused possible contacting the safe browsing provider for no benefit, make this off by default for now.
2228 I'll make it on by default when it's actually used.
2230 * Shared/WebPreferences.yaml:
2231 * UIProcess/API/Cocoa/WKPreferences.mm:
2232 (-[WKPreferences _setSafeBrowsingEnabled:]):
2233 (-[WKPreferences _safeBrowsingEnabled]):
2234 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2235 * UIProcess/WebPageProxy.cpp:
2236 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2238 2018-10-15 Alex Christensen <achristensen@webkit.org>
2240 Include EnumTraits.h less
2241 https://bugs.webkit.org/show_bug.cgi?id=190535
2243 Reviewed by Chris Dumez.
2245 * NetworkProcess/NetworkSessionCreationParameters.h:
2246 * Shared/Authentication/AuthenticationChallengeDisposition.h:
2247 * Shared/CoordinateSystem.h:
2248 * Shared/LayerTreeContext.h:
2249 * Shared/UndoOrRedo.h:
2250 * Shared/WebsiteAutoplayPolicy.h:
2251 * Shared/WebsitePopUpPolicy.h:
2252 * UIProcess/API/APIWebsitePolicies.h:
2253 * WebProcess/UserContent/InjectUserScriptImmediately.h:
2255 2018-10-15 Alex Christensen <achristensen@webkit.org>
2257 Remove InjectedBundle processing of back/forward lists
2258 https://bugs.webkit.org/show_bug.cgi?id=190459
2260 Reviewed by Chris Dumez.
2262 * Shared/API/c/WKDeprecated.h:
2263 * UIProcess/API/APINavigationClient.h:
2264 (API::NavigationClient::willGoToBackForwardListItem):
2265 * UIProcess/Cocoa/NavigationState.h:
2266 * UIProcess/Cocoa/NavigationState.mm:
2267 (WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):
2268 * UIProcess/WebPageProxy.cpp:
2269 (WebKit::WebPageProxy::willGoToBackForwardListItem):
2270 * UIProcess/WebPageProxy.h:
2271 * UIProcess/WebPageProxy.messages.in:
2272 * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
2273 (API::InjectedBundle::PageLoaderClient::shouldGoToBackForwardListItem): Deleted.
2274 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
2275 (WKBundleBackForwardListItemCopyOriginalURL):
2276 (WKBundleBackForwardListItemCopyTitle):
2277 (WKBundleBackForwardListItemIsTargetItem):
2278 (WKBundleBackForwardListItemIsInPageCache):
2279 (WKBundleBackForwardListItemHasCachedPageExpired):
2280 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
2281 * WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h:
2282 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2283 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2284 (WebKit::InjectedBundlePageLoaderClient::InjectedBundlePageLoaderClient):
2285 (WebKit::InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem): Deleted.
2286 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2287 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2288 (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem const):
2289 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2291 2018-10-15 Alex Christensen <achristensen@webkit.org>
2293 WebPageProxy should always have a HistoryClient
2294 https://bugs.webkit.org/show_bug.cgi?id=190450
2296 Reviewed by Chris Dumez.
2298 This will make it so we don't forget to null check it.
2299 No change in behavior because the default HistoryClient does nothing.
2301 * UIProcess/API/APIHistoryClient.h:
2302 * UIProcess/Cocoa/NavigationState.h:
2303 * UIProcess/Cocoa/NavigationState.mm:
2304 (WebKit::NavigationState::createHistoryClient):
2305 * UIProcess/WebPageProxy.cpp:
2306 (WebKit::WebPageProxy::WebPageProxy):
2307 (WebKit::WebPageProxy::setHistoryClient):
2308 (WebKit::WebPageProxy::didNavigateWithNavigationData):
2309 (WebKit::WebPageProxy::didPerformClientRedirect):
2310 (WebKit::WebPageProxy::didPerformServerRedirect):
2311 (WebKit::WebPageProxy::didUpdateHistoryTitle):
2312 * UIProcess/WebPageProxy.h:
2314 2018-10-15 Alex Christensen <achristensen@webkit.org>
2316 Use std::optional<size_t> for a WebBackForwardList's current index
2317 https://bugs.webkit.org/show_bug.cgi?id=190448
2319 Reviewed by Chris Dumez.
2321 Also remove m_capacity, which was immutable.
2323 * UIProcess/WebBackForwardList.cpp:
2324 (WebKit::WebBackForwardList::WebBackForwardList):
2325 (WebKit::WebBackForwardList::~WebBackForwardList):
2326 (WebKit::WebBackForwardList::pageClosed):
2327 (WebKit::WebBackForwardList::addItem):
2328 (WebKit::WebBackForwardList::goToItem):
2329 (WebKit::WebBackForwardList::currentItem const):
2330 (WebKit::WebBackForwardList::backItem const):
2331 (WebKit::WebBackForwardList::forwardItem const):
2332 (WebKit::WebBackForwardList::itemAtIndex const):
2333 (WebKit::WebBackForwardList::backListCount const):
2334 (WebKit::WebBackForwardList::forwardListCount const):
2335 (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit const):
2336 (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit const):
2337 (WebKit::WebBackForwardList::removeAllItems):
2338 (WebKit::WebBackForwardList::clear):
2339 (WebKit::WebBackForwardList::backForwardListState const):
2340 (WebKit::WebBackForwardList::restoreFromState):
2341 (WebKit::WebBackForwardList::loggingString):
2342 * UIProcess/WebBackForwardList.h:
2343 (WebKit::WebBackForwardList::currentIndex const): Deleted.
2345 2018-10-14 Yusuke Suzuki <yusukesuzuki@slowstart.org>
2347 [JSC] Remove Option::useAsyncIterator
2348 https://bugs.webkit.org/show_bug.cgi?id=190567
2350 Reviewed by Saam Barati.
2352 * Configurations/FeatureDefines.xcconfig:
2354 2018-10-12 Wenson Hsieh <wenson_hsieh@apple.com>
2356 [iOS] Allow SPI clients to lay out at arbitrarily scaled sizes and scale to fit the view
2357 https://bugs.webkit.org/show_bug.cgi?id=190504
2358 <rdar://problem/45117760>
2360 Reviewed by Tim Horton.
2362 Add support for _setViewScale: and _viewScale on iOS. While similar in concept to macOS, changing this property
2363 on iOS uses viewport configurations to change the minimum layout size of the document and apply view scaling.
2364 Setting the view scale on iOS to a value `s` multiplies the minimium layout size by a factor `1 / s`, but also
2365 multiplies the initial, minimum and maximum scales by a factor of `s`. The net effect of applying this scale
2366 causes the page to lay out at a larger width and shrink (or a smaller width and expand) to fit the viewport.
2368 * Shared/WebPageCreationParameters.cpp:
2369 (WebKit::WebPageCreationParameters::encode const):
2370 (WebKit::WebPageCreationParameters::decode):
2371 * Shared/WebPageCreationParameters.h:
2373 Send `viewportConfigurationLayoutSizeScaleFactor` alongside `viewportConfigurationViewLayoutSize`.
2375 (-[WKWebView _dispatchSetViewLayoutSize:]):
2376 (-[WKWebView _viewScale]):
2377 (-[WKWebView _setViewScale:]):
2379 Provide a different implementation of `_setViewScale:` on iOS, by scaling the effective minimum layout size.
2380 (See above for more detail).
2382 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2384 Add missing API availability annotations for the _viewScale property.
2386 * UIProcess/API/mac/WKView.mm:
2387 (-[WKView _setViewScale:]):
2388 * UIProcess/Cocoa/WebViewImpl.mm:
2390 Both -[WKView _setViewScale:] and -[WKWebView _setViewScale:] throw Objective C exceptions upon receiving a bad
2391 argument (e.g. scale <= 0). However, logic for throwing this exception is specific to iOS in WKWebView, and
2392 handled in WebViewImpl on macOS. To make this less confusing, move the exception throwing code out of
2393 !PLATFORM(MAC) in WKWebView, and move the path for raising this exception in WKView on macOS from WebViewImpl to
2396 * UIProcess/WebPageProxy.cpp:
2397 (WebKit::WebPageProxy::creationParameters):
2398 * UIProcess/WebPageProxy.h:
2399 (WebKit::WebPageProxy::layoutSizeScaleFactor const):
2401 Tie the notion of "view scale" on iOS to `layoutSizeScaleFactor`. As its name suggests, this is a scale factor
2402 by which we transform the layout size.
2404 * UIProcess/ios/WebPageProxyIOS.mm:
2405 (WebKit::WebPageProxy::setViewportConfigurationViewLayoutSize):
2406 * WebProcess/WebPage/WebPage.cpp:
2407 * WebProcess/WebPage/WebPage.h:
2408 * WebProcess/WebPage/WebPage.messages.in:
2410 Plumb the layout size scale factor over to the web process, along with the layout size.
2412 * WebProcess/WebPage/ios/WebPageIOS.mm:
2413 (WebKit::WebPage::setViewportConfigurationViewLayoutSize):
2415 2018-10-12 Alex Christensen <achristensen@webkit.org>
2417 Allow encoding of small enum classes
2418 https://bugs.webkit.org/show_bug.cgi?id=190531
2420 Reviewed by Tim Horton.
2422 * NetworkProcess/NetworkLoadClient.h:
2423 * Scripts/webkit/messages.py:
2424 * Scripts/webkit/parser.py:
2425 (parse_parameters_string):
2426 * UIProcess/API/APINavigation.h:
2427 * UIProcess/WebFramePolicyListenerProxy.h:
2428 * UIProcess/WebNavigationState.h:
2429 * UIProcess/WebPageProxy.h:
2430 * UIProcess/WebPageProxy.messages.in:
2431 * WebProcess/WebPage/WebPage.messages.in:
2433 2018-10-12 Rob Buis <rbuis@igalia.com>
2435 Solve the confusion around blankURL() and isBlankURL() in URL
2436 https://bugs.webkit.org/show_bug.cgi?id=158988
2438 Reviewed by Alex Christensen.
2440 * NetworkProcess/NetworkResourceLoader.cpp:
2441 (WebKit::NetworkResourceLoader::continueWillSendRequest):
2442 * UIProcess/WebProcessPool.cpp:
2443 (WebKit::WebProcessPool::processForNavigationInternal):
2444 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2445 (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
2446 (WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
2447 (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
2448 (WebKit::WebResourceLoadStatisticsStore::setLastSeen):
2449 (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
2450 (WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource):
2451 (WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
2452 (WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource):
2453 (WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
2454 (WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
2455 (WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
2456 (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
2457 (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
2458 (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
2459 (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom):
2460 (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo):
2461 (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom):
2463 2018-10-12 Youenn Fablet <youenn@apple.com>
2465 Cache API tests are flaky due to file writing failing from time to time
2466 https://bugs.webkit.org/show_bug.cgi?id=190321
2468 Reviewed by Chris Dumez.
2470 Make NetworkCache::Storage::store callback return an error in case of writing failure.
2471 Use this to surface this error at Cache API level.
2473 Minor clean-up to make Storage::clear take a completion handler.
2475 Make also sure to create the folder before writing the file in CacheStorageEngine.
2476 As can be seen from some logging, it does happen that writing the 'origin' file sometimes fail with Posix error 9,
2477 which might mean the folder is not present.
2479 Changes are covered by current tests, flaky tests like http/wpt/cache-storage/cache-put-keys.https.any.worker.html
2480 will show a "failed writing data to the file system" error message.
2482 * NetworkProcess/cache/CacheStorageEngine.cpp:
2483 (WebKit::CacheStorage::Engine::writeFile):
2484 * NetworkProcess/cache/CacheStorageEngine.h:
2485 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2486 (WebKit::CacheStorage::Caches::storeOrigin):
2487 (WebKit::CacheStorage::Caches::writeCachesToDisk):
2488 (WebKit::CacheStorage::Caches::writeRecord):
2489 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2490 (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
2491 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2492 (WebKit::NetworkCache::Storage::finishWriteOperation):
2493 (WebKit::NetworkCache::Storage::store):
2494 (WebKit::NetworkCache::Storage::clear):
2495 * NetworkProcess/cache/NetworkCacheStorage.h:
2496 (WebKit::NetworkCache::Storage::store):
2498 2018-10-11 Youenn Fablet <youenn@apple.com>
2500 IOS 12 - Service worker cache not shared when added to homescreen
2501 https://bugs.webkit.org/show_bug.cgi?id=190269
2502 <rdar://problem/45009961>
2504 Reviewed by Alex Christensen.
2506 NetworkProcessProxy does not always have all its stores in its hash map.
2507 Make sure to check for the default web process pool store when grabbing cache storage parameters from a given session ID.
2509 Add a way to remove the default website data for testing.
2510 This is used in the new API test.
2512 * UIProcess/API/APIWebsiteDataStore.cpp:
2513 (API::WebsiteDataStore::deleteDefaultDataStoreForTesting):
2514 * UIProcess/API/APIWebsiteDataStore.h:
2515 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2516 (+[WKWebsiteDataStore _deleteDefaultDataStoreForTesting]):
2517 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2518 * UIProcess/Network/NetworkProcessProxy.cpp:
2519 (WebKit::NetworkProcessProxy::retrieveCacheStorageParameters):
2521 2018-10-10 Simon Fraser <simon.fraser@apple.com>
2523 Hide RenderLayer z-order and normal flow lists behind iterators
2524 https://bugs.webkit.org/show_bug.cgi?id=190457
2526 Reviewed by Zalan Bujtas.
2528 Expose the positive z-order, negative z-order and normal flow lists
2529 from RenderLayer as iterators rather than vectors of raw pointers.
2531 Use a lambda function to get access to the private constructor, while not having
2532 to refer to the nested RenderLayer::LayerIterator class in the header.
2534 * Shared/WebRenderLayer.cpp:
2535 (WebKit::WebRenderLayer::WebRenderLayer):
2536 (WebKit::WebRenderLayer::createArrayFromLayerList): Deleted.
2537 * Shared/WebRenderLayer.h:
2539 2018-10-11 Tim Horton <timothy_horton@apple.com>
2541 iOS: Scrolling using the arrow keys doesn't show the scroll indicator like it does on macOS
2542 https://bugs.webkit.org/show_bug.cgi?id=190478
2543 <rdar://problem/22194031>
2545 Reviewed by Megan Gardner.
2547 * Platform/spi/ios/UIKitSPI.h:
2550 * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
2551 (-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
2552 Do a persistent flash when scrolling continuously.
2554 (-[WKKeyboardScrollViewAnimator scrollWithScrollToExtentAnimationTo:]):
2555 Do a single flash when doing a scroll-to-top/bottom.
2557 2018-10-11 Tim Horton <timothy_horton@apple.com>
2559 Clicking on bookmarklet crashes at NavigationState::willRecordNavigationSnapshot
2560 https://bugs.webkit.org/show_bug.cgi?id=190476
2561 <rdar://problem/32757191>
2563 Reviewed by Megan Gardner.
2565 * UIProcess/API/Cocoa/WKWebView.mm:
2566 (-[WKWebView _saveBackForwardSnapshotForItem:]):
2567 The WKBackForwardListItem can be nil. Then we retrieve a reference from it.
2568 An Objective-C method that returns a reference is a great way to get
2569 a null reference. Other code then assumes it's not null and crashes.
2572 2018-10-11 Tim Horton <timothy_horton@apple.com>
2574 Hardware keyboard arrow keys/spacebar don't scroll PDFs (works for web content)
2575 https://bugs.webkit.org/show_bug.cgi?id=190495
2576 <rdar://problem/22734616>
2578 Reviewed by Andy Estes.
2580 Hook up WKKeyboardScrollViewAnimator to the scroll view when
2581 WKPDFView is installed.
2583 * Platform/spi/ios/UIKitSPI.h:
2584 Move _inputFlags to the IPI section so we can remove it
2585 from WKContentViewInteraction.
2588 * UIProcess/ios/WKWebEvent.h:
2589 * UIProcess/ios/WKWebEvent.mm:
2590 * UIProcess/ios/WKContentViewInteraction.mm:
2591 (-[WKContentView handleKeyEvent:]):
2592 (-[WKWebEvent dealloc]): Deleted.
2593 * WebKit.xcodeproj/project.pbxproj:
2594 Move WKWebEvent out of WKContentViewInteraction.
2595 We tend to prefer one file per class.
2596 Also, move the code to make a WKWebEvent from a UIEvent into
2597 -initWithEvent:, instead of being ad-hoc in WKContentViewInteraction.
2598 Adopt RetainPtr for the WKWebEvent's uiEvent property.
2600 * UIProcess/API/Cocoa/WKWebView.mm:
2601 (-[WKWebView _handleKeyUIEvent:]):
2602 * UIProcess/Cocoa/WKWebViewContentProvider.h:
2603 Plumb hardware keyboard events to custom content views, if they want them.
2605 * UIProcess/ios/WKPDFView.mm:
2606 (-[WKPDFView dealloc]):
2607 (-[WKPDFView web_handleKeyEvent:]):
2608 (-[WKPDFView web_initWithFrame:webView:mimeType:]):
2609 Install a WKKeyboardScrollViewAnimator and plumb key events to it.
2611 2018-10-11 Antoine Quint <graouts@apple.com>
2613 [Web Animations] Allow iOS to also control toggling Web Animations CSS Integration
2614 https://bugs.webkit.org/show_bug.cgi?id=190489
2616 Reviewed by Tim Horton.
2618 * UIProcess/API/Cocoa/WKPreferences.mm:
2619 (-[WKPreferences _setWebAnimationsCSSIntegrationEnabled:]):
2620 (-[WKPreferences _webAnimationsCSSIntegrationEnabled]):
2621 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2623 2018-10-11 Keith Rollin <krollin@apple.com>
2625 CURRENT_ARCH should not be used in Run Script phase.
2626 https://bugs.webkit.org/show_bug.cgi?id=190407
2627 <rdar://problem/45133556>
2629 Reviewed by Alexey Proskuryakov.
2631 CURRENT_ARCH is used in a number of Xcode Run Script phases. However,
2632 CURRENT_ARCH is not well-defined during this phase (and may even have
2633 the value "undefined") since this phase is run just once per build
2634 rather than once per supported architecture. Migrate away from
2635 CURRENT_ARCH in favor of ARCHS, either by iterating over ARCHS and
2636 performing an operation for each value, or by picking the first entry
2637 in ARCHS and using that as a representative value.
2639 * DerivedSources.make: When forming TARGET_TRIPLE_FLAGS, grab the
2640 first entry in ARCHS rather than use CURRENT_ARCH.
2642 2018-10-11 Chris Dumez <cdumez@apple.com>
2644 Regression(PSON): Deal with the drawing area potentially being null under WebChromeClient::contentsSizeChanged()
2645 https://bugs.webkit.org/show_bug.cgi?id=190474
2647 Reviewed by Geoffrey Garen.
2649 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2650 (WebKit::WebChromeClient::contentsSizeChanged const):
2652 2018-10-11 Alejandro G. Castro <alex@igalia.com>
2654 [GTK][WPE] Add mediaDevices.enumerateDevices support
2655 https://bugs.webkit.org/show_bug.cgi?id=185761
2657 Reviewed by Youenn Fablet.
2659 Implemented the enumerateDevices API using a new WebKit class
2660 (DeviceIdHashSaltStorage) that generates and stores the device ids
2661 hash salts per origin, used to avoid fingerprinting in the
2664 The patch also adds a new type of data for the WebsiteDataStore.
2665 That way the users can call the WebsiteDataStore to show what
2666 origins have hash salt generated and remove them at some point.
2668 For the moment just GTK+ and WPE ports are using this class to
2669 generate the hash salts. The patch adds code to the
2670 checkUserMediaPermissionForOrigin API implementation, it was empty
2671 until now for these ports. In this function we create an instance
2672 of a new class WebKitDeviceInfoPermissionRequest that implements
2673 the WebKitPermissionRequestIface interface, that allows the ports
2674 to use the current permission managers implemented in the
2675 embedders to handle this new kind of request the way they like
2676 it. The default implementation is deny.
2678 The class WebKitDeviceInfoPermissionRequest takes care of
2679 contacting the DeviceIdHashSaltStorage and request/regenerate the
2680 hash salts accordingly.
2682 Persistency is still not implemented, we will add it in a
2685 * Shared/WebsiteData/WebsiteDataType.h: Added the new type of
2686 webside data: DeviceIdHashSalt.
2687 * Sources.txt: Added new files to compilation.
2688 * SourcesGTK.txt: Ditto.
2689 * SourcesWPE.txt: Ditto.
2690 * UIProcess/API/glib/WebKitDeviceInfoPermissionRequest.cpp: Added
2691 this class to represent a request of permission to access the
2692 devices information. This is specific for glib ports and implements
2693 the policies regarding the hash salts when the embedder allows or
2694 denies the access using the DeviceIdHashSaltStorage class.
2695 (webkitDeviceInfoPermissionRequestAllow): Get the device hash salt
2696 when the origin is allowed and set it in the original request.
2697 (webkitDeviceInfoPermissionRequestDeny): Regenerate the device id
2698 hash salt when the user does not allow to access the device information.
2699 (webkit_permission_request_interface_init):
2700 (webkitDeviceInfoPermissionRequestDispose):
2701 (webkit_device_info_permission_request_class_init):
2702 (webkitDeviceInfoPermissionRequestCreate): Create the class using
2703 the proxy request from the webprocess and a reference to the
2704 DeviceIdHashSaltStorage.
2705 * UIProcess/API/glib/WebKitDeviceInfoPermissionRequestPrivate.h:
2707 * UIProcess/API/glib/WebKitUIClient.cpp: Added the implementation
2708 for the checkUserMediaPermissionForOrigin API for the glib ports,
2709 it creates the device info request and calls the permission
2711 * UIProcess/API/glib/WebKitWebsiteData.cpp:
2712 (recordContainsSupportedDataTypes): Added the DeviceIdHashSalt
2714 (toWebKitWebsiteDataTypes): Added the conversion from the WebKit
2715 types to the glib types for the WebsiteDataType::DeviceIdHashSalt.
2716 * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
2717 (toWebsiteDataTypes): Added the conversion from the glib type
2718 WEBKIT_WEBSITE_DATA_DEVICE_ID_HASH_SALT to the WebKit type.
2719 (webkit_website_data_manager_remove): Make sure we remote the
2720 DeviceIdHashSalt if the Cookies are selected.
2721 * UIProcess/API/gtk/WebKitDeviceInfoPermissionRequest.h: Added
2722 this new class that represents a permission request for the device
2723 information in the GTK+ port.
2724 * UIProcess/API/gtk/WebKitWebsiteData.h: Added the new type of
2725 website that in the GTK+ port:
2726 WEBKIT_WEBSITE_DATA_DEVICE_ID_HASH_SALT.
2727 * UIProcess/API/wpe/WebKitDeviceInfoPermissionRequest.h: Added
2728 this new class that represents a permission request for the device
2729 information in the WPE port.
2730 * UIProcess/API/wpe/WebKitWebsiteData.h: Added the new type of
2731 website that in the WPE port:
2732 WEBKIT_WEBSITE_DATA_DEVICE_ID_HASH_SALT.
2733 * UIProcess/DeviceIdHashSaltStorage.cpp: Added this new class that
2734 handles how to generate and store the hash salts inside
2735 WebKit. Persistency is still not implemented, we will add it in a
2737 (WebKit::DeviceIdHashSaltStorage::create):
2738 (WebKit::DeviceIdHashSaltStorage::deviceIdentifierHashSaltForOrigin):
2739 Check the map to get the hash salt for an origin, if there is none
2740 create a new random one.
2741 (WebKit::DeviceIdHashSaltStorage::regenerateDeviceIdentifierHashSaltForOrigin):
2742 Delete the hash salt of an origin if it already exists and create a new one.
2743 (WebKit::DeviceIdHashSaltStorage::getDeviceIdHashSaltOrigins):
2744 Returns the list of origins that have a hash salt generated for
2745 them. It is used in the WebsiteDataStore.
2746 (WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltForOrigins):
2747 Deletes the hash salts in the map for an origin.
2748 (WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltOriginsModifiedSince):
2749 Delete the origins that have not been modified since a time.
2750 * UIProcess/DeviceIdHashSaltStorage.h: Ditto.
2751 * UIProcess/UserMediaPermissionCheckProxy.h: Remove uneeded class
2753 * UIProcess/WebsiteData/WebsiteDataStore.cpp: Added support to
2754 return and remove the origins with a generate hash salt used to
2755 generate the device ids.
2756 (WebKit::WebsiteDataStore::WebsiteDataStore): Added the new
2757 reference to the DeviceIdHashSaltStorage class, used to handle the
2759 (WebKit::WebsiteDataStore::fetchDataAndApply): Get the list of
2760 origins with a hash salts in the DeviceIdHashSaltStorage.
2761 (WebKit::WebsiteDataStore::removeData): Remove the hash salts in
2762 DeviceIdHashSaltStorage for an origin.
2763 * UIProcess/WebsiteData/WebsiteDataStore.h: Ditto.
2764 (WebKit::WebsiteDataStore::deviceIdHashSaltStorage):
2765 * WebKit.xcodeproj/project.pbxproj: Added the
2766 DeviceIdHashSaltStorage to the compilation.
2768 2018-10-10 Tim Horton <timothy_horton@apple.com>
2770 Safari crashes when attempting to share a YouTube video while in full-screen
2771 https://bugs.webkit.org/show_bug.cgi?id=190456
2772 <rdar://problem/45130748>
2774 Reviewed by Wenson Hsieh.
2776 * Platform/spi/ios/UIKitSPI.h:
2777 * UIProcess/Cocoa/WKShareSheet.mm:
2778 (-[WKShareSheet presentWithParameters:completionHandler:]):
2779 Allow the share sheet to present centered, since we don't have enough
2780 context to put it in a more sensible place.
2782 2018-10-10 Tim Horton <timothy_horton@apple.com>
2784 REGRESSION (r236935): Layout test fast/events/ios/keyboard-scrolling-distance.html is timing out
2785 https://bugs.webkit.org/show_bug.cgi?id=190444
2786 <rdar://problem/45110698>
2788 Reviewed by Simon Fraser.
2790 There's a race in WKKeyboardScrollingAnimator that's exacerbated by HIDEventGenerator
2791 being much faster than a human finger. We get our "begin" events from interpretKeyEvent,
2792 after the Web Content process has had its way with it, but currently the
2793 back-channel "handle" events (e.g. for key up, which doesn't go to interpretKeyEvent)
2794 are retrieved from handleKeyWebEvent in the UI process, which is *before*
2795 the Web Content process has had a swing at it.
2797 If you lose the race (an insanely short tap like you get from HIDEventGenerator,
2798 or with a very busy Web Content process), we see handle(keyDown), handle(keyUp), begin(keyDown),
2799 and get stuck scrolling!
2801 Instead, retrieve the out-of-band "handle" events from _didHandleKeyEvent,
2802 so that they're sensibly and strictly ordered with respect to the timing of interpretKeyEvent/"begin".
2804 Also, hook up didFinishScrolling, so that UIScriptController's callbacks work correctly.
2806 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2807 * UIProcess/ios/WKContentViewInteraction.mm:
2808 (-[WKContentView handleKeyWebEvent:]):
2809 (-[WKContentView _didHandleKeyEvent:eventWasHandled:]):
2810 (-[WKContentView keyboardScrollViewAnimatorDidFinishScrolling:]):
2811 * UIProcess/ios/WKKeyboardScrollingAnimator.h:
2812 * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
2813 (-[WKKeyboardScrollingAnimator handleKeyEvent:]):
2814 (-[WKKeyboardScrollingAnimator displayLinkFired:]):
2815 (-[WKKeyboardScrollViewAnimator setDelegate:]):
2816 (-[WKKeyboardScrollViewAnimator handleKeyEvent:]):
2817 (-[WKKeyboardScrollViewAnimator didFinishScrolling]):
2819 2018-10-10 Tim Horton <timothy_horton@apple.com>
2821 Share more WKShareSheet code between macOS and iOS, and fix a few bugs
2822 https://bugs.webkit.org/show_bug.cgi?id=190420
2824 Reviewed by Simon Fraser.
2826 * UIProcess/API/Cocoa/WKWebView.mm:
2827 (-[WKWebView _resolutionForShareSheetImmediateCompletionForTesting]):
2828 (-[WKWebView _setShareSheetCompletesImmediatelyWithResolutionForTesting:]):
2829 (-[WKWebView _invokeShareSheetWithResolution:]): Deleted.
2830 Add a new mechanism to tell the share sheet up-front that it should
2831 immediately dismiss with a particular resolution, for testing.
2832 See the Tools ChangeLog for justification.
2833 We keep the bit on WKWebView instead of WKShareSheet so that it can be
2834 called prior to invoking the share sheet.
2836 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2837 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2838 * UIProcess/Cocoa/WKShareSheet.h:
2839 * UIProcess/Cocoa/WKShareSheet.mm:
2840 (-[WKShareSheet initWithView:]):
2841 (-[WKShareSheet presentWithParameters:completionHandler:]):
2842 (-[WKShareSheet sharingServicePicker:didChooseSharingService:]):
2843 (-[WKShareSheet _didCompleteWithSuccess:]):
2844 (-[WKShareSheet dismiss]):
2845 (-[WKShareSheet dispatchDidDismiss]):
2846 (-[WKShareSheet initWithView:initWithView:]): Deleted.
2847 (-[WKShareSheet _dispatchDidDismiss]): Deleted.
2848 (-[WKShareSheet _cancel]): Deleted.
2849 (-[WKShareSheet _dismissDisplayAnimated:]): Deleted.
2850 (-[WKShareSheet _presentFullscreenViewController:animated:]): Deleted.
2851 (-[WKShareSheet invokeShareSheetWithResolution:]): Deleted.
2852 Reduce the number of extraneous members, methods, and #ifdefs.
2853 Try to share as much of WKShareSheet between the platforms as makes sense.
2854 The interface is now totally identical on the two platforms.
2856 * UIProcess/Cocoa/WebViewImpl.mm:
2857 (WebKit::WebViewImpl::showShareSheet):
2858 * UIProcess/ios/WKContentViewInteraction.h:
2859 * UIProcess/ios/WKContentViewInteraction.mm:
2860 (-[WKContentView _showShareSheet:completionHandler:]):
2861 (-[WKContentView invokeShareSheetWithResolution:]): Deleted.
2862 Instead of silently failing (without even calling the completion handler!)
2863 if we try to present one share sheet on top of another, dismiss the first
2864 and present the new one. This is important because there are (separately
2865 filed) bugs on both platforms where the completion handler is not called;
2866 now, instead of a tab getting stuck forever, we'll reject the promise
2867 when another share takes place.
2869 2018-10-10 Tim Horton <timothy_horton@apple.com>
2871 REGRESSION (r236678): Keyboard scrolling with arrow keys doesn't work on iOS
2872 https://bugs.webkit.org/show_bug.cgi?id=190433
2873 <rdar://problem/45111986>
2875 Reviewed by Simon Fraser.
2877 * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
2878 (-[WKKeyboardScrollingAnimator keyboardScrollForEvent:]):
2879 (-[WKKeyboardScrollingAnimator beginWithEvent:]): Deleted.
2880 (-[WKKeyboardScrollViewAnimator beginWithEvent:]): Deleted.
2881 r236678 changes the characters in charactersIgnoringModifiers to match AppKit.
2882 We similarly need to update WKKeyboardScrollingAnimator's comparison.
2884 2018-10-10 Yusuke Suzuki <yusukesuzuki@slowstart.org>
2886 [JSC] Rename createXXX to tryCreateXXX if it can return RefPtr
2887 https://bugs.webkit.org/show_bug.cgi?id=190429
2889 Reviewed by Saam Barati.
2891 Use `tryCreate` or new `create`. If we use new `create`, we can use Ref<> and remove null check.
2893 * Shared/API/c/WKString.cpp:
2894 (WKStringCopyJSString):
2895 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
2896 (WebKit::toJSValue):
2897 (WebKit::callPropertyFunction):
2898 (WebKit::WebAutomationSessionProxy::scriptObjectForFrame):
2899 (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
2900 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2901 (WebKit::PDFPlugin::runScriptsInPDFDocument):
2903 2018-10-10 Chris Dumez <cdumez@apple.com>
2905 Regression(PSON): Assertion hit under WebPageProxy::didNavigateWithNavigationData()
2906 https://bugs.webkit.org/show_bug.cgi?id=190418
2907 <rdar://problem/45059769>
2909 Reviewed by Geoffrey Garen.
2911 When process swapping and "suspending" the previous WebProcess in a SuspendedPageProxy,
2912 we need to keep around the main frame's ID that still exists on in this process. This
2913 is needed so that we can re-create a UI-side WebFrameProxy for the WebFrame that exists
2914 in the WebProcess, if we ever swap back to this suspended process (see login in
2915 WebPageProxy::swapToWebProcess()).
2917 The bug was that the main frame ID was stored on the WebPageProxy via m_mainFrameID instead of the
2918 SuspendedPageProxy. This means that m_mainFrameID would get overriden when navigating in the new
2919 WebProcess with the value 1 (because WebFrame identifiers start at 1 and are per-WebProcess).
2920 This would lead to us constructing a WebFrameProxy with the wrong frame identifier in
2921 WebPageProxy::swapToWebProcess(), which would override an existing unrelated WebFrame in the
2922 WebProcessProxy's HashMap of frames. This would lead to crashes later on as the WebFrame
2923 would not be associated to the WebPageProxy we expect.
2925 * UIProcess/SuspendedPageProxy.cpp:
2926 (WebKit::SuspendedPageProxy::SuspendedPageProxy):
2927 * UIProcess/SuspendedPageProxy.h:
2928 (WebKit::SuspendedPageProxy::mainFrameID const):
2929 * UIProcess/WebPageProxy.cpp:
2930 (WebKit::WebPageProxy::maybeCreateSuspendedPage):
2931 (WebKit::WebPageProxy::swapToWebProcess):
2932 (WebKit::WebPageProxy::continueNavigationInNewProcess):
2933 (WebKit::WebPageProxy::didCreateMainFrame):
2934 * UIProcess/WebPageProxy.h:
2935 * UIProcess/WebProcessProxy.cpp:
2936 (WebKit::WebProcessProxy::suspendWebPageProxy):
2937 * UIProcess/WebProcessProxy.h:
2939 2018-10-10 Antti Koivisto <antti@apple.com>
2941 Do domain prewarming for processes for new tabs
2942 https://bugs.webkit.org/show_bug.cgi?id=190425
2944 Reviewed by Chris Dumez.
2946 We currently only do domain prewarming for navigation process swaps.
2948 * UIProcess/WebProcessPool.cpp:
2949 (WebKit::WebProcessPool::processForNavigationInternal):
2951 Do domain prewarming when using an existing but so far unused process.
2953 (WebKit::WebProcessPool::tryPrewarmWithDomainInformation):
2955 Factor into a function.
2957 * UIProcess/WebProcessPool.h:
2958 * WebProcess/WebPage/WebPage.cpp:
2959 (WebKit::WebPage::close):
2961 This didn't usually get invoked.
2963 (WebKit::WebPage::didReceivePolicyDecision):
2964 (WebKit::WebPage::didFinishLoad):
2966 Update prewarm information when a top level load finishes.
2968 * WebProcess/WebProcess.cpp:
2969 (WebKit::WebProcess::sendPrewarmInformation):
2970 * WebProcess/WebProcess.h:
2972 2018-10-09 Antoine Quint <graouts@apple.com>
2974 Remove the frames() timing function
2975 https://bugs.webkit.org/show_bug.cgi?id=190034
2976 <rdar://problem/44827544>
2978 Reviewed by Dean Jackson.
2980 * Shared/WebCoreArgumentCoders.cpp:
2981 (IPC::ArgumentCoder<FramesTimingFunction>::encode): Deleted.
2982 (IPC::ArgumentCoder<FramesTimingFunction>::decode): Deleted.
2983 * Shared/WebCoreArgumentCoders.h:
2984 * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
2985 (WebKit::PlatformCAAnimationRemote::Properties::encode const):
2986 (WebKit::PlatformCAAnimationRemote::Properties::decode):
2988 2018-10-09 Youenn Fablet <youenn@apple.com>
2990 ASSERTION FAILED: m_cachesLocks.contains(sessionID) in WebKit::CacheStorageEngineConnection::dereference(PAL::SessionID, unsigned long long)
2991 https://bugs.webkit.org/show_bug.cgi?id=190373
2992 <rdar://problem/45106402>
2994 Reviewed by Alex Christensen.
2996 This assertion can be hit if:
2997 - WebProcess has a DOMCache
2998 - NetworkProcess crashes
2999 - WebProcess navigates and dereference DOMCache.
3000 Remove this assertion as it is hit when a test is using testRunner.terminateNetworkProcess().
3002 * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
3003 (WebKit::CacheStorageEngineConnection::dereference):
3005 2018-10-09 Jer Noble <jer.noble@apple.com>
3007 Crash when closing WKWebView during enter fullscreen animation
3008 https://bugs.webkit.org/show_bug.cgi?id=190412
3010 Reviewed by Brian Burg.
3012 We need a valid _webView if, during -[NSWindow close], we catch a notification saying we failed to enter
3013 fullscreen and try to replace the placeholder with the actual _webView.
3015 * UIProcess/mac/WKFullScreenWindowController.mm:
3016 (-[WKFullScreenWindowController close]):
3018 2018-10-09 Alex Christensen <achristensen@webkit.org>
3020 REGRESSION(r231663) loading in hidden WKWebViews stalls because WebProcess is suspended
3021 https://bugs.webkit.org/show_bug.cgi?id=190417
3022 <rdar://problem/43391014>
3024 Reviewed by Chris Dumez.
3026 * UIProcess/Cocoa/NavigationState.mm:
3027 (WebKit::NavigationState::didChangeIsLoading):
3028 Revert r321663, but keep the change to TestWKWebView.mm because that made the tests more reliable.
3030 2018-10-09 Chris Dumez <cdumez@apple.com>
3032 Allow behavior when the parent process IPC::Connection closes to be overridden by ChildProcess subclasses
3033 https://bugs.webkit.org/show_bug.cgi?id=190294
3035 Reviewed by Geoffrey Garen.
3037 Allow behavior when the parent process IPC::Connection closes to be overridden by ChildProcess subclasses.
3038 This will be useful to allow the NetworkProcess to not exit if it still has pending downloads.
3040 * NetworkProcess/NetworkProcess.cpp:
3041 (WebKit::callExitSoon):
3042 (WebKit::NetworkProcess::initializeConnection):
3043 * NetworkProcess/NetworkProcess.h:
3044 * PluginProcess/PluginProcess.cpp:
3046 (WebKit::PluginProcess::initializeConnection):
3047 * PluginProcess/PluginProcess.h:
3048 * Shared/ChildProcess.cpp:
3049 (WebKit::ChildProcess::didClose):
3050 (WebKit::ChildProcess::initialize):
3051 (WebKit::callExitNow): Deleted.
3052 (WebKit::callExitSoon): Deleted.
3053 * Shared/ChildProcess.h:
3054 (WebKit::ChildProcess::shouldCallExitWhenConnectionIsClosed const): Deleted.
3055 * WebProcess/WebProcess.cpp:
3057 (WebKit::WebProcess::initializeConnection):
3059 2018-10-09 Jer Noble <jer.noble@apple.com>
3061 WebDriver: thrown ObjC exception under -[WKFullScreenWindowController windowDidFailToEnterFullScreen:] when session is terminated
3062 https://bugs.webkit.org/show_bug.cgi?id=190098
3063 <rdar://problem/42822671>
3065 Reviewed by Brian Burg.
3067 Forcibly exit fullscreen in resetState(), while the VideoFullscreenManagerProxy is still valid.
3069 * UIProcess/WebPageProxy.cpp:
3070 (WebKit::WebPageProxy::resetState):
3072 2018-10-09 Daniel Bates <dabates@apple.com>
3074 [iOS] Ignore some deprecated declarations
3075 https://bugs.webkit.org/show_bug.cgi?id=190371
3077 Reviewed by Dan Bernstein.
3079 * UIProcess/ios/WKActionSheet.mm:
3080 (-[WKActionSheet init]):
3081 (-[WKActionSheet presentSheet:]):
3082 * UIProcess/ios/WKActionSheetAssistant.mm:
3083 (-[WKActionSheetAssistant presentSheet]):
3084 * UIProcess/ios/WKContentViewInteraction.mm:
3085 * UIProcess/ios/forms/WKFormSelectPicker.mm:
3086 (-[WKMultipleSelectPicker initWithView:]):
3087 * UIProcess/ios/forms/WKFormSelectPopover.mm:
3088 (-[WKSelectTableViewController initWithView:hasGroups:]):
3090 2018-10-09 Claudio Saavedra <csaavedra@igalia.com>
3092 [WPE] Explicitly link against gmodule where used
3093 https://bugs.webkit.org/show_bug.cgi?id=190398
3095 Reviewed by Michael Catanzaro.
3097 * PlatformWPE.cmake:
3099 2018-10-09 Chris Dumez <cdumez@apple.com>
3101 PSON: Doing a cross-site navigation via the URL bar does not swap process on iOS
3102 https://bugs.webkit.org/show_bug.cgi?id=190378
3103 <rdar://problem/45059466>
3105 Reviewed by Geoffrey Garen.
3107 Process swapping was sometimes not happening via URL bar navigation on iOS due to top-hit preloading,
3108 which would use a new WKWebView for the speculative load and rely on the _relatedWebView SPI to use
3109 the same WebContent process as the view currently on screen.
3111 To address the issue, if the source URL is empty and the page has a related page, use the related
3112 page's URL as source URL when doing the process-swap decision.
3114 * UIProcess/API/APIPageConfiguration.cpp:
3115 (API::PageConfiguration::relatedPage const):
3116 (API::PageConfiguration::relatedPage): Deleted.
3117 * UIProcess/API/APIPageConfiguration.h:
3118 * UIProcess/WebProcessPool.cpp:
3119 (WebKit::WebProcessPool::processForNavigationInternal):
3121 2018-10-09 Andy Estes <aestes@apple.com>
3123 [iOS] Replace @"UIPreviewDataAttachmentListIsContentManaged" with a UIKit constant
3124 https://bugs.webkit.org/show_bug.cgi?id=190400
3125 <rdar://problem/35442879>
3127 Reviewed by Wenson Hsieh.
3129 Also fixed the iOS version check in WKContentViewInteraction.mm.
3131 * Platform/spi/ios/UIKitSPI.h:
3132 * UIProcess/ios/WKContentViewInteraction.mm:
3133 (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
3135 2018-10-09 Tim Horton <timothy_horton@apple.com>
3137 REGRESSION (r232416): Can not scroll after swiping back on quoteunquoteapps.com
3138 https://bugs.webkit.org/show_bug.cgi?id=190377
3139 <rdar://problem/45108222>
3141 Reviewed by Andy Estes.
3143 Introduce the notion of 'pausing' to SnapshotRemovalTracker.
3144 Reimplement r232416 in terms of this: the SnapshotRemovalTracker
3145 starts out paused (not accepting events), and un-pauses when
3146 we get a provisional load or same-document navigation.
3147 This way, we don't lose the watchdog timer in cases where we get
3148 no provisional load, same-document navigation, or main frame load
3149 (which is the separate root cause for this bug -- this just papers
3150 over it with a timeout).
3152 * UIProcess/Cocoa/ViewGestureController.cpp:
3153 (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
3154 (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
3155 Resume the snapshot removal tracker.
3157 (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
3158 If we didn't see a provisional load or same document navigation,
3159 but somehow got to the terminal load state, immediately remove the snapshot.
3161 (WebKit::ViewGestureController::SnapshotRemovalTracker::resume):
3162 (WebKit::ViewGestureController::SnapshotRemovalTracker::start):
3163 Start the SnapshotRemovalTracker out in the paused state; it will be
3164 resumed in the same places we previously would call the
3165 provisionalOrSameDocumentLoadCallback.
3167 (WebKit::ViewGestureController::SnapshotRemovalTracker::stopWaitingForEvent):
3168 Ignore (but debug log) incoming events while paused.
3170 * UIProcess/Cocoa/ViewGestureController.h:
3171 (WebKit::ViewGestureController::SnapshotRemovalTracker::pause):
3172 (WebKit::ViewGestureController::SnapshotRemovalTracker::isPaused const):
3173 Add the pausing bit.
3175 * UIProcess/ios/ViewGestureControllerIOS.mm:
3176 (WebKit::ViewGestureController::endSwipeGesture):
3177 * UIProcess/mac/ViewGestureControllerMac.mm:
3178 (WebKit::ViewGestureController::endSwipeGesture):
3179 Remove m_provisionalOrSameDocumentLoadCallback.
3181 2018-10-09 Antti Koivisto <antti@apple.com>
3183 Prewarm FontDatabase on process swap
3184 https://bugs.webkit.org/show_bug.cgi?id=190312
3186 Reviewed by Chris Dumez.
3188 Add mechanism for caching prewarm information per domain on UI process side. This information
3189 is then passed to newly initialized web processes that are being used for the same domain.
3191 * UIProcess/WebPageProxy.h:
3192 * UIProcess/WebProcessPool.cpp:
3193 (WebKit::WebProcessPool::processForNavigationInternal):
3195 Pass prewarm information on process swap to the new process.
3197 (WebKit::WebProcessPool::didCollectPrewarmInformation):
3199 UI process side cache.
3201 * UIProcess/WebProcessPool.h:
3202 * UIProcess/WebProcessProxy.cpp:
3203 (WebKit::WebProcessProxy::didCollectPrewarmInformation):
3204 * UIProcess/WebProcessProxy.h:
3205 * UIProcess/WebProcessProxy.messages.in:
3206 * WebProcess/WebPage/WebPage.cpp:
3207 (WebKit::WebPage::close):
3208 (WebKit::WebPage::didReceivePolicyDecision):
3210 Collect and cache prewarm information for the previous process on process swap.
3212 * WebProcess/WebProcess.cpp:
3213 (WebKit::WebProcess::prewarmGlobally):
3215 Renamed for clarity.
3217 (WebKit::WebProcess::prewarmWithDomainInformation):
3218 (WebKit::WebProcess::sendPrewarmInformation):
3219 * WebProcess/WebProcess.h:
3220 * WebProcess/WebProcess.messages.in:
3222 2018-10-08 Wenson Hsieh <wenson_hsieh@apple.com>
3224 [Cocoa] [WK2] Add support for text alignment and text lists in font attributes
3225 https://bugs.webkit.org/show_bug.cgi?id=190342
3226 <rdar://problem/44767118>
3228 Reviewed by Tim Horton.
3230 Add encoding and decoding for text alignment and text lists in FontAttributes.
3232 * Shared/WebCoreArgumentCoders.cpp:
3233 (IPC::ArgumentCoder<FontAttributes>::encode):
3234 (IPC::ArgumentCoder<FontAttributes>::decode):
3236 2018-10-08 Justin Fan <justin_fan@apple.com>
3238 WebGPU: Rename old WebGPU prototype to WebMetal
3239 https://bugs.webkit.org/show_bug.cgi?id=190325
3240 <rdar://problem/44990443>
3242 Reviewed by Dean Jackson.
3244 Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.
3246 * Configurations/FeatureDefines.xcconfig:
3247 * Shared/WebPreferences.yaml:
3248 * WebProcess/InjectedBundle/InjectedBundle.cpp:
3249 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3251 2018-10-08 Wenson Hsieh <wenson_hsieh@apple.com>
3253 Followup to r236942: Make input type=color an internal feature
3254 https://bugs.webkit.org/show_bug.cgi?id=189162
3256 Rubber-stamped by Dean Jackson.
3258 I've learned from Dean that an internal feature is more suitable than an experimental feature in this scenario.
3260 * Shared/WebPreferences.yaml:
3262 2018-10-08 Aditya Keerthi <akeerthi@apple.com>
3264 Make <input type=color> a runtime enabled (on-by-default) feature
3265 https://bugs.webkit.org/show_bug.cgi?id=189162
3267 Reviewed by Wenson Hsieh and Tim Horton.
3269 * Configurations/FeatureDefines.xcconfig:
3270 * Shared/WebPreferences.yaml:
3272 Add an experimental feature flag for input type=color.
3274 * UIProcess/mac/WebColorPickerMac.mm:
3275 (-[WKPopoverColorWell webDelegate]):
3276 (-[WKPopoverColorWell setWebDelegate:]):
3278 2018-10-08 Tim Horton <timothy_horton@apple.com>
3280 Try to fix the build
3282 * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
3284 2018-10-08 Brian Burg <bburg@apple.com>
3286 [Mac] Web Automation: some keyboard interactions don't generate events, causing event simulation to stall
3287 https://bugs.webkit.org/show_bug.cgi?id=190316
3288 <rdar://problem/42833290>
3290 Reviewed by Tim Horton.
3292 Some users have reported that Cmd-A for Select All no longer works in safaridriver.
3293 Instead, this hangs the session. This happens because the WebAutomationSession class
3294 assumes that each call to simulateKeyboardInteraction causes keyboard events to be processed,
3295 but in corner cases like Cmd-A, some events that we simulate are swallowed by AppKit and
3296 never make it back to WebKit. Because the session never gets the "keyboard events flushed"
3297 callback, it assumes the interaction is still ongoing, and never returns, causing a hang.
3299 This patch consists of two parts:
3300 - Add logging of important state changes and events when simulating user input.
3301 - Make code more robust when simulating key actions that generate no events on macOS.
3303 This change progresses WPT test key_shortcuts.py::test_mod_a_and_backspace_deletes_all_text on Mac.
3305 * Platform/Logging.h: Add a logging channel.
3306 * UIProcess/Automation/SimulatedInputDispatcher.cpp:
3307 (WebKit::SimulatedInputDispatcher::keyFrameTransitionDurationTimerFired):
3308 (WebKit::SimulatedInputDispatcher::transitionBetweenKeyFrames):
3309 (WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
3310 (WebKit::SimulatedInputDispatcher::run):
3311 (WebKit::SimulatedInputDispatcher::finishDispatching):
3312 Add a bunch of logging so its easier to figure out where things get stuck.
3314 * UIProcess/Automation/WebAutomationSession.cpp:
3315 (WebKit::WebAutomationSession::simulateKeyboardInteraction):
3316 In some cases, no keyboard events need to be processed for the simulated interaction.
3317 When that happens, early exit rather than waiting for keyboard events to be flushed.
3319 * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
3320 (WebKit::WebAutomationSession::sendSynthesizedEventsToPage): Logging.
3321 (WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):
3322 On Mac, if you tap a character key while Command is held down, only a KeyDown event
3323 is forwarded to the first responder by AppKit, even if you send a KeyUp event too.
3324 In this case don't send an NSEvent since it won't ever be delivered back to WebKit.
3326 * UIProcess/WebPageProxy.h:
3327 * UIProcess/WebPageProxy.cpp:
3328 (WebKit::WebPageProxy::isProcessingKeyboardEvents const): Expose this state for keyboard
3331 2018-10-08 Youenn Fablet <youenn@apple.com>
3333 NetworkCache::Storage should be WTF::DestructionThread::Main
3334 https://bugs.webkit.org/show_bug.cgi?id=190324
3336 Reviewed by Alex Christensen.
3338 Use WTF::DestructionThread::Main to make sure that Storage is destroyed in the main thread.
3339 Remove the code that was making sure that any ref was destroyed in the main thread.
3341 * NetworkProcess/cache/CacheStorageEngineCaches.cpp: Make sure the completion handler is not null.
3342 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3343 (WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation): Make it clear that a ref is taken.
3344 (WebKit::NetworkCache::Storage::Storage):
3345 (WebKit::NetworkCache::Storage::synchronize): Protect 'this' when dispatching back to the main thread.
3346 Move the code that was after dispatch before dispatch to allow moving protectedThis in the dispatch lambda.
3347 (WebKit::NetworkCache::Storage::remove):
3348 (WebKit::NetworkCache::Storage::traverse):
3349 (WebKit::NetworkCache::Storage::clear):
3350 (WebKit::NetworkCache::Storage::deleteOldVersions):
3351 * NetworkProcess/cache/NetworkCacheStorage.h:
3353 2018-10-08 Tim Horton <timothy_horton@apple.com>
3355 Adjust keyboard scrolling animator to springy and semiphysical
3356 https://bugs.webkit.org/show_bug.cgi?id=190345
3357 <rdar://problem/43494393>
3359 Reviewed by Simon Fraser.
3361 Introduce WKKeyboardScrollViewAnimator, which wraps WKKeyboardScrollingAnimator
3362 and provides a reasonable set of default behaviors for UIScrollView.
3363 This is the first step on the way to WKKeyboardScrollingAnimator
3364 being platform- and toolkit-agnostic, and helps avoid adding a whole
3365 bunch of code to WKContentView.
3367 Adopt UIKit's scroll-to-top animation curve for whole-document scrolls.
3369 Adjust WKKeyboardScrollingAnimator's physics; it now simulates a spring
3370 attached to the page when decelerating. When a key is pressed, it applies
3371 a constant force to the page (up to some maximum velocity). When released,
3372 the spring causes the page to decelerate smoothly.
3374 Add rubber-banding to keyboard scrolling, based on the same spring that
3375 decelerates the page.
3377 Remove the initial bounce on keydown before starting the smooth scroll.
3379 Remove arrow key commands from WKContentView; this avoids double-processing
3380 incoming arrow key events, makes the event stream make more sense, and was
3381 entirely unnecessary.
3383 * Platform/spi/ios/UIKitSPI.h:
3384 Add a wide variety of useful SPI.
3386 * UIProcess/API/Cocoa/WKWebView.mm:
3387 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3388 Remove _scrollByContentOffset:animated: because it's only used by
3389 the keyboard scrolling mechanism.
3391 Remove _arrowKey because we're removing the arrow key commands.
3393 * UIProcess/ios/WKContentViewInteraction.h:
3394 * UIProcess/ios/WKContentViewInteraction.mm:
3395 (-[WKContentView setupInteraction]):
3396 Create a WKKeyboardScrollViewAnimator (which knows how to directly
3397 manipulate a UIScrollView) instead of a WKKeyboardScrollingAnimator
3398 (which requires its clients to implement everything in terms of an
3401 (-[WKContentView scrollViewWillStartPanOrPinchGesture]):
3402 Inform the keyboard scrolling animator that the user is going to start
3403 an interactive gesture that needs control of the scroll view, so it
3404 can stop its current animated scroll.
3406 (-[WKContentView canPerformActionForWebView:withSender:]):
3407 (-[WKContentView keyCommands]):
3408 (-[WKContentView _arrowKeyForWebView:]): Deleted.
3409 Remove arrow key commands.
3411 (-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
3412 Scale from content to WKWebView coordinate space; the keyboard scrolling
3413 animator operates in WKWebView coordinates. This was broken before.
3415 (-[WKContentView keyboardScrollViewAnimatorWillScroll:]):
3416 (-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
3417 (-[WKContentView isKeyboardScrollable]): Deleted.
3418 (-[WKContentView distanceForScrollingIncrement:]): Deleted.
3419 (-[WKContentView scrollByContentOffset:animated:]): Deleted.