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