Disallow cross-origin subresources from asking for credentials
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-02-14  Daniel Bates  <dabates@apple.com>
2
3         Disallow cross-origin subresources from asking for credentials
4         https://bugs.webkit.org/show_bug.cgi?id=182579
5         <rdar://problem/36162271>
6
7         Reviewed by Andy Estes.
8
9         Add a private preference to toggle allowing non-mixed content cross-origin subresources to load.
10         WebKitTestRunner toggles this preference when it sees the test option allowCrossOriginSubresourcesToAskForCredential.
11
12         * Shared/WebPreferences.yaml:
13         * UIProcess/API/C/WKPreferences.cpp:
14         (WKPreferencesSetAllowCrossOriginSubresourcesToAskForCredentials):
15         (WKPreferencesGetAllowCrossOriginSubresourcesToAskForCredentials):
16         * UIProcess/API/C/WKPreferencesRefPrivate.h:
17
18 2018-02-14  John Wilander  <wilander@apple.com>
19
20         Make maximumParallelReadCount static to fix lambda capture error in WebKit::NetworkCache::Storage::traverse()
21         https://bugs.webkit.org/show_bug.cgi?id=182797
22         <rdar://problem/37540594>
23
24         Reviewed by Tim Horton.
25
26         This capture was added in r228455 and causes a build failure when
27         run with -Wunused-lambda-capture. Xcode also warns about it.
28
29         * NetworkProcess/cache/NetworkCacheStorage.cpp:
30         (WebKit::NetworkCache::Storage::traverse):
31
32 2018-02-14  Ryosuke Niwa  <rniwa@webkit.org>
33
34         EventDispatcher::wheelEvent uses a wrong enum values in switch
35         https://bugs.webkit.org/show_bug.cgi?id=182796
36
37         Reviewed by Chris Dumez.
38
39         EventDispatcher::wheelEvent is using PlatformWheelEventPhaseBegan and PlatformWheelEventPhaseEnded
40         but the enum type of wheelEvent.phase() is WebWheelEvent::Phase.
41
42         The enum values are indentical for both so there is no behavioral change.
43
44         * WebProcess/WebPage/EventDispatcher.cpp:
45         (WebKit::EventDispatcher::wheelEvent):
46
47 2018-02-14  Maureen Daum  <mdaum@apple.com>
48
49         Add C SPI for support of Website Data Store in Website Policies
50         https://bugs.webkit.org/show_bug.cgi?id=182698
51         <rdar://problem/37412008>
52
53         Reviewed by Andy Estes.
54
55         Expand the API added for _WKWebsitePolicies.websiteDataStore in r225989 and r226325
56         to be available in the C API. In the ObjC API, we handle setting the website data
57         store in NavigationState::NavigationClient::decidePolicyForNavigationAction. There
58         we throw an exception if setting the website data store isn't supported, and then
59         change the website data store. The equivalent place to do this work in the C API is
60         in WKFramePolicyListenerUseWithPolicies. However, instead of throwing exceptions,
61         release asserts are used.
62
63         * UIProcess/API/C/WKFramePolicyListener.cpp:
64         (WKFramePolicyListenerUseWithPolicies):
65         If the website policies data contains a website data store, do the same checks that
66         are done in NavigationState::NavigationClient::decidePolicyForNavigationAction. Namely,
67         that it is a valid website data store and it is a policy decision for a main frame navigation.
68         If these checks are met, change the website data store.
69         * UIProcess/API/C/WKPage.cpp:
70         (WKPageUpdateWebsitePolicies):
71         * UIProcess/API/C/WKWebsitePolicies.cpp:
72         (WKWebsitePoliciesGetDataStore):
73         (WKWebsitePoliciesSetDataStore):
74         * UIProcess/API/C/WKWebsitePolicies.h:
75         * UIProcess/WebFrameListenerProxy.cpp:
76         (WebKit::WebFrameListenerProxy::changeWebsiteDataStore):
77         (WebKit::WebFrameListenerProxy::isMainFrame):
78         Expose whether the frame proxy is for a main frame, which is required to verify that
79         website policies only specify a website data store for main frame policy decisions.
80         * UIProcess/WebFrameListenerProxy.h:
81         * UIProcess/WebFramePolicyListenerProxy.cpp:
82         * UIProcess/WebFrameProxy.cpp:
83         (WebKit::WebFrameProxy::changeWebsiteDataStore):
84         * UIProcess/WebFrameProxy.h:
85
86 2018-02-14  Ryan Haddad  <ryanhaddad@apple.com>
87
88         Unreviewed, rolling out r228444.
89
90         Introduced API and Layout test failures.
91
92         Reverted changeset:
93
94         "[WebAuthN] Revisit the whole async model of task dispatching,
95         timeout and aborting"
96         https://bugs.webkit.org/show_bug.cgi?id=181946
97         https://trac.webkit.org/changeset/228444
98
99 2018-02-13  Yousuke Kimoto  <yousuke.kimoto@sony.com>
100
101         [WinCairo] Fix build errors which come from including headers and not suitable implementation for windows
102         https://bugs.webkit.org/show_bug.cgi?id=182679
103
104         Reviewed by Michael Catanzaro.
105
106         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
107         (WebKit::NetworkCache::BlobStorage::add):
108         * NetworkProcess/cache/NetworkCacheData.cpp:
109         (WebKit::NetworkCache::Data::mapToFile const):
110         (WebKit::NetworkCache::mapFile):
111         (WebKit::NetworkCache::adoptAndMapFile):
112         (WebKit::NetworkCache::readOrMakeSalt):
113         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
114         (WebKit::NetworkCache::directoryEntryType):
115         (WebKit::NetworkCache::traverseDirectory):
116         (WebKit::NetworkCache::fileTimes):
117         (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
118         * NetworkProcess/cache/NetworkCacheStorage.cpp:
119         (WebKit::NetworkCache::Storage::traverse):
120         * NetworkProcess/win/SystemProxyWin.h:
121         * Platform/IPC/Attachment.h:
122         * Platform/Module.h:
123         * Platform/SharedMemory.h:
124         * PluginProcess/WebProcessConnection.cpp:
125         * Shared/API/c/WKBase.h:
126         * Shared/ChildProcess.cpp:
127         * Shared/WebCoreArgumentCoders.h:
128         * UIProcess/ProcessAssertion.h:
129         * WebProcess/InjectedBundle/InjectedBundle.h:
130         * WebProcess/WebProcess.cpp:
131
132 2018-02-13  Commit Queue  <commit-queue@webkit.org>
133
134         Unreviewed, rolling out r228431.
135         https://bugs.webkit.org/show_bug.cgi?id=182766
136
137         Regressed CMake build stability (Requested by dolmstead on
138         #webkit).
139
140         Reverted changeset:
141
142         "[CMake] Make WebCore headers copies"
143         https://bugs.webkit.org/show_bug.cgi?id=182512
144         https://trac.webkit.org/changeset/228431
145
146 2018-02-13  Jiewen Tan  <jiewen_tan@apple.com>
147
148         [WebAuthN] Revisit the whole async model of task dispatching, timeout and aborting
149         https://bugs.webkit.org/show_bug.cgi?id=181946
150         <rdar://problem/37258262>
151
152         Reviewed by Chris Dumez.
153
154         Dummy WebCredentialsMessenger and WebCredentialsMessengerProxy are crafted to establish
155         a message exchange channel between UIProcess and WebProcess.
156
157         * DerivedSources.make:
158         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
159         (WebKit::WebCredentialsMessengerProxy::WebCredentialsMessengerProxy):
160         (WebKit::WebCredentialsMessengerProxy::~WebCredentialsMessengerProxy):
161         (WebKit::WebCredentialsMessengerProxy::makeCredential):
162         (WebKit::WebCredentialsMessengerProxy::getAssertion):
163         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
164         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in: Added.
165         * UIProcess/WebPageProxy.cpp:
166         (WebKit::m_configurationPreferenceValues):
167         (WebKit::WebPageProxy::reattachToWebProcess):
168         * UIProcess/WebPageProxy.h:
169         * WebKit.xcodeproj/project.pbxproj:
170         * WebProcess/CredentialManagement/WebCredentialsMessenger.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
171         (WebKit::WebCredentialsMessenger::WebCredentialsMessenger):
172         (WebKit::WebCredentialsMessenger::~WebCredentialsMessenger):
173         (WebKit::WebCredentialsMessenger::makeCredential):
174         (WebKit::WebCredentialsMessenger::getAssertion):
175         (WebKit::WebCredentialsMessenger::makeCredentialReply):
176         (WebKit::WebCredentialsMessenger::getAssertionReply):
177         * WebProcess/CredentialManagement/WebCredentialsMessenger.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
178         * WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in: Added.
179         * WebProcess/WebPage/WebPage.cpp:
180         (WebKit::m_credentialsMessenger):
181         (WebKit::m_cpuLimit): Deleted.
182         * WebProcess/WebPage/WebPage.h:
183
184 2018-02-13  Youenn Fablet  <youenn@apple.com>
185
186         Add support for configuring WebsiteDatastore service worker and cache storage path
187         https://bugs.webkit.org/show_bug.cgi?id=182674
188
189         Reviewed by Chris Dumez.
190
191         Beef up WKWebsiteDataStoreConfiguration to easily set the WebsiteDataStore
192         service worker registration and cache storage directory path.
193
194         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
195         (-[WKWebsiteDataStore _initWithConfiguration:]):
196         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
197         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
198         (-[_WKWebsiteDataStoreConfiguration _cacheStorageDirectory]):
199         (-[_WKWebsiteDataStoreConfiguration _setCacheStorageDirectory:]):
200         (-[_WKWebsiteDataStoreConfiguration _serviceWorkerRegistrationDirectory]):
201         (-[_WKWebsiteDataStoreConfiguration _setServiceWorkerRegistrationDirectory:]):
202
203 2018-02-13  Brian Burg  <bburg@apple.com>
204
205         Web Automation: don't return an error if resizing/moving a window has no effect
206         https://bugs.webkit.org/show_bug.cgi?id=182742
207
208         Reviewed by Tim Horton.
209
210         * UIProcess/Automation/WebAutomationSession.cpp:
211         (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
212         (WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
213         Unify the behavior for all ports. Don't raise an error if the command was
214         idempotent (by mistake or not). It should not be an error to re-maximize a window.
215
216 2018-02-13  Don Olmstead  <don.olmstead@sony.com>
217
218         [CMake] Make WebCore headers copies
219         https://bugs.webkit.org/show_bug.cgi?id=182512
220
221         Reviewed by Keith Miller.
222
223         * CMakeLists.txt:
224         * NetworkProcess/capture/NetworkCaptureManager.cpp:
225         * NetworkProcess/webrtc/NetworkRTCMonitor.h:
226         * PlatformWPE.cmake:
227         * Scripts/generate-forwarding-headers.pl:
228         * Shared/gtk/WebEventFactory.cpp:
229         * UIProcess/API/gtk/PageClientImpl.cpp:
230         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
231         * UIProcess/gtk/WebPageProxyGtk.cpp:
232         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
233         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
234         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
235         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
236         * WebProcess/WebPage/wpe/WebPageWPE.cpp:
237
238 2018-02-13  Brent Fulgham  <bfulgham@apple.com>
239
240         [iOS] whitelist iokit-get-properties
241         https://bugs.webkit.org/show_bug.cgi?id=182722
242         <rdar://problem/30929165>
243
244         Reviewed by Eric Carlson.
245
246         Update the iOS sandbox to block access to IOKit properties that are not needed for
247         legitimate WebContent process use. This brings the iOS sandbox in line with the
248         work done under macOS.
249
250         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
251
252 2018-02-12  John Wilander  <wilander@apple.com>
253
254         Resource Load Statistics: Classify resources as prevalent based on redirects to other prevalent resources
255         https://bugs.webkit.org/show_bug.cgi?id=182664
256         <rdar://problem/37372572>
257
258         Reviewed by Brent Fulgham.
259
260         * Platform/classifier/ResourceLoadStatisticsClassifier.cpp:
261         (WebKit::ResourceLoadStatisticsClassifier::hasPrevalentResourceCharacteristics):
262             Unique top frame redirects now counts toward classification as prevalent.
263         * Shared/WebCoreArgumentCoders.cpp:
264         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
265         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
266         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
267         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
268         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
269         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
270             Test infrastructure.
271         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
272         * UIProcess/WebResourceLoadStatisticsStore.cpp:
273             Bumped the statistics model to 11 because of the added fields.
274         (WebKit::WebResourceLoadStatisticsStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain):
275             This function back traces redirect chains to classify domains
276             that have redirected to a newly classified prevalent resource.
277         (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
278             Now uses the new convenience function WebResourceLoadStatisticsStore::setPrevalentResource().
279         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
280             New convenience function to make sure we always call
281             WebResourceLoadStatisticsStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain()
282             and capture redirect chains backward.
283         (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
284         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
285         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
286         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom):
287         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo):
288         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom):
289             Test infrastructure.
290         * UIProcess/WebResourceLoadStatisticsStore.h:
291
292 2018-02-12  Antti Koivisto  <antti@apple.com>
293
294         Update NetworkCache::Storage::lastStableVersion after r226349
295         https://bugs.webkit.org/show_bug.cgi?id=182723
296         <rdar://problem/37469554>
297         
298         Reviewed by Ryosuke Niwa.
299
300         * NetworkProcess/cache/NetworkCacheStorage.h:
301
302         Allow deleting version 11 caches.
303
304 2018-02-12  Wenson Hsieh  <wenson_hsieh@apple.com>
305
306         [Extra zoom mode] Add support for <input type='time'> using time picker UI
307         https://bugs.webkit.org/show_bug.cgi?id=182683
308         <rdar://problem/35143162>
309
310         Reviewed by Tim Horton.
311
312         Adds support for showing a time picker when an input of type time is focused in extra zoomed mode.
313
314         * UIProcess/ios/WKContentViewInteraction.h:
315         * UIProcess/ios/WKContentViewInteraction.mm:
316         (-[WKContentView _stopAssistingNode]):
317         (-[WKContentView presentTimePickerViewController:]):
318         (-[WKContentView dismissTimePickerViewController:]):
319
320         Add helpers to dismiss and present the time picker view controller.
321
322         (-[WKContentView presentViewControllerForAssistedNode:]):
323
324         When focusing InputType::Time, present a time picker. Additionally, tweak the logic here to use the generic text
325         input view controller as a fallback when the other input view controllers (number pads, select menus and time
326         pickers thus far) are not relevant. This prevents us from completely being unable to edit form controls that are
327         currently unsupported.
328
329         (-[WKContentView textInputController:didCommitText:]):
330         (-[WKContentView textInputControllerDidRequestDismissal:]):
331
332         Tweak WKContentView for changes to WKTextFormControlViewControllerDelegate.
333
334         (-[WKContentView actionNameForFocusedFormControlController:]):
335
336         Adjust this implementation to hide the focused form control "Go" button for selects and time inputs. This
337         currently doesn't work for these form controls because it relies on implicit form submission; this should be
338         fixed by future changes, after which we should revert this adjustment.
339
340         (-[WKContentView _wheelChangedWithEvent:]):
341
342         Delegate wheel events to the time picker if needed.
343
344         (-[WKContentView textInputController:didRequestDismissalWithAction:]): Deleted.
345
346         Renamed to -textInputControllerDidRequestDismissal:.
347
348         * UIProcess/ios/forms/WKTimePickerViewController.h: Added.
349         * UIProcess/ios/forms/WKTimePickerViewController.mm: Added.
350         * WebKit.xcodeproj/project.pbxproj:
351
352 2018-02-11  Michael Catanzaro  <mcatanzaro@igalia.com>
353
354         [GTK] Unify builds for platform-specific files in WebKit layer
355         https://bugs.webkit.org/show_bug.cgi?id=182450
356
357         Reviewed by Carlos Garcia Campos.
358
359         Add most GTK-specific sources to unified build. API files are exempted, except for the DOM
360         API. Files shared with PluginProcessGTK2 are also exempted. Finally, files with name
361         conflicts in headers, which appears difficult to fix, are also exempted.
362
363         * CMakeLists.txt:
364         * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
365         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
366         * NetworkProcess/soup/NetworkProcessSoup.cpp:
367         * NetworkProcess/soup/NetworkSessionSoup.cpp:
368         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
369         * Platform/classifier/ResourceLoadStatisticsClassifier.cpp:
370         * PlatformGTK.cmake:
371         * PluginProcess/unix/PluginControllerProxyUnix.cpp:
372         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
373         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
374         * Shared/CoordinatedGraphics/SimpleViewportController.cpp:
375         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
376         * Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:
377         * Shared/Plugins/unix/PluginSearchPath.cpp:
378         * Shared/cairo/ShareableBitmapCairo.cpp:
379         * Shared/glib/WebContextMenuItemGlib.cpp:
380         * Shared/glib/WebErrorsGlib.cpp:
381         * Shared/gtk/ArgumentCodersGtk.cpp:
382         * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
383         * Shared/gtk/ProcessExecutablePathGtk.cpp:
384         * Shared/gtk/WebErrorsGtk.cpp:
385         * Shared/gtk/WebEventFactory.cpp:
386         * Shared/linux/WebMemorySamplerLinux.cpp:
387         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
388         * Shared/soup/WebErrorsSoup.cpp:
389         * SourcesGTK.txt: Added.
390         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
391         * UIProcess/Automation/cairo/WebAutomationSessionCairo.cpp:
392         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
393         * UIProcess/BackingStore.cpp:
394         * UIProcess/DrawingAreaProxyImpl.cpp:
395         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
396         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
397         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
398         * UIProcess/WebResourceLoadStatisticsStore.cpp:
399         * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
400         * UIProcess/WebStorage/StorageManager.cpp:
401         * UIProcess/cairo/BackingStoreCairo.cpp:
402         * UIProcess/gtk/AcceleratedBackingStore.cpp:
403         * UIProcess/gtk/DragAndDropHandler.cpp:
404         * UIProcess/gtk/GestureController.cpp:
405         * UIProcess/gtk/HardwareAccelerationManager.cpp:
406         * UIProcess/gtk/InputMethodFilter.cpp:
407         * UIProcess/gtk/TextCheckerGtk.cpp:
408         * UIProcess/gtk/WaylandCompositor.cpp:
409         * UIProcess/gtk/WebColorPickerGtk.cpp:
410         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
411         * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
412         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
413         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
414         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
415         (webkit_dom_attr_dom_event_target_init):
416         (webkit_dom_attr_set_property):
417         (webkit_dom_attr_get_property):
418         (webkit_dom_attr_class_init):
419         (webkit_dom_event_target_init): Deleted.
420         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
421         (webkit_dom_cdata_section_dom_event_target_init):
422         (webkit_dom_event_target_init): Deleted.
423         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
424         (webkit_dom_css_rule_set_property):
425         (webkit_dom_css_rule_get_property):
426         (webkit_dom_css_rule_class_init):
427         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
428         (webkit_dom_css_rule_list_get_property):
429         (webkit_dom_css_rule_list_class_init):
430         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
431         (webkit_dom_css_style_declaration_set_property):
432         (webkit_dom_css_style_declaration_get_property):
433         (webkit_dom_css_style_declaration_class_init):
434         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
435         (webkit_dom_css_style_sheet_get_property):
436         (webkit_dom_css_style_sheet_class_init):
437         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
438         (webkit_dom_css_value_set_property):
439         (webkit_dom_css_value_get_property):
440         (webkit_dom_css_value_class_init):
441         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
442         (webkit_dom_character_data_dom_event_target_init):
443         (webkit_dom_character_data_set_property):
444         (webkit_dom_character_data_get_property):
445         (webkit_dom_character_data_class_init):
446         (webkit_dom_event_target_init): Deleted.
447         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
448         (webkit_dom_client_rect_get_property):
449         (webkit_dom_client_rect_class_init):
450         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
451         (webkit_dom_client_rect_list_get_property):
452         (webkit_dom_client_rect_list_class_init):
453         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
454         (webkit_dom_comment_dom_event_target_init):
455         (webkit_dom_event_target_init): Deleted.
456         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
457         (webkit_dom_dom_selection_get_property):
458         (webkit_dom_dom_selection_class_init):
459         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
460         (webkit_dom_dom_token_list_set_property):
461         (webkit_dom_dom_token_list_get_property):
462         (webkit_dom_dom_token_list_class_init):
463         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
464         (webkit_dom_dom_window_dom_event_target_init):
465         (webkit_dom_dom_window_set_property):
466         (webkit_dom_dom_window_get_property):
467         (webkit_dom_dom_window_class_init):
468         (webkit_dom_event_target_init): Deleted.
469         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
470         (webkit_dom_document_dom_event_target_init):
471         (webkit_dom_document_set_property):
472         (webkit_dom_document_get_property):
473         (webkit_dom_document_class_init):
474         (webkit_dom_event_target_init): Deleted.
475         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
476         (webkit_dom_document_fragment_dom_event_target_init):
477         (webkit_dom_document_fragment_get_property):
478         (webkit_dom_document_fragment_class_init):
479         (webkit_dom_event_target_init): Deleted.
480         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
481         (webkit_dom_document_type_dom_event_target_init):
482         (webkit_dom_document_type_get_property):
483         (webkit_dom_document_type_class_init):
484         (webkit_dom_event_target_init): Deleted.
485         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
486         (webkit_dom_element_dom_event_target_init):
487         (webkit_dom_element_set_property):
488         (webkit_dom_element_get_property):
489         (webkit_dom_element_class_init):
490         (webkit_dom_event_target_init): Deleted.
491         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
492         (webkit_dom_event_set_property):
493         (webkit_dom_event_get_property):
494         (webkit_dom_event_class_init):
495         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
496         (webkit_dom_file_get_property):
497         (webkit_dom_file_class_init):
498         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
499         (webkit_dom_file_list_get_property):
500         (webkit_dom_file_list_class_init):
501         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
502         (webkit_dom_html_anchor_element_dom_event_target_init):
503         (webkit_dom_html_anchor_element_set_property):
504         (webkit_dom_html_anchor_element_get_property):
505         (webkit_dom_html_anchor_element_class_init):
506         (webkit_dom_event_target_init): Deleted.
507         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
508         (webkit_dom_html_applet_element_dom_event_target_init):
509         (webkit_dom_html_applet_element_set_property):
510         (webkit_dom_html_applet_element_get_property):
511         (webkit_dom_html_applet_element_class_init):
512         (webkit_dom_event_target_init): Deleted.
513         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
514         (webkit_dom_html_area_element_dom_event_target_init):
515         (webkit_dom_html_area_element_set_property):
516         (webkit_dom_html_area_element_get_property):
517         (webkit_dom_html_area_element_class_init):
518         (webkit_dom_event_target_init): Deleted.
519         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
520         (webkit_dom_html_br_element_dom_event_target_init):
521         (webkit_dom_html_br_element_set_property):
522         (webkit_dom_html_br_element_get_property):
523         (webkit_dom_html_br_element_class_init):
524         (webkit_dom_event_target_init): Deleted.
525         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
526         (webkit_dom_html_base_element_dom_event_target_init):
527         (webkit_dom_html_base_element_set_property):
528         (webkit_dom_html_base_element_get_property):
529         (webkit_dom_html_base_element_class_init):
530         (webkit_dom_event_target_init): Deleted.
531         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
532         (webkit_dom_html_body_element_dom_event_target_init):
533         (webkit_dom_html_body_element_set_property):
534         (webkit_dom_html_body_element_get_property):
535         (webkit_dom_html_body_element_class_init):
536         (webkit_dom_event_target_init): Deleted.
537         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
538         (webkit_dom_html_button_element_dom_event_target_init):
539         (webkit_dom_html_button_element_set_property):
540         (webkit_dom_html_button_element_get_property):
541         (webkit_dom_html_button_element_class_init):
542         (webkit_dom_event_target_init): Deleted.
543         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
544         (webkit_dom_html_canvas_element_dom_event_target_init):
545         (webkit_dom_html_canvas_element_set_property):
546         (webkit_dom_html_canvas_element_get_property):
547         (webkit_dom_html_canvas_element_class_init):
548         (webkit_dom_event_target_init): Deleted.
549         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
550         (webkit_dom_html_collection_get_property):
551         (webkit_dom_html_collection_class_init):
552         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
553         (webkit_dom_html_d_list_element_dom_event_target_init):
554         (webkit_dom_html_d_list_element_set_property):
555         (webkit_dom_html_d_list_element_get_property):
556         (webkit_dom_html_d_list_element_class_init):
557         (webkit_dom_event_target_init): Deleted.
558         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
559         (webkit_dom_html_directory_element_dom_event_target_init):
560         (webkit_dom_html_directory_element_set_property):
561         (webkit_dom_html_directory_element_get_property):
562         (webkit_dom_html_directory_element_class_init):
563         (webkit_dom_event_target_init): Deleted.
564         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
565         (webkit_dom_html_div_element_dom_event_target_init):
566         (webkit_dom_html_div_element_set_property):
567         (webkit_dom_html_div_element_get_property):
568         (webkit_dom_html_div_element_class_init):
569         (webkit_dom_event_target_init): Deleted.
570         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
571         (webkit_dom_html_document_dom_event_target_init):
572         (webkit_dom_html_document_set_property):
573         (webkit_dom_html_document_get_property):
574         (webkit_dom_html_document_class_init):
575         (webkit_dom_event_target_init): Deleted.
576         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
577         (webkit_dom_html_element_dom_event_target_init):
578         (webkit_dom_html_element_set_property):
579         (webkit_dom_html_element_get_property):
580         (webkit_dom_html_element_class_init):
581         (webkit_dom_event_target_init): Deleted.
582         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
583         (webkit_dom_html_embed_element_dom_event_target_init):
584         (webkit_dom_html_embed_element_set_property):
585         (webkit_dom_html_embed_element_get_property):
586         (webkit_dom_html_embed_element_class_init):
587         (webkit_dom_event_target_init): Deleted.
588         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
589         (webkit_dom_html_field_set_element_dom_event_target_init):
590         (webkit_dom_html_field_set_element_get_property):
591         (webkit_dom_html_field_set_element_class_init):
592         (webkit_dom_event_target_init): Deleted.
593         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
594         (webkit_dom_html_font_element_dom_event_target_init):
595         (webkit_dom_html_font_element_set_property):
596         (webkit_dom_html_font_element_get_property):
597         (webkit_dom_html_font_element_class_init):
598         (webkit_dom_event_target_init): Deleted.
599         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
600         (webkit_dom_html_form_element_dom_event_target_init):
601         (webkit_dom_html_form_element_set_property):
602         (webkit_dom_html_form_element_get_property):
603         (webkit_dom_html_form_element_class_init):
604         (webkit_dom_event_target_init): Deleted.
605         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
606         (webkit_dom_html_frame_element_dom_event_target_init):
607         (webkit_dom_html_frame_element_set_property):
608         (webkit_dom_html_frame_element_get_property):
609         (webkit_dom_html_frame_element_class_init):
610         (webkit_dom_event_target_init): Deleted.
611         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
612         (webkit_dom_html_frame_set_element_dom_event_target_init):
613         (webkit_dom_html_frame_set_element_set_property):
614         (webkit_dom_html_frame_set_element_get_property):
615         (webkit_dom_html_frame_set_element_class_init):
616         (webkit_dom_event_target_init): Deleted.
617         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
618         (webkit_dom_html_hr_element_dom_event_target_init):
619         (webkit_dom_html_hr_element_set_property):
620         (webkit_dom_html_hr_element_get_property):
621         (webkit_dom_html_hr_element_class_init):
622         (webkit_dom_event_target_init): Deleted.
623         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
624         (webkit_dom_html_head_element_dom_event_target_init):
625         (webkit_dom_html_head_element_set_property):
626         (webkit_dom_html_head_element_get_property):
627         (webkit_dom_html_head_element_class_init):
628         (webkit_dom_event_target_init): Deleted.
629         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
630         (webkit_dom_html_heading_element_dom_event_target_init):
631         (webkit_dom_html_heading_element_set_property):
632         (webkit_dom_html_heading_element_get_property):
633         (webkit_dom_html_heading_element_class_init):
634         (webkit_dom_event_target_init): Deleted.
635         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
636         (webkit_dom_html_html_element_dom_event_target_init):
637         (webkit_dom_html_html_element_set_property):
638         (webkit_dom_html_html_element_get_property):
639         (webkit_dom_html_html_element_class_init):
640         (webkit_dom_event_target_init): Deleted.
641         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
642         (webkit_dom_html_iframe_element_dom_event_target_init):
643         (webkit_dom_html_iframe_element_set_property):
644         (webkit_dom_html_iframe_element_get_property):
645         (webkit_dom_html_iframe_element_class_init):
646         (webkit_dom_event_target_init): Deleted.
647         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
648         (webkit_dom_html_image_element_dom_event_target_init):
649         (webkit_dom_html_image_element_set_property):
650         (webkit_dom_html_image_element_get_property):
651         (webkit_dom_html_image_element_class_init):
652         (webkit_dom_event_target_init): Deleted.
653         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
654         (webkit_dom_html_input_element_dom_event_target_init):
655         (webkit_dom_html_input_element_set_property):
656         (webkit_dom_html_input_element_get_property):
657         (webkit_dom_html_input_element_class_init):
658         (webkit_dom_event_target_init): Deleted.
659         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
660         (webkit_dom_html_li_element_dom_event_target_init):
661         (webkit_dom_html_li_element_set_property):
662         (webkit_dom_html_li_element_get_property):
663         (webkit_dom_html_li_element_class_init):
664         (webkit_dom_event_target_init): Deleted.
665         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
666         (webkit_dom_html_label_element_dom_event_target_init):
667         (webkit_dom_html_label_element_set_property):
668         (webkit_dom_html_label_element_get_property):
669         (webkit_dom_html_label_element_class_init):
670         (webkit_dom_event_target_init): Deleted.
671         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
672         (webkit_dom_html_legend_element_dom_event_target_init):
673         (webkit_dom_html_legend_element_set_property):
674         (webkit_dom_html_legend_element_get_property):
675         (webkit_dom_html_legend_element_class_init):
676         (webkit_dom_event_target_init): Deleted.
677         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
678         (webkit_dom_html_link_element_dom_event_target_init):
679         (webkit_dom_html_link_element_set_property):
680         (webkit_dom_html_link_element_get_property):
681         (webkit_dom_html_link_element_class_init):
682         (webkit_dom_event_target_init): Deleted.
683         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
684         (webkit_dom_html_map_element_dom_event_target_init):
685         (webkit_dom_html_map_element_set_property):
686         (webkit_dom_html_map_element_get_property):
687         (webkit_dom_html_map_element_class_init):
688         (webkit_dom_event_target_init): Deleted.
689         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
690         (webkit_dom_html_marquee_element_dom_event_target_init):
691         (webkit_dom_event_target_init): Deleted.
692         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
693         (webkit_dom_html_menu_element_dom_event_target_init):
694         (webkit_dom_html_menu_element_set_property):
695         (webkit_dom_html_menu_element_get_property):
696         (webkit_dom_html_menu_element_class_init):
697         (webkit_dom_event_target_init): Deleted.
698         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
699         (webkit_dom_html_meta_element_dom_event_target_init):
700         (webkit_dom_html_meta_element_set_property):
701         (webkit_dom_html_meta_element_get_property):
702         (webkit_dom_html_meta_element_class_init):
703         (webkit_dom_event_target_init): Deleted.
704         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
705         (webkit_dom_html_mod_element_dom_event_target_init):
706         (webkit_dom_html_mod_element_set_property):
707         (webkit_dom_html_mod_element_get_property):
708         (webkit_dom_html_mod_element_class_init):
709         (webkit_dom_event_target_init): Deleted.
710         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
711         (webkit_dom_html_o_list_element_dom_event_target_init):
712         (webkit_dom_html_o_list_element_set_property):
713         (webkit_dom_html_o_list_element_get_property):
714         (webkit_dom_html_o_list_element_class_init):
715         (webkit_dom_event_target_init): Deleted.
716         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
717         (webkit_dom_html_object_element_dom_event_target_init):
718         (webkit_dom_html_object_element_set_property):
719         (webkit_dom_html_object_element_get_property):
720         (webkit_dom_html_object_element_class_init):
721         (webkit_dom_event_target_init): Deleted.
722         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
723         (webkit_dom_html_opt_group_element_dom_event_target_init):
724         (webkit_dom_html_opt_group_element_set_property):
725         (webkit_dom_html_opt_group_element_get_property):
726         (webkit_dom_html_opt_group_element_class_init):
727         (webkit_dom_event_target_init): Deleted.
728         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
729         (webkit_dom_html_option_element_dom_event_target_init):
730         (webkit_dom_html_option_element_set_property):
731         (webkit_dom_html_option_element_get_property):
732         (webkit_dom_html_option_element_class_init):
733         (webkit_dom_event_target_init): Deleted.
734         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
735         (webkit_dom_html_options_collection_set_property):
736         (webkit_dom_html_options_collection_get_property):
737         (webkit_dom_html_options_collection_class_init):
738         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
739         (webkit_dom_html_paragraph_element_dom_event_target_init):
740         (webkit_dom_html_paragraph_element_set_property):
741         (webkit_dom_html_paragraph_element_get_property):
742         (webkit_dom_html_paragraph_element_class_init):
743         (webkit_dom_event_target_init): Deleted.
744         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
745         (webkit_dom_html_param_element_dom_event_target_init):
746         (webkit_dom_html_param_element_set_property):
747         (webkit_dom_html_param_element_get_property):
748         (webkit_dom_html_param_element_class_init):
749         (webkit_dom_event_target_init): Deleted.
750         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
751         (webkit_dom_html_pre_element_dom_event_target_init):
752         (webkit_dom_html_pre_element_set_property):
753         (webkit_dom_html_pre_element_get_property):
754         (webkit_dom_html_pre_element_class_init):
755         (webkit_dom_event_target_init): Deleted.
756         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
757         (webkit_dom_html_quote_element_dom_event_target_init):
758         (webkit_dom_html_quote_element_set_property):
759         (webkit_dom_html_quote_element_get_property):
760         (webkit_dom_html_quote_element_class_init):
761         (webkit_dom_event_target_init): Deleted.
762         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
763         (webkit_dom_html_script_element_dom_event_target_init):
764         (webkit_dom_html_script_element_set_property):
765         (webkit_dom_html_script_element_get_property):
766         (webkit_dom_html_script_element_class_init):
767         (webkit_dom_event_target_init): Deleted.
768         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
769         (webkit_dom_html_select_element_dom_event_target_init):
770         (webkit_dom_html_select_element_set_property):
771         (webkit_dom_html_select_element_get_property):
772         (webkit_dom_html_select_element_class_init):
773         (webkit_dom_event_target_init): Deleted.
774         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
775         (webkit_dom_html_style_element_dom_event_target_init):
776         (webkit_dom_html_style_element_set_property):
777         (webkit_dom_html_style_element_get_property):
778         (webkit_dom_html_style_element_class_init):
779         (webkit_dom_event_target_init): Deleted.
780         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
781         (webkit_dom_html_table_caption_element_dom_event_target_init):
782         (webkit_dom_html_table_caption_element_set_property):
783         (webkit_dom_html_table_caption_element_get_property):
784         (webkit_dom_html_table_caption_element_class_init):
785         (webkit_dom_event_target_init): Deleted.
786         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
787         (webkit_dom_html_table_cell_element_dom_event_target_init):
788         (webkit_dom_html_table_cell_element_set_property):
789         (webkit_dom_html_table_cell_element_get_property):
790         (webkit_dom_html_table_cell_element_class_init):
791         (webkit_dom_event_target_init): Deleted.
792         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
793         (webkit_dom_html_table_col_element_dom_event_target_init):
794         (webkit_dom_html_table_col_element_set_property):
795         (webkit_dom_html_table_col_element_get_property):
796         (webkit_dom_html_table_col_element_class_init):
797         (webkit_dom_event_target_init): Deleted.
798         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
799         (webkit_dom_html_table_element_dom_event_target_init):
800         (webkit_dom_html_table_element_set_property):
801         (webkit_dom_html_table_element_get_property):
802         (webkit_dom_html_table_element_class_init):
803         (webkit_dom_event_target_init): Deleted.
804         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
805         (webkit_dom_html_table_row_element_dom_event_target_init):
806         (webkit_dom_html_table_row_element_set_property):
807         (webkit_dom_html_table_row_element_get_property):
808         (webkit_dom_html_table_row_element_class_init):
809         (webkit_dom_html_table_row_element_insert_cell):
810         (webkit_dom_event_target_init): Deleted.
811         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
812         (webkit_dom_html_table_section_element_dom_event_target_init):
813         (webkit_dom_html_table_section_element_set_property):
814         (webkit_dom_html_table_section_element_get_property):
815         (webkit_dom_html_table_section_element_class_init):
816         (webkit_dom_event_target_init): Deleted.
817         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
818         (webkit_dom_html_text_area_element_dom_event_target_init):
819         (webkit_dom_html_text_area_element_set_property):
820         (webkit_dom_html_text_area_element_get_property):
821         (webkit_dom_html_text_area_element_class_init):
822         (webkit_dom_event_target_init): Deleted.
823         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
824         (webkit_dom_html_title_element_dom_event_target_init):
825         (webkit_dom_html_title_element_set_property):
826         (webkit_dom_html_title_element_get_property):
827         (webkit_dom_html_title_element_class_init):
828         (webkit_dom_event_target_init): Deleted.
829         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
830         (webkit_dom_html_u_list_element_dom_event_target_init):
831         (webkit_dom_html_u_list_element_set_property):
832         (webkit_dom_html_u_list_element_get_property):
833         (webkit_dom_html_u_list_element_class_init):
834         (webkit_dom_event_target_init): Deleted.
835         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
836         (webkit_dom_keyboard_event_get_property):
837         (webkit_dom_keyboard_event_class_init):
838         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
839         (webkit_dom_media_list_set_property):
840         (webkit_dom_media_list_get_property):
841         (webkit_dom_media_list_class_init):
842         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
843         (webkit_dom_mouse_event_get_property):
844         (webkit_dom_mouse_event_class_init):
845         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
846         (webkit_dom_named_node_map_get_property):
847         (webkit_dom_named_node_map_class_init):
848         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
849         (webkit_dom_node_dom_event_target_init):
850         (webkit_dom_node_set_property):
851         (webkit_dom_node_get_property):
852         (webkit_dom_node_class_init):
853         (webkit_dom_event_target_init): Deleted.
854         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
855         (webkit_dom_node_iterator_get_property):
856         (webkit_dom_node_iterator_class_init):
857         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
858         (webkit_dom_node_list_get_property):
859         (webkit_dom_node_list_class_init):
860         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.cpp:
861         (webkitDOMObjectSetProperty):
862         (webkit_dom_object_class_init):
863         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
864         (webkit_dom_processing_instruction_dom_event_target_init):
865         (webkit_dom_processing_instruction_get_property):
866         (webkit_dom_processing_instruction_class_init):
867         (webkit_dom_event_target_init): Deleted.
868         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
869         (webkit_dom_range_get_property):
870         (webkit_dom_range_class_init):
871         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
872         (webkit_dom_style_sheet_set_property):
873         (webkit_dom_style_sheet_get_property):
874         (webkit_dom_style_sheet_class_init):
875         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
876         (webkit_dom_style_sheet_list_get_property):
877         (webkit_dom_style_sheet_list_class_init):
878         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
879         (webkit_dom_text_dom_event_target_init):
880         (webkit_dom_text_get_property):
881         (webkit_dom_text_class_init):
882         (webkit_dom_event_target_init): Deleted.
883         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
884         (webkit_dom_tree_walker_get_property):
885         (webkit_dom_tree_walker_class_init):
886         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
887         (webkit_dom_ui_event_get_property):
888         (webkit_dom_ui_event_class_init):
889         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
890         (webkit_dom_wheel_event_get_property):
891         (webkit_dom_wheel_event_class_init):
892         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
893         (webkit_dom_xpath_result_get_property):
894         (webkit_dom_xpath_result_class_init):
895         * WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp:
896         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
897         * WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp:
898         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
899         * WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp:
900         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
901         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
902         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
903         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
904         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
905         * WebProcess/WebPage/AcceleratedSurface.cpp:
906         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
907         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
908         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
909         * WebProcess/WebPage/DrawingAreaImpl.cpp:
910         * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp:
911         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
912         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
913         * WebProcess/gtk/WaylandCompositorDisplay.cpp:
914         * WebProcess/gtk/WebProcessMainGtk.cpp:
915
916 2018-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>
917
918         WebDriver: addCookie command should prepend a dot to domain if missing
919         https://bugs.webkit.org/show_bug.cgi?id=182328
920         <rdar://problem/37116398>
921
922         Reviewed by Michael Catanzaro.
923
924         RFC 2965: If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.
925
926         Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie
927
928         * UIProcess/Automation/WebAutomationSession.cpp:
929         (WebKit::WebAutomationSession::addSingleCookie):
930
931 2018-02-11  Yousuke Kimoto  <yousuke.kimoto@sony.com>
932
933         [WinCairo] Add WKBaseWin.h
934         https://bugs.webkit.org/show_bug.cgi?id=182681
935
936         Reviewed by Yusuke Suzuki.
937
938         * PlatformWin.cmake:
939         * Shared/API/c/win/WKBaseWin.h: Added.
940
941 2018-02-09  Ross Kirsling  <ross.kirsling@sony.com>
942
943         Remove invalidated WebPage::handleEditingKeyboardEvent default implementation after r228260.
944         https://bugs.webkit.org/show_bug.cgi?id=182663
945
946         Reviewed by Chris Dumez.
947
948         This would need to be updated to turn `keyEvent` into `underlyingPlatformEvent`;
949         instead, we can remove it, as it's only for Windows, which doesn't yet support WK2.
950
951         * WebProcess/WebPage/WebPage.cpp:
952         (WebKit::WebPage::handleEditingKeyboardEvent): Deleted.
953
954 2018-02-09  Nan Wang  <n_wang@apple.com>
955
956         AX: Accessibility is not notified when a web process cancels the suspension
957         https://bugs.webkit.org/show_bug.cgi?id=182659
958
959         Reviewed by Ryosuke Niwa.
960
961         We were notifying Accessibility with the web process suspended information in actualPrepareToSuspend
962         and processDidResume. However, the suspension can be canceled during the prepare call. So that we
963         should also post a notification in cancelPrepareToSuspend.
964
965         * WebProcess/WebProcess.cpp:
966         (WebKit::WebProcess::cancelPrepareToSuspend):
967
968 2018-02-09  Brent Fulgham  <bfulgham@apple.com>
969
970         Sandbox violating attempting to read log formatting preference file
971         https://bugs.webkit.org/show_bug.cgi?id=182648
972         <rdar://problem/36629495>
973
974         Reviewed by Eric Carlson.
975
976         Various frameworks attempt to read logging format information from /usr/local/lib/log. The sandbox is blocking
977         this, generating log spam and preventing some logging features from working properly. We should allow read
978         access to this path.
979
980         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
981         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
982         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
983         * WebProcess/com.apple.WebProcess.sb.in:
984
985 2018-02-08  Chris Dumez  <cdumez@apple.com>
986
987         There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld
988         https://bugs.webkit.org/show_bug.cgi?id=182524
989         <rdar://problem/9057327>
990
991         Reviewed by Ryosuke Niwa.
992
993         Add C API on WKBundleScriptWorld and Cocoa API on WKWebProcessPlugInScriptWorld to
994         disable the [OverrideBuiltins] behavior on a given script world.
995
996         The [OverrideBuiltins] behavior [1] is legacy behavior that is needed for Web compatibility
997         but allowing the client to disable this behavior in a given world makes development easier
998         and running injected script on uncontrolled content a lot more reliable.
999
1000         [1] https://heycam.github.io/webidl/#OverrideBuiltins
1001
1002         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
1003         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
1004         (-[WKWebProcessPlugInScriptWorld disableOverrideBuiltinsBehavior]):
1005         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
1006         (WKBundleScriptWorldDisableOverrideBuiltinsBehavior):
1007         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
1008         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
1009         (WebKit::InjectedBundleScriptWorld::disableOverrideBuiltinsBehavior):
1010         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
1011
1012 2018-02-08  Ross Kirsling  <ross.kirsling@sony.com>
1013
1014         Remove WebProcessPool::platformInitialize stub.
1015         https://bugs.webkit.org/show_bug.cgi?id=182621
1016
1017         Reviewed by Alex Christensen.
1018
1019         The #if here could be simplified to PLATFORM(WIN), but Windows too will need a proper implementation
1020         as part of WK2 support, so this stub shouldn't need to exist at all.
1021
1022         * UIProcess/WebProcessPool.cpp:
1023         (WebKit::WebProcessPool::platformInitialize): Deleted.
1024
1025 2018-02-08  Michael Catanzaro  <mcatanzaro@igalia.com>
1026
1027         TestController should not exercise cocoa-specific resource load statistics APIs
1028         https://bugs.webkit.org/show_bug.cgi?id=182355
1029
1030         Reviewed by Alex Christensen.
1031
1032         Remove the Cocoa testing SPI, since it's redundant with the C API. Also, add a couple
1033         missing cookie partitioning callbacks to the C API.
1034
1035         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1036         (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
1037         (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
1038         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
1039         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1040         (-[WKWebsiteDataStore _resourceLoadStatisticsSetLastSeen:forHost:]): Deleted.
1041         (-[WKWebsiteDataStore _resourceLoadStatisticsSetIsPrevalentResource:forHost:]): Deleted.
1042         (-[WKWebsiteDataStore _resourceLoadStatisticsIsPrevalentResource:completionHandler:]): Deleted.
1043         (-[WKWebsiteDataStore _resourceLoadStatisticsIsRegisteredAsSubFrameUnder:topFrameHost:completionHandler:]): Deleted.
1044         (-[WKWebsiteDataStore _resourceLoadStatisticsIsRegisteredAsRedirectingTo:hostRedirectedTo:completionHandler:]): Deleted.
1045         (-[WKWebsiteDataStore _resourceLoadStatisticsSetHadUserInteraction:forHost:]): Deleted.
1046         (-[WKWebsiteDataStore _resourceLoadStatisticsSetHasHadNonRecentUserInteractionForHost:]): Deleted.
1047         (-[WKWebsiteDataStore _resourceLoadStatisticsHadUserInteraction:completionHandler:]): Deleted.
1048         (-[WKWebsiteDataStore _resourceLoadStatisticsSetIsGrandfathered:forHost:]): Deleted.
1049         (-[WKWebsiteDataStore _resourceLoadStatisticsIsGrandfathered:completionHandler:]): Deleted.
1050         (-[WKWebsiteDataStore _resourceLoadStatisticsSetSubframeUnderTopFrameOrigin:forHost:]): Deleted.
1051         (-[WKWebsiteDataStore _resourceLoadStatisticsSetSubresourceUnderTopFrameOrigin:forHost:]): Deleted.
1052         (-[WKWebsiteDataStore _resourceLoadStatisticsSetSubresourceUniqueRedirectTo:forHost:]): Deleted.
1053         (-[WKWebsiteDataStore _resourceLoadStatisticsSetTimeToLiveUserInteraction:]): Deleted.
1054         (-[WKWebsiteDataStore _resourceLoadStatisticsSetTimeToLiveCookiePartitionFree:]): Deleted.
1055         (-[WKWebsiteDataStore _resourceLoadStatisticsSetMinimumTimeBetweenDataRecordsRemoval:]): Deleted.
1056         (-[WKWebsiteDataStore _resourceLoadStatisticsSetGrandfatheringTime:]): Deleted.
1057         (-[WKWebsiteDataStore _resourceLoadStatisticsSetMaxStatisticsEntries:]): Deleted.
1058         (-[WKWebsiteDataStore _resourceLoadStatisticsSetPruneEntriesDownTo:]): Deleted.
1059         (-[WKWebsiteDataStore _resourceLoadStatisticsProcessStatisticsAndDataRecords]): Deleted.
1060         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning]): Deleted.
1061         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning:]): Deleted.
1062         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]): Deleted.
1063         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:completionHandler:]): Deleted.
1064         (-[WKWebsiteDataStore _resourceLoadStatisticsSubmitTelemetry]): Deleted.
1065         (-[WKWebsiteDataStore _resourceLoadStatisticsSetNotifyPagesWhenDataRecordsWereScanned:]): Deleted.
1066         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldClassifyResourcesBeforeDataRecordsRemoval:]): Deleted.
1067         (-[WKWebsiteDataStore _resourceLoadStatisticsSetNotifyPagesWhenTelemetryWasCaptured:]): Deleted.
1068         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore]): Deleted.
1069         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore:]): Deleted.
1070         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]): Deleted.
1071         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:completionHandler:]): Deleted.
1072         (-[WKWebsiteDataStore _resourceLoadStatisticsResetToConsistentState]): Deleted.
1073         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
1074
1075 2018-02-08  Don Olmstead  <don.olmstead@sony.com>
1076
1077         Remove JavaScriptCore/ForwardingHeaders directory
1078         https://bugs.webkit.org/show_bug.cgi?id=182594
1079
1080         Reviewed by Mark Lam.
1081
1082         * PlatformGTK.cmake:
1083
1084 2018-02-08  Tim Horton  <timothy_horton@apple.com>
1085
1086         Make WebKit public headers modules-safe
1087         https://bugs.webkit.org/show_bug.cgi?id=182611
1088         <rdar://problem/37160164>
1089
1090         Reviewed by Dan Bernstein.
1091
1092         * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
1093         * UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
1094         Import headers without which these WebKit headers can not be used alone.
1095
1096         * WebKit.xcodeproj/project.pbxproj:
1097         Make WKWindowFeaturesPrivate a private header like it was supposed to be.
1098
1099 2018-02-08  Matt Lewis  <jlewis3@apple.com>
1100
1101         Unreviewed, rolling out r228262.
1102
1103         This broke an internal build alongside r228261.
1104
1105         Reverted changeset:
1106
1107         "WebDriver: addCookie command should prepend a dot to domain
1108         if missing"
1109         https://bugs.webkit.org/show_bug.cgi?id=182328
1110         https://trac.webkit.org/changeset/228262
1111
1112 2018-02-08  Miguel Gomez  <magomez@igalia.com>
1113
1114         [GTK] WaylandCompositor misusing eglGetProcAddress
1115         https://bugs.webkit.org/show_bug.cgi?id=182490
1116
1117         Reviewed by Michael Catanzaro.
1118
1119         Check that the appropriate extensions are available before calling eglGetProcAddress, as even
1120         getting a non null value from it, the functionality can be disabled at runtime.
1121
1122         * UIProcess/gtk/WaylandCompositor.cpp:
1123         (WebKit::WaylandCompositor::initializeEGL):
1124
1125 2018-02-08  Frederic Wang  <fwang@igalia.com>
1126
1127         Add scrolling node types to distinguish main frames and subframes.
1128         https://bugs.webkit.org/show_bug.cgi?id=182533
1129
1130         Reviewed by Simon Fraser.
1131
1132         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: Replace the case of
1133         FrameScrollingNode with MainFrameScrollingNode and SubframeScrollingNode.
1134         (WebKit::encodeNodeAndDescendants):
1135         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
1136         (WebKit::dump):
1137         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: Ditto.
1138         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1139         * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: Ditto and pass the node type to the
1140         constructor of the frame scrolling node.
1141         (WebKit::RemoteScrollingTree::createScrollingTreeNode):
1142         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: Replace the case of
1143         FrameScrollingNode with MainFrameScrollingNode and SubframeScrollingNode.
1144         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1145         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: In order to
1146         determine whether the node is a main frame or subframe, use the node type instead of checking
1147         whether the node as a parent.
1148         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll):
1149
1150 2018-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1151
1152         WebDriver: addCookie command should prepend a dot to domain if missing
1153         https://bugs.webkit.org/show_bug.cgi?id=182328
1154         <rdar://problem/37116398>
1155
1156         Reviewed by Michael Catanzaro.
1157
1158         RFC 2965: If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.
1159
1160         Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie
1161
1162         * UIProcess/Automation/WebAutomationSession.cpp:
1163         (WebKit::WebAutomationSession::addSingleCookie):
1164
1165 2018-01-13  Darin Adler  <darin@apple.com>
1166
1167         Event improvements
1168         https://bugs.webkit.org/show_bug.cgi?id=179591
1169
1170         Reviewed by Chris Dumez.
1171
1172         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
1173         (webkit_dom_wheel_event_init_wheel_event): Updated to call initWebKitWheelEvent.
1174
1175         * WebProcess/Plugins/PluginView.cpp: Removed include of ScriptValue.h.
1176
1177         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1178         (WebKit::WebEditorClient::executePendingEditorCommands):
1179         Updated for name change from keyEvent to underlyingPlatformEvent.
1180         (WebKit::WebEditorClient::handleInputMethodKeydown): Ditto.
1181         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
1182         (WebKit::WebEditorClient::handleKeyboardEvent): Ditto.
1183         (WebKit::WebEditorClient::handleInputMethodKeydown): Ditto.
1184
1185         * WebProcess/WebPage/WebPage.cpp: Removed include of ScriptValue.h.
1186
1187         * WebProcess/WebPage/ios/WebPageIOS.mm:
1188         (WebKit::WebPage::handleEditingKeyboardEvent): Updated for name change from
1189         keyEvent to underlyingPlatformEvent.
1190         * WebProcess/WebPage/mac/WebPageMac.mm:
1191         (WebKit::WebPage::executeKeypressCommandsInternal): Ditto.
1192         (WebKit::WebPage::handleEditingKeyboardEvent): Ditto.
1193
1194 2018-02-07  Antti Koivisto  <antti@apple.com> and Youenn Fablet  <youenn@apple.com>
1195
1196         REGRESSION(r227758): Webpage fails to load due to crash in com.apple.WebKit: WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse + 267
1197         https://bugs.webkit.org/show_bug.cgi?id=182532
1198         <rdar://problem/36414017>
1199
1200         Reviewed by Chris Dumez.
1201
1202         No test case, don't know how to make one. The repro involves multipart HTTP streaming and details are hazy.
1203         We were calling a function that was WTFMoved away just a few lines above.
1204
1205         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1206         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1207
1208 2018-02-07  Tim Horton  <timothy_horton@apple.com>
1209
1210         Evernote device management web view sometimes displays at the wrong scale
1211         https://bugs.webkit.org/show_bug.cgi?id=182590
1212         <rdar://problem/36633687>
1213
1214         Reviewed by Simon Fraser.
1215
1216         Evernote implements the WKWebView's scroll view's delegate method
1217         viewForZoomingInScrollView: and returns nil. This results in
1218         WKScrollView's zoomScale always returning 1, no matter what the
1219         WKContentView's actual scale is. This will result in us never updating
1220         the WKContentView's scale to 1. When loading a page that has a few
1221         scale changes during load but ends up at scale 1, we get stuck at whatever
1222         intermediate scale immediately preceded settling on 1.
1223
1224         Fix this by not forwarding viewForZoomingInScrollView: to the external
1225         WKScrollView delegate; we are in charge of the contents of the scroll
1226         view (including which view scrollView's zoomScale should track), and
1227         overriding viewForZoomingInScrollView: is only ever going to lead to
1228         a broken WebKit.
1229
1230         * UIProcess/ios/WKScrollView.mm:
1231         (shouldForwardScrollViewDelegateMethodToExternalDelegate):
1232         (-[WKScrollViewDelegateForwarder forwardInvocation:]):
1233         (-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):
1234
1235 2018-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
1236
1237         [Extra zoom mode] Delegate scrolling from the content view to input view controllers
1238         https://bugs.webkit.org/show_bug.cgi?id=182534
1239         <rdar://problem/37276625>
1240
1241         Reviewed by Tim Horton.
1242
1243         Override -_wheelChangedWithEvent: on the content view, and give extra zoomed input view controllers a chance to
1244         handle the event.
1245
1246         * Platform/spi/ios/UIKitSPI.h:
1247         * UIProcess/ios/WKContentViewInteraction.mm:
1248         (-[WKContentView _wheelChangedWithEvent:]):
1249
1250 2018-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
1251
1252         [Extra zoom mode] Implement multiple and single select menus
1253         https://bugs.webkit.org/show_bug.cgi?id=182525
1254         <rdar://problem/35143016>
1255
1256         Reviewed by Tim Horton.
1257
1258         Add support for presenting picker views when focusing single or multiple select elements. See changes below for
1259         additional detail.
1260
1261         * UIProcess/ios/WKContentViewInteraction.h:
1262         * UIProcess/ios/WKContentViewInteraction.mm:
1263         (-[WKContentView _startAssistingKeyboard]):
1264
1265         Move logic for presenting view controllers when focusing elements out of _startAssistingKeyboard, and into
1266         _startAssistingNode:(...). This is because _startAssistingKeyboard is only invoked for certain types of focused
1267         element types; importantly, this set excludes select elements. Putting the call to present the focused view
1268         controller there also didn't make much since, considering that these new view controllers are not tied to
1269         keyboards in any way.
1270
1271         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
1272         (-[WKContentView _stopAssistingNode]):
1273
1274         Dismiss any select menu that is being presented.
1275
1276         (-[WKContentView presentSelectMenuViewController:]):
1277         (-[WKContentView dismissSelectMenuViewController:]):
1278
1279         Introduce idempotent helpers for presenting and dismissing the select menu view controller.
1280
1281         (-[WKContentView presentViewControllerForAssistedNode:]):
1282         (-[WKContentView selectMenu:didSelectItemAtIndex:]):
1283
1284         For single select menus. Called when the user selects a row.
1285
1286         (-[WKContentView didCancelSelectionInSelectMenu:]):
1287         (-[WKContentView numberOfItemsInSelectMenu:]):
1288         (-[WKContentView selectMenu:displayTextForItemAtIndex:]):
1289
1290         Indicates the text value to show at a given index.
1291
1292         (-[WKContentView selectMenu:didCheckItemAtIndex:checked:]):
1293
1294         For multiple select menus, invoked when an item is checked. The `checked` parameter indicates whether or not the
1295         item is now checked.
1296
1297         (-[WKContentView selectMenuSupportsMultipleSelection:]):
1298
1299         Indicates whether this select menu is single-item-only, or allows multiple items to be selected (checked).
1300
1301         (-[WKContentView selectMenu:hasCheckedOptionAtIndex:]):
1302
1303         For multiple select menus. Determines whether an option at the given index is checked.
1304
1305         (-[WKContentView startingIndexForSelectMenu:]):
1306
1307         Determines the index to instantly scroll to when presenting the select menu.
1308
1309         * UIProcess/ios/forms/WKSelectMenuViewController.h: Added.
1310         * UIProcess/ios/forms/WKSelectMenuViewController.mm: Added.
1311
1312         Add new harness files for WKSelectMenuViewController's header and implementation (see WebKitAdditions).
1313
1314         * WebKit.xcodeproj/project.pbxproj:
1315
1316 2018-02-07  Brent Fulgham  <bfulgham@apple.com>
1317
1318         Improve NetworkResourceLoader logging to capture redirect cases
1319         https://bugs.webkit.org/show_bug.cgi?id=182573
1320         <rdar://problem/37316714>
1321
1322         Reviewed by Chris Dumez.
1323
1324         Add logging for cookie partitioning or blocking during redirects.
1325
1326         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1327         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
1328
1329 2018-02-07  John Wilander  <wilander@apple.com>
1330
1331         Restrict Referer to just the origin for third parties in private mode and third parties ITP blocks cookies for in regular mode
1332         https://bugs.webkit.org/show_bug.cgi?id=182559
1333         <rdar://problem/36990337>
1334
1335         Reviewed by Andy Estes.
1336
1337         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1338         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1339         (WebKit::NetworkDataTaskCocoa::isThirdPartyRequest):
1340             New convenience function. Checks whether the resource shares
1341             partition with the first party.
1342         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
1343             Now strips the referrer to just the origin for:
1344             1. All third party requests in private mode.
1345             2. Third party requests to domains that ITP blocks cookies for.
1346         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
1347             Now strips the referrer in redirects to just the origin for:
1348             1. All third party requests in private mode.
1349             2. Third party requests to domains that ITP blocks cookies for.
1350
1351 2018-02-07  Daniel Bates  <dabates@apple.com>
1352
1353         Log error when authentication challenge is blocked due to an insecure request
1354         https://bugs.webkit.org/show_bug.cgi?id=182358
1355
1356         Reviewed by Andy Estes.
1357
1358         Have network process notify the web process when it blocks an authentication challenge.
1359
1360         * NetworkProcess/NetworkLoad.cpp:
1361         (WebKit::NetworkLoad::completeAuthenticationChallenge):
1362         * NetworkProcess/NetworkLoadClient.h:
1363         (WebKit::NetworkLoadClient::didBlockAuthenticationChallenge):
1364         * NetworkProcess/NetworkResourceLoader.cpp:
1365         (WebKit::NetworkResourceLoader::didBlockAuthenticationChallenge):
1366         * NetworkProcess/NetworkResourceLoader.h:
1367         * WebProcess/Network/WebResourceLoader.cpp:
1368         (WebKit::WebResourceLoader::didBlockAuthenticationChallenge):
1369         * WebProcess/Network/WebResourceLoader.h:
1370         * WebProcess/Network/WebResourceLoader.messages.in:
1371
1372 2018-02-07  Chris Dumez  <cdumez@apple.com>
1373
1374         IndexedDB in service workers is using a memory backed store
1375         https://bugs.webkit.org/show_bug.cgi?id=182574
1376         <rdar://problem/37316205>
1377
1378         Reviewed by Youenn Fablet.
1379
1380         Make sure we pass a proper WebDatabaseProvider to the ServiceWorkerProcess via
1381         PageConfiguration. Otherwise, we end up using the default EmptyDatabaseProvider
1382         which uses an InProcessIDBServer and a memory-backed store for IndexedDB.
1383
1384         * UIProcess/ServiceWorkerProcessProxy.cpp:
1385         (WebKit::ServiceWorkerProcessProxy::start):
1386         * UIProcess/WebProcessPool.h:
1387         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1388         (WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
1389         (WebKit::WebSWContextManagerConnection::installServiceWorker):
1390         * WebProcess/Storage/WebSWContextManagerConnection.h:
1391         * WebProcess/WebProcess.cpp:
1392         (WebKit::WebProcess::establishWorkerContextConnectionToStorageProcess):
1393         * WebProcess/WebProcess.h:
1394         * WebProcess/WebProcess.messages.in:
1395
1396 2018-02-07  Michael Catanzaro  <mcatanzaro@igalia.com>
1397
1398         [GTK] Typo in a translatable string
1399         https://bugs.webkit.org/show_bug.cgi?id=182570
1400
1401         Unreviewed. Fix a typo.
1402
1403         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
1404         (webkit_website_data_manager_class_init):
1405
1406 2018-02-06  Don Olmstead  <don.olmstead@sony.com>
1407
1408         Remove WebCore/ForwardingHeaders directory
1409         https://bugs.webkit.org/show_bug.cgi?id=182347
1410
1411         Reviewed by Keith Miller.
1412
1413         * Platform/mac/StringUtilities.mm:
1414         * Shared/Cocoa/WebKit2InitializeCocoa.mm:
1415         * Shared/WebKit2Initialize.cpp:
1416         * Shared/linux/WebMemorySamplerLinux.cpp:
1417         * Shared/mac/WebMemorySampler.mac.mm:
1418         * UIProcess/WebProcessPool.cpp:
1419         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
1420         * WebProcess/InjectedBundle/API/glib/WebKitConsoleMessagePrivate.h:
1421         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1422         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1423         * WebProcess/Plugins/PluginProcessConnection.cpp:
1424         * WebProcess/Plugins/PluginView.cpp:
1425         * WebProcess/WebPage/WebInspector.h:
1426         * WebProcess/WebPage/WebPage.cpp:
1427         * WebProcess/cocoa/WebProcessCocoa.mm:
1428
1429 2018-02-06  Chris Dumez  <cdumez@apple.com>
1430
1431         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
1432         https://bugs.webkit.org/show_bug.cgi?id=181392
1433         <rdar://problem/36384136>
1434
1435         Reviewed by Youenn Fablet.
1436
1437         All tasks from the StorageProcess to the WebContent process to update registrations
1438         and service workers state are posted to the runloop. However, the fetch callbacks
1439         do not do so. This means that fetch results might come in out of order with regards
1440         to the registration / service worker state updates. The test was flaky because an
1441         intercepted load would sometimes finish before the task to update the service worker
1442         state to "activated" was processed by the runloop. We address the issue by having
1443         the ServiceWorkerClientFetch callbacks schedule tasks to the runloop too.
1444
1445         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
1446         (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
1447         (WebKit::ServiceWorkerClientFetch::didReceiveData):
1448         (WebKit::ServiceWorkerClientFetch::didFinish):
1449         (WebKit::ServiceWorkerClientFetch::didFail):
1450         (WebKit::ServiceWorkerClientFetch::didNotHandle):
1451
1452 2018-02-06  Brent Fulgham  <bfulgham@apple.com>
1453
1454         [macOS] Correct sandbox violation triggered by Chase.com
1455         https://bugs.webkit.org/show_bug.cgi?id=182519
1456         <rdar://problem/37121757>
1457
1458         Reviewed by Eric Carlson.
1459
1460         Hitting a sandbox violation when attempting to check status of IOAV*En/Decode support.
1461
1462         * WebProcess/com.apple.WebProcess.sb.in:
1463
1464 2018-02-06  Jeff Miller  <jeffm@apple.com>
1465
1466         Add WKNavigationDelegate SPI to tell the client when an insecure plug-in is blocked
1467         https://bugs.webkit.org/show_bug.cgi?id=182540
1468
1469         Reviewed by Alex Christensen.
1470
1471         * UIProcess/API/APILoaderClient.h:
1472         (API::LoaderClient::didBlockInsecurePluginVersion):
1473         Changed to take a dictionary reference.
1474
1475         * UIProcess/API/APINavigationClient.h:
1476         (API::NavigationClient::didBlockInsecurePluginVersion):
1477         Added.
1478
1479         * UIProcess/API/C/WKPage.cpp:
1480         (WKPageSetPageLoaderClient):
1481         Changed didBlockInsecurePluginVersion() to take a dictionary reference.
1482
1483         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1484         Added -_webView:didBlockInsecurePluginVersionWithInfo:.
1485
1486         * UIProcess/Cocoa/NavigationState.h:
1487         * UIProcess/Cocoa/NavigationState.mm:
1488         (WebKit::NavigationState::setNavigationDelegate):
1489         Initialize webViewDidBlockInsecurePluginVersionWithInfo.
1490
1491         (WebKit::NavigationState::NavigationClient::didBlockInsecurePluginVersion):
1492         Added.
1493
1494         * UIProcess/WebPageProxy.cpp:
1495         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
1496         Remove check for PLATFORM(COCOA) (we don't check for this in didFailToInitializePlugin() where we
1497         also use createPluginInformationDictionary()) and ENABLE(NETSCAPE_PLUGIN_API) (we're already inside
1498         an #if ENABLE(NETSCAPE_PLUGIN_API block) and use auto for pluginInformation. Attempt to use the
1499         navigation client before the loader client.
1500
1501 2018-02-06  Youenn Fablet  <youenn@apple.com>
1502
1503         HasServiceWorkerRegistration bit should be sent when creating a new page
1504         https://bugs.webkit.org/show_bug.cgi?id=182410
1505
1506         Reviewed by Chris Dumez.
1507
1508         Move the bit computation at page creation time.
1509         This allows computing the bit based on the web site data store and not only on the pool configuration.
1510         WebPage uses that bit to activate service worker registration matching for the whole process.
1511
1512         In case there is a service worker process proxy created, the bit is set to true by default.
1513
1514         Bit is computed by checking for database file presence.
1515         This information is cached in a map for efficiency reasons and cleared when a service worker process proxy is created.
1516
1517         * Shared/WebPageCreationParameters.cpp:
1518         (WebKit::WebPageCreationParameters::encode const):
1519         (WebKit::WebPageCreationParameters::decode):
1520         * Shared/WebPageCreationParameters.h:
1521         * Shared/WebProcessCreationParameters.cpp:
1522         (WebKit::WebProcessCreationParameters::encode const):
1523         (WebKit::WebProcessCreationParameters::decode):
1524         * Shared/WebProcessCreationParameters.h:
1525         * UIProcess/WebPageProxy.cpp:
1526         (WebKit::WebPageProxy::initializeWebPage):
1527         * UIProcess/WebProcessPool.cpp:
1528         (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
1529         (WebKit::WebProcessPool::initializeNewWebProcess):
1530         (WebKit::WebProcessPool::mayHaveRegisteredServiceWorkers):
1531         * WebProcess/WebPage/WebPage.cpp:
1532         (WebKit::m_cpuLimit):
1533         * WebProcess/WebProcess.cpp:
1534         (WebKit::WebProcess::initializeWebProcess):
1535
1536 2018-02-06  Michael Catanzaro  <mcatanzaro@igalia.com>
1537
1538         Unreviewed, fix format specifiers added in r228116
1539         https://bugs.webkit.org/show_bug.cgi?id=182456
1540         <rdar://problem/37181006>
1541
1542         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
1543         (WebKit::CacheStorageEngineConnection::open):
1544         (WebKit::CacheStorageEngineConnection::remove):
1545         (WebKit::CacheStorageEngineConnection::caches):
1546         (WebKit::CacheStorageEngineConnection::retrieveRecords):
1547         (WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
1548         (WebKit::CacheStorageEngineConnection::putRecords):
1549         (WebKit::CacheStorageEngineConnection::reference):
1550         (WebKit::CacheStorageEngineConnection::dereference):
1551
1552 2018-02-05  Chris Dumez  <cdumez@apple.com>
1553
1554         Avoid unnecessarily constructing RunLoops for GC AutomaticThreads in Connection::sendMessage() after r228001
1555         https://bugs.webkit.org/show_bug.cgi?id=182494
1556         <rdar://problem/37147632>
1557
1558         Reviewed by Ryosuke Niwa.
1559
1560         Somebody fixed a GC crash in r228001 by allowing RunLoop::current() to be called from a
1561         GC thread. However, this is still unnecessarily inefficient. Calling RunLoop::current()
1562         will construct RunLoops for background GC threads (WTF::AutomaticThreads). This patches
1563         updates the IPC code to call isMainThread() instead of RunLoop::isMain() in
1564         Connection::sendMessage(). This should mean the same thing since this code runs in
1565         WebKit2 and should be more efficient as it ends up simply calling pthread_main_np(),
1566         without constructing a RunLoop.
1567
1568         * Platform/IPC/Connection.cpp:
1569         (IPC::Connection::sendMessage):
1570
1571 2018-02-05  Ryosuke Niwa  <rniwa@webkit.org>
1572
1573         Release assertion in inlineVideoFrame
1574         https://bugs.webkit.org/show_bug.cgi?id=182513
1575         <rdar://problem/37159363>
1576
1577         Reviewed by Zalan Bujtas.
1578
1579         Fixed the bug. Don't try to update the layout when there is no live render tree or active DOM objects
1580         had been stopped: i.e. during a document destruction.
1581
1582         * WebProcess/cocoa/VideoFullscreenManager.mm:
1583         (WebKit::inlineVideoFrame):
1584
1585 2018-02-05  Yousuke Kimoto  <yousuke.kimoto@sony.com>
1586
1587         [WinCairo] Refine WebKitLegacy and WebKit build for wincairo
1588         https://bugs.webkit.org/show_bug.cgi?id=182478
1589
1590         Reviewed by Alex Christensen.
1591
1592         Fixed a typo of forwarding header path for InjectedBundle and copying header
1593         method, which should use FLATTENED.
1594
1595         * PlatformWin.cmake: Fix a typo of a forwarding header path for InjectedBundle and use FLATTENED.
1596
1597 2018-02-05  Youenn Fablet  <youenn@apple.com>
1598
1599         WebsiteDataStore::resolveDirectoriesIfNecessary() should not overwrite its resolved serviceWorkerRegistrationDirectory  if already set
1600         https://bugs.webkit.org/show_bug.cgi?id=182514
1601
1602         Reviewed by Chris Dumez.
1603
1604         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1605         (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
1606
1607 2018-02-05  Brent Fulgham  <bfulgham@apple.com>
1608
1609         [iOS] Storage process is using the wrong sandbox profile filename
1610         https://bugs.webkit.org/show_bug.cgi?id=182500
1611         <rdar://problem/37232614>
1612
1613         Reviewed by David Kilzer.
1614
1615         The iOS entitlements file was still referencing the old Databases sandbox profile, even though the
1616         process has been renamed 'Storage'.
1617
1618         * Configurations/Databases-iOS.entitlements:
1619
1620 2018-02-05  Ryosuke Niwa  <rniwa@webkit.org>
1621
1622         Add DoNotProcessIncomingMessagesWhenWaitingForSyncReply to GetPlugins and RootViewToScreen
1623         https://bugs.webkit.org/show_bug.cgi?id=182458
1624
1625         Reviewed by Chris Dumez.
1626
1627         Added DoNotProcessIncomingMessagesWhenWaitingForSyncReply to GetPlugins and RootViewToScreen
1628         which are found to get sent from WebContent process while ScriptDisallowedScope is present
1629         by a work-in-progress patch on webkit.org/b/182449.
1630
1631         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
1632         (WebKit::WebPluginInfoProvider::populatePluginCache):
1633         * WebProcess/WebPage/WebPage.cpp:
1634         (WebKit::WebPage::rootViewToScreen):
1635
1636 2018-02-05  Commit Queue  <commit-queue@webkit.org>
1637
1638         Unreviewed, rolling out r227964 and r228087.
1639         https://bugs.webkit.org/show_bug.cgi?id=182508
1640
1641         These introduced an API test  failure with
1642         URLTest.HostIsIPAddress alongside commit r228086 (Requested by
1643         mlewis13 on #webkit).
1644
1645         Reverted changesets:
1646
1647         "[SOUP] Ensure domain is valid when converting a WebCore
1648         Cookie to Soup"
1649         https://bugs.webkit.org/show_bug.cgi?id=182328
1650         https://trac.webkit.org/changeset/227964
1651
1652         "WebDriver: addCookie command should prepend a dot to domain
1653         if missing"
1654         https://bugs.webkit.org/show_bug.cgi?id=182328
1655         https://trac.webkit.org/changeset/228087
1656
1657 2018-02-05  Wenson Hsieh  <wenson_hsieh@apple.com>
1658
1659         [Extra zoom mode] Implement number pad UI when editing `tel` and `number` inputs
1660         https://bugs.webkit.org/show_bug.cgi?id=182472
1661         <rdar://problem/35143057>
1662
1663         Reviewed by Tim Horton.
1664
1665         Allows the user to edit numeric input types using a number pad. See below comments for more detail.
1666
1667         * UIProcess/ios/WKContentViewInteraction.h:
1668         * UIProcess/ios/WKContentViewInteraction.mm:
1669         (-[WKContentView _startAssistingKeyboard]):
1670         (-[WKContentView _stopAssistingNode]):
1671
1672         Dismiss the number pad, if it is present.
1673
1674         (-[WKContentView dismissNumberPadViewController:]):
1675         (-[WKContentView presentNumberPadViewController:]):
1676
1677         Add new helpers for showing and hiding the number pad view controller.
1678
1679         (-[WKContentView presentViewControllerForAssistedNode:]):
1680         (-[WKContentView textInputController:didRequestDismissalWithAction:]):
1681
1682         Dismiss the number pad, if it is present.
1683
1684         (-[WKContentView focusedFormControlControllerDidBeginEditing:]):
1685         (-[WKContentView shouldPresentTextInputViewController:]): Deleted.
1686
1687         Remove -shouldPresentTextInputViewController and replace it with -presentViewControllerForAssistedNode:, which
1688         presents the appropriate view controller given "assisted" node information.
1689
1690         * UIProcess/ios/forms/WKNumberPadView.h: Added.
1691         * UIProcess/ios/forms/WKNumberPadView.mm: Added.
1692         * UIProcess/ios/forms/WKNumberPadViewController.h: Added.
1693         * UIProcess/ios/forms/WKNumberPadViewController.mm: Added.
1694
1695         Add "WebKitAdditions harness" files for the new number pad view and view controller classes.
1696
1697         * WebKit.xcodeproj/project.pbxproj:
1698
1699 2018-02-05  Youenn Fablet  <youenn@apple.com>
1700
1701         Add logging to CacheStorageEngineConnection
1702         https://bugs.webkit.org/show_bug.cgi?id=182456
1703
1704         Reviewed by Chris Dumez.
1705
1706         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
1707         (WebKit::CacheStorageEngineConnection::open):
1708         (WebKit::CacheStorageEngineConnection::remove):
1709         (WebKit::CacheStorageEngineConnection::caches):
1710         (WebKit::CacheStorageEngineConnection::retrieveRecords):
1711         (WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
1712         (WebKit::CacheStorageEngineConnection::putRecords):
1713         (WebKit::CacheStorageEngineConnection::reference):
1714         (WebKit::CacheStorageEngineConnection::dereference):
1715         * Platform/Logging.h:
1716
1717 2018-02-05  Daniel Bates  <dabates@apple.com>
1718
1719         REGRESSION (r222795): Nike app "Refused to set unsafe header" when adding and viewing cart
1720         https://bugs.webkit.org/show_bug.cgi?id=182491
1721         <rdar://problem/36533447>
1722
1723         Reviewed by Brent Fulgham.
1724
1725         Exempt Nike from the XHR header restrictions in r222795.
1726
1727         Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers.
1728         However Nike also depends on such functionality.
1729
1730         * UIProcess/API/Cocoa/WKWebView.mm:
1731         (shouldAllowSettingAnyXHRHeaderFromFileURLs):
1732
1733 2018-02-02  Brent Fulgham  <bfulgham@apple.com>
1734
1735         Improve NetworkResourceLoader logging so it can be used for 'setCookiesFromDOM'
1736         https://bugs.webkit.org/show_bug.cgi?id=182455
1737         <rdar://problem/36626601>
1738
1739         Reviewed by Chris Dumez.
1740
1741         Refactor "logCookieInformation" so that it can be used for resource loads and DOM cookie
1742         manipulation. Place the generally useful logic in a static method that can be invoked
1743         from other places in the NetworkProcess.
1744
1745         Call the new refactored method from NetworkConnectionToWebProcess::setCookiesFromDOM so
1746         we can perform logging there as well.
1747
1748         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1749         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): Call the new logging method
1750         (when enabled).
1751         * NetworkProcess/NetworkResourceLoader.cpp:
1752         (WebKit::NetworkResourceLoader::shouldLogCookieInformation): Changed to static method.
1753         (WebKit::escapeForJSON): Made a static function so it could be shared between multiple
1754         methods.
1755         (WebKit::NetworkResourceLoader::logCookieInformation const): Refactor into two methods.
1756         (WebKit::NetworkResourceLoader::logCookieInformation): Ditto.
1757         (WebKit::NetworkResourceLoader::shouldLogCookieInformation const): Deleted.
1758         * NetworkProcess/NetworkResourceLoader.h:
1759         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1760         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): Switch to user-enabled release logging
1761         to track partitioning and blocking behavior.
1762
1763 2018-02-05  John Wilander  <wilander@apple.com>
1764
1765         Storage Access API: Add testRunner.getAllStorageAccessEntries() to make testing easier and more explicit
1766         https://bugs.webkit.org/show_bug.cgi?id=181601
1767         <rdar://problem/36475837>
1768
1769         Reviewed by Alex Christensen.
1770
1771         http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
1772         was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
1773         it's possible to check access even if a frame doesn't respond timely to
1774         postMessage after detach and attach.
1775
1776         * NetworkProcess/NetworkProcess.cpp:
1777         (WebKit::NetworkProcess::getAllStorageAccessEntries):
1778         * NetworkProcess/NetworkProcess.h:
1779         * NetworkProcess/NetworkProcess.messages.in:
1780         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1781         (-[WKWebsiteDataStore _getAllStorageAccessEntries:]):
1782         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
1783         * UIProcess/Network/NetworkProcessProxy.cpp:
1784         (WebKit::NetworkProcessProxy::getAllStorageAccessEntries):
1785         (WebKit::NetworkProcessProxy::allStorageAccessEntriesResult):
1786         * UIProcess/Network/NetworkProcessProxy.h:
1787         * UIProcess/Network/NetworkProcessProxy.messages.in:
1788         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1789         (WebKit::WebsiteDataStore::getAllStorageAccessEntries):
1790         * UIProcess/WebsiteData/WebsiteDataStore.h:
1791
1792 2018-02-05  Daniel Bates  <dabates@apple.com>
1793
1794         Disallow evaluating JavaScript from NPP_Destroy() in WebKit
1795         https://bugs.webkit.org/show_bug.cgi?id=181889
1796         <rdar://problem/36674701>
1797
1798         Reviewed by Brent Fulgham.
1799
1800         Make the behavior of WebKit match the behavior of WebKitLegacy on Mac.
1801
1802         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1803         (WebKit::NPObjectMessageReceiver::hasMethod):
1804         (WebKit::NPObjectMessageReceiver::invoke):
1805         (WebKit::NPObjectMessageReceiver::invokeDefault):
1806         (WebKit::NPObjectMessageReceiver::hasProperty):
1807         (WebKit::NPObjectMessageReceiver::getProperty):
1808         (WebKit::NPObjectMessageReceiver::setProperty):
1809         (WebKit::NPObjectMessageReceiver::removeProperty):
1810         (WebKit::NPObjectMessageReceiver::enumerate):
1811         (WebKit::NPObjectMessageReceiver::construct):
1812         Bail out if the plugin is executing NPP_Destroy().
1813
1814         * WebProcess/Plugins/Plugin.cpp:
1815         (WebKit::Plugin::destroyPlugin):
1816         * WebProcess/Plugins/Plugin.h:
1817         (WebKit::Plugin::isBeingDestroyed const):
1818         Move bookkeeping of whether the plugin is being destroyed from PluginView
1819         to here. This makes it straightforward for NPObjectMessageReceiver to query
1820         this information.
1821
1822         * WebProcess/Plugins/PluginView.cpp:
1823         (WebKit::PluginView::~PluginView):
1824         (WebKit::PluginView::destroyPluginAndReset):
1825         (WebKit::PluginView::recreateAndInitialize):
1826         (WebKit::PluginView::protectPluginFromDestruction):
1827         (WebKit::PluginView::unprotectPluginFromDestruction):
1828         Move bookkeeping of whether the plugin is being destroyed from here
1829         to Plugin.
1830
1831         * WebProcess/Plugins/PluginView.h:
1832         (WebKit::PluginView::isBeingDestroyed const): Turn around and ask the plugin if it
1833         is being destroyed, if we have one.
1834
1835 2018-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1836
1837         WebDriver: addCookie command should prepend a dot to domain if missing
1838         https://bugs.webkit.org/show_bug.cgi?id=182328
1839         <rdar://problem/37116398>
1840
1841         Reviewed by Michael Catanzaro.
1842
1843         RFC 2965: If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.
1844
1845         Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie
1846
1847         * UIProcess/Automation/WebAutomationSession.cpp:
1848         (WebKit::WebAutomationSession::addSingleCookie):
1849
1850 2018-02-03  Tim Horton  <timothy_horton@apple.com>
1851
1852         UI process sometimes crashes under -[WKContentView _lookupForWebView:]
1853         https://bugs.webkit.org/show_bug.cgi?id=182460
1854         <rdar://problem/33260602>
1855
1856         Reviewed by Wenson Hsieh.
1857
1858         * UIProcess/ios/WKContentViewInteraction.mm:
1859         (-[WKContentView _lookupForWebView:]):
1860         If you have a range selection, but no rects for the selection, retrieving
1861         the 0th element of selectionRects will crash the UI process. To fix, in
1862         this case, use the rect for the starting caret instead.
1863
1864         It doesn't seem like the presentationRect is actually currently used for
1865         the Lookup service, so the only impact is that we shouldn't crash anymore.
1866
1867 2018-02-02  Michael Catanzaro  <mcatanzaro@igalia.com>
1868
1869         Remove remaining dead !USE(NETWORK_SESSION) code
1870         https://bugs.webkit.org/show_bug.cgi?id=182451
1871
1872         Reviewed by Alex Christensen.
1873
1874         DownloadCurl.cpp and AuthenticationManagerSoup.cpp have been dead code since NETWORK_SESSION
1875         became mandatory.
1876
1877         * NetworkProcess/Downloads/curl/DownloadCurl.cpp: Removed.
1878         * PlatformGTK.cmake:
1879         * PlatformWPE.cmake:
1880         * PlatformWin.cmake:
1881         * Shared/Authentication/soup/AuthenticationManagerSoup.cpp: Removed.
1882
1883 2018-02-02  Youenn Fablet  <youenn@apple.com>
1884
1885         CacheStorage should check for origin file presence when computing the origin of a folder
1886         https://bugs.webkit.org/show_bug.cgi?id=182454
1887
1888         Reviewed by Chris Dumez.
1889
1890         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.
1891         We should be checking the origin filename anyway since we will be reading it afterwards.
1892
1893         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
1894         (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
1895
1896 2018-02-02  Youenn Fablet  <youenn@apple.com>
1897
1898         Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
1899         https://bugs.webkit.org/show_bug.cgi?id=182403
1900         <rdar://problem/36673358>
1901
1902         Reviewed by Alex Christensen.
1903
1904         * UIProcess/WebProcessPool.cpp:
1905         (WebKit::legacyWebsiteDataStoreConfiguration): Setting serviceWorkerRegistrationDirectory for legacy stores.
1906
1907 2018-02-02  Youenn Fablet  <youenn@apple.com>
1908
1909         Clearing all service worker registrations should wait for importing service worker registration to finish
1910         https://bugs.webkit.org/show_bug.cgi?id=182407
1911
1912         Reviewed by Chris Dumez.
1913
1914         Updating API to take a completion handler.
1915
1916         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1917         (WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
1918         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
1919
1920 2018-02-02  Fujii Hironori  <Hironori.Fujii@sony.com>
1921
1922         [Win] MSVC doesn't seem to like "friend class NeverDestroyed<Foo>"
1923         https://bugs.webkit.org/show_bug.cgi?id=182081
1924
1925         Reviewed by Yusuke Suzuki.
1926
1927         The template friend class, which belongs to a different namespace,
1928         can't access private member if its friend declaration is specified
1929         without the namespace and with class keyword.
1930
1931         Replaced "friend class NeverDestroyed<Foo>" with "friend NeverDestroyed<Foo>".
1932
1933         * NetworkProcess/NetworkProcess.h:
1934         * NetworkProcess/capture/NetworkCaptureManager.h:
1935         * PluginProcess/PluginProcess.h:
1936         * Shared/CallbackID.h:
1937         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
1938         * StorageProcess/StorageProcess.h:
1939         * UIProcess/Plugins/PluginProcessManager.h:
1940         * UIProcess/Plugins/gtk/PluginInfoCache.h:
1941         * UIProcess/WebPageProxy.cpp:
1942         * UIProcess/WebPasteboardProxy.h:
1943         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
1944         * UIProcess/gtk/HardwareAccelerationManager.h:
1945         * UIProcess/gtk/WaylandCompositor.h:
1946         * UIProcess/linux/MemoryPressureMonitor.h:
1947         * UIProcess/mac/ServicesController.h:
1948         * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h:
1949         * WebProcess/Plugins/WebPluginInfoProvider.h:
1950         * WebProcess/WebCoreSupport/WebPasteboardOverrides.h:
1951         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1952
1953 2018-02-02  Youenn Fablet  <youenn@apple.com>
1954
1955         Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
1956         https://bugs.webkit.org/show_bug.cgi?id=182403
1957
1958         Reviewed by Alex Christensen.
1959
1960         WebsiteDataStore is the place to set configuration information such as service worker registration path.
1961         This patch updates WebKit code accordingly.
1962         By default, the service worker registration path is in a Caches subfolder, similarly to cache API path.
1963
1964         * UIProcess/API/APIProcessPoolConfiguration.cpp:
1965         (API::ProcessPoolConfiguration::createWithLegacyOptions):
1966         (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
1967         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
1968         (API::ProcessPoolConfiguration::copy):
1969         * UIProcess/API/APIProcessPoolConfiguration.h:
1970         * UIProcess/API/C/WKContextConfigurationRef.cpp:
1971         (WKContextConfigurationCopyServiceWorkerDatabaseDirectory): Deleted.
1972         (WKContextConfigurationSetServiceWorkerDatabaseDirectory): Deleted.
1973         * UIProcess/API/C/WKContextConfigurationRef.h:
1974         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
1975         (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
1976         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1977         (-[WKWebsiteDataStore _serviceWorkerRegistrationDirectory]):
1978         (-[WKWebsiteDataStore _setServiceWorkerRegistrationDirectory:]):
1979         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
1980         * UIProcess/WebProcessPool.cpp:
1981         (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
1982         (WebKit::WebProcessPool::initializeNewWebProcess):
1983         * UIProcess/WebsiteData/WebsiteDataStore.h:
1984         (WebKit::WebsiteDataStore::serviceWorkerRegistrationDirectory const):
1985         (WebKit::WebsiteDataStore::setServiceWorkerRegistrationDirectory):
1986         * UIProcess/gtk/WebProcessPoolGtk.cpp:
1987         * UIProcess/gtk/WebProcessPoolWPE.cpp:
1988
1989 2018-02-02  Wenson Hsieh  <wenson_hsieh@apple.com>
1990
1991         [Extra Zoom Mode] Implement support for indirect mainframe scrolling
1992         https://bugs.webkit.org/show_bug.cgi?id=182421
1993         <rdar://problem/35142694>
1994
1995         Reviewed by Tim Horton.
1996
1997         Makes a few small adjustments to WKScrollView to improve mainframe scrolling, and disable the pinch gesture for
1998         zooming. See below for more details.
1999
2000         * UIProcess/API/Cocoa/WKWebView.mm:
2001
2002         Remove a now-unneeded WebKitAdditions import.
2003
2004         * UIProcess/ios/WKScrollView.mm:
2005         (-[WKScrollView initWithFrame:]):
2006
2007         Add imports for -Before and -After versions of WKScrollViewAdditions.
2008
2009         (-[WKScrollView addGestureRecognizer:]):
2010
2011         Override -addGestureRecognizer here to prevent touches on the pinch gesture recognizer from being recognized.
2012         I chose this approach instead of just disabling the gesture in -initWithFrame: because (1) the pinch gesture
2013         recognizer is lazily created when setting minimum or maximum zoom scales, rather than immediately in
2014         -initWithFrame:, and (2) even if we set the -enabled to NO, UIKit later resets it to YES in other codepaths.
2015
2016 2018-02-01  Tim Horton  <timothy_horton@apple.com>
2017
2018         WebKit fails to build (_startAssistingNode has conflicting parameters)
2019         https://bugs.webkit.org/show_bug.cgi?id=182417
2020         <rdar://problem/36965318>
2021
2022         Reviewed by Dan Bernstein.
2023
2024         * UIProcess/ios/WKContentViewInteraction.h:
2025         Use Big BOOL like in the implementation.
2026
2027 2018-02-01  Brent Fulgham  <bfulgham@apple.com>
2028
2029         Improve NetworkResourceLogger to report blocked (versus non-partitioned) cookies
2030         https://bugs.webkit.org/show_bug.cgi?id=182408
2031         <rdar://problem/36918028>
2032
2033         Reviewed by Chris Dumez.
2034
2035         Update the logging method to report blocked origins, rather than logging them as non-partitioned
2036         loads that have no cookies or other content.
2037
2038         * NetworkProcess/NetworkResourceLoader.cpp:
2039         (WebKit::NetworkResourceLoader::logCookieInformation const):
2040
2041 2018-02-01  David Kilzer  <ddkilzer@apple.com>
2042
2043         REGRESSION (r222824): UI process crashes in WebKit::WebBackForwardList::backItem const
2044         <https://webkit.org/b/182409>
2045         <rdar://problem/35495094>
2046
2047         Reviewed by Alex Christensen.
2048
2049         * UIProcess/WebBackForwardList.cpp:
2050         (WebKit::WebBackForwardList::goToItem): Fix typo so the for loop
2051         actually checks each value in m_entries.
2052
2053 2018-02-01  Youenn Fablet  <youenn@apple.com>
2054
2055         Delay service worker process creation until actually needed by SWServer
2056         https://bugs.webkit.org/show_bug.cgi?id=182301
2057
2058         Reviewed by Chris Dumez.
2059
2060         Do not create a service worker process at creation of the first SWServerConnection.
2061         Wait for a WebProcess message that needs it:
2062         - postMessage message
2063         - fetchEvent message
2064         - job scheduling.
2065
2066         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2067         (WebKit::WebSWServerConnection::startFetch):
2068         (WebKit::WebSWServerConnection::postMessageToServiceWorker):
2069         (WebKit::WebSWServerConnection::scheduleJobInServer):
2070         * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2071         * StorageProcess/StorageToWebProcessConnection.cpp:
2072         (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
2073
2074 2018-02-01  Wenson Hsieh  <wenson_hsieh@apple.com>
2075
2076         [Extra zoom mode] Implement basic support for interacting with text form controls
2077         https://bugs.webkit.org/show_bug.cgi?id=182401
2078         <rdar://problem/35143035>
2079
2080         Reviewed by Tim Horton.
2081
2082         Add UI support for interacting with and editing text form controls when extra zoom mode is enabled. See below
2083         for more details.
2084
2085         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2086         (-[WKWebViewConfiguration init]):
2087         (-[WKWebViewConfiguration encodeWithCoder:]):
2088         (-[WKWebViewConfiguration initWithCoder:]):
2089         (-[WKWebViewConfiguration copyWithZone:]):
2090         (-[WKWebViewConfiguration _textInteractionGesturesEnabled]):
2091         (-[WKWebViewConfiguration _setTextInteractionGesturesEnabled:]):
2092         (-[WKWebViewConfiguration _longPressActionsEnabled]):
2093         (-[WKWebViewConfiguration _setLongPressActionsEnabled:]):
2094
2095         Introduce two new web view configuration flags: `textInteractionGesturesEnabled` and `longPressActionsEnabled`.
2096         The former determines whether text interaction gestures (i.e. text selection, moving the caret, showing UI for
2097         IME, etc.) are enabled. The latter determines whether or not long press actions (i.e. touch callout, share
2098         sheet, etc.) are enabled. These are disabled by default only in extra zoom mode.
2099
2100         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2101         * UIProcess/WebPageProxy.cpp:
2102         (WebKit::WebPageProxy::setTextAsync):
2103
2104         Add a way to set the text value of a currently edited text form control. This will either set the text value of
2105         an input, a. la. autofill, or overwrite the contents of a contenteditable area by selecting everything and
2106         inserting the given text.
2107
2108         * UIProcess/WebPageProxy.h:
2109         (WebKit::WebPageProxy::focusNextAssistedNode):
2110
2111         Add a default argument for the completion callback.
2112
2113         * UIProcess/ios/WKContentViewInteraction.h:
2114         * UIProcess/ios/WKContentViewInteraction.mm:
2115         (-[WKContentView setupInteraction]):
2116         (-[WKContentView _displayFormNodeInputView]):
2117         (-[WKContentView _actionForLongPressFromPositionInformation:]):
2118         (-[WKContentView hasSelectablePositionAtPoint:]):
2119         (-[WKContentView pointIsNearMarkedText:]):
2120         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
2121         (-[WKContentView insertionPointColor]):
2122
2123         Respect the web view configuration flags above by bailing early from text interaction and long press action
2124         sheet methods.
2125
2126         (-[WKContentView _startAssistingKeyboard]):
2127         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
2128
2129         Add a flag indicating whether we are in the process of changing focus from one node to another. We use this to
2130         decide whether or not we want to present the text input view controller right away, or just reload the focused
2131         form control overlay. When we stop "assisting" a node, we also keep the focused form control overlay up if we're
2132         only changing focus to another form control.
2133
2134         (-[WKContentView _stopAssistingNode]):
2135         (-[WKContentView presentFocusedFormControlViewController:]):
2136         (-[WKContentView dismissFocusedFormControlViewController:]):
2137         (-[WKContentView shouldPresentTextInputViewController:]):
2138         (-[WKContentView presentTextInputViewController:]):
2139         (-[WKContentView dismissTextInputViewController:]):
2140
2141         Introduce helpers for managing presentation of the focused form control overlay and text input view controller.
2142         All -present and -dismiss helpers here are idempotent. These view controllers are presented from the content
2143         view's view controller for fullscreen presentation.
2144
2145         (-[WKContentView textInputController:didCommitText:]):
2146         (-[WKContentView textInputController:didRequestDismissalWithAction:]):
2147         (-[WKContentView focusedFormControlControllerDidSubmit:]):
2148         (-[WKContentView focusedFormControlControllerDidCancel:]):
2149         (-[WKContentView focusedFormControlControllerDidBeginEditing:]):
2150         (-[WKContentView highlightedRectForFocusedFormControlController:inCoordinateSpace:]):
2151         (-[WKContentView actionNameForFocusedFormControlController:]):
2152         (-[WKContentView focusedFormControlControllerDidRequestNextNode:]):
2153         (-[WKContentView focusedFormControlControllerDidRequestPreviousNode:]):
2154         (-[WKContentView hasNextNodeForFocusedFormControlController:]):
2155         (-[WKContentView hasPreviousNodeForFocusedFormControlController:]):
2156
2157         Implement delegate methods for the focused form control and text input view controllers. This mainly involves
2158         straightforward plumbing of pieces of AssistedNodeInformation on the content view.
2159
2160         (-[WKContentView pointIsInAssistedNode:]): Deleted.
2161
2162         Remove a method that was still implemented only for binary compatibility with iOS 10.
2163
2164         * WebProcess/WebPage/WebPage.cpp:
2165         (WebKit::WebPage::setTextAsync):
2166         * WebProcess/WebPage/WebPage.h:
2167         * WebProcess/WebPage/WebPage.messages.in:
2168
2169 2018-02-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2170
2171         [GTK] Shift + mouse scroll should scroll horizontally
2172         https://bugs.webkit.org/show_bug.cgi?id=181629
2173
2174         Reviewed by Michael Catanzaro.
2175
2176         Swap scroll direction when Shift is pressed for consistency with GtkScrolledWindow.
2177
2178         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2179         (webkitWebViewBaseScrollEvent):
2180
2181 2018-02-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2182
2183         REGRESSION(r227893): fast/events/touch/touch-stale-node-crash.html and other tests crash
2184         https://bugs.webkit.org/show_bug.cgi?id=182350
2185
2186         Reviewed by Carlos Alberto Lopez Perez.
2187
2188         Ensure events synthesized from touch gestures have a valid window, screen and device.
2189
2190         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2191         * UIProcess/gtk/GestureController.h: Add virtual destructor to GestureControllerclient.
2192
2193 2018-01-31  Simon Fraser  <simon.fraser@apple.com>
2194
2195         Use different debug red colors for different contexts
2196         https://bugs.webkit.org/show_bug.cgi?id=182362
2197
2198         Reviewed by Tim Horton.
2199         
2200         Pure red is used elsehwere in the system as a debug color indicator, so use different
2201         shades of red for WebKit in the two places where we paint a reddish wash in debug builds,
2202         so they are identifiable.
2203
2204         * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
2205         (WebKit::RemoteLayerBackingStore::drawInContext):
2206
2207 2018-01-31  Don Olmstead  <don.olmstead@sony.com>
2208
2209         [CMake] Make JavaScriptCore headers copies
2210         https://bugs.webkit.org/show_bug.cgi?id=182303
2211
2212         Reviewed by Alex Christensen.
2213
2214         * CMakeLists.txt:
2215         * Scripts/generate-forwarding-headers.pl:
2216
2217 2018-01-31  Alex Christensen  <achristensen@webkit.org>
2218
2219         Unreviewed, rolling out r227942.
2220
2221         r227875 should not have been rolled out.
2222
2223         Reverted changeset:
2224
2225         "Unreviewed, rolling out r227875."
2226         https://bugs.webkit.org/show_bug.cgi?id=182357
2227         https://trac.webkit.org/changeset/227942
2228
2229 2018-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
2230
2231         Unreviewed, rolling out r227875.
2232         https://bugs.webkit.org/show_bug.cgi?id=182357
2233
2234         Missing cross-platform TestController implementation
2235
2236         Reverted changeset:
2237
2238         "Add callbacks to testRunner.statisticsSetShouldPartitionCookiesForHost() and testRunner.statisticsUpdateCookiePartitioning()"
2239         https://bugs.webkit.org/show_bug.cgi?id=181958
2240         https://trac.webkit.org/changeset/227875
2241
2242         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2243         (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
2244         (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
2245         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2246         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning]):
2247         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]):
2248         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning:]): Deleted.
2249         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:completionHandler:]): Deleted.
2250         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2251         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2252         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
2253         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
2254         (WebKit::WebResourceLoadStatisticsStore::logNonRecentUserInteraction):
2255         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdate):
2256         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdateForDomains):
2257         (WebKit::WebResourceLoadStatisticsStore::scheduleClearPartitioningStateForDomains):
2258         (WebKit::WebResourceLoadStatisticsStore::mergeWithDataFromDecoder):
2259         (WebKit::WebResourceLoadStatisticsStore::clearInMemory):
2260         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):
2261         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains):
2262         (WebKit::WebResourceLoadStatisticsStore::clearPartitioningStateForDomains):
2263         * UIProcess/WebResourceLoadStatisticsStore.h:
2264
2265 2018-01-31  Brent Fulgham  <bfulgham@apple.com>
2266
2267         Follow-up to r227939.
2268         https://bugs.webkit.org/show_bug.cgi?id=182354
2269         <rdar://problem/37046844>
2270
2271         Make sure the correct sandbox is used on iOS as well.
2272
2273         * StorageProcess/ios/StorageProcessIOS.mm:
2274         (WebKit::StorageProcess::initializeSandbox):
2275
2276 2018-01-31  Brent Fulgham  <bfulgham@apple.com>
2277
2278         REGRESSION(r220094): com.apple.WebKit.Storage lost its sandbox
2279         https://bugs.webkit.org/show_bug.cgi?id=182354
2280         <rdar://problem/37046844>
2281
2282         Reviewed by Ryosuke Niwa.
2283
2284         The Database process was renamed to Storage, but it's sandbox was not updated.
2285
2286         * Configurations/WebKit.xcconfig: Update for sandbox rename.
2287         * DerivedSources.make: Ditto.
2288         * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb: Removed.
2289         * Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Copied from Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb.
2290         * StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Removed.
2291         * StorageProcess/mac/com.apple.WebKit.Storage.sb.in: Copied from StorageProcess/mac/com.apple.WebKit.Databases.sb.in.
2292         * WebKit.xcodeproj/project.pbxproj: Update for sandbox rename.
2293
2294 2018-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
2295
2296         REGRESSION(r227223): http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html, http/tests/resourceLoadStatistics/grandfathering.html timing out on GTK, WPE
2297         https://bugs.webkit.org/show_bug.cgi?id=182222
2298
2299         Reviewed by Alex Christensen.
2300
2301         Add callbacks to notify when resource load statistics deletion is complete.
2302
2303         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2304         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
2305         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
2306         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
2307
2308 2018-01-31  Tim Horton  <timothy_horton@apple.com>
2309
2310         Occasional null deref under WebPageProxy::updateBackingStoreDiscardableState()
2311         https://bugs.webkit.org/show_bug.cgi?id=182349
2312         <rdar://problem/27822258>
2313
2314         Reviewed by Simon Fraser.
2315
2316         * UIProcess/WebPageProxy.cpp:
2317         (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
2318         m_drawingArea can be null during process launch and relaunch.
2319
2320         Cocoa ports don't use the result of setBackingStoreIsDiscardable(),
2321         but they do run this code to keep it up to date.
2322
2323 2018-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
2324
2325         [GTK] Move gir and typelib generation into ENABLE_INTROSPECTION conditional
2326         https://bugs.webkit.org/show_bug.cgi?id=182308
2327
2328         Reviewed by Carlos Garcia Campos.
2329
2330         * PlatformGTK.cmake:
2331
2332 2018-01-31  Youenn Fablet  <youenn@apple.com>
2333
2334         Remove StorageToWebProcessConnection::removeSWServerConnection
2335         https://bugs.webkit.org/show_bug.cgi?id=182305
2336
2337         Reviewed by Chris Dumez.
2338
2339         * StorageProcess/StorageToWebProcessConnection.cpp:
2340         (WebKit::StorageToWebProcessConnection::removeSWServerConnection): Deleted.
2341         * StorageProcess/StorageToWebProcessConnection.h:
2342         * StorageProcess/StorageToWebProcessConnection.messages.in:
2343
2344 2018-01-31  Carlos Garcia Campos  <cgarcia@igalia.com>
2345
2346         REGRESSION(r227544): [GTK] contextMenuEvent is NULL on CONTEXT_MENU call
2347         https://bugs.webkit.org/show_bug.cgi?id=182224
2348
2349         Reviewed by Michael Catanzaro.
2350
2351         Move the gestures handling to WebKitWebViewBase. This patch adds GestureControllerClient class, created and
2352         implemented by WebKitWebViewBase and used by GestureController instead of the WebPageProxy. This way we ensure
2353         events are handled consistently.
2354
2355         * UIProcess/API/gtk/PageClientImpl.cpp:
2356         (WebKit::PageClientImpl::doneWithTouchEvent): Cast the GdkEvent since GestureController no longer works wirth
2357         const GdkEvents.
2358         (WebKit::PageClientImpl::zoom): Use webkit_web_view_set_zoom_level() in case of WebKitWebView or
2359         WebPageProxy::setPageZoomFactor() otherwise.
2360         * UIProcess/API/gtk/PageClientImpl.h:
2361         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2362         (ClickCounter::currentClickCountForGdkButtonEvent): Receive a GdkEvent to avoid casts.
2363         (webkitWebViewBaseHandleMouseEvent): Helper function to handle mouse events.
2364         (webkitWebViewBaseButtonPressEvent): Use webkitWebViewBaseHandleMouseEvent.
2365         (webkitWebViewBaseButtonReleaseEvent): Ditto.
2366         (webkitWebViewBaseHandleWheelEvent): Helper function to handle wheel events.
2367         (webkitWebViewBaseScrollEvent): Use webkitWebViewBaseHandleWheelEvent.
2368         (webkitWebViewBaseMotionNotifyEvent): Use webkitWebViewBaseHandleMouseEvent.
2369         (webkitWebViewBaseCrossingNotifyEvent): Ditto.
2370         (webkitWebViewBaseGestureController): Pass the widget and client to GestureController.
2371         * UIProcess/gtk/GestureController.cpp:
2372         (WebKit::GestureController::GestureController): Receives a widget and client now.
2373         (WebKit::GestureController::handleEvent): Remove the const.
2374         (WebKit::GestureController::Gesture::Gesture): Initialize client.
2375         (WebKit::GestureController::Gesture::handleEvent): Remove the const.
2376         (WebKit::GestureController::DragGesture::startDrag): Use the client instead of WebPageProxy.
2377         (WebKit::GestureController::DragGesture::handleDrag): Ditto.
2378         (WebKit::GestureController::DragGesture::handleTap): Ditto.
2379         (WebKit::GestureController::DragGesture::begin): Ignore the const returned by gtk_gesture_get_last_event().
2380         (WebKit::GestureController::DragGesture::update): Ditto.
2381         (WebKit::GestureController::DragGesture::end): Ditto.
2382         (WebKit::GestureController::DragGesture::DragGesture): Receives a widget and client now.
2383         (WebKit::GestureController::SwipeGesture::startMomentumScroll): Use the client instead of WebPageProxy.
2384         (WebKit::GestureController::SwipeGesture::swipe): Ignore the const returned by gtk_gesture_get_last_event().
2385         (WebKit::GestureController::SwipeGesture::SwipeGesture): Receives a widget and client now.
2386         (WebKit::GestureController::ZoomGesture::begin): Start the zoom.
2387         (WebKit::GestureController::ZoomGesture::startZoom): Use the client instead of WebPageProxy.
2388         (WebKit::GestureController::ZoomGesture::handleZoom): Ditto.
2389         (WebKit::GestureController::ZoomGesture::ZoomGesture): Receives a widget and client now.
2390         (WebKit::GestureController::LongPressGesture::longPressed): Use the client instead of WebKitWebView.
2391         (WebKit::GestureController::LongPressGesture::pressed): Ignore the const returned by gtk_gesture_get_last_event().
2392         (WebKit::GestureController::LongPressGesture::LongPressGesture): Receives a widget and client now.
2393         (WebKit::GestureController::Gesture::simulateMouseClick): Deleted.
2394         (WebKit::createScrollEvent): Deleted.
2395         * UIProcess/gtk/GestureController.h:
2396
2397 2018-01-31  Carlos Garcia Campos  <cgarcia@igalia.com>
2398
2399         Web Automation: cookies returned by automation should have expiry time in seconds
2400         https://bugs.webkit.org/show_bug.cgi?id=182293
2401
2402         Reviewed by Brian Burg.
2403
2404         When creating a WebCore::Cookie from a WebDriver object we convert the given expiry time to milliseconds, but
2405         when creating a WebDriver object from a WebCore::Cookie we are keeping the milliseconds. We should convert to
2406         seconds for consistency, so that the WebDriver always handles seconds.
2407
2408         Fixes: imported/w3c/webdriver/tests/cookies/get_named_cookie.py::test_get_named_cookie
2409
2410         * UIProcess/Automation/WebAutomationSession.cpp:
2411         (WebKit::buildObjectForCookie): Convert expiry to seconds.
2412
2413 2018-01-31  Ryosuke Niwa  <rniwa@webkit.org>
2414
2415         Unreviewed iOS build fix.
2416
2417         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2418
2419 2018-01-30  John Wilander  <wilander@apple.com>
2420
2421         Add callbacks to testRunner.statisticsSetShouldPartitionCookiesForHost() and testRunner.statisticsUpdateCookiePartitioning()
2422         https://bugs.webkit.org/show_bug.cgi?id=181958
2423         https://bugs.webkit.org/show_bug.cgi?id=182072
2424         <rdar://problem/36801804>
2425         <rdar://problem/36845795>
2426
2427         Reviewed by Brent Fulgham.
2428
2429         Because of the asynchronous nature of XPC and cookies,
2430         we need callbacks in these TestRunner functions so that
2431         the layout tests can wait for state changes to finish
2432         before checking test conditions.
2433
2434         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2435         (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
2436         (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
2437         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2438         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning]):
2439         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning:]):
2440         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]):
2441         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:completionHandler:]):
2442         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2443         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2444         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
2445         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
2446         (WebKit::WebResourceLoadStatisticsStore::logNonRecentUserInteraction):
2447         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdate):
2448         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdateForDomains):
2449         (WebKit::WebResourceLoadStatisticsStore::scheduleClearPartitioningStateForDomains):
2450         (WebKit::WebResourceLoadStatisticsStore::mergeWithDataFromDecoder):
2451         (WebKit::WebResourceLoadStatisticsStore::clearInMemory):
2452         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):
2453         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains):
2454         (WebKit::WebResourceLoadStatisticsStore::clearPartitioningStateForDomains):
2455         * UIProcess/WebResourceLoadStatisticsStore.h:
2456
2457 2018-01-30  Ryosuke Niwa  <rniwa@webkit.org>
2458
2459         REGRESSION(r227550): Resource timing API is disabled on macOS
2460         https://bugs.webkit.org/show_bug.cgi?id=182318
2461
2462         Reviewed by Chris Dumez.
2463
2464         Resource timing API should be enabled by default all versions of macOS we support now.
2465
2466         * Shared/WebPreferences.yaml:
2467         * Shared/WebPreferencesDefaultValues.h:
2468
2469 2018-01-30  Tim Horton  <timothy_horton@apple.com>
2470
2471         WKWebView layout is sometimes wrong after rotation on iPhone X
2472         https://bugs.webkit.org/show_bug.cgi?id=182304
2473         <rdar://problem/34158671>
2474
2475         Reviewed by Simon Fraser.
2476
2477         * Platform/spi/ios/UIKitSPI.h:
2478         * UIProcess/API/Cocoa/WKWebView.mm:
2479         (-[WKWebView _computedContentInset]):
2480         (-[WKWebView _scrollViewSystemContentInset]):
2481         (activeMinimumLayoutSize):
2482         It turns out that it is not always safe to look at the safe area insets of
2483         children from inside layoutSubviews, even after the call to super.
2484
2485         Instead, make use of the fact that WKScrollView and WKWebView have identical
2486         coordinate spaces, and map WKWebView's safe area insets into the WKScrollView.
2487         It's safe to use the scroll view's affected-edges and contentScrollInset,
2488         because those aren't updated at the same outside-of-layout time that
2489         safe area insets are.
2490
2491         We could alternatively move all calls to activeMinimumLayoutSize outside
2492         of layoutSubviews, but that seems like a larger and riskier change.
2493
2494         All attempts to write a test have failed; this depends heavily on use of
2495         autolayout and the mechanism by which the system updates system-owned
2496         safe area insets during device rotation.
2497
2498 2018-01-30  Don Olmstead  <don.olmstead@sony.com>
2499
2500         JSExports.h should be included as <JavaScriptCore/JSExportMacros.h>
2501         https://bugs.webkit.org/show_bug.cgi?id=182312
2502
2503         Reviewed by Michael Catanzaro.
2504
2505         * config.h:
2506
2507 2018-01-30  Brent Fulgham  <bfulgham@apple.com>
2508
2509         Add telemetry to track storage access API adoption
2510         https://bugs.webkit.org/show_bug.cgi?id=182197
2511         <rdar://problem/35803309>
2512
2513         Reviewed by Chris Dumez.
2514
2515         Part 2: Add telemetry for the Storage Access API case
2516
2517         This change increments a counter when an origin is loaded in a first part context because
2518         it was granted Storage Access API permissions.
2519
2520         * NetworkProcess/NetworkResourceLoader.cpp:
2521         (WebKit::NetworkResourceLoader::logCookieInformation const): Add logging to indicate
2522         loads that happened with the Storage Access API enabled.
2523         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2524         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess): Increment counter for
2525         loads using the new API.
2526
2527 2018-01-30  Megan Gardner  <megan_gardner@apple.com>
2528
2529         Make preserve and restore focus more likely to be symmetrical
2530         https://bugs.webkit.org/show_bug.cgi?id=182264
2531         <rdar://problem/36948473>
2532         
2533         Reviewed by Tim Horton.
2534
2535         Keep a stack of if we actually increment the focusState, so that
2536         changes to the web content do not result in asymmetric decrements to the focus state. 
2537         To work around problems associated with <rdar://problem/37000122>.
2538
2539         * UIProcess/ios/WKContentViewInteraction.h:
2540         * UIProcess/ios/WKContentViewInteraction.mm:
2541         (-[WKContentView _restoreFocusWithToken:]):
2542         (-[WKContentView _preserveFocusWithToken:destructively:]):
2543
2544 2018-01-30  Brent Fulgham  <bfulgham@apple.com>
2545
2546         Add telemetry to track storage access API adoption
2547         https://bugs.webkit.org/show_bug.cgi?id=182197
2548         <rdar://problem/35803309>
2549
2550         Reviewed by Chris Dumez.
2551         
2552         This patch also handled aggregating the counts in the UIProcess, which has access to
2553         the right data.
2554
2555         The original patch assumed the WebContent process kept track of user interaction. This is
2556         only tracked in the UIProcess, so we can get rid of some of the logging code adding in
2557         r227755.
2558
2559         * Shared/WebProcessCreationParameters.cpp:
2560         (WebKit::WebProcessCreationParameters::encode const): Rollout of r227755 changes not
2561         needed to track the statistics.
2562         (WebKit::WebProcessCreationParameters::decode): Ditto.
2563         * Shared/WebProcessCreationParameters.h:
2564         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2565         (WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.
2566         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2567         (WebKit::WebResourceLoadStatisticsStore::wasAccessedAsFirstPartyDueToUserInteraction): Moved from
2568         the WebContent process, which does not keep track of user interaction.
2569         (WebKit::WebResourceLoadStatisticsStore::mergeStatistics): Aggregate counts while processing
2570         the statistics.
2571         * UIProcess/WebResourceLoadStatisticsStore.h:
2572         * WebProcess/WebProcess.cpp:
2573         (WebKit::WebProcess::initializeWebProcess):
2574
2575 2018-01-30  Chris Dumez  <cdumez@apple.com>
2576
2577         Make sure we never create a WebSWClientConnection with an invalid sessionID
2578         https://bugs.webkit.org/show_bug.cgi?id=182276
2579         <rdar://problem/36582633>
2580
2581         Reviewed by Alex Christensen.
2582
2583         Make sure we never create a WebSWClientConnection with an invalid sessionID as this
2584         could corrupt our hash tables.
2585
2586         * StorageProcess/StorageProcess.cpp:
2587         (WebKit::StorageProcess::swServerForSession):
2588         * UIProcess/WebProcessPool.cpp:
2589         (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
2590         * WebProcess/Storage/WebSWClientConnection.cpp:
2591         (WebKit::WebSWClientConnection::WebSWClientConnection):
2592         * WebProcess/Storage/WebServiceWorkerProvider.cpp:
2593         (WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession):
2594         (WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession):
2595         * WebProcess/Storage/WebToStorageProcessConnection.cpp:
2596         (WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession):
2597
2598 2018-01-30  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2599
2600         [WinCairo] Fix forwarding header conflict of WebKit on WinCairo
2601         https://bugs.webkit.org/show_bug.cgi?id=177202
2602
2603         Reviewed by Alex Christensen.
2604
2605         * PlatformWin.cmake:
2606
2607 2018-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2608
2609         WebDriver: evaluateJavaScriptFunction should return null when return value is undefined
2610         https://bugs.webkit.org/show_bug.cgi?id=180350
2611
2612         Reviewed by Carlos Alberto Lopez Perez.
2613
2614         undefined can't be converted to JSON string, in which case JSON.stringify() returns undefined and we handle that
2615         case to return an empty string. We currently handle this case for execute script commands, but not in all other
2616         cases where we use evaluateJavaScriptFunction. It would be simpler if evaluateJavaScriptFunction returned null,
2617         because in that case we wouldn't need to handle it as a special case.
2618
2619         15.2 Executing Script
2620         https://w3c.github.io/webdriver/webdriver-spec.html#dfn-json-clone
2621
2622         Fixes: imported/w3c/webdriver/tests/state/get_element_property.py::test_element_non_existent
2623
2624         * WebProcess/Automation/WebAutomationSessionProxy.js:
2625         (let.AutomationSessionProxy.prototype._jsonStringify): Return "null" instead of "" when undefined is given.
2626
2627 2018-01-29  Ryosuke Niwa  <rniwa@webkit.org>
2628
2629         Release assert in updateLayout while waiting for sync reply to WebPageProxy::HasInsecureContent
2630         https://bugs.webkit.org/show_bug.cgi?id=182273
2631
2632         Reviewed by Chris Dumez.
2633
2634         The assertion was caused by unrelated sync IPCs being processed while WebContent process is waiting for
2635         the reply to WebPageProxy::HasInsecureContent. Since this IPC can be used while creating CachedFrame,
2636         it's not safe to execute arbitrary code.
2637
2638         Fixed the bug by using DoNotProcessIncomingMessagesWhenWaitingForSyncReply added in r227566.
2639
2640         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2641         (WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame):
2642
2643 2018-01-29  Wenson Hsieh  <wenson_hsieh@apple.com>
2644
2645         Add a build step to copy resources from WebKitAdditions as bundle resources in WebKit
2646         https://bugs.webkit.org/show_bug.cgi?id=182268
2647         <rdar://problem/37003784>
2648
2649         Reviewed by Tim Horton and Dan Bernstein.
2650
2651         Adds a "Copy Additional Resources" phase when building WebKit. This phase copies resources from
2652         usr/local/include/WebKitAdditions/WebKit/AdditionalResources in the build directory into the
2653         unlocalized resources directory. If the AdditionalResources directory does not exist in the build
2654         directory, we fall back to searching the SDK.
2655
2656         * WebKit.xcodeproj/project.pbxproj:
2657
2658 2018-01-29  Youenn Fablet  <youenn@apple.com>
2659
2660         ServiceWorkerClientFetch should not consider responses without Location headers as redirection responses
2661         https://bugs.webkit.org/show_bug.cgi?id=182134
2662
2663         Reviewed by Chris Dumez.
2664
2665         As per fetch spec, a response with a redirection status code but no Location header should not be considered as a redirection.
2666         This is also consistent with SubresourceLoader::didReceiveResponse.
2667
2668         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
2669         (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
2670
2671 2018-01-29  Youenn Fablet  <youenn@apple.com>
2672
2673         Cache API should make sure to resolve caches.open promises in the same order as called
2674         https://bugs.webkit.org/show_bug.cgi?id=182193
2675         <rdar://problem/36930363>
2676
2677         Reviewed by Chris Dumez.
2678
2679         Covered by added test.
2680         Whenever opening/removing a cache requires writing to disk, wait to finish the task
2681         until any disk writing task is done.
2682         Applying this strategy when clearing data so that we also clear data that is pending to be written.
2683         For removing cache, we now return whether a cache was actually deleted by returning zero as removed cache identifier.
2684         WebCore uses that information to return true/false as promise resolution value.
2685
2686         * NetworkProcess/cache/CacheStorageEngine.cpp:
2687         (WebKit::CacheStorage::Engine::retrieveCaches):
2688         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2689         (WebKit::CacheStorage::Caches::clear):
2690         (WebKit::CacheStorage::Caches::open):
2691         (WebKit::CacheStorage::Caches::remove):
2692         (WebKit::CacheStorage::Caches::writeCachesToDisk):
2693         (WebKit::CacheStorage::Caches::cacheInfos):
2694         (WebKit::CacheStorage::Caches::cacheInfos const): Deleted.
2695         * NetworkProcess/cache/CacheStorageEngineCaches.h:
2696         (WebKit::CacheStorage::Caches::createWeakPtr):
2697
2698 2018-01-29  Alex Christensen  <achristensen@webkit.org>
2699
2700         Clean up API after bugs 178240 and 176474
2701         https://bugs.webkit.org/show_bug.cgi?id=182259
2702
2703         Reviewed by Dan Bernstein.
2704
2705         NS_OPTIONS should be NSUInteger, not NSInteger.  This is how all other NS_OPTIONS in WebKit are,
2706         and it's necessary if we get really big numbers as options.  Changing them won't cause binary
2707         incompatibility unless someone does signed integer comparison with currently invalid values.
2708
2709         Added availability macros I forgot to add earlier.
2710
2711         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2712         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2713
2714 2018-01-29  Jiewen Tan  <jiewen_tan@apple.com>
2715
2716         [WebAuthN] Add a compile-time feature flag
2717         https://bugs.webkit.org/show_bug.cgi?id=182211
2718         <rdar://problem/36936365>
2719
2720         Reviewed by Brent Fulgham.
2721
2722         * Configurations/FeatureDefines.xcconfig:
2723
2724 2018-01-29  John Wilander  <wilander@apple.com>
2725
2726         Resource Load Statistics: Introduce debug mode as experimental feature
2727         https://bugs.webkit.org/show_bug.cgi?id=182199
2728         <rdar://problem/36930364>
2729
2730         Reviewed by Alex Christensen.
2731
2732         The only changes to default behavior are:
2733         - Increased resolution on timestamps which is needed to be able to set shorter
2734           timeouts in debug mode.
2735         - Only update partitioning and blocking table when needed. This is an optimization
2736           which pays off in less XPC with shorter timeouts.
2737
2738         * Shared/WebPreferences.yaml:
2739         * UIProcess/API/APIWebsiteDataStore.cpp:
2740         (API::WebsiteDataStore::resourceLoadStatisticsDebugMode const):
2741         (API::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
2742         * UIProcess/API/APIWebsiteDataStore.h:
2743         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2744         (WKWebsiteDataStoreSetResourceLoadStatisticsDebugMode):
2745         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
2746         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2747         (-[WKWebsiteDataStore _resourceLoadStatisticsDebugMode]):
2748         (-[WKWebsiteDataStore _setResourceLoadStatisticsDebugMode:]):
2749         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2750         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2751         (WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode):
2752         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
2753         * UIProcess/WebResourceLoadStatisticsStore.h:
2754         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2755         (WebKit::WebsiteDataStore::resourceLoadStatisticsDebugMode const):
2756         (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
2757         * UIProcess/WebsiteData/WebsiteDataStore.h:
2758
2759 2018-01-29  Andy Estes  <aestes@apple.com>
2760
2761         [iOS] Restrict synthetic clicks to the origin that handled the underlying touch event
2762         https://bugs.webkit.org/show_bug.cgi?id=182252
2763         <rdar://problem/21555881>
2764
2765         Reviewed by Tim Horton.
2766
2767         * WebProcess/WebPage/WebPage.cpp:
2768         (WebKit::WebPage::dispatchTouchEvent):
2769         (WebKit::WebPage::updatePotentialTapSecurityOrigin):
2770
2771         Record the target frame origin of touch events that are potential taps, are
2772         TouchStart events, are targeted in frames that have touch event listeners, and are not
2773         handled by those listeners.
2774
2775         * WebProcess/WebPage/WebPage.h:
2776         * WebProcess/WebPage/ios/WebPageIOS.mm:
2777         (WebKit::WebPage::potentialTapAtPosition):
2778         (WebKit::WebPage::commitPotentialTap):
2779         (WebKit::WebPage::cancelPotentialTapInFrame):
2780
2781         Passed the target frame origin to Frame::nodeRespondingToClickEvents() then cleared it.
2782
2783 2018-01-29  Alex Christensen  <achristensen@webkit.org>
2784
2785         Make policy checks more robust against null pointer dereferencing
2786         https://bugs.webkit.org/show_bug.cgi?id=182263
2787         <rdar://problem/34895714>
2788
2789         Reviewed by Tim Horton.
2790
2791         We're still dereferencing null.  Check everything.
2792
2793         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2794         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2795
2796 2018-01-29  Brent Fulgham  <bfulgham@apple.com>
2797
2798         Add telemetry to track storage access API adoption
2799         https://bugs.webkit.org/show_bug.cgi?id=182197
2800         <rdar://problem/35803309>
2801
2802         Reviewed by Chris Dumez.
2803
2804         Part 1: Add telemetry for the user interaction case
2805         
2806         This patch adds telemetry to track how frequently third-party cookies are
2807         used in a first party context due to user interaction. This will help
2808         understand cases where the new Storage Access API can help, and to help
2809         us understand if we have considered relevant use cases in its design.
2810
2811         * Shared/WebProcessCreationParameters.cpp:
2812         (WebKit::WebProcessCreationParameters::encode const):
2813         (WebKit::WebProcessCreationParameters::decode):
2814         * Shared/WebProcessCreationParameters.h:
2815         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2816         (WebKit::WebProcessPool::platformInitializeWebProcess):
2817         * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
2818         (WebKit::sortedPrevalentResourceTelemetry): Update for new telemetry.
2819         (WebKit::submitTopList): Update for new data types.
2820         * WebProcess/WebProcess.cpp:
2821         (WebKit::WebProcess::initializeWebProcess): Handle the partitioning time
2822         passed from the UIProcess.
2823
2824 2018-01-29  Alex Christensen  <achristensen@webkit.org>
2825
2826         Fix crash when during canAuthenticateAgainstProtectionSpace
2827         https://bugs.webkit.org/show_bug.cgi?id=182260
2828         <rdar://problem/34911343>
2829
2830         Reviewed by Chris Dumez.
2831
2832         If we have a valid network load with no challenge completion handler and we are
2833         telling it to continue with the challenge handling, something has gone wrong.
2834         Maybe we've just recovered from a crashed network process.  If this happens, do nothing.
2835
2836         * NetworkProcess/NetworkLoad.cpp:
2837         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
2838
2839 2018-01-29  Zach Li  <zacharyli323@gmail.com>
2840
2841         Warning in 32-bit WebKit build when trying to link to SafariSafeBrowsing
2842         https://bugs.webkit.org/show_bug.cgi?id=182251
2843         rdar://problem/36964995
2844
2845         Reviewed by Alex Christensen.
2846
2847         * Configurations/WebKit.xcconfig:
2848         Only link against SafariSafeBrowsing framework in 64-bit architecture.
2849
2850         * Platform/spi/Cocoa/SafeBrowsingSPI.h:
2851         Guard the Safe Browsing code with WK_API_ENABLED.
2852
2853 2018-01-29  Chris Dumez  <cdumez@apple.com>
2854
2855         Make sure we do not re-enter Webcore during StorageToWebProcessConnection::EstablishSWServerConnection Sync IPC
2856         https://bugs.webkit.org/show_bug.cgi?id=182256
2857         <rdar://problem/36689233>
2858
2859         Reviewed by Simon Fraser.
2860
2861         Make sure we do not re-enter Webcore during StorageToWebProcessConnection::EstablishSWServerConnection Sync IPC as
2862         this can lead to crashes such as the one in <rdar://problem/36689233>.
2863
2864         * WebProcess/Storage/WebSWClientConnection.cpp:
2865         (WebKit::WebSWClientConnection::WebSWClientConnection):
2866
2867 2018-01-29  Jan-Michael Brummer  <jan.brummer@tabos.org>
2868
2869         [GTK] Zooming gesture incorrectly uses scale instead of zoom 
2870         https://bugs.webkit.org/show_bug.cgi?id=182174
2871
2872         Reviewed by Michael Catanzaro.
2873
2874         Switch zooming gesture to use zoom instead of scale function.
2875
2876         * UIProcess/gtk/GestureController.cpp:
2877         (WebKit::GestureController::ZoomGesture::begin):
2878         (WebKit::GestureController::ZoomGesture::handleZoom):
2879
2880 2018-01-29  Brady Eidson  <beidson@apple.com>
2881
2882         Make it possible for apps that use both WK1 and WK2 to use MessagePorts.
2883         https://bugs.webkit.org/show_bug.cgi?id=182229
2884
2885         Reviewed by Chris Dumez.
2886
2887         * UIProcess/UIMessagePortChannelProvider.cpp:
2888         (WebKit::UIMessagePortChannelProvider::UIMessagePortChannelProvider):
2889
2890         * UIProcess/WebPageProxy.cpp:
2891         (WebKit::m_configurationPreferenceValues): The UI process does not need to override the 
2892           global singleton provider. It can remain the default ProviderImpl to allow WK1 views 
2893           to work fine, too.
2894
2895 2018-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2896
2897         WebDriver: ASSERTION FAILED: !m_loadTimer.isActive()
2898         https://bugs.webkit.org/show_bug.cgi?id=182237
2899
2900         Reviewed by Carlos Alberto Lopez Perez.
2901
2902         We should stop the load timer when we dispatch the pending navigation callbacks due to an alert open.
2903
2904         * UIProcess/Automation/WebAutomationSession.cpp:
2905         (WebKit::WebAutomationSession::willShowJavaScriptDialog):
2906
2907 2018-01-29  Zan Dobersek  <zdobersek@igalia.com>
2908
2909         [Cairo] Add GraphicsContextImplCairo::createFactory() helpers
2910         https://bugs.webkit.org/show_bug.cgi?id=182238
2911
2912         Reviewed by Carlos Garcia Campos.
2913
2914         Use GraphicsContextImplCairo::createFactory() helpers throughout the
2915         Cairo-specific GraphicsContext constructors in the WebKit layer.
2916
2917         * Shared/cairo/ShareableBitmapCairo.cpp:
2918         (WebKit::ShareableBitmap::createGraphicsContext):
2919         * UIProcess/cairo/BackingStoreCairo.cpp:
2920         (WebKit::BackingStore::incorporateUpdate):
2921         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2922         (WebKit::WebPrintOperationGtk::renderPage):
2923
2924 2018-01-29  Zan Dobersek  <zdobersek@igalia.com>
2925
2926         [Cairo] Remove the GraphicsContext(cairo_t*) constructor
2927         https://bugs.webkit.org/show_bug.cgi?id=182234
2928
2929         Reviewed by Carlos Garcia Campos.
2930
2931         Call sites of the GraphicsContext(cairo_t*) constructor are adjusted to
2932         instead provide a factory function that returns a fresh
2933         GraphicsContextImplCairo object, passing that cairo_t object to its
2934         constructor.
2935
2936         * Shared/cairo/ShareableBitmapCairo.cpp:
2937         (WebKit::ShareableBitmap::createGraphicsContext):
2938         * UIProcess/cairo/BackingStoreCairo.cpp:
2939         (WebKit::BackingStore::incorporateUpdate):
2940         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2941         (WebKit::WebPrintOperationGtk::renderPage):
2942
2943 2018-01-26  Megan Gardner  <megan_gardner@apple.com>
2944
2945         Don't retain focus for input peripheral views
2946         https://bugs.webkit.org/show_bug.cgi?id=182204
2947
2948         Reviewed by Tim Horton.
2949
2950         Retaining focus on input peripheral views makes it so they cannot dismiss themselves with
2951         the current architecture. This should probably be fixed in UIKit, as there is no reason for
2952         focus to be retained on these views anyways, as they don't have keyboard input, but this
2953         guards against over-aggressive retain requests.
2954
2955         * UIProcess/ios/WKContentViewInteraction.mm:
2956         (-[WKContentView _restoreFocusWithToken:]):
2957         (-[WKContentView _preserveFocusWithToken:destructively:]):
2958
2959 2018-01-26  Chris Dumez  <cdumez@apple.com>
2960
2961         Make sure service worker code does not launch a StorageProcess unnecessarily
2962         https://bugs.webkit.org/show_bug.cgi?id=182192
2963         <rdar://problem/36927427>
2964
2965         Reviewed by Geoffrey Garen.
2966
2967         When calling WebProcess::existingWebToStorageProcessConnection(), make sure we do not
2968         force the creation of a WebProcess connection to the StorageProcess. If there is
2969         no WebProcess, just return false right away.
2970
2971         * WebProcess/Storage/WebServiceWorkerProvider.cpp:
2972         (WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession):
2973         * WebProcess/WebProcess.h:
2974
2975 2018-01-26  Alex Christensen  <achristensen@webkit.org>
2976
2977         Allow cellular access for default-created ephemeral sessions
2978         https://bugs.webkit.org/show_bug.cgi?id=182179
2979         <rdar://problem/36572023>
2980
2981         Reviewed by Andy Estes.
2982
2983         This makes it so when we recover from a NetworkProcess crash (see r227590) on iOS, we will
2984         be able to continue browsing using cell data.
2985
2986         * Shared/WebsiteDataStoreParameters.cpp:
2987         (WebKit::WebsiteDataStoreParameters::privateSessionParameters):
2988         * UIProcess/WebProcessPool.cpp:
2989         (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
2990         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2991         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
2992
2993 2018-01-26  Alex Christensen  <achristensen@webkit.org>
2994
2995         Clean up more networking code
2996         https://bugs.webkit.org/show_bug.cgi?id=182161
2997
2998         Reviewed by Anders Carlsson.
2999
3000         Two cleanups:
3001         1. The WebProcess doesn't need to initialize NetworkSessions.
3002         2. WebFrameNetworkingContext doesn't need to have the NetworkingContext functions to support ResourceHandles in WebKit any more.
3003
3004         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3005         * NetworkProcess/NetworkLoad.h:
3006         * NetworkProcess/RemoteNetworkingContext.h:
3007         (): Deleted.
3008         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3009         * NetworkProcess/curl/RemoteNetworkingContextCurl.cpp:
3010         (WebKit::RemoteNetworkingContext::~RemoteNetworkingContext): Deleted.
3011         (WebKit::RemoteNetworkingContext::isValid const): Deleted.
3012         (WebKit::RemoteNetworkingContext::storageSession const): Deleted.
3013         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3014         (WebKit::RemoteNetworkingContext::~RemoteNetworkingContext): Deleted.
3015         (WebKit::RemoteNetworkingContext::isValid const): Deleted.
3016         (WebKit::RemoteNetworkingContext::localFileContentSniffingEnabled const): Deleted.
3017         (WebKit::RemoteNetworkingContext::storageSession const): Deleted.
3018         (WebKit::RemoteNetworkingContext::sourceApplicationAuditData const): Deleted.
3019         (WebKit::RemoteNetworkingContext::sourceApplicationIdentifier const): Deleted.
3020         (WebKit::RemoteNetworkingContext::blockedError const): Deleted.
3021         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
3022         (WebKit::RemoteNetworkingContext::~RemoteNetworkingContext): Deleted.
3023         (WebKit::RemoteNetworkingContext::isValid const): Deleted.
3024         (WebKit::RemoteNetworkingContext::storageSession const): Deleted.
3025         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3026         (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
3027         * WebProcess/WebProcess.cpp:
3028         (WebKit::WebProcess::initializeWebProcess):
3029         (WebKit::WebProcess::clearCachedCredentials):
3030
3031 2018-01-26  Jan-Michael Brummer  <jan.brummer@tabos.org>
3032
3033         [GTK] Support using long-tap gesture to open context menu
3034         https://bugs.webkit.org/show_bug.cgi?id=140747
3035
3036         Reviewed by Carlos Garcia Campos.
3037
3038         Add long press gesture which simulates a secondary mouse press to open context menu.
3039
3040         * UIProcess/gtk/GestureController.cpp:
3041         (WebKit::GestureController::GestureController):
3042         (WebKit::GestureController::handleEvent):
3043         (WebKit::GestureController::isProcessingGestures const):
3044         (WebKit::GestureController::Gesture::simulateMousePress):
3045         (WebKit::GestureController::DragGesture::handleTap):
3046         (WebKit::GestureController::LongPressGesture::longPressed):
3047         (WebKit::GestureController::LongPressGesture::pressed):
3048         (WebKit::GestureController::LongPressGesture::LongPressGesture):
3049         * UIProcess/gtk/GestureController.h:
3050         (WebKit::GestureController::reset):
3051
3052 2018-01-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3053
3054         Unreviewed. REGRESSION(r227647): window.open() is broken in GTK and WPE after r227647.
3055
3056         In r227647, API::UIClient::createNewPage() was changed to use CompletionHandler instead of Function. All
3057         implementations were updated expect the GLib one, and we didn't notice it because the method doesn't have the
3058         final/override mark.
3059
3060         * UIProcess/API/glib/WebKitUIClient.cpp:
3061         (UIClient::createNewPage):
3062
3063 2018-01-25  Sergio Villar Senin  <svillar@igalia.com>
3064
3065         [WebVR] Make WebVR available by default for developer builds
3066         https://bugs.webkit.org/show_bug.cgi?id=182101
3067
3068         Reviewed by Michael Catanzaro.
3069
3070         Moved WebVR setting to the experimental features section and make it
3071         available by default for developer builds for GTK and WPE.
3072
3073         * Shared/WebPreferences.yaml:
3074
3075 2018-01-25  Alex Christensen  <achristensen@webkit.org>
3076
3077         REGRESSION (r221899): Web Content process hangs when webpage tries to make a new window if the WKWebView doesn’t have a UI delegate
3078         https://bugs.webkit.org/show_bug.cgi?id=182152
3079
3080         Reviewed by Joseph Pecoraro.
3081
3082         Call the completion handler of the default API::UIClient::createNewPage.
3083
3084         * UIProcess/API/APIUIClient.h:
3085         (API::UIClient::createNewPage):
3086         * UIProcess/API/C/WKPage.cpp:
3087         (WKPageSetPageUIClient):
3088         * UIProcess/Cocoa/UIDelegate.h:
3089         * UIProcess/Cocoa/UIDelegate.mm:
3090         (WebKit::UIDelegate::UIClient::createNewPage):
3091
3092 2018-01-25  Wenson Hsieh  <wenson_hsieh@apple.com>
3093
3094         [iOS] [WK2] Introduce new views and view controllers to support extra-zoomed text form controls
3095         https://bugs.webkit.org/show_bug.cgi?id=182000
3096         <rdar://problem/35143035>
3097
3098         Reviewed by Tim Horton.
3099
3100         Add new files to support text form control editing while extra-zoomed.
3101
3102         * UIProcess/ios/forms/WKFocusedFormControlView.h: Added.
3103         * UIProcess/ios/forms/WKFocusedFormControlView.mm: Added.
3104         * UIProcess/ios/forms/WKFocusedFormControlViewController.h: Added.
3105         * UIProcess/ios/forms/WKFocusedFormControlViewController.mm: Added.
3106         * UIProcess/ios/forms/WKTextFormControlViewController.h: Added.
3107         * UIProcess/ios/forms/WKTextFormControlViewController.mm: Added.
3108         * UIProcess/ios/forms/WKTextInputViewController.h: Added.
3109         * UIProcess/ios/forms/WKTextInputViewController.mm: Added.
3110         * UIProcess/ios/forms/WKTextSuggestionButton.h: Added.
3111         * UIProcess/ios/forms/WKTextSuggestionButton.mm: Added.
3112         * WebKit.xcodeproj/project.pbxproj:
3113
3114 2018-01-25  Chris Dumez  <cdumez@apple.com>
3115
3116         Clients.get(id) should only returns clients in the service worker's origin
3117         https://bugs.webkit.org/show_bug.cgi?id=182149
3118         <rdar://problem/36882310>
3119
3120         Reviewed by Youenn Fablet.
3121
3122         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3123         (WebKit::WebSWServerConnection::postMessageToServiceWorker):
3124
3125 2018-01-25  Youenn Fablet  <youenn@apple.com>
3126
3127         WebPluginInfoProvider should handle null host queries
3128         https://bugs.webkit.org/show_bug.cgi?id=182112
3129
3130         Reviewed by Chris Dumez.
3131
3132         Return early if host is null.
3133
3134         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
3135         (WebKit::WebPluginInfoProvider::populatePluginCache):
3136
3137 2018-01-25  Simon Fraser  <simon.fraser@apple.com>
3138
3139         ASSERT(CGSizeEqualToSize(m_resizeScrollOffset, CGSizeZero)) in WebViewImpl::setFrameAndScrollBy()
3140         https://bugs.webkit.org/show_bug.cgi?id=182082
3141         rdar://problem/13971838
3142
3143         Reviewed by Tim Horton.
3144
3145         Safari could call WebViewImpl::setFrameAndScrollBy() multiple times with different scroll offsets,
3146         triggering this assertion.
3147
3148         Rename to m_resizeScrollOffset to m_scrollOffsetAdjustment to reduce confusion with actual scroll offsets.
3149         This parameter has no effect on macOS, but is used by the -[WKWebView setFrame:andScrollBy:] so at some point
3150         needs to be hooked up to allow synchronous view resize and scroll adjustment (e.g. for the Find bar animation).
3151         
3152         Remove DrawingAreaProxy's m_layerPosition which was unused, and remove the parameters from the UpdateGeometry message.
3153
3154         * UIProcess/API/Cocoa/WKWebView.mm:
3155         (-[WKWebView _frameOrBoundsChanged]):
3156         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3157         * UIProcess/Cocoa/WebViewImpl.h:
3158         * UIProcess/Cocoa/WebViewImpl.mm:
3159         (WebKit::WebViewImpl::setFrameAndScrollBy):
3160         (WebKit::WebViewImpl::setDrawingAreaSize):
3161         * UIProcess/DrawingAreaProxy.cpp:
3162         (WebKit::DrawingAreaProxy::setSize):
3163         * UIProcess/DrawingAreaProxy.h:
3164         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
3165         (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
3166         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
3167         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
3168         * WebProcess/WebPage/DrawingArea.h:
3169         (WebKit::DrawingArea::updateGeometry):
3170         * WebProcess/WebPage/DrawingArea.messages.in:
3171         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
3172         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
3173         (WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
3174         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3175         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3176         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
3177
3178 2018-01-25  Keith Rollin  <krollin@apple.com>
3179
3180         Add logging to facilitate binding of WebContent and Network processes to UI process
3181         https://bugs.webkit.org/show_bug.cgi?id=182066
3182
3183         Reviewed by Brent Fulgham.
3184
3185         When examining sysdiagnose logs and tracing events from one process to
3186         another, it would be helpful to know which WebKit processes were
3187         related to each other. When Safari, Mail, Messages, etc. are all
3188         running at the same time, it may otherwise be difficult to know if a
3189         particular Network process, for example was associated with Safari or
3190         some other application. Add some logging to the creation of WebContent
3191         and Network processes to identify their "presenting process" (parent
3192         application).
3193
3194         * NetworkProcess/NetworkProcess.cpp:
3195         (WebKit::NetworkProcess::initializeNetworkProcess):
3196         * Platform/Logging.h:
3197         * WebProcess/WebProcess.cpp:
3198         (WebKit::WebProcess::initializeWebProcess):
3199
3200 2018-01-25  Youenn Fablet  <youenn@apple.com>
3201
3202         DocumentLoader should interrupt ongoing load when getting a redirection from network that matches a service worker
3203         https://bugs.webkit.org/show_bug.cgi?id=182115
3204
3205         Reviewed by Alex Christensen.
3206
3207         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
3208         (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
3209
3210 2018-01-25  Alex Christensen  <achristensen@webkit.org>
3211
3212         Fix crash when preconnecting while closing private browsing
3213         https://bugs.webkit.org/show_bug.cgi?id=182114
3214         <rdar://problem/35637284>
3215
3216         Reviewed by Joseph Pecoraro.
3217
3218         * NetworkProcess/PreconnectTask.cpp:
3219         There is a race condition when destroying a session while a page is initiating a preconnect.
3220         If this happens, fail gracefully instead of trying to preconnect with a null session.
3221
3222 2018-01-25  Dan Bernstein  <mitz@apple.com>
3223
3224         [Mac] Enable library validation for Networking & Storage XPC services
3225         https://bugs.webkit.org/show_bug.cgi?id=173424
3226         <rdar://problem/32386565>
3227
3228         Reviewed by Joseph Pecoraro.
3229
3230         * Configurations/BaseXPCService.xcconfig: Moved the definitions of
3231           WK_LIBRARY_VALIDATION_ENABLED and WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS from
3232           WebContentService.xcconfig to here and made them Mac-only at this level.
3233         * Configurations/NetworkService.xcconfig: Also set OTHER_CODE_SIGN_FLAGS to
3234           WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS.
3235         * Configurations/StorageService.xcconfig: Ditto.
3236         * Configurations/WebContentService.xcconfig: Moved definitions from here to
3237           BaseXPCService.xcconfig.
3238
3239 2018-01-25  David Hyatt  <hyatt@apple.com>
3240
3241         Enable lines clamp support for Apple Mail by default
3242         https://bugs.webkit.org/show_bug.cgi?id=182113
3243
3244         Reviewed by Dean Jackson.
3245
3246         * Shared/WebPageCreationParameters.cpp:
3247         (WebKit::WebPageCreationParameters::encode const):
3248         (WebKit::WebPageCreationParameters::decode):
3249         * Shared/WebPageCreationParameters.h:
3250         * UIProcess/WebPageProxy.cpp:
3251         (WebKit::WebPageProxy::creationParameters):
3252         * UIProcess/WebPageProxy.h:
3253         * UIProcess/mac/WebPageProxyMac.mm:
3254         (WebKit::WebPageProxy::appleMailLinesClampEnabled):
3255         * WebProcess/WebPage/WebPage.cpp:
3256         (WebKit::m_cpuLimit):
3257
3258 2018-01-25  Sergio Villar Senin  <svillar@igalia.com>
3259
3260         [WebVR][GTK][WPE] Remove the WebVR public API added in r227518
3261         https://bugs.webkit.org/show_bug.cgi?id=182102
3262
3263         Reviewed by Carlos Garcia Campos.
3264
3265         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
3266
3267 2018-01-25  Sergio Villar Senin  <svillar@igalia.com>
3268
3269         [WebVR][GTK][WPE] Remove the WebVR public API added in r227518
3270         https://bugs.webkit.org/show_bug.cgi?id=182102
3271
3272         Reviewed by Carlos Garcia Campos.
3273
3274         This new public API was not supposed to be included in the patch
3275         that added OpenVR to the tree and to the build.
3276
3277         * UIProcess/API/glib/WebKitSettings.cpp:
3278         (webKitSettingsSetProperty):
3279         (webKitSettingsGetProperty):
3280         (webkit_settings_class_init):
3281         (webkit_settings_get_enable_webvr): Deleted.
3282         (webkit_settings_set_enable_webvr): Deleted.
3283         * UIProcess/API/gtk/WebKitSettings.h:
3284         * UIProcess/API/wpe/WebKitSettings.h:
3285
3286 2018-01-25  Claudio Saavedra  <csaavedra@igalia.com>
3287
3288         [GTK] Fix build with touch events disabled
3289
3290         Unreviewed build fix.
3291
3292         Explicitly include gtk.h in files that were indirectly getting it
3293         only when touch events were enabled.
3294         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
3295         * UIProcess/gtk/WaylandCompositor.h:
3296
3297 2018-01-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3298
3299         WebDriver: test imported/selenium/py/test/selenium/webdriver/common/alerts_tests.py crashes in debug
3300         https://bugs.webkit.org/show_bug.cgi?id=182096
3301
3302         Reviewed by Carlos Alberto Lopez Perez.
3303
3304         It's an assert in HashTable iterators checkValidity(). The problem is that we get the keys to iterate the values
3305         and the map is modified inside the loop. We need to use copyToVector to copy the keys.
3306
3307         * UIProcess/Automation/WebAutomationSession.cpp:
3308         (WebKit::WebAutomationSession::respondToPendingPageNavigationCallbacksWithTimeout):
3309         (WebKit::WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout):
3310         (WebKit::WebAutomationSession::willShowJavaScriptDialog):
3311
3312 2018-01-24  Alex Christensen  <achristensen@webkit.org>
3313
3314         Gracefully recover from NetworkProcess crashes in private browsing
3315         https://bugs.webkit.org/show_bug.cgi?id=182073
3316         <rdar://problem/36572023>
3317
3318         Reviewed by Geoff Garen.
3319
3320         If we're using a non-persistent WKWebsiteDataStore and the NetworkProcess crashes and we try to do a load,
3321         then the WebProcess restarts the NetworkProcess but doesn't recreate the ephemeral session in the NetworkProcess.
3322         When this happens, we've already lost the browsing state in memory in the NetworkProcess, but we don't want to hang.
3323         If this is the problem, then just recreate the ephemeral session and continue loading.
3324
3325         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3326         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
3327         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):
3328         * NetworkProcess/NetworkResourceLoader.cpp:
3329         (WebKit::NetworkResourceLoader::startNetworkLoad):
3330         * Shared/WebsiteDataStoreParameters.cpp:
3331         (WebKit::WebsiteDataStoreParameters::privateSessionParameters):
3332         (WebKit::WebsiteDataStoreParameters::legacyPrivateSessionParameters): Deleted.
3333         * Shared/WebsiteDataStoreParameters.h:
3334         (WebKit::WebsiteDataStoreParameters::legacyPrivateSessionParameters):
3335
3336 2018-01-24  Dan Bernstein  <mitz@apple.com>
3337
3338         Enable library validation on the Web Content service
3339         Part 1 of https://bugs.webkit.org/show_bug.cgi?id=172365
3340         <rdar://problem/26470661>
3341
3342         Reviewed by David Kilzer.
3343
3344         This makes the Web Content process signed with the Library Validation flag in production
3345         builds. Because doing so would prevent engineering builds of Apple apps that use an
3346         injected bundle from working, this also adds a Development version of the service, which
3347         does not enforce Library Validation. The UI process chooses to use the Development service
3348         iff it would need to load an injected bundle that is not part of the OS.
3349
3350         * Configurations/DebugRelease.xcconfig: Disable Library Validation in engineering builds.
3351
3352         * Configurations/WebContentService.Development.xcconfig: Added. Like the normal service, but
3353           only installed when WebKit is installed in the OS, and uses a Development variant.
3354
3355         * Configurations/WebContentService.xcconfig: For the Development variant, append
3356           ".Development" to the product name, which is also the service identifier. Enable Library
3357           Validation for the Normal variant of the service when WK_LIBRARY_VALIDATION_ENABLED allows
3358           it.
3359
3360         * UIProcess/Launcher/ProcessLauncher.h: Add nonValidInjectedCodeAllowed member to
3361           LaunchOptions, false by default.
3362
3363         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3364         (WebKit::serviceName): Use the Development variant if nonValidInjectedCodeAllowed is true.
3365
3366         * UIProcess/WebProcessProxy.cpp:
3367         (WebKit::WebProcessProxy::getLaunchOptions): Initialize nonValidInjectedCodeAllowed using
3368            the new shouldAllowNonValidInjectedCode().
3369         (WebKit::WebProcessProxy::shouldAllowNonValidInjectedCode const): Generic implementation
3370           that returns false.
3371         * UIProcess/WebProcessProxy.h: Declared shouldAllowNonValidInjectedCode.
3372         * UIProcess/mac/WebProcessProxyMac.mm:
3373         (WebKit::WebProcessProxy::shouldAllowNonValidInjectedCode const): Return true if this is
3374           system WebKit with a non-system injected bundle.
3375
3376         * WebKit.xcodeproj/project.pbxproj: Added new service target.
3377
3378 2018-01-24  Chris Dumez  <cdumez@apple.com>
3379
3380         Add a IPC::SendSyncOption indicating we should not process incoming IPC while waiting for the sync reply
3381         https://bugs.webkit.org/show_bug.cgi?id=182021
3382         <rdar://problem/21629943>
3383
3384         Reviewed by Ryosuke Niwa.
3385
3386         Add a new DoNotProcessIncomingMessagesWhenWaitingForSyncReply SendSyncOption that the caller can
3387         set when calling sendSync(). This indicates that the sendSync() should return only when we receive
3388         the response to our sync IPC message, and that we should not process ANY incoming IPC in the meantime.
3389
3390         This patch also starts using this flag in 3 places where we know processing incoming IPC is an issue
3391         and is causing crashes.
3392
3393         * Platform/IPC/Connection.cpp:
3394         (IPC::Connection::sendSyncMessage):
3395         When DoNotProcessIncomingMessagesWhenWaitingForSyncReply SendSyncOption is set, make sure
3396         we set the ShouldDispatchMessageWhenWaitingForSyncReply flag on the encoder. If we did not set this
3397         flag then it could cause deadlocks when the destination process is also waiting on a synchronous
3398         IPC from us. Normally, this flag already gets set for sync messages because sendSyncMessage() calls
3399         sendMessage() with DispatchMessageEvenWhenWaitingForSyncReply SyncOption. However, sendMessage()
3400         ignores the DispatchMessageEvenWhenWaitingForSyncReply flag if the
3401         m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage flag is set on the
3402         connection. Note that this flag is set on the connection from the WebProcess to the UIProcess at
3403         the moment, which is why we saw deadlocks on the previous iteration of this patch.
3404
3405         (IPC::Connection::waitForSyncReply):
3406         If DoNotProcessIncomingMessagesWhenWaitingForSyncReply SendSyncOption is set, do not
3407         process incoming IPC messages while waiting for our sync IPC reply.
3408
3409         * Platform/IPC/Connection.h:
3410         Add new SendSyncOption.
3411
3412         * UIProcess/WebProcessProxy.cpp:
3413         (WebKit::WebProcessProxy::testIncomingSyncIPCMessageWhileWaitingForSyncReply):
3414         * UIProcess/WebProcessProxy.h:
3415         * UIProcess/WebProcessProxy.messages.in:
3416         Testing infrastructure.
3417
3418         * WebProcess/Network/WebLoaderStrategy.cpp:
3419         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
3420         Use new flag.
3421
3422         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3423         (WebKit::WebChromeClient::testIncomingSyncIPCMessageWhileWaitingForSyncReply):
3424         * WebProcess/WebCoreSupport/WebChromeClient.h:
3425         Testing infrastructure.
3426
3427         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3428         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
3429         Use new flag.
3430
3431         * WebProcess/WebProcess.cpp:
3432         (WebKit::WebProcess::syncIPCMessageWhileWaitingForSyncReplyForTesting):
3433         Testing infrastructure.
3434
3435         (WebKit::WebProcess::ensureNetworkProcessConnection):
3436         Use new flag.
3437
3438         * WebProcess/WebProcess.h:
3439         * WebProcess/WebProcess.messages.in:
3440         Testing infrastructure.
3441
3442 2018-01-24  Joseph Pecoraro  <pecoraro@apple.com>
3443
3444         Web Inspector: Remove duplicate preference update for WebAuthentication value
3445         https://bugs.webkit.org/show_bug.cgi?id=182058
3446
3447         Reviewed by Brian Burg.
3448
3449         * WebProcess/WebPage/WebPage.cpp:
3450         (WebKit::WebPage::updatePreferences):
3451         An identical update already happens in generated code.
3452
3453 2018-01-24  Alex Christensen  <achristensen@webkit.org>
3454
3455         Remove WebProcess access to QTKit
3456         https://bugs.webkit.org/show_bug.cgi?id=182035
3457
3458         Reviewed by Alexey Proskuryakov.
3459
3460         * WebProcess/com.apple.WebProcess.sb.in:
3461         This isn't needed any more.  We only have a little bit of code that uses QTKit which we should remove,
3462         and it's only used for fullscreen controls in WebKitLegacy.  Let's tighten up the sandbox!
3463
3464 2018-01-24  Alex Christensen  <achristensen@webkit.org>
3465
3466         Remove pre-Sierra-OS-specific code in WebKit
3467         https://bugs.webkit.org/show_bug.cgi?id=182024
3468
3469         Reviewed by Tim Horton.
3470
3471         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
3472         * Shared/Cocoa/DataDetectionResult.mm:
3473         (WebKit::DataDetectionResult::encode const):
3474         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
3475         (IPC::ArgumentCoder<WebCore::Payment>::encode):
3476         (IPC::ArgumentCoder<WebCore::PaymentContact>::encode):
3477         (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode):
3478         (IPC::ArgumentCoder<WebCore::PaymentMethod>::encode):
3479         * Shared/WebPreferencesDefaultValues.h:
3480         * Shared/cg/ShareableBitmapCG.cpp:
3481         (WebKit::wantsExtendedRange):
3482         * Shared/ios/InteractionInformationAtPosition.mm:
3483         (WebKit::InteractionInformationAtPosition::encode const):
3484         * Shared/mac/CodeSigning.mm:
3485         (WebKit::codeSigningIdentifier):
3486         (WebKit::codeSigningIdentifierForCurrentProcess):
3487         * Shared/mac/ColorSpaceData.mm:
3488         (WebKit::ColorSpaceData::encode const):
3489         * Shared/mac/PasteboardTypes.mm:
3490         (WebKit::PasteboardTypes::forURL):
3491         * Shared/mac/WebCoreArgumentCodersMac.mm:
3492         (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
3493         (IPC::ArgumentCoder<Credential>::encodePlatformData):
3494         (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
3495         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData):
3496         * Shared/mac/WebHitTestResultData.mm:
3497         (WebKit::WebHitTestResultData::platformEncode const):
3498         * UIProcess/API/Cocoa/WKProcessPool.mm:
3499         (-[WKProcessPool _setObject:forBundleParameter:]):
3500         (-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]):
3501         * UIProcess/API/Cocoa/WKWebView.mm:
3502         (-[WKWebView _handleAcceptedCandidate:]):
3503         * UIProcess/Cocoa/WebViewImpl.h:
3504         * UIProcess/Cocoa/WebViewImpl.mm:
3505         (WebKit::WebViewImpl::handleAcceptedCandidate):
3506         (WebKit::WebViewImpl::performDragOperation):
3507         * UIProcess/mac/WebPopupMenuProxyMac.mm:
3508         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
3509         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3510         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
3511         * WebProcess/com.apple.WebProcess.sb.in:
3512
3513 2018-01-24  Alex Christensen  <achristensen@webkit.org>
3514
3515         Stop using AuthenticationClient in WebKit
3516         https://bugs.webkit.org/show_bug.cgi?id=182016
3517
3518         Reviewed by Brady Eidson.
3519
3520         It was necessary to support ResourceHandle use in WebKit, but now we're using NetworkSession everywhere in WebKit.
3521
3522         * Shared/Authentication/AuthenticationManager.cpp:
3523         (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
3524         (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
3525         (WebKit::AuthenticationManager::cancelSingleChallenge):
3526         (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
3527         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
3528
3529 2018-01-24  Alex Christensen  <achristensen@webkit.org>
3530
3531         Remove WebProcess authentication code
3532         https://bugs.webkit.org/show_bug.cgi?id=182020
3533
3534         Reviewed by Brady Eidson.
3535
3536         * Shared/Authentication/AuthenticationManager.cpp:
3537         * Shared/Authentication/AuthenticationManager.h:
3538         * UIProcess/WebPageProxy.cpp:
3539         (WebKit::WebPageProxy::didReceiveAuthenticationChallenge): Deleted.
3540         * UIProcess/WebPageProxy.h:
3541         * UIProcess/WebPageProxy.messages.in:
3542         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3543         (WebKit::WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
3544         * WebProcess/WebProcess.cpp:
3545         (WebKit::m_webSQLiteDatabaseTracker):
3546
3547 2018-01-24  Jan-Michael Brummer  <jan.brummer@tabos.org>
3548
3549         [GTK] Page crash after swipe gesture running GNOME3 under wayland
3550         https://bugs.webkit.org/show_bug.cgi?id=181996
3551
3552         Reviewed by Michael Catanzaro.
3553
3554         Add missing GDK_TOUCH_CANCEL support which fixes page crashes due to cancelled gestures.
3555         * Shared/gtk/WebEventFactory.cpp:
3556         (WebKit::WebEventFactory::createWebTouchEvent):
3557         * UIProcess/API/gtk/PageClientImpl.cpp:
3558         (WebKit::PageClientImpl::doneWithTouchEvent):
3559         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3560         (touchPointStateForEvents):
3561         (webkitWebViewBaseGetTouchPointsForEvent):
3562         (webkitWebViewBaseTouchEvent):
3563         * UIProcess/gtk/GestureController.cpp:
3564         (WebKit::GestureController::handleEvent):
3565
3566 2018-01-24  Alex Christensen  <achristensen@webkit.org>
3567
3568         Remove unused QTKit preference
3569         https://bugs.webkit.org/show_bug.cgi?id=181968
3570
3571         Reviewed by Alexey Proskuryakov.
3572
3573         * Shared/API/c/WKDeprecatedFunctions.cpp:
3574         (WKPreferencesSetQTKitEnabled):
3575         (WKPreferencesGetQTKitEnabled):
3576         * Shared/WebPreferences.yaml:
3577         * UIProcess/API/C/WKPreferences.cpp:
3578         (WKPreferencesSetQTKitEnabled): Deleted.
3579         (WKPreferencesGetQTKitEnabled): Deleted.
3580         * UIProcess/API/Cocoa/WKPreferences.mm:
3581         (-[WKPreferences _setQTKitEnabled:]): Deleted.
3582         (-[WKPreferences _qtKitEnabled]): Deleted.
3583         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3584
3585 2018-01-24  Youenn Fablet  <youenn@apple.com>
3586
3587         Fetch response should copy its url from the request if null
3588         https://bugs.webkit.org/show_bug.cgi?id=182048
3589
3590         Reviewed by Chris Dumez.
3591
3592         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
3593         (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
3594
3595 2018-01-24  Sergio Villar Senin  <svillar@igalia.com>
3596
3597         Unreviewed build fix after r227518. I forgot to add the function declarations to the WPE
3598         header.
3599
3600         * UIProcess/API/wpe/WebKitSettings.h: Added webkit_settings_get/set_enable_webvr.
3601
3602 2018-01-24  Youenn Fablet  <youenn@apple.com>
3603
3604         Add Cache Storage engine assertion following on bug 181887
3605         https://bugs.webkit.org/show_bug.cgi?id=181925
3606
3607         Reviewed by Alex Christensen.
3608
3609         In a normal environment, the folderPath should be the same as the path computed from the ClientOrigin.
3610         Add assertion to verify this.
3611
3612         * NetworkProcess/cache/CacheStorageEngine.cpp:
3613         (WebKit::CacheStorage::Engine::clearCachesForOrigin):
3614
3615 2018-01-24  Michael Catanzaro  <mcatanzaro@igalia.com>
3616
3617         [GTK] Use GDK_EVENT_PROPAGATE and GDK_EVENT_STOP in WebKitWebViewBase.cpp
3618         https://bugs.webkit.org/show_bug.cgi?id=182031
3619
3620         Reviewed by Carlos Garcia Campos.
3621
3622         No functional changes, this just replaces TRUE with GDK_EVENT_STOP and FALSE with
3623         GDK_EVENT_PROPAGATE, to improve readability.
3624
3625         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3626         (webkitWebViewBaseKeyPressEvent):
3627         (webkitWebViewBaseKeyReleaseEvent):
3628         (webkitWebViewBaseButtonPressEvent):
3629         (webkitWebViewBaseButtonReleaseEvent):
3630         (webkitWebViewBaseScrollEvent):
3631         (webkitWebViewBaseMotionNotifyEvent):
3632         (webkitWebViewBaseCrossingNotifyEvent):
3633         (webkitWebViewBaseTouchEvent):
3634
3635 2018-01-23  Eric Carlson  <eric.carlson@apple.com>
3636
3637         Resign NowPlaying status when no media element is eligible
3638         https://bugs.webkit.org/show_bug.cgi?id=181914
3639         <rdar://problem/35294116>
3640
3641         Reviewed by Jer Noble.
3642
3643         * UIProcess/API/Cocoa/WKWebView.mm:
3644         (-[WKWebView _requestActiveNowPlayingSessionInfo:]): Return registeredAsNowPlayingApplication
3645         status.
3646         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3647
3648         * UIProcess/WebPageProxy.cpp:
3649         (WebKit::WebPageProxy::nowPlayingInfoCallback): Ditto.
3650         * UIProcess/WebPageProxy.h:
3651         * UIProcess/WebPageProxy.messages.in:
3652         * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
3653         (WebKit::WebPage::requestActiveNowPlayingSessionInfo): Ditto.
3654
3655 2018-01-23  Alex Christensen  <achristensen@webkit.org>
3656
3657         Use CompletionHandlers for ResourceHandleClient::didReceiveResponseAsync
3658         https://bugs.webkit.org/show_bug.cgi?id=181961
3659
3660         Reviewed by Michael Catanzaro.
3661
3662         * NetworkProcess/Downloads/Download.h:
3663         * NetworkProcess/NetworkLoad.cpp:
3664         * NetworkProcess/NetworkLoad.h:
3665         * NetworkProcess/NetworkResourceLoadParameters.h:
3666         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3667         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3668         * WebProcess/WebPage/mac/WebPageMac.mm:
3669         * WebProcess/WebProcess.cpp:
3670
3671 2018-01-23  Chris Dumez  <cdumez@apple.com>
3672
3673         Unreviewed, rollout r227216 as it seems to be causing deadlocks
3674         https://bugs.webkit.org/show_bug.cgi?id=182013
3675
3676         * Platform/IPC/Connection.cpp:
3677         (IPC::Connection::waitForSyncReply):
3678         * Platform/IPC/Connection.h:
3679         (IPC::Connection::setShouldProcessIncomingMessagesWhileWaitingForSyncReply): Deleted.
3680         * UIProcess/WebProcessProxy.cpp:
3681         (WebKit::WebProcessProxy::testIncomingSyncIPCMessageWhileWaitingForSyncReply): Deleted.
3682         * UIProcess/WebProcessProxy.h:
3683         * UIProcess/WebProcessProxy.messages.in:
3684         * WebProcess/Network/NetworkProcessConnection.cpp:
3685         (WebKit::NetworkProcessConnection::NetworkProcessConnection):
3686         * WebProcess/Storage/WebToStorageProcessConnection.cpp:
3687         (WebKit::WebToStorageProcessConnection::WebToStorageProcessConnection):
3688         * WebProcess/WebConnectionToUIProcess.cpp:
3689         (WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
3690         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3691         (WebKit::WebChromeClient::testIncomingSyncIPCMessageWhileWaitingForSyncReply): Deleted.
3692         * WebProcess/WebCoreSupport/WebChromeClient.h:
3693         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3694         (WebKit::WebEditorClient::undo):
3695         (WebKit::WebEditorClient::redo):
3696         * WebProcess/WebProcess.cpp:
3697         (WebKit::WebProcess::syncIPCMessageWhileWaitingForSyncReplyForTesting): Deleted.
3698         * WebProcess/WebProcess.h:
3699         * WebProcess/WebProcess.messages.in:
3700
3701 2018-01-23  Commit Queue  <commit-queue@webkit.org>
3702
3703         Unreviewed, rolling out r227437.
3704         https://bugs.webkit.org/show_bug.cgi?id=182011
3705
3706         broke build (Requested by alexchristensen on #webkit).
3707
3708         Reverted changeset:
3709
3710         "Remove unused QTKit preference"
3711         https://bugs.webkit.org/show_bug.cgi?id=181968
3712         https://trac.webkit.org/changeset/227437
3713
3714 2018-01-23  Alex Christensen  <achristensen@webkit.org>
3715
3716         Remove compile guard around beacon API
3717         https://bugs.webkit.org/show_bug.cgi?id=182002
3718
3719         Reviewed by Sam Weinig.
3720
3721         It's enabled everywhere now.
3722
3723         * Shared/WebPreferences.yaml:
3724         * UIProcess/API/C/WKPreferences.cpp:
3725         (WKPreferencesSetBeaconAPIEnabled):
3726         (WKPreferencesGetBeaconAPIEnabled):
3727         * config.h:
3728
3729 2018-01-23  Alex Christensen  <achristensen@webkit.org>
3730
3731         Remove unused QTKit preference
3732         https://bugs.webkit.org/show_bug.cgi?id=181968
3733
3734         Reviewed by Alexey Proskuryakov.
3735
3736         * Shared/API/c/WKDeprecatedFunctions.cpp:
3737         (WKPreferencesSetQTKitEnabled):
3738         (WKPreferencesGetQTKitEnabled):
3739         * Shared/WebPreferences.yaml:
3740         * UIProcess/API/C/WKPreferences.cpp:
3741         (WKPreferencesSetQTKitEnabled): Deleted.
3742         (WKPreferencesGetQTKitEnabled): Deleted.
3743         * UIProcess/API/Cocoa/WKPreferences.mm:
3744         (-[WKPreferences _setQTKitEnabled:]): Deleted.
3745         (-[WKPreferences _qtKitEnabled]): Deleted.
3746         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3747
3748 2018-01-23  Brent Fulgham  <bfulgham@apple.com>
3749
3750         [macOS] WebProcess needs TCC entitlements for media capture
3751         https://bugs.webkit.org/show_bug.cgi?id=181995
3752         <rdar://problem/36674649>
3753
3754         Reviewed by Eric Carlson.
3755
3756         * Configurations/WebContent-OSX.entitlements: Add delegated services needed to support media
3757         capture features.
3758
3759 2018-01-23  Dan Bernstein  <mitz@apple.com>
3760
3761         [Cocoa] Disable header postprocessing when building for macOS High Sierra
3762         https://bugs.webkit.org/show_bug.cgi?id=181972
3763
3764         Reviewed by Anders Carlsson.
3765
3766         * Configurations/WebKit.xcconfig: Adopt macOSTargetConditionals.xcconfig helpers and disable postprocessing
3767           when building for macOS 10.13.
3768
3769 2018-01-23  Joseph Pecoraro  <pecoraro@apple.com>
3770
3771         Web Inspector: Window resizing is broken after detaching to separate window
3772         https://bugs.webkit.org/show_bug.cgi?id=181992
3773         <rdar://problem/36714840>
3774
3775         Reviewed by Brian Burg.
3776
3777         * UIProcess/mac/WebInspectorProxyMac.mm:
3778         (WebKit::WebInspectorProxy::platformDetach):
3779         Restore the inspector view's autoresizingMask to the initial value
3780         that works with a detached window. This gets changed when the view
3781         gets attached to bottom/side, so we need to revert it on detaching.
3782
3783 2018-01-23  Brady Eidson  <beidson@apple.com>
3784
3785         Allow passing MessagePorts across processes (e.g. ServiceWorkers).
3786         https://bugs.webkit.org/show_bug.cgi?id=181178
3787
3788         Reviewed by Andy Estes.
3789
3790         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3791         (WebKit::WebSWServerConnection::postMessageToServiceWorker):
3792         (WebKit::WebSWServerConnection::postMessageToServiceWorkerClient):
3793         * StorageProcess/ServiceWorker/WebSWServerConnection.h:
3794         * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
3795
3796         * StorageProcess/StorageProcess.cpp:
3797         (WebKit::StorageProcess::postMessageToServiceWorkerClient):
3798         * StorageProcess/StorageProcess.h:
3799         * StorageProcess/StorageProcess.messages.in:
3800
3801         * UIProcess/WebProcessProxy.cpp:
3802         (WebKit::WebProcessProxy::entangleLocalPortInThisProcessToRemote):
3803         (WebKit::WebProcessProxy::postMessageToRemote):
3804
3805         * WebProcess/Storage/WebSWClientConnection.cpp:
3806         (WebKit::WebSWClientConnection::postMessageToServiceWorker):
3807         (WebKit::WebSWClientConnection::postMessageToServiceWorkerClient):
3808         * WebProcess/Storage/WebSWClientConnection.h:
3809         * WebProcess/Storage/WebSWClientConnection.messages.in:
3810
3811         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
3812         (WebKit::WebSWContextManagerConnection::postMessageToServiceWorker):
3813         (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerClient):
3814         * WebProcess/Storage/WebSWContextManagerConnection.h:
3815         * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
3816
3817 2018-01-23  Commit Queue  <commit-queue@webkit.org>
3818
3819         Unreviewed, rolling out r227279 and r227373.
3820         https://bugs.webkit.org/show_bug.cgi?id=181988
3821
3822         The LayoutTest crash fix introduced an API test failure.
3823         (Requested by ryanhaddad on #webkit).
3824
3825         Reverted changesets:
3826
3827         "Resign NowPlaying status when no media element is eligible"
3828         https://bugs.webkit.org/show_bug.cgi?id=181914
3829         https://trac.webkit.org/changeset/227279
3830
3831         "Resign NowPlaying status when no media element is eligible"
3832         https://bugs.webkit.org/show_bug.cgi?id=181914
3833         https://trac.webkit.org/changeset/227373
3834
3835 2018-01-23  Youenn Fablet  <youenn@apple.com>
3836
3837         REGRESSION (r227348): ASSERT_NOT_REACHED in WebKit::ServiceWorkerClientFetch::didFinish()
3838         https://bugs.webkit.org/show_bug.cgi?id=181956
3839         <rdar://problem/36755492>
3840
3841         Reviewed by Chris Dumez.
3842
3843         Covered by test no longer crashing in Debug builds.
3844         Reset m_redirectionStatus to None when starting an SW fetch.
3845
3846         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
3847         (WebKit::ServiceWorkerClientFetch::start):
3848         (WebKit::ServiceWorkerClientFetch::didFinish):
3849
3850 2018-01-23  Michael Catanzaro  <mcatanzaro@igalia.com>
3851
3852         [WPE] TestWebKitFindController asserts
3853         https://bugs.webkit.org/show_bug.cgi?id=181472
3854
3855         Reviewed by Carlos Garcia Campos.
3856
3857         Let's fix this in two independent ways.
3858
3859         First, use a GRefPtr to hold ownership of the WebKitWebViewBackend. This way, we don't need
3860         to change the order in which WebKitWebView destroys its priv struct members from what is
3861         used in WebKitGTK+, which can lead to odd bugs.
3862
3863         Additionally, just for good measure, stop resetting the find client when disposing
3864         WebKitFindController. This is unnecessary because it will never be destroyed before the
3865         WebKitWebView.
3866
3867         * UIProcess/API/glib/WebKitFindController.cpp:
3868         (webkit_find_controller_class_init):
3869         (webkitFindControllerDispose): Deleted.
3870         * UIProcess/API/glib/WebKitWebView.cpp:
3871         (_WebKitWebViewPrivate::~_WebKitWebViewPrivate):
3872         (webkitWebViewSetProperty):
3873         (webkitWebViewGetProperty):
3874         (webkitWebViewCreatePage):
3875         (webkit_web_view_get_backend):
3876         * UIProcess/API/wpe/WebKitWebViewBackend.cpp:
3877         (webkitWebViewBackendCreateDefault):
3878         (WTF::refGPtr):
3879         (WTF::derefGPtr):
3880         * UIProcess/API/wpe/WebKitWebViewBackendPrivate.h:
3881
3882 2018-01-22  Jon Lee  <jonlee@apple.com>
3883
3884         Update title label size
3885         https://bugs.webkit.org/show_bug.cgi?id=181962
3886         rdar://problem/36754744
3887
3888         Reviewed by Simon Fraser.
3889
3890         * UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
3891         (-[_WKFullScreenViewController setLocation:secure:trustedName:trustedSite:]): Move titleLabel properties into
3892         createSubviews.
3893         (-[_WKFullScreenViewController createSubviews]): Set the title label for both the cancel and location buttons.
3894         Refer to a const CGFloat for the font size.
3895
3896 2018-01-22  Megan Gardner  <megan_gardner@apple.com>
3897
3898         Temporarily restore block selection code conditionally
3899         https://bugs.webkit.org/show_bug.cgi?id=181895
3900         <rdar://problem/36567325>
3901
3902         Reviewed by Tim Horton.
3903
3904         We need to restore this code temporarily to avoid a crash.
3905
3906         * Platform/spi/ios/UIKitSPI.h:
3907         * UIProcess/ios/WKContentViewInteraction.mm:
3908         (-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
3909
3910 2018-01-22  Zach Li  <zacharyli323@gmail.com>
3911
3912         We should not try to link against the Safe Browsing framework on watchOS and tvOS.
3913         https://bugs.webkit.org/show_bug.cgi?id=181965.
3914
3915         Reviewed by Tim Horton.
3916
3917         * Configurations/WebKit.xcconfig:
3918
3919 2018-01-22  Alex Christensen  <achristensen@webkit.org>
3920
3921         Remove pre-NetworkSession loading code
3922         https://bugs.webkit.org/show_bug.cgi?id=181944
3923
3924         Reviewed by Tim Horton.
3925
3926         We were keeping it around for El Capitan.
3927
3928         * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:
3929         (WebKit::LegacyCustomProtocolManager::registerProtocolClass):
3930         * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp:
3931         (WebKit::LegacyCustomProtocolManager::initialize):
3932         * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h:
3933         * NetworkProcess/Downloads/BlobDownloadClient.cpp: Removed.
3934         * NetworkProcess/Downloads/BlobDownloadClient.h: Removed.
3935         * NetworkProcess/Downloads/Download.cpp:
3936         (WebKit::Download::~Download):
3937         (WebKit::Download::cancel):
3938         (WebKit::Download::didReceiveChallenge):
3939         (WebKit::Download::didFinish):
3940         (WebKit::Download::isAlwaysOnLoggingAllowed const):
3941         (WebKit::Download::start): Deleted.
3942         (WebKit::Download::startWithHandle): Deleted.
3943         (WebKit::Download::didStart): Deleted.
3944         (WebKit::Download::willSendRedirectedRequest): Deleted.
3945         (WebKit::Download::didReceiveAuthenticationChallenge): Deleted.
3946         (WebKit::Download::didReceiveResponse): Deleted.
3947         (WebKit::Download::shouldDecodeSourceDataOfMIMEType): Deleted.
3948         (WebKit::Download::decideDestinationWithSuggestedFilename): Deleted.
3949         (WebKit::Download::decideDestinationWithSuggestedFilenameAsync): Deleted.
3950         (WebKit::Download::didDecideDownloadDestination): Deleted.
3951         (WebKit::Download::continueDidReceiveResponse): Deleted.
3952         * NetworkProcess/Downloads/Download.h:
3953         (WebKit::Download::setBlobFileReferences): Deleted.
3954         (WebKit::Download::request const): Deleted.
3955         * NetworkProcess/Downloads/DownloadManager.cpp:
3956         (WebKit::DownloadManager::startDownload):
3957         (WebKit::DownloadManager::willDecidePendingDownloadDestination):
3958         (WebKit::DownloadManager::convertNetworkLoadToDownload):
3959         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
3960         (WebKit::DownloadManager::resumeDownload):
3961         (WebKit::DownloadManager::cancelDownload):
3962         * NetworkProcess/Downloads/DownloadManager.h:
3963         (WebKit::DownloadManager::startDownload):
3964         * NetworkProcess/Downloads/PendingDownload.cpp:
3965         * NetworkProcess/Downloads/PendingDownload.h:
3966         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
3967         * NetworkProcess/Downloads/ios/DownloadIOS.mm: Removed.
3968         * NetworkProcess/Downloads/mac/DownloadMac.mm: Removed.
3969         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
3970         * NetworkProcess/NetworkCORSPreflightChecker.h:
3971         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3972         (WebKit::NetworkConnectionToWebProcess::loadPing):
3973         * NetworkProcess/NetworkDataTask.cpp:
3974         * NetworkProcess/NetworkDataTask.h:
3975         * NetworkProcess/NetworkDataTaskBlob.cpp:
3976         * NetworkProcess/NetworkDataTaskBlob.h:
3977         * NetworkProcess/NetworkLoad.cpp:
3978         (WebKit::NetworkLoad::~NetworkLoad):
3979         (WebKit::NetworkLoad::setDefersLoading):
3980         (WebKit::NetworkLoad::cancel):
3981         (WebKit::NetworkLoad::continueWillSendRequest):
3982         (WebKit::NetworkLoad::continueDidReceiveResponse):
3983         (WebKit::NetworkLoad::shouldCaptureExtraNetworkLoadMetrics const):
3984         (WebKit::NetworkLoad::didReceiveResponseAsync): Deleted.
3985         (WebKit::NetworkLoad::didReceiveBuffer): Deleted.
3986         (WebKit::NetworkLoad::didFinishLoading): Deleted.
3987         (WebKit::NetworkLoad::didFail): Deleted.
3988         (WebKit::NetworkLoad::willSendRequestAsync): Deleted.
3989         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync): Deleted.
3990         (WebKit::NetworkLoad::shouldUseCredentialStorage): Deleted.
3991         (WebKit::NetworkLoad::didReceiveAuthenticationChallenge): Deleted.
3992         (WebKit::NetworkLoad::receivedCancellation): Deleted.
3993         * NetworkProcess/NetworkLoad.h:
3994         * NetworkProcess/NetworkLoadParameters.h:
3995         * NetworkProcess/NetworkProcess.cpp:
3996         (WebKit::NetworkProcess::initializeNetworkProcess):
3997         (WebKit::NetworkProcess::clearCachedCredentials):
3998         (WebKit::NetworkProcess::findPendingDownloadLocation):
3999         * NetworkProcess/NetworkProcess.h:
4000         * NetworkProcess/NetworkProcess.messages.in:
4001         * NetworkProcess/NetworkResourceLoader.cpp:
4002         (WebKit::NetworkResourceLoader::startNetworkLoad):
4003         * NetworkProcess/NetworkSession.cpp:
4004         * NetworkProcess/NetworkSession.h:
4005         * NetworkProcess/PingLoad.cpp:
4006         * NetworkProcess/PingLoad.h:
4007         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
4008         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
4009         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
4010         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
4011         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
4012         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
4013         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
4014         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
4015         * NetworkProcess/mac/NetworkLoadMac.mm: Removed.
4016         * NetworkProcess/mac/RemoteNetworkingContext.mm:
4017         (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
4018         * Shared/Authentication/AuthenticationManager.cpp:
4019         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
4020<