Add SPI to give injected bundles access to displayed PDFDocuments
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-04-01  Remy Demarest  <rdemarest@apple.com>
2
3         Add SPI to give injected bundles access to displayed PDFDocuments
4         https://bugs.webkit.org/show_bug.cgi?id=196471
5         <rdar://problem/48080768>
6
7         Reviewed by Tim Horton.
8
9         * WebKit.xcodeproj/project.pbxproj:
10
11         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageMac.h: Added.
12         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageMac.mm: Added.
13         (WKBundlePageGetPDFDocumentInFrame):
14
15 2019-04-01  Wenson Hsieh  <wenson_hsieh@apple.com>
16
17         [WebKit2] Introduce a public version of WKWebsitePolicies
18         https://bugs.webkit.org/show_bug.cgi?id=195989
19         <rdar://problem/47228232>
20
21         Reviewed by Tim Horton.
22
23         Expose the existing _WKWebsitePolicies object as WKWebpagePreferences, in what will eventually become a public
24         header in the WebKit SDK (WKWebpagePreferences.h). Following a similar transitioning strategy as
25         _WKWebsiteDataStore and WKWebsiteDataStore, we move existing logic from _WKWebsitePolicies to WKWebpagePreferences
26         and make _WKWebsitePolicies a wrapper around WKWebpagePreferences.
27
28         No change in behavior.
29
30         * Shared/Cocoa/APIObject.mm:
31         (API::Object::newObject):
32
33         Wrap API::WebsitePolicies with WKWebpagePreferences.
34
35         * SourcesCocoa.txt:
36         * UIProcess/API/Cocoa/WKWebView.mm:
37         (-[WKWebView _updateWebsitePolicies:]):
38         * UIProcess/API/Cocoa/WKWebpagePreferences.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePoliciesInternal.h.
39         * UIProcess/API/Cocoa/WKWebpagePreferences.mm: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.mm.
40
41         Introduce WKWebpagePreferences.
42
43         (+[WKWebpagePreferences defaultPreferences]):
44         (-[WKWebpagePreferences dealloc]):
45         (-[WKWebpagePreferences init]):
46         (-[WKWebpagePreferences _setContentBlockersEnabled:]):
47         (-[WKWebpagePreferences _contentBlockersEnabled]):
48         (-[WKWebpagePreferences _setAllowedAutoplayQuirks:]):
49         (-[WKWebpagePreferences _allowedAutoplayQuirks]):
50         (-[WKWebpagePreferences _setAutoplayPolicy:]):
51         (-[WKWebpagePreferences _autoplayPolicy]):
52         (-[WKWebpagePreferences _setDeviceOrientationAndMotionAccessPolicy:]):
53         (-[WKWebpagePreferences _deviceOrientationAndMotionAccessPolicy]):
54         (-[WKWebpagePreferences _setPopUpPolicy:]):
55         (-[WKWebpagePreferences _popUpPolicy]):
56         (-[WKWebpagePreferences _customHeaderFields]):
57         (-[WKWebpagePreferences _setCustomHeaderFields:]):
58         (-[WKWebpagePreferences _websiteDataStore]):
59         (-[WKWebpagePreferences _setWebsiteDataStore:]):
60         (-[WKWebpagePreferences _setCustomUserAgent:]):
61         (-[WKWebpagePreferences _customUserAgent]):
62         (-[WKWebpagePreferences _setCustomJavaScriptUserAgentAsSiteSpecificQuirks:]):
63         (-[WKWebpagePreferences _customJavaScriptUserAgentAsSiteSpecificQuirks]):
64         (-[WKWebpagePreferences _setCustomNavigatorPlatform:]):
65         (-[WKWebpagePreferences _customNavigatorPlatform]):
66         (-[WKWebpagePreferences _apiObject]):
67         * UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePoliciesInternal.h.
68         * UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.h.
69
70         Reintroduce all the interfaces currently available on _WKWebsitePolicies as underscore-prefixed SPI on
71         WKWebpagePreferences.
72
73         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
74         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
75
76         Make _WKWebsitePolicies wrap WKWebpagePreferences, and plumb all existing SPI on WKWebsitePolicies through to
77         WKWebpagePreferences.
78
79         (-[_WKWebsitePolicies init]):
80         (-[_WKWebsitePolicies webpagePreferences]):
81         (-[_WKWebsitePolicies setContentBlockersEnabled:]):
82         (-[_WKWebsitePolicies contentBlockersEnabled]):
83         (-[_WKWebsitePolicies setAllowedAutoplayQuirks:]):
84         (-[_WKWebsitePolicies allowedAutoplayQuirks]):
85         (-[_WKWebsitePolicies setAutoplayPolicy:]):
86         (-[_WKWebsitePolicies autoplayPolicy]):
87         (-[_WKWebsitePolicies setDeviceOrientationAndMotionAccessPolicy:]):
88         (-[_WKWebsitePolicies deviceOrientationAndMotionAccessPolicy]):
89         (-[_WKWebsitePolicies setPopUpPolicy:]):
90         (-[_WKWebsitePolicies popUpPolicy]):
91         (-[_WKWebsitePolicies customHeaderFields]):
92         (-[_WKWebsitePolicies setCustomHeaderFields:]):
93         (-[_WKWebsitePolicies websiteDataStore]):
94         (-[_WKWebsitePolicies setWebsiteDataStore:]):
95         (-[_WKWebsitePolicies setCustomUserAgent:]):
96         (-[_WKWebsitePolicies customUserAgent]):
97         (-[_WKWebsitePolicies setCustomJavaScriptUserAgentAsSiteSpecificQuirks:]):
98         (-[_WKWebsitePolicies customJavaScriptUserAgentAsSiteSpecificQuirks]):
99         (-[_WKWebsitePolicies setCustomNavigatorPlatform:]):
100         (-[_WKWebsitePolicies customNavigatorPlatform]):
101         (-[_WKWebsitePolicies description]):
102         (-[_WKWebsitePolicies _apiObject]):
103         (-[_WKWebsitePolicies dealloc]): Deleted.
104         * UIProcess/API/Cocoa/_WKWebsitePoliciesInternal.h:
105         * UIProcess/Cocoa/NavigationState.mm:
106         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
107         * WebKit.xcodeproj/project.pbxproj:
108
109 2019-04-01  Wenson Hsieh  <wenson_hsieh@apple.com>
110
111         Unable to copy and paste a PDF from Notes into Mail compose body
112         https://bugs.webkit.org/show_bug.cgi?id=196442
113         <rdar://problem/48573098>
114
115         Reviewed by Tim Horton.
116
117         Relax the -canPerformAction: logic in the case of pasting an attachment. Consider an NSItemProvider to possibly
118         paste as an attachment if either it has a preferred presentation style of UIPreferredPresentationStyleAttachment
119         or has a style of UIPreferredPresentationStyleUnspecified, but has a suggested file name.
120
121         This allows for the "Paste" action to be shown in the callout menu when copying and pasting a non-text file.
122
123         * UIProcess/ios/WKContentViewInteraction.mm:
124         (-[WKContentView canPerformActionForWebView:withSender:]):
125
126 2019-04-01  Tim Horton  <timothy_horton@apple.com>
127
128         Make UIWKDocumentContext rects per-character instead of per-word
129         https://bugs.webkit.org/show_bug.cgi?id=196459
130
131         Reviewed by Wenson Hsieh.
132
133         * WebProcess/WebPage/ios/WebPageIOS.mm:
134         (WebKit::WebPage::requestDocumentEditingContext):
135         Switch to CharacterIterator instead of TextIterator directly, to get
136         per-character rects as the API requests.
137
138 2019-04-01  Chris Dumez  <cdumez@apple.com>
139
140         UIProcess crash when a prewarmed process is terminated
141         https://bugs.webkit.org/show_bug.cgi?id=196451
142         <rdar://problem/49245471>
143
144         Reviewed by Geoffrey Garen.
145
146         Stop assuming that WebProcessProxy::m_websiteDataStore is non-null as this is no longer
147         true after r243384. For example, prewarmed WebContent processe do not get a data store
148         until they actually get used.
149
150         * UIProcess/API/Cocoa/WKProcessPool.mm:
151         (-[WKProcessPool _prewarmedProcessIdentifier]):
152         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
153         * UIProcess/WebProcessPool.cpp:
154         (WebKit::WebProcessPool::networkProcessIdentifier):
155         (WebKit::WebProcessPool::prewarmedProcessIdentifier):
156         * UIProcess/WebProcessPool.h:
157         * UIProcess/WebProcessProxy.cpp:
158         (WebKit::WebProcessProxy::didClose):
159         (WebKit::WebProcessProxy::didFinishLaunching):
160         (WebKit::WebProcessProxy::requestTermination):
161         (WebKit::WebProcessProxy::isReleaseLoggingAllowed const):
162         * UIProcess/WebProcessProxy.h:
163
164 2019-04-01  Patrick Griffis  <pgriffis@igalia.com>
165
166         [GTK][WPE] Add more websitedatastore directories to web process sandbox
167         https://bugs.webkit.org/show_bug.cgi?id=196447
168
169         Reviewed by Michael Catanzaro.
170
171         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
172         (WebKit::bubblewrapSpawn):
173         * UIProcess/glib/WebProcessProxyGLib.cpp:
174         (WebKit::WebProcessProxy::platformGetLaunchOptions):
175
176 2019-04-01  Per Arne Vollan  <pvollan@apple.com>
177
178         [macOS] Crash when loading Twitter with autoplay video enabled.
179         https://bugs.webkit.org/show_bug.cgi?id=196446
180         <rdar://problem/49060359>
181
182         Reviewed by Brent Fulgham.
183
184         This is caused by a syscall violation.
185
186         * WebProcess/com.apple.WebProcess.sb.in:
187
188 2019-04-01  Patrick Griffis  <pgriffis@igalia.com>
189
190         [GTK][WPE] Fix seccomp rule for blacklisting TIOCSTI
191         https://bugs.webkit.org/show_bug.cgi?id=196297
192
193         Reviewed by Michael Catanzaro.
194
195         More information can be found here: https://www.exploit-db.com/exploits/46594
196
197         Note that this sandbox never made it into production so does not
198         warrant any CVE specific to WebKit.
199
200         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
201         (WebKit::setupSeccomp):
202
203 2019-03-31  Wenson Hsieh  <wenson_hsieh@apple.com>
204
205         [iOS] Crash when changing inputmode for certain types of focusable elements
206         https://bugs.webkit.org/show_bug.cgi?id=196431
207         <rdar://problem/49454962>
208
209         Reviewed by Tim Horton.
210
211         The crash is happening because WebPage::focusedElementDidChangeInputMode assumes that the document's focused
212         element must be the same as m_focusedElement in WebPage. However, this is not the case, since m_focusedElement
213         is only set for certain types of elements that require user input (e.g. text fields, editable content, select
214         menus, etc.). The function then attempts to dereference m_focusedElement, which may be null if the document's
215         focused element doesn't fall into one of the aforementioned categories.
216
217         To fix this, bail if the element that is changing inputmode is not equal to the WebPage's current focused
218         element. See below for more details.
219
220         Test: fast/forms/change-inputmode-crash.html
221
222         * WebProcess/WebPage/WebPage.cpp:
223         (WebKit::isTextFormControlOrEditableContent):
224
225         Clean up some existing logic by introducing a helper method for determining whether an element should
226         propagate inputmode attribute changes to the UI process. Also, check the element type using type traits instead
227         of checking against the tag name.
228
229         (WebKit::WebPage::elementDidFocus):
230         (WebKit::WebPage::focusedElementDidChangeInputMode):
231
232 2019-03-31  Sam Weinig  <weinig@apple.com>
233
234         Remove more i386 specific configurations
235         https://bugs.webkit.org/show_bug.cgi?id=196430
236
237         Reviewed by Alexey Proskuryakov.
238
239         * Configurations/BaseTarget.xcconfig:
240         WK_HAVE_CORE_PREDICTION can now be enabled unconditionally.
241  
242         * Configurations/FeatureDefines.xcconfig:
243         ENABLE_WEB_AUTHN_macosx can now be enabled unconditionally on macOS.
244
245 2019-03-31  Andy Estes  <aestes@apple.com>
246
247         [iOS] WebKit should consult the navigation response policy delegate before previewing a QuickLook document
248         https://bugs.webkit.org/show_bug.cgi?id=196433
249         <rdar://problem/49293305>
250
251         Reviewed by Tim Horton.
252
253         Added WKWebViewConfiguration SPI for setting the QuickLook navigation response policy
254         decision behavior. The configuration setting defaults to YES for clients linked on or after
255         this WebKit change and NO otherwise.
256
257         * NetworkProcess/NetworkResourceLoader.cpp:
258         (WebKit::NetworkResourceLoader::shouldInterruptLoadForCSPFrameAncestorsOrXFrameOptions):
259         * Shared/WebPreferences.yaml:
260         * Shared/ios/QuickLookDocumentData.cpp:
261         (WebKit::QuickLookDocumentData::isEmpty const):
262         * Shared/ios/QuickLookDocumentData.h:
263         * UIProcess/API/Cocoa/WKWebView.mm:
264         (-[WKWebView _initializeWithConfiguration:]):
265         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
266         (defaultShouldDecidePolicyBeforeLoadingQuickLookPreview):
267         (-[WKWebViewConfiguration init]):
268         (-[WKWebViewConfiguration encodeWithCoder:]):
269         (-[WKWebViewConfiguration initWithCoder:]):
270         (-[WKWebViewConfiguration copyWithZone:]):
271         (-[WKWebViewConfiguration _shouldDecidePolicyBeforeLoadingQuickLookPreview]):
272         (-[WKWebViewConfiguration _setShouldDecidePolicyBeforeLoadingQuickLookPreview:]):
273         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
274         * UIProcess/Cocoa/VersionChecks.h:
275         * WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp:
276         (WebKit::WebPreviewLoaderClient::didReceiveDataArray):
277
278 2019-03-30  Zalan Bujtas  <zalan@apple.com>
279
280         [ContentChangeObserver] Subframe load should not reset content observation on the mainframe
281         https://bugs.webkit.org/show_bug.cgi?id=196408
282         <rdar://problem/49436797>
283
284         Reviewed by Simon Fraser.
285
286         Hover intent fails when an unrelated frame commits a load the same time.
287         cancelPotentialTapInFrame is called from didCommitLoad, but what we are looking for here is the user initiated cancel of a tap (cancelPotentialTap).
288         (If the current frame navigates away, willDetachPage takes care of canceling the observation.)
289
290         * WebProcess/WebPage/ios/WebPageIOS.mm:
291         (WebKit::WebPage::cancelPotentialTap):
292         (WebKit::WebPage::cancelPotentialTapInFrame):
293
294 2019-03-29  John Wilander  <wilander@apple.com>
295
296         Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process
297         https://bugs.webkit.org/show_bug.cgi?id=196407
298         <rdar://problem/47859936>
299
300         Reviewed by Brent Fulgham.
301
302         The two WebResourceLoadStatisticsStore IPC endpoints were left behind when we
303         moved Resource Load Statistics from the UI process to the network process. One
304         of the endpoints is the message RequestStorageAccessUnderOpener which underpins
305         our compatibility fix for federated logins using popups. This patch redirects
306         these IPC calls to the network process and cleans up some assumptions around
307         them.
308
309         * CMakeLists.txt:
310             Removed the old IPC receiver.
311         * DerivedSources.make:
312             Removed the old IPC receiver.
313         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
314         (WebKit::WebResourceLoadStatisticsStore::requestUpdate): Deleted.
315             This is no longer needed since there is a dedicated update mechanism
316             that actually sends the update.
317         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
318         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
319         (WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated):
320         (WebKit::NetworkConnectionToWebProcess::requestStorageAccessUnderOpener):
321             Two new IPC receivers to pipe the calls to the network process.
322         (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate): Deleted.
323             NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated now serves
324             this purpose.
325         * NetworkProcess/NetworkConnectionToWebProcess.h:
326         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
327         * UIProcess/WebResourceLoadStatisticsStore.messages.in: Removed.
328             Removed the old IPC receiver.
329         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
330         * WebKit.xcodeproj/project.pbxproj:
331         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
332         (WKBundleResourceLoadStatisticsNotifyObserver):
333             Function name update.
334         * WebProcess/WebProcess.cpp:
335             Now calls IPC to the network process instead of the UI process.
336
337 2019-03-29  Myles C. Maxfield  <mmaxfield@apple.com>
338
339         Delete WebMetal implementation in favor of WebGPU
340         https://bugs.webkit.org/show_bug.cgi?id=195418
341
342         Reviewed by Dean Jackson.
343
344         * Configurations/FeatureDefines.xcconfig:
345         * Shared/WebPreferences.yaml:
346         * WebProcess/InjectedBundle/InjectedBundle.cpp:
347         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
348
349 2019-03-29  Takashi Komori  <Takashi.Komori@sony.com>
350
351         [Curl] Add Server Trust Evaluation Support.
352         https://bugs.webkit.org/show_bug.cgi?id=191646
353
354         Reviewed by Fujii Hironori.
355
356         Tests: http/tests/ssl/iframe-upgrade.https.html
357                http/tests/ssl/mixedContent/insecure-websocket.html
358                http/tests/ssl/upgrade-origin-usage.html
359
360         * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
361         (WebKit::NetworkDataTaskCurl::curlDidFailWithError):
362         (WebKit::NetworkDataTaskCurl::tryServerTrustEvaluation):
363         (WebKit::NetworkDataTaskCurl::restartWithCredential):
364         * NetworkProcess/curl/NetworkDataTaskCurl.h:
365
366 2019-03-29  Cathie Chen  <cathiechen@igalia.com>
367
368         Implement ResizeObserver.
369         https://bugs.webkit.org/show_bug.cgi?id=157743
370
371         Reviewed by Simon Fraser.
372
373         Add WebPreferences and FeatureDefines for ResizeObserver.
374
375         * Configurations/FeatureDefines.xcconfig:
376         * Shared/WebPreferences.yaml:
377
378 2019-03-28  Timothy Hatcher  <timothy@apple.com>
379
380         CFDictionary encoder crashes on non-string keys.
381         https://bugs.webkit.org/show_bug.cgi?id=196388
382         rdar://problem/49339242
383
384         Reviewed by Ryosuke Niwa.
385
386         Allow non-string keys in CFDictionary encoding/decoding. Encode the correct
387         size for dictionaries and arrays when unknown keys or values are skipped.
388         Allow null array encoding and decoding like dictionary already allowed.
389
390         * Shared/cf/ArgumentCodersCF.cpp:
391         (IPC::encode):
392         (IPC::decode):
393
394 2019-03-28  John Wilander  <wilander@apple.com>
395
396         Resource Load Statistics: IPC to the WebsiteDataStore in the UI process from NetworkProcess::deleteWebsiteDataForRegistrableDomains()
397         https://bugs.webkit.org/show_bug.cgi?id=196281
398         <rdar://problem/48938748>
399
400         Reviewed by Alex Christensen.
401
402         The move of Resource Load Statistics to the network process requires that it
403         calls the UI process when clearing website data (previously the other way
404         around). This patch achieves that.
405
406         Specifically, NetworkProcess::deleteWebsiteDataForRegistrableDomains() now
407         filters its WebsiteDataTypes down to just the ones applicable for the UI
408         process and then calls DeleteWebsiteDataInUIProcessForRegistrableDomains over
409         IPC.
410
411         NetworkProcessProxy::deleteWebsiteDataInUIProcessForRegistrableDomains() on
412         the UI process side makes use of the re-introduced
413         WebsiteDataStore::fetchDataForRegistrableDomains() function to get the relevant
414         data records and call WebsiteDataStore::removeData(). The re-introduced
415         WebsiteDataStore::fetchDataForRegistrableDomains() was removed as dead code in
416         https://trac.webkit.org/changeset/242056/webkit, then under the name
417         WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains(). The reason it
418         was dead code was the lack of IPC call that this patch adds.
419
420         * NetworkProcess/NetworkProcess.cpp:
421         (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
422            Now calls DeleteWebsiteDataInUIProcessForRegistrableDomains over IPC if there
423            are WebsiteDataTypes applicable to the UI process.
424         * NetworkProcess/NetworkProcess.h:
425         * Shared/WebsiteData/WebsiteData.cpp:
426         (WebKit::WebsiteData::ownerProcess):
427         (WebKit::WebsiteData::filter):
428             Convenience functions to manage process ownership of website data types.
429         * Shared/WebsiteData/WebsiteData.h:
430         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
431         (WKWebsiteDataStoreStatisticsHasLocalStorage):
432             Test infrastructure, called by the TestRunner.
433         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
434         * UIProcess/Network/NetworkProcessProxy.cpp:
435         (WebKit::NetworkProcessProxy::deleteWebsiteDataInUIProcessForRegistrableDomains):
436             New function to be called from the network process.
437         * UIProcess/Network/NetworkProcessProxy.h:
438         * UIProcess/Network/NetworkProcessProxy.messages.in:
439         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
440         (WebKit::WebsiteDataRecord::matches const):
441             Now matches with WebCore::RegistrableDomain instead of a string.
442         (WebKit::WebsiteDataRecord::matchesTopPrivatelyControlledDomain const): Deleted.
443             Replaced by WebsiteDataRecord::matches().
444         * UIProcess/WebsiteData/WebsiteDataRecord.h:
445         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
446         (WebKit::WebsiteDataStore::fetchDataForRegistrableDomains):
447             Re-introduced. It was removed as dead code in r242056.
448         (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
449         (WebKit::WebsiteDataStore::hasLocalStorageForTesting const):
450             Test infrastructure, called by the TestRunner.
451         * UIProcess/WebsiteData/WebsiteDataStore.h:
452
453 2019-03-28  Jiewen Tan  <jiewen_tan@apple.com>
454
455         API::Data::createWithoutCopying should do a null check before calling CFRelease
456         https://bugs.webkit.org/show_bug.cgi?id=196276
457         <rdar://problem/48059859>
458
459         Reviewed by Alex Christensen.
460
461         * Shared/Cocoa/APIDataCocoa.mm:
462         (API::Data::createWithoutCopying):
463
464 2019-03-28  Per Arne Vollan  <pvollan@apple.com>
465
466         [iOS] Automatic focus of input field is flaky
467         https://bugs.webkit.org/show_bug.cgi?id=196302
468
469         Reviewed by Brent Fulgham.
470
471         Sometimes the status of whether a keyboard is connected can be incorrect, both in the UI process, and in
472         the WebContent process. Fix this by sending the keyboard status to the WebContent process as part of the
473         Web page creation parameters. Stop caching the keyboard status in the Web process proxy, and call
474         [UIKeyboard isInHardwareKeyboardMode] instead, since this method is swizzled in the test harness.
475
476         * Shared/WebPageCreationParameters.cpp:
477         (WebKit::WebPageCreationParameters::encode const):
478         (WebKit::WebPageCreationParameters::decode):
479         * Shared/WebPageCreationParameters.h:
480         * UIProcess/API/Cocoa/WKWebView.mm:
481         (hardwareKeyboardAvailabilityChangedCallback):
482         * UIProcess/WebPageProxy.cpp:
483         (WebKit::WebPageProxy::creationParameters):
484         * UIProcess/WebPageProxy.h:
485         * UIProcess/WebProcessProxy.cpp:
486         * UIProcess/WebProcessProxy.h:
487         (WebKit::WebProcessProxy::setKeyboardIsAttached): Deleted.
488         (WebKit::WebProcessProxy::keyboardIsAttached const): Deleted.
489         * UIProcess/ios/WKContentViewInteraction.mm:
490         (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
491         * UIProcess/ios/WebPageProxyIOS.mm:
492         (WebKit::WebPageProxy::isInHardwareKeyboardMode):
493         (WebKit::WebPageProxy::applicationWillEnterForeground):
494         * WebProcess/WebPage/WebPage.cpp:
495         * WebProcess/WebPage/WebPage.h:
496
497 2019-03-28  Tim Horton  <timothy_horton@apple.com>
498
499         Fix the build.
500
501         * UIProcess/ios/WKActionSheetAssistant.mm:
502         (-[WKActionSheetAssistant showImageSheet]):
503         * UIProcess/ios/WKContentViewInteraction.mm:
504         (-[WKContentView actionSheetAssistant:showCustomSheetForElement:]):
505
506 2019-03-28  Michael Catanzaro  <mcatanzaro@igalia.com>
507
508         [WPE][GTK] webkit_web_resource_get_data_finish can return NULL without setting error
509         https://bugs.webkit.org/show_bug.cgi?id=186276
510
511         Reviewed by Carlos Garcia Campos.
512
513         Currently it's possible for webkit_web_resource_get_data_finish() to return NULL without
514         setting the error parameter. This is illegal because it is an API guarantee (and a GObject
515         convention) that if an error parameter exists, it should be set whenever a function call
516         returns NULL. Epiphany correctly dereferences the error in this case without checking if it
517         is NULL, because it knows it does not have to, and crashes. Fix this. We'll return a byte
518         array of length 1 containing a NUL character. This isn't great, but there's not really any
519         better solution without deprecating the API or returning an error code to indicate an empty
520         resource, and it at least fixes the Epiphany crash.
521
522         This does not fix bug #186276, in which this function incorrectly returns no data when it
523         ought to. But that is a different bug. Now, at least we won't crash when no data is
524         available.
525
526         * UIProcess/API/glib/WebKitWebResource.cpp:
527         (resourceDataCallback):
528
529 2019-03-28  Daniel Bates  <dabates@apple.com>
530
531         [iPad] Tapping on a popup form control may not show a popover
532         https://bugs.webkit.org/show_bug.cgi?id=196322
533         <rdar://problem/49229632>
534
535         Reviewed by Wenson Hsieh.
536
537         Stop taking advantage of -[WKContentView inputView] being called when we invoke -reloadInputViews
538         to "lazily" allocate the input peripheral for the currently focused element. In theory, UIKit only
539         needs to call -inputView when it actually needs to display the input view (the keyboard). For
540         popup menu buttons, like <select>, no keyboard is needed. Instead we should create the peripheral
541         as part of the logic in the UI process to focus a new element before we call -reloadInputViews.
542
543         * UIProcess/ios/WKContentViewInteraction.mm:
544         (-[WKContentView inputView]): Extract logic to allocate the peripheral from here and moved it to createInputPeripheralWithView().
545         (-[WKContentView accessoryTab:]): While I am here, add a FIXME comment to explain why we need to
546         end the input sessions and nullify the input peripheral before we tell the web process to switch
547         focus as opposed to letting this happen after the web process tells us it focused a new element.
548         (createInputPeripheralWithView): Added.
549         (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
550         Write in terms of createInputPeripheralWithView(). Create the input peripheral after becoming
551         first responder because creating the peripheral has known side-effects: for popup buttons it
552         tells the popup controller to present the popover. For key input to popovers to work from the get-go,
553         the content view must be the first responder. See <https://bugs.webkit.org/show_bug.cgi?id=196272>
554         for more details.
555
556 2019-03-28  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
557
558         Silence lot of warnings when compiling with clang
559         https://bugs.webkit.org/show_bug.cgi?id=196310
560
561         Reviewed by Michael Catanzaro.
562
563         * UIProcess/API/glib/WebKitInjectedBundleClient.cpp: add missing
564         override clause.
565         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h: add
566         missing override clause.
567
568 2019-03-27  Ryosuke Niwa  <rniwa@webkit.org>
569
570         [macOS] Select element doesn't show popup if select element had lost focus while popup was previosuly shown
571         https://bugs.webkit.org/show_bug.cgi?id=196336
572
573         Reviewed by Tim Horton.
574
575         The bug was caused by WebPopupMenu::hide never notifying PopupClient that the popup had been dismissed.
576         This resulted in RenderMenuList::m_popupIsVisible to be never reset.
577
578         Also fixed a bug in WebPopupMenuProxyMac::hidePopupMenu that this function was never dismissing
579         the popup as the selector "dismissPopUp", on the contrary to its name, does not dimiss the popup.
580         Send cancelTracking to NSMenu instead, which DOES dismiss the popup.
581
582         Tests: fast/forms/select/mac-wk2/blur-dismisses-select-popup.html
583                fast/forms/select/mac-wk2/open-select-popup-after-dismissing-by-blur.html
584
585         * UIProcess/mac/WebPopupMenuProxyMac.mm:
586         (WebKit::WebPopupMenuProxyMac::hidePopupMenu):
587         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
588         (WebKit::WebPopupMenu::hide):
589
590 2019-03-27  Dean Jackson  <dino@apple.com>
591
592         [ARKit] Black view when opening a 3D model usdz file in new tab
593         https://bugs.webkit.org/show_bug.cgi?id=196333
594         <rdar://problem/47693367>
595
596         Reviewed by Tim Horton.
597
598         When opening a new WKSystemPreviewView, we were exiting if there was no
599         presentingViewController. This code was unnecessary, and causing blank
600         content when opening a new tab.
601
602         * UIProcess/ios/WKSystemPreviewView.mm:
603         (-[WKSystemPreviewView web_setContentProviderData:suggestedFilename:]):
604         Remove the code looking for a presentingViewController.
605
606 2019-03-27  Wenson Hsieh  <wenson_hsieh@apple.com>
607
608         Need a way to include WebKitAdditions code in WebKit API headers
609         https://bugs.webkit.org/show_bug.cgi?id=196173
610
611         Reviewed by Tim Horton.
612
613         Introduce a mechanism that allows us to insert code from WebKitAdditions into public or private SDK headers
614         using `#import`s of the form:
615
616         ```
617         #if USE(APPLE_INTERNAL_SDK)
618         #import <WebKitAdditions/WKWebViewConfigurationAdditions.h>
619         #endif
620         ```
621
622         The resulting header in the built products directory will contain the contents of the imported file inserted in
623         place of the `#if USE(APPLE_INTERNAL_SDK) … #endif` block; however, when building with the Apple internal SDK,
624         the additions header content will be imported by the usual means.
625
626         * mac/postprocess-framework-headers.sh:
627         * mac/replace-webkit-additions-includes.py: Added.
628
629         Add a step when post-processing framework headers to replace instances of `#if USE(APPLE_INTERNAL_SDK) … #endif`
630         with the text content of the additions files. The replacement script first searches in the built products
631         directory for the matching additions file, and falls back to the SDK if no matching file is found. If neither
632         are present (e.g. a build using the public SDK), then the block is simply replaced by the empty string.
633
634         (read_content_from_webkit_additions):
635         (main):
636
637 2019-03-27  Andy Estes  <aestes@apple.com>
638
639         REGRESSION (r242686): package-root creates roots with broken symlinks in WebKit.framework/XPCServices/
640         https://bugs.webkit.org/show_bug.cgi?id=196317
641
642         Reviewed by Dan Bernstein.
643
644         Removed some remnants of the Storage Process.
645
646         * Configurations/BaseTarget.xcconfig:
647         * Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Removed.
648         * WebKit.xcodeproj/project.pbxproj:
649
650 2019-03-27  Keith Rollin  <krollin@apple.com>
651
652         Include the CFNetworking task UUID to the NSError when a resource-load fails
653         https://bugs.webkit.org/show_bug.cgi?id=196156
654
655         Reviewed by Alex Christensen.
656
657         In order to help track the connection between a failed resource-load
658         and a user-visible error message, include the CFNetworking task UUID
659         in the associated error as an element of the userInfo property. This
660         can then be pulled out and reported in the logging at the point the
661         error is reported to the user.
662
663         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
664         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
665
666 2019-03-27  Chris Dumez  <cdumez@apple.com>
667
668         [ iOS Sim ] REGRESSION (r242277) Layout Test http/tests/cookies/same-site/lax-samesite-cookie-after-cross-site-history-load.php is a flaky timeout
669         https://bugs.webkit.org/show_bug.cgi?id=195425
670         <rdar://problem/48682403>
671
672         Reviewed by Alex Christensen.
673
674         When process-swapping on history navigation, we lookup the WebProcessProxy we'd like to use from the
675         process identifier that is saved on the WebBackForwardListItem, to try and load the item in the process
676         in which it was previously loaded. However, we were failing to check if the WebProcess in question was
677         still running so we could potentially try to use a process that's already exited.
678
679         * UIProcess/WebProcessPool.cpp:
680         (WebKit::WebProcessPool::processForNavigationInternal):
681
682 2019-03-27  Zalan Bujtas  <zalan@apple.com>
683
684         [ContentChangeObserver] Always dispatch the synthetic click asynchronously
685         https://bugs.webkit.org/show_bug.cgi?id=196278
686         <rdar://problem/49299968>
687
688         Reviewed by Simon Fraser.
689
690         This patch ensures that all completeSyntheticClick() calls happen in an asynchronous manner (unless the feature is turned off).
691
692         * WebProcess/WebPage/ios/WebPageIOS.mm:
693         (WebKit::dispatchSyntheticMouseMove):
694         (WebKit::WebPage::handleSyntheticClick):
695
696 2019-03-27  Tim Horton  <timothy_horton@apple.com>
697
698         Fix some more deprecation warnings in WKDrawingView
699         https://bugs.webkit.org/show_bug.cgi?id=196282
700         <rdar://problem/47637608>
701
702         Reviewed by Wenson Hsieh.
703
704         * Platform/spi/ios/PencilKitSPI.h:
705         * SourcesCocoa.txt:
706         * UIProcess/ios/PencilKitSoftLink.h:
707         * UIProcess/ios/PencilKitSoftLink.mm:
708         * UIProcess/ios/WKContentViewInteraction.mm:
709         * UIProcess/ios/WKDrawingCoordinator.h:
710         * UIProcess/ios/WKDrawingCoordinator.mm:
711         (-[WKDrawingCoordinator initWithContentView:]):
712         (-[WKDrawingCoordinator currentInk]):
713         (-[WKDrawingCoordinator undoManagerForInkPicker:]):
714         (-[WKDrawingCoordinator containingViewForInkPicker:]):
715         (-[WKDrawingCoordinator inkPickerDidToggleRuler:]):
716         (-[WKDrawingCoordinator inkPickerDidChangeInk:]):
717         (-[WKDrawingCoordinator installInkPickerForDrawing:]):
718         (-[WKDrawingCoordinator uninstallInkPicker]):
719         (-[WKDrawingCoordinator inkPicker]): Deleted.
720         (-[WKDrawingCoordinator didChangeRulerState:]): Deleted.
721         (-[WKDrawingCoordinator didChangeInk:]): Deleted.
722         * UIProcess/ios/WKDrawingView.mm:
723         (-[WKDrawingView _canvasViewWillBeginDrawing:]):
724         * UIProcess/ios/WKInkPickerView.h: Removed.
725         * UIProcess/ios/WKInkPickerView.mm: Removed.
726         * WebKit.xcodeproj/project.pbxproj:
727         Adopt the new names.
728
729 2019-03-27  Carlos Garcia Campos  <cgarcia@igalia.com>
730
731         Geolocation request not complete when watch request was started in a different web process
732         https://bugs.webkit.org/show_bug.cgi?id=195996
733
734         Reviewed by Alex Christensen.
735
736         In WebGeolocationManagerProxy::startUpdating() we do nothing when the provider is already updating. We should
737         reply with a DidChangePosition using the last known position, if available. If we are updating, but we still
738         don't have a known position, the request will be completed when
739         WebGeolocationManagerProxy::providerDidChangePosition() is called since it always notifies all web
740         processes.
741
742         * UIProcess/WebGeolocationManagerProxy.cpp:
743         (WebKit::WebGeolocationManagerProxy::providerDidChangePosition): Cache the position.
744         (WebKit::WebGeolocationManagerProxy::startUpdating): Reply using cached position if already known.
745         * UIProcess/WebGeolocationManagerProxy.h:
746         (WebKit::WebGeolocationManagerProxy::lastPosition const): Return cached position.
747         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
748         (WebKit::WebGeolocationClient::lastPosition): Remove the FIXME since we don't want this feature.
749
750 2019-03-26  Brent Fulgham  <bfulgham@apple.com>
751
752         [macOS] Correct kerberos-related sandbox violations
753         https://bugs.webkit.org/show_bug.cgi?id=196279
754         <rdar://problem/48622502>
755
756         Reviewed by Per Arne Vollan.
757
758         We need to allow communications with a Kerberos-related service on macOS
759         until <rdar://problem/35542803> is fixed.
760
761         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
762
763 2019-03-26  Chris Dumez  <cdumez@apple.com>
764
765         [macOS] The network process is not exiting reliably when the WebProcessPool is destroyed
766         https://bugs.webkit.org/show_bug.cgi?id=196277
767         <rdar://problem/49127581>
768
769         Reviewed by Alex Christensen.
770
771         When, an AuxiliaryProcess receives the AuxiliaryProcess::Terminate IPC, it calls stopRunLoop()
772         to exit. WebProcess overrides AuxiliaryProcess::stopRunLoop() to call exit(0) on the main
773         thread. Other auxiliary processes such as the NetworkProcess would end up calling
774         platformStopRunLoop(). On iOS and iOSMac, platformStopRunLoop() calls XPCServiceExit(), which
775         makes sense since auxiliary processes run their run loop by calling xpc_main(). However, on
776         macOS, platformStopRunLoop() was calling RunLoop::main().stop() to exit instead, which was
777         unreliable as demonstrated by the test app attached to the radar.
778
779         Updating platformStopRunLoop() to call XPCServiceExit() on macOS fixes the problem and I now
780         see the NetworkProcess exiting reliably there. This is the approach I have chosen in this
781         patch since it appears to be reliable and it makes the code consistent on all Cocoa platforms.
782
783         * Shared/AuxiliaryProcess.cpp:
784         * Shared/Cocoa/AuxiliaryProcessCocoa.mm:
785         (WebKit::AuxiliaryProcess::platformStopRunLoop):
786         * Shared/ios/AuxiliaryProcessIOS.mm:
787         (WebKit::AuxiliaryProcess::platformStopRunLoop): Deleted.
788         * Shared/mac/AuxiliaryProcessMac.mm:
789         (WebKit::AuxiliaryProcess::platformStopRunLoop): Deleted.
790
791 2019-03-26  Keith Rollin  <krollin@apple.com>
792
793         Inhibit CFNetwork logging in private sessions
794         https://bugs.webkit.org/show_bug.cgi?id=196268
795         <rdar://problem/48210793>
796
797         Reviewed by Alex Christensen.
798
799         Before performing any logging, the NetworkProcess checks to see if
800         it's performing an operation associated with a private (ephemeral)
801         browsing session. If so, it skips the logging. However, networking
802         layers below the NetworkProcess don't know about private browsing, so
803         they would still perform their own logging. CFNetwork now has a flag
804         that lets us control that, so set it to False if private browsing.
805
806         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
807         (WebKit::configurationForSessionID):
808
809 2019-03-26  Chris Dumez  <cdumez@apple.com>
810
811         Add basic layout test coverage for File Picker on iOS
812         https://bugs.webkit.org/show_bug.cgi?id=196265
813
814         Reviewed by Wenson Hsieh.
815
816         Add layout test infrastructure to test the file picker on iOS.
817
818         * UIProcess/API/Cocoa/WKWebView.mm:
819         (-[WKWebView _dismissFilePicker]):
820         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
821         * UIProcess/ios/WKContentViewInteraction.h:
822         * UIProcess/ios/WKContentViewInteraction.mm:
823         (-[WKContentView dismissFilePicker]):
824         (-[WKContentView _contentsOfUserInterfaceItem:]):
825         * UIProcess/ios/forms/WKFileUploadPanel.h:
826         * UIProcess/ios/forms/WKFileUploadPanel.mm:
827         (-[WKFileUploadPanel currentAvailableActionTitles]):
828
829 2019-03-26  Daniel Bates  <dabates@apple.com>
830
831         [iOS][WK2] Use a better concept to describe the reason we defer zooming a focused element: selectabiltiy
832         https://bugs.webkit.org/show_bug.cgi?id=196264
833
834         Reviewed by Wenson Hsieh.
835
836         Rename shouldDeferZoomingToSelectionWhenRevealingFocusedElement() to mayContainSelectableText() to describe
837         the criterion that we will use to decide whether to defer zooming or not. We defer zooming only for elements
838         that may support text selection on initial focus because we do not have an up-to-date selection rect at that
839         time. For element, like <select>, that do not support text selection, we can zoom them immediately when focused.
840
841         * UIProcess/ios/WKContentViewInteraction.mm:
842         (mayContainSelectableText): Renamed from shouldDeferZoomingToSelectionWhenRevealingFocusedElement.
843         List all the input types in the switch block and remove the default case to force the compiler to check that we
844         covered all cases. This will prevent unforseen keyboard issues (why isn't the keyboard shown? or why is the keyboard shown?)
845         for future input types that we may add.
846         (rectToRevealWhenZoomingToFocusedElement): Update for renaming.
847         (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]): Add a
848         comment to explain why we may need to defer the zoom: the focused element supports text selection and we need
849         to wait for the web process to call back to provide an up-to-date selection rect for us to zoom and reveal.
850         (-[WKContentView _didReceiveEditorStateUpdateAfterFocus]): Update for renaming.
851         (shouldDeferZoomingToSelectionWhenRevealingFocusedElement): Deleted.
852
853 2019-03-26  Wenson Hsieh  <wenson_hsieh@apple.com>
854
855         Implement async paste method on UIWKInteractionViewProtocol
856         https://bugs.webkit.org/show_bug.cgi?id=196267
857         <rdar://problem/49236346>
858
859         Reviewed by Tim Horton.
860
861         Implement a new UIWKInteractionViewProtocol hook to perform a paste command, and invoke the given completion
862         handler when pasting is finished.
863
864         Test: UIPasteboardTests.PasteWithCompletionHandler
865
866         * UIProcess/ios/WKContentViewInteraction.mm:
867         (-[WKContentView pasteWithCompletionHandler:]):
868
869 2019-03-26  Per Arne Vollan  <pvollan@apple.com>
870
871         [macOS] Fix sandbox violations
872         https://bugs.webkit.org/show_bug.cgi?id=196262
873         <rdar://problem/47738015>
874
875         Reviewed by Brent Fulgham.
876
877         Fix various observed sandbox violations.
878
879         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
880         * WebProcess/com.apple.WebProcess.sb.in:
881
882 2019-03-26  Tomoki Imai  <Tomoki.Imai@sony.com>
883
884         Assertion failure !isInAcceleratedCompositingMode() in DrawingAreaProxyCoordinatedGraphics::incorporateUpdate when forceCompositingMode is turned on
885         https://bugs.webkit.org/show_bug.cgi?id=195879
886
887         Reviewed by Carlos Garcia Campos.
888
889         The root cause is that DrawingAreaProxyCoordinatedGraphics::isInAcceleratedCompositingMode checks both of alwaysUseCompositing() and !m_layerTreeContext.isEmpty().
890         alwaysUseCompositing() refers preferences, which is written by the application (UIProcess).
891         On the other hand, m_layerTreeContext is changed when it receives enterAcceleratedCompositingMode/exitAcceleratedCompositingMode from WebProcess.
892
893         It results when we set forceCompositingMode and acceleratedCompositingEnabled to true, WebProcess and UIProcess is out of sync until WebProcess sends enterAcceleratedCompositingMode message.
894         In such situation, WebProcess sends incorporateUpdate to UIProcess because WebProcess is in non-AC mode, but isInAcceleratedCompositingMode becomes true in UIProcess side.
895
896         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
897         (WebKit::DrawingAreaProxyCoordinatedGraphics::~DrawingAreaProxyCoordinatedGraphics): Should call exitAcceleratedCompositingMode even when alwaysUseCompositing is true.
898         (WebKit::DrawingAreaProxyCoordinatedGraphics::enterAcceleratedCompositingMode): enterAcceleratedCompositingMode should check enterAcceleratedCompositingMode is not called twice.
899         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h: Remove alwaysUseCompositing from isInAcceleratedCompositingMode
900
901 2019-03-26  Antoine Quint  <graouts@apple.com>
902
903         Remove mousemoveEventHandlingPreventsDefault internal setting and quirk
904         https://bugs.webkit.org/show_bug.cgi?id=196254
905         <rdar://problem/49124334>
906
907         Reviewed by Dean Jackson.
908
909         * Shared/WebPreferences.yaml:
910
911 2019-03-26  Philippe Normand  <pnormand@igalia.com>
912
913         [WPE][Qt] Uninitialized racy ViewBackend
914         https://bugs.webkit.org/show_bug.cgi?id=196247
915
916         Reviewed by Carlos Garcia Campos.
917
918         * UIProcess/API/wpe/qt/WPEQtView.h: Initialize the backend pointer to nullptr.
919
920 2019-03-26  Carlos Garcia Campos  <cgarcia@igalia.com>
921
922         Unreviewed. Fix typo in GLib geolocation API after r243285.
923
924         gelocation -> geolocation.
925
926         * UIProcess/API/glib/WebKitGeolocationManager.cpp:
927         (webkit_geolocation_manager_class_init):
928         (webkit_geolocation_manager_update_position):
929         (webkit_geolocation_manager_failed):
930         (webkit_gelocation_manager_update_position): Deleted.
931         (webkit_gelocation_manager_failed): Deleted.
932         * UIProcess/API/gtk/WebKitGeolocationManager.h:
933         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
934         * UIProcess/API/wpe/WebKitGeolocationManager.h:
935         * UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
936
937 2019-03-26  Patrick Griffis  <pgriffis@igalia.com>
938
939         [GTK][WPE] Disable process warming
940         https://bugs.webkit.org/show_bug.cgi?id=196208
941
942         Reviewed by Chris Dumez.
943
944         Fixes crash caused by r243384.
945
946         Process warming is incompatible with our launcher as it expects a valid
947         WebsiteDataStore at initialization time for sandbox permissions.
948
949         * UIProcess/glib/WebProcessPoolGLib.cpp:
950         (WebKit::WebProcessPool::platformInitialize):
951
952 2019-03-25  Alex Christensen  <achristensen@webkit.org>
953
954         Do not terminate the NetworkProcess if a third party application sends a NSCredential with a SecIdentityRef
955         https://bugs.webkit.org/show_bug.cgi?id=196213
956
957         Reviewed by Geoff Garen.
958
959         A release assertion added in r230225 was reachable.  I reached it in a unit test that responds to a challenge
960         with a SecIdentityRef wrapped in an NSCredential.
961
962         * Shared/cf/ArgumentCodersCF.cpp:
963         (IPC::decode):
964
965 2019-03-25  Chris Dumez  <cdumez@apple.com>
966
967         Regression(r242369) Trying to change profile picture on linked in shows file picker, not the image picker
968         https://bugs.webkit.org/show_bug.cgi?id=196205
969         <rdar://problem/49083324>
970
971         Reviewed by Geoffrey Garen.
972
973         Update our FileUploadPanel code on iOS to properly deal with the MIME types containing
974         wild cards (e.g. "image/*") that are defined in the HTML specification:
975         - https://html.spec.whatwg.org/multipage/input.html#attr-input-accept
976
977         Previously, we would fail to convert those to UTIs.
978
979         * UIProcess/ios/forms/WKFileUploadPanel.mm:
980
981 2019-03-25  Tim Horton  <timothy_horton@apple.com>
982
983         Remove some now-unnecessary dynamic class lookup
984         https://bugs.webkit.org/show_bug.cgi?id=196237
985
986         Reviewed by Simon Fraser.
987
988         * Shared/DocumentEditingContext.mm:
989         (WebKit::DocumentEditingContext::toPlatformContext):
990
991 2019-03-25  Tim Horton  <timothy_horton@apple.com>
992
993         Get rid of ENABLE(ANIMATED_KEYBOARD_SCROLLING)
994         https://bugs.webkit.org/show_bug.cgi?id=196224
995
996         Reviewed by Simon Fraser.
997
998         * Platform/spi/ios/AccessibilitySupportSPI.h:
999         * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
1000         (-[WKKeyboardScrollingAnimator invalidate]):
1001         (perpendicularAbsoluteUnitVector):
1002         (-[WKKeyboardScrollingAnimator beginWithEvent:]):
1003         (-[WKKeyboardScrollingAnimator stopAnimatedScroll]):
1004         (-[WKKeyboardScrollingAnimator willStartInteractiveScroll]):
1005         (-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
1006         (-[WKKeyboardScrollViewAnimator scrollWithScrollToExtentAnimationTo:]):
1007         (-[WKKeyboardScrollingAnimator startRepeatTimerIfNeeded]): Deleted.
1008         (-[WKKeyboardScrollingAnimator stopRepeatTimer]): Deleted.
1009         (-[WKKeyboardScrollingAnimator performDiscreteScroll]): Deleted.
1010
1011 2019-03-25  Fujii Hironori  <Hironori.Fujii@sony.com>
1012
1013         Enable IPC sending and receiving non-default-constructible types
1014         https://bugs.webkit.org/show_bug.cgi?id=196132
1015         <rdar://problem/49229221>
1016
1017         Unreviewed build fix for WinCairo port.
1018
1019         error C2440: '=': cannot convert from 'int' to 'HANDLE'
1020
1021         * Platform/win/SharedMemoryWin.cpp:
1022         (WebKit::SharedMemory::Handle::Handle): std::exchange HANDLE with nullptr, not 0.
1023         (WebKit::SharedMemory::Handle::operator=): Ditto.
1024
1025 2019-03-25  Fujii Hironori  <Hironori.Fujii@sony.com>
1026
1027         [Coordinated Graphics][WinCairo] ASSERTION FAILED: state.id == m_nicosia.state.id
1028         https://bugs.webkit.org/show_bug.cgi?id=196190
1029
1030         Reviewed by Žan Doberšek.
1031
1032         This assertion assumes the pre-committed and the committed scenes
1033         are identical. But, the pre-committed scene is updated in the main
1034         thread. Removed the false assertion.
1035
1036         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1037         (WebKit::CoordinatedGraphicsScene::purgeGLResources): Remove the
1038         assertion. Removed layers of committed scene, not pre-committed
1039         scene.
1040
1041 2019-03-25  Brady Eidson  <beidson@apple.com>
1042
1043         Add socket-delegate to another entitlements config
1044         rdar://problem/48090350 and https://bugs.webkit.org/show_bug.cgi?id=196227
1045
1046         Reviewed by Geoffrey Garen.
1047
1048         * Configurations/Network-iOSMac.entitlements:
1049
1050 2019-03-25  Commit Queue  <commit-queue@webkit.org>
1051
1052         Unreviewed, rolling out r243465.
1053         https://bugs.webkit.org/show_bug.cgi?id=196226
1054
1055         the test doesn't build (Requested by thorton on #webkit).
1056
1057         Reverted changeset:
1058
1059         "Do not terminate the NetworkProcess if a third party
1060         application sends a NSCredential with a SecIdentityRef"
1061         https://bugs.webkit.org/show_bug.cgi?id=196213
1062         https://trac.webkit.org/changeset/243465
1063
1064 2019-03-25  Simon Fraser  <simon.fraser@apple.com>
1065
1066         REGRESSION (r242687): Flicker when pinch-zooming pages in macOS Safari
1067         https://bugs.webkit.org/show_bug.cgi?id=196126
1068         rdar://problem/49095791
1069
1070         Reviewed by Tim Horton.
1071         
1072         I fumbled the commit after the enum rename. Make this actually work.
1073
1074         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1075         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1076
1077 2019-03-25  Simon Fraser  <simon.fraser@apple.com>
1078
1079         Zoom on macOS is centered around a point lower than the cursor
1080         https://bugs.webkit.org/show_bug.cgi?id=196225
1081         rdar://problem/49213574
1082
1083         Reviewed by Tim Horton.
1084         
1085         The origin handed to ViewGestureController::handleMagnificationGestureEvent is in WKWebView
1086         coordinates, but we end up setting the transform on the RenderView's layer, so we need
1087         to subtract the topContentInset.
1088
1089         * UIProcess/mac/ViewGestureControllerMac.mm:
1090         (WebKit::ViewGestureController::handleMagnificationGestureEvent):
1091
1092 2019-03-25  Alex Christensen  <achristensen@webkit.org>
1093
1094         Do not terminate the NetworkProcess if a third party application sends a NSCredential with a SecIdentityRef
1095         https://bugs.webkit.org/show_bug.cgi?id=196213
1096
1097         Reviewed by Geoff Garen.
1098
1099         A release assertion added in r230225 was reachable.  I reached it in a unit test that responds to a challenge
1100         with a SecIdentityRef wrapped in an NSCredential.
1101
1102         * Shared/cf/ArgumentCodersCF.cpp:
1103         (IPC::decode):
1104
1105 2019-03-25  Chris Dumez  <cdumez@apple.com>
1106
1107         Get rid of WebPage::m_shouldResetDrawingAreaAfterSuspend flag
1108         https://bugs.webkit.org/show_bug.cgi?id=196210
1109         <rdar://problem/48681326>
1110
1111         Reviewed by Geoffrey Garen.
1112
1113         Get rid of WebPage::m_shouldResetDrawingAreaAfterSuspend flag and use the drawing area identifier
1114         instead to reset the DrawingArea in the WebProcess whenever the UIProcess did.
1115
1116         This is less error-prone and guarantees that the WebProcess and the UIProcess can reliably
1117         communicate via DrawingArea IPC.
1118
1119         * WebProcess/WebPage/WebPage.cpp:
1120         (WebKit::WebPage::reinitializeWebPage):
1121         (WebKit::WebPage::setIsSuspended):
1122         * WebProcess/WebPage/WebPage.h:
1123
1124 2019-03-25  Alex Christensen  <achristensen@webkit.org>
1125
1126         Enable IPC sending and receiving non-default-constructible types
1127         https://bugs.webkit.org/show_bug.cgi?id=196132
1128
1129         Reviewed by Geoff Garen.
1130
1131         * Platform/IPC/ArgumentCoder.h:
1132         * Platform/IPC/ArgumentCoders.h:
1133         (IPC::TupleEncoder::encode):
1134         (IPC::tupleFromTupleAndObject):
1135         (IPC::TupleDecoderImpl::decode):
1136         (IPC::TupleDecoderImpl<Type>::decode):
1137         (IPC::TupleDecoder::decode):
1138         (IPC::TupleDecoder<0>::decode):
1139         (IPC::TupleCoder::encode): Deleted.
1140         (IPC::TupleCoder::decode): Deleted.
1141         * Platform/IPC/Connection.h:
1142         (IPC::Connection::sendWithReply):
1143         (IPC::TupleMover::move):
1144         (IPC::moveTuple):
1145         (IPC::Connection::sendSync):
1146         * Platform/IPC/Decoder.h:
1147         (IPC::Decoder::decode):
1148         (IPC::Decoder::operator>>):
1149         * Platform/IPC/HandleMessage.h:
1150         (IPC::handleMessage):
1151         (IPC::handleMessageSynchronous):
1152         (IPC::handleMessageSynchronousWantsConnection):
1153         (IPC::handleMessageAsync):
1154         * Platform/SharedMemory.h:
1155         * Scripts/webkit/LegacyMessages-expected.h:
1156         * Scripts/webkit/Messages-expected.h:
1157         * Scripts/webkit/MessagesSuperclass-expected.h:
1158         * Scripts/webkit/messages.py:
1159         * Shared/Databases/IndexedDB/WebIDBResult.h:
1160         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
1161         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
1162         * Shared/ShareableBitmap.h:
1163         * Shared/ShareableResource.h:
1164         * Shared/UpdateInfo.h:
1165         * Shared/WebEvent.h:
1166         * Shared/WebProcessCreationParameters.cpp:
1167         * Shared/WebProcessCreationParameters.h:
1168         * Shared/mac/SecItemResponseData.cpp:
1169         (WebKit::SecItemResponseData::SecItemResponseData):
1170         (WebKit::SecItemResponseData::decode):
1171         * Shared/mac/SecItemResponseData.h:
1172         * WebProcess/MediaStream/MediaDeviceSandboxExtensions.h:
1173
1174 2019-03-25  Tim Horton  <timothy_horton@apple.com>
1175
1176         Animated keyboard scrolling is extremely chaotic
1177         https://bugs.webkit.org/show_bug.cgi?id=196164
1178         <rdar://problem/48702444>
1179
1180         Reviewed by Simon Fraser.
1181
1182         * UIProcess/ios/WKContentViewInteraction.mm:
1183         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
1184         Consume keyboard events instead of interpreting them traditionally
1185         if WKKeyboardScrollingAnimator is animating.
1186
1187         * UIProcess/ios/WKKeyboardScrollingAnimator.h:
1188         * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
1189         (-[WKKeyboardScrollingAnimator beginWithEvent:]):
1190         (-[WKKeyboardScrollingAnimator handleKeyEvent:]):
1191         (-[WKKeyboardScrollingAnimator stopAnimatedScroll]):
1192         (-[WKKeyboardScrollingAnimator scrollTriggeringKeyIsPressed]):
1193         (-[WKKeyboardScrollingAnimator displayLinkFired:]):
1194         (-[WKKeyboardScrollViewAnimator scrollTriggeringKeyIsPressed]):
1195         Expose the current state of interactive scrolling, and rename the related member.
1196
1197 2019-03-25  Keith Rollin  <krollin@apple.com>
1198
1199         Add WebKit logging for first paint and other interesting layout milestones
1200         https://bugs.webkit.org/show_bug.cgi?id=196159
1201         <rdar://problem/49128952>
1202
1203         Reviewed by Simon Fraser.
1204
1205         Add some logging to indicate what layout milestones have been reached.
1206         This should help us determine if there's a client, rendering, layout,
1207         or some other issue when page content does not appear in the client
1208         window.
1209
1210         The logging is being added to
1211         WebFrameLoaderClient::dispatchDidReachLayoutMilestone. This seems like
1212         a nice central place to capture layout milestones. However, it will
1213         only log notifications that are being sent to clients. It does not
1214         indicate all milestones that have occurred. That is, it does not
1215         report milestones that are filtered out due to client disinterest.
1216         There doesn't seem to be a good central place to capture all
1217         milestones, regardless of client interest.
1218
1219         * Platform/Logging.h:
1220         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1221         (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
1222
1223 2019-03-25  Patrick Griffis  <pgriffis@igalia.com>
1224
1225         [GTK][WPE] Remove network access from web process sandbox
1226         https://bugs.webkit.org/show_bug.cgi?id=189967
1227
1228         Reviewed by Michael Catanzaro.
1229
1230         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
1231         (WebKit::createFlatpakInfo):
1232         (WebKit::bubblewrapSpawn):
1233         * UIProcess/Launcher/glib/FlatpakLauncher.cpp:
1234         (WebKit::flatpakSpawn):
1235
1236 2019-03-25  Andy Estes  <aestes@apple.com>
1237
1238         [Apple Pay] Call +canMakePayments on a work queue
1239         https://bugs.webkit.org/show_bug.cgi?id=196179
1240         <rdar://problem/45388749>
1241
1242         Reviewed by Brady Eidson.
1243
1244         Calling +canMakePayments on either PKPaymentAuthorizationController or
1245         PKPaymentAuthorizationViewController results in synchronous IPC and is therefore very
1246         expensive to call on the main thread. On iOS, these calls are made in the network process,
1247         and on Mac in the UI process.
1248
1249         Call these methods on a work queue to avoid main thread spins.
1250
1251         * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp:
1252         (WebKit::WebPaymentCoordinatorProxy::canMakePayments):
1253         * Shared/ApplePay/WebPaymentCoordinatorProxy.h:
1254         * Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
1255         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePayments):
1256         * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
1257         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePayments):
1258
1259 2019-03-25  Andy Estes  <aestes@apple.com>
1260
1261         [Apple Pay] Remove the AvailablePaymentNetworks synchronous message
1262         https://bugs.webkit.org/show_bug.cgi?id=196180
1263
1264         Reviewed by Youenn Fablet.
1265
1266         Unlike many PassKit interactions, it's ok to call +[PKPaymentRequest availableNetworks]
1267         without an entitlement. Therefore, we can call it from the web process directly rather than
1268         synchronously messaging the entitled UI or networking process.
1269
1270         * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp:
1271         * Shared/ApplePay/WebPaymentCoordinatorProxy.h:
1272         * Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in:
1273         * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1274         * SourcesCocoa.txt:
1275         * WebKit.xcodeproj/project.pbxproj:
1276         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
1277         (WebKit::WebPaymentCoordinator::availablePaymentNetworks):
1278         * WebProcess/ApplePay/WebPaymentCoordinator.h:
1279         * WebProcess/ApplePay/cocoa/WebPaymentCoordinatorCocoa.mm: Added.
1280         (WebKit::WebPaymentCoordinator::platformAvailablePaymentNetworks const):
1281         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
1282         (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
1283         (-[WKAccessibilityWebPageObjectBase setWebPage:]):
1284
1285 2019-03-25  Chris Dumez  <cdumez@apple.com>
1286
1287         Unreviewed, tiny fix after r243388 to address API test failures on iOS
1288
1289         m_processType was properly initialized on macOS but not iOS.
1290
1291         * WebProcess/cocoa/WebProcessCocoa.mm:
1292         (WebKit::WebProcess::platformInitializeProcess):
1293
1294 2019-03-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1295
1296         [GTK][WPE] Do not allow changes in active URI before provisional load starts for non-API requests
1297         https://bugs.webkit.org/show_bug.cgi?id=194208
1298
1299         Reviewed by Michael Catanzaro.
1300
1301         * UIProcess/API/glib/WebKitWebView.cpp:
1302         (webkitWebViewWillStartLoad): Block updates of active URL.
1303         (webkitWebViewLoadChanged): Unblock updates of active URL on WEBKIT_LOAD_STARTED.
1304
1305 2019-03-25  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1306
1307         Remove NavigatorContentUtils in WebCore/Modules
1308         https://bugs.webkit.org/show_bug.cgi?id=196070
1309
1310         Reviewed by Alex Christensen.
1311
1312         NavigatorContentUtils was to support the custom scheme spec [1].
1313         However, in WebKit side, no port has supported the feature in
1314         WebKit layer after EFL port was removed. So there has been the
1315         only IDL implementation of the NavigatorContentUtils in WebCore.
1316         So we don't need to keep the implementation in WebCore anymore.
1317
1318         [1] https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers
1319
1320         * Configurations/FeatureDefines.xcconfig:
1321         * WebProcess/WebCoreSupport/WebNavigatorContentUtilsClient.h: Removed.
1322
1323 2019-03-24  Zan Dobersek  <zdobersek@igalia.com>
1324
1325         Unreviewed WPE build fix.
1326
1327         * UIProcess/wpe/WebPasteboardProxyWPE.cpp:
1328         Add an explicit CompletionHandler.h include to avoid a trip-up in
1329         unified builds.
1330
1331 2019-03-24  Fujii Hironori  <Hironori.Fujii@sony.com>
1332
1333         [WinCairo] WebProcessDataStoreParameters.h(32): error C2653: 'SandboxExtension': is not a class or namespace name
1334         https://bugs.webkit.org/show_bug.cgi?id=196192
1335
1336         Unreviewed for WinCairo port.
1337
1338         * Shared/WebProcessDataStoreParameters.h: Added #include "SandboxExtension.h".
1339
1340 2019-03-24  Andy Estes  <aestes@apple.com>
1341
1342         [watchOS] Remove unused Proximity Networking code
1343         https://bugs.webkit.org/show_bug.cgi?id=196188
1344
1345         Reviewed by Tim Horton.
1346
1347         * Configurations/WebKit.xcconfig:
1348         * NetworkProcess/NetworkProcess.cpp:
1349         (WebKit::NetworkProcess::NetworkProcess):
1350         * NetworkProcess/NetworkProcess.h:
1351         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1352         (WebKit::NetworkProcessCreationParameters::encode const):
1353         (WebKit::NetworkProcessCreationParameters::decode):
1354         * NetworkProcess/NetworkProcessCreationParameters.h:
1355         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1356         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1357         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
1358         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1359         (WebKit::NetworkProcess::platformPrepareToSuspend):
1360         (WebKit::NetworkProcess::platformProcessDidResume):
1361         (WebKit::NetworkProcess::platformProcessDidTransitionToBackground):
1362         (WebKit::NetworkProcess::platformProcessDidTransitionToForeground):
1363         * NetworkProcess/watchos/NetworkProximityAssertion.h: Removed.
1364         * NetworkProcess/watchos/NetworkProximityAssertion.mm: Removed.
1365         * NetworkProcess/watchos/NetworkProximityManager.h: Removed.
1366         * NetworkProcess/watchos/NetworkProximityManager.mm: Removed.
1367         * SourcesCocoa.txt:
1368         * UIProcess/API/APIProcessPoolConfiguration.cpp:
1369         (API::ProcessPoolConfiguration::copy):
1370         * UIProcess/API/APIProcessPoolConfiguration.h:
1371         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
1372         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
1373         (-[_WKProcessPoolConfiguration wirelessContextIdentifier]):
1374         (-[_WKProcessPoolConfiguration setWirelessContextIdentifier:]):
1375         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1376         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1377         * WebKit.xcodeproj/project.pbxproj:
1378
1379 2019-03-23  Chris Dumez  <cdumez@apple.com>
1380
1381         Unreviewed, fix typo in comment added in r243379.
1382
1383         * UIProcess/API/Cocoa/WKProcessGroup.mm:
1384         (-[WKProcessGroup setDelegate:]):
1385
1386 2019-03-23  Simon Fraser  <simon.fraser@apple.com>
1387
1388         REGRESSION (iOS 8): Scrollbar can't be hidden when webkit-overflow-scrolling is set to touch
1389         https://bugs.webkit.org/show_bug.cgi?id=137043
1390         rdar://problem/16595330
1391
1392         Reviewed by Zalan Bujtas.
1393
1394         Plumb horizontalScrollbarHiddenByStyle/verticalScrollbarHiddenByStyle through ScrollableAreaParameters
1395         to the UI process, and use it to set UIScrollView indicators visible or not.
1396         
1397         The scroll snap changes in ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren() fix a bug
1398         where hasChangedProperty(HorizontalSnapOffsets) was nested inside another set of hasChangedProperty()
1399         tests, so would never get called.
1400
1401         * Shared/WebCoreArgumentCoders.cpp:
1402         (IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
1403         (IPC::ArgumentCoder<ScrollableAreaParameters>::decode):
1404         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
1405         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):
1406
1407 2019-03-23  Zalan Bujtas  <zalan@apple.com>
1408
1409         [ContentChangeObserver] Taping on a form control should always result in click.
1410         https://bugs.webkit.org/show_bug.cgi?id=196177
1411
1412         Reviewed by Simon Fraser.
1413
1414         This patch enures that we send a synthetic click when the traget node is a form control (button, edit field etc) even if
1415         the mousemove brings up some hover content.
1416
1417         * WebProcess/WebPage/ios/WebPageIOS.mm:
1418         (WebKit::WebPage::handleSyntheticClick):
1419
1420 2019-03-23  Andy Estes  <aestes@apple.com>
1421
1422         [Apple Pay] Stop calling PKPaymentAuthorizationViewController class methods on iOS
1423         https://bugs.webkit.org/show_bug.cgi?id=196163
1424         <rdar://problem/48787564>
1425
1426         Reviewed by Anders Carlsson.
1427
1428         Now that we've transitioned to PKPaymentAuthorizationController on iOS, we should stop
1429         calling PKPaymentAuthorizationViewController class methods on iOS in favor of their
1430         PKPaymentAuthorizationController alternatives.
1431
1432         While we're here, we should also transition to calling
1433         +paymentServicesMerchantURLForAPIType:completion: on both
1434         PKPaymentAuthorizationViewController and PKPaymentAuthorizationController.
1435
1436         * Platform/cocoa/PaymentAuthorizationViewController.mm:
1437         (-[WKPaymentAuthorizationViewControllerDelegate _paymentServicesMerchantURLForAPIType:completion:]):
1438         * Platform/cocoa/WKPaymentAuthorizationDelegate.h:
1439         * Platform/cocoa/WKPaymentAuthorizationDelegate.mm:
1440         (-[WKPaymentAuthorizationDelegate _initWithRequest:presenter:]):
1441         (-[WKPaymentAuthorizationDelegate _paymentServicesMerchantURLForAPIType:completion:]):
1442         * Platform/ios/PaymentAuthorizationController.mm:
1443         (-[WKPaymentAuthorizationControllerDelegate _paymentServicesMerchantURLForAPIType:completion:]):
1444         * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1445         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePayments): Deleted.
1446         * Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
1447         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePayments):
1448         * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
1449         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePayments):
1450
1451 2019-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1452
1453         Unreviewed. Fix GTK build after r243409.
1454
1455         Build failure is actually unrelated to r243409, it's yet another unified build failure that happens when source
1456         file list changes.
1457
1458         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1459         (WebKit::WebInspectorProxy::platformShowCertificate): Use WebCore namespace for CertificateInfo parameter.
1460
1461 2019-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1462
1463         [GTK] Remove build time dependency on Geoclue2
1464         https://bugs.webkit.org/show_bug.cgi?id=195994
1465
1466         Reviewed by Michael Catanzaro.
1467
1468         Add GeoclueGeolocationProvider class to provide geolocation position updates using Geoclue2 DBus service.
1469
1470         * PlatformGTK.cmake:
1471         * PlatformWPE.cmake:
1472         * SourcesGTK.txt:
1473         * SourcesWPE.txt:
1474         * UIProcess/API/glib/WebKitGeolocationManager.cpp:
1475         (_WebKitGeolocationPosition::_WebKitGeolocationPosition):
1476         (webkitGeolocationManagerStop):
1477         (webkitGeolocationManagerSetEnableHighAccuracy):
1478         (webkitGeolocationManagerDispose):
1479         (webkit_geolocation_manager_class_init):
1480         * UIProcess/geoclue/GeoclueGeolocationProvider.cpp: Added.
1481         (WebKit::GeoclueGeolocationProvider::GeoclueGeolocationProvider):
1482         (WebKit::GeoclueGeolocationProvider::~GeoclueGeolocationProvider):
1483         (WebKit::GeoclueGeolocationProvider::start):
1484         (WebKit::GeoclueGeolocationProvider::stop):
1485         (WebKit::GeoclueGeolocationProvider::setEnableHighAccuracy):
1486         (WebKit::GeoclueGeolocationProvider::destroyManagerLater):
1487         (WebKit::GeoclueGeolocationProvider::destroyManager):
1488         (WebKit::GeoclueGeolocationProvider::setupManager):
1489         (WebKit::GeoclueGeolocationProvider::createClient):
1490         (WebKit::GeoclueGeolocationProvider::setupClient):
1491         (WebKit::GeoclueGeolocationProvider::startClient):
1492         (WebKit::GeoclueGeolocationProvider::stopClient):
1493         (WebKit::GeoclueGeolocationProvider::requestAccuracyLevel):
1494         (WebKit::GeoclueGeolocationProvider::clientLocationUpdatedCallback):
1495         (WebKit::GeoclueGeolocationProvider::createLocation):
1496         (WebKit::GeoclueGeolocationProvider::locationUpdated):
1497         (WebKit::GeoclueGeolocationProvider::didFail):
1498         * UIProcess/geoclue/GeoclueGeolocationProvider.h: Added.
1499
1500 2019-03-22  Simon Fraser  <simon.fraser@apple.com>
1501
1502         Undo collision with r243390.
1503
1504         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1505         (stringForSSLProtocol):
1506
1507 2019-03-22  Simon Fraser  <simon.fraser@apple.com>
1508
1509         Fix internal builds.
1510
1511         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1512         (stringForSSLProtocol):
1513
1514 2019-03-22  Keith Rollin  <krollin@apple.com>
1515
1516         Enable ThinLTO support in Production builds
1517         https://bugs.webkit.org/show_bug.cgi?id=190758
1518         <rdar://problem/45413233>
1519
1520         Reviewed by Daniel Bates.
1521
1522         Enable building with Thin LTO in Production when using Xcode 10.2 or
1523         later. This change results in a 1.45% progression in PLT5. Full
1524         Production build times increase about 2-3%. Incremental build times
1525         are more severely affected, and so LTO is not enabled for local
1526         engineering builds.
1527
1528         LTO is enabled only on macOS for now, until rdar://problem/49013399,
1529         which affects ARM builds, is fixed.
1530
1531         To change the LTO setting when building locally:
1532
1533         - If building with `make`, specify WK_LTO_MODE={none,thin,full} on the
1534           command line.
1535         - If building with `build-webkit`, specify --lto-mode={none,thin,full}
1536           on the command line.
1537         - If building with `build-root`, specify --lto={none,thin,full} on the
1538           command line.
1539         - If building with Xcode, create a LocalOverrides.xcconfig file at the
1540           top level of your repository directory (if needed) and define
1541           WK_LTO_MODE to full, thin, or none.
1542
1543         * Configurations/Base.xcconfig:
1544
1545 2019-03-22  Chris Dumez  <cdumez@apple.com>
1546
1547         Unreviewed build fix after r243388.
1548
1549         * WebProcess/WebProcess.h:
1550
1551 2019-03-22  Per Arne Vollan  <pvollan@apple.com>
1552
1553         [macOS] Fix sandbox violation
1554         https://bugs.webkit.org/show_bug.cgi?id=196153
1555         <rdar://problem/49123855>
1556
1557         Reviewed by Brent Fulgham.
1558
1559         The sandbox on macOS is blocking the mach lookup.
1560
1561         * WebProcess/com.apple.WebProcess.sb.in:
1562
1563 2019-03-21  Ryan Haddad  <ryanhaddad@apple.com>
1564
1565         Unreviewed, fix the build with recent SDKs.
1566
1567         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1568         (stringForSSLProtocol):
1569
1570 2019-03-22  Chris Dumez  <cdumez@apple.com>
1571
1572         Implement WebProcess freezer opt-in completely on WebContent process side
1573         https://bugs.webkit.org/show_bug.cgi?id=196149
1574
1575         Reviewed by Brady Eidson.
1576
1577         Implement WebProcess freezer opt-in completely on WebContent process side, we do not need
1578         to involve the UIProcess with this and rely on IPC which may be fragile.
1579
1580         In the future, we may want to set freezable state from the UIProcess when the API supports
1581         it. We can move the logic to be fully on the UIProcess side then. In the mean time, it is
1582         likely best not to rely on IPC and process coordination for this.
1583
1584         * UIProcess/WebProcessProxy.cpp:
1585         (WebKit::globalPageMap):
1586         (WebKit::WebProcessProxy::WebProcessProxy):
1587         (WebKit::WebProcessProxy::setIsInProcessCache):
1588         (WebKit::WebProcessProxy::markIsNoLongerInPrewarmedPool):
1589         (WebKit::WebProcessProxy::didFinishLaunching):
1590         (WebKit::WebProcessProxy::validateFreezerStatus): Deleted.
1591         * UIProcess/WebProcessProxy.h:
1592         (WebKit::WebProcessProxy::removeProvisionalPageProxy):
1593         (WebKit::WebProcessProxy::WebPageProxyMap::WebPageProxyMap): Deleted.
1594         (WebKit::WebProcessProxy::WebPageProxyMap::size const): Deleted.
1595         (WebKit::WebProcessProxy::WebPageProxyMap::values): Deleted.
1596         (WebKit::WebProcessProxy::WebPageProxyMap::values const): Deleted.
1597         (WebKit::WebProcessProxy::WebPageProxyMap::begin): Deleted.
1598         (WebKit::WebProcessProxy::WebPageProxyMap::end): Deleted.
1599         (WebKit::WebProcessProxy::WebPageProxyMap::get): Deleted.
1600         (WebKit::WebProcessProxy::WebPageProxyMap::contains const): Deleted.
1601         (WebKit::WebProcessProxy::WebPageProxyMap::isEmpty const): Deleted.
1602         (WebKit::WebProcessProxy::WebPageProxyMap::set): Deleted.
1603         (WebKit::WebProcessProxy::WebPageProxyMap::take): Deleted.
1604         * WebProcess/WebProcess.cpp:
1605         (WebKit::WebProcess::setIsInProcessCache):
1606         (WebKit::WebProcess::markIsNoLongerPrewarmed):
1607         (WebKit::WebProcess::actualPrepareToSuspend):
1608         (WebKit::WebProcess::setFreezable): Deleted.
1609         * WebProcess/WebProcess.h:
1610         * WebProcess/WebProcess.messages.in:
1611         * WebProcess/cocoa/WebProcessCocoa.mm:
1612         (WebKit::WebProcess::updateProcessName):
1613         (WebKit::WebProcess::shouldFreezeOnSuspension const):
1614         (WebKit::WebProcess::updateFreezerStatus):
1615
1616 2019-03-22  Chris Dumez  <cdumez@apple.com>
1617
1618         Prewarmed processes should be usable with any website data store
1619         https://bugs.webkit.org/show_bug.cgi?id=196104
1620
1621         Reviewed by Alex Christensen.
1622
1623         Split WebsiteDataStore-specific data out of WebProcessCreationParameters and into a new
1624         WebProcessDataStoreParameters struct so that we do not need a WebsiteDataStore in order
1625         to lauch and initialize a WebProcess. When the process finally gets used and we thus
1626         know which WebsiteDataStore they will be used for, we send the WebProcessDataStoreParameters
1627         to the process to that it can do its data store-specific initialization.
1628
1629         This allows prewarmed processes not not have a WebsiteDataStore assocated with them. They
1630         can then be used for any WebsiteDataStore when we need them.
1631
1632         This is also used by our dummy WebProcessProxy since it does not have a backing process and
1633         thus has no associated WebsiteDataStore.
1634
1635         * Shared/WebProcessCreationParameters.cpp:
1636         (WebKit::WebProcessCreationParameters::encode const):
1637         (WebKit::WebProcessCreationParameters::decode):
1638         * Shared/WebProcessCreationParameters.h:
1639         * Shared/WebProcessDataStoreParameters.h: Added.
1640         (WebKit::WebProcessDataStoreParameters::encode const):
1641         (WebKit::WebProcessDataStoreParameters::decode):
1642         * UIProcess/API/C/WKContext.cpp:
1643         (WKContextWarmInitialProcess):
1644         * UIProcess/API/Cocoa/WKProcessPool.mm:
1645         (-[WKProcessPool _warmInitialProcess]):
1646         * UIProcess/ServiceWorkerProcessProxy.cpp:
1647         (WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
1648         * UIProcess/WebPageProxy.cpp:
1649         (WebKit::WebPageProxy::notifyProcessPoolToPrewarm):
1650         * UIProcess/WebProcessPool.cpp:
1651         (WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess):
1652         (WebKit::WebProcessPool::createNewWebProcess):
1653         (WebKit::WebProcessPool::tryTakePrewarmedProcess):
1654         (WebKit::WebProcessPool::sendWebProcessDataStoreParameters):
1655         (WebKit::WebProcessPool::initializeNewWebProcess):
1656         (WebKit::WebProcessPool::prewarmProcess):
1657         (WebKit::WebProcessPool::processForRegistrableDomain):
1658         (WebKit::WebProcessPool::createWebPage):
1659         (WebKit::WebProcessPool::didReachGoodTimeToPrewarm):
1660         * UIProcess/WebProcessPool.h:
1661         (WebKit::WebProcessPool::sendToOneProcess):
1662         * UIProcess/WebProcessProxy.cpp:
1663         (WebKit::WebProcessProxy::create):
1664         (WebKit::WebProcessProxy::WebProcessProxy):
1665         (WebKit::WebProcessProxy::setWebsiteDataStore):
1666         (WebKit::WebProcessProxy::addExistingWebPage):
1667         * UIProcess/WebProcessProxy.h:
1668         (WebKit::WebProcessProxy::websiteDataStore const):
1669         * WebKit.xcodeproj/project.pbxproj:
1670         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
1671         (WebKit::WebMediaKeyStorageManager::setWebsiteDataStore):
1672         * WebProcess/MediaCache/WebMediaKeyStorageManager.h:
1673         * WebProcess/WebProcess.cpp:
1674         (WebKit::WebProcess::initializeWebProcess):
1675         (WebKit::WebProcess::setWebsiteDataStoreParameters):
1676         * WebProcess/WebProcess.h:
1677         * WebProcess/WebProcess.messages.in:
1678         * WebProcess/WebProcessSupplement.h:
1679         (WebKit::WebProcessSupplement::initialize):
1680         (WebKit::WebProcessSupplement::setWebsiteDataStore):
1681         * WebProcess/cocoa/WebProcessCocoa.mm:
1682         (WebKit::WebProcess::platformInitializeWebProcess):
1683         (WebKit::WebProcess::platformSetWebsiteDataStoreParameters):
1684         * WebProcess/win/WebProcessWin.cpp:
1685         (WebKit::WebProcess::platformInitializeWebProcess):
1686         (WebKit::WebProcess::platformSetWebsiteDataStoreParameters):
1687
1688 2019-03-22  Simon Fraser  <simon.fraser@apple.com>
1689
1690         REGRESSION (r242687): Flicker when pinch-zooming pages in macOS Safari
1691         https://bugs.webkit.org/show_bug.cgi?id=196126
1692         rdar://problem/49095791
1693
1694         Reviewed by Antti Koivisto.
1695
1696         The scrolling tree doesn't have an accurate picture of the main view's scroll position
1697         during pinch-zooming, so don't have it apply layer positions if a transient zoom is
1698         in progress.
1699
1700         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1701         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1702         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1703         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
1704
1705 2019-03-22  Antti Koivisto  <antti@apple.com>
1706
1707         Handle UI side hit testing for ScrollPositioningBehavior::Stationary positioned nodes
1708         https://bugs.webkit.org/show_bug.cgi?id=196100
1709         <rdar://problem/49117933>
1710
1711         Reviewed by Simon Fraser.
1712
1713         Test: fast/scrolling/ios/overflow-scroll-overlap-6.html
1714
1715         * UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h:
1716         (WebKit::RemoteLayerTreeNode::relatedScrollContainerIDs const):
1717         (WebKit::RemoteLayerTreeNode::relatedScrollContainerPositioningBehavior const):
1718
1719         Make more generic and save the associated positioning behavior.
1720
1721         (WebKit::RemoteLayerTreeNode::nonAncestorScrollContainerIDs const): Deleted.
1722         (WebKit::RemoteLayerTreeNode::addNonAncestorScrollContainerID): Deleted.
1723         (WebKit::RemoteLayerTreeNode::clearNonAncestorScrollContainerIDs): Deleted.
1724         * UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
1725         (WebKit::RemoteLayerTreeNode::setRelatedScrollContainerBehaviorAndIDs):
1726         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
1727         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
1728         (WebKit::isScrolledBy):
1729
1730         Stationary relationship means the layer won't scroll the scroller.
1731
1732         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1733         (WebKit::RemoteScrollingCoordinatorProxy::establishLayerTreeScrollingRelations):
1734
1735 2019-03-22  Chris Dumez  <cdumez@apple.com>
1736
1737         REGRESSION (r243094): ePub files do not render or open in Books
1738         https://bugs.webkit.org/show_bug.cgi?id=196119
1739         <rdar://problem/49121686>
1740
1741         Reviewed by Brady Eidson.
1742
1743         Do not delay the WebProcess launch until a load when contructing a web view and the client
1744         may observe when its injected bundle is loaded via WKProcessGroupDelegate's
1745         didCreateConnectionToWebProcessPlugIn.
1746
1747         * UIProcess/API/Cocoa/WKProcessGroup.mm:
1748         (-[WKProcessGroup setDelegate:]):
1749         * UIProcess/WebInspectorUtilities.cpp:
1750         (WebKit::inspectorProcessPool):
1751         * UIProcess/WebProcessPool.cpp:
1752         (WebKit::WebProcessPool::createWebPage):
1753         * UIProcess/WebProcessPool.h:
1754
1755 2019-03-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1756
1757         REGRESSION(r243094): Automation: browser crash in WebAutomationSession::exitFullscreenWindowForPage()
1758         https://bugs.webkit.org/show_bug.cgi?id=196140
1759
1760         Reviewed by Chris Dumez.
1761
1762         Since r243094, the WebPageProxy fullscreen manager is not created in the constructor, but once the page has a
1763         process launched.
1764
1765         * UIProcess/Automation/WebAutomationSession.cpp:
1766         (WebKit::WebAutomationSession::exitFullscreenWindowForPage): Null check WebPageProxy::fullScreenManager() before
1767         using it.
1768
1769 2019-03-22  Timothy Hatcher  <timothy@apple.com>
1770
1771         Change macosx() to macos() in WK_API... and JSC_API... macros.
1772         https://bugs.webkit.org/show_bug.cgi?id=196106
1773
1774         Reviewed by Brian Burg.
1775
1776         * Shared/API/Cocoa/WKBrowsingContextHandle.h:
1777         * Shared/API/Cocoa/WKDragDestinationAction.h:
1778         * Shared/API/Cocoa/WKMain.h:
1779         * Shared/API/Cocoa/_WKFrameHandle.h:
1780         * Shared/API/Cocoa/_WKHitTestResult.h:
1781         * Shared/API/Cocoa/_WKNSWindowExtras.h:
1782         * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
1783         * Shared/API/Cocoa/_WKRemoteObjectRegistry.h:
1784         * Shared/API/Cocoa/_WKRenderingProgressEvents.h:
1785         * Shared/API/Cocoa/_WKSameDocumentNavigationType.h:
1786         * UIProcess/API/C/WKPage.h:
1787         * UIProcess/API/Cocoa/NSAttributedString.h:
1788         * UIProcess/API/Cocoa/WKBackForwardList.h:
1789         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
1790         * UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h:
1791         * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h:
1792         * UIProcess/API/Cocoa/WKContentRuleList.h:
1793         * UIProcess/API/Cocoa/WKContentRuleListStore.h:
1794         * UIProcess/API/Cocoa/WKError.h:
1795         * UIProcess/API/Cocoa/WKErrorPrivate.h:
1796         * UIProcess/API/Cocoa/WKFrameInfo.h:
1797         * UIProcess/API/Cocoa/WKFrameInfoPrivate.h:
1798         * UIProcess/API/Cocoa/WKHTTPCookieStore.h:
1799         * UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
1800         * UIProcess/API/Cocoa/WKNavigation.h:
1801         * UIProcess/API/Cocoa/WKNavigationAction.h:
1802         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
1803         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1804         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1805         * UIProcess/API/Cocoa/WKNavigationResponse.h:
1806         * UIProcess/API/Cocoa/WKOpenPanelParameters.h:
1807         * UIProcess/API/Cocoa/WKOpenPanelParametersPrivate.h:
1808         * UIProcess/API/Cocoa/WKPreferences.h:
1809         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1810         * UIProcess/API/Cocoa/WKProcessPool.h:
1811         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1812         * UIProcess/API/Cocoa/WKScriptMessage.h:
1813         * UIProcess/API/Cocoa/WKSecurityOrigin.h:
1814         * UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
1815         * UIProcess/API/Cocoa/WKUIDelegate.h:
1816         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1817         * UIProcess/API/Cocoa/WKURLSchemeHandler.h:
1818         * UIProcess/API/Cocoa/WKURLSchemeTask.h:
1819         * UIProcess/API/Cocoa/WKURLSchemeTaskPrivate.h:
1820         * UIProcess/API/Cocoa/WKUserContentController.h:
1821         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
1822         * UIProcess/API/Cocoa/WKUserScript.h:
1823         * UIProcess/API/Cocoa/WKUserScriptPrivate.h:
1824         * UIProcess/API/Cocoa/WKViewPrivate.h:
1825         * UIProcess/API/Cocoa/WKWebView.h:
1826         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1827         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1828         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1829         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1830         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
1831         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1832         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
1833         * UIProcess/API/Cocoa/WKWindowFeatures.h:
1834         * UIProcess/API/Cocoa/WKWindowFeaturesPrivate.h:
1835         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
1836         * UIProcess/API/Cocoa/_WKApplicationManifest.h:
1837         * UIProcess/API/Cocoa/_WKAttachment.h:
1838         * UIProcess/API/Cocoa/_WKAutomationDelegate.h:
1839         * UIProcess/API/Cocoa/_WKAutomationSession.h:
1840         * UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.h:
1841         * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
1842         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
1843         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
1844         * UIProcess/API/Cocoa/_WKDownload.h:
1845         * UIProcess/API/Cocoa/_WKDownloadDelegate.h:
1846         * UIProcess/API/Cocoa/_WKElementAction.h:
1847         * UIProcess/API/Cocoa/_WKExperimentalFeature.h:
1848         * UIProcess/API/Cocoa/_WKFindOptions.h:
1849         * UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
1850         * UIProcess/API/Cocoa/_WKFormInputSession.h:
1851         * UIProcess/API/Cocoa/_WKFullscreenDelegate.h:
1852         * UIProcess/API/Cocoa/_WKGeolocationCoreLocationProvider.h:
1853         * UIProcess/API/Cocoa/_WKInspector.h:
1854         * UIProcess/API/Cocoa/_WKInspectorWindow.h:
1855         * UIProcess/API/Cocoa/_WKInternalDebugFeature.h:
1856         * UIProcess/API/Cocoa/_WKLayoutMode.h:
1857         * UIProcess/API/Cocoa/_WKLinkIconParameters.h:
1858         * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:
1859         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
1860         * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h:
1861         * UIProcess/API/Cocoa/_WKSessionState.h:
1862         * UIProcess/API/Cocoa/_WKTextInputContext.h:
1863         * UIProcess/API/Cocoa/_WKThumbnailView.h:
1864         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
1865         * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
1866         * UIProcess/API/Cocoa/_WKUserContentFilter.h:
1867         * UIProcess/API/Cocoa/_WKUserContentFilterPrivate.h:
1868         * UIProcess/API/Cocoa/_WKUserContentWorld.h:
1869         * UIProcess/API/Cocoa/_WKUserInitiatedAction.h:
1870         * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
1871         * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
1872         * UIProcess/API/Cocoa/_WKWebsiteDataSize.h:
1873         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1874         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
1875         * UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h:
1876         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
1877         * WebProcess/API/Cocoa/WKWebProcess.h:
1878         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
1879         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
1880         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h:
1881         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
1882         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:
1883         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
1884         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h:
1885         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
1886         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
1887         * WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
1888         * WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
1889         * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
1890         * WebProcess/InjectedBundle/API/mac/WKDOMText.h:
1891         * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
1892         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
1893         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
1894         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
1895
1896 2019-03-22  Yousuke Kimoto  <Yousuke.Kimoto@sony.com>
1897
1898         Unreviewed build fix.
1899
1900         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1901
1902 2019-03-22  Tim Horton  <timothy_horton@apple.com>
1903
1904         Fix the build after r243354
1905         https://bugs.webkit.org/show_bug.cgi?id=196138
1906         <rdar://problem/49145951>
1907
1908         * Platform/spi/ios/UIKitSPI.h:
1909         * Shared/DocumentEditingContext.mm:
1910         (WebKit::DocumentEditingContext::toPlatformContext):
1911         * UIProcess/ios/WKContentViewInteraction.mm:
1912
1913 2019-03-21  Simon Fraser  <simon.fraser@apple.com>
1914
1915         Clean up some TiledCoreAnimationDrawingArea members
1916         https://bugs.webkit.org/show_bug.cgi?id=196124
1917
1918         Reviewed by Tim Horton.
1919
1920         The giant m_transform was unused.
1921         
1922         Group the bools etc.
1923
1924         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1925         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1926         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1927         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
1928
1929 2019-03-21  Brady Eidson  <beidson@apple.com>
1930
1931         Certain WebProcesses should opt-out of the freezer.
1932         <rdar://problem/42846139> and https://bugs.webkit.org/show_bug.cgi?id=196062
1933
1934         Reviewed by Andy Estes.
1935
1936         WebProcesses should opt-in and opt-out of the freezer as is appropriate.
1937         By default a WebProcess is freezer eligible.
1938         If any of the following become true then it should become ineligible:
1939         - The WebProcess is a pre-warmed process.
1940         - The WebProcess is in the process cache.
1941         - The WebProcess is not actively hosting any web pages (e.g. it only has suspending web pages)
1942
1943         The most complicated part of the above is guaranteeing that any operation that changes
1944         the active pages hosted by the process causes a recalculation of the freezer opt-in state.
1945
1946         To do that this replaces the basic WebPageProxyMap with a custom class.
1947
1948         * UIProcess/WebProcessProxy.cpp:
1949         (WebKit::globalPageMap):
1950         (WebKit::WebProcessProxy::WebProcessProxy):
1951         (WebKit::WebProcessProxy::validateFreezerStatus):
1952         (WebKit::WebProcessProxy::setIsInProcessCache):
1953         (WebKit::WebProcessProxy::markIsNoLongerInPrewarmedPool):
1954         (WebKit::WebProcessProxy::didFinishLaunching):
1955         * UIProcess/WebProcessProxy.h:
1956         (WebKit::WebProcessProxy::WebPageProxyMap::WebPageProxyMap):
1957         (WebKit::WebProcessProxy::WebPageProxyMap::size const):
1958         (WebKit::WebProcessProxy::WebPageProxyMap::values):
1959         (WebKit::WebProcessProxy::WebPageProxyMap::values const):
1960         (WebKit::WebProcessProxy::WebPageProxyMap::begin):
1961         (WebKit::WebProcessProxy::WebPageProxyMap::end):
1962         (WebKit::WebProcessProxy::WebPageProxyMap::get):
1963         (WebKit::WebProcessProxy::WebPageProxyMap::contains const):
1964         (WebKit::WebProcessProxy::WebPageProxyMap::isEmpty const):
1965         (WebKit::WebProcessProxy::WebPageProxyMap::set):
1966         (WebKit::WebProcessProxy::WebPageProxyMap::take):
1967
1968         * WebProcess/WebProcess.cpp:
1969         (WebKit::WebProcess::setFreezable):
1970         * WebProcess/WebProcess.h:
1971         * WebProcess/WebProcess.messages.in:
1972
1973 2019-03-21  Tim Horton  <timothy_horton@apple.com>
1974
1975         Adopt UIWKDocumentContext
1976         https://bugs.webkit.org/show_bug.cgi?id=196040
1977         <rdar://problem/48642440>
1978
1979         Reviewed by Ryosuke Niwa.
1980
1981         * Platform/spi/ios/UIKitSPI.h:
1982         * Scripts/webkit/messages.py:
1983         * Shared/DocumentEditingContext.h: Added.
1984         * Shared/DocumentEditingContext.mm: Added.
1985         (WebKit::toNSRange):
1986         (WebKit::DocumentEditingContext::toPlatformContext):
1987         (IPC::ArgumentCoder<WebKit::DocumentEditingContext::Range>::encode):
1988         (IPC::ArgumentCoder<WebKit::DocumentEditingContext::Range>::decode):
1989         (IPC::ArgumentCoder<WebKit::DocumentEditingContext::TextRect>::encode):
1990         (IPC::ArgumentCoder<WebKit::DocumentEditingContext::TextRect>::decode):
1991         (IPC::ArgumentCoder<WebKit::DocumentEditingContext>::encode):
1992         (IPC::ArgumentCoder<WebKit::DocumentEditingContext>::decode):
1993         (IPC::ArgumentCoder<WebKit::DocumentEditingContextRequest>::encode):
1994         (IPC::ArgumentCoder<WebKit::DocumentEditingContextRequest>::decode):
1995         Add DocumentEditingContext(Request), and coders.
1996         Also expose DocumentEditingContext::toPlatformContext, which populates
1997         a UIWKDocumentContext with the relevant values.
1998
1999         * SourcesCocoa.txt:
2000         * UIProcess/WebPageProxy.h:
2001         * UIProcess/ios/WKContentViewInteraction.mm:
2002         (toWebDocumentRequestOptions):
2003         (toWebRequest):
2004         (-[WKContentView adjustSelectionWithDelta:completionHandler:]):
2005         (-[WKContentView requestDocumentContext:completionHandler:]):
2006         (-[WKContentView selectPositionAtPoint:withContextRequest:completionHandler:]):
2007         * UIProcess/ios/WebPageProxyIOS.mm:
2008         (WebKit::WebPageProxy::adjustSelectionWithDelta):
2009         (WebKit::WebPageProxy::requestDocumentEditingContext):
2010         * WebKit.xcodeproj/project.pbxproj:
2011         * WebProcess/WebPage/WebPage.h:
2012         * WebProcess/WebPage/WebPage.messages.in:
2013         Plumb DocumentEditingContext(Request) around.
2014
2015         * WebProcess/WebPage/ios/WebPageIOS.mm:
2016         (WebKit::WebPage::adjustSelectionWithDelta):
2017         Adjust the current selection given deltas to apply to the location and length.
2018
2019         (WebKit::visiblePositionAdjacentToVisiblePosition):
2020         (WebKit::visiblePositionForPointInRootViewCoordinates):
2021         (WebKit::WebPage::requestDocumentEditingContext):
2022         Retrieve the relevant part of the selection, as well as the context,
2023         given either the selection, or a rect.
2024         If we're collecting context for a rect, we split the context between
2025         before and after (except for the part that intersects the selection).
2026         The three strings will always be directly adjacent, and any of the three
2027         can sometimes be null.
2028
2029 2019-03-21  James Magahern  <jmagahern@apple.com>
2030
2031         Long press gesture recognizers in WKWebView are conflicting with internal scroll view long press gesture recognizers
2032         https://bugs.webkit.org/show_bug.cgi?id=195726
2033         rdar://problem/48582449
2034
2035         Reviewed by Megan Gardner.
2036
2037         We just need to add another clause to WKContentViewInteraction's
2038         canPreventGestureRecognizer whitelist. 
2039
2040         * UIProcess/ios/WKContentViewInteraction.mm:
2041         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
2042
2043 2019-03-21  Simon Fraser  <simon.fraser@apple.com>
2044
2045         [iOS WK2] Turn on async overflow scrolling by default
2046         https://bugs.webkit.org/show_bug.cgi?id=196011
2047         rdar://problem/48453859
2048
2049         Reviewed by Antti Koivisto.
2050
2051         * Shared/WebPreferences.yaml:
2052         * Shared/WebPreferencesDefaultValues.h:
2053
2054 2019-03-21  Alex Christensen  <achristensen@webkit.org>
2055
2056         Remove last use of LegacySync IPC messages
2057         https://bugs.webkit.org/show_bug.cgi?id=196113
2058
2059         Reviewed by Chris Dumez.
2060
2061         Also rename "Delayed" to "Synchronous" now that there's only one type of synchronous message.
2062
2063         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2064         * NetworkProcess/NetworkProcess.messages.in:
2065         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
2066         (WebKit::WebSWServerConnection::syncTerminateWorkerFromClient):
2067         * NetworkProcess/ServiceWorker/WebSWServerConnection.h:
2068         * NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
2069         * Platform/IPC/Connection.cpp:
2070         (IPC::Connection::dispatchMessage):
2071         * Platform/IPC/HandleMessage.h:
2072         (IPC::handleMessageSynchronous):
2073         (IPC::handleMessageSynchronousWantsConnection):
2074         (IPC::handleMessageLegacySync): Deleted.
2075         (IPC::handleMessageDelayed): Deleted.
2076         (IPC::handleMessageDelayedWantsConnection): Deleted.
2077         * PluginProcess/PluginControllerProxy.messages.in:
2078         * PluginProcess/WebProcessConnection.messages.in:
2079         * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
2080         (WebKit::WebPage::didReceiveSyncWebPageMessage):
2081         * Scripts/webkit/MessageReceiver-expected.cpp:
2082         (WebKit::WebPage::didReceiveSyncMessage):
2083         * Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
2084         (Messages::WebPage::TestSyncMessage::send):
2085         (Messages::WebPage::TestSynchronousMessage::send):
2086         (WebKit::WebPage::didReceiveSyncMessage):
2087         (Messages::WebPage::TestDelayedMessage::send): Deleted.
2088         * Scripts/webkit/MessagesSuperclass-expected.h:
2089         (Messages::WebPage::TestSynchronousMessage::name):
2090         (Messages::WebPage::TestSynchronousMessage::TestSynchronousMessage):
2091         (Messages::WebPage::TestDelayedMessage::receiverName): Deleted.
2092         (Messages::WebPage::TestDelayedMessage::name): Deleted.
2093         (Messages::WebPage::TestDelayedMessage::TestDelayedMessage): Deleted.
2094         (Messages::WebPage::TestDelayedMessage::arguments const): Deleted.
2095         * Scripts/webkit/messages.py:
2096         * Scripts/webkit/messages_unittest.py:
2097         * Scripts/webkit/test-legacy-messages.in:
2098         * Scripts/webkit/test-messages.in:
2099         * Scripts/webkit/test-superclass-messages.in:
2100         * Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in:
2101         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
2102         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
2103         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2104         * UIProcess/WebFullScreenManagerProxy.messages.in:
2105         * UIProcess/WebPageProxy.messages.in:
2106         * UIProcess/WebPasteboardProxy.messages.in:
2107         * UIProcess/WebProcessPool.messages.in:
2108         * UIProcess/WebProcessProxy.messages.in:
2109         * UIProcess/WebStorage/StorageManager.messages.in:
2110         * UIProcess/mac/SecItemShimProxy.messages.in:
2111         * WebProcess/Plugins/PluginProcessConnection.messages.in:
2112         * WebProcess/Plugins/PluginProxy.messages.in:
2113         * WebProcess/Storage/WebSWClientConnection.cpp:
2114         (WebKit::WebSWClientConnection::syncTerminateWorker):
2115         * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
2116         * WebProcess/WebPage/WebPage.messages.in:
2117         * WebProcess/WebProcess.messages.in:
2118
2119 2019-03-21  Brian Burg  <bburg@apple.com>
2120
2121         Web Automation: support uploading non-local file paths
2122         https://bugs.webkit.org/show_bug.cgi?id=196081
2123         <rdar://problem/45819897>
2124
2125         Reviewed by Devin Rousso and Joseph Pecoraro.
2126
2127         To support cases where supplied file paths do not exist on the session host, add support for
2128         receiving file contents via Automation.setFilesToSelectForFileUpload.
2129
2130         * UIProcess/Automation/Automation.json: Add new parameter.
2131
2132         * UIProcess/Automation/WebAutomationSession.h:
2133         * UIProcess/Automation/WebAutomationSession.cpp:
2134         (WebKit::WebAutomationSession::setFilesToSelectForFileUpload):
2135         Add support for receiving and saving file contents to a temporary directory. Rewrite the used paths so
2136         that WebCore knows to look at the revised paths where the file contents have been saved.
2137
2138         (WebKit::WebAutomationSession::platformGenerateLocalFilePathForRemoteFile):
2139         Since WebKit does not have usable FileSystem implementations for all ports, shell out the actual
2140         saving of base64-encoded file data. Provide a Cocoa implementation, since that's what I can test.
2141
2142         * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
2143         (WebKit::WebAutomationSession::platformGenerateLocalFilePathForRemoteFile):
2144         Use WTF::FileSystem to create a temporary directory, and use Cocoa methods to actually write the file.
2145
2146 2019-03-21  Youenn Fablet  <youenn@apple.com>
2147
2148         Cache API and IDB space usages should be initialized on first quota check
2149         https://bugs.webkit.org/show_bug.cgi?id=195707
2150
2151         Reviewed by Chris Dumez.
2152
2153         When the quota manager is created, make sure it delays quota check decisions until IDB and Cache API quota users are initialized.
2154         For IDB, the creation is synchronous but it may not be synchronous for Cache API.
2155         For that purpose, add a temporary quota user that will stay uninitialized until these two quota users are added.
2156         Once added, the temporary quota user is removed.
2157         The addition of the real users is made asynchronously as this is triggered by the creation of one of the two quota users.
2158
2159         In the case of a Cache API caches being cleared, make sure to reset the size to zero and to redo the quota user initialization dance.
2160
2161         * NetworkProcess/NetworkProcess.cpp:
2162         (WebKit::QuotaUserInitializer::initialize):
2163         (WebKit::QuotaUserInitializer::~QuotaUserInitializer):
2164         (WebKit::QuotaUserInitializer::QuotaUserInitializer):
2165         (WebKit::NetworkProcess::storageQuotaManager):
2166         * NetworkProcess/cache/CacheStorageEngine.cpp:
2167         (WebKit::CacheStorage::Engine::initializeQuotaUser):
2168         * NetworkProcess/cache/CacheStorageEngine.h:
2169         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2170         (WebKit::CacheStorage::Caches::clear):
2171
2172 2019-03-21  Per Arne Vollan  <pvollan@apple.com>
2173
2174         [iOS][macOS] Fix sandbox call violations
2175         https://bugs.webkit.org/show_bug.cgi?id=195809
2176         <rdar://problem/48829655>
2177
2178         Reviewed by Brent Fulgham.
2179
2180         An additional syscall needs to be added to the sandbox allow list.
2181
2182         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2183         * WebProcess/com.apple.WebProcess.sb.in:
2184
2185 2019-03-21  Eric Carlson  <eric.carlson@apple.com>
2186
2187         Add UI process WebRTC runtime logging.
2188         https://bugs.webkit.org/show_bug.cgi?id=196020
2189         <rdar://problem/49071443>
2190
2191         Reviewed by Youenn Fablet.
2192
2193         * Platform/Logging.cpp:
2194         (WebKit::getLogChannel): New.
2195         * Platform/Logging.h:
2196         * Shared/WebCoreArgumentCoders.h: Add coders for WTFLogChannelState and WTFLogLevel.
2197
2198         Add runtime logging.
2199         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2200         (WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
2201         (WebKit::UserMediaPermissionRequestManagerProxy::stopCapture):
2202         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
2203         (WebKit::UserMediaPermissionRequestManagerProxy::clearCachedState):
2204         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
2205         (WebKit::UserMediaPermissionRequestManagerProxy::denyRequest):
2206         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
2207         (WebKit::UserMediaPermissionRequestManagerProxy::resetAccess):
2208         (WebKit::UserMediaPermissionRequestManagerProxy::grantAccess):
2209         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2210         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest):
2211         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest):
2212         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest):
2213         (WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList):
2214         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
2215         (WebKit::UserMediaPermissionRequestManagerProxy::captureStateChanged):
2216         (WebKit::UserMediaPermissionRequestManagerProxy::watchdogTimerFired):
2217         (WebKit::UserMediaPermissionRequestManagerProxy::logChannel const):
2218         (WebKit::convertEnumerationToString):
2219
2220         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2221         (WTF::LogArgument<WebKit::UserMediaPermissionRequestManagerProxy::RequestAction>::toString):
2222         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2223         (WebKit::convertEnumerationToString): Add an enum specialization for logging.
2224
2225         * UIProcess/UserMediaPermissionRequestProxy.h:
2226         (WTF::LogArgument<WebKit::UserMediaPermissionRequestProxy::UserMediaAccessDenialReason>::toString): Ditto.
2227
2228         * UIProcess/WebPageProxy.cpp:
2229         (WebKit::WebPageProxy::logger):
2230         (WebKit::WebPageProxy::configureLoggingChannel):
2231         * UIProcess/WebPageProxy.h:
2232         * UIProcess/WebPageProxy.messages.in:
2233
2234         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2235         (WebKit::WebChromeClient::configureLoggingChannel):
2236         * WebProcess/WebCoreSupport/WebChromeClient.h:
2237         * WebProcess/WebPage/WebPage.cpp:
2238         (WebKit::WebPage::configureLoggingChannel):
2239         * WebProcess/WebPage/WebPage.h:
2240
2241 2019-03-21  Alex Christensen  <achristensen@webkit.org>
2242
2243         Stop using LegacySync messages in WebPageProxy
2244         https://bugs.webkit.org/show_bug.cgi?id=196056
2245
2246         Reviewed by Chris Dumez.
2247
2248         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2249         (WebKit::WebPageProxy::loadRecentSearches):
2250         * UIProcess/ProvisionalPageProxy.cpp:
2251         (WebKit::ProvisionalPageProxy::backForwardGoToItem):
2252         (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
2253         * UIProcess/ProvisionalPageProxy.h:
2254         * UIProcess/WebPageProxy.cpp:
2255         (WebKit::WebPageProxy::handleSynchronousMessage):
2256         (WebKit::WebPageProxy::hasInsecureContent):
2257         (WebKit::WebPageProxy::accessibilityScreenToRootView):
2258         (WebKit::WebPageProxy::rootViewToAccessibilityScreen):
2259         (WebKit::WebPageProxy::printFrame):
2260         (WebKit::WebPageProxy::backForwardGoToItem):
2261         (WebKit::WebPageProxy::backForwardGoToItemShared):
2262         (WebKit::WebPageProxy::backForwardItemAtIndex):
2263         (WebKit::WebPageProxy::backForwardBackListCount):
2264         (WebKit::WebPageProxy::backForwardForwardListCount):
2265         (WebKit::WebPageProxy::canUndoRedo):
2266         (WebKit::WebPageProxy::executeUndoRedo):
2267         (WebKit::WebPageProxy::checkTextOfParagraph):
2268         (WebKit::WebPageProxy::checkSpellingOfString):
2269         (WebKit::WebPageProxy::checkGrammarOfString):
2270         (WebKit::WebPageProxy::spellingUIIsShowing):
2271         (WebKit::WebPageProxy::getGuessesForWord):
2272         (WebKit::WebPageProxy::substitutionsPanelIsShowing):
2273         (WebKit::WebPageProxy::showCorrectionPanel):
2274         (WebKit::WebPageProxy::dismissCorrectionPanel):
2275         (WebKit::WebPageProxy::dismissCorrectionPanelSoon):
2276         (WebKit::WebPageProxy::recordAutocorrectionResponse):
2277         (WebKit::WebPageProxy::dictationAlternatives):
2278         (WebKit::WebPageProxy::wrapCryptoKey):
2279         (WebKit::WebPageProxy::unwrapCryptoKey):
2280         (WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
2281         (WebKit::WebPageProxy::serializedAttachmentDataForIdentifiers):
2282         (WebKit::WebPageProxy::speechSynthesisVoiceList):
2283         (WebKit::WebPageProxy::printMainFrame): Deleted.
2284         * UIProcess/WebPageProxy.h:
2285         * UIProcess/WebPageProxy.messages.in:
2286         * UIProcess/gtk/WebPageProxyGtk.cpp:
2287         (WebKit::WebPageProxy::createPluginContainer):
2288         * UIProcess/ios/WebPageProxyIOS.mm:
2289         (WebKit::WebPageProxy::interpretKeyEvent):
2290         * UIProcess/mac/WebPageProxyMac.mm:
2291         (WebKit::WebPageProxy::getIsSpeaking):
2292         (WebKit::WebPageProxy::executeSavedCommandBySelector):
2293         (WebKit::WebPageProxy::showPDFContextMenu):
2294
2295 2019-03-21  Alex Christensen  <achristensen@webkit.org>
2296
2297         Stop using LegacySync messages in WebPage
2298         https://bugs.webkit.org/show_bug.cgi?id=196057
2299
2300         Reviewed by Chris Dumez.
2301
2302         * WebProcess/WebPage/WebPage.h:
2303         (WebKit::WebPage::markLayersVolatile):
2304         * WebProcess/WebPage/WebPage.messages.in:
2305         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2306         (WebKit::WebPage::getCenterForZoomGesture):
2307         * WebProcess/WebPage/ios/WebPageIOS.mm:
2308         (WebKit::WebPage::readSelectionFromPasteboard):
2309         (WebKit::WebPage::getStringSelectionForPasteboard):
2310         (WebKit::WebPage::getDataSelectionForPasteboard):
2311         (WebKit::WebPage::shouldDelayWindowOrderingEvent):
2312         (WebKit::WebPage::acceptsFirstMouse):
2313         * WebProcess/WebPage/mac/WebPageMac.mm:
2314         (WebKit::WebPage::replaceSelectionWithPasteboardData):
2315         (WebKit::WebPage::readSelectionFromPasteboard):
2316         (WebKit::WebPage::getStringSelectionForPasteboard):
2317         (WebKit::WebPage::getDataSelectionForPasteboard):
2318         (WebKit::WebPage::shouldDelayWindowOrderingEvent):
2319         (WebKit::WebPage::acceptsFirstMouse):
2320
2321 2019-03-21  Alex Christensen  <achristensen@webkit.org>
2322
2323         Stop using LegacySync messages in WebPasteboardProxy
2324         https://bugs.webkit.org/show_bug.cgi?id=196060
2325
2326         Reviewed by Chris Dumez.
2327
2328         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
2329         (WebKit::WebPasteboardProxy::getPasteboardTypes):
2330         (WebKit::WebPasteboardProxy::getPasteboardPathnamesForType):
2331         (WebKit::WebPasteboardProxy::getPasteboardStringForType):
2332         (WebKit::WebPasteboardProxy::getPasteboardStringsForType):
2333         (WebKit::WebPasteboardProxy::getPasteboardBufferForType):
2334         (WebKit::WebPasteboardProxy::pasteboardCopy):
2335         (WebKit::WebPasteboardProxy::getPasteboardChangeCount):
2336         (WebKit::WebPasteboardProxy::getPasteboardUniqueName):
2337         (WebKit::WebPasteboardProxy::getPasteboardColor):
2338         (WebKit::WebPasteboardProxy::getPasteboardURL):
2339         (WebKit::WebPasteboardProxy::addPasteboardTypes):
2340         (WebKit::WebPasteboardProxy::setPasteboardTypes):
2341         (WebKit::WebPasteboardProxy::setPasteboardURL):
2342         (WebKit::WebPasteboardProxy::setPasteboardColor):
2343         (WebKit::WebPasteboardProxy::setPasteboardStringForType):
2344         (WebKit::WebPasteboardProxy::setPasteboardBufferForType):
2345         (WebKit::WebPasteboardProxy::getNumberOfFiles):
2346         (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
2347         (WebKit::WebPasteboardProxy::writeCustomData):
2348         (WebKit::WebPasteboardProxy::readStringFromPasteboard):
2349         (WebKit::WebPasteboardProxy::readURLFromPasteboard):
2350         (WebKit::WebPasteboardProxy::readBufferFromPasteboard):
2351         (WebKit::WebPasteboardProxy::getPasteboardItemsCount):
2352         (WebKit::WebPasteboardProxy::allPasteboardItemInfo):
2353         (WebKit::WebPasteboardProxy::informationForItemAtIndex):
2354         * UIProcess/WebPasteboardProxy.cpp:
2355         (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
2356         (WebKit::WebPasteboardProxy::writeCustomData):
2357         * UIProcess/WebPasteboardProxy.h:
2358         * UIProcess/WebPasteboardProxy.messages.in:
2359         * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
2360         (WebKit::WebPasteboardProxy::writeToClipboard):
2361         (WebKit::WebPasteboardProxy::readFromClipboard):
2362         * UIProcess/wpe/WebPasteboardProxyWPE.cpp:
2363         (WebKit::WebPasteboardProxy::getPasteboardTypes):
2364         (WebKit::WebPasteboardProxy::readStringFromPasteboard):
2365         (WebKit::WebPasteboardProxy::writeWebContentToPasteboard):
2366         (WebKit::WebPasteboardProxy::writeStringToPasteboard):
2367
2368 2019-03-21  Andy Estes  <aestes@apple.com>
2369
2370         [iOS] Apple Pay should be available in documents with no user agent scripts
2371         https://bugs.webkit.org/show_bug.cgi?id=196061
2372         <rdar://problem/48649391>
2373
2374         Reviewed by Brady Eidson.
2375
2376         * Shared/AuxiliaryProcess.h:
2377         * Shared/Cocoa/AuxiliaryProcessCocoa.mm:
2378         (WebKit::AuxiliaryProcess::parentProcessHasEntitlement):
2379
2380         Added a convenience function for checking parent process entitlements.
2381
2382         * Shared/WebPreferences.yaml:
2383         * Shared/WebPreferencesDefaultValues.h:
2384         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2385         (-[WKWebViewConfiguration init]):
2386
2387         Enabled Apple Pay by default on platforms that enable APPLE_PAY_REMOTE_UI.
2388
2389         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
2390         (WebKit::WebPaymentCoordinator::supportsUnrestrictedApplePay const):
2391         * WebProcess/ApplePay/WebPaymentCoordinator.h:
2392
2393         Implemented supportsUnrestrictedApplePay by checking for the
2394         com.apple.private.WebKit.UnrestrictedApplePay entitlement on platforms that enable
2395         APPLE_PAY_REMOTE_UI.
2396
2397         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
2398         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2399         (didClearWindowObjectForFrame):
2400         (setUpPageLoaderClient):
2401
2402         Added injected bundle SPI that TestWebKitAPI uses to inject the WebCore Internals interface.
2403
2404         * WebProcess/WebPage/WebPage.cpp:
2405         (WebKit::WebPage::runJavaScript):
2406
2407         Changed to call ScriptController::executeUserAgentScriptInWorld.
2408
2409 2019-03-21  Chris Dumez  <cdumez@apple.com>
2410
2411         WebKit should throw when trying to create a WKWebView with a related view that is using a different data store
2412         https://bugs.webkit.org/show_bug.cgi?id=196041
2413         <rdar://problem/49083230>
2414
2415         Reviewed by Alex Christensen.
2416
2417         WebKit should throw when trying to create a WKWebView with a related view that is using a different data store.
2418         We do not support having several WebsiteDataStores sharing the same WebProcess.
2419
2420         * UIProcess/API/Cocoa/WKWebView.mm:
2421         (-[WKWebView _initializeWithConfiguration:]):
2422         * UIProcess/WebProcessPool.cpp:
2423         (WebKit::WebProcessPool::createWebPage):
2424
2425 2019-03-21  Alex Christensen  <achristensen@webkit.org>
2426
2427         Add SPI to inform applications of WKContentRuleList actions
2428         https://bugs.webkit.org/show_bug.cgi?id=195965
2429         <rdar://problem/42664365>
2430
2431         Reviewed by Geoff Garen.
2432
2433         * NetworkProcess/NetworkLoadChecker.cpp:
2434         (WebKit::NetworkLoadChecker::checkRequest):
2435         (WebKit::NetworkLoadChecker::processContentRuleListsForLoad):
2436         (WebKit::NetworkLoadChecker::processContentExtensionRulesForLoad): Deleted.
2437         * NetworkProcess/NetworkLoadChecker.h:
2438         * UIProcess/API/APINavigationClient.h:
2439         (API::NavigationClient::contentRuleListNotification):
2440         * UIProcess/API/C/WKPage.cpp:
2441         (WKPageSetPageNavigationClient):
2442         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2443         * UIProcess/Cocoa/NavigationState.h:
2444         * UIProcess/Cocoa/NavigationState.mm:
2445         (WebKit::NavigationState::setNavigationDelegate):
2446         (WebKit::NavigationState::NavigationClient::contentRuleListNotification):
2447         * UIProcess/WebPageProxy.cpp:
2448         (WebKit::WebPageProxy::contentRuleListNotification):
2449         * UIProcess/WebPageProxy.h:
2450         * UIProcess/WebPageProxy.messages.in:
2451         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2452         (WebKit::WebChromeClient::contentRuleListNotification):
2453         * WebProcess/WebCoreSupport/WebChromeClient.h:
2454
2455 2019-03-21  Simon Fraser  <simon.fraser@apple.com>
2456
2457         Add an internal feature flag to disable the -webkit-overflow-scrolling CSS property
2458         https://bugs.webkit.org/show_bug.cgi?id=196058
2459         rdar://problem/49078202
2460
2461         Reviewed by Antti Koivisto.
2462
2463         Add an internal feature flag called "LegacyOverflowScrollingTouchEnabled", initially
2464         on by default.
2465
2466         * Shared/WebPreferences.yaml:
2467
2468 2019-03-21  Antti Koivisto  <antti@apple.com>
2469
2470         UI-process hit-testing needs to know about containing block relationships
2471         https://bugs.webkit.org/show_bug.cgi?id=195845
2472         <rdar://problem/48949633>
2473
2474         Reviewed by Simon Fraser.
2475
2476         Test: fast/scrolling/ios/overflow-scroll-overlap-5.html
2477
2478         When an overflow scroller contains a positioned element the element may not be on a descendant layer of the scroller,
2479         yet should move along with it. This needs to be taken into account in UI-side hit testing.
2480
2481         * UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h:
2482         (WebKit::RemoteLayerTreeNode::nonAncestorScrollContainerIDs const):
2483         (WebKit::RemoteLayerTreeNode::addNonAncestorScrollContainerID):
2484         (WebKit::RemoteLayerTreeNode::clearNonAncestorScrollContainerIDs):
2485
2486         Maintain non-ancestor scrolling relationships for layers.
2487
2488         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
2489         (WebKit::RemoteScrollingCoordinatorProxy::commitScrollingTreeState):
2490         (WebKit::RemoteScrollingCoordinatorProxy::establishLayerTreeScrollingRelations):
2491         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
2492         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
2493         (WebKit::isScrolledBy):
2494
2495         Helper to figure out who scrolls who.
2496
2497         (-[UIView _web_findDescendantViewAtPoint:withEvent:]):
2498         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2499         (WebKit::RemoteScrollingCoordinatorProxy::establishLayerTreeScrollingRelations):
2500
2501         After commit, pull the non-ancestor scrolling relationships from the scrolling tree and update the layer tree.
2502
2503 2019-03-21  Daniel Bates  <dabates@apple.com>
2504
2505         [iOS] Inline -_ensureFormAccessoryView into -formAccessoryView and have -_updateAccessory ensure we have a form accessory
2506         https://bugs.webkit.org/show_bug.cgi?id=196021
2507
2508         Reviewed by Wenson Hsieh.
2509
2510         Every caller of -_ensureFormAccessoryView, except -formAccessoryView, immediately follows the call
2511         with a call to -_updateAccessory. Let's just have -_updateAccessory ensure we have a form accessory
2512         view and inline the implementation of -_ensureFormAccessoryView into -formAccessoryView so we can
2513         remove one method.
2514
2515         * UIProcess/ios/WKContentViewInteraction.mm:
2516         (-[WKContentView inputView]): Remove call to -_ensureFormAccessoryView, -_updateAccessory will do
2517         the equivalent work for us.
2518         (-[WKContentView formAccessoryView]): Moved implementation of -_ensureFormAccessoryView into here.
2519         (-[WKContentView _updateAccessory]): Call self.formAccessoryView to ensure we have a form accessory view.
2520         (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
2521         Remove call to -_ensureFormAccessoryView, -_updateAccessory will do
2522         the equivalent work for us.
2523         (-[WKContentView _ensureFormAccessoryView]): Deleted.
2524
2525 2019-03-21  Shawn Roberts  <sroberts@apple.com>
2526
2527         Unreviewed, rolling out r243250.
2528
2529         Causing 109 Failures and 2 crashes on iOS Sim Debug
2530         OpenSource/Internal queues
2531
2532         Reverted changeset:
2533
2534         "[iOS WK2] Turn on async overflow scrolling by default"
2535         https://bugs.webkit.org/show_bug.cgi?id=196011
2536         https://trac.webkit.org/changeset/243250
2537
2538 2019-03-21  Brent Fulgham  <bfulgham@apple.com>
2539
2540         Fix possible memory leak when dismissing a color picker
2541         https://bugs.webkit.org/show_bug.cgi?id=196026
2542         <rdar://problem/48778568>
2543
2544         Reviewed by Wenson Hsieh.
2545
2546         Fix a problem with WebPageProxy::endColorPicker where an early return could leave a color picker
2547         with a +1 reference count after dismissing it.
2548
2549         * UIProcess/WebColorPicker.cpp:
2550         (WebKit::WebColorPicker::endPicker):
2551         * UIProcess/WebPageProxy.cpp:
2552         (WebKit::WebPageProxy::endColorPicker):
2553         (WebKit::WebPageProxy::didEndColorPicker):
2554
2555 2019-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2556
2557         [GTK][WPE] Add API to provide geolocation information
2558         https://bugs.webkit.org/show_bug.cgi?id=195940
2559
2560         Reviewed by Michael Catanzaro.
2561
2562         Add WebKitGeolocationManager public class to handle geolocation position updates. WebKitGeolocationProvider has
2563         been removed and the default implementation based on GeoClue is done by WebKitGeolocationManager.
2564
2565         * PlatformGTK.cmake:
2566         * PlatformWPE.cmake:
2567         * SourcesGTK.txt:
2568         * SourcesWPE.txt:
2569         * UIProcess/API/glib/WebKitGeolocationManager.cpp: Added.
2570         (_WebKitGeolocationPosition::_WebKitGeolocationPosition):
2571         (webkit_geolocation_position_new):
2572         (webkit_geolocation_position_copy):
2573         (webkit_geolocation_position_free):
2574         (webkit_geolocation_position_set_timestamp):
2575         (webkit_geolocation_position_set_altitude):
2576         (webkit_geolocation_position_set_altitude_accuracy):
2577         (webkit_geolocation_position_set_heading):
2578         (webkit_geolocation_position_set_speed):
2579         (webkitGeolocationManagerStop):
2580         (webkitGeolocationManagerSetEnableHighAccuracy):
2581         (webkitGeolocationManagerCreate):
2582         (webkitGeolocationManagerGetProperty):
2583         (webkit_geolocation_manager_class_init):
2584         (webkit_gelocation_manager_update_position):
2585         (webkit_gelocation_manager_failed):
2586         (webkit_geolocation_manager_get_enable_high_accuracy):
2587         * UIProcess/API/glib/WebKitGeolocationManagerPrivate.h: Copied from Source/WebCore/platform/geoclue/GeolocationProviderGeoclueClient.h.
2588         * UIProcess/API/glib/WebKitGeolocationProvider.cpp: Removed.
2589         * UIProcess/API/glib/WebKitGeolocationProvider.h: Removed.
2590         * UIProcess/API/glib/WebKitWebContext.cpp:
2591         (webkitWebContextConstructed): Create a WebKitGeolocationManager instead of a WebKitGeolocationProvider.
2592         (webkit_web_context_get_geolocation_manager): Get the WebKitGeolocationManager.
2593         * UIProcess/API/gtk/WebKitGeolocationManager.h: Added.
2594         * UIProcess/API/gtk/WebKitWebContext.h:
2595         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2596         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
2597         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
2598         * UIProcess/API/gtk/webkit2.h:
2599         * UIProcess/API/wpe/WebKitGeolocationManager.h: Added.
2600         * UIProcess/API/wpe/WebKitWebContext.h:
2601         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
2602         * UIProcess/API/wpe/docs/wpe-docs.sgml:
2603         * UIProcess/API/wpe/webkit.h:
2604
2605 2019-03-20  Youenn Fablet  <youenn@apple.com>
2606
2607         Compute quota after network process restart based on default quota and space used
2608         https://bugs.webkit.org/show_bug.cgi?id=195804
2609
2610         Reviewed by Chris Dumez.
2611
2612         Make sure that Cache Storage quota user waits to declare as initialized to its manager
2613         until all data is loaded so that it can report a valid space used from the start.
2614
2615         Add test API to reset the quota to its default value and compute it according current space use.
2616
2617         * NetworkProcess/NetworkProcess.cpp:
2618         (WebKit::NetworkProcess::updateQuotaBasedOnSpaceUsageForTesting):
2619         * NetworkProcess/NetworkProcess.h:
2620         * NetworkProcess/NetworkProcess.messages.in:
2621         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2622         (WebKit::CacheStorage::Caches::create):
2623         (WebKit::CacheStorage::Caches::Caches):
2624         (WebKit::CacheStorage::Caches::whenInitialized):
2625         * NetworkProcess/cache/CacheStorageEngineCaches.h:
2626         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
2627         (WebKit::CacheStorageEngineConnection::dereference):
2628         * WebProcess/Cache/WebCacheStorageConnection.cpp:
2629         (WebKit::WebCacheStorageConnection::setQuotaBasedOnSpaceUsage):
2630         * WebProcess/Cache/WebCacheStorageConnection.h:
2631
2632 2019-03-20  Simon Fraser  <simon.fraser@apple.com>
2633
2634         Rename ENABLE_ACCELERATED_OVERFLOW_SCROLLING macro to ENABLE_OVERFLOW_SCROLLING_TOUCH
2635         https://bugs.webkit.org/show_bug.cgi?id=196049
2636
2637         Reviewed by Tim Horton.
2638
2639         This macro is about the -webkit-overflow-scrolling CSS property, not accelerated
2640         overflow scrolling in general, so rename it.
2641
2642         * Configurations/FeatureDefines.xcconfig:
2643
2644 2019-03-20  Jiewen Tan  <jiewen_tan@apple.com>
2645
2646         Extend Networking Process sandbox for some system frameworks
2647         https://bugs.webkit.org/show_bug.cgi?id=196036
2648         <rdar://problem/47594150>
2649
2650         Reviewed by Brent Fulgham.
2651
2652         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2653         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2654
2655 2019-03-20  Alex Christensen  <achristensen@webkit.org>
2656
2657         Reduce use of LegacySync IPC message type
2658         https://bugs.webkit.org/show_bug.cgi?id=194835
2659
2660         Reviewed by Darin Adler.
2661
2662         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2663         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
2664         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
2665         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
2666         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
2667         (WebKit::NetworkConnectionToWebProcess::blobSize):
2668         (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
2669         (WebKit::NetworkConnectionToWebProcess::establishSWServerConnection):
2670         * NetworkProcess/NetworkConnectionToWebProcess.h:
2671         (WebKit::NetworkConnectionToWebProcess::getNetworkLoadInformationRequest):
2672         (WebKit::NetworkConnectionToWebProcess::getNetworkLoadInformationResponse):
2673         (WebKit::NetworkConnectionToWebProcess::getNetworkLoadIntermediateInformation):
2674         (WebKit::NetworkConnectionToWebProcess::takeNetworkLoadInformationMetrics):
2675         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2676         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
2677         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
2678         (WebKit::UserMediaCaptureManagerProxy::capabilities):
2679         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
2680         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
2681         * UIProcess/Plugins/PluginProcessProxy.h:
2682         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2683         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2684         (WebKit::PluginProcessProxy::launchProcess):
2685         (WebKit::PluginProcessProxy::launchApplicationAtURL):
2686         (WebKit::PluginProcessProxy::openURL):
2687         (WebKit::PluginProcessProxy::openFile):
2688         * UIProcess/WebFullScreenManagerProxy.cpp:
2689         (WebKit::WebFullScreenManagerProxy::supportsFullScreen):
2690         * UIProcess/WebFullScreenManagerProxy.h:
2691         * UIProcess/WebFullScreenManagerProxy.messages.in:
2692         * WebProcess/WebProcess.cpp:
2693         (WebKit::WebProcess::fetchWebsiteData):
2694         (WebKit::WebProcess::deleteWebsiteData):
2695         (WebKit::WebProcess::deleteWebsiteDataForOrigins):
2696         (WebKit::WebProcess::processWillSuspendImminently):
2697         * WebProcess/WebProcess.h:
2698         * WebProcess/WebProcess.messages.in:
2699
2700 2019-03-20  Keith Rollin  <krollin@apple.com>
2701
2702         Update checks that determine if WebKit is system WebKit
2703         https://bugs.webkit.org/show_bug.cgi?id=195756
2704
2705         Unreviewed tweak of r243251 after unreviewed build fix after r243230.
2706
2707         * Shared/mac/AuxiliaryProcessMac.mm:
2708         (WebKit::AuxiliaryProcess::isSystemWebKit):
2709
2710 2019-03-20  Keith Rollin  <krollin@apple.com>
2711
2712         Update checks that determine if WebKit is system WebKit
2713         https://bugs.webkit.org/show_bug.cgi?id=195756
2714
2715         Unreviewed build fix after r243230.
2716
2717         * Shared/mac/AuxiliaryProcessMac.mm:
2718         (WebKit::AuxiliaryProcess::isSystemWebKit):
2719
2720 2019-03-20  Simon Fraser  <simon.fraser@apple.com>
2721
2722         [iOS WK2] Turn on async overflow scrolling by default
2723         https://bugs.webkit.org/show_bug.cgi?id=196011
2724         rdar://problem/48453859
2725
2726         Reviewed by Antti Koivisto.
2727
2728         Turn async overflow scroll on by default for iOS WK2.
2729
2730         * Shared/WebPreferences.yaml:
2731         * Shared/WebPreferencesDefaultValues.h:
2732
2733 2019-03-20  Youenn Fablet  <youenn@apple.com>
2734
2735         Have smaller default quotas for third party frames
2736         https://bugs.webkit.org/show_bug.cgi?id=195841
2737
2738         Reviewed by Geoffrey Garen.
2739
2740         * NetworkProcess/NetworkProcess.cpp:
2741         (WebKit::NetworkProcess::storageQuotaManager):
2742         For third party iframes, use the default quota divided by 10.
2743
2744 2019-03-20  Dean Jackson  <dino@apple.com>
2745
2746         [iOS] Enable fast clicking everywhere
2747         https://bugs.webkit.org/show_bug.cgi?id=196023
2748         <rdar://problem/49073589>
2749
2750         Reviewed by Wenson Hsieh.
2751
2752         Set FastClicksEverywhere to on by default for iPhone & iPad.
2753
2754         * Shared/WebPreferences.yaml:
2755         * Shared/WebPreferencesDefaultValues.h:
2756
2757 2019-03-20  Chris Dumez  <cdumez@apple.com>
2758
2759         Regression(PSON): ViewGestureController is not properly notified of process swaps on iOS
2760         https://bugs.webkit.org/show_bug.cgi?id=196029
2761         <rdar://problem/48954651>
2762
2763         Reviewed by Tim Horton.
2764
2765         If there is a ViewGestureController when process swapping, make sure we disconnect it
2766         from the old process and reconnect it to the new one. This matches what is done in
2767         WebViewImpl for macOS (see r238356).
2768
2769         * UIProcess/API/Cocoa/WKWebView.mm:
2770         (-[WKWebView _processWillSwap]):
2771         (-[WKWebView _processDidExit]):
2772         (-[WKWebView _didRelaunchProcess]):
2773
2774 2019-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2775
2776         [GTK] REGRESSION(r243094): crash when launching minibrowser
2777         https://bugs.webkit.org/show_bug.cgi?id=195951
2778
2779         Reviewed by Joseph Pecoraro.
2780
2781         Always return the inspector from WebPageProxy::inspector() when the page hasn't been closed. The inspector is
2782         created in WebPageProxy constructor and it's safe to use even before a process has been launched, because
2783         m_inspectedPage is null-checked everywhere.
2784
2785         * UIProcess/WebPageProxy.cpp:
2786         (WebKit::WebPageProxy::inspector const):
2787
2788 2019-03-20  Keith Rollin  <krollin@apple.com>
2789
2790         Update checks that determine if WebKit is system WebKit
2791         https://bugs.webkit.org/show_bug.cgi?id=195756
2792
2793         Reviewed by Alexey Proskuryakov.
2794
2795         The system WebKit can be installed in additional locations, so check
2796         for and allow those, too.
2797
2798         * Shared/mac/AuxiliaryProcessMac.mm:
2799         (WebKit::AuxiliaryProcess::isSystemWebKit):
2800
2801 2019-03-20  Per Arne Vollan  <pvollan@apple.com>
2802
2803         [iOS] Unable to PiP web videos in Safari due to sandbox violation
2804         https://bugs.webkit.org/show_bug.cgi?id=196015
2805         <rdar://problem/48867037>
2806
2807         Reviewed by Brent Fulgham.
2808
2809         The sandbox should allow getting the iokit property 'ui-pip'.
2810
2811         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2812
2813 2019-03-20  John Wilander  <wilander@apple.com>
2814
2815         (Test fix) Override minimumTimeBetweenDataRecordsRemoval in ResourceLoadStatisticsStore::shouldRemoveDataRecord() during layout tests
2816         https://bugs.webkit.org/show_bug.cgi?id=196017
2817
2818         Unreviewed test fix.
2819
2820         This patch adds a check of parameters().isRunningTest to the return of
2821         ResourceLoadStatisticsStore::shouldRemoveDataRecord() to allow successive
2822         layout tests to remove website data, effectively overriding the
2823         minimumTimeBetweenDataRecordsRemoval setting.
2824
2825         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
2826         (WebKit::ResourceLoadStatisticsStore::shouldRemoveDataRecords const):
2827
2828 2019-03-20  Daniel Bates  <dabates@apple.com>
2829
2830         [iOS] Group UIWebFormAccessoryDelegate-related code and tighten it up a bit
2831         https://bugs.webkit.org/show_bug.cgi?id=196018
2832
2833         Reviewed by Wenson Hsieh.
2834
2835         * UIProcess/ios/WKContentViewInteraction.mm:
2836         (-[WKContentView accessoryClear]): Use uniform initializer syntax. Code could send the empty
2837         string, but I resisted since null string, as we do now, likely encodes more compactly and we
2838         avoid a per-process alloc.
2839         (-[WKContentView accessoryTab:]): Fix style nit; missing space between capture list and arguments
2840         in lambda. Also use lamdba capture initializer syntax and remove a local.
2841         (-[WKContentView _updateAccessory]): Remove a FIXME as it can't be satified with the current
2842         design without more bookkeeping. The design for showing and hiding an AutoFill button added in
2843         r166933 requires knowing the title for the button when showing it via -setAccessoryViewCustomButtonTitle.
2844         We could re-implement such that -setAccessoryViewCustomButtonTitle: stores the title and calls
2845         -_updateAccessory, but that has the disadvantage of increasing the memory footprint of WKContentView
2846         for the stored title and that seems worse than centralizing the logic in _updateAccessory. So,
2847         let's not fix this FIXME. Now that we are removing the FIXME, change to use an early return style.
2848         (-[WKContentView _hideKeyboard]): Micro optimization; only call _updateAccessory if we have
2849         a form accessory view. This method is called everytime we load a page (more precisely when we
2850         commit the load for a page) in addition to everytime we blur (defocus) an element. No need to
2851         update an accessory if we don't have one.
2852  
2853 2019-03-20  Olivier Robin  <olivierrobin@chromium.org>
2854
2855         Fix _getContentsAsAttributedStringWithCompletionHandler availability for iOS.
2856         https://bugs.webkit.org/show_bug.cgi?id=195999
2857
2858         Reviewed by Tim Horton.
2859
2860         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2861
2862 2019-03-20  Brent Fulgham  <bfulgham@apple.com>
2863
2864         Adopt RegistrableDomain in the Storage Access API prompt code paths
2865         https://bugs.webkit.org/show_bug.cgi?id=195957
2866         <rdar://problem/49048028>
2867
2868         Reviewed by Chris Dumez.
2869
2870         While making the code changes in Bug 195866 we noticed that strings were being
2871         used to pass the origins for the API calls. We should adopt the RegistrableDomain
2872         class to improve type safety and avoid introducing bugs in the future.
2873
2874         * UIProcess/API/APIUIClient.h:
2875         (API::UIClient::requestStorageAccessConfirm):
2876         * UIProcess/API/C/WKPage.cpp:
2877         (WKPageSetPageUIClient):
2878         * UIProcess/Cocoa/UIDelegate.h:
2879         * UIProcess/Cocoa/UIDelegate.mm:
2880         (WebKit::UIDelegate::UIClient::requestStorageAccessConfirm):
2881         * UIProcess/Cocoa/WKStorageAccessAlert.h:
2882         * UIProcess/Cocoa/WKStorageAccessAlert.mm:
2883         (WebKit::presentStorageAccessAlert):
2884         * UIProcess/WebPageProxy.cpp:
2885         (WebKit::WebPageProxy::requestStorageAccessConfirm):
2886
2887 2019-03-20  Chris Dumez  <cdumez@apple.com>
2888
2889         Unreviewed, fix typo in comment added in r243156.
2890
2891         * UIProcess/WebPageProxy.cpp:
2892         (WebKit::WebPageProxy::postMessageToInjectedBundle):
2893
2894 2019-03-20  Chris Dumez  <cdumez@apple.com>
2895
2896         Unreviewed, drop invalid assertions landed in r243163.
2897
2898         Those assertions were causing some API tests to crash.
2899         Also include some post-review suggestions from Darin.
2900
2901         * Shared/CallbackID.h:
2902         (WebKit::CallbackID::operator=):
2903         * Shared/OptionalCallbackID.h:
2904         (WebKit::OptionalCallbackID::operator=):
2905
2906 2019-03-20  Chris Dumez  <cdumez@apple.com>
2907
2908         Unreviewed, fix assertion failures in API tests after r243159.
2909
2910         * UIProcess/VisitedLinkStore.cpp:
2911         (WebKit::VisitedLinkStore::removeProcess):
2912
2913 2019-03-20  Tim Horton  <timothy_horton@apple.com>
2914
2915         Add an platform-driven spell-checking mechanism
2916         https://bugs.webkit.org/show_bug.cgi?id=195795
2917
2918         Reviewed by Ryosuke Niwa.
2919
2920         * DerivedSources-input.xcfilelist:
2921         * DerivedSources-output.xcfilelist:
2922         * DerivedSources.make:
2923         * SourcesCocoa.txt:
2924         * UIProcess/Cocoa/TextCheckingController.h: Added.
2925         * UIProcess/Cocoa/TextCheckingController.mm: Added.
2926         (WebKit::TextCheckingController::TextCheckingController):
2927         (WebKit::TextCheckingController::replaceRelativeToSelection):
2928         (WebKit::TextCheckingController::removeAnnotationRelativeToSelection):
2929         * UIProcess/ios/WKContentViewInteraction.h:
2930         * UIProcess/ios/WKContentViewInteraction.mm:
2931         (-[WKContentView setupInteraction]):
2932         (-[WKContentView replaceSelectionOffset:length:withAnnotatedString:relativeReplacementRange:]):
2933         (-[WKContentView removeAnnotation:forSelectionOffset:length:]):
2934         * WebKit.xcodeproj/project.pbxproj:
2935         * WebProcess/WebPage/WebPage.cpp:
2936         * WebProcess/WebPage/WebPage.h:
2937         (WebKit::WebPage::textCheckingController):
2938         Plumb two UITextInput methods through to the Web Content process.
2939         I added a new object instead of just sticking things on WebPage
2940         because there are quite a few more related ones coming down the pipeline,
2941         and will also end up being messages going in the opposite direction.
2942
2943         * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.h: Added.
2944         * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.messages.in: Added.
2945         * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm: Added.
2946         (WebKit::TextCheckingControllerProxy::TextCheckingControllerProxy):
2947         (WebKit::TextCheckingControllerProxy::~TextCheckingControllerProxy):
2948         (WebKit::relevantMarkerTypes):
2949         (WebKit::TextCheckingControllerProxy::rangeAndOffsetRelativeToSelection):
2950         (WebKit::TextCheckingControllerProxy::replaceRelativeToSelection):
2951         (WebKit::TextCheckingControllerProxy::removeAnnotationRelativeToSelection):
2952         Make it possible for the platform to maintain arbitrary key-value pairs
2953         attached to document ranges, as a way for it to keep track of various
2954         text checking context (e.g. if something has been checked, replaced,
2955         what language it might be, ...).
2956
2957         Allow it to replace the text of a range and the annotations in that range,
2958         or remove annotations in a range. Ranges are specified relative to
2959         the selection.
2960
2961         One large missing piece is giving the platform the ability to retrieve
2962         annotations in a range; that is coming in a future patch.
2963
2964         We translate certain annotations into traditional WebCore spelling
2965         and grammar document markers, for normal display-time treatment.
2966
2967         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
2968         (-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
2969         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2970         Unified sources fixes.
2971
2972 2019-03-19  Jiewen Tan  <jiewen_tan@apple.com>
2973
2974         [WebAuthN] Implement FIDO AppID extension
2975         https://bugs.webkit.org/show_bug.cgi?id=143491
2976         <rdar://problem/48298273>
2977
2978         Reviewed by Brent Fulgham.
2979
2980         In U2fHidAuthenticator::continueSignCommandAfterResponseReceived, it will retry the current command
2981         with the AppID if it exists when SW_WRONG_DATA is received from devices. Noted, it will not set
2982         the AuthenticationExtensionsClientOutputs::appid to false in any circumstances. In other words, the
2983         field will be empty if AppID is supplied in AuthenticationExtensionsClientInputs and not used.
2984
2985         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
2986         (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):
2987         (WebKit::LocalAuthenticator::continueGetAssertionAfterUserConsented):
2988         * UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp:
2989         (WebKit::U2fHidAuthenticator::issueSignCommand):
2990         (WebKit::U2fHidAuthenticator::continueSignCommandAfterResponseReceived):
2991         * UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h:
2992
2993 2019-03-19  Ross Kirsling  <ross.kirsling@sony.com>
2994
2995         Unreviewed adjustment to r242842 per Darin's request.
2996
2997         * Platform/win/LoggingWin.cpp:
2998         (WebKit::logLevelString):
2999
3000 2019-03-19  Gyuyoung Kim  <gyuyoung.kim@lge.com>
3001
3002         [WPE] Fix build warnings because of missing an argument when initializing wpe_input_axis_event
3003         https://bugs.webkit.org/show_bug.cgi?id=195931
3004
3005         Reviewed by Michael Catanzaro.
3006
3007         There are still build warnings when building wpe port. It looks like
3008         these build warnings have been caused by missing to set an argument
3009         for the modifier parameter of wpe_input_axis_event. This patch sets 0
3010         for the modifier argument to avoid the build warnings.
3011
3012         * UIProcess/API/wpe/ScrollGestureController.cpp:
3013         (WebKit::ScrollGestureController::handleEvent):
3014
3015 2019-03-19  John Wilander  <wilander@apple.com>
3016
3017         Resource Load Statistics (experimental): Clear non-cookie website data for sites that have been navigated to, with link decoration, by a prevalent resource
3018         https://bugs.webkit.org/show_bug.cgi?id=195923
3019         <rdar://problem/49001272>
3020
3021         Reviewed by Alex Christensen.
3022
3023         Cross-site trackers abuse link query parameters to transport user identifiers and then store
3024         them in first-party storage space. To address this, we've done three things:
3025         - r236448 capped all persistent client-side cookies to seven days of storage.
3026         - r242288 further capped persistent client-side cookies for navigations with link decoration from prevalent resources.
3027         - r242603 added logging of navigations with link decoration from prevalent resources.
3028
3029         This patch introduces an experimental feature that removes non-cookie website data for sites
3030         that have been navigated to, with link decoration, by a prevalent resource.
3031
3032         To achieve this, resource domains to remove website data for are now marked with an enum called
3033         WebsiteDataToRemove with values All, AllButHttpOnlyCookies, AllButCookies. As resources are
3034         iterated, they are marked for either of these values and the new function
3035         ResourceLoadStatisticsMemoryStore::shouldRemoveAllButCookiesFor() leads to the marking with
3036         WebsiteDataToRemove::AllButCookies.
3037
3038         Then NetworkProcess::deleteWebsiteDataForRegistrableDomains() looks at this setting and removes
3039         website data accordingly.
3040
3041         The thinking behind this is that the lifetime cap applied in r236448 and r242288 take care of
3042         script writable cookies, and this patch takes care of all other script writable storage.
3043
3044         The infrastructure to handle user interaction expiration is now parameterized so that multiple
3045         expiries can be applied. In this particular case, seven days of browser use.
3046
3047         * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
3048         (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess):
3049         (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal):
3050         (WebKit::ResourceLoadStatisticsDatabaseStore::hasHadUserInteraction):
3051         (WebKit::ResourceLoadStatisticsDatabaseStore::shouldRemoveAllWebsiteDataFor const):
3052         (WebKit::ResourceLoadStatisticsDatabaseStore::shouldRemoveAllButCookiesFor const):
3053         (WebKit::ResourceLoadStatisticsDatabaseStore::registrableDomainsToRemoveWebsiteDataFor):
3054         * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
3055         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
3056         (WebKit::ResourceLoadStatisticsMemoryStore::hasHadUserInteraction):
3057         (WebKit::ResourceLoadStatisticsMemoryStore::hasHadUnexpiredRecentUserInteraction const):
3058         (WebKit::ResourceLoadStatisticsMemoryStore::shouldRemoveAllWebsiteDataFor const):
3059         (WebKit::ResourceLoadStatisticsMemoryStore::shouldRemoveAllButCookiesFor const):
3060         (WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToRemoveWebsiteDataFor):
3061         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
3062         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
3063         (WebKit::domainsToString):
3064         (WebKit::ResourceLoadStatisticsStore::removeDataRecords):
3065         (WebKit::ResourceLoadStatisticsStore::statisticsEpirationTime const):
3066         (WebKit::ResourceLoadStatisticsStore::mergeOperatingDates):
3067         (WebKit::ResourceLoadStatisticsStore::includeTodayAsOperatingDateIfNecessary):
3068         (WebKit::ResourceLoadStatisticsStore::hasStatisticsExpired const):
3069         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
3070         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
3071         (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
3072         (WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForRegistrableDomains):
3073         (WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForRegistrableDomainsInAllPersistentDataStores): Deleted.
3074            Renamed to reflect that it actually takes a parameter for which types of data to remove.
3075         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
3076         * NetworkProcess/NetworkProcess.cpp:
3077         (WebKit::NetworkProcess::initializeNetworkProcess):
3078         (WebKit::NetworkProcess::setCrossSiteLoadWithLinkDecorationForTesting):
3079         (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
3080         (WebKit::NetworkProcess::deleteCookiesForTesting):
3081         (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomainsInAllPersistentDataStores): Deleted.
3082            Renamed to reflect that it actually takes a parameter for which types of data to remove.
3083         * NetworkProcess/NetworkProcess.h:
3084         * NetworkProcess/NetworkProcess.messages.in:
3085         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3086         (WebKit::NetworkProcessCreationParameters::encode const):
3087         (WebKit::NetworkProcessCreationParameters::decode):
3088         * NetworkProcess/NetworkProcessCreationParameters.h:
3089         * NetworkProcess/NetworkSession.cpp:
3090         (WebKit::NetworkSession::deleteWebsiteDataForRegistrableDomains):
3091         (WebKit::NetworkSession::deleteWebsiteDataForRegistrableDomainsInAllPersistentDataStores): Deleted.
3092            Renamed to reflect that it actually takes a parameter for which types of data to remove.
3093         * NetworkProcess/NetworkSession.h:
3094         * Shared/WebPreferences.yaml:
3095         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3096         (WKWebsiteDataStoreSetStatisticsCrossSiteLoadWithLinkDecoration):
3097         (WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction):
3098         (WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords):
3099         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
3100         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3101         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3102         * UIProcess/Network/NetworkProcessProxy.cpp:
3103         (WebKit::NetworkProcessProxy::setCrossSiteLoadWithLinkDecorationForTesting):
3104         * UIProcess/Network/NetworkProcessProxy.h:
3105         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3106         (WebKit::WebsiteDataStore::setCrossSiteLoadWithLinkDecorationForTesting):
3107         * UIProcess/WebsiteData/WebsiteDataStore.h:
3108
3109 2019-03-19  Chris Dumez  <cdumez@apple.com>
3110
3111         Unreviewed build fix after r243173.
3112
3113         * UIProcess/Cocoa/UIDelegate.mm:
3114         (WebKit::UIDelegate::UIClient::requestStorageAccessConfirm):
3115
3116 2019-03-19  Brent Fulgham  <bfulgham@apple.com>
3117
3118         Add default prompt implementation for the Storage Access API
3119         https://bugs.webkit.org/show_bug.cgi?id=195866
3120         <rdar://problem/45150009>
3121
3122         Reviewed by Chris Dumez.
3123
3124         This patch revises the UIDelegate implementation with a default permission dialog
3125         for the Storage Access API. This allows us to use and test the API in MiniBrowser,
3126         rather than requiring a full-fledged web browser to drive testing.
3127  
3128         * UIProcess/Cocoa/UIDelegate.h:
3129         * UIProcess/Cocoa/UIDelegate.mm:
3130         (WebKit::UIDelegate::UIClient::presentStorageAccessConfirmDialog): Added.
3131         (WebKit::UIDelegate::UIClient::requestStorageAccessConfirm): Modify to call new default
3132         implementation if the WKWebVIew client doesn't implement the necessary SPI.
3133         * UIProcess/Cocoa/WKStorageAccessAlert.h: Added.
3134         * UIProcess/Cocoa/WKStorageAccessAlert.mm: Added.
3135         (WebKit::presentStorageAccessAlert):
3136         * WebKit.xcodeproj/project.pbxproj:
3137
3138 2019-03-19  Conrad Shultz  <conrad_shultz@apple.com>
3139
3140         REGRESSION (r242369): Only use picker-supported UTIs when creating image picker
3141         https://bugs.webkit.org/show_bug.cgi?id=195955
3142
3143         Reviewed by Chris Dumez and Wenson Hsieh.
3144
3145         r242369 started passing UTIs to -[UIImagePickerController setMediaTypes:] that correspond to types accepted by the
3146         file input element. However, UIImagePickerController expects a specific subset of UTIs. In the worst case, if no
3147         expected types are passed, this can cause a crash.
3148
3149         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3150         (UTIsForMIMETypes):
3151         Return a set rather than an array.
3152         (-[WKFileUploadPanel _mediaTypesForPickerSourceType:]):
3153         Rather than hardcode specific UTIs, ask UIImagePickerController for its available types. If an accepted type
3154         is in the list of available types, use it. Otherwise, if an accepted type conforms to an available type,
3155         use the available type. This is an O(n^2) process, but there typically are only a handful of types, so
3156         this seems acceptable.
3157         (-[WKFileUploadPanel _showDocumentPickerMenu]):
3158         Convert the set from UTIsForMIMETypes() to an array.
3159
3160 2019-03-19  Michael Catanzaro  <mcatanzaro@igalia.com>
3161
3162         Build cleanly with GCC 9
3163         https://bugs.webkit.org/show_bug.cgi?id=195920
3164
3165         Reviewed by Chris Dumez.
3166
3167         WebKit triggers three new GCC 9 warnings:
3168
3169         """
3170         -Wdeprecated-copy, implied by -Wextra, warns about the C++11 deprecation of implicitly
3171         declared copy constructor and assignment operator if one of them is user-provided.
3172         """
3173
3174         Solution is to either add a copy constructor or copy assignment operator, if required, or
3175         else remove one if it is redundant.
3176
3177         """
3178         -Wredundant-move, implied by -Wextra, warns about redundant calls to std::move.
3179         -Wpessimizing-move, implied by -Wall, warns when a call to std::move prevents copy elision.
3180         """
3181
3182         These account for most of this patch. Solution is to just remove the bad WTFMove().
3183
3184         Additionally, -Wclass-memaccess has been enhanced to catch a few cases that GCC 8 didn't.
3185         These are solved by casting nontrivial types to void* before using memcpy. (Of course, it
3186         would be safer to not use memcpy on nontrivial types, but that's too complex for this
3187         patch. Searching for memcpy used with static_cast<void*> will reveal other cases to fix.)
3188
3189         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
3190         (WebKit::CacheStorage::Cache::decode):
3191         * Platform/IPC/ArgumentCoders.h:
3192         * Shared/CallbackID.h:
3193         (WebKit::CallbackID::operator=):
3194         * Shared/OptionalCallbackID.h:
3195         (WebKit::OptionalCallbackID::operator=):
3196         * Shared/Plugins/NPIdentifierData.cpp:
3197         (WebKit::NPIdentifierData::decode):
3198         * Shared/Plugins/NPVariantData.cpp:
3199         (WebKit::NPVariantData::decode):
3200         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
3201         (WebKit::NetscapePluginModule::getOrCreate):
3202         * Shared/RTCNetwork.cpp:
3203         (WebKit::RTCNetwork::IPAddress::decode):
3204         * Shared/SessionState.cpp:
3205         (WebKit::HTTPBody::Element::decode):
3206         (WebKit::FrameState::decode):
3207         (WebKit::BackForwardListItemState::decode):
3208         * Shared/WebCompiledContentRuleListData.cpp:
3209         (WebKit::WebCompiledContentRuleListData::decode):
3210         * Shared/WebCoreArgumentCoders.cpp:
3211         (IPC::ArgumentCoder<FloatPoint>::decode):
3212         (IPC::ArgumentCoder<FloatRect>::decode):
3213         (IPC::ArgumentCoder<FloatQuad>::decode):
3214         (IPC::ArgumentCoder<ViewportArguments>::decode):
3215         (IPC::ArgumentCoder<IntPoint>::decode):
3216         (IPC::ArgumentCoder<IntRect>::decode):
3217         (IPC::ArgumentCoder<IntSize>::decode):
3218         (IPC::ArgumentCoder<MimeClassInfo>::decode):
3219         (IPC::ArgumentCoder<PluginInfo>::decode):
3220         (IPC::ArgumentCoder<SelectionRect>::decode):
3221         (IPC::ArgumentCoder<CompositionUnderline>::decode):
3222         (IPC::ArgumentCoder<BlobPart>::decode):
3223         (IPC::ArgumentCoder<TextIndicatorData>::decode):
3224         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
3225         (IPC::ArgumentCoder<ScrollOffsetRange<float>>::decode):
3226         * Shared/WebPageCreationParameters.cpp:
3227         (WebKit::WebPageCreationParameters::decode):
3228         * Shared/WebPlatformTouchPoint.cpp:
3229         (WebKit::WebPlatformTouchPoint::decode):
3230         * Shared/WebsiteData/WebsiteData.cpp:
3231         (WebKit::WebsiteData::Entry::decode):
3232         * Shared/WebsiteDataStoreParameters.cpp:
3233         (WebKit::WebsiteDataStoreParameters::decode):
3234         * UIProcess/API/APIContentRuleListStore.cpp:
3235         (API::decodeContentRuleListMetaData):
3236         * UIProcess/WebPageProxy.cpp:
3237         (WebKit::WebPageProxy::launchProcessForReload):
3238         (WebKit::WebPageProxy::launchProcessWithItem):
3239         (WebKit::WebPageProxy::loadRequest):
3240         (WebKit::WebPageProxy::loadFile):
3241         (WebKit::WebPageProxy::loadData):
3242         (WebKit::WebPageProxy::reload):
3243         * UIProcess/WebProcessCache.cpp:
3244         (WebKit::WebProcessCache::takeProcess):
3245         * UIProcess/WebProcessPool.cpp:
3246         (WebKit::WebProcessPool::findReusableSuspendedPageProcess):
3247         * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp:
3248         (WebKit::InjectedBundleCSSStyleDeclarationHandle::getOrCreate):
3249         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
3250         (WebKit::InjectedBundleRangeHandle::getOrCreate):
3251         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3252         (WebKit::InjectedBundle::create):
3253         * WebProcess/Network/WebLoaderStrategy.cpp:
3254         (WebKit::WebLoaderStrategy::tryLoadingSynchronouslyUsingURLSchemeHandler):
3255         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
3256         (WebKit::CompositingCoordinator::createGraphicsLayer):
3257         * WebProcess/WebPage/WebPage.cpp:
3258         (WebKit::WebPage::pdfSnapshotAtSize):
3259         (WebKit::WebPage::createDocumentLoader):
3260         * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
3261         (WebKit::StorageNamespaceImpl::copy):
3262
3263 2019-03-19  Chris Dumez  <cdumez@apple.com>
3264
3265         Spew: Unhandled web process message 'VisitedLinkTableController:VisitedLinkStateChanged'
3266         https://bugs.webkit.org/show_bug.cgi?id=194787
3267         <rdar://problem/48175520>
3268
3269         Reviewed by Geoff Garen.
3270
3271         The unhandled 'VisitedLinkTableController:VisitedLinkStateChanged' message logging happens
3272         when IPC is sent to a WebProcess which does not have a VisitedLinkTableController with the
3273         given identifier. VisitedLinkTableController are kept alive by the WebPage in the WebProcess
3274         side so this indicates that there is no WebPage using this VisitedLinkTableController anymore.
3275
3276         In the UIProcess side, our tracking of who is using which VisitedLinkStore was very poor.
3277         WebPageProxy objects would ask their process to register itself with the page's visitedLinkStore
3278         as soon as the WebPage object has been created on the WebProcess side. This part was fine.
3279         However, unregistration from the visitedLinkStores would only happen when either the
3280         visitedLinkStore would get destroyed or when the WebProcess would shutdown. This means that
3281         WebProcess could stay registered with a visitedLinkStore even after the page that was using it
3282         has been closed, which would lead to such logging.
3283
3284         To address the issue, the WebProcessProxy now keeps track for which pages are using which
3285         visitedLinkStore. When a visitedLinkStore is used by a page for the first time, the
3286         WebProcessProxy will register itself with the visitedLinkStore. Similarly, when the last page
3287         using a given visitedLinkStore is closed, the process unregisters itself from the
3288         visitedLinkStore, thus avoiding the bug.
3289
3290         I also simplified a lot the logic for having a page telling the WebProcessProxy it started
3291         using a visitedLinkStore. Previously, it would have to wait until the process is done launching
3292         before notifying the WebProcessProxy. Now, the WebPageProxy merely tells the WebProcessProxy
3293         that it is starting to use a visitedLinkStore as soon as it sent the CreateWebPage IPC to the
3294         WebProcess (no matter if the process is still launching or not). At this point, the
3295         WebProcessProxy registers the page as a user of the visitedLinkStore and takes care of waiting
3296         until it is done launching before registering itself with the visitedLinkStore.
3297
3298         * UIProcess/ProvisionalPageProxy.cpp:
3299         (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
3300         (WebKit::ProvisionalPageProxy::initializeWebPage):
3301         (WebKit::ProvisionalPageProxy::processDidFinishLaunching): Deleted.
3302         (WebKit::ProvisionalPageProxy::finishInitializingWebPageAfterProcessLaunch): Deleted.
3303         * UIProcess/ProvisionalPageProxy.h:
3304         * UIProcess/VisitedLinkStore.cpp:
3305         (WebKit::VisitedLinkStore::~VisitedLinkStore):
3306         (WebKit::VisitedLinkStore::addProcess):
3307         * UIProcess/WebPageProxy.cpp:
3308         (WebKit::WebPageProxy::finishAttachingToWebProcess):
3309         (WebKit::WebPageProxy::initializeWebPage):
3310         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3311         (WebKit::WebPageProxy::finishInitializingWebPageAfterProcessLaunch): Deleted.
3312         (WebKit::WebPageProxy::processDidFinishLaunching): Deleted.
3313         * UIProcess/WebPageProxy.h:
3314         * UIProcess/WebProcessProxy.cpp:
3315         (WebKit::WebProcessProxy::shutDown):
3316         (WebKit::WebProcessProxy::removeWebPage):
3317         (WebKit::WebProcessProxy::addVisitedLinkStoreUser):
3318         (WebKit::WebProcessProxy::removeVisitedLinkStoreUser):
3319         (WebKit::WebProcessProxy::addWebUserContentControllerProxy):
3320         (WebKit::WebProcessProxy::didFinishLaunching):
3321         (WebKit::WebProcessProxy::addVisitedLinkStore): Deleted.
3322         (WebKit::WebProcessProxy::didDestroyVisitedLinkStore): Deleted.
3323         * UIProcess/WebProcessProxy.h:
3324
3325 2019-03-19  Chris Dumez  <cdumez@apple.com>
3326
3327         REGRESSION (r243094): internal media test fairplay-hls-error.html is failing
3328         https://bugs.webkit.org/show_bug.cgi?id=195954
3329         <rdar://problem/49005981>
3330
3331         Reviewed by Geoffrey Garen.
3332
3333         TestController::resetStateToConsistentValues() tries to send a "reset" message to its
3334         injected bundle. Part of the "reset" message sets the external hosts that we're allowed
3335         to load. If there is no WebProcess yet when WKPagePostMessageToInjectedBundle() is called,
3336         then this message does not get sent and the allowed hosts do not get set, causing this
3337         test failure.
3338
3339         To address the issue, make sure we launch the initial process if necessary when
3340         WebPageProxy::postMessageToInjectedBundle() is called, in order to maintain backward
3341         compatibility.
3342
3343         * UIProcess/WebPageProxy.cpp:
3344         (WebKit::WebPageProxy::postMessageToInjectedBundle):
3345
3346 2019-03-19  Chris Dumez  <cdumez@apple.com>
3347
3348         Unreviewed, rolling out r243142.
3349
3350         Caused assertion hits in WK2 Debug
3351
3352         Reverted changeset:
3353
3354         "Spew: Unhandled web process message
3355         'VisitedLinkTableController:VisitedLinkStateChanged'"
3356         https://bugs.webkit.org/show_bug.cgi?id=194787
3357         https://trac.webkit.org/changeset/243142
3358
3359 2019-03-19  Daniel Bates  <dabates@apple.com>
3360
3361         [iOS] Focus not preserved when switching between tabs
3362         https://bugs.webkit.org/show_bug.cgi?id=195820
3363         <rdar://problem/43614450>
3364
3365         Reviewed by Brent Fulgham.
3366
3367         Fixes a usability annoyance when using a hardware keyboard; focus is not preserved when switching between tabs.
3368         Do not unconditionally tell the WebProcess to blur the currently focused element when the content view (WKContentView)
3369         resigns first responder. Instead only tell it to blur when the content view is resigning because either the
3370         accessory view was dismissed (Done button was pressed) or the keyboard was dismissed (the hide keyboard button
3371         was pressed).
3372
3373         * UIProcess/ios/WKContentViewInteraction.h:
3374         * UIProcess/ios/WKContentViewInteraction.mm: Add new ivar to track whether the content view is resigning
3375         first responder status because the accessory view is being dismissed.
3376         (-[WKContentView resignFirstResponderForWebView]): Only tell WebKit to blur the focused element if we are
3377         resigning because the accessory view is being dismissed or the keyboard was hidden. We continue to do all
3378         other steps when resigning, including hiding the keyboard. Note that by not telling WebKit to blur the
3379         focused element we let it's focus controller manage the focused element with respect to the current
3380         page activation state (i.e. whether the content view is first responder or not). When the content view
3381         becomes the first responder then WebKit's focus controller will be told that the page has become activated
3382         and will tell the UIProcess to focus the currently focused element, which will bring up the keyboard.
3383         (-[WKContentView accessoryDone]): Update state so we know that a subsequent call to resign first responder
3384         was due to the accessory view being dismissed.
3385
3386 2019-03-19  Per Arne Vollan  <pvollan@apple.com>
3387
3388         [iOS] Remove overridden rules in sandbox
3389         https://bugs.webkit.org/show_bug.cgi?id=193840
3390         <rdar://problem/47558526>
3391
3392         Reviewed by Brent Fulgham.
3393
3394         On iOS, there are some rules overridden in the same sandbox file. The overridden rules
3395         should be removed.
3396
3397         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3398
3399 2019-03-19  Timothy Hatcher  <timothy@apple.com>
3400
3401         Make WebKit/NSAttributedString.h a public header.
3402         https://bugs.webkit.org/show_bug.cgi?id=195944
3403
3404         Reviewed by Dean Jackson.
3405
3406         * WebKit.xcodeproj/project.pbxproj:
3407
3408 2019-03-19  Chris Dumez  <cdumez@apple.com>
3409
3410         Drop NetworkCacheStatistics code
3411         https://bugs.webkit.org/show_bug.cgi?id=195910
3412
3413         Reviewed by Antti Koivisto.
3414
3415         Drop NetworkCacheStatistics code. It was a temporary experiment and has not been used in a long time.
3416
3417         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3418         (WebKit::NetworkProcessCreationParameters::encode const):
3419         (WebKit::NetworkProcessCreationParameters::decode):
3420         * NetworkProcess/NetworkProcessCreationParameters.h:
3421         * NetworkProcess/cache/NetworkCache.cpp:
3422         (WebKit::NetworkCache::Cache::Cache):
3423         (WebKit::NetworkCache::Cache::retrieve):
3424         (WebKit::NetworkCache::Cache::store):
3425         (WebKit::NetworkCache::Cache::storeRedirect):
3426         (WebKit::NetworkCache::Cache::update):
3427         (WebKit::NetworkCache::Cache::clear):
3428         * NetworkProcess/cache/NetworkCache.h:
3429         * NetworkProcess/cache/NetworkCacheStatistics.cpp: Removed.
3430         * NetworkProcess/cache/NetworkCacheStatistics.h: Removed.
3431         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3432         (WebKit::NetworkCache::traverseRecordsFiles):
3433         * NetworkProcess/cache/NetworkCacheStorage.h:
3434         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3435         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3436         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3437         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
3438         * Sources.txt:
3439         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3440         (WebKit::registerUserDefaultsIfNeeded):
3441         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3442         * UIProcess/soup/WebProcessPoolSoup.cpp:
3443         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3444         * WebKit.xcodeproj/project.pbxproj:
3445
3446 2019-03-19  Chris Dumez  <cdumez@apple.com>
3447
3448         Spew: Unhandled web process message 'VisitedLinkTableController:VisitedLinkStateChanged'
3449         https://bugs.webkit.org/show_bug.cgi?id=194787
3450         <rdar://problem/48175520>
3451
3452         Reviewed by Geoffrey Garen.
3453
3454         The unhandled 'VisitedLinkTableController:VisitedLinkStateChanged' message logging happens
3455         when IPC is sent to a WebProcess which does not have a VisitedLinkTableController with the
3456         given identifier. VisitedLinkTableController are kept alive by the WebPage in the WebProcess
3457         side so this indicates that there is no WebPage using this VisitedLinkTableController anymore.
3458
3459         In the UIProcess side, our tracking of who is using which VisitedLinkStore was very poor.
3460         WebPageProxy objects would ask their process to register itself with the page's visitedLinkStore
3461         as soon as the WebPage object has been created on the WebProcess side. This part was fine.
3462         However, unregistration from the visitedLinkStores would only happen when either the
3463         visitedLinkStore would get destroyed or when the WebProcess would shutdown. This means that
3464         WebProcess could stay registered with a visitedLinkStore even after the page that was using it
3465         has been closed, which would lead to such logging.
3466
3467         To address the issue, the WebProcessProxy now keeps track for which pages are using which
3468         visitedLinkStore. When a visitedLinkStore is used by a page for the first time, the
3469         WebProcessProxy will register itself with the visitedLinkStore. Similarly, when the last page
3470         using a given visitedLinkStore is closed, the process unregisters itself from the
3471         visitedLinkStore, thus avoiding the bug.
3472
3473         I also simplified a lot the logic for having a page telling the WebProcessProxy it started
3474         using a visitedLinkStore. Previously, it would have to wait until the process is done launching
3475         before notifying the WebProcessProxy. Now, the WebPageProxy merely tells the WebProcessProxy
3476         that it is starting to use a visitedLinkStore as soon as it sent the CreateWebPage IPC to the
3477         WebProcess (no matter if the process is still launching or not). At this point, the
3478         WebProcessProxy registers the page as a user of the visitedLinkStore and takes care of waiting
3479         until it is done launching before registering itself with the visitedLinkStore.
3480
3481         * UIProcess/ProvisionalPageProxy.cpp:
3482         (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
3483         (WebKit::ProvisionalPageProxy::initializeWebPage):
3484         (WebKit::ProvisionalPageProxy::processDidFinishLaunching): Deleted.
3485         (WebKit::ProvisionalPageProxy::finishInitializingWebPageAfterProcessLaunch): Deleted.
3486         * UIProcess/ProvisionalPageProxy.h:
3487         * UIProcess/VisitedLinkStore.cpp:
3488         (WebKit::VisitedLinkStore::~VisitedLinkStore):
3489         (WebKit::VisitedLinkStore::addProcess):
3490         * UIProcess/WebPageProxy.cpp:
3491         (WebKit::WebPageProxy::finishAttachingToWebProcess):
3492         (WebKit::WebPageProxy::initializeWebPage):
3493         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3494         (WebKit::WebPageProxy::finishInitializingWebPageAfterProcessLaunch): Deleted.
3495         (WebKit::WebPageProxy::processDidFinishLaunching): Deleted.
3496         * UIProcess/WebPageProxy.h:
3497         * UIProcess/WebProcessProxy.cpp:
3498         (WebKit::WebProcessProxy::shutDown):
3499         (WebKit::WebProcessProxy::removeWebPage):
3500         (WebKit::WebProcessProxy::addVisitedLinkStoreUser):
3501         (WebKit::WebProcessProxy::removeVisitedLinkStoreUser):
3502         (WebKit::WebProcessProxy::addWebUserContentControllerProxy):
3503         (WebKit::WebProcessProxy::didFinishLaunching):
3504         (WebKit::WebProcessProxy::addVisitedLinkStore): Deleted.
3505         (WebKit::WebProcessProxy::didDestroyVisitedLinkStore): Deleted.
3506         * UIProcess/WebProcessProxy.h:
3507
3508 2019-03-19  Alex Christensen  <achristensen@webkit.org>
3509
3510         Make WTFLogChannelState and WTFLogLevel enum classes
3511         https://bugs.webkit.org/show_bug.cgi?id=195904
3512
3513         Reviewed by Eric Carlson.
3514
3515         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
3516         (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage):
3517         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
3518         (WebKit::NetworkRTCProvider::NetworkRTCProvider):
3519
3520 2019-03-19  Michael Catanzaro  <mcatanzaro@igalia.com>
3521
3522         Unreviewed, rolling out r243132.
3523
3524         Broke GTK build
3525
3526         Reverted changeset:
3527
3528         "Make WTFLogChannelState and WTFLogLevel enum classes"
3529         https://bugs.webkit.org/show_bug.cgi?id=195904
3530         https://trac.webkit.org/changeset/243132
3531
3532 2019-03-19  Antti Koivisto  <antti@apple.com>
3533
3534         Layer with no backing store should still hit-test over a scroller
3535         https://bugs.webkit.org/show_bug.cgi?id=195378
3536         <rdar://problem/48652078>
3537
3538         Reviewed by Simon Fraser.
3539
3540         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
3541         (WebKit::RemoteLayerTreeHost::makeNode):
3542         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:
3543         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
3544         (WebKit::collectDescendantViewsAtPoint):
3545
3546         No need for special WKTiledBackingView, tiled views now have correct event regions.
3547
3548 2019-03-18  Alex Christensen  <achristensen@webkit.org>
3549
3550         Make WTFLogChannelState and WTFLogLevel enum classes
3551         https://bugs.webkit.org/show_bug.cgi?id=195904
3552
3553         Reviewed by Eric Carlson.
3554
3555         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
3556         (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage):
3557         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
3558         (WebKit::NetworkRTCProvider::NetworkRTCProvider):
3559
3560 2019-03-18  Commit Queue  <commit-queue@webkit.org>
3561
3562         Unreviewed, rolling out r243092 and r243096.
3563         https://bugs.webkit.org/show_bug.cgi?id=195926
3564
3565         Caused assertions in tests (Requested by smfr on #webkit).
3566
3567         Reverted changesets:
3568
3569         "Layer with no backing store should still hit-test over a
3570         scroller"
3571         https://bugs.webkit.org/show_bug.cgi?id=195378
3572         https://trac.webkit.org/changeset/243092
3573
3574         "Try to fix Windows build."
3575         https://trac.webkit.org/changeset/243096
3576
3577 2019-03-18  Timothy Hatcher  <timothy@apple.com>
3578
3579         WKWebView.GetContentsShouldReturnAttributedString is crashing on iOS Simulator.
3580         https://bugs.webkit.org/show_bug.cgi?id=195916
3581
3582         Reviewed by Tim Horton.
3583
3584         Add direct support for UIColor so it does not try to use the NSSecureCoding path.
3585         This avoids needs to list the classes when decoding the attributes NSDictionary
3586         and matches the macOS NSColor encoder/decoder.
3587
3588         * Shared/Cocoa/ArgumentCodersCocoa.mm:
3589         (IPC::typeFromObject):
3590         (IPC::encodeColorInternal):
3591         (IPC::decodeColorInternal):
3592         (IPC::encodeObject):
3593         (IPC::decodeObject):
3594
3595 2019-03-18  Timothy Hatcher  <timothy@apple.com>
3596
3597         Add new NSAttributedString API for converting HTML.
3598         https://bugs.webkit.org/show_bug.cgi?id=195636
3599         rdar://problem/45055697
3600
3601         Reviewed by Tim Horton.
3602
3603         * Platform/spi/ios/UIKitSPI.h:
3604         * SourcesCocoa.txt:
3605         * UIProcess/API/Cocoa/NSAttributedString.h: Added.
3606         * UIProcess/API/Cocoa/NSAttributedString.mm: Added.
3607         (-[_WKAttributedStringNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
3608         (-[_WKAttributedStringNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
3609         (-[_WKAttributedStringNavigationDelegate webView:didFailNavigation:withError:]):
3610         (-[_WKAttributedStringNavigationDelegate webView:didFinishNavigation:]):
3611         (+[_WKAttributedStringWebViewCache cache]):
3612         (+[_WKAttributedStringWebViewCache configuration]):
3613         (+[_WKAttributedStringWebViewCache clearConfiguration]):
3614         (+[_WKAttributedStringWebViewCache retrieveOrCreateWebView]):
3615         (+[_WKAttributedStringWebViewCache cacheWebView:]):
3616         (+[_WKAttributedStringWebViewCache resetPurgeDelay]):
3617         (+[_WKAttributedStringWebViewCache purgeSingleWebView]):
3618         (+[_WKAttributedStringWebViewCache purgeAllWebViews]):
3619         (+[NSAttributedString _loadFromHTMLWithOptions:contentLoader:completionHandler:]):
3620         (+[NSAttributedString loadFromHTMLWithRequest:options:completionHandler:]):
3621         (+[NSAttributedString loadFromHTMLWithFileURL:options:completionHandler:]):
3622         (+[NSAttributedString loadFromHTMLWithString:options:completionHandler:]):
3623         (+[NSAttributedString loadFromHTMLWithData:options:completionHandler:]):
3624         * UIProcess/API/Cocoa/NSAttributedStringPrivate.h: Copied from Source/WebKit/UIProcess/API/Cocoa/WKErrorInternal.h.
3625         * UIProcess/API/Cocoa/WKError.h:
3626         * UIProcess/API/Cocoa/WKError.mm:
3627         (localizedDescriptionForErrorCode):
3628         (createNSError):
3629         * UIProcess/API/Cocoa/WKErrorInternal.h:
3630         * WebKit.xcodeproj/project.pbxproj:
3631         * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
3632         (WebKit::WebPage::getContentsAsAttributedString):
3633
3634 2019-03-18  Alex Christensen  <achristensen@webkit.org>
3635
3636         Implement DownloadMonitor to prevent long-running slow downloads from background apps
3637         https://bugs.webkit.org/show_bug.cgi?id=195785
3638
3639         Reviewed by Geoffrey Garen.
3640
3641         This is similar to what was updated in <rdar://problem/42677685> but for WebKit Downloads.
3642         To test it I implemented a throttled TCP server, SPI to speed up DownloadMonitor's timer,
3643         and SPI to synthesize the application going into the background and foreground, which
3644         NSNotificationCenter does on iOS.
3645
3646         * NetworkProcess/Downloads/Download.cpp:
3647         (WebKit::Download::didReceiveData):
3648         (WebKit::Download::didFinish):
3649         (WebKit::Download::didFail):
3650         (WebKit::Download::didCancel):
3651         * NetworkProcess/Downloads/Download.h:
3652         (WebKit::Download::applicationEnteredBackground):
3653         (WebKit::Download::applicationEnteredForeground):
3654         (WebKit::Download::manager const):
3655         * NetworkProcess/Downloads/DownloadManager.cpp:
3656         (WebKit::DownloadManager::downloadFinished):
3657         (WebKit::DownloadManager::applicationDidEnterBackground):
3658         (WebKit::DownloadManager::applicationWillEnterForeground):
3659         * NetworkProcess/Downloads/DownloadManager.h:
3660         * NetworkProcess/Downloads/DownloadMap.cpp:
3661         (WebKit::DownloadMap::values):
3662         * NetworkProcess/Downloads/DownloadMap.h:
3663         * NetworkProcess/Downloads/DownloadMonitor.cpp: Added.
3664         (WebKit::operator _kbps):
3665         (WebKit::timeUntilNextInterval):
3666         (WebKit::DownloadMonitor::DownloadMonitor):
3667         (WebKit::DownloadMonitor::measuredThroughputRate const):
3668         (WebKit::DownloadMonitor::downloadReceivedBytes):
3669         (WebKit::DownloadMonitor::applicationEnteredForeground):
3670         (WebKit::DownloadMonitor::applicationEnteredBackground):
3671         (WebKit::DownloadMonitor::speedMultiplier const):
3672         (WebKit::DownloadMonitor::timerFired):
3673         * NetworkProcess/Downloads/DownloadMonitor.h: Added.
3674         * NetworkProcess/NetworkProcess.cpp:
3675         (WebKit::NetworkProcess::initializeNetworkProcess):
3676         (WebKit::NetworkProcess::applicationDidEnterBackground):
3677         (WebKit::NetworkProcess::applicationWillEnterForeground):
3678         * NetworkProcess/NetworkProcess.h:
3679         * NetworkProcess/NetworkProcess.messages.in:
3680         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3681         (WebKit::NetworkProcessCreationParameters::encode const):
3682         (WebKit::NetworkProcessCreationParameters::decode):
3683         * NetworkProcess/NetworkProcessCreationParameters.h:
3684         * Sources.txt:
3685         * SourcesCocoa.txt:
3686         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3687         (API::ProcessPoolConfiguration::copy):
3688         * UIProcess/API/APIProcessPoolConfiguration.h:
3689         * UIProcess/API/C/WKContext.cpp:
3690         (WKContextDownloadURLRequest):
3691         (WKContextResumeDownload):
3692         * UIProcess/API/Cocoa/WKProcessPool.mm:
3693         (-[WKProcessPool _synthesizeAppIsBackground:]):
3694         (-[WKProcessPool _downloadURLRequest:originatingWebView:]):
3695         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3696         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
3697         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
3698         (-[_WKProcessPoolConfiguration downloadMonitorSpeedMultiplier]):
3699         (-[_WKProcessPoolConfiguration setDownloadMonitorSpeedMultiplier:]):
3700         * UIProcess/Cocoa/DownloadProxyMapCocoa.mm: Added.
3701         (WebKit::DownloadProxyMap::platformCreate):
3702         (WebKit::DownloadProxyMap::platformDestroy):
3703         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3704         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3705         * UIProcess/Downloads/DownloadProxy.cpp:
3706         (WebKit::DownloadProxy::didFinish):
3707         (WebKit::DownloadProxy::didFail):
3708         (WebKit::DownloadProxy::didCancel):
3709         * UIProcess/Downloads/DownloadProxyMap.cpp:
3710         (WebKit::DownloadProxyMap::DownloadProxyMap):
3711         (WebKit::DownloadProxyMap::~DownloadProxyMap):
3712         (WebKit::DownloadProxyMap::platformCreate):
3713         (WebKit::DownloadProxyMap::platformDestroy):
3714         (WebKit::DownloadProxyMap::applicationDidEnterBackground):
3715         (WebKit::DownloadProxyMap::applicationWillEnterForeground):
3716         (WebKit::DownloadProxyMap::createDownloadProxy):
3717         (WebKit::DownloadProxyMap::downloadFinished):
3718         * UIProcess/Downloads/DownloadProxyMap.h:
3719         * UIProcess/Network/NetworkProcessProxy.cpp:
3720         (WebKit::NetworkProcessProxy::synthesizeAppIsBackground):
3721         (WebKit::NetworkProcessProxy::createDownloadProxy):
3722         * UIProcess/Network/NetworkProcessProxy.h:
3723         * UIProcess/PageClient.h:
3724         * UIProcess/WebPageProxy.cpp:
3725         (WebKit::WebPageProxy::receivedPolicyDecision):
3726         (WebKit::WebPageProxy::handleDownloadRequest):
3727         * UIProcess/WebPageProxy.h:
3728         * UIProcess/WebProcessPool.cpp:
3729         (WebKit::WebProcessPool::download):
3730         (WebKit::WebProcessPool::resumeDownload):
3731         (WebKit::WebProcessPool::createDownloadProxy):
3732         (WebKit::WebProcessPool::synthesizeAppIsBackground):
3733         * UIProcess/WebProcessPool.h:
3734         * UIProcess/ios/PageClientImplIOS.h:
3735         * UIProcess/ios/PageClientImplIOS.mm:
3736         (WebKit::PageClientImpl::handleDownloadRequest):
3737         * UIProcess/mac/PageClientImplMac.h:
3738         * UIProcess/mac/PageClientImplMac.mm:
3739         (WebKit::PageClientImpl::handleDownloadRequest):
3740         * WebKit.xcodeproj/project.pbxproj:
3741
3742 2019-03-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3743
3744         [iOS] Native selection views sometimes appear in hidden editable areas after losing focus
3745         https://bugs.webkit.org/show_bug.cgi?id=195894
3746         <rdar://problem/48849989>
3747
3748         Reviewed by Tim Horton.
3749
3750         On certain websites, focus is moved away from an editable element while maintaining a selection inside the
3751         editable element. In the case where the editable element is hidden, this currently breaks our text interaction
3752         suppression heuristics, which suppress text selection gestures and overlays inside focused hidden editable
3753         elements. To fix this, we refactor our text interaction suppression heuristics, such that they are not dependent
3754         on an editable element being focused. See changes below for more details.
3755
3756         Test: editing/selection/ios/hide-selection-in-non-focused-element.html
3757
3758         * Shared/EditorState.cpp:
3759         (WebKit::EditorState::PostLayoutData::encode const):
3760         (WebKit::EditorState::PostLayoutData::decode):
3761         * Shared/EditorState.h:
3762
3763         Rename elementIsTransparentOrFullyClipped to editableRootIsTransparentOrFullyClipped, and additionally compute
3764         this flag by checking whether the root editable element containing the selection is transparent or clipped,
3765         instead of using the currently focused element.
3766
3767         * Shared/FocusedElementInformation.cpp:
3768         (WebKit::FocusedElementInformation::encode const):
3769         (WebKit::FocusedElementInformation::decode):
3770         * Shared/FocusedElementInformation.h:
3771
3772         Remove the elementIsTransparentOrFullyClipped flag from FocusedElementInformation (see below for more detail).
3773
3774         * UIProcess/ios/WKContentViewInteraction.h:
3775
3776         Rename FocusedElementIsTransparentOrFullyClipped to EditableRootIsTransparentOrFullyClipped.
3777
3778         * UIProcess/ios/WKContentViewInteraction.mm:
3779         (-[WKContentView _zoomToRevealFocusedElement]):
3780         (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
3781
3782         Remove logic that currently uses state on FocusedElementInformation to determine whether to suppress platform
3783         text interactions; instead, only use EditorState to make this determination. This logic was originally added in
3784         the initial implementation of the text interaction suppression heuristic as a way to begin suppressing text
3785         selection state before zooming to reveal the focused element; however, since we now zoom to reveal the text
3786         selection when focusing editable elements, zooming is deferred until the next complete EditorState update
3787         arrives in the UI process so we don't need to worry about beginning to suppress text interactions prior to this
3788         initial editor state update.
3789
3790         (-[WKContentView _elementDidBlur]):
3791         (-[WKContentView _updateSelectionAssistantSuppressionState]):
3792
3793         Add a helper method that updates text selection suppression state using the current EditorState.
3794
3795         (-[WKContentView _selectionChanged]):
3796         (-[WKContentView _updateChangedSelection:]):
3797
3798         Always update text suppression state when receiving an EditorState, instead of only doing so when processing a
3799         text selection gesture.
3800
3801         (-[WKContentView _startSuppressingSelectionAssistantForReason:]):
3802
3803         Renamed from _beginSuppressingSelectionAssistantForReason:, to better match "start/end" terminology of
3804         _endSuppressingSelectionAssistantForReason:.
3805
3806         (-[WKContentView dropInteraction:performDrop:]):
3807         (-[WKContentView _beginSuppressingSelectionAssistantForReason:]): Deleted.
3808         * UIProcess/ios/WebPageProxyIOS.mm:
3809         (WebKit::WebPageProxy::editorStateChanged):
3810
3811         Ensure that we run logic to zoom to the focused element *after* updating text selection suppression state, so we
3812         don't erroneously zoom to reveal hidden editable elements.
3813
3814         * WebProcess/WebPage/ios/WebPageIOS.mm:
3815         (WebKit::WebPage::platformEditorState const):
3816         (WebKit::WebPage::getFocusedElementInformation):
3817
3818 2019-03-18  Chris Dumez  <cdumez@apple.com>
3819
3820         Delay WebProcess launch until a load is triggered in a Web view
3821         https://bugs.webkit.org/show_bug.cgi?id=195758
3822         <rdar://problem/48126013>
3823
3824         Reviewed by Geoff Garen.
3825
3826         This is achieved by constructing WebPageProxy objects with a WebProcessProxy that is in
3827         terminated state (because it never launched its process). This is convenient because
3828         it is a state that the WebPageProxy supports, which normally happened by the WebProcess
3829         crashes. When trying to do a load, we were already checking if the WebPageProxy's process
3830         was running (via an isValid() check) and we would re-launch the WebProcess if necessary
3831         by calling reattachToWebProcess(). For clarity, given that this state is no longer
3832         indicating that the WebProcess crashed, I renamed isValid() to hasRunningProcess() and
3833         reattachToWebProcess() to launchProcess().
3834
3835         The reason delaying the WebProcess launch until the first load is useful is because it
3836         allows us to leverage the WebProcessCache given that we now know which registrable
3837         domain is going to be loaded in the process.
3838
3839         This is a progression from a power usage standpoint. When it comes to page load time,
3840         it would be a progression if we found a suitable process in the cache. I do not expect
3841         a performance hit when no process is found in the cache because of process prewarming.
3842
3843         * Shared/API/Cocoa/RemoteObjectRegistry.h:
3844         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
3845         (WebKit::m_launchInitialProcessIfNecessary):
3846         (WebKit::RemoteObjectRegistry::sendInvocation):
3847         * UIProcess/API/Cocoa/WKProcessPool.mm:
3848         (-[WKProcessPool _processCacheSize]):
3849         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3850         * UIProcess/API/Cocoa/WKWebView.mm:
3851         (-[WKWebView _isValid]):
3852         * UIProcess/Automation/WebAutomationSession.cpp:
3853         (WebKit::WebAutomationSession::willShowJavaScriptDialog):
3854         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
3855         (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
3856         (WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
3857         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
3858         (WebKit::DrawingAreaProxyCoordinatedGraphics::sendUpdateBackingStoreState):
3859         (WebKit::DrawingAreaProxyCoordinatedGraphics::waitForAndDispatchDidUpdateBackingStoreState):
3860         (WebKit::DrawingAreaProxyCoordinatedGraphics::dispatchAfterEnsuringDrawing):
3861         * UIProcess/DrawingAreaProxy.cpp:
3862         (WebKit::DrawingAreaProxy::setViewExposedRect):
3863         (WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
3864         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
3865         (WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision):
3866         * UIProcess/InspectorTargetProxy.cpp:
3867         (WebKit::InspectorTargetProxy::connect):
3868         (WebKit::InspectorTargetProxy::disconnect):
3869         (WebKit::InspectorTargetProxy::sendMessageToTargetBackend):
3870         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
3871         (WebKit::RemoteLayerTreeDrawingAreaProxy::sizeDidChange):
3872         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
3873         (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
3874         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3875         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
3876         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
3877         (WebKit::UserMediaPermissionRequestManagerProxy::denyRequest):
3878         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
3879         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
3880         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest):
3881         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
3882         (WebKit::UserMediaPermissionRequestManagerProxy::captureStateChanged):
3883         * UIProcess/ViewGestureController.cpp:
3884         (WebKit::ViewGestureController::ViewGestureController):
3885         * UIProcess/WebBackForwardList.cpp:
3886         (WebKit::WebBackForwardList::~WebBackForwardList):
3887         * UIProcess/WebCookieManagerProxy.cpp:
3888         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
3889         * UIProcess/WebEditCommandProxy.cpp:
3890         (WebKit::WebEditCommandProxy::unapply):
3891         (WebKit::WebEditCommandProxy::reapply):
3892         * UIProcess/WebFrameProxy.cpp:
3893         (WebKit::WebFrameProxy::stopLoading const):
3894         * UIProcess/WebInspectorProxy.cpp:
3895         (WebKit::WebInspectorProxy::WebInspectorProxy):
3896         * UIProcess/WebPageProxy.cpp:
3897         (WebKit::m_resetRecentCrashCountTimer):
3898         (WebKit::WebPageProxy::hasRunningProcess const):
3899         (WebKit::WebPageProxy::setUIClient):
3900         (WebKit::WebPageProxy::setIconLoadingClient):
3901         (WebKit::WebPageProxy::launchProcess):
3902         (WebKit::WebPageProxy::swapToWebProcess):
3903         (WebKit::WebPageProxy::finishAttachingToWebProcess):
3904         (WebKit::WebPageProxy::didAttachToRunningProcess):
3905         (WebKit::WebPageProxy::launchProcessForReload):
3906         (WebKit::WebPageProxy::launchProcessWithItem):
3907         (WebKit::WebPageProxy::initializeWebPage):
3908         (WebKit::WebPageProxy::tryClose):
3909         (WebKit::WebPageProxy::loadRequest):
3910         (WebKit::WebPageProxy::loadFile):
3911         (WebKit::WebPageProxy::loadData):
3912         (WebKit::WebPageProxy::loadAlternateHTML):
3913         (WebKit::WebPageProxy::loadWebArchiveData):
3914         (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
3915         (WebKit::WebPageProxy::stopLoading):
3916         (WebKit::WebPageProxy::reload):
3917         (WebKit::WebPageProxy::goToBackForwardItem):
3918         (WebKit::WebPageProxy::tryRestoreScrollPosition):
3919         (WebKit::WebPageProxy::setControlledByAutomation):
3920         (WebKit::WebPageProxy::setIndicating):
3921         (WebKit::WebPageProxy::setBackgroundColor):
3922         (WebKit::WebPageProxy::setTopContentInset):
3923         (WebKit::WebPageProxy::setUnderlayColor):
3924         (WebKit::WebPageProxy::viewWillStartLiveResize):
3925         (WebKit::WebPageProxy::viewWillEndLiveResize):
3926         (WebKit::WebPageProxy::dispatchActivityStateChange):
3927         (WebKit::WebPageProxy::layerHostingModeDidChange):
3928         (WebKit::WebPageProxy::waitForDidUpdateActivityState):
3929         (WebKit::WebPageProxy::setInitialFocus):
3930         (WebKit::WebPageProxy::clearSelection):
3931         (WebKit::WebPageProxy::restoreSelectionInFocusedEditableElement):
3932         (WebKit::WebPageProxy::validateCommand):
3933         (WebKit::WebPageProxy::increaseListLevel):
3934         (WebKit::WebPageProxy::decreaseListLevel):
3935         (WebKit::WebPageProxy::changeListType):
3936         (WebKit::WebPageProxy::setBaseWritingDirection):
3937         (WebKit::WebPageProxy::setNeedsFontAttributes):
3938         (WebKit::WebPageProxy::executeEditCommand):
3939         (WebKit::WebPageProxy::requestFontAttributesAtSelectionStart):
3940         (WebKit::WebPageProxy::setEditable):
3941         (WebKit::WebPageProxy::performDragControllerAction):
3942         (WebKit::WebPageProxy::dragEnded):
3943         (WebKit::WebPageProxy::didStartDrag):
3944         (WebKit::WebPageProxy::dragCancelled):
3945         (WebKit::WebPageProxy::handleMouseEvent):
3946         (WebKit::WebPageProxy::processNextQueuedMouseEvent):
3947         (WebKit::WebPageProxy::handleWheelEvent):
3948         (WebKit::WebPageProxy::handleKeyboardEvent):
3949         (WebKit::WebPageProxy::handleGestureEvent):
3950         (WebKit::WebPageProxy::handleTouchEventSynchronously):
3951         (WebKit::WebPageProxy::handleTouchEventAsynchronously):
3952         (WebKit::WebPageProxy::handleTouchEvent):
3953         (WebKit::WebPageProxy::scrollBy):
3954         (WebKit::WebPageProxy::centerSelectionInVisibleArea):
3955         (WebKit::WebPageProxy::receivedPolicyDecision):
3956         (WebKit::WebPageProxy::setUserAgent):
3957         (WebKit::WebPageProxy::resumeActiveDOMObjectsAndAnimations):
3958         (WebKit::WebPageProxy::suspendActiveDOMObjectsAndAnimations):
3959         (WebKit::WebPageProxy::setCustomTextEncodingName):
3960         (WebKit::WebPageProxy::setTextZoomFactor):
3961         (WebKit::WebPageProxy::setPageZoomFactor):
3962         (WebKit::WebPageProxy::setPageAndTextZoomFactors):
3963         (WebKit::WebPageProxy::scalePage):
3964         (WebKit::WebPageProxy::scalePageInViewCoordinates):
3965         (WebKit::WebPageProxy::scaleView):
3966         (WebKit::WebPageProxy::windowScreenDidChange):
3967         (WebKit::WebPageProxy::setCustomDeviceScaleFactor):
3968         (WebKit::WebPageProxy::accessibilitySettingsDidChange):
3969         (WebKit::WebPageProxy::updateAccessibilityEventsEnabled):
3970         (WebKit::WebPageProxy::setUseFixedLayout):
3971         (WebKit::WebPageProxy::setFixedLayoutSize):
3972         (WebKit::WebPageProxy::setAlwaysShowsHorizontalScroller):
3973         (WebKit::WebPageProxy::setAlwaysShowsVerticalScroller):
3974         (WebKit::WebPageProxy::listenForLayoutMilestones):
3975