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