Null pointer dereference in WebPageProxy::urlSchemeHandlerForScheme()
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-02-19  Daniel Bates  <dabates@apple.com>
2
3         Null pointer dereference in WebPageProxy::urlSchemeHandlerForScheme()
4         https://bugs.webkit.org/show_bug.cgi?id=182905
5
6         Reviewed by Alex Christensen.
7
8         Return nullptr when querying for the scheme handler of the null string.
9
10         Before a navigation is performed WebKit checks if the destination URL is associated with an app
11         unless the embedding client overrides the WKNavigationDelegate delegate callback -webView:decidePolicyForNavigationAction:decisionHandler.
12         If the URL is not associated with an app then WebKit may fall back to checking if the embedding
13         client registered a scheme handler for it. Currently we assume that the scheme is a non-null
14         string when checking the scheme handler registry. However the scheme can be a null string if
15         it is part of a malformed URL. And this leads to bad news bears when we try to use it to look
16         for a scheme handler. Instead check that the scheme is a non-null string before checking to see
17         if it is in the scheme handler registry.
18
19         * UIProcess/WebPageProxy.cpp:
20         (WebKit::WebPageProxy::urlSchemeHandlerForScheme):
21
22 2018-02-19  Ms2ger  <Ms2ger@igalia.com>
23
24         Explicitly qualify some method calls on this in lamdas in Service Worker code.
25         https://bugs.webkit.org/show_bug.cgi?id=182875
26
27         Reviewed by Chris Dumez.
28
29         This is necessary for the code to build with GCC 5. Other code already
30         appears to have been adapted similarly.
31
32         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
33         (WebKit::WebSWServerConnection::startFetch):
34
35 2018-02-18  Reza Abbasian  <rabbasian@apple.com>
36
37         Set the appropriate AutoFill context for suggested passwords.
38         https://bugs.webkit.org/show_bug.cgi?id=182718
39         <rdar://problem/36326863>
40
41         Reviewed by Wenson Hsieh and Tim Horton.
42
43         Before starting the input session, call the new delegate to query if AutoFill password suggestion assistance
44         is required for the focused element.
45
46         * UIProcess/API/Cocoa/_WKFormInputSession.h:
47         * UIProcess/API/Cocoa/_WKInputDelegate.h:
48         Introduce a new delegate to be called  before starting an input session to query if AutoFill password suggestion
49         assistance is required for the focused element.
50         * UIProcess/ios/WKContentViewInteraction.h:
51         * UIProcess/ios/WKContentViewInteraction.mm:
52         (-[WKFormInputSession initWithContentView:focusedElementInfo:requiresStrongPasswordAssistance:]):
53         (-[WKFormInputSession requiresStrongPasswordAssistance]):
54         (-[WKContentView cleanupInteraction]):
55         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
56         Call the delegate to find out if AutoFill suggested password assistance is required.
57         (-[WKContentView _stopAssistingNode]):
58         (-[WKContentView _autofillContext]): If the first responder is a password element and requires
59         assistance for AutoFill suggested password, set the appropriate AutoFill context.
60         (-[WKFormInputSession initWithContentView:focusedElementInfo:]): Deleted.
61
62 2018-02-17  Wenson Hsieh  <wenson_hsieh@apple.com>
63
64         [Extra zoom mode] Form control values are stale after dismissing and representing input view controllers
65         https://bugs.webkit.org/show_bug.cgi?id=182877
66         <rdar://problem/37604395>
67
68         Reviewed by Tim Horton.
69
70         Currently, when presenting an input view controller for a focused element, we populate the initial form control
71         value using the WKContentView's assisted node information when it was last focused. However, if the user edits
72         the value of a form control, dismisses to the form control view controller (while the element is still focused)
73         and then begins editing the field again, the initial text will be the previous value of the input, since the
74         AssistedNodeInformation isn't up to date.
75
76         To fix this, we introduce a mechanism to update WKContentView's AssistedNodeInformation for the current assisted
77         node. This overwrites _assistedNodeInformation with new information computed from the web process, as long as
78         the assisted node before and after the request is made in the UI process has not changed. We accomplish this by
79         adding an identifier to AssistedNodeInformation, which is monotonically incremented when an element is focused
80         in the web process. The UI process may then use this identifier to determine whether AssistedNodeInformations
81         are describing the same focused element.
82
83         One interesting consideration here is that a normal AssistedNodeInformation update (propagated when focusing an
84         element) may be deferred in the UI process until the next layer tree commit. In the absence of the assisted node
85         identifier check, one could imagine a scenario in which the assisted node information in the UI process gets
86         "updated" from a new value to an old value:
87
88         1. The web process focuses an element and sends AssistedNodeInformation `A`.
89         2. WKContentView calls -updateCurrentAssistedNodeInformation.
90         3. The web process sends AssistedNodeInformation `B`.
91         4. `A` is received in the UI process, but deferred.
92         5. The UI process receives `B` and sets _assistedNodeInformation to `B`.
93         6. The UI process calls -_startAssistingNode: and sets _assistedNodeInformation to `A`.
94
95         This would mean that the _assistedNodeInformation is set to an earlier value, `A`, after being set to a later
96         value, `B`. However, because the AssistedNodeInformation identifier in step (2) refers to the assisted node
97         prior to step (1), the assisted node identifier in (5) would not match this identifier, and we would simply bail
98         instead of overwriting assisted node information.
99
100         We use this AssistedNodeInformation update mechanism after inserting text via input view controllers, and also
101         after reentering edit mode from the focused form control view controller. This fixes two issues where changing
102         the size of the focused element after editing it results in the focused form overlay highlighting a stale frame,
103         and also when setting the initial text when reentering edit mode for a form control that is already focused.
104
105         * Shared/AssistedNodeInformation.cpp:
106         (WebKit::AssistedNodeInformation::encode const):
107         (WebKit::AssistedNodeInformation::decode):
108         * Shared/AssistedNodeInformation.h:
109
110         Add a new monotonically increasing identifier (per WebPage) which associates a AssistedNodeInformation with a
111         focused element. In the event that the web process crashes and relaunches (thus resetting this identifier),
112         AssistedNodeInformation state in the UI process is now also reset (see -cleanupInteraction), so we won't end up
113         confusing AssistedNodeInformations computed by different WebPages between a web process crash.
114
115         * UIProcess/WebPageProxy.h:
116
117         A bit of related refactoring here to remove an unnecessary bool flag that indicates whether we have a deferred
118         assisted node information. Instead, just use the presence of m_deferredNodeAssistanceArguments.
119
120         * UIProcess/WebPageProxy.messages.in:
121
122         Add a AssistedNodeInformationCallback IPC message.
123
124         * UIProcess/ios/WKContentViewInteraction.mm:
125         (-[WKContentView cleanupInteraction]):
126
127         Clear out the previous AssistedNodeInformation. See above for details.
128
129         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
130         (-[WKContentView updateCurrentAssistedNodeInformation:]):
131
132         Tries to update AssistedNodeInformation for the current assisted node, invoking the completion callback when
133         finished. This may result in the assisted node information not being updated due to the current assisted node
134         changing in the time between the start of the request and the information being received in the UI process.
135
136         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
137
138         Refactored from -presentViewControllerForAssistedNode:, such that it no longer takes an AssistedNodeInformation
139         as an argument, but rather just uses WKContentView's current _assistedNodeInformation. This was just being
140         called with _assistedNodeInformation from all call sites anyways.
141
142         (-[WKContentView textInputController:didCommitText:]):
143
144         Request an AssistedNodeInformation update after setting the value of a form control; if the assisted node hasn't
145         changed, update the focused form control overlay. This is needed to handle cases where the focused element's
146         frame may have changed after inserting text (e.g. due to line wrapping), and the focused form control overlay
147         needs to be updated to reflect this change.
148
149         (-[WKContentView focusedFormControlControllerDidBeginEditing:]):
150
151         Request an AssistedNodeInformation update before reentering edit mode; if the assisted node hasn't changed since
152         the start of the request, present the appropriate input view controller.
153
154         (-[WKContentView presentViewControllerForAssistedNode:]): Deleted.
155         * UIProcess/ios/WebPageProxyIOS.mm:
156         (WebKit::WebPageProxy::assistedNodeInformationCallback):
157         (WebKit::WebPageProxy::requestAssistedNodeInformation):
158         (WebKit::WebPageProxy::didCommitLayerTree):
159         (WebKit::WebPageProxy::startAssistingNode):
160         (WebKit::WebPageProxy::stopAssistingNode):
161         * WebProcess/WebPage/WebPage.cpp:
162         (WebKit::WebPage::elementDidFocus):
163
164         Increment the assisted node identifier.
165
166         * WebProcess/WebPage/WebPage.h:
167         * WebProcess/WebPage/WebPage.messages.in:
168         * WebProcess/WebPage/ios/WebPageIOS.mm:
169         (WebKit::WebPage::requestAssistedNodeInformation):
170
171         Compute and return an AssistedNodeInformation.
172
173         (WebKit::WebPage::getAssistedNodeInformation):
174
175 2018-02-16  Dean Jackson  <dino@apple.com>
176
177         Use OPENGL macros to be more clear about which OpenGL/ES WebGL uses on Cocoa
178         https://bugs.webkit.org/show_bug.cgi?id=182894
179
180         Reviewed by Tim Horton.
181
182         Rename OPENGL_ES_2 to OPENGL_ES.
183
184         * CMakeLists.txt:
185         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
186         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
187         (WebKit::AcceleratedBackingStoreWayland::paint):
188         * UIProcess/gtk/WaylandCompositor.cpp:
189         (WebKit::WaylandCompositor::initializeEGL):
190
191 2018-02-16  Ryosuke Niwa  <rniwa@webkit.org>
192
193         Add an entitlement check for service worker on iOS
194         https://bugs.webkit.org/show_bug.cgi?id=182865
195         <rdar://problem/37505903>
196
197         Reviewed by Brady Eidson.
198
199         Added an entitlement check to enable service workers on iOS.
200
201         * Shared/mac/SandboxUtilities.h:
202         * Shared/mac/SandboxUtilities.mm:
203         (WebKit::connectedProcessHasEntitlement): Added.
204         * StorageProcess/StorageProcess.cpp:
205         (WebKit::StorageProcess::createStorageToWebProcessConnection): Enforce the entitlement check by crashing
206         when this code is executed without the parent process having the service worker entitlement. This should
207         never happen unless someone is trying to bypass the entitlement check in UI Process since we ordinarily
208         disable service worker gracefully in WKWebView _initializeWithConfiguration.
209         (WebKit::StorageProcess::swServerForSession): Ditto.
210         (WebKit::StorageProcess::registerSWServerConnection): Ditto.
211         * StorageProcess/StorageProcess.h:
212         (WebKit::StorageProcess::parentProcessHasServiceWorkerEntitlement const): Added.
213         * StorageProcess/ios/StorageProcessIOS.mm:
214         (WebKit::StorageProcess::parentProcessHasServiceWorkerEntitlement const): Added.
215         * UIProcess/API/Cocoa/WKWebView.mm:
216         (-[WKWebView _initializeWithConfiguration:]): Disable the service workers when the entitlement is
217         missing from the current process. The entitlement is enforced by WebContent and Storage process.
218         This check avoids crashing WebContent process and gracefully disabling the feature.
219         * WebProcess/WebPage/WebPage.cpp:
220         (WebKit::WebPage::updatePreferences): Enforce the entitlement check.
221         * WebProcess/WebPage/WebPage.h:
222         (WebKit::WebPage::parentProcessHasServiceWorkerEntitlement const): Added.
223         * WebProcess/WebPage/ios/WebPageIOS.mm:
224         (WebKit::WebPage::parentProcessHasServiceWorkerEntitlement const): Added.
225
226 2018-02-16  Youenn Fablet  <youenn@apple.com>
227
228         Allow specifying which plug-ins are supported
229         https://bugs.webkit.org/show_bug.cgi?id=182748
230
231         Reviewed by Chris Dumez.
232
233         Add a C and ObjC API to set which plug-ins are specified.
234         Plug-ins may be allowed by origin of the main page or for all origins.
235
236         If the API to set a supported plug-in is called, WebKit enters a mode
237         where it will block any plug-in that is not on the list.
238
239         The list of supported plug-ins is stored in UIProcess and sent to WebProcess.
240         This allows to compute the list of visible plug-ins according supported plugins.
241
242         PluginInfoStore is storing the list of supported plugins and can
243         answer whether a plug-in creation request is to be made unsupported or not.
244         It also creates the structure sent to WebProcess for computing plugin visibility.
245
246         Updated ArgumentCoders to accept modern HashSet decoders.
247
248         * Platform/IPC/ArgumentCoders.h:
249         * UIProcess/API/C/WKContext.cpp:
250         (WKContextAddSupportedPlugin):
251         (WKContextClearSupportedPlugins):
252         * UIProcess/API/C/WKContextPrivate.h:
253         * UIProcess/API/Cocoa/WKProcessPool.mm:
254         (-[WKProcessPool _addSupportedPlugin:named:withMimeTypes:withExtensions:]):
255         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
256         * UIProcess/Plugins/PluginInfoStore.cpp:
257         (WebKit::PluginInfoStore::isSupportedPlugin):
258         (WebKit::PluginInfoStore::SupportedPlugins::isSupported):
259         (WebKit::PluginInfoStore::SupportedPlugin::isSupported):
260         (WebKit::PluginInfoStore::supportedPluginNames):
261         (WebKit::PluginInfoStore::addSupportedPlugin):
262         * UIProcess/Plugins/PluginInfoStore.h:
263         (WebKit::PluginInfoStore::clearSupportedPlugins):
264         * UIProcess/WebPageProxy.cpp:
265         (WebKit::WebPageProxy::findPlugin):
266         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
267         * UIProcess/WebPageProxy.h:
268         * UIProcess/WebPageProxy.messages.in:
269         * UIProcess/WebProcessPool.cpp:
270         (WebKit::WebProcessPool::addSupportedPlugin):
271         (WebKit::WebProcessPool::clearSupportedPlugins):
272         * UIProcess/WebProcessPool.h:
273         * UIProcess/WebProcessProxy.cpp:
274         (WebKit::WebProcessProxy::getPlugins):
275         * UIProcess/WebProcessProxy.h:
276         * UIProcess/WebProcessProxy.messages.in:
277         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
278         (WebKit::WebPluginInfoProvider::getPluginInfo):
279         (WebKit::WebPluginInfoProvider::getWebVisiblePluginInfo):
280         (WebKit::WebPluginInfoProvider::populatePluginCache):
281         * WebProcess/Plugins/WebPluginInfoProvider.h:
282         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
283         (WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton const):
284         * WebProcess/WebPage/WebPage.cpp:
285         (WebKit::WebPage::createPlugin):
286         (WebKit::WebPage::canPluginHandleResponse):
287
288 2018-02-16  Jiewen Tan  <jiewen_tan@apple.com>
289
290         [WebAuthN] Implement PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()
291         https://bugs.webkit.org/show_bug.cgi?id=182771
292         <rdar://problem/36459988>
293
294         Reviewed by Brent Fulgham.
295
296         This patch utilizes LocalAuthentication Framework to determine if biometrics
297         are enrolled on a device, which is the user verifying platform authenticator.
298         To do so, it links the framework to WebKit.
299
300         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp:
301         (WebKit::WebCredentialsMessengerProxy::isUserVerifyingPlatformAuthenticatorAvailable):
302         (WebKit::WebCredentialsMessengerProxy::isUserVerifyingPlatformAuthenticatorAvailableReply):
303         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h:
304         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in:
305         * UIProcess/CredentialManagement/cocoa/WebCredentialsMessengerProxyCocoa.mm:
306         (WebKit::WebCredentialsMessengerProxy::platformIsUserVerifyingPlatformAuthenticatorAvailable):
307         * WebKit.xcodeproj/project.pbxproj:
308         * WebProcess/CredentialManagement/WebCredentialsMessenger.cpp:
309         (WebKit::WebCredentialsMessenger::isUserVerifyingPlatformAuthenticatorAvailable):
310         (WebKit::WebCredentialsMessenger::isUserVerifyingPlatformAuthenticatorAvailableReply):
311         * WebProcess/CredentialManagement/WebCredentialsMessenger.h:
312         * WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in:
313
314 2018-02-16  Per Arne Vollan  <pvollan@apple.com>
315
316         Implement stopping of run loop in the WebContent process when using NSRunLoop.
317         https://bugs.webkit.org/show_bug.cgi?id=182499
318         <rdar://problem/37247424>
319
320         Reviewed by Brent Fulgham.
321
322         Add the method ChildProcess::stopNSRunLoop to end the WebContent process by executing a block
323         with 'exit(0)' on the main run loop. 
324
325         * Shared/ChildProcess.h:
326         * Shared/mac/ChildProcessMac.mm:
327         (WebKit::ChildProcess::stopNSRunLoop):
328         * WebProcess/cocoa/WebProcessCocoa.mm:
329         (WebKit::WebProcess::platformInitializeWebProcess):
330         (WebKit::WebProcess::stopRunLoop):
331
332 2018-02-16  Yousuke Kimoto  <yousuke.kimoto@sony.com>
333
334         [WinCario] Add NetworkSessionCurl
335         https://bugs.webkit.org/show_bug.cgi?id=182680
336
337         Reviewed by Konstantin Tokarev.
338
339         * NetworkProcess/NetworkSession.cpp:
340         (WebKit::NetworkSession::create):
341         * PlatformWin.cmake:
342
343 2018-02-16  Chris Dumez  <cdumez@apple.com>
344
345         ASSERTION FAILED: !m_processes[i] || *m_processes[i] == process in MessagePortChannel::entanglePortWithProcess()
346         https://bugs.webkit.org/show_bug.cgi?id=182054
347         <rdar://problem/36871207>
348
349         Reviewed by Brady Eidson.
350
351         Pipe postMessage messages to and from service workers via the UIProcess instead of going
352         directly to the StorageProcess. This is temporarily needed to avoid races due to the
353         MessagePort registry currently living in the UIProcess and postMessage messages potentially
354         sending MessagePort objects.
355
356         This change is covered by tests on the bots that currently flakily crash in debug.
357
358         * StorageProcess/ServiceWorker/WebSWServerConnection.h:
359         * StorageProcess/StorageProcess.cpp:
360         (WebKit::StorageProcess::postMessageToServiceWorker):
361         * StorageProcess/StorageProcess.h:
362         * StorageProcess/StorageProcess.messages.in:
363         * UIProcess/WebProcessPool.cpp:
364         (WebKit::WebProcessPool::postMessageToServiceWorkerClient):
365         (WebKit::WebProcessPool::postMessageToServiceWorker):
366         * UIProcess/WebProcessPool.h:
367         * UIProcess/WebProcessPool.messages.in:
368         * WebProcess/Storage/WebSWClientConnection.cpp:
369         (WebKit::WebSWClientConnection::postMessageToServiceWorker):
370         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
371         (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerClient):
372
373 2018-02-16  Wenson Hsieh  <wenson_hsieh@apple.com>
374
375         [Extra zoom mode] Add basic support for <input type='date'> using date picker UI
376         https://bugs.webkit.org/show_bug.cgi?id=182847
377         <rdar://problem/35143111>
378
379         Reviewed by Tim Horton.
380
381         Add support for presenting date pickers when focusing a date input.
382
383         * UIProcess/ios/WKContentViewInteraction.h:
384         * UIProcess/ios/WKContentViewInteraction.mm:
385         (-[WKContentView _stopAssistingNode]):
386         (-[WKContentView dismissAllInputViewControllers]):
387
388         Pull logic to dismiss input view controllers into a single helper.
389
390         (-[WKContentView presentDatePickerViewController:]):
391         (-[WKContentView dismissDatePickerViewController:]):
392         (-[WKContentView presentViewControllerForAssistedNode:]):
393         (-[WKContentView textInputController:didCommitText:]):
394         (-[WKContentView _wheelChangedWithEvent:]):
395
396         Delegate wheel events to the date picker.
397
398         * UIProcess/ios/forms/WKDatePickerViewController.h: Added.
399         * UIProcess/ios/forms/WKDatePickerViewController.mm: Added.
400
401         Add harness files for the WKDatePickerViewController implementation in WebKitAdditions.
402
403         * WebKit.xcodeproj/project.pbxproj:
404
405 2018-02-15  Youenn Fablet  <youenn@apple.com>
406
407         Resources loaded from service workers are not downloadable
408         https://bugs.webkit.org/show_bug.cgi?id=182848
409
410         Reviewed by Chris Dumez.
411
412         Downloads are not supporting resources loaded through service worker.
413         As a temporary solution, we will let network process handle it.
414         Note that this would not work if the URL can only be loaded through service worker.
415         Note also that for navigation loads, if the content type is the default one (application/octet-stream) we are overriding it to
416         text/html as we do not support mime sniffing yet from service worker responses.
417         This might interfere with automatic downloads from navigation.
418
419         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
420         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
421
422 2018-02-15  Megan Gardner  <megan_gardner@apple.com>
423
424         Support scrolling for non-editable web-selection and start autoscroll when near screen edges
425         https://bugs.webkit.org/show_bug.cgi?id=182815
426
427         Add support for autoscrolling during a selection. This also takes into account the edges of the screen
428         and starts autoscrolling when you get close, while still allowing autoscrolling when you are past the bounds
429         of the WebView.
430
431         Reviewed by Tim Horton.
432
433         * UIProcess/ios/WKContentViewInteraction.mm:
434         (-[WKContentView startAutoscroll:]):
435         (-[WKContentView resignFirstResponderForWebView]):
436         (-[WKContentView useSelectionAssistantWithGranularity:]):
437         (-[WKContentView selectedTextRange]):
438         * UIProcess/ios/WebPageProxyIOS.mm:
439         (WebKit::WebPageProxy::startAutoscrollAtPosition):
440         * WebProcess/WebPage/ios/WebPageIOS.mm:
441         (WebKit::WebPage::startAutoscrollAtPosition):
442         (WebKit::WebPage::cancelAutoscroll):
443
444 2018-02-15  John Wilander  <wilander@apple.com>
445
446         Resource Load Statistics: Make sure WebResourceLoadStatisticsStore::mergeWithDataFromDecoder() can ingest older plist versions and not reset the database
447         https://bugs.webkit.org/show_bug.cgi?id=182812
448         <rdar://problem/37511406>
449
450         Reviewed by Brent Fulgham.
451
452         * UIProcess/WebResourceLoadStatisticsStore.cpp:
453         (WebKit::WebResourceLoadStatisticsStore::mergeWithDataFromDecoder):
454             Now does the following:
455             - Logs when there is a model version mismatch.
456             - Does not ingest statistics if the version on disk is newer than the supported one.
457             - Does ingest statistics if the version on disk is older than the supported one.
458             - Passes on the version found on disk to WebCore::ResourceLoadStatistics::decode().
459
460 2018-02-15  Jiewen Tan  <jiewen_tan@apple.com>
461
462         [WebAuthN] Revisit the whole async model of task dispatching, timeout and aborting
463         https://bugs.webkit.org/show_bug.cgi?id=181946
464         <rdar://problem/37258262>
465
466         Reviewed by Chris Dumez.
467
468         Dummy WebCredentialsMessenger and WebCredentialsMessengerProxy are crafted to establish
469         a message exchange channel between UIProcess and WebProcess.
470
471         * DerivedSources.make:
472         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
473         (WebKit::WebCredentialsMessengerProxy::WebCredentialsMessengerProxy):
474         (WebKit::WebCredentialsMessengerProxy::~WebCredentialsMessengerProxy):
475         (WebKit::WebCredentialsMessengerProxy::makeCredential):
476         (WebKit::WebCredentialsMessengerProxy::getAssertion):
477         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
478         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in: Added.
479         * UIProcess/WebPageProxy.cpp:
480         (WebKit::m_configurationPreferenceValues):
481         (WebKit::WebPageProxy::reattachToWebProcess):
482         (WebKit::WebPageProxy::resetState):
483         * UIProcess/WebPageProxy.h:
484         * WebKit.xcodeproj/project.pbxproj:
485         * WebProcess/CredentialManagement/WebCredentialsMessenger.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
486         (WebKit::WebCredentialsMessenger::WebCredentialsMessenger):
487         (WebKit::WebCredentialsMessenger::~WebCredentialsMessenger):
488         (WebKit::WebCredentialsMessenger::makeCredential):
489         (WebKit::WebCredentialsMessenger::getAssertion):
490         (WebKit::WebCredentialsMessenger::makeCredentialReply):
491         (WebKit::WebCredentialsMessenger::getAssertionReply):
492         * WebProcess/CredentialManagement/WebCredentialsMessenger.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
493         * WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in: Added.
494         * WebProcess/WebPage/WebPage.cpp:
495         (WebKit::m_credentialsMessenger):
496         (WebKit::m_cpuLimit): Deleted.
497         * WebProcess/WebPage/WebPage.h:
498
499 2018-02-15  Michael Catanzaro  <mcatanzaro@igalia.com>
500
501         [WPE] Unify build of platform-specific files in WebKit layer
502         https://bugs.webkit.org/show_bug.cgi?id=182696
503
504         Reviewed by Žan Doberšek.
505
506         This is easy, because all needed changes were made in the previously-landed patch.
507
508         * CMakeLists.txt:
509         * PlatformWPE.cmake:
510
511 2018-02-15  Don Olmstead  <don.olmstead@sony.com>
512
513         WebCore headers should not be included relatively within dependent projects
514         https://bugs.webkit.org/show_bug.cgi?id=182805
515
516         Reviewed by Chris Dumez.
517
518         * NetworkProcess/capture/NetworkCaptureManager.cpp:
519         * NetworkProcess/webrtc/NetworkRTCMonitor.h:
520         * Shared/gtk/WebEventFactory.cpp:
521         * UIProcess/API/gtk/PageClientImpl.cpp:
522         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
523         * UIProcess/gtk/WebPageProxyGtk.cpp:
524         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
525         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
526         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
527         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
528         * WebProcess/WebPage/wpe/WebPageWPE.cpp:
529
530 2018-02-15  Matt Lewis  <jlewis3@apple.com>
531
532         Unreviewed, rolling out r228495.
533
534         This caused mulitple perf tests to fail consistently.
535
536         Reverted changeset:
537
538         "Resource Load Statistics: Make sure
539         WebResourceLoadStatisticsStore::mergeWithDataFromDecoder() can
540         ingest older plist versions and not reset the database"
541         https://bugs.webkit.org/show_bug.cgi?id=182812
542         https://trac.webkit.org/changeset/228495
543
544 2018-02-14  Ross Kirsling  <ross.kirsling@sony.com>
545
546         Default definition of InjectedBundle::PlatformBundle should not be Windows-specific.
547         https://bugs.webkit.org/show_bug.cgi?id=182810
548
549         Reviewed by Michael Catanzaro.
550
551         This branch was added in r228455, but should not be limited to OS(WINDOWS).
552
553         * WebProcess/InjectedBundle/InjectedBundle.h:
554
555 2018-02-14  Ross Kirsling  <ross.kirsling@sony.com>
556
557         Default implementations of nativeEvent() should be platform-agnostic.
558         https://bugs.webkit.org/show_bug.cgi?id=182806
559
560         Reviewed by Darin Adler.
561
562         * Shared/NativeWebKeyboardEvent.h:
563         * Shared/NativeWebMouseEvent.h:
564         * Shared/NativeWebWheelEvent.h:
565
566 2018-02-14  John Wilander  <wilander@apple.com>
567
568         Resource Load Statistics: Make sure WebResourceLoadStatisticsStore::mergeWithDataFromDecoder() can ingest older plist versions and not reset the database
569         https://bugs.webkit.org/show_bug.cgi?id=182812
570         <rdar://problem/37511406>
571
572         Reviewed by Brent Fulgham.
573
574         * UIProcess/WebResourceLoadStatisticsStore.cpp:
575         (WebKit::WebResourceLoadStatisticsStore::mergeWithDataFromDecoder):
576             Now does the following:
577             - Logs when there is a model version mismatch.
578             - Does not ingest statistics if the version on disk is newer than the supported one.
579             - Does ingest statistics if the version on disk is older than the supported one.
580             - Passes on the version found on disk to WebCore::ResourceLoadStatistics::decode().
581
582 2018-02-14  Daniel Bates  <dabates@apple.com>
583
584         Disallow cross-origin subresources from asking for credentials
585         https://bugs.webkit.org/show_bug.cgi?id=182579
586         <rdar://problem/36162271>
587
588         Reviewed by Andy Estes.
589
590         Add a private preference to toggle allowing non-mixed content cross-origin subresources to load.
591         WebKitTestRunner toggles this preference when it sees the test option allowCrossOriginSubresourcesToAskForCredential.
592
593         * Shared/WebPreferences.yaml:
594         * UIProcess/API/C/WKPreferences.cpp:
595         (WKPreferencesSetAllowCrossOriginSubresourcesToAskForCredentials):
596         (WKPreferencesGetAllowCrossOriginSubresourcesToAskForCredentials):
597         * UIProcess/API/C/WKPreferencesRefPrivate.h:
598
599 2018-02-14  John Wilander  <wilander@apple.com>
600
601         Make maximumParallelReadCount static to fix lambda capture error in WebKit::NetworkCache::Storage::traverse()
602         https://bugs.webkit.org/show_bug.cgi?id=182797
603         <rdar://problem/37540594>
604
605         Reviewed by Tim Horton.
606
607         This capture was added in r228455 and causes a build failure when
608         run with -Wunused-lambda-capture. Xcode also warns about it.
609
610         * NetworkProcess/cache/NetworkCacheStorage.cpp:
611         (WebKit::NetworkCache::Storage::traverse):
612
613 2018-02-14  Ryosuke Niwa  <rniwa@webkit.org>
614
615         EventDispatcher::wheelEvent uses a wrong enum values in switch
616         https://bugs.webkit.org/show_bug.cgi?id=182796
617
618         Reviewed by Chris Dumez.
619
620         EventDispatcher::wheelEvent is using PlatformWheelEventPhaseBegan and PlatformWheelEventPhaseEnded
621         but the enum type of wheelEvent.phase() is WebWheelEvent::Phase.
622
623         The enum values are indentical for both so there is no behavioral change.
624
625         * WebProcess/WebPage/EventDispatcher.cpp:
626         (WebKit::EventDispatcher::wheelEvent):
627
628 2018-02-14  Maureen Daum  <mdaum@apple.com>
629
630         Add C SPI for support of Website Data Store in Website Policies
631         https://bugs.webkit.org/show_bug.cgi?id=182698
632         <rdar://problem/37412008>
633
634         Reviewed by Andy Estes.
635
636         Expand the API added for _WKWebsitePolicies.websiteDataStore in r225989 and r226325
637         to be available in the C API. In the ObjC API, we handle setting the website data
638         store in NavigationState::NavigationClient::decidePolicyForNavigationAction. There
639         we throw an exception if setting the website data store isn't supported, and then
640         change the website data store. The equivalent place to do this work in the C API is
641         in WKFramePolicyListenerUseWithPolicies. However, instead of throwing exceptions,
642         release asserts are used.
643
644         * UIProcess/API/C/WKFramePolicyListener.cpp:
645         (WKFramePolicyListenerUseWithPolicies):
646         If the website policies data contains a website data store, do the same checks that
647         are done in NavigationState::NavigationClient::decidePolicyForNavigationAction. Namely,
648         that it is a valid website data store and it is a policy decision for a main frame navigation.
649         If these checks are met, change the website data store.
650         * UIProcess/API/C/WKPage.cpp:
651         (WKPageUpdateWebsitePolicies):
652         * UIProcess/API/C/WKWebsitePolicies.cpp:
653         (WKWebsitePoliciesGetDataStore):
654         (WKWebsitePoliciesSetDataStore):
655         * UIProcess/API/C/WKWebsitePolicies.h:
656         * UIProcess/WebFrameListenerProxy.cpp:
657         (WebKit::WebFrameListenerProxy::changeWebsiteDataStore):
658         (WebKit::WebFrameListenerProxy::isMainFrame):
659         Expose whether the frame proxy is for a main frame, which is required to verify that
660         website policies only specify a website data store for main frame policy decisions.
661         * UIProcess/WebFrameListenerProxy.h:
662         * UIProcess/WebFramePolicyListenerProxy.cpp:
663         * UIProcess/WebFrameProxy.cpp:
664         (WebKit::WebFrameProxy::changeWebsiteDataStore):
665         * UIProcess/WebFrameProxy.h:
666
667 2018-02-14  Ryan Haddad  <ryanhaddad@apple.com>
668
669         Unreviewed, rolling out r228444.
670
671         Introduced API and Layout test failures.
672
673         Reverted changeset:
674
675         "[WebAuthN] Revisit the whole async model of task dispatching,
676         timeout and aborting"
677         https://bugs.webkit.org/show_bug.cgi?id=181946
678         https://trac.webkit.org/changeset/228444
679
680 2018-02-13  Yousuke Kimoto  <yousuke.kimoto@sony.com>
681
682         [WinCairo] Fix build errors which come from including headers and not suitable implementation for windows
683         https://bugs.webkit.org/show_bug.cgi?id=182679
684
685         Reviewed by Michael Catanzaro.
686
687         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
688         (WebKit::NetworkCache::BlobStorage::add):
689         * NetworkProcess/cache/NetworkCacheData.cpp:
690         (WebKit::NetworkCache::Data::mapToFile const):
691         (WebKit::NetworkCache::mapFile):
692         (WebKit::NetworkCache::adoptAndMapFile):
693         (WebKit::NetworkCache::readOrMakeSalt):
694         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
695         (WebKit::NetworkCache::directoryEntryType):
696         (WebKit::NetworkCache::traverseDirectory):
697         (WebKit::NetworkCache::fileTimes):
698         (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
699         * NetworkProcess/cache/NetworkCacheStorage.cpp:
700         (WebKit::NetworkCache::Storage::traverse):
701         * NetworkProcess/win/SystemProxyWin.h:
702         * Platform/IPC/Attachment.h:
703         * Platform/Module.h:
704         * Platform/SharedMemory.h:
705         * PluginProcess/WebProcessConnection.cpp:
706         * Shared/API/c/WKBase.h:
707         * Shared/ChildProcess.cpp:
708         * Shared/WebCoreArgumentCoders.h:
709         * UIProcess/ProcessAssertion.h:
710         * WebProcess/InjectedBundle/InjectedBundle.h:
711         * WebProcess/WebProcess.cpp:
712
713 2018-02-13  Commit Queue  <commit-queue@webkit.org>
714
715         Unreviewed, rolling out r228431.
716         https://bugs.webkit.org/show_bug.cgi?id=182766
717
718         Regressed CMake build stability (Requested by dolmstead on
719         #webkit).
720
721         Reverted changeset:
722
723         "[CMake] Make WebCore headers copies"
724         https://bugs.webkit.org/show_bug.cgi?id=182512
725         https://trac.webkit.org/changeset/228431
726
727 2018-02-13  Jiewen Tan  <jiewen_tan@apple.com>
728
729         [WebAuthN] Revisit the whole async model of task dispatching, timeout and aborting
730         https://bugs.webkit.org/show_bug.cgi?id=181946
731         <rdar://problem/37258262>
732
733         Reviewed by Chris Dumez.
734
735         Dummy WebCredentialsMessenger and WebCredentialsMessengerProxy are crafted to establish
736         a message exchange channel between UIProcess and WebProcess.
737
738         * DerivedSources.make:
739         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
740         (WebKit::WebCredentialsMessengerProxy::WebCredentialsMessengerProxy):
741         (WebKit::WebCredentialsMessengerProxy::~WebCredentialsMessengerProxy):
742         (WebKit::WebCredentialsMessengerProxy::makeCredential):
743         (WebKit::WebCredentialsMessengerProxy::getAssertion):
744         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
745         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in: Added.
746         * UIProcess/WebPageProxy.cpp:
747         (WebKit::m_configurationPreferenceValues):
748         (WebKit::WebPageProxy::reattachToWebProcess):
749         * UIProcess/WebPageProxy.h:
750         * WebKit.xcodeproj/project.pbxproj:
751         * WebProcess/CredentialManagement/WebCredentialsMessenger.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
752         (WebKit::WebCredentialsMessenger::WebCredentialsMessenger):
753         (WebKit::WebCredentialsMessenger::~WebCredentialsMessenger):
754         (WebKit::WebCredentialsMessenger::makeCredential):
755         (WebKit::WebCredentialsMessenger::getAssertion):
756         (WebKit::WebCredentialsMessenger::makeCredentialReply):
757         (WebKit::WebCredentialsMessenger::getAssertionReply):
758         * WebProcess/CredentialManagement/WebCredentialsMessenger.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
759         * WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in: Added.
760         * WebProcess/WebPage/WebPage.cpp:
761         (WebKit::m_credentialsMessenger):
762         (WebKit::m_cpuLimit): Deleted.
763         * WebProcess/WebPage/WebPage.h:
764
765 2018-02-13  Youenn Fablet  <youenn@apple.com>
766
767         Add support for configuring WebsiteDatastore service worker and cache storage path
768         https://bugs.webkit.org/show_bug.cgi?id=182674
769
770         Reviewed by Chris Dumez.
771
772         Beef up WKWebsiteDataStoreConfiguration to easily set the WebsiteDataStore
773         service worker registration and cache storage directory path.
774
775         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
776         (-[WKWebsiteDataStore _initWithConfiguration:]):
777         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
778         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
779         (-[_WKWebsiteDataStoreConfiguration _cacheStorageDirectory]):
780         (-[_WKWebsiteDataStoreConfiguration _setCacheStorageDirectory:]):
781         (-[_WKWebsiteDataStoreConfiguration _serviceWorkerRegistrationDirectory]):
782         (-[_WKWebsiteDataStoreConfiguration _setServiceWorkerRegistrationDirectory:]):
783
784 2018-02-13  Brian Burg  <bburg@apple.com>
785
786         Web Automation: don't return an error if resizing/moving a window has no effect
787         https://bugs.webkit.org/show_bug.cgi?id=182742
788
789         Reviewed by Tim Horton.
790
791         * UIProcess/Automation/WebAutomationSession.cpp:
792         (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
793         (WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
794         Unify the behavior for all ports. Don't raise an error if the command was
795         idempotent (by mistake or not). It should not be an error to re-maximize a window.
796
797 2018-02-13  Don Olmstead  <don.olmstead@sony.com>
798
799         [CMake] Make WebCore headers copies
800         https://bugs.webkit.org/show_bug.cgi?id=182512
801
802         Reviewed by Keith Miller.
803
804         * CMakeLists.txt:
805         * NetworkProcess/capture/NetworkCaptureManager.cpp:
806         * NetworkProcess/webrtc/NetworkRTCMonitor.h:
807         * PlatformWPE.cmake:
808         * Scripts/generate-forwarding-headers.pl:
809         * Shared/gtk/WebEventFactory.cpp:
810         * UIProcess/API/gtk/PageClientImpl.cpp:
811         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
812         * UIProcess/gtk/WebPageProxyGtk.cpp:
813         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
814         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
815         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
816         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
817         * WebProcess/WebPage/wpe/WebPageWPE.cpp:
818
819 2018-02-13  Brent Fulgham  <bfulgham@apple.com>
820
821         [iOS] whitelist iokit-get-properties
822         https://bugs.webkit.org/show_bug.cgi?id=182722
823         <rdar://problem/30929165>
824
825         Reviewed by Eric Carlson.
826
827         Update the iOS sandbox to block access to IOKit properties that are not needed for
828         legitimate WebContent process use. This brings the iOS sandbox in line with the
829         work done under macOS.
830
831         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
832
833 2018-02-12  John Wilander  <wilander@apple.com>
834
835         Resource Load Statistics: Classify resources as prevalent based on redirects to other prevalent resources
836         https://bugs.webkit.org/show_bug.cgi?id=182664
837         <rdar://problem/37372572>
838
839         Reviewed by Brent Fulgham.
840
841         * Platform/classifier/ResourceLoadStatisticsClassifier.cpp:
842         (WebKit::ResourceLoadStatisticsClassifier::hasPrevalentResourceCharacteristics):
843             Unique top frame redirects now counts toward classification as prevalent.
844         * Shared/WebCoreArgumentCoders.cpp:
845         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
846         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
847         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
848         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
849         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
850         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
851             Test infrastructure.
852         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
853         * UIProcess/WebResourceLoadStatisticsStore.cpp:
854             Bumped the statistics model to 11 because of the added fields.
855         (WebKit::WebResourceLoadStatisticsStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain):
856             This function back traces redirect chains to classify domains
857             that have redirected to a newly classified prevalent resource.
858         (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
859             Now uses the new convenience function WebResourceLoadStatisticsStore::setPrevalentResource().
860         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
861             New convenience function to make sure we always call
862             WebResourceLoadStatisticsStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain()
863             and capture redirect chains backward.
864         (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
865         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
866         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
867         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom):
868         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo):
869         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom):
870             Test infrastructure.
871         * UIProcess/WebResourceLoadStatisticsStore.h:
872
873 2018-02-12  Antti Koivisto  <antti@apple.com>
874
875         Update NetworkCache::Storage::lastStableVersion after r226349
876         https://bugs.webkit.org/show_bug.cgi?id=182723
877         <rdar://problem/37469554>
878         
879         Reviewed by Ryosuke Niwa.
880
881         * NetworkProcess/cache/NetworkCacheStorage.h:
882
883         Allow deleting version 11 caches.
884
885 2018-02-12  Wenson Hsieh  <wenson_hsieh@apple.com>
886
887         [Extra zoom mode] Add support for <input type='time'> using time picker UI
888         https://bugs.webkit.org/show_bug.cgi?id=182683
889         <rdar://problem/35143162>
890
891         Reviewed by Tim Horton.
892
893         Adds support for showing a time picker when an input of type time is focused in extra zoomed mode.
894
895         * UIProcess/ios/WKContentViewInteraction.h:
896         * UIProcess/ios/WKContentViewInteraction.mm:
897         (-[WKContentView _stopAssistingNode]):
898         (-[WKContentView presentTimePickerViewController:]):
899         (-[WKContentView dismissTimePickerViewController:]):
900
901         Add helpers to dismiss and present the time picker view controller.
902
903         (-[WKContentView presentViewControllerForAssistedNode:]):
904
905         When focusing InputType::Time, present a time picker. Additionally, tweak the logic here to use the generic text
906         input view controller as a fallback when the other input view controllers (number pads, select menus and time
907         pickers thus far) are not relevant. This prevents us from completely being unable to edit form controls that are
908         currently unsupported.
909
910         (-[WKContentView textInputController:didCommitText:]):
911         (-[WKContentView textInputControllerDidRequestDismissal:]):
912
913         Tweak WKContentView for changes to WKTextFormControlViewControllerDelegate.
914
915         (-[WKContentView actionNameForFocusedFormControlController:]):
916
917         Adjust this implementation to hide the focused form control "Go" button for selects and time inputs. This
918         currently doesn't work for these form controls because it relies on implicit form submission; this should be
919         fixed by future changes, after which we should revert this adjustment.
920
921         (-[WKContentView _wheelChangedWithEvent:]):
922
923         Delegate wheel events to the time picker if needed.
924
925         (-[WKContentView textInputController:didRequestDismissalWithAction:]): Deleted.
926
927         Renamed to -textInputControllerDidRequestDismissal:.
928
929         * UIProcess/ios/forms/WKTimePickerViewController.h: Added.
930         * UIProcess/ios/forms/WKTimePickerViewController.mm: Added.
931         * WebKit.xcodeproj/project.pbxproj:
932
933 2018-02-11  Michael Catanzaro  <mcatanzaro@igalia.com>
934
935         [GTK] Unify builds for platform-specific files in WebKit layer
936         https://bugs.webkit.org/show_bug.cgi?id=182450
937
938         Reviewed by Carlos Garcia Campos.
939
940         Add most GTK-specific sources to unified build. API files are exempted, except for the DOM
941         API. Files shared with PluginProcessGTK2 are also exempted. Finally, files with name
942         conflicts in headers, which appears difficult to fix, are also exempted.
943
944         * CMakeLists.txt:
945         * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
946         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
947         * NetworkProcess/soup/NetworkProcessSoup.cpp:
948         * NetworkProcess/soup/NetworkSessionSoup.cpp:
949         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
950         * Platform/classifier/ResourceLoadStatisticsClassifier.cpp:
951         * PlatformGTK.cmake:
952         * PluginProcess/unix/PluginControllerProxyUnix.cpp:
953         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
954         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
955         * Shared/CoordinatedGraphics/SimpleViewportController.cpp:
956         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
957         * Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:
958         * Shared/Plugins/unix/PluginSearchPath.cpp:
959         * Shared/cairo/ShareableBitmapCairo.cpp:
960         * Shared/glib/WebContextMenuItemGlib.cpp:
961         * Shared/glib/WebErrorsGlib.cpp:
962         * Shared/gtk/ArgumentCodersGtk.cpp:
963         * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
964         * Shared/gtk/ProcessExecutablePathGtk.cpp:
965         * Shared/gtk/WebErrorsGtk.cpp:
966         * Shared/gtk/WebEventFactory.cpp:
967         * Shared/linux/WebMemorySamplerLinux.cpp:
968         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
969         * Shared/soup/WebErrorsSoup.cpp:
970         * SourcesGTK.txt: Added.
971         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
972         * UIProcess/Automation/cairo/WebAutomationSessionCairo.cpp:
973         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
974         * UIProcess/BackingStore.cpp:
975         * UIProcess/DrawingAreaProxyImpl.cpp:
976         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
977         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
978         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
979         * UIProcess/WebResourceLoadStatisticsStore.cpp:
980         * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
981         * UIProcess/WebStorage/StorageManager.cpp:
982         * UIProcess/cairo/BackingStoreCairo.cpp:
983         * UIProcess/gtk/AcceleratedBackingStore.cpp:
984         * UIProcess/gtk/DragAndDropHandler.cpp:
985         * UIProcess/gtk/GestureController.cpp:
986         * UIProcess/gtk/HardwareAccelerationManager.cpp:
987         * UIProcess/gtk/InputMethodFilter.cpp:
988         * UIProcess/gtk/TextCheckerGtk.cpp:
989         * UIProcess/gtk/WaylandCompositor.cpp:
990         * UIProcess/gtk/WebColorPickerGtk.cpp:
991         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
992         * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
993         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
994         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
995         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
996         (webkit_dom_attr_dom_event_target_init):
997         (webkit_dom_attr_set_property):
998         (webkit_dom_attr_get_property):
999         (webkit_dom_attr_class_init):
1000         (webkit_dom_event_target_init): Deleted.
1001         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
1002         (webkit_dom_cdata_section_dom_event_target_init):
1003         (webkit_dom_event_target_init): Deleted.
1004         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
1005         (webkit_dom_css_rule_set_property):
1006         (webkit_dom_css_rule_get_property):
1007         (webkit_dom_css_rule_class_init):
1008         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
1009         (webkit_dom_css_rule_list_get_property):
1010         (webkit_dom_css_rule_list_class_init):
1011         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
1012         (webkit_dom_css_style_declaration_set_property):
1013         (webkit_dom_css_style_declaration_get_property):
1014         (webkit_dom_css_style_declaration_class_init):
1015         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
1016         (webkit_dom_css_style_sheet_get_property):
1017         (webkit_dom_css_style_sheet_class_init):
1018         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
1019         (webkit_dom_css_value_set_property):
1020         (webkit_dom_css_value_get_property):
1021         (webkit_dom_css_value_class_init):
1022         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
1023         (webkit_dom_character_data_dom_event_target_init):
1024         (webkit_dom_character_data_set_property):
1025         (webkit_dom_character_data_get_property):
1026         (webkit_dom_character_data_class_init):
1027         (webkit_dom_event_target_init): Deleted.
1028         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
1029         (webkit_dom_client_rect_get_property):
1030         (webkit_dom_client_rect_class_init):
1031         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
1032         (webkit_dom_client_rect_list_get_property):
1033         (webkit_dom_client_rect_list_class_init):
1034         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
1035         (webkit_dom_comment_dom_event_target_init):
1036         (webkit_dom_event_target_init): Deleted.
1037         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
1038         (webkit_dom_dom_selection_get_property):
1039         (webkit_dom_dom_selection_class_init):
1040         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
1041         (webkit_dom_dom_token_list_set_property):
1042         (webkit_dom_dom_token_list_get_property):
1043         (webkit_dom_dom_token_list_class_init):
1044         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
1045         (webkit_dom_dom_window_dom_event_target_init):
1046         (webkit_dom_dom_window_set_property):
1047         (webkit_dom_dom_window_get_property):
1048         (webkit_dom_dom_window_class_init):
1049         (webkit_dom_event_target_init): Deleted.
1050         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
1051         (webkit_dom_document_dom_event_target_init):
1052         (webkit_dom_document_set_property):
1053         (webkit_dom_document_get_property):
1054         (webkit_dom_document_class_init):
1055         (webkit_dom_event_target_init): Deleted.
1056         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
1057         (webkit_dom_document_fragment_dom_event_target_init):
1058         (webkit_dom_document_fragment_get_property):
1059         (webkit_dom_document_fragment_class_init):
1060         (webkit_dom_event_target_init): Deleted.
1061         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
1062         (webkit_dom_document_type_dom_event_target_init):
1063         (webkit_dom_document_type_get_property):
1064         (webkit_dom_document_type_class_init):
1065         (webkit_dom_event_target_init): Deleted.
1066         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
1067         (webkit_dom_element_dom_event_target_init):
1068         (webkit_dom_element_set_property):
1069         (webkit_dom_element_get_property):
1070         (webkit_dom_element_class_init):
1071         (webkit_dom_event_target_init): Deleted.
1072         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
1073         (webkit_dom_event_set_property):
1074         (webkit_dom_event_get_property):
1075         (webkit_dom_event_class_init):
1076         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
1077         (webkit_dom_file_get_property):
1078         (webkit_dom_file_class_init):
1079         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
1080         (webkit_dom_file_list_get_property):
1081         (webkit_dom_file_list_class_init):
1082         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
1083         (webkit_dom_html_anchor_element_dom_event_target_init):
1084         (webkit_dom_html_anchor_element_set_property):
1085         (webkit_dom_html_anchor_element_get_property):
1086         (webkit_dom_html_anchor_element_class_init):
1087         (webkit_dom_event_target_init): Deleted.
1088         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
1089         (webkit_dom_html_applet_element_dom_event_target_init):
1090         (webkit_dom_html_applet_element_set_property):
1091         (webkit_dom_html_applet_element_get_property):
1092         (webkit_dom_html_applet_element_class_init):
1093         (webkit_dom_event_target_init): Deleted.
1094         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
1095         (webkit_dom_html_area_element_dom_event_target_init):
1096         (webkit_dom_html_area_element_set_property):
1097         (webkit_dom_html_area_element_get_property):
1098         (webkit_dom_html_area_element_class_init):
1099         (webkit_dom_event_target_init): Deleted.
1100         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
1101         (webkit_dom_html_br_element_dom_event_target_init):
1102         (webkit_dom_html_br_element_set_property):
1103         (webkit_dom_html_br_element_get_property):
1104         (webkit_dom_html_br_element_class_init):
1105         (webkit_dom_event_target_init): Deleted.
1106         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
1107         (webkit_dom_html_base_element_dom_event_target_init):
1108         (webkit_dom_html_base_element_set_property):
1109         (webkit_dom_html_base_element_get_property):
1110         (webkit_dom_html_base_element_class_init):
1111         (webkit_dom_event_target_init): Deleted.
1112         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
1113         (webkit_dom_html_body_element_dom_event_target_init):
1114         (webkit_dom_html_body_element_set_property):
1115         (webkit_dom_html_body_element_get_property):
1116         (webkit_dom_html_body_element_class_init):
1117         (webkit_dom_event_target_init): Deleted.
1118         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
1119         (webkit_dom_html_button_element_dom_event_target_init):
1120         (webkit_dom_html_button_element_set_property):
1121         (webkit_dom_html_button_element_get_property):
1122         (webkit_dom_html_button_element_class_init):
1123         (webkit_dom_event_target_init): Deleted.
1124         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
1125         (webkit_dom_html_canvas_element_dom_event_target_init):
1126         (webkit_dom_html_canvas_element_set_property):
1127         (webkit_dom_html_canvas_element_get_property):
1128         (webkit_dom_html_canvas_element_class_init):
1129         (webkit_dom_event_target_init): Deleted.
1130         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
1131         (webkit_dom_html_collection_get_property):
1132         (webkit_dom_html_collection_class_init):
1133         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
1134         (webkit_dom_html_d_list_element_dom_event_target_init):
1135         (webkit_dom_html_d_list_element_set_property):
1136         (webkit_dom_html_d_list_element_get_property):
1137         (webkit_dom_html_d_list_element_class_init):
1138         (webkit_dom_event_target_init): Deleted.
1139         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
1140         (webkit_dom_html_directory_element_dom_event_target_init):
1141         (webkit_dom_html_directory_element_set_property):
1142         (webkit_dom_html_directory_element_get_property):
1143         (webkit_dom_html_directory_element_class_init):
1144         (webkit_dom_event_target_init): Deleted.
1145         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
1146         (webkit_dom_html_div_element_dom_event_target_init):
1147         (webkit_dom_html_div_element_set_property):
1148         (webkit_dom_html_div_element_get_property):
1149         (webkit_dom_html_div_element_class_init):
1150         (webkit_dom_event_target_init): Deleted.
1151         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
1152         (webkit_dom_html_document_dom_event_target_init):
1153         (webkit_dom_html_document_set_property):
1154         (webkit_dom_html_document_get_property):
1155         (webkit_dom_html_document_class_init):
1156         (webkit_dom_event_target_init): Deleted.
1157         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
1158         (webkit_dom_html_element_dom_event_target_init):
1159         (webkit_dom_html_element_set_property):
1160         (webkit_dom_html_element_get_property):
1161         (webkit_dom_html_element_class_init):
1162         (webkit_dom_event_target_init): Deleted.
1163         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
1164         (webkit_dom_html_embed_element_dom_event_target_init):
1165         (webkit_dom_html_embed_element_set_property):
1166         (webkit_dom_html_embed_element_get_property):
1167         (webkit_dom_html_embed_element_class_init):
1168         (webkit_dom_event_target_init): Deleted.
1169         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
1170         (webkit_dom_html_field_set_element_dom_event_target_init):
1171         (webkit_dom_html_field_set_element_get_property):
1172         (webkit_dom_html_field_set_element_class_init):
1173         (webkit_dom_event_target_init): Deleted.
1174         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
1175         (webkit_dom_html_font_element_dom_event_target_init):
1176         (webkit_dom_html_font_element_set_property):
1177         (webkit_dom_html_font_element_get_property):
1178         (webkit_dom_html_font_element_class_init):
1179         (webkit_dom_event_target_init): Deleted.
1180         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
1181         (webkit_dom_html_form_element_dom_event_target_init):
1182         (webkit_dom_html_form_element_set_property):
1183         (webkit_dom_html_form_element_get_property):
1184         (webkit_dom_html_form_element_class_init):
1185         (webkit_dom_event_target_init): Deleted.
1186         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
1187         (webkit_dom_html_frame_element_dom_event_target_init):
1188         (webkit_dom_html_frame_element_set_property):
1189         (webkit_dom_html_frame_element_get_property):
1190         (webkit_dom_html_frame_element_class_init):
1191         (webkit_dom_event_target_init): Deleted.
1192         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
1193         (webkit_dom_html_frame_set_element_dom_event_target_init):
1194         (webkit_dom_html_frame_set_element_set_property):
1195         (webkit_dom_html_frame_set_element_get_property):
1196         (webkit_dom_html_frame_set_element_class_init):
1197         (webkit_dom_event_target_init): Deleted.
1198         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
1199         (webkit_dom_html_hr_element_dom_event_target_init):
1200         (webkit_dom_html_hr_element_set_property):
1201         (webkit_dom_html_hr_element_get_property):
1202         (webkit_dom_html_hr_element_class_init):
1203         (webkit_dom_event_target_init): Deleted.
1204         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
1205         (webkit_dom_html_head_element_dom_event_target_init):
1206         (webkit_dom_html_head_element_set_property):
1207         (webkit_dom_html_head_element_get_property):
1208         (webkit_dom_html_head_element_class_init):
1209         (webkit_dom_event_target_init): Deleted.
1210         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
1211         (webkit_dom_html_heading_element_dom_event_target_init):
1212         (webkit_dom_html_heading_element_set_property):
1213         (webkit_dom_html_heading_element_get_property):
1214         (webkit_dom_html_heading_element_class_init):
1215         (webkit_dom_event_target_init): Deleted.
1216         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
1217         (webkit_dom_html_html_element_dom_event_target_init):
1218         (webkit_dom_html_html_element_set_property):
1219         (webkit_dom_html_html_element_get_property):
1220         (webkit_dom_html_html_element_class_init):
1221         (webkit_dom_event_target_init): Deleted.
1222         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
1223         (webkit_dom_html_iframe_element_dom_event_target_init):
1224         (webkit_dom_html_iframe_element_set_property):
1225         (webkit_dom_html_iframe_element_get_property):
1226         (webkit_dom_html_iframe_element_class_init):
1227         (webkit_dom_event_target_init): Deleted.
1228         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
1229         (webkit_dom_html_image_element_dom_event_target_init):
1230         (webkit_dom_html_image_element_set_property):
1231         (webkit_dom_html_image_element_get_property):
1232         (webkit_dom_html_image_element_class_init):
1233         (webkit_dom_event_target_init): Deleted.
1234         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
1235         (webkit_dom_html_input_element_dom_event_target_init):
1236         (webkit_dom_html_input_element_set_property):
1237         (webkit_dom_html_input_element_get_property):
1238         (webkit_dom_html_input_element_class_init):
1239         (webkit_dom_event_target_init): Deleted.
1240         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
1241         (webkit_dom_html_li_element_dom_event_target_init):
1242         (webkit_dom_html_li_element_set_property):
1243         (webkit_dom_html_li_element_get_property):
1244         (webkit_dom_html_li_element_class_init):
1245         (webkit_dom_event_target_init): Deleted.
1246         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
1247         (webkit_dom_html_label_element_dom_event_target_init):
1248         (webkit_dom_html_label_element_set_property):
1249         (webkit_dom_html_label_element_get_property):
1250         (webkit_dom_html_label_element_class_init):
1251         (webkit_dom_event_target_init): Deleted.
1252         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
1253         (webkit_dom_html_legend_element_dom_event_target_init):
1254         (webkit_dom_html_legend_element_set_property):
1255         (webkit_dom_html_legend_element_get_property):
1256         (webkit_dom_html_legend_element_class_init):
1257         (webkit_dom_event_target_init): Deleted.
1258         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
1259         (webkit_dom_html_link_element_dom_event_target_init):
1260         (webkit_dom_html_link_element_set_property):
1261         (webkit_dom_html_link_element_get_property):
1262         (webkit_dom_html_link_element_class_init):
1263         (webkit_dom_event_target_init): Deleted.
1264         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
1265         (webkit_dom_html_map_element_dom_event_target_init):
1266         (webkit_dom_html_map_element_set_property):
1267         (webkit_dom_html_map_element_get_property):
1268         (webkit_dom_html_map_element_class_init):
1269         (webkit_dom_event_target_init): Deleted.
1270         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
1271         (webkit_dom_html_marquee_element_dom_event_target_init):
1272         (webkit_dom_event_target_init): Deleted.
1273         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
1274         (webkit_dom_html_menu_element_dom_event_target_init):
1275         (webkit_dom_html_menu_element_set_property):
1276         (webkit_dom_html_menu_element_get_property):
1277         (webkit_dom_html_menu_element_class_init):
1278         (webkit_dom_event_target_init): Deleted.
1279         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
1280         (webkit_dom_html_meta_element_dom_event_target_init):
1281         (webkit_dom_html_meta_element_set_property):
1282         (webkit_dom_html_meta_element_get_property):
1283         (webkit_dom_html_meta_element_class_init):
1284         (webkit_dom_event_target_init): Deleted.
1285         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
1286         (webkit_dom_html_mod_element_dom_event_target_init):
1287         (webkit_dom_html_mod_element_set_property):
1288         (webkit_dom_html_mod_element_get_property):
1289         (webkit_dom_html_mod_element_class_init):
1290         (webkit_dom_event_target_init): Deleted.
1291         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
1292         (webkit_dom_html_o_list_element_dom_event_target_init):
1293         (webkit_dom_html_o_list_element_set_property):
1294         (webkit_dom_html_o_list_element_get_property):
1295         (webkit_dom_html_o_list_element_class_init):
1296         (webkit_dom_event_target_init): Deleted.
1297         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
1298         (webkit_dom_html_object_element_dom_event_target_init):
1299         (webkit_dom_html_object_element_set_property):
1300         (webkit_dom_html_object_element_get_property):
1301         (webkit_dom_html_object_element_class_init):
1302         (webkit_dom_event_target_init): Deleted.
1303         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
1304         (webkit_dom_html_opt_group_element_dom_event_target_init):
1305         (webkit_dom_html_opt_group_element_set_property):
1306         (webkit_dom_html_opt_group_element_get_property):
1307         (webkit_dom_html_opt_group_element_class_init):
1308         (webkit_dom_event_target_init): Deleted.
1309         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
1310         (webkit_dom_html_option_element_dom_event_target_init):
1311         (webkit_dom_html_option_element_set_property):
1312         (webkit_dom_html_option_element_get_property):
1313         (webkit_dom_html_option_element_class_init):
1314         (webkit_dom_event_target_init): Deleted.
1315         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
1316         (webkit_dom_html_options_collection_set_property):
1317         (webkit_dom_html_options_collection_get_property):
1318         (webkit_dom_html_options_collection_class_init):
1319         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
1320         (webkit_dom_html_paragraph_element_dom_event_target_init):
1321         (webkit_dom_html_paragraph_element_set_property):
1322         (webkit_dom_html_paragraph_element_get_property):
1323         (webkit_dom_html_paragraph_element_class_init):
1324         (webkit_dom_event_target_init): Deleted.
1325         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
1326         (webkit_dom_html_param_element_dom_event_target_init):
1327         (webkit_dom_html_param_element_set_property):
1328         (webkit_dom_html_param_element_get_property):
1329         (webkit_dom_html_param_element_class_init):
1330         (webkit_dom_event_target_init): Deleted.
1331         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
1332         (webkit_dom_html_pre_element_dom_event_target_init):
1333         (webkit_dom_html_pre_element_set_property):
1334         (webkit_dom_html_pre_element_get_property):
1335         (webkit_dom_html_pre_element_class_init):
1336         (webkit_dom_event_target_init): Deleted.
1337         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
1338         (webkit_dom_html_quote_element_dom_event_target_init):
1339         (webkit_dom_html_quote_element_set_property):
1340         (webkit_dom_html_quote_element_get_property):
1341         (webkit_dom_html_quote_element_class_init):
1342         (webkit_dom_event_target_init): Deleted.
1343         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
1344         (webkit_dom_html_script_element_dom_event_target_init):
1345         (webkit_dom_html_script_element_set_property):
1346         (webkit_dom_html_script_element_get_property):
1347         (webkit_dom_html_script_element_class_init):
1348         (webkit_dom_event_target_init): Deleted.
1349         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
1350         (webkit_dom_html_select_element_dom_event_target_init):
1351         (webkit_dom_html_select_element_set_property):
1352         (webkit_dom_html_select_element_get_property):
1353         (webkit_dom_html_select_element_class_init):
1354         (webkit_dom_event_target_init): Deleted.
1355         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
1356         (webkit_dom_html_style_element_dom_event_target_init):
1357         (webkit_dom_html_style_element_set_property):
1358         (webkit_dom_html_style_element_get_property):
1359         (webkit_dom_html_style_element_class_init):
1360         (webkit_dom_event_target_init): Deleted.
1361         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
1362         (webkit_dom_html_table_caption_element_dom_event_target_init):
1363         (webkit_dom_html_table_caption_element_set_property):
1364         (webkit_dom_html_table_caption_element_get_property):
1365         (webkit_dom_html_table_caption_element_class_init):
1366         (webkit_dom_event_target_init): Deleted.
1367         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
1368         (webkit_dom_html_table_cell_element_dom_event_target_init):
1369         (webkit_dom_html_table_cell_element_set_property):
1370         (webkit_dom_html_table_cell_element_get_property):
1371         (webkit_dom_html_table_cell_element_class_init):
1372         (webkit_dom_event_target_init): Deleted.
1373         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
1374         (webkit_dom_html_table_col_element_dom_event_target_init):
1375         (webkit_dom_html_table_col_element_set_property):
1376         (webkit_dom_html_table_col_element_get_property):
1377         (webkit_dom_html_table_col_element_class_init):
1378         (webkit_dom_event_target_init): Deleted.
1379         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
1380         (webkit_dom_html_table_element_dom_event_target_init):
1381         (webkit_dom_html_table_element_set_property):
1382         (webkit_dom_html_table_element_get_property):
1383         (webkit_dom_html_table_element_class_init):
1384         (webkit_dom_event_target_init): Deleted.
1385         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
1386         (webkit_dom_html_table_row_element_dom_event_target_init):
1387         (webkit_dom_html_table_row_element_set_property):
1388         (webkit_dom_html_table_row_element_get_property):
1389         (webkit_dom_html_table_row_element_class_init):
1390         (webkit_dom_html_table_row_element_insert_cell):
1391         (webkit_dom_event_target_init): Deleted.
1392         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
1393         (webkit_dom_html_table_section_element_dom_event_target_init):
1394         (webkit_dom_html_table_section_element_set_property):
1395         (webkit_dom_html_table_section_element_get_property):
1396         (webkit_dom_html_table_section_element_class_init):
1397         (webkit_dom_event_target_init): Deleted.
1398         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
1399         (webkit_dom_html_text_area_element_dom_event_target_init):
1400         (webkit_dom_html_text_area_element_set_property):
1401         (webkit_dom_html_text_area_element_get_property):
1402         (webkit_dom_html_text_area_element_class_init):
1403         (webkit_dom_event_target_init): Deleted.
1404         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
1405         (webkit_dom_html_title_element_dom_event_target_init):
1406         (webkit_dom_html_title_element_set_property):
1407         (webkit_dom_html_title_element_get_property):
1408         (webkit_dom_html_title_element_class_init):
1409         (webkit_dom_event_target_init): Deleted.
1410         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
1411         (webkit_dom_html_u_list_element_dom_event_target_init):
1412         (webkit_dom_html_u_list_element_set_property):
1413         (webkit_dom_html_u_list_element_get_property):
1414         (webkit_dom_html_u_list_element_class_init):
1415         (webkit_dom_event_target_init): Deleted.
1416         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
1417         (webkit_dom_keyboard_event_get_property):
1418         (webkit_dom_keyboard_event_class_init):
1419         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
1420         (webkit_dom_media_list_set_property):
1421         (webkit_dom_media_list_get_property):
1422         (webkit_dom_media_list_class_init):
1423         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
1424         (webkit_dom_mouse_event_get_property):
1425         (webkit_dom_mouse_event_class_init):
1426         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
1427         (webkit_dom_named_node_map_get_property):
1428         (webkit_dom_named_node_map_class_init):
1429         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
1430         (webkit_dom_node_dom_event_target_init):
1431         (webkit_dom_node_set_property):
1432         (webkit_dom_node_get_property):
1433         (webkit_dom_node_class_init):
1434         (webkit_dom_event_target_init): Deleted.
1435         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
1436         (webkit_dom_node_iterator_get_property):
1437         (webkit_dom_node_iterator_class_init):
1438         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
1439         (webkit_dom_node_list_get_property):
1440         (webkit_dom_node_list_class_init):
1441         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.cpp:
1442         (webkitDOMObjectSetProperty):
1443         (webkit_dom_object_class_init):
1444         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
1445         (webkit_dom_processing_instruction_dom_event_target_init):
1446         (webkit_dom_processing_instruction_get_property):
1447         (webkit_dom_processing_instruction_class_init):
1448         (webkit_dom_event_target_init): Deleted.
1449         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
1450         (webkit_dom_range_get_property):
1451         (webkit_dom_range_class_init):
1452         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
1453         (webkit_dom_style_sheet_set_property):
1454         (webkit_dom_style_sheet_get_property):
1455         (webkit_dom_style_sheet_class_init):
1456         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
1457         (webkit_dom_style_sheet_list_get_property):
1458         (webkit_dom_style_sheet_list_class_init):
1459         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
1460         (webkit_dom_text_dom_event_target_init):
1461         (webkit_dom_text_get_property):
1462         (webkit_dom_text_class_init):
1463         (webkit_dom_event_target_init): Deleted.
1464         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
1465         (webkit_dom_tree_walker_get_property):
1466         (webkit_dom_tree_walker_class_init):
1467         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
1468         (webkit_dom_ui_event_get_property):
1469         (webkit_dom_ui_event_class_init):
1470         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
1471         (webkit_dom_wheel_event_get_property):
1472         (webkit_dom_wheel_event_class_init):
1473         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
1474         (webkit_dom_xpath_result_get_property):
1475         (webkit_dom_xpath_result_class_init):
1476         * WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp:
1477         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
1478         * WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp:
1479         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1480         * WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp:
1481         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
1482         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
1483         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1484         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
1485         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1486         * WebProcess/WebPage/AcceleratedSurface.cpp:
1487         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
1488         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1489         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
1490         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1491         * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp:
1492         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
1493         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1494         * WebProcess/gtk/WaylandCompositorDisplay.cpp:
1495         * WebProcess/gtk/WebProcessMainGtk.cpp:
1496
1497 2018-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1498
1499         WebDriver: addCookie command should prepend a dot to domain if missing
1500         https://bugs.webkit.org/show_bug.cgi?id=182328
1501         <rdar://problem/37116398>
1502
1503         Reviewed by Michael Catanzaro.
1504
1505         RFC 2965: If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.
1506
1507         Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie
1508
1509         * UIProcess/Automation/WebAutomationSession.cpp:
1510         (WebKit::WebAutomationSession::addSingleCookie):
1511
1512 2018-02-11  Yousuke Kimoto  <yousuke.kimoto@sony.com>
1513
1514         [WinCairo] Add WKBaseWin.h
1515         https://bugs.webkit.org/show_bug.cgi?id=182681
1516
1517         Reviewed by Yusuke Suzuki.
1518
1519         * PlatformWin.cmake:
1520         * Shared/API/c/win/WKBaseWin.h: Added.
1521
1522 2018-02-09  Ross Kirsling  <ross.kirsling@sony.com>
1523
1524         Remove invalidated WebPage::handleEditingKeyboardEvent default implementation after r228260.
1525         https://bugs.webkit.org/show_bug.cgi?id=182663
1526
1527         Reviewed by Chris Dumez.
1528
1529         This would need to be updated to turn `keyEvent` into `underlyingPlatformEvent`;
1530         instead, we can remove it, as it's only for Windows, which doesn't yet support WK2.
1531
1532         * WebProcess/WebPage/WebPage.cpp:
1533         (WebKit::WebPage::handleEditingKeyboardEvent): Deleted.
1534
1535 2018-02-09  Nan Wang  <n_wang@apple.com>
1536
1537         AX: Accessibility is not notified when a web process cancels the suspension
1538         https://bugs.webkit.org/show_bug.cgi?id=182659
1539
1540         Reviewed by Ryosuke Niwa.
1541
1542         We were notifying Accessibility with the web process suspended information in actualPrepareToSuspend
1543         and processDidResume. However, the suspension can be canceled during the prepare call. So that we
1544         should also post a notification in cancelPrepareToSuspend.
1545
1546         * WebProcess/WebProcess.cpp:
1547         (WebKit::WebProcess::cancelPrepareToSuspend):
1548
1549 2018-02-09  Brent Fulgham  <bfulgham@apple.com>
1550
1551         Sandbox violating attempting to read log formatting preference file
1552         https://bugs.webkit.org/show_bug.cgi?id=182648
1553         <rdar://problem/36629495>
1554
1555         Reviewed by Eric Carlson.
1556
1557         Various frameworks attempt to read logging format information from /usr/local/lib/log. The sandbox is blocking
1558         this, generating log spam and preventing some logging features from working properly. We should allow read
1559         access to this path.
1560
1561         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1562         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1563         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1564         * WebProcess/com.apple.WebProcess.sb.in:
1565
1566 2018-02-08  Chris Dumez  <cdumez@apple.com>
1567
1568         There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld
1569         https://bugs.webkit.org/show_bug.cgi?id=182524
1570         <rdar://problem/9057327>
1571
1572         Reviewed by Ryosuke Niwa.
1573
1574         Add C API on WKBundleScriptWorld and Cocoa API on WKWebProcessPlugInScriptWorld to
1575         disable the [OverrideBuiltins] behavior on a given script world.
1576
1577         The [OverrideBuiltins] behavior [1] is legacy behavior that is needed for Web compatibility
1578         but allowing the client to disable this behavior in a given world makes development easier
1579         and running injected script on uncontrolled content a lot more reliable.
1580
1581         [1] https://heycam.github.io/webidl/#OverrideBuiltins
1582
1583         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
1584         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
1585         (-[WKWebProcessPlugInScriptWorld disableOverrideBuiltinsBehavior]):
1586         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
1587         (WKBundleScriptWorldDisableOverrideBuiltinsBehavior):
1588         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
1589         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
1590         (WebKit::InjectedBundleScriptWorld::disableOverrideBuiltinsBehavior):
1591         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
1592
1593 2018-02-08  Ross Kirsling  <ross.kirsling@sony.com>
1594
1595         Remove WebProcessPool::platformInitialize stub.
1596         https://bugs.webkit.org/show_bug.cgi?id=182621
1597
1598         Reviewed by Alex Christensen.
1599
1600         The #if here could be simplified to PLATFORM(WIN), but Windows too will need a proper implementation
1601         as part of WK2 support, so this stub shouldn't need to exist at all.
1602
1603         * UIProcess/WebProcessPool.cpp:
1604         (WebKit::WebProcessPool::platformInitialize): Deleted.
1605
1606 2018-02-08  Michael Catanzaro  <mcatanzaro@igalia.com>
1607
1608         TestController should not exercise cocoa-specific resource load statistics APIs
1609         https://bugs.webkit.org/show_bug.cgi?id=182355
1610
1611         Reviewed by Alex Christensen.
1612
1613         Remove the Cocoa testing SPI, since it's redundant with the C API. Also, add a couple
1614         missing cookie partitioning callbacks to the C API.
1615
1616         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1617         (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
1618         (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
1619         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
1620         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1621         (-[WKWebsiteDataStore _resourceLoadStatisticsSetLastSeen:forHost:]): Deleted.
1622         (-[WKWebsiteDataStore _resourceLoadStatisticsSetIsPrevalentResource:forHost:]): Deleted.
1623         (-[WKWebsiteDataStore _resourceLoadStatisticsIsPrevalentResource:completionHandler:]): Deleted.
1624         (-[WKWebsiteDataStore _resourceLoadStatisticsIsRegisteredAsSubFrameUnder:topFrameHost:completionHandler:]): Deleted.
1625         (-[WKWebsiteDataStore _resourceLoadStatisticsIsRegisteredAsRedirectingTo:hostRedirectedTo:completionHandler:]): Deleted.
1626         (-[WKWebsiteDataStore _resourceLoadStatisticsSetHadUserInteraction:forHost:]): Deleted.
1627         (-[WKWebsiteDataStore _resourceLoadStatisticsSetHasHadNonRecentUserInteractionForHost:]): Deleted.
1628         (-[WKWebsiteDataStore _resourceLoadStatisticsHadUserInteraction:completionHandler:]): Deleted.
1629         (-[WKWebsiteDataStore _resourceLoadStatisticsSetIsGrandfathered:forHost:]): Deleted.
1630         (-[WKWebsiteDataStore _resourceLoadStatisticsIsGrandfathered:completionHandler:]): Deleted.
1631         (-[WKWebsiteDataStore _resourceLoadStatisticsSetSubframeUnderTopFrameOrigin:forHost:]): Deleted.
1632         (-[WKWebsiteDataStore _resourceLoadStatisticsSetSubresourceUnderTopFrameOrigin:forHost:]): Deleted.
1633         (-[WKWebsiteDataStore _resourceLoadStatisticsSetSubresourceUniqueRedirectTo:forHost:]): Deleted.
1634         (-[WKWebsiteDataStore _resourceLoadStatisticsSetTimeToLiveUserInteraction:]): Deleted.
1635         (-[WKWebsiteDataStore _resourceLoadStatisticsSetTimeToLiveCookiePartitionFree:]): Deleted.
1636         (-[WKWebsiteDataStore _resourceLoadStatisticsSetMinimumTimeBetweenDataRecordsRemoval:]): Deleted.
1637         (-[WKWebsiteDataStore _resourceLoadStatisticsSetGrandfatheringTime:]): Deleted.
1638         (-[WKWebsiteDataStore _resourceLoadStatisticsSetMaxStatisticsEntries:]): Deleted.
1639         (-[WKWebsiteDataStore _resourceLoadStatisticsSetPruneEntriesDownTo:]): Deleted.
1640         (-[WKWebsiteDataStore _resourceLoadStatisticsProcessStatisticsAndDataRecords]): Deleted.
1641         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning]): Deleted.
1642         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning:]): Deleted.
1643         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]): Deleted.
1644         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:completionHandler:]): Deleted.
1645         (-[WKWebsiteDataStore _resourceLoadStatisticsSubmitTelemetry]): Deleted.
1646         (-[WKWebsiteDataStore _resourceLoadStatisticsSetNotifyPagesWhenDataRecordsWereScanned:]): Deleted.
1647         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldClassifyResourcesBeforeDataRecordsRemoval:]): Deleted.
1648         (-[WKWebsiteDataStore _resourceLoadStatisticsSetNotifyPagesWhenTelemetryWasCaptured:]): Deleted.
1649         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore]): Deleted.
1650         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore:]): Deleted.
1651         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]): Deleted.
1652         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:completionHandler:]): Deleted.
1653         (-[WKWebsiteDataStore _resourceLoadStatisticsResetToConsistentState]): Deleted.
1654         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
1655
1656 2018-02-08  Don Olmstead  <don.olmstead@sony.com>
1657
1658         Remove JavaScriptCore/ForwardingHeaders directory
1659         https://bugs.webkit.org/show_bug.cgi?id=182594
1660
1661         Reviewed by Mark Lam.
1662
1663         * PlatformGTK.cmake:
1664
1665 2018-02-08  Tim Horton  <timothy_horton@apple.com>
1666
1667         Make WebKit public headers modules-safe
1668         https://bugs.webkit.org/show_bug.cgi?id=182611
1669         <rdar://problem/37160164>
1670
1671         Reviewed by Dan Bernstein.
1672
1673         * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
1674         * UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
1675         Import headers without which these WebKit headers can not be used alone.
1676
1677         * WebKit.xcodeproj/project.pbxproj:
1678         Make WKWindowFeaturesPrivate a private header like it was supposed to be.
1679
1680 2018-02-08  Matt Lewis  <jlewis3@apple.com>
1681
1682         Unreviewed, rolling out r228262.
1683
1684         This broke an internal build alongside r228261.
1685
1686         Reverted changeset:
1687
1688         "WebDriver: addCookie command should prepend a dot to domain
1689         if missing"
1690         https://bugs.webkit.org/show_bug.cgi?id=182328
1691         https://trac.webkit.org/changeset/228262
1692
1693 2018-02-08  Miguel Gomez  <magomez@igalia.com>
1694
1695         [GTK] WaylandCompositor misusing eglGetProcAddress
1696         https://bugs.webkit.org/show_bug.cgi?id=182490
1697
1698         Reviewed by Michael Catanzaro.
1699
1700         Check that the appropriate extensions are available before calling eglGetProcAddress, as even
1701         getting a non null value from it, the functionality can be disabled at runtime.
1702
1703         * UIProcess/gtk/WaylandCompositor.cpp:
1704         (WebKit::WaylandCompositor::initializeEGL):
1705
1706 2018-02-08  Frederic Wang  <fwang@igalia.com>
1707
1708         Add scrolling node types to distinguish main frames and subframes.
1709         https://bugs.webkit.org/show_bug.cgi?id=182533
1710
1711         Reviewed by Simon Fraser.
1712
1713         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: Replace the case of
1714         FrameScrollingNode with MainFrameScrollingNode and SubframeScrollingNode.
1715         (WebKit::encodeNodeAndDescendants):
1716         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
1717         (WebKit::dump):
1718         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: Ditto.
1719         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1720         * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: Ditto and pass the node type to the
1721         constructor of the frame scrolling node.
1722         (WebKit::RemoteScrollingTree::createScrollingTreeNode):
1723         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: Replace the case of
1724         FrameScrollingNode with MainFrameScrollingNode and SubframeScrollingNode.
1725         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1726         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: In order to
1727         determine whether the node is a main frame or subframe, use the node type instead of checking
1728         whether the node as a parent.
1729         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll):
1730
1731 2018-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1732
1733         WebDriver: addCookie command should prepend a dot to domain if missing
1734         https://bugs.webkit.org/show_bug.cgi?id=182328
1735         <rdar://problem/37116398>
1736
1737         Reviewed by Michael Catanzaro.
1738
1739         RFC 2965: If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.
1740
1741         Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie
1742
1743         * UIProcess/Automation/WebAutomationSession.cpp:
1744         (WebKit::WebAutomationSession::addSingleCookie):
1745
1746 2018-01-13  Darin Adler  <darin@apple.com>
1747
1748         Event improvements
1749         https://bugs.webkit.org/show_bug.cgi?id=179591
1750
1751         Reviewed by Chris Dumez.
1752
1753         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
1754         (webkit_dom_wheel_event_init_wheel_event): Updated to call initWebKitWheelEvent.
1755
1756         * WebProcess/Plugins/PluginView.cpp: Removed include of ScriptValue.h.
1757
1758         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1759         (WebKit::WebEditorClient::executePendingEditorCommands):
1760         Updated for name change from keyEvent to underlyingPlatformEvent.
1761         (WebKit::WebEditorClient::handleInputMethodKeydown): Ditto.
1762         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
1763         (WebKit::WebEditorClient::handleKeyboardEvent): Ditto.
1764         (WebKit::WebEditorClient::handleInputMethodKeydown): Ditto.
1765
1766         * WebProcess/WebPage/WebPage.cpp: Removed include of ScriptValue.h.
1767
1768         * WebProcess/WebPage/ios/WebPageIOS.mm:
1769         (WebKit::WebPage::handleEditingKeyboardEvent): Updated for name change from
1770         keyEvent to underlyingPlatformEvent.
1771         * WebProcess/WebPage/mac/WebPageMac.mm:
1772         (WebKit::WebPage::executeKeypressCommandsInternal): Ditto.
1773         (WebKit::WebPage::handleEditingKeyboardEvent): Ditto.
1774
1775 2018-02-07  Antti Koivisto  <antti@apple.com> and Youenn Fablet  <youenn@apple.com>
1776
1777         REGRESSION(r227758): Webpage fails to load due to crash in com.apple.WebKit: WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse + 267
1778         https://bugs.webkit.org/show_bug.cgi?id=182532
1779         <rdar://problem/36414017>
1780
1781         Reviewed by Chris Dumez.
1782
1783         No test case, don't know how to make one. The repro involves multipart HTTP streaming and details are hazy.
1784         We were calling a function that was WTFMoved away just a few lines above.
1785
1786         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1787         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1788
1789 2018-02-07  Tim Horton  <timothy_horton@apple.com>
1790
1791         Evernote device management web view sometimes displays at the wrong scale
1792         https://bugs.webkit.org/show_bug.cgi?id=182590
1793         <rdar://problem/36633687>
1794
1795         Reviewed by Simon Fraser.
1796
1797         Evernote implements the WKWebView's scroll view's delegate method
1798         viewForZoomingInScrollView: and returns nil. This results in
1799         WKScrollView's zoomScale always returning 1, no matter what the
1800         WKContentView's actual scale is. This will result in us never updating
1801         the WKContentView's scale to 1. When loading a page that has a few
1802         scale changes during load but ends up at scale 1, we get stuck at whatever
1803         intermediate scale immediately preceded settling on 1.
1804
1805         Fix this by not forwarding viewForZoomingInScrollView: to the external
1806         WKScrollView delegate; we are in charge of the contents of the scroll
1807         view (including which view scrollView's zoomScale should track), and
1808         overriding viewForZoomingInScrollView: is only ever going to lead to
1809         a broken WebKit.
1810
1811         * UIProcess/ios/WKScrollView.mm:
1812         (shouldForwardScrollViewDelegateMethodToExternalDelegate):
1813         (-[WKScrollViewDelegateForwarder forwardInvocation:]):
1814         (-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):
1815
1816 2018-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
1817
1818         [Extra zoom mode] Delegate scrolling from the content view to input view controllers
1819         https://bugs.webkit.org/show_bug.cgi?id=182534
1820         <rdar://problem/37276625>
1821
1822         Reviewed by Tim Horton.
1823
1824         Override -_wheelChangedWithEvent: on the content view, and give extra zoomed input view controllers a chance to
1825         handle the event.
1826
1827         * Platform/spi/ios/UIKitSPI.h:
1828         * UIProcess/ios/WKContentViewInteraction.mm:
1829         (-[WKContentView _wheelChangedWithEvent:]):
1830
1831 2018-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
1832
1833         [Extra zoom mode] Implement multiple and single select menus
1834         https://bugs.webkit.org/show_bug.cgi?id=182525
1835         <rdar://problem/35143016>
1836
1837         Reviewed by Tim Horton.
1838
1839         Add support for presenting picker views when focusing single or multiple select elements. See changes below for
1840         additional detail.
1841
1842         * UIProcess/ios/WKContentViewInteraction.h:
1843         * UIProcess/ios/WKContentViewInteraction.mm:
1844         (-[WKContentView _startAssistingKeyboard]):
1845
1846         Move logic for presenting view controllers when focusing elements out of _startAssistingKeyboard, and into
1847         _startAssistingNode:(...). This is because _startAssistingKeyboard is only invoked for certain types of focused
1848         element types; importantly, this set excludes select elements. Putting the call to present the focused view
1849         controller there also didn't make much since, considering that these new view controllers are not tied to
1850         keyboards in any way.
1851
1852         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
1853         (-[WKContentView _stopAssistingNode]):
1854
1855         Dismiss any select menu that is being presented.
1856
1857         (-[WKContentView presentSelectMenuViewController:]):
1858         (-[WKContentView dismissSelectMenuViewController:]):
1859
1860         Introduce idempotent helpers for presenting and dismissing the select menu view controller.
1861
1862         (-[WKContentView presentViewControllerForAssistedNode:]):
1863         (-[WKContentView selectMenu:didSelectItemAtIndex:]):
1864
1865         For single select menus. Called when the user selects a row.
1866
1867         (-[WKContentView didCancelSelectionInSelectMenu:]):
1868         (-[WKContentView numberOfItemsInSelectMenu:]):
1869         (-[WKContentView selectMenu:displayTextForItemAtIndex:]):
1870
1871         Indicates the text value to show at a given index.
1872
1873         (-[WKContentView selectMenu:didCheckItemAtIndex:checked:]):
1874
1875         For multiple select menus, invoked when an item is checked. The `checked` parameter indicates whether or not the
1876         item is now checked.
1877
1878         (-[WKContentView selectMenuSupportsMultipleSelection:]):
1879
1880         Indicates whether this select menu is single-item-only, or allows multiple items to be selected (checked).
1881
1882         (-[WKContentView selectMenu:hasCheckedOptionAtIndex:]):
1883
1884         For multiple select menus. Determines whether an option at the given index is checked.
1885
1886         (-[WKContentView startingIndexForSelectMenu:]):
1887
1888         Determines the index to instantly scroll to when presenting the select menu.
1889
1890         * UIProcess/ios/forms/WKSelectMenuViewController.h: Added.
1891         * UIProcess/ios/forms/WKSelectMenuViewController.mm: Added.
1892
1893         Add new harness files for WKSelectMenuViewController's header and implementation (see WebKitAdditions).
1894
1895         * WebKit.xcodeproj/project.pbxproj:
1896
1897 2018-02-07  Brent Fulgham  <bfulgham@apple.com>
1898
1899         Improve NetworkResourceLoader logging to capture redirect cases
1900         https://bugs.webkit.org/show_bug.cgi?id=182573
1901         <rdar://problem/37316714>
1902
1903         Reviewed by Chris Dumez.
1904
1905         Add logging for cookie partitioning or blocking during redirects.
1906
1907         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1908         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
1909
1910 2018-02-07  John Wilander  <wilander@apple.com>
1911
1912         Restrict Referer to just the origin for third parties in private mode and third parties ITP blocks cookies for in regular mode
1913         https://bugs.webkit.org/show_bug.cgi?id=182559
1914         <rdar://problem/36990337>
1915
1916         Reviewed by Andy Estes.
1917
1918         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1919         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1920         (WebKit::NetworkDataTaskCocoa::isThirdPartyRequest):
1921             New convenience function. Checks whether the resource shares
1922             partition with the first party.
1923         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
1924             Now strips the referrer to just the origin for:
1925             1. All third party requests in private mode.
1926             2. Third party requests to domains that ITP blocks cookies for.
1927         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
1928             Now strips the referrer in redirects to just the origin for:
1929             1. All third party requests in private mode.
1930             2. Third party requests to domains that ITP blocks cookies for.
1931
1932 2018-02-07  Daniel Bates  <dabates@apple.com>
1933
1934         Log error when authentication challenge is blocked due to an insecure request
1935         https://bugs.webkit.org/show_bug.cgi?id=182358
1936
1937         Reviewed by Andy Estes.
1938
1939         Have network process notify the web process when it blocks an authentication challenge.
1940
1941         * NetworkProcess/NetworkLoad.cpp:
1942         (WebKit::NetworkLoad::completeAuthenticationChallenge):
1943         * NetworkProcess/NetworkLoadClient.h:
1944         (WebKit::NetworkLoadClient::didBlockAuthenticationChallenge):
1945         * NetworkProcess/NetworkResourceLoader.cpp:
1946         (WebKit::NetworkResourceLoader::didBlockAuthenticationChallenge):
1947         * NetworkProcess/NetworkResourceLoader.h:
1948         * WebProcess/Network/WebResourceLoader.cpp:
1949         (WebKit::WebResourceLoader::didBlockAuthenticationChallenge):
1950         * WebProcess/Network/WebResourceLoader.h:
1951         * WebProcess/Network/WebResourceLoader.messages.in:
1952
1953 2018-02-07  Chris Dumez  <cdumez@apple.com>
1954
1955         IndexedDB in service workers is using a memory backed store
1956         https://bugs.webkit.org/show_bug.cgi?id=182574
1957         <rdar://problem/37316205>
1958
1959         Reviewed by Youenn Fablet.
1960
1961         Make sure we pass a proper WebDatabaseProvider to the ServiceWorkerProcess via
1962         PageConfiguration. Otherwise, we end up using the default EmptyDatabaseProvider
1963         which uses an InProcessIDBServer and a memory-backed store for IndexedDB.
1964
1965         * UIProcess/ServiceWorkerProcessProxy.cpp:
1966         (WebKit::ServiceWorkerProcessProxy::start):
1967         * UIProcess/WebProcessPool.h:
1968         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1969         (WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
1970         (WebKit::WebSWContextManagerConnection::installServiceWorker):
1971         * WebProcess/Storage/WebSWContextManagerConnection.h:
1972         * WebProcess/WebProcess.cpp:
1973         (WebKit::WebProcess::establishWorkerContextConnectionToStorageProcess):
1974         * WebProcess/WebProcess.h:
1975         * WebProcess/WebProcess.messages.in:
1976
1977 2018-02-07  Michael Catanzaro  <mcatanzaro@igalia.com>
1978
1979         [GTK] Typo in a translatable string
1980         https://bugs.webkit.org/show_bug.cgi?id=182570
1981
1982         Unreviewed. Fix a typo.
1983
1984         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
1985         (webkit_website_data_manager_class_init):
1986
1987 2018-02-06  Don Olmstead  <don.olmstead@sony.com>
1988
1989         Remove WebCore/ForwardingHeaders directory
1990         https://bugs.webkit.org/show_bug.cgi?id=182347
1991
1992         Reviewed by Keith Miller.
1993
1994         * Platform/mac/StringUtilities.mm:
1995         * Shared/Cocoa/WebKit2InitializeCocoa.mm:
1996         * Shared/WebKit2Initialize.cpp:
1997         * Shared/linux/WebMemorySamplerLinux.cpp:
1998         * Shared/mac/WebMemorySampler.mac.mm:
1999         * UIProcess/WebProcessPool.cpp:
2000         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
2001         * WebProcess/InjectedBundle/API/glib/WebKitConsoleMessagePrivate.h:
2002         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
2003         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2004         * WebProcess/Plugins/PluginProcessConnection.cpp:
2005         * WebProcess/Plugins/PluginView.cpp:
2006         * WebProcess/WebPage/WebInspector.h:
2007         * WebProcess/WebPage/WebPage.cpp:
2008         * WebProcess/cocoa/WebProcessCocoa.mm:
2009
2010 2018-02-06  Chris Dumez  <cdumez@apple.com>
2011
2012         Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https.html is a flaky failure on macOS and iOS
2013         https://bugs.webkit.org/show_bug.cgi?id=181392
2014         <rdar://problem/36384136>
2015
2016         Reviewed by Youenn Fablet.
2017
2018         All tasks from the StorageProcess to the WebContent process to update registrations
2019         and service workers state are posted to the runloop. However, the fetch callbacks
2020         do not do so. This means that fetch results might come in out of order with regards
2021         to the registration / service worker state updates. The test was flaky because an
2022         intercepted load would sometimes finish before the task to update the service worker
2023         state to "activated" was processed by the runloop. We address the issue by having
2024         the ServiceWorkerClientFetch callbacks schedule tasks to the runloop too.
2025
2026         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
2027         (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
2028         (WebKit::ServiceWorkerClientFetch::didReceiveData):
2029         (WebKit::ServiceWorkerClientFetch::didFinish):
2030         (WebKit::ServiceWorkerClientFetch::didFail):
2031         (WebKit::ServiceWorkerClientFetch::didNotHandle):
2032
2033 2018-02-06  Brent Fulgham  <bfulgham@apple.com>
2034
2035         [macOS] Correct sandbox violation triggered by Chase.com
2036         https://bugs.webkit.org/show_bug.cgi?id=182519
2037         <rdar://problem/37121757>
2038
2039         Reviewed by Eric Carlson.
2040
2041         Hitting a sandbox violation when attempting to check status of IOAV*En/Decode support.
2042
2043         * WebProcess/com.apple.WebProcess.sb.in:
2044
2045 2018-02-06  Jeff Miller  <jeffm@apple.com>
2046
2047         Add WKNavigationDelegate SPI to tell the client when an insecure plug-in is blocked
2048         https://bugs.webkit.org/show_bug.cgi?id=182540
2049
2050         Reviewed by Alex Christensen.
2051
2052         * UIProcess/API/APILoaderClient.h:
2053         (API::LoaderClient::didBlockInsecurePluginVersion):
2054         Changed to take a dictionary reference.
2055
2056         * UIProcess/API/APINavigationClient.h:
2057         (API::NavigationClient::didBlockInsecurePluginVersion):
2058         Added.
2059
2060         * UIProcess/API/C/WKPage.cpp:
2061         (WKPageSetPageLoaderClient):
2062         Changed didBlockInsecurePluginVersion() to take a dictionary reference.
2063
2064         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2065         Added -_webView:didBlockInsecurePluginVersionWithInfo:.
2066
2067         * UIProcess/Cocoa/NavigationState.h:
2068         * UIProcess/Cocoa/NavigationState.mm:
2069         (WebKit::NavigationState::setNavigationDelegate):
2070         Initialize webViewDidBlockInsecurePluginVersionWithInfo.
2071
2072         (WebKit::NavigationState::NavigationClient::didBlockInsecurePluginVersion):
2073         Added.
2074
2075         * UIProcess/WebPageProxy.cpp:
2076         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
2077         Remove check for PLATFORM(COCOA) (we don't check for this in didFailToInitializePlugin() where we
2078         also use createPluginInformationDictionary()) and ENABLE(NETSCAPE_PLUGIN_API) (we're already inside
2079         an #if ENABLE(NETSCAPE_PLUGIN_API block) and use auto for pluginInformation. Attempt to use the
2080         navigation client before the loader client.
2081
2082 2018-02-06  Youenn Fablet  <youenn@apple.com>
2083
2084         HasServiceWorkerRegistration bit should be sent when creating a new page
2085         https://bugs.webkit.org/show_bug.cgi?id=182410
2086
2087         Reviewed by Chris Dumez.
2088
2089         Move the bit computation at page creation time.
2090         This allows computing the bit based on the web site data store and not only on the pool configuration.
2091         WebPage uses that bit to activate service worker registration matching for the whole process.
2092
2093         In case there is a service worker process proxy created, the bit is set to true by default.
2094
2095         Bit is computed by checking for database file presence.
2096         This information is cached in a map for efficiency reasons and cleared when a service worker process proxy is created.
2097
2098         * Shared/WebPageCreationParameters.cpp:
2099         (WebKit::WebPageCreationParameters::encode const):
2100         (WebKit::WebPageCreationParameters::decode):
2101         * Shared/WebPageCreationParameters.h:
2102         * Shared/WebProcessCreationParameters.cpp:
2103         (WebKit::WebProcessCreationParameters::encode const):
2104         (WebKit::WebProcessCreationParameters::decode):
2105         * Shared/WebProcessCreationParameters.h:
2106         * UIProcess/WebPageProxy.cpp:
2107         (WebKit::WebPageProxy::initializeWebPage):
2108         * UIProcess/WebProcessPool.cpp:
2109         (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
2110         (WebKit::WebProcessPool::initializeNewWebProcess):
2111         (WebKit::WebProcessPool::mayHaveRegisteredServiceWorkers):
2112         * WebProcess/WebPage/WebPage.cpp:
2113         (WebKit::m_cpuLimit):
2114         * WebProcess/WebProcess.cpp:
2115         (WebKit::WebProcess::initializeWebProcess):
2116
2117 2018-02-06  Michael Catanzaro  <mcatanzaro@igalia.com>
2118
2119         Unreviewed, fix format specifiers added in r228116
2120         https://bugs.webkit.org/show_bug.cgi?id=182456
2121         <rdar://problem/37181006>
2122
2123         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
2124         (WebKit::CacheStorageEngineConnection::open):
2125         (WebKit::CacheStorageEngineConnection::remove):
2126         (WebKit::CacheStorageEngineConnection::caches):
2127         (WebKit::CacheStorageEngineConnection::retrieveRecords):
2128         (WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
2129         (WebKit::CacheStorageEngineConnection::putRecords):
2130         (WebKit::CacheStorageEngineConnection::reference):
2131         (WebKit::CacheStorageEngineConnection::dereference):
2132
2133 2018-02-05  Chris Dumez  <cdumez@apple.com>
2134
2135         Avoid unnecessarily constructing RunLoops for GC AutomaticThreads in Connection::sendMessage() after r228001
2136         https://bugs.webkit.org/show_bug.cgi?id=182494
2137         <rdar://problem/37147632>
2138
2139         Reviewed by Ryosuke Niwa.
2140
2141         Somebody fixed a GC crash in r228001 by allowing RunLoop::current() to be called from a
2142         GC thread. However, this is still unnecessarily inefficient. Calling RunLoop::current()
2143         will construct RunLoops for background GC threads (WTF::AutomaticThreads). This patches
2144         updates the IPC code to call isMainThread() instead of RunLoop::isMain() in
2145         Connection::sendMessage(). This should mean the same thing since this code runs in
2146         WebKit2 and should be more efficient as it ends up simply calling pthread_main_np(),
2147         without constructing a RunLoop.
2148
2149         * Platform/IPC/Connection.cpp:
2150         (IPC::Connection::sendMessage):
2151
2152 2018-02-05  Ryosuke Niwa  <rniwa@webkit.org>
2153
2154         Release assertion in inlineVideoFrame
2155         https://bugs.webkit.org/show_bug.cgi?id=182513
2156         <rdar://problem/37159363>
2157
2158         Reviewed by Zalan Bujtas.
2159
2160         Fixed the bug. Don't try to update the layout when there is no live render tree or active DOM objects
2161         had been stopped: i.e. during a document destruction.
2162
2163         * WebProcess/cocoa/VideoFullscreenManager.mm:
2164         (WebKit::inlineVideoFrame):
2165
2166 2018-02-05  Yousuke Kimoto  <yousuke.kimoto@sony.com>
2167
2168         [WinCairo] Refine WebKitLegacy and WebKit build for wincairo
2169         https://bugs.webkit.org/show_bug.cgi?id=182478
2170
2171         Reviewed by Alex Christensen.
2172
2173         Fixed a typo of forwarding header path for InjectedBundle and copying header
2174         method, which should use FLATTENED.
2175
2176         * PlatformWin.cmake: Fix a typo of a forwarding header path for InjectedBundle and use FLATTENED.
2177
2178 2018-02-05  Youenn Fablet  <youenn@apple.com>
2179
2180         WebsiteDataStore::resolveDirectoriesIfNecessary() should not overwrite its resolved serviceWorkerRegistrationDirectory  if already set
2181         https://bugs.webkit.org/show_bug.cgi?id=182514
2182
2183         Reviewed by Chris Dumez.
2184
2185         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2186         (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
2187
2188 2018-02-05  Brent Fulgham  <bfulgham@apple.com>
2189
2190         [iOS] Storage process is using the wrong sandbox profile filename
2191         https://bugs.webkit.org/show_bug.cgi?id=182500
2192         <rdar://problem/37232614>
2193
2194         Reviewed by David Kilzer.
2195
2196         The iOS entitlements file was still referencing the old Databases sandbox profile, even though the
2197         process has been renamed 'Storage'.
2198
2199         * Configurations/Databases-iOS.entitlements:
2200
2201 2018-02-05  Ryosuke Niwa  <rniwa@webkit.org>
2202
2203         Add DoNotProcessIncomingMessagesWhenWaitingForSyncReply to GetPlugins and RootViewToScreen
2204         https://bugs.webkit.org/show_bug.cgi?id=182458
2205
2206         Reviewed by Chris Dumez.
2207
2208         Added DoNotProcessIncomingMessagesWhenWaitingForSyncReply to GetPlugins and RootViewToScreen
2209         which are found to get sent from WebContent process while ScriptDisallowedScope is present
2210         by a work-in-progress patch on webkit.org/b/182449.
2211
2212         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
2213         (WebKit::WebPluginInfoProvider::populatePluginCache):
2214         * WebProcess/WebPage/WebPage.cpp:
2215         (WebKit::WebPage::rootViewToScreen):
2216
2217 2018-02-05  Commit Queue  <commit-queue@webkit.org>
2218
2219         Unreviewed, rolling out r227964 and r228087.
2220         https://bugs.webkit.org/show_bug.cgi?id=182508
2221
2222         These introduced an API test  failure with
2223         URLTest.HostIsIPAddress alongside commit r228086 (Requested by
2224         mlewis13 on #webkit).
2225
2226         Reverted changesets:
2227
2228         "[SOUP] Ensure domain is valid when converting a WebCore
2229         Cookie to Soup"
2230         https://bugs.webkit.org/show_bug.cgi?id=182328
2231         https://trac.webkit.org/changeset/227964
2232
2233         "WebDriver: addCookie command should prepend a dot to domain
2234         if missing"
2235         https://bugs.webkit.org/show_bug.cgi?id=182328
2236         https://trac.webkit.org/changeset/228087
2237
2238 2018-02-05  Wenson Hsieh  <wenson_hsieh@apple.com>
2239
2240         [Extra zoom mode] Implement number pad UI when editing `tel` and `number` inputs
2241         https://bugs.webkit.org/show_bug.cgi?id=182472
2242         <rdar://problem/35143057>
2243
2244         Reviewed by Tim Horton.
2245
2246         Allows the user to edit numeric input types using a number pad. See below comments for more detail.
2247
2248         * UIProcess/ios/WKContentViewInteraction.h:
2249         * UIProcess/ios/WKContentViewInteraction.mm:
2250         (-[WKContentView _startAssistingKeyboard]):
2251         (-[WKContentView _stopAssistingNode]):
2252
2253         Dismiss the number pad, if it is present.
2254
2255         (-[WKContentView dismissNumberPadViewController:]):
2256         (-[WKContentView presentNumberPadViewController:]):
2257
2258         Add new helpers for showing and hiding the number pad view controller.
2259
2260         (-[WKContentView presentViewControllerForAssistedNode:]):
2261         (-[WKContentView textInputController:didRequestDismissalWithAction:]):
2262
2263         Dismiss the number pad, if it is present.
2264
2265         (-[WKContentView focusedFormControlControllerDidBeginEditing:]):
2266         (-[WKContentView shouldPresentTextInputViewController:]): Deleted.
2267
2268         Remove -shouldPresentTextInputViewController and replace it with -presentViewControllerForAssistedNode:, which
2269         presents the appropriate view controller given "assisted" node information.
2270
2271         * UIProcess/ios/forms/WKNumberPadView.h: Added.
2272         * UIProcess/ios/forms/WKNumberPadView.mm: Added.
2273         * UIProcess/ios/forms/WKNumberPadViewController.h: Added.
2274         * UIProcess/ios/forms/WKNumberPadViewController.mm: Added.
2275
2276         Add "WebKitAdditions harness" files for the new number pad view and view controller classes.
2277
2278         * WebKit.xcodeproj/project.pbxproj:
2279
2280 2018-02-05  Youenn Fablet  <youenn@apple.com>
2281
2282         Add logging to CacheStorageEngineConnection
2283         https://bugs.webkit.org/show_bug.cgi?id=182456
2284
2285         Reviewed by Chris Dumez.
2286
2287         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
2288         (WebKit::CacheStorageEngineConnection::open):
2289         (WebKit::CacheStorageEngineConnection::remove):
2290         (WebKit::CacheStorageEngineConnection::caches):
2291         (WebKit::CacheStorageEngineConnection::retrieveRecords):
2292         (WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
2293         (WebKit::CacheStorageEngineConnection::putRecords):
2294         (WebKit::CacheStorageEngineConnection::reference):
2295         (WebKit::CacheStorageEngineConnection::dereference):
2296         * Platform/Logging.h:
2297
2298 2018-02-05  Daniel Bates  <dabates@apple.com>
2299
2300         REGRESSION (r222795): Nike app "Refused to set unsafe header" when adding and viewing cart
2301         https://bugs.webkit.org/show_bug.cgi?id=182491
2302         <rdar://problem/36533447>
2303
2304         Reviewed by Brent Fulgham.
2305
2306         Exempt Nike from the XHR header restrictions in r222795.
2307
2308         Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers.
2309         However Nike also depends on such functionality.
2310
2311         * UIProcess/API/Cocoa/WKWebView.mm:
2312         (shouldAllowSettingAnyXHRHeaderFromFileURLs):
2313
2314 2018-02-02  Brent Fulgham  <bfulgham@apple.com>
2315
2316         Improve NetworkResourceLoader logging so it can be used for 'setCookiesFromDOM'
2317         https://bugs.webkit.org/show_bug.cgi?id=182455
2318         <rdar://problem/36626601>
2319
2320         Reviewed by Chris Dumez.
2321
2322         Refactor "logCookieInformation" so that it can be used for resource loads and DOM cookie
2323         manipulation. Place the generally useful logic in a static method that can be invoked
2324         from other places in the NetworkProcess.
2325
2326         Call the new refactored method from NetworkConnectionToWebProcess::setCookiesFromDOM so
2327         we can perform logging there as well.
2328
2329         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2330         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): Call the new logging method
2331         (when enabled).
2332         * NetworkProcess/NetworkResourceLoader.cpp:
2333         (WebKit::NetworkResourceLoader::shouldLogCookieInformation): Changed to static method.
2334         (WebKit::escapeForJSON): Made a static function so it could be shared between multiple
2335         methods.
2336         (WebKit::NetworkResourceLoader::logCookieInformation const): Refactor into two methods.
2337         (WebKit::NetworkResourceLoader::logCookieInformation): Ditto.
2338         (WebKit::NetworkResourceLoader::shouldLogCookieInformation const): Deleted.
2339         * NetworkProcess/NetworkResourceLoader.h:
2340         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2341         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): Switch to user-enabled release logging
2342         to track partitioning and blocking behavior.
2343
2344 2018-02-05  John Wilander  <wilander@apple.com>
2345
2346         Storage Access API: Add testRunner.getAllStorageAccessEntries() to make testing easier and more explicit
2347         https://bugs.webkit.org/show_bug.cgi?id=181601
2348         <rdar://problem/36475837>
2349
2350         Reviewed by Alex Christensen.
2351
2352         http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
2353         was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
2354         it's possible to check access even if a frame doesn't respond timely to
2355         postMessage after detach and attach.
2356
2357         * NetworkProcess/NetworkProcess.cpp:
2358         (WebKit::NetworkProcess::getAllStorageAccessEntries):
2359         * NetworkProcess/NetworkProcess.h:
2360         * NetworkProcess/NetworkProcess.messages.in:
2361         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2362         (-[WKWebsiteDataStore _getAllStorageAccessEntries:]):
2363         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2364         * UIProcess/Network/NetworkProcessProxy.cpp:
2365         (WebKit::NetworkProcessProxy::getAllStorageAccessEntries):
2366         (WebKit::NetworkProcessProxy::allStorageAccessEntriesResult):
2367         * UIProcess/Network/NetworkProcessProxy.h:
2368         * UIProcess/Network/NetworkProcessProxy.messages.in:
2369         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2370         (WebKit::WebsiteDataStore::getAllStorageAccessEntries):
2371         * UIProcess/WebsiteData/WebsiteDataStore.h:
2372
2373 2018-02-05  Daniel Bates  <dabates@apple.com>
2374
2375         Disallow evaluating JavaScript from NPP_Destroy() in WebKit
2376         https://bugs.webkit.org/show_bug.cgi?id=181889
2377         <rdar://problem/36674701>
2378
2379         Reviewed by Brent Fulgham.
2380
2381         Make the behavior of WebKit match the behavior of WebKitLegacy on Mac.
2382
2383         * Shared/Plugins/NPObjectMessageReceiver.cpp:
2384         (WebKit::NPObjectMessageReceiver::hasMethod):
2385         (WebKit::NPObjectMessageReceiver::invoke):
2386         (WebKit::NPObjectMessageReceiver::invokeDefault):
2387         (WebKit::NPObjectMessageReceiver::hasProperty):
2388         (WebKit::NPObjectMessageReceiver::getProperty):
2389         (WebKit::NPObjectMessageReceiver::setProperty):
2390         (WebKit::NPObjectMessageReceiver::removeProperty):
2391         (WebKit::NPObjectMessageReceiver::enumerate):
2392         (WebKit::NPObjectMessageReceiver::construct):
2393         Bail out if the plugin is executing NPP_Destroy().
2394
2395         * WebProcess/Plugins/Plugin.cpp:
2396         (WebKit::Plugin::destroyPlugin):
2397         * WebProcess/Plugins/Plugin.h:
2398         (WebKit::Plugin::isBeingDestroyed const):
2399         Move bookkeeping of whether the plugin is being destroyed from PluginView
2400         to here. This makes it straightforward for NPObjectMessageReceiver to query
2401         this information.
2402
2403         * WebProcess/Plugins/PluginView.cpp:
2404         (WebKit::PluginView::~PluginView):
2405         (WebKit::PluginView::destroyPluginAndReset):
2406         (WebKit::PluginView::recreateAndInitialize):
2407         (WebKit::PluginView::protectPluginFromDestruction):
2408         (WebKit::PluginView::unprotectPluginFromDestruction):
2409         Move bookkeeping of whether the plugin is being destroyed from here
2410         to Plugin.
2411
2412         * WebProcess/Plugins/PluginView.h:
2413         (WebKit::PluginView::isBeingDestroyed const): Turn around and ask the plugin if it
2414         is being destroyed, if we have one.
2415
2416 2018-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2417
2418         WebDriver: addCookie command should prepend a dot to domain if missing
2419         https://bugs.webkit.org/show_bug.cgi?id=182328
2420         <rdar://problem/37116398>
2421
2422         Reviewed by Michael Catanzaro.
2423
2424         RFC 2965: If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.
2425
2426         Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie
2427
2428         * UIProcess/Automation/WebAutomationSession.cpp:
2429         (WebKit::WebAutomationSession::addSingleCookie):
2430
2431 2018-02-03  Tim Horton  <timothy_horton@apple.com>
2432
2433         UI process sometimes crashes under -[WKContentView _lookupForWebView:]
2434         https://bugs.webkit.org/show_bug.cgi?id=182460
2435         <rdar://problem/33260602>
2436
2437         Reviewed by Wenson Hsieh.
2438
2439         * UIProcess/ios/WKContentViewInteraction.mm:
2440         (-[WKContentView _lookupForWebView:]):
2441         If you have a range selection, but no rects for the selection, retrieving
2442         the 0th element of selectionRects will crash the UI process. To fix, in
2443         this case, use the rect for the starting caret instead.
2444
2445         It doesn't seem like the presentationRect is actually currently used for
2446         the Lookup service, so the only impact is that we shouldn't crash anymore.
2447
2448 2018-02-02  Michael Catanzaro  <mcatanzaro@igalia.com>
2449
2450         Remove remaining dead !USE(NETWORK_SESSION) code
2451         https://bugs.webkit.org/show_bug.cgi?id=182451
2452
2453         Reviewed by Alex Christensen.
2454
2455         DownloadCurl.cpp and AuthenticationManagerSoup.cpp have been dead code since NETWORK_SESSION
2456         became mandatory.
2457
2458         * NetworkProcess/Downloads/curl/DownloadCurl.cpp: Removed.
2459         * PlatformGTK.cmake:
2460         * PlatformWPE.cmake:
2461         * PlatformWin.cmake:
2462         * Shared/Authentication/soup/AuthenticationManagerSoup.cpp: Removed.
2463
2464 2018-02-02  Youenn Fablet  <youenn@apple.com>
2465
2466         CacheStorage should check for origin file presence when computing the origin of a folder
2467         https://bugs.webkit.org/show_bug.cgi?id=182454
2468
2469         Reviewed by Chris Dumez.
2470
2471         In case caches is opened for an origin but no cache is added, we do not have a caches name file but we do have an origin filename.
2472         We should be checking the origin filename anyway since we will be reading it afterwards.
2473
2474         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2475         (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
2476
2477 2018-02-02  Youenn Fablet  <youenn@apple.com>
2478
2479         Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
2480         https://bugs.webkit.org/show_bug.cgi?id=182403
2481         <rdar://problem/36673358>
2482
2483         Reviewed by Alex Christensen.
2484
2485         * UIProcess/WebProcessPool.cpp:
2486         (WebKit::legacyWebsiteDataStoreConfiguration): Setting serviceWorkerRegistrationDirectory for legacy stores.
2487
2488 2018-02-02  Youenn Fablet  <youenn@apple.com>
2489
2490         Clearing all service worker registrations should wait for importing service worker registration to finish
2491         https://bugs.webkit.org/show_bug.cgi?id=182407
2492
2493         Reviewed by Chris Dumez.
2494
2495         Updating API to take a completion handler.
2496
2497         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2498         (WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
2499         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
2500
2501 2018-02-02  Fujii Hironori  <Hironori.Fujii@sony.com>
2502
2503         [Win] MSVC doesn't seem to like "friend class NeverDestroyed<Foo>"
2504         https://bugs.webkit.org/show_bug.cgi?id=182081
2505
2506         Reviewed by Yusuke Suzuki.
2507
2508         The template friend class, which belongs to a different namespace,
2509         can't access private member if its friend declaration is specified
2510         without the namespace and with class keyword.
2511
2512         Replaced "friend class NeverDestroyed<Foo>" with "friend NeverDestroyed<Foo>".
2513
2514         * NetworkProcess/NetworkProcess.h:
2515         * NetworkProcess/capture/NetworkCaptureManager.h:
2516         * PluginProcess/PluginProcess.h:
2517         * Shared/CallbackID.h:
2518         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
2519         * StorageProcess/StorageProcess.h:
2520         * UIProcess/Plugins/PluginProcessManager.h:
2521         * UIProcess/Plugins/gtk/PluginInfoCache.h:
2522         * UIProcess/WebPageProxy.cpp:
2523         * UIProcess/WebPasteboardProxy.h:
2524         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
2525         * UIProcess/gtk/HardwareAccelerationManager.h:
2526         * UIProcess/gtk/WaylandCompositor.h:
2527         * UIProcess/linux/MemoryPressureMonitor.h:
2528         * UIProcess/mac/ServicesController.h:
2529         * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h:
2530         * WebProcess/Plugins/WebPluginInfoProvider.h:
2531         * WebProcess/WebCoreSupport/WebPasteboardOverrides.h:
2532         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2533
2534 2018-02-02  Youenn Fablet  <youenn@apple.com>
2535
2536         Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
2537         https://bugs.webkit.org/show_bug.cgi?id=182403
2538
2539         Reviewed by Alex Christensen.
2540
2541         WebsiteDataStore is the place to set configuration information such as service worker registration path.
2542         This patch updates WebKit code accordingly.
2543         By default, the service worker registration path is in a Caches subfolder, similarly to cache API path.
2544
2545         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2546         (API::ProcessPoolConfiguration::createWithLegacyOptions):
2547         (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
2548         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
2549         (API::ProcessPoolConfiguration::copy):
2550         * UIProcess/API/APIProcessPoolConfiguration.h:
2551         * UIProcess/API/C/WKContextConfigurationRef.cpp:
2552         (WKContextConfigurationCopyServiceWorkerDatabaseDirectory): Deleted.
2553         (WKContextConfigurationSetServiceWorkerDatabaseDirectory): Deleted.
2554         * UIProcess/API/C/WKContextConfigurationRef.h:
2555         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2556         (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
2557         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2558         (-[WKWebsiteDataStore _serviceWorkerRegistrationDirectory]):
2559         (-[WKWebsiteDataStore _setServiceWorkerRegistrationDirectory:]):
2560         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2561         * UIProcess/WebProcessPool.cpp:
2562         (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
2563         (WebKit::WebProcessPool::initializeNewWebProcess):
2564         * UIProcess/WebsiteData/WebsiteDataStore.h:
2565         (WebKit::WebsiteDataStore::serviceWorkerRegistrationDirectory const):
2566         (WebKit::WebsiteDataStore::setServiceWorkerRegistrationDirectory):
2567         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2568         * UIProcess/gtk/WebProcessPoolWPE.cpp:
2569
2570 2018-02-02  Wenson Hsieh  <wenson_hsieh@apple.com>
2571
2572         [Extra Zoom Mode] Implement support for indirect mainframe scrolling
2573         https://bugs.webkit.org/show_bug.cgi?id=182421
2574         <rdar://problem/35142694>
2575
2576         Reviewed by Tim Horton.
2577
2578         Makes a few small adjustments to WKScrollView to improve mainframe scrolling, and disable the pinch gesture for
2579         zooming. See below for more details.
2580
2581         * UIProcess/API/Cocoa/WKWebView.mm:
2582
2583         Remove a now-unneeded WebKitAdditions import.
2584
2585         * UIProcess/ios/WKScrollView.mm:
2586         (-[WKScrollView initWithFrame:]):
2587
2588         Add imports for -Before and -After versions of WKScrollViewAdditions.
2589
2590         (-[WKScrollView addGestureRecognizer:]):
2591
2592         Override -addGestureRecognizer here to prevent touches on the pinch gesture recognizer from being recognized.
2593         I chose this approach instead of just disabling the gesture in -initWithFrame: because (1) the pinch gesture
2594         recognizer is lazily created when setting minimum or maximum zoom scales, rather than immediately in
2595         -initWithFrame:, and (2) even if we set the -enabled to NO, UIKit later resets it to YES in other codepaths.
2596
2597 2018-02-01  Tim Horton  <timothy_horton@apple.com>
2598
2599         WebKit fails to build (_startAssistingNode has conflicting parameters)
2600         https://bugs.webkit.org/show_bug.cgi?id=182417
2601         <rdar://problem/36965318>
2602
2603         Reviewed by Dan Bernstein.
2604
2605         * UIProcess/ios/WKContentViewInteraction.h:
2606         Use Big BOOL like in the implementation.
2607
2608 2018-02-01  Brent Fulgham  <bfulgham@apple.com>
2609
2610         Improve NetworkResourceLogger to report blocked (versus non-partitioned) cookies
2611         https://bugs.webkit.org/show_bug.cgi?id=182408
2612         <rdar://problem/36918028>
2613
2614         Reviewed by Chris Dumez.
2615
2616         Update the logging method to report blocked origins, rather than logging them as non-partitioned
2617         loads that have no cookies or other content.
2618
2619         * NetworkProcess/NetworkResourceLoader.cpp:
2620         (WebKit::NetworkResourceLoader::logCookieInformation const):
2621
2622 2018-02-01  David Kilzer  <ddkilzer@apple.com>
2623
2624         REGRESSION (r222824): UI process crashes in WebKit::WebBackForwardList::backItem const
2625         <https://webkit.org/b/182409>
2626         <rdar://problem/35495094>
2627
2628         Reviewed by Alex Christensen.
2629
2630         * UIProcess/WebBackForwardList.cpp:
2631         (WebKit::WebBackForwardList::goToItem): Fix typo so the for loop
2632         actually checks each value in m_entries.
2633
2634 2018-02-01  Youenn Fablet  <youenn@apple.com>
2635
2636         Delay service worker process creation until actually needed by SWServer
2637         https://bugs.webkit.org/show_bug.cgi?id=182301
2638
2639         Reviewed by Chris Dumez.
2640
2641         Do not create a service worker process at creation of the first SWServerConnection.
2642         Wait for a WebProcess message that needs it:
2643         - postMessage message
2644         - fetchEvent message
2645         - job scheduling.
2646
2647         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2648         (WebKit::WebSWServerConnection::startFetch):
2649         (WebKit::WebSWServerConnection::postMessageToServiceWorker):
2650         (WebKit::WebSWServerConnection::scheduleJobInServer):
2651         * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2652         * StorageProcess/StorageToWebProcessConnection.cpp:
2653         (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
2654
2655 2018-02-01  Wenson Hsieh  <wenson_hsieh@apple.com>
2656
2657         [Extra zoom mode] Implement basic support for interacting with text form controls
2658         https://bugs.webkit.org/show_bug.cgi?id=182401
2659         <rdar://problem/35143035>
2660
2661         Reviewed by Tim Horton.
2662
2663         Add UI support for interacting with and editing text form controls when extra zoom mode is enabled. See below
2664         for more details.
2665
2666         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2667         (-[WKWebViewConfiguration init]):
2668         (-[WKWebViewConfiguration encodeWithCoder:]):
2669         (-[WKWebViewConfiguration initWithCoder:]):
2670         (-[WKWebViewConfiguration copyWithZone:]):
2671         (-[WKWebViewConfiguration _textInteractionGesturesEnabled]):
2672         (-[WKWebViewConfiguration _setTextInteractionGesturesEnabled:]):
2673         (-[WKWebViewConfiguration _longPressActionsEnabled]):
2674         (-[WKWebViewConfiguration _setLongPressActionsEnabled:]):
2675
2676         Introduce two new web view configuration flags: `textInteractionGesturesEnabled` and `longPressActionsEnabled`.
2677         The former determines whether text interaction gestures (i.e. text selection, moving the caret, showing UI for
2678         IME, etc.) are enabled. The latter determines whether or not long press actions (i.e. touch callout, share
2679         sheet, etc.) are enabled. These are disabled by default only in extra zoom mode.
2680
2681         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2682         * UIProcess/WebPageProxy.cpp:
2683         (WebKit::WebPageProxy::setTextAsync):
2684
2685         Add a way to set the text value of a currently edited text form control. This will either set the text value of
2686         an input, a. la. autofill, or overwrite the contents of a contenteditable area by selecting everything and
2687         inserting the given text.
2688
2689         * UIProcess/WebPageProxy.h:
2690         (WebKit::WebPageProxy::focusNextAssistedNode):
2691
2692         Add a default argument for the completion callback.
2693
2694         * UIProcess/ios/WKContentViewInteraction.h:
2695         * UIProcess/ios/WKContentViewInteraction.mm:
2696         (-[WKContentView setupInteraction]):
2697         (-[WKContentView _displayFormNodeInputView]):
2698         (-[WKContentView _actionForLongPressFromPositionInformation:]):
2699         (-[WKContentView hasSelectablePositionAtPoint:]):
2700         (-[WKContentView pointIsNearMarkedText:]):
2701         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
2702         (-[WKContentView insertionPointColor]):
2703
2704         Respect the web view configuration flags above by bailing early from text interaction and long press action
2705         sheet methods.
2706
2707         (-[WKContentView _startAssistingKeyboard]):
2708         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
2709
2710         Add a flag indicating whether we are in the process of changing focus from one node to another. We use this to
2711         decide whether or not we want to present the text input view controller right away, or just reload the focused
2712         form control overlay. When we stop "assisting" a node, we also keep the focused form control overlay up if we're
2713         only changing focus to another form control.
2714
2715         (-[WKContentView _stopAssistingNode]):
2716         (-[WKContentView presentFocusedFormControlViewController:]):
2717         (-[WKContentView dismissFocusedFormControlViewController:]):
2718         (-[WKContentView shouldPresentTextInputViewController:]):
2719         (-[WKContentView presentTextInputViewController:]):
2720         (-[WKContentView dismissTextInputViewController:]):
2721
2722         Introduce helpers for managing presentation of the focused form control overlay and text input view controller.
2723         All -present and -dismiss helpers here are idempotent. These view controllers are presented from the content
2724         view's view controller for fullscreen presentation.
2725
2726         (-[WKContentView textInputController:didCommitText:]):
2727         (-[WKContentView textInputController:didRequestDismissalWithAction:]):
2728         (-[WKContentView focusedFormControlControllerDidSubmit:]):
2729         (-[WKContentView focusedFormControlControllerDidCancel:]):
2730         (-[WKContentView focusedFormControlControllerDidBeginEditing:]):
2731         (-[WKContentView highlightedRectForFocusedFormControlController:inCoordinateSpace:]):
2732         (-[WKContentView actionNameForFocusedFormControlController:]):
2733         (-[WKContentView focusedFormControlControllerDidRequestNextNode:]):
2734         (-[WKContentView focusedFormControlControllerDidRequestPreviousNode:]):
2735         (-[WKContentView hasNextNodeForFocusedFormControlController:]):
2736         (-[WKContentView hasPreviousNodeForFocusedFormControlController:]):
2737
2738         Implement delegate methods for the focused form control and text input view controllers. This mainly involves
2739         straightforward plumbing of pieces of AssistedNodeInformation on the content view.
2740
2741         (-[WKContentView pointIsInAssistedNode:]): Deleted.
2742
2743         Remove a method that was still implemented only for binary compatibility with iOS 10.
2744
2745         * WebProcess/WebPage/WebPage.cpp:
2746         (WebKit::WebPage::setTextAsync):
2747         * WebProcess/WebPage/WebPage.h:
2748         * WebProcess/WebPage/WebPage.messages.in:
2749
2750 2018-02-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2751
2752         [GTK] Shift + mouse scroll should scroll horizontally
2753         https://bugs.webkit.org/show_bug.cgi?id=181629
2754
2755         Reviewed by Michael Catanzaro.
2756
2757         Swap scroll direction when Shift is pressed for consistency with GtkScrolledWindow.
2758
2759         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2760         (webkitWebViewBaseScrollEvent):
2761
2762 2018-02-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2763
2764         REGRESSION(r227893): fast/events/touch/touch-stale-node-crash.html and other tests crash
2765         https://bugs.webkit.org/show_bug.cgi?id=182350
2766
2767         Reviewed by Carlos Alberto Lopez Perez.
2768
2769         Ensure events synthesized from touch gestures have a valid window, screen and device.
2770
2771         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2772         * UIProcess/gtk/GestureController.h: Add virtual destructor to GestureControllerclient.
2773
2774 2018-01-31  Simon Fraser  <simon.fraser@apple.com>
2775
2776         Use different debug red colors for different contexts
2777         https://bugs.webkit.org/show_bug.cgi?id=182362
2778
2779         Reviewed by Tim Horton.
2780         
2781         Pure red is used elsehwere in the system as a debug color indicator, so use different
2782         shades of red for WebKit in the two places where we paint a reddish wash in debug builds,
2783         so they are identifiable.
2784
2785         * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
2786         (WebKit::RemoteLayerBackingStore::drawInContext):
2787
2788 2018-01-31  Don Olmstead  <don.olmstead@sony.com>
2789
2790         [CMake] Make JavaScriptCore headers copies
2791         https://bugs.webkit.org/show_bug.cgi?id=182303
2792
2793         Reviewed by Alex Christensen.
2794
2795         * CMakeLists.txt:
2796         * Scripts/generate-forwarding-headers.pl:
2797
2798 2018-01-31  Alex Christensen  <achristensen@webkit.org>
2799
2800         Unreviewed, rolling out r227942.
2801
2802         r227875 should not have been rolled out.
2803
2804         Reverted changeset:
2805
2806         "Unreviewed, rolling out r227875."
2807         https://bugs.webkit.org/show_bug.cgi?id=182357
2808         https://trac.webkit.org/changeset/227942
2809
2810 2018-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
2811
2812         Unreviewed, rolling out r227875.
2813         https://bugs.webkit.org/show_bug.cgi?id=182357
2814
2815         Missing cross-platform TestController implementation
2816
2817         Reverted changeset:
2818
2819         "Add callbacks to testRunner.statisticsSetShouldPartitionCookiesForHost() and testRunner.statisticsUpdateCookiePartitioning()"
2820         https://bugs.webkit.org/show_bug.cgi?id=181958
2821         https://trac.webkit.org/changeset/227875
2822
2823         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2824         (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
2825         (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
2826         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2827         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning]):
2828         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]):
2829         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning:]): Deleted.
2830         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:completionHandler:]): Deleted.
2831         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2832         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2833         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
2834         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
2835         (WebKit::WebResourceLoadStatisticsStore::logNonRecentUserInteraction):
2836         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdate):
2837         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdateForDomains):
2838         (WebKit::WebResourceLoadStatisticsStore::scheduleClearPartitioningStateForDomains):
2839         (WebKit::WebResourceLoadStatisticsStore::mergeWithDataFromDecoder):
2840         (WebKit::WebResourceLoadStatisticsStore::clearInMemory):
2841         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):
2842         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains):
2843         (WebKit::WebResourceLoadStatisticsStore::clearPartitioningStateForDomains):
2844         * UIProcess/WebResourceLoadStatisticsStore.h:
2845
2846 2018-01-31  Brent Fulgham  <bfulgham@apple.com>
2847
2848         Follow-up to r227939.
2849         https://bugs.webkit.org/show_bug.cgi?id=182354
2850         <rdar://problem/37046844>
2851
2852         Make sure the correct sandbox is used on iOS as well.
2853
2854         * StorageProcess/ios/StorageProcessIOS.mm:
2855         (WebKit::StorageProcess::initializeSandbox):
2856
2857 2018-01-31  Brent Fulgham  <bfulgham@apple.com>
2858
2859         REGRESSION(r220094): com.apple.WebKit.Storage lost its sandbox
2860         https://bugs.webkit.org/show_bug.cgi?id=182354
2861         <rdar://problem/37046844>
2862
2863         Reviewed by Ryosuke Niwa.
2864
2865         The Database process was renamed to Storage, but it's sandbox was not updated.
2866
2867         * Configurations/WebKit.xcconfig: Update for sandbox rename.
2868         * DerivedSources.make: Ditto.
2869         * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb: Removed.
2870         * Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Copied from Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb.
2871         * StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Removed.
2872         * StorageProcess/mac/com.apple.WebKit.Storage.sb.in: Copied from StorageProcess/mac/com.apple.WebKit.Databases.sb.in.
2873         * WebKit.xcodeproj/project.pbxproj: Update for sandbox rename.
2874
2875 2018-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
2876
2877         REGRESSION(r227223): http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html, http/tests/resourceLoadStatistics/grandfathering.html timing out on GTK, WPE
2878         https://bugs.webkit.org/show_bug.cgi?id=182222
2879
2880         Reviewed by Alex Christensen.
2881
2882         Add callbacks to notify when resource load statistics deletion is complete.
2883
2884         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2885         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
2886         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
2887         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
2888
2889 2018-01-31  Tim Horton  <timothy_horton@apple.com>
2890
2891         Occasional null deref under WebPageProxy::updateBackingStoreDiscardableState()
2892         https://bugs.webkit.org/show_bug.cgi?id=182349
2893         <rdar://problem/27822258>
2894
2895         Reviewed by Simon Fraser.
2896
2897         * UIProcess/WebPageProxy.cpp:
2898         (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
2899         m_drawingArea can be null during process launch and relaunch.
2900
2901         Cocoa ports don't use the result of setBackingStoreIsDiscardable(),
2902         but they do run this code to keep it up to date.
2903
2904 2018-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
2905
2906         [GTK] Move gir and typelib generation into ENABLE_INTROSPECTION conditional
2907         https://bugs.webkit.org/show_bug.cgi?id=182308
2908
2909         Reviewed by Carlos Garcia Campos.
2910
2911         * PlatformGTK.cmake:
2912
2913 2018-01-31  Youenn Fablet  <youenn@apple.com>
2914
2915         Remove StorageToWebProcessConnection::removeSWServerConnection
2916         https://bugs.webkit.org/show_bug.cgi?id=182305
2917
2918         Reviewed by Chris Dumez.
2919
2920         * StorageProcess/StorageToWebProcessConnection.cpp:
2921         (WebKit::StorageToWebProcessConnection::removeSWServerConnection): Deleted.
2922         * StorageProcess/StorageToWebProcessConnection.h:
2923         * StorageProcess/StorageToWebProcessConnection.messages.in:
2924
2925 2018-01-31  Carlos Garcia Campos  <cgarcia@igalia.com>
2926
2927         REGRESSION(r227544): [GTK] contextMenuEvent is NULL on CONTEXT_MENU call
2928         https://bugs.webkit.org/show_bug.cgi?id=182224
2929
2930         Reviewed by Michael Catanzaro.
2931
2932         Move the gestures handling to WebKitWebViewBase. This patch adds GestureControllerClient class, created and
2933         implemented by WebKitWebViewBase and used by GestureController instead of the WebPageProxy. This way we ensure
2934         events are handled consistently.
2935
2936         * UIProcess/API/gtk/PageClientImpl.cpp:
2937         (WebKit::PageClientImpl::doneWithTouchEvent): Cast the GdkEvent since GestureController no longer works wirth
2938         const GdkEvents.
2939         (WebKit::PageClientImpl::zoom): Use webkit_web_view_set_zoom_level() in case of WebKitWebView or
2940         WebPageProxy::setPageZoomFactor() otherwise.
2941         * UIProcess/API/gtk/PageClientImpl.h:
2942         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2943         (ClickCounter::currentClickCountForGdkButtonEvent): Receive a GdkEvent to avoid casts.
2944         (webkitWebViewBaseHandleMouseEvent): Helper function to handle mouse events.
2945         (webkitWebViewBaseButtonPressEvent): Use webkitWebViewBaseHandleMouseEvent.
2946         (webkitWebViewBaseButtonReleaseEvent): Ditto.
2947         (webkitWebViewBaseHandleWheelEvent): Helper function to handle wheel events.
2948         (webkitWebViewBaseScrollEvent): Use webkitWebViewBaseHandleWheelEvent.
2949         (webkitWebViewBaseMotionNotifyEvent): Use webkitWebViewBaseHandleMouseEvent.
2950         (webkitWebViewBaseCrossingNotifyEvent): Ditto.
2951         (webkitWebViewBaseGestureController): Pass the widget and client to GestureController.
2952         * UIProcess/gtk/GestureController.cpp:
2953         (WebKit::GestureController::GestureController): Receives a widget and client now.
2954         (WebKit::GestureController::handleEvent): Remove the const.
2955         (WebKit::GestureController::Gesture::Gesture): Initialize client.
2956         (WebKit::GestureController::Gesture::handleEvent): Remove the const.
2957         (WebKit::GestureController::DragGesture::startDrag): Use the client instead of WebPageProxy.
2958         (WebKit::GestureController::DragGesture::handleDrag): Ditto.
2959         (WebKit::GestureController::DragGesture::handleTap): Ditto.
2960         (WebKit::GestureController::DragGesture::begin): Ignore the const returned by gtk_gesture_get_last_event().
2961         (WebKit::GestureController::DragGesture::update): Ditto.
2962         (WebKit::GestureController::DragGesture::end): Ditto.
2963         (WebKit::GestureController::DragGesture::DragGesture): Receives a widget and client now.
2964         (WebKit::GestureController::SwipeGesture::startMomentumScroll): Use the client instead of WebPageProxy.
2965         (WebKit::GestureController::SwipeGesture::swipe): Ignore the const returned by gtk_gesture_get_last_event().
2966         (WebKit::GestureController::SwipeGesture::SwipeGesture): Receives a widget and client now.
2967         (WebKit::GestureController::ZoomGesture::begin): Start the zoom.
2968         (WebKit::GestureController::ZoomGesture::startZoom): Use the client instead of WebPageProxy.
2969         (WebKit::GestureController::ZoomGesture::handleZoom): Ditto.
2970         (WebKit::GestureController::ZoomGesture::ZoomGesture): Receives a widget and client now.
2971         (WebKit::GestureController::LongPressGesture::longPressed): Use the client instead of WebKitWebView.
2972         (WebKit::GestureController::LongPressGesture::pressed): Ignore the const returned by gtk_gesture_get_last_event().
2973         (WebKit::GestureController::LongPressGesture::LongPressGesture): Receives a widget and client now.
2974         (WebKit::GestureController::Gesture::simulateMouseClick): Deleted.
2975         (WebKit::createScrollEvent): Deleted.
2976         * UIProcess/gtk/GestureController.h:
2977
2978 2018-01-31  Carlos Garcia Campos  <cgarcia@igalia.com>
2979
2980         Web Automation: cookies returned by automation should have expiry time in seconds
2981         https://bugs.webkit.org/show_bug.cgi?id=182293
2982
2983         Reviewed by Brian Burg.
2984
2985         When creating a WebCore::Cookie from a WebDriver object we convert the given expiry time to milliseconds, but
2986         when creating a WebDriver object from a WebCore::Cookie we are keeping the milliseconds. We should convert to
2987         seconds for consistency, so that the WebDriver always handles seconds.
2988
2989         Fixes: imported/w3c/webdriver/tests/cookies/get_named_cookie.py::test_get_named_cookie
2990
2991         * UIProcess/Automation/WebAutomationSession.cpp:
2992         (WebKit::buildObjectForCookie): Convert expiry to seconds.
2993
2994 2018-01-31  Ryosuke Niwa  <rniwa@webkit.org>
2995
2996         Unreviewed iOS build fix.
2997
2998         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2999
3000 2018-01-30  John Wilander  <wilander@apple.com>
3001
3002         Add callbacks to testRunner.statisticsSetShouldPartitionCookiesForHost() and testRunner.statisticsUpdateCookiePartitioning()
3003         https://bugs.webkit.org/show_bug.cgi?id=181958
3004         https://bugs.webkit.org/show_bug.cgi?id=182072
3005         <rdar://problem/36801804>
3006         <rdar://problem/36845795>
3007
3008         Reviewed by Brent Fulgham.
3009
3010         Because of the asynchronous nature of XPC and cookies,
3011         we need callbacks in these TestRunner functions so that
3012         the layout tests can wait for state changes to finish
3013         before checking test conditions.
3014
3015         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3016         (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
3017         (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
3018         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3019         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning]):
3020         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning:]):
3021         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]):
3022         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:completionHandler:]):
3023         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
3024         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3025         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
3026         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
3027         (WebKit::WebResourceLoadStatisticsStore::logNonRecentUserInteraction):
3028         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdate):
3029         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdateForDomains):
3030         (WebKit::WebResourceLoadStatisticsStore::scheduleClearPartitioningStateForDomains):
3031         (WebKit::WebResourceLoadStatisticsStore::mergeWithDataFromDecoder):
3032         (WebKit::WebResourceLoadStatisticsStore::clearInMemory):
3033         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):
3034         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains):
3035         (WebKit::WebResourceLoadStatisticsStore::clearPartitioningStateForDomains):
3036         * UIProcess/WebResourceLoadStatisticsStore.h:
3037
3038 2018-01-30  Ryosuke Niwa  <rniwa@webkit.org>
3039
3040         REGRESSION(r227550): Resource timing API is disabled on macOS
3041         https://bugs.webkit.org/show_bug.cgi?id=182318
3042
3043         Reviewed by Chris Dumez.
3044
3045         Resource timing API should be enabled by default all versions of macOS we support now.
3046
3047         * Shared/WebPreferences.yaml:
3048         * Shared/WebPreferencesDefaultValues.h:
3049
3050 2018-01-30  Tim Horton  <timothy_horton@apple.com>
3051
3052         WKWebView layout is sometimes wrong after rotation on iPhone X
3053         https://bugs.webkit.org/show_bug.cgi?id=182304
3054         <rdar://problem/34158671>
3055
3056         Reviewed by Simon Fraser.
3057
3058         * Platform/spi/ios/UIKitSPI.h:
3059         * UIProcess/API/Cocoa/WKWebView.mm:
3060         (-[WKWebView _computedContentInset]):
3061         (-[WKWebView _scrollViewSystemContentInset]):
3062         (activeMinimumLayoutSize):
3063         It turns out that it is not always safe to look at the safe area insets of
3064         children from inside layoutSubviews, even after the call to super.
3065
3066         Instead, make use of the fact that WKScrollView and WKWebView have identical
3067         coordinate spaces, and map WKWebView's safe area insets into the WKScrollView.
3068         It's safe to use the scroll view's affected-edges and contentScrollInset,
3069         because those aren't updated at the same outside-of-layout time that
3070         safe area insets are.
3071
3072         We could alternatively move all calls to activeMinimumLayoutSize outside
3073         of layoutSubviews, but that seems like a larger and riskier change.
3074
3075         All attempts to write a test have failed; this depends heavily on use of
3076         autolayout and the mechanism by which the system updates system-owned
3077         safe area insets during device rotation.
3078
3079 2018-01-30  Don Olmstead  <don.olmstead@sony.com>
3080
3081         JSExports.h should be included as <JavaScriptCore/JSExportMacros.h>
3082         https://bugs.webkit.org/show_bug.cgi?id=182312
3083
3084         Reviewed by Michael Catanzaro.
3085
3086         * config.h:
3087
3088 2018-01-30  Brent Fulgham  <bfulgham@apple.com>
3089
3090         Add telemetry to track storage access API adoption
3091         https://bugs.webkit.org/show_bug.cgi?id=182197
3092         <rdar://problem/35803309>
3093
3094         Reviewed by Chris Dumez.
3095
3096         Part 2: Add telemetry for the Storage Access API case
3097
3098         This change increments a counter when an origin is loaded in a first part context because
3099         it was granted Storage Access API permissions.
3100
3101         * NetworkProcess/NetworkResourceLoader.cpp:
3102         (WebKit::NetworkResourceLoader::logCookieInformation const): Add logging to indicate
3103         loads that happened with the Storage Access API enabled.
3104         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3105         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess): Increment counter for
3106         loads using the new API.
3107
3108 2018-01-30  Megan Gardner  <megan_gardner@apple.com>
3109
3110         Make preserve and restore focus more likely to be symmetrical
3111         https://bugs.webkit.org/show_bug.cgi?id=182264
3112         <rdar://problem/36948473>
3113         
3114         Reviewed by Tim Horton.
3115
3116         Keep a stack of if we actually increment the focusState, so that
3117         changes to the web content do not result in asymmetric decrements to the focus state. 
3118         To work around problems associated with <rdar://problem/37000122>.
3119
3120         * UIProcess/ios/WKContentViewInteraction.h:
3121         * UIProcess/ios/WKContentViewInteraction.mm:
3122         (-[WKContentView _restoreFocusWithToken:]):
3123         (-[WKContentView _preserveFocusWithToken:destructively:]):
3124
3125 2018-01-30  Brent Fulgham  <bfulgham@apple.com>
3126
3127         Add telemetry to track storage access API adoption
3128         https://bugs.webkit.org/show_bug.cgi?id=182197
3129         <rdar://problem/35803309>
3130
3131         Reviewed by Chris Dumez.
3132         
3133         This patch also handled aggregating the counts in the UIProcess, which has access to
3134         the right data.
3135
3136         The original patch assumed the WebContent process kept track of user interaction. This is
3137         only tracked in the UIProcess, so we can get rid of some of the logging code adding in
3138         r227755.
3139
3140         * Shared/WebProcessCreationParameters.cpp:
3141         (WebKit::WebProcessCreationParameters::encode const): Rollout of r227755 changes not
3142         needed to track the statistics.
3143         (WebKit::WebProcessCreationParameters::decode): Ditto.
3144         * Shared/WebProcessCreationParameters.h:
3145         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3146         (WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.
3147         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3148         (WebKit::WebResourceLoadStatisticsStore::wasAccessedAsFirstPartyDueToUserInteraction): Moved from
3149         the WebContent process, which does not keep track of user interaction.
3150         (WebKit::WebResourceLoadStatisticsStore::mergeStatistics): Aggregate counts while processing
3151         the statistics.
3152         * UIProcess/WebResourceLoadStatisticsStore.h:
3153         * WebProcess/WebProcess.cpp:
3154         (WebKit::WebProcess::initializeWebProcess):
3155
3156 2018-01-30  Chris Dumez  <cdumez@apple.com>
3157
3158         Make sure we never create a WebSWClientConnection with an invalid sessionID
3159         https://bugs.webkit.org/show_bug.cgi?id=182276
3160         <rdar://problem/36582633>
3161
3162         Reviewed by Alex Christensen.
3163
3164         Make sure we never create a WebSWClientConnection with an invalid sessionID as this
3165         could corrupt our hash tables.
3166
3167         * StorageProcess/StorageProcess.cpp:
3168         (WebKit::StorageProcess::swServerForSession):
3169         * UIProcess/WebProcessPool.cpp:
3170         (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
3171         * WebProcess/Storage/WebSWClientConnection.cpp:
3172         (WebKit::WebSWClientConnection::WebSWClientConnection):
3173         * WebProcess/Storage/WebServiceWorkerProvider.cpp:
3174         (WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession):
3175         (WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession):
3176         * WebProcess/Storage/WebToStorageProcessConnection.cpp:
3177         (WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession):
3178
3179 2018-01-30  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3180
3181         [WinCairo] Fix forwarding header conflict of WebKit on WinCairo
3182         https://bugs.webkit.org/show_bug.cgi?id=177202
3183
3184         Reviewed by Alex Christensen.
3185
3186         * PlatformWin.cmake:
3187
3188 2018-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3189
3190         WebDriver: evaluateJavaScriptFunction should return null when return value is undefined
3191         https://bugs.webkit.org/show_bug.cgi?id=180350
3192
3193         Reviewed by Carlos Alberto Lopez Perez.
3194
3195         undefined can't be converted to JSON string, in which case JSON.stringify() returns undefined and we handle that
3196         case to return an empty string. We currently handle this case for execute script commands, but not in all other
3197         cases where we use evaluateJavaScriptFunction. It would be simpler if evaluateJavaScriptFunction returned null,
3198         because in that case we wouldn't need to handle it as a special case.
3199
3200         15.2 Executing Script
3201         https://w3c.github.io/webdriver/webdriver-spec.html#dfn-json-clone
3202
3203         Fixes: imported/w3c/webdriver/tests/state/get_element_property.py::test_element_non_existent
3204
3205         * WebProcess/Automation/WebAutomationSessionProxy.js:
3206         (let.AutomationSessionProxy.prototype._jsonStringify): Return "null" instead of "" when undefined is given.
3207
3208 2018-01-29  Ryosuke Niwa  <rniwa@webkit.org>
3209
3210         Release assert in updateLayout while waiting for sync reply to WebPageProxy::HasInsecureContent
3211         https://bugs.webkit.org/show_bug.cgi?id=182273
3212
3213         Reviewed by Chris Dumez.
3214
3215         The assertion was caused by unrelated sync IPCs being processed while WebContent process is waiting for
3216         the reply to WebPageProxy::HasInsecureContent. Since this IPC can be used while creating CachedFrame,
3217         it's not safe to execute arbitrary code.
3218
3219         Fixed the bug by using DoNotProcessIncomingMessagesWhenWaitingForSyncReply added in r227566.
3220
3221         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3222         (WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame):
3223
3224 2018-01-29  Wenson Hsieh  <wenson_hsieh@apple.com>
3225
3226         Add a build step to copy resources from WebKitAdditions as bundle resources in WebKit
3227         https://bugs.webkit.org/show_bug.cgi?id=182268
3228         <rdar://problem/37003784>
3229
3230         Reviewed by Tim Horton and Dan Bernstein.
3231
3232         Adds a "Copy Additional Resources" phase when building WebKit. This phase copies resources from
3233         usr/local/include/WebKitAdditions/WebKit/AdditionalResources in the build directory into the
3234         unlocalized resources directory. If the AdditionalResources directory does not exist in the build
3235         directory, we fall back to searching the SDK.
3236
3237         * WebKit.xcodeproj/project.pbxproj:
3238
3239 2018-01-29  Youenn Fablet  <youenn@apple.com>
3240
3241         ServiceWorkerClientFetch should not consider responses without Location headers as redirection responses
3242         https://bugs.webkit.org/show_bug.cgi?id=182134
3243
3244         Reviewed by Chris Dumez.
3245
3246         As per fetch spec, a response with a redirection status code but no Location header should not be considered as a redirection.
3247         This is also consistent with SubresourceLoader::didReceiveResponse.
3248
3249         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
3250         (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
3251
3252 2018-01-29  Youenn Fablet  <youenn@apple.com>
3253
3254         Cache API should make sure to resolve caches.open promises in the same order as called
3255         https://bugs.webkit.org/show_bug.cgi?id=182193
3256         <rdar://problem/36930363>
3257
3258         Reviewed by Chris Dumez.
3259
3260         Covered by added test.
3261         Whenever opening/removing a cache requires writing to disk, wait to finish the task
3262         until any disk writing task is done.
3263         Applying this strategy when clearing data so that we also clear data that is pending to be written.
3264         For removing cache, we now return whether a cache was actually deleted by returning zero as removed cache identifier.
3265         WebCore uses that information to return true/false as promise resolution value.
3266
3267         * NetworkProcess/cache/CacheStorageEngine.cpp:
3268         (WebKit::CacheStorage::Engine::retrieveCaches):
3269         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
3270         (WebKit::CacheStorage::Caches::clear):
3271         (WebKit::CacheStorage::Caches::open):
3272         (WebKit::CacheStorage::Caches::remove):
3273         (WebKit::CacheStorage::Caches::writeCachesToDisk):
3274         (WebKit::CacheStorage::Caches::cacheInfos):
3275         (WebKit::CacheStorage::Caches::cacheInfos const): Deleted.
3276         * NetworkProcess/cache/CacheStorageEngineCaches.h:
3277         (WebKit::CacheStorage::Caches::createWeakPtr):
3278
3279 2018-01-29  Alex Christensen  <achristensen@webkit.org>
3280
3281         Clean up API after bugs 178240 and 176474
3282         https://bugs.webkit.org/show_bug.cgi?id=182259
3283
3284         Reviewed by Dan Bernstein.
3285
3286         NS_OPTIONS should be NSUInteger, not NSInteger.  This is how all other NS_OPTIONS in WebKit are,
3287         and it's necessary if we get really big numbers as options.  Changing them won't cause binary
3288         incompatibility unless someone does signed integer comparison with currently invalid values.
3289
3290         Added availability macros I forgot to add earlier.
3291
3292         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3293         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3294
3295 2018-01-29  Jiewen Tan  <jiewen_tan@apple.com>
3296
3297         [WebAuthN] Add a compile-time feature flag
3298         https://bugs.webkit.org/show_bug.cgi?id=182211
3299         <rdar://problem/36936365>
3300
3301         Reviewed by Brent Fulgham.
3302
3303         * Configurations/FeatureDefines.xcconfig:
3304
3305 2018-01-29  John Wilander  <wilander@apple.com>
3306
3307         Resource Load Statistics: Introduce debug mode as experimental feature
3308         https://bugs.webkit.org/show_bug.cgi?id=182199
3309         <rdar://problem/36930364>
3310
3311         Reviewed by Alex Christensen.
3312
3313         The only changes to default behavior are:
3314         - Increased resolution on timestamps which is needed to be able to set shorter
3315           timeouts in debug mode.
3316         - Only update partitioning and blocking table when needed. This is an optimization
3317           which pays off in less XPC with shorter timeouts.
3318
3319         * Shared/WebPreferences.yaml:
3320         * UIProcess/API/APIWebsiteDataStore.cpp:
3321         (API::WebsiteDataStore::resourceLoadStatisticsDebugMode const):
3322         (API::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
3323         * UIProcess/API/APIWebsiteDataStore.h:
3324         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3325         (WKWebsiteDataStoreSetResourceLoadStatisticsDebugMode):
3326         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
3327         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3328         (-[WKWebsiteDataStore _resourceLoadStatisticsDebugMode]):
3329         (-[WKWebsiteDataStore _setResourceLoadStatisticsDebugMode:]):
3330         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
3331         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3332         (WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode):
3333         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
3334         * UIProcess/WebResourceLoadStatisticsStore.h:
3335         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3336         (WebKit::WebsiteDataStore::resourceLoadStatisticsDebugMode const):
3337         (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
3338         * UIProcess/WebsiteData/WebsiteDataStore.h:
3339
3340 2018-01-29  Andy Estes  <aestes@apple.com>
3341
3342         [iOS] Restrict synthetic clicks to the origin that handled the underlying touch event
3343         https://bugs.webkit.org/show_bug.cgi?id=182252
3344         <rdar://problem/21555881>
3345
3346         Reviewed by Tim Horton.
3347
3348         * WebProcess/WebPage/WebPage.cpp:
3349         (WebKit::WebPage::dispatchTouchEvent):
3350         (WebKit::WebPage::updatePotentialTapSecurityOrigin):
3351
3352         Record the target frame origin of touch events that are potential taps, are
3353         TouchStart events, are targeted in frames that have touch event listeners, and are not
3354         handled by those listeners.
3355
3356         * WebProcess/WebPage/WebPage.h:
3357         * WebProcess/WebPage/ios/WebPageIOS.mm:
3358         (WebKit::WebPage::potentialTapAtPosition):
3359         (WebKit::WebPage::commitPotentialTap):
3360         (WebKit::WebPage::cancelPotentialTapInFrame):
3361
3362         Passed the target frame origin to Frame::nodeRespondingToClickEvents() then cleared it.
3363
3364 2018-01-29  Alex Christensen  <achristensen@webkit.org>
3365
3366         Make policy checks more robust against null pointer dereferencing
3367         https://bugs.webkit.org/show_bug.cgi?id=182263
3368         <rdar://problem/34895714>
3369
3370         Reviewed by Tim Horton.
3371
3372         We're still dereferencing null.  Check everything.
3373
3374         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3375         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
3376
3377 2018-01-29  Brent Fulgham  <bfulgham@apple.com>
3378
3379         Add telemetry to track storage access API adoption
3380         https://bugs.webkit.org/show_bug.cgi?id=182197
3381         <rdar://problem/35803309>
3382
3383         Reviewed by Chris Dumez.
3384
3385         Part 1: Add telemetry for the user interaction case
3386         
3387         This patch adds telemetry to track how frequently third-party cookies are
3388         used in a first party context due to user interaction. This will help
3389         understand cases where the new Storage Access API can help, and to help
3390         us understand if we have considered relevant use cases in its design.
3391
3392         * Shared/WebProcessCreationParameters.cpp:
3393         (WebKit::WebProcessCreationParameters::encode const):
3394         (WebKit::WebProcessCreationParameters::decode):
3395         * Shared/WebProcessCreationParameters.h:
3396         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3397         (WebKit::WebProcessPool::platformInitializeWebProcess):
3398         * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
3399         (WebKit::sortedPrevalentResourceTelemetry): Update for new telemetry.
3400         (WebKit::submitTopList): Update for new data types.
3401         * WebProcess/WebProcess.cpp:
3402         (WebKit::WebProcess::initializeWebProcess): Handle the partitioning time
3403         passed from the UIProcess.
3404
3405 2018-01-29  Alex Christensen  <achristensen@webkit.org>
3406
3407         Fix crash when during canAuthenticateAgainstProtectionSpace
3408         https://bugs.webkit.org/show_bug.cgi?id=182260
3409         <rdar://problem/34911343>
3410
3411         Reviewed by Chris Dumez.
3412
3413         If we have a valid network load with no challenge completion handler and we are
3414         telling it to continue with the challenge handling, something has gone wrong.
3415         Maybe we've just recovered from a crashed network process.  If this happens, do nothing.