fc3f07744362aafcfaff5f9966b8c35ee7bdd180
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-11-09  Beth Dakin  <bdakin@apple.com>
2
3         More attempted build fix.
4
5         * UIProcess/Cocoa/WebViewImpl.mm:
6
7 2016-11-09  Alex Christensen  <achristensen@webkit.org>
8
9         Clean up Storage code
10         https://bugs.webkit.org/show_bug.cgi?id=164562
11
12         Reviewed by Brady Eidson.
13
14         Use more Refs!
15
16         * NetworkProcess/CustomProtocols/CustomProtocolManager.h:
17         * Platform/IPC/Connection.cpp:
18         (IPC::Connection::addWorkQueueMessageReceiver):
19         * Platform/IPC/Connection.h:
20         * UIProcess/Storage/LocalStorageDatabase.cpp:
21         (WebKit::LocalStorageDatabase::create):
22         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
23         * UIProcess/Storage/LocalStorageDatabase.h:
24         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
25         (WebKit::LocalStorageDatabaseTracker::create):
26         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
27         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
28         * UIProcess/Storage/StorageManager.cpp:
29         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
30         (WebKit::StorageManager::StorageManager):
31         * UIProcess/Storage/StorageManager.h:
32         * UIProcess/WebResourceLoadStatisticsStore.cpp:
33         (WebKit::WebResourceLoadStatisticsStore::processWillOpenConnection):
34         * UIProcess/mac/SecItemShimProxy.cpp:
35         (WebKit::SecItemShimProxy::initializeConnection):
36         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
37         (WebKit::PluginProcessConnectionManager::initializeConnection):
38         * WebProcess/WebPage/EventDispatcher.cpp:
39         (WebKit::EventDispatcher::initializeConnection):
40         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
41         (WebKit::ViewUpdateDispatcher::initializeConnection):
42
43 2016-11-09  Beth Dakin  <bdakin@apple.com>
44
45         Another attempted build fix.
46
47         * UIProcess/Cocoa/WebViewImpl.mm:
48
49 2016-11-09  Michael Catanzaro  <mcatanzaro@igalia.com>
50
51         Experimental features should not be enabled by default
52         https://bugs.webkit.org/show_bug.cgi?id=164367
53
54         Reviewed by Darin Adler.
55
56         We have two classes of experimental features:
57
58         (1) Features that are unstable and should be off by default, except for the developers
59             currently working on them. This is straightforward to handle; the default value should
60             be false.
61         (2) Features that are still not ready for end users, but are stable enough for testing. We
62             want these features to be enabled in testing environments like the bots, MiniBrowser,
63             Safari Tech Preview, and so forth, but not in stable release builds.
64
65         Implement this. It is better than having all experimental features on unconditionally, and
66         expecting them to be disabled manually on release branches, which is not something we are
67         keen to do. An exception is Cocoa ports, which to my knowledge do not currently have any
68         concept of development builds. These ports seem happy to continue disabling features
69         manually in release branches, and should continue to do so at least for now.
70
71         We also have features that we wish to enumerate at runtime, yet have enabled by default
72         unconditionally. We do not currently have any infrastructure to support this and should not
73         abuse the experimental status for this purpose; it requires future work. All settings can
74         still be toggled at runtime by clients that know about them using the existing runtime
75         features API.
76
77         Lastly, the custom elements feature is ready to be enabled by default, so it's no longer
78         experimental and can graduate to the list of normal boolean features.
79
80         * Shared/WebPreferencesDefinitions.h:
81
82 2016-11-09  Beth Dakin  <bdakin@apple.com>
83
84         Build fix.
85
86         * UIProcess/Cocoa/WebViewImpl.mm:
87
88 2016-11-09  Brady Eidson  <beidson@apple.com>
89
90         IndexedDB 2.0: Encapsulate cursor iteration parameters for easy future expansion.
91         https://bugs.webkit.org/show_bug.cgi?id=164504
92
93         Reviewed by Darin Adler.
94
95         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
96         (WebKit::WebIDBConnectionToClient::iterateCursor):
97         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
98         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
99
100         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
101         (WebKit::WebIDBConnectionToServer::iterateCursor):
102         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
103
104 2016-11-09  Darin Adler  <darin@apple.com>
105
106         Move Range from ExceptionCode to ExceptionOr
107         https://bugs.webkit.org/show_bug.cgi?id=164457
108
109         Reviewed by Alex Christensen.
110
111         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
112         (webkit_dom_range_set_start): Updated exception handling.
113         (webkit_dom_range_set_end): Ditto.
114         (webkit_dom_range_set_start_before): Ditto.
115         (webkit_dom_range_set_start_after): Ditto.
116         (webkit_dom_range_set_end_before): Ditto.
117         (webkit_dom_range_set_end_after): Ditto.
118         (webkit_dom_range_select_node): Ditto.
119         (webkit_dom_range_select_node_contents): Ditto.
120         (webkit_dom_range_compare_boundary_points): Ditto.
121         (webkit_dom_range_delete_contents): Ditto.
122         (webkit_dom_range_extract_contents): Ditto.
123         (webkit_dom_range_clone_contents): Ditto.
124         (webkit_dom_range_insert_node): Ditto.
125         (webkit_dom_range_surround_contents): Ditto.
126         (webkit_dom_range_create_contextual_fragment): Ditto.
127         (webkit_dom_range_compare_node): Ditto.
128         (webkit_dom_range_intersects_node): Ditto.
129         (webkit_dom_range_compare_point): Ditto.
130         (webkit_dom_range_is_point_in_range): Ditto.
131         (webkit_dom_range_expand): Ditto.
132         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
133         (-[WKDOMRange setStart:offset:]): Ditto.
134         (-[WKDOMRange setEnd:offset:]): Ditto.
135         (-[WKDOMRange selectNode:]): Ditto.
136         (-[WKDOMRange selectNodeContents:]): Ditto.
137         * WebProcess/WebPage/WebFrame.cpp:
138         (WebKit::WebFrame::contentsAsString): Ditto.
139         * WebProcess/WebPage/ios/WebPageIOS.mm:
140         (WebKit::WebPage::rangeForWebSelectionAtPosition): Ditto.
141         (WebKit::WebPage::rangeForBlockAtPoint): Ditto.
142         (WebKit::WebPage::selectWithGesture): Ditto.
143         (WebKit::containsRange): Ditto.
144         (WebKit::unionDOMRanges): Ditto.
145         (WebKit::WebPage::switchToBlockSelectionAtPoint): Ditto.
146         (WebKit::WebPage::getPositionInformation): Ditto.
147
148
149 2016-11-09  Darin Adler  <darin@apple.com>
150
151         Move EventTarget from ExceptionCode to ExceptionOr
152         https://bugs.webkit.org/show_bug.cgi?id=164465
153
154         Reviewed by Youenn Fablet.
155
156         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
157         (webkit_dom_attr_dispatch_event): Updated exception handling.
158         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
159         (webkit_dom_cdata_section_dispatch_event): Ditto.
160         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
161         (webkit_dom_character_data_dispatch_event): Ditto.
162         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
163         (webkit_dom_comment_dispatch_event): Ditto.
164         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
165         (webkit_dom_dom_window_dispatch_event): Ditto.
166         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
167         (webkit_dom_document_dispatch_event): Ditto.
168         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
169         (webkit_dom_document_fragment_dispatch_event): Ditto.
170         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
171         (webkit_dom_document_type_dispatch_event): Ditto.
172         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
173         (webkit_dom_element_dispatch_event): Ditto.
174         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
175         (webkit_dom_html_anchor_element_dispatch_event): Ditto.
176         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
177         (webkit_dom_html_applet_element_dispatch_event): Ditto.
178         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
179         (webkit_dom_html_area_element_dispatch_event): Ditto.
180         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
181         (webkit_dom_html_br_element_dispatch_event): Ditto.
182         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
183         (webkit_dom_html_base_element_dispatch_event): Ditto.
184         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
185         (webkit_dom_html_body_element_dispatch_event): Ditto.
186         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
187         (webkit_dom_html_button_element_dispatch_event): Ditto.
188         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
189         (webkit_dom_html_canvas_element_dispatch_event): Ditto.
190         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
191         (webkit_dom_html_d_list_element_dispatch_event): Ditto.
192         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
193         (webkit_dom_html_directory_element_dispatch_event): Ditto.
194         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
195         (webkit_dom_html_div_element_dispatch_event): Ditto.
196         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
197         (webkit_dom_html_document_dispatch_event): Ditto.
198         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
199         (webkit_dom_html_element_dispatch_event): Ditto.
200         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
201         (webkit_dom_html_embed_element_dispatch_event): Ditto.
202         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
203         (webkit_dom_html_field_set_element_dispatch_event): Ditto.
204         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
205         (webkit_dom_html_font_element_dispatch_event): Ditto.
206         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
207         (webkit_dom_html_form_element_dispatch_event): Ditto.
208         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
209         (webkit_dom_html_frame_element_dispatch_event): Ditto.
210         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
211         (webkit_dom_html_frame_set_element_dispatch_event): Ditto.
212         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
213         (webkit_dom_html_hr_element_dispatch_event): Ditto.
214         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
215         (webkit_dom_html_heading_element_dispatch_event): Ditto.
216         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
217         (webkit_dom_html_head_element_dispatch_event): Ditto.
218         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
219         (webkit_dom_html_html_element_dispatch_event): Ditto.
220         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
221         (webkit_dom_html_iframe_element_dispatch_event): Ditto.
222         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
223         (webkit_dom_html_image_element_dispatch_event): Ditto.
224         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
225         (webkit_dom_html_input_element_dispatch_event): Ditto.
226         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
227         (webkit_dom_html_li_element_dispatch_event): Ditto.
228         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
229         (webkit_dom_html_label_element_dispatch_event): Ditto.
230         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
231         (webkit_dom_html_legend_element_dispatch_event): Ditto.
232         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
233         (webkit_dom_html_link_element_dispatch_event): Ditto.
234         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
235         (webkit_dom_html_map_element_dispatch_event): Ditto.
236         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
237         (webkit_dom_html_marquee_element_dispatch_event): Ditto.
238         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
239         (webkit_dom_html_menu_element_dispatch_event): Ditto.
240         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
241         (webkit_dom_html_meta_element_dispatch_event): Ditto.
242         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
243         (webkit_dom_html_mod_element_dispatch_event): Ditto.
244         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
245         (webkit_dom_html_o_list_element_dispatch_event): Ditto.
246         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
247         (webkit_dom_html_object_element_dispatch_event): Ditto.
248         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
249         (webkit_dom_html_opt_group_element_dispatch_event): Ditto.
250         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
251         (webkit_dom_html_option_element_dispatch_event): Ditto.
252         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
253         (webkit_dom_html_paragraph_element_dispatch_event): Ditto.
254         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
255         (webkit_dom_html_param_element_dispatch_event): Ditto.
256         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
257         (webkit_dom_html_pre_element_dispatch_event): Ditto.
258         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
259         (webkit_dom_html_quote_element_dispatch_event): Ditto.
260         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
261         (webkit_dom_html_script_element_dispatch_event): Ditto.
262         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
263         (webkit_dom_html_select_element_dispatch_event): Ditto.
264         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
265         (webkit_dom_html_style_element_dispatch_event): Ditto.
266         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
267         (webkit_dom_html_table_caption_element_dispatch_event): Ditto.
268         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
269         (webkit_dom_html_table_cell_element_dispatch_event): Ditto.
270         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
271         (webkit_dom_html_table_col_element_dispatch_event): Ditto.
272         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
273         (webkit_dom_html_table_element_dispatch_event): Ditto.
274         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
275         (webkit_dom_html_table_row_element_dispatch_event): Ditto.
276         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
277         (webkit_dom_html_table_section_element_dispatch_event): Ditto.
278         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
279         (webkit_dom_html_text_area_element_dispatch_event): Ditto.
280         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
281         (webkit_dom_html_title_element_dispatch_event): Ditto.
282         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
283         (webkit_dom_html_u_list_element_dispatch_event): Ditto.
284         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
285         (webkit_dom_node_dispatch_event): Ditto.
286         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
287         (webkit_dom_processing_instruction_dispatch_event): Ditto.
288         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
289         (webkit_dom_text_dispatch_event): Ditto.
290
291 2016-11-08  Dean Jackson  <dino@apple.com>
292
293         Rendering support for ExtendedColors
294         https://bugs.webkit.org/show_bug.cgi?id=164443
295         <rdar://problems/29123243>
296
297         Reviewed by Simon Fraser and Darin Adler.
298
299         Implement argument coders for Color.
300
301         * Shared/WebCoreArgumentCoders.cpp:
302         (IPC::ArgumentCoder<Color>::encode):
303         (IPC::ArgumentCoder<Color>::decode):
304         * Shared/WebCoreArgumentCoders.h:
305         * UIProcess/API/Cocoa/WKWebView.mm:
306         (-[WKWebView _updateScrollViewBackground]):
307
308 2016-11-09  Beth Dakin  <bdakin@apple.com>
309
310         Build fix.
311
312         * UIProcess/Cocoa/WebViewImpl.mm:
313         (WebKit::WebViewImpl::~WebViewImpl):
314
315 2016-11-09  Chris Dumez  <cdumez@apple.com>
316
317         [Mac] Stop using deprecated AppKit enumeration values
318         https://bugs.webkit.org/show_bug.cgi?id=164494
319
320         Reviewed by Darin Adler.
321
322         Stop using deprecated AppKit enumeration values.
323
324         * Shared/mac/ChildProcessMac.mm:
325         (WebKit::ChildProcess::stopNSAppRunLoop):
326         * Shared/mac/WebEventFactory.mm:
327         (WebKit::mouseButtonForEvent):
328         (WebKit::mouseEventTypeForEvent):
329         (WebKit::clickCountForEvent):
330         (WebKit::globalPointForEvent):
331         (WebKit::pointForEvent):
332         (WebKit::textFromEvent):
333         (WebKit::unmodifiedTextFromEvent):
334         (WebKit::isKeypadEvent):
335         (WebKit::isKeyUpEvent):
336         (WebKit::WebEventFactory::createWebKeyboardEvent):
337         * UIProcess/Cocoa/WebViewImpl.mm:
338         (WebKit::WebViewImpl::becomeFirstResponder):
339         (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
340         (WebKit::WebViewImpl::viewDidMoveToWindow):
341         (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
342         (WebKit::WebViewImpl::createFullScreenWindow):
343         (WebKit::WebViewImpl::sendToolTipMouseExited):
344         (WebKit::WebViewImpl::sendToolTipMouseEntered):
345         (WebKit::applicationFlagsForDrag):
346         (WebKit::WebViewImpl::setLastMouseDownEvent):
347         (WebKit::WebViewImpl::doneWithKeyEvent):
348         (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
349         (WebKit::WebViewImpl::performKeyEquivalent):
350         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
351         (WebKit::PluginProcessProxy::beginModal):
352         * UIProcess/mac/WebContextMenuProxyMac.mm:
353         (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
354         * UIProcess/mac/WebInspectorProxyMac.mm:
355         * UIProcess/mac/WebPopupMenuProxyMac.mm:
356         (WebKit::WebPopupMenuProxyMac::populate):
357         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
358         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
359         (WebKit::modifierFlagsFromWebEvent):
360         (WebKit::getEventTypeFromWebEvent):
361         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
362         (WebKit::cssAlignmentValueForNSTextAlignment):
363         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
364         (WebKit::convertImageToBitmap):
365
366 2016-11-09  Beth Dakin  <bdakin@apple.com>
367
368         Support TouchBar in WebKit
369         https://bugs.webkit.org/show_bug.cgi?id=164437
370         -and corresponding-
371         rdar://problem/28876524
372
373         Reviewed by Darin Adler.
374
375         * UIProcess/API/Cocoa/WKViewPrivate.h:
376         * UIProcess/API/Cocoa/WKWebView.mm:
377         (-[WKWebView makeTouchBar]):
378         (-[WKWebView candidateListTouchBarItem]):
379         (-[WKWebView _web_didAddMediaControlsManager:]):
380         (-[WKWebView _web_didRemoveMediaControlsManager]):
381         (-[WKWebView _interactWithMediaControlsForTesting]):
382         (-[WKWebView _wantsMediaPlaybackControlsView]):
383         (-[WKWebView _setWantsMediaPlaybackControlsView:]):
384         (-[WKWebView _mediaPlaybackControlsView]):
385         (-[WKWebView _addMediaPlaybackControlsView:]):
386         (-[WKWebView _removeMediaPlaybackControlsView]):
387         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
388         * UIProcess/API/mac/WKView.mm:
389         (-[WKView makeTouchBar]):
390         (-[WKView candidateListTouchBarItem]):
391         (-[WKView _web_didAddMediaControlsManager:]):
392         (-[WKView _web_didRemoveMediaControlsManager]):
393         (-[WKView _wantsMediaPlaybackControlsView]):
394         (-[WKView _setWantsMediaPlaybackControlsView:]):
395         (-[WKView _mediaPlaybackControlsView]):
396         (-[WKView _addMediaPlaybackControlsView:]):
397         (-[WKView _removeMediaPlaybackControlsView]):
398         * UIProcess/Cocoa/WebViewImpl.h:
399         (WebKit::WebViewImpl::currentTouchBar):
400         (WebKit::WebViewImpl::clientWantsMediaPlaybackControlsView):
401         (WebKit::WebViewImpl::setClientWantsMediaPlaybackControlsView):
402         (WebKit::WebViewImpl::setIsCustomizingTouchBar):
403         * UIProcess/Cocoa/WebViewImpl.mm:
404         (-[WKTextListTouchBarViewController initWithWebViewImpl:]):
405         (-[WKTextListTouchBarViewController didDestroyView]):
406         (-[WKTextListTouchBarViewController _selectList:]):
407         (-[WKTextListTouchBarViewController setCurrentListType:]):
408         (-[WKTextTouchBarItemController initWithWebViewImpl:]):
409         (-[WKTextTouchBarItemController didDestroyView]):
410         (-[WKTextTouchBarItemController touchBar:makeItemForIdentifier:]):
411         (-[WKTextTouchBarItemController itemForIdentifier:]):
412         (-[WKTextTouchBarItemController candidateListTouchBarItem:endSelectingCandidateAtIndex:]):
413         (-[WKTextTouchBarItemController candidateListTouchBarItem:changedCandidateListVisibility:]):
414         (-[WKTextTouchBarItemController textListTouchBarViewController]):
415         (-[WKTextTouchBarItemController setTextIsBold:]):
416         (-[WKTextTouchBarItemController setTextIsItalic:]):
417         (-[WKTextTouchBarItemController setTextIsUnderlined:]):
418         (-[WKTextTouchBarItemController _wkChangeTextStyle:]):
419         (-[WKTextTouchBarItemController setCurrentTextAlignment:]):
420         (-[WKTextTouchBarItemController _wkChangeTextAlignment:]):
421         (-[WKTextTouchBarItemController textColor]):
422         (-[WKTextTouchBarItemController setTextColor:]):
423         (-[WKTextTouchBarItemController _wkChangeColor:]):
424         (-[WKTextTouchBarItemController textListViewController]):
425         (WebKit::WebViewImpl::makeTouchBar):
426         (WebKit::WebViewImpl::candidateListTouchBarItem):
427         (WebKit::WebViewImpl::mediaPlaybackControlsView):
428         (WebKit::WebViewImpl::useMediaPlaybackControlsView):
429         (WebKit::WebViewImpl::dismissTextTouchBarPopoverItemWithIdentifier):
430         (WebKit::textTouchBarCustomizationAllowedIdentifiers):
431         (WebKit::plainTextTouchBarCustomizationDefaultItemIdentifiers):
432         (WebKit::richTextTouchBarCustomizationDefaultItemIdentifiers):
433         (WebKit::touchBarDidExitCustomization):
434         (WebKit::touchBarWillEnterCustomization):
435         (WebKit::didChangeAutomaticTextCompletion):
436         (WebKit::WebViewImpl::updateTouchBarAndRefreshTextBarIdentifiers):
437         (WebKit::WebViewImpl::setUpTextTouchBar):
438         (WebKit::WebViewImpl::isRichlyEditable):
439         (WebKit::WebViewImpl::textTouchBar):
440         (WebKit::WebViewImpl::updateTextTouchBar):
441         (WebKit::WebViewImpl::updateMediaTouchBar):
442         (WebKit::WebViewImpl::forceRequestCandidatesForTesting):
443         (WebKit::WebViewImpl::updateTouchBar):
444         (WebKit::WebViewImpl::shouldRequestCandidates):
445         (WebKit::WebViewImpl::showCandidates):
446         (WebKit::WebViewImpl::webViewImplAdditionsWillDestroyView):
447         (WebKit::WebViewImpl::setEditableElementIsFocused):
448         (WebKit::WebViewImpl::becomeFirstResponder):
449         (WebKit::WebViewImpl::selectionDidChange):
450         (WebKit::WebViewImpl::videoControlsManagerDidChange):
451         (WebKit::WebViewImpl::updateWebViewImplAdditions): Deleted.
452
453 2016-11-09  Chris Dumez  <cdumez@apple.com>
454
455         [WK2][NETWORK_SESSION] Add support for downloading file backed blobs
456         https://bugs.webkit.org/show_bug.cgi?id=164458
457         <rdar://problem/28905514>
458
459         Reviewed by Darin Adler.
460
461         Add support for downloading file backed blobs on WebKit2.
462         It previously wasn't working because we weren't calling
463         BlobDataFileReference::prepareForFileAccess() for each blob file before
464         starting the download, similarly to what is done in NetworkResourceLoader's
465         consumeSandboxExtensions().
466
467         * NetworkProcess/Downloads/DownloadManager.cpp:
468         (WebKit::DownloadManager::startDownload):
469         * NetworkProcess/Downloads/DownloadManager.h:
470         (WebKit::DownloadManager::startDownload):
471         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
472         (WebKit::NetworkConnectionToWebProcess::startDownload):
473         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
474         * NetworkProcess/NetworkDataTask.cpp:
475         (WebKit::NetworkDataTask::create):
476         * NetworkProcess/NetworkDataTask.h:
477         * NetworkProcess/NetworkDataTaskBlob.cpp:
478         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
479         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
480         (WebKit::NetworkDataTaskBlob::download):
481         * NetworkProcess/NetworkDataTaskBlob.h:
482         * NetworkProcess/NetworkLoad.cpp:
483         (WebKit::NetworkLoad::NetworkLoad):
484         * NetworkProcess/NetworkLoadParameters.h:
485         * NetworkProcess/NetworkProcess.cpp:
486         (WebKit::NetworkProcess::downloadRequest):
487         * NetworkProcess/NetworkResourceLoader.cpp:
488         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
489         (WebKit::NetworkResourceLoader::startNetworkLoad):
490         * NetworkProcess/PingLoad.h:
491
492 2016-11-09  Chris Dumez  <cdumez@apple.com>
493
494         [WK2] Network cache speculative revalidation can cause loads to hang
495         https://bugs.webkit.org/show_bug.cgi?id=164532
496         <rdar://problem/28519331>
497
498         Reviewed by Alex Christensen.
499
500         Network cache speculative revalidation could cause loads to hang when HTTP
501         authentication was involved because NetworkCacheSpeculativeLoad failed to
502         call NetworkLoad::continueCanAuthenticateAgainstProtectionSpace() in its
503         canAuthenticateAgainstProtectionSpaceAsync() callback.
504
505         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
506         (WebKit::NetworkCache::SpeculativeLoad::canAuthenticateAgainstProtectionSpaceAsync):
507         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
508
509 2016-11-09  Csaba Osztrogonác  <ossy@webkit.org>
510
511         URTBF after r208361.
512
513         * PlatformMac.cmake:
514
515 2016-11-09  Csaba Osztrogonác  <ossy@webkit.org>
516
517         Unreviewed typo fix after r160616 to fix the build on case sensitive file systems.
518
519         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
520
521 2016-11-05  Carlos Garcia Campos  <cgarcia@igalia.com>
522
523         [SOUP] Layout test http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html fails
524         https://bugs.webkit.org/show_bug.cgi?id=139358
525
526         Reviewed by Michael Catanzaro.
527
528         Stop putting the credentials in the URL unconditionally and ensure we only do that when provided by the URL
529         itself. Libsoup has its own cache of SoupAuth, so we don't need to pass user/pass in the URL for every single
530         request, libsoup will authenticate those automatically.
531
532         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
533         (WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):
534
535 2016-11-04  Filip Pizlo  <fpizlo@apple.com>
536
537         WTF::ParkingLot should stop using std::chrono because std::chrono::duration casts are prone to overflows
538         https://bugs.webkit.org/show_bug.cgi?id=152045
539
540         Reviewed by Andy Estes.
541
542         * Platform/IPC/Connection.cpp:
543         (IPC::Connection::SyncMessageState::wait):
544         (IPC::Connection::sendMessage):
545         (IPC::Connection::timeoutRespectingIgnoreTimeoutsForTesting):
546         (IPC::Connection::waitForMessage):
547         (IPC::Connection::sendSyncMessage):
548         (IPC::Connection::waitForSyncReply):
549         * Platform/IPC/Connection.h:
550         (IPC::Connection::sendSync):
551         (IPC::Connection::waitForAndDispatchImmediately):
552         * Platform/IPC/MessageSender.h:
553         (IPC::MessageSender::sendSync):
554         * UIProcess/ChildProcessProxy.h:
555         (WebKit::ChildProcessProxy::sendSync):
556         * UIProcess/Network/NetworkProcessProxy.cpp:
557         (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
558         * UIProcess/Storage/StorageManager.cpp:
559         (WebKit::StorageManager::applicationWillTerminate):
560         * UIProcess/WebProcessProxy.cpp:
561         (WebKit::WebProcessProxy::sendProcessWillSuspendImminently):
562         * UIProcess/WebResourceLoadStatisticsStore.cpp:
563         (WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):
564         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
565         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
566         (-[WKOneShotDisplayLinkHandler displayLinkFired:]):
567         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
568         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
569         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
570         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
571         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
572         * UIProcess/mac/WKImmediateActionController.mm:
573         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
574         * UIProcess/mac/WebPageProxyMac.mm:
575         (WebKit::WebPageProxy::stringSelectionForPasteboard):
576         (WebKit::WebPageProxy::dataSelectionForPasteboard):
577         (WebKit::WebPageProxy::readSelectionFromPasteboard):
578         (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
579         (WebKit::WebPageProxy::acceptsFirstMouse):
580         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
581         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
582         (WebKit::WebChromeClient::runJavaScriptAlert):
583         (WebKit::WebChromeClient::runJavaScriptConfirm):
584         (WebKit::WebChromeClient::runJavaScriptPrompt):
585         (WebKit::WebChromeClient::print):
586         (WebKit::WebChromeClient::exceededDatabaseQuota):
587         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
588         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
589         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
590         * WebProcess/WebPage/WebPage.cpp:
591         (WebKit::WebPage::postSynchronousMessageForTesting):
592
593 2016-11-04  Wenson Hsieh  <wenson_hsieh@apple.com>
594
595         Safari does not emit composition end if blurred for dead key / Japanese IME
596         https://bugs.webkit.org/show_bug.cgi?id=164369
597         <rdar://problem/29050439>
598
599         Reviewed by Ryosuke Niwa.
600
601         Split WebPage::discardedComposition into two steps, where we first discard marked text and then update the
602         editor state. This allows the codepath where we cancel the composition early (before setting the selection) to
603         discard marked text without also forcing an editor state update at the same time. The editor state is later
604         updated in WebPage::didChangeSelection.
605
606         * UIProcess/WebPageProxy.cpp:
607         (WebKit::WebPageProxy::compositionWasCanceled):
608         * UIProcess/WebPageProxy.h:
609         * UIProcess/WebPageProxy.messages.in:
610         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
611         (WebKit::WebEditorClient::canceledComposition):
612         * WebProcess/WebCoreSupport/WebEditorClient.h:
613         * WebProcess/WebPage/WebPage.cpp:
614         (WebKit::WebPage::didChangeSelection):
615         (WebKit::WebPage::discardedComposition):
616         (WebKit::WebPage::canceledComposition):
617         * WebProcess/WebPage/WebPage.h:
618
619 2016-11-04  Alex Christensen  <achristensen@webkit.org>
620
621         Unreviewed, rolling out r208293.
622
623         asserts in API tests.
624
625         Reverted changeset:
626
627         "NetworkSession: Network process crash when converting main
628         resource to download"
629         https://bugs.webkit.org/show_bug.cgi?id=164220
630         http://trac.webkit.org/changeset/208293
631
632 2016-11-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
633
634         Add a setting and preferences to enable/disable async image decoding
635         https://bugs.webkit.org/show_bug.cgi?id=164417
636
637         Reviewed by Simon Fraser.
638
639         Hook up the asyncImageDecodingEnabled setting for WebKit2.
640
641         * Shared/WebPreferencesDefinitions.h:
642         * UIProcess/API/Cocoa/WKPreferences.mm:
643         (-[WKPreferences _asyncImageDecodingEnabled]):
644         (-[WKPreferences _setAsyncImageDecodingEnabled:]):
645         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
646         * WebProcess/InjectedBundle/InjectedBundle.cpp:
647         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
648         * WebProcess/WebPage/WebPage.cpp:
649         (WebKit::WebPage::updatePreferences):
650
651 2016-11-04  Simon Fraser  <simon.fraser@apple.com>
652
653         Rename some ScrollingTree/Node-related functions to reduce the number of uses of "update"
654         https://bugs.webkit.org/show_bug.cgi?id=164420
655
656         Reviewed by Tim Horton.
657
658         Rename:
659             commitNewTreeState -> commitTreeState ("new" was redundant)
660             updateBeforeChildren -> commitStateBeforeChildren
661             updateAfterChildren -> commitStateAfterChildren
662
663
664         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
665         (WebKit::RemoteScrollingCoordinatorProxy::commitScrollingTreeState):
666         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Deleted.
667         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
668         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
669         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
670         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
671         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
672         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren): Deleted.
673         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Deleted.
674         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
675         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
676
677 2016-11-04  Carlos Garcia Campos  <cgarcia@igalia.com>
678
679         NetworkSession: Add NetworkDataTask implementation for blobs
680         https://bugs.webkit.org/show_bug.cgi?id=163939
681
682         Reviewed by Alex Christensen.
683
684         Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
685         adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
686         is enabled.
687
688         * CMakeLists.txt: Add new files to compilation.
689         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
690         * NetworkProcess/Downloads/BlobDownloadClient.h:
691         * NetworkProcess/Downloads/Download.cpp:
692         (WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
693         definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
694         reveices a NetworkDataTask and is used by Soup backend and blobs.
695         (WebKit::Download::~Download):
696         (WebKit::Download::start):
697         (WebKit::Download::startWithHandle):
698         (WebKit::Download::cancel):
699         (WebKit::Download::didReceiveAuthenticationChallenge):
700         (WebKit::Download::didReceiveData):
701         (WebKit::Download::didFinish):
702         (WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
703         this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.
704         * NetworkProcess/Downloads/Download.h:
705         (WebKit::Download::Download):
706         (WebKit::Download::suggestedName):
707         (WebKit::Download::request):
708         * NetworkProcess/Downloads/DownloadManager.cpp:
709         (WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
710         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
711         * NetworkProcess/Downloads/DownloadManager.h:
712         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
713         (WebKit::Download::platformCancelNetworkLoad):
714         * NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
715         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
716         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
717         using NetworkSession.
718         * NetworkProcess/NetworkDataTask.cpp:
719         (WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.
720         * NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
721         * NetworkProcess/NetworkDataTaskBlob.cpp: Added.
722         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
723         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
724         (WebKit::NetworkDataTaskBlob::clearStream):
725         (WebKit::NetworkDataTaskBlob::resume):
726         (WebKit::NetworkDataTaskBlob::suspend):
727         (WebKit::NetworkDataTaskBlob::cancel):
728         (WebKit::NetworkDataTaskBlob::invalidateAndCancel):
729         (WebKit::NetworkDataTaskBlob::getSizeForNext):
730         (WebKit::NetworkDataTaskBlob::didGetSize):
731         (WebKit::NetworkDataTaskBlob::seek):
732         (WebKit::NetworkDataTaskBlob::didReceiveResponse):
733         (WebKit::NetworkDataTaskBlob::read):
734         (WebKit::NetworkDataTaskBlob::readData):
735         (WebKit::NetworkDataTaskBlob::readFile):
736         (WebKit::NetworkDataTaskBlob::didOpen):
737         (WebKit::NetworkDataTaskBlob::didRead):
738         (WebKit::NetworkDataTaskBlob::consumeData):
739         (WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
740         (WebKit::NetworkDataTaskBlob::suggestedFilename):
741         (WebKit::NetworkDataTaskBlob::download):
742         (WebKit::NetworkDataTaskBlob::writeDownload):
743         (WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
744         (WebKit::NetworkDataTaskBlob::didFailDownload):
745         (WebKit::NetworkDataTaskBlob::didFinishDownload):
746         (WebKit::NetworkDataTaskBlob::didFail):
747         (WebKit::NetworkDataTaskBlob::didFinish):
748         * NetworkProcess/NetworkDataTaskBlob.h: Added.
749         * NetworkProcess/NetworkLoad.cpp:
750         (WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
751         (WebKit::NetworkLoad::~NetworkLoad):
752         (WebKit::NetworkLoad::setDefersLoading):
753         (WebKit::NetworkLoad::cancel):
754         (WebKit::NetworkLoad::continueWillSendRequest):
755         (WebKit::NetworkLoad::continueDidReceiveResponse):
756         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
757         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
758         * NetworkProcess/NetworkLoad.h:
759         * NetworkProcess/NetworkSession.cpp:
760         (WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.
761         * NetworkProcess/NetworkSession.h:
762         (WebKit::NetworkSession::registerNetworkDataTask): Ditto.
763         (WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.
764         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing
765         because in Cocoa all tasks are invalidated and canceled by the network session.
766         * NetworkProcess/mac/NetworkLoadMac.mm:
767         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
768         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
769         (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
770         (WebKit::NetworkDataTaskSoup::download):
771         * NetworkProcess/soup/NetworkDataTaskSoup.h:
772         * NetworkProcess/soup/NetworkSessionSoup.cpp:
773         * NetworkProcess/soup/NetworkSessionSoup.h:
774         * PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
775         * PlatformGTK.cmake: Ditto.
776         * WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.
777
778 2016-11-03  Simon Fraser  <simon.fraser@apple.com>
779
780         Give all the geometry classes a single-argument scale() function for consistency
781         https://bugs.webkit.org/show_bug.cgi?id=164400
782
783         Reviewed by Zalan Bujtas.
784         
785         Use single-argument scale() functions.
786
787         * PluginProcess/PluginControllerProxy.cpp:
788         (WebKit::PluginControllerProxy::paint):
789         * Shared/mac/RemoteLayerBackingStore.mm:
790         (WebKit::RemoteLayerBackingStore::drawInContext):
791         * UIProcess/API/Cocoa/WKWebView.mm:
792         (-[WKWebView _didCommitLayerTree:]):
793         (-[WKWebView _takeViewSnapshot]):
794         (-[WKWebView _scrollToContentScrollPosition:scrollOrigin:]):
795         (-[WKWebView _scrollByContentOffset:]):
796         (-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
797         * UIProcess/ios/WKContentView.mm:
798         (-[WKContentView _didCommitLayerTree:]):
799         * UIProcess/ios/WKContentViewInteraction.mm:
800         (-[WKContentView _updateTapHighlight]):
801         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
802         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
803         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
804         * UIProcess/mac/ViewGestureControllerMac.mm:
805         (WebKit::ViewGestureController::scaledMagnificationOrigin):
806         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
807         (WebKit::InjectedBundleRangeHandle::renderedImage):
808         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
809         (WebKit::NetscapePlugin::snapshot):
810         * WebProcess/Plugins/PDF/PDFPlugin.mm:
811         (WebKit::PDFPlugin::scrollToPoint):
812         * WebProcess/WebPage/WebFrame.cpp:
813         (WebKit::WebFrame::createSelectionSnapshot):
814         * WebProcess/WebPage/WebPage.cpp:
815         (WebKit::WebPage::scalePageInViewCoordinates):
816         (WebKit::WebPage::scaleView):
817         (WebKit::WebPage::snapshotAtSize):
818         (WebKit::WebPage::snapshotNode):
819         (WebKit::WebPage::drawRectToImage):
820         * WebProcess/WebPage/ios/WebPageIOS.mm:
821         (WebKit::WebPage::restorePageState):
822
823 2016-11-03  Chris Dumez  <cdumez@apple.com>
824
825         [WK2][Cocoa] Implement user interface for HTML form validation
826         https://bugs.webkit.org/show_bug.cgi?id=164143
827         <rdar://problem/28944652>
828
829         Reviewed by Simon Fraser.
830
831         Implement the ValidationMessageClient in WebKit2 and have it display
832         a ValidationBubble on Cocoa. ValidationBubble is implemented using
833         native popovers on both Mac and iOS. As a result, Mac and iOS WK2
834         now use native popover for HTML form validation instead of the old
835         Shadow DOM based UI in WebCore.
836
837         The native popover shows at the bottom (or top) of the input and it
838         disapears as soon as the user starts typing or interacts with the
839         view (e.g. tap / scroll / zoom).
840
841         The feature is still disabled at runtime.
842
843         * UIProcess/API/Cocoa/WKWebView.mm:
844         (-[WKWebView _initializeWithConfiguration:]):
845         (-[WKWebView _keyboardWillShow:]):
846         (-[WKWebView _keyboardDidShow:]):
847         (-[WKWebView _contentsOfUserInterfaceItem:]):
848         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
849         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
850         * UIProcess/PageClient.h:
851         * UIProcess/WebPageProxy.cpp:
852         (WebKit::WebPageProxy::handleWheelEvent):
853         (WebKit::WebPageProxy::setPageZoomFactor):
854         (WebKit::WebPageProxy::setPageAndTextZoomFactors):
855         (WebKit::WebPageProxy::pageDidScroll):
856         (WebKit::WebPageProxy::resetState):
857         (WebKit::WebPageProxy::hideValidationMessage):
858         * UIProcess/WebPageProxy.h:
859         (WebKit::WebPageProxy::validationBubble):
860         (WebKit::WebPageProxy::setIsKeyboardAnimatingIn):
861         * UIProcess/WebPageProxy.messages.in:
862         * UIProcess/ios/PageClientImplIOS.h:
863         * UIProcess/ios/PageClientImplIOS.mm:
864         (WebKit::PageClientImpl::createValidationBubble):
865         * UIProcess/ios/WKContentViewInteraction.mm:
866         (-[WKContentView _willStartScrollingOrZooming]):
867         (-[WKContentView scrollViewWillStartPanOrPinchGesture]):
868         (-[WKContentView _didEndScrollingOrZooming]):
869         * UIProcess/ios/WebPageProxyIOS.mm:
870         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
871         (WebKit::WebPageProxy::potentialTapAtPosition):
872         (WebKit::WebPageProxy::showValidationMessage):
873         (WebKit::WebPageProxy::setIsScrollingOrZooming):
874         * UIProcess/mac/PageClientImpl.h:
875         * UIProcess/mac/PageClientImpl.mm:
876         (WebKit::PageClientImpl::createValidationBubble):
877         * UIProcess/mac/WebPageProxyMac.mm:
878         (WebKit::WebPageProxy::showValidationMessage):
879         * WebKit2.xcodeproj/project.pbxproj:
880         * WebProcess/WebCoreSupport/WebValidationMessageClient.cpp: Copied from Tools/DumpRenderTree/mac/UIScriptControllerMac.mm.
881         (WebKit::WebValidationMessageClient::WebValidationMessageClient):
882         (WebKit::WebValidationMessageClient::~WebValidationMessageClient):
883         (WebKit::WebValidationMessageClient::showValidationMessage):
884         (WebKit::WebValidationMessageClient::hideValidationMessage):
885         (WebKit::WebValidationMessageClient::isValidationMessageVisible):
886         * WebProcess/WebCoreSupport/WebValidationMessageClient.h: Copied from Tools/DumpRenderTree/mac/UIScriptControllerMac.mm.
887         * WebProcess/WebPage/WebPage.cpp:
888         (WebKit::m_userInterfaceLayoutDirection):
889
890 2016-11-03  Tim Horton  <timothy_horton@apple.com>
891
892         Printing to PDF should produce internal links when HTML has internal links
893         https://bugs.webkit.org/show_bug.cgi?id=112081
894         <rdar://problem/5955705>
895
896         Reviewed by Simon Fraser.
897
898         * UIProcess/mac/WKPrintingView.h:
899         * UIProcess/mac/WKPrintingView.mm:
900         (linkDestinationName):
901         (-[WKPrintingView _drawPDFDocument:page:atPoint:]):
902         Propagate link-to-destination annotations (and each page's destinations)
903         into the printed PDF.
904         Generate a unique destination name based on the page and position, because
905         we have lost the fragment name information.
906
907         (-[WKPrintingView drawRect:]):
908         Compute all of the destinations for every page, so that we can add them
909         to the context as we paint the pages (we need the page CTM in order to add them).
910
911 2016-11-03  Alex Christensen  <achristensen@webkit.org>
912
913         Unreviewed, rolling out r208298.
914         https://bugs.webkit.org/show_bug.cgi?id=163939
915
916         caused asan crashes
917
918         Reverted changeset:
919
920         "NetworkSession: Add NetworkDataTask implementation for blobs"
921         https://bugs.webkit.org/show_bug.cgi?id=163939
922         http://trac.webkit.org/changeset/208298
923
924 2016-11-03  Ryan Haddad  <ryanhaddad@apple.com>
925
926         Unreviewed, rolling out r208330.
927
928         This change appears to have caused two editing tests to fail
929         on macOS.
930
931         Reverted changeset:
932
933         "Reduce PassRefPtr use in WebKit2"
934         https://bugs.webkit.org/show_bug.cgi?id=164360
935         http://trac.webkit.org/changeset/208330
936
937 2016-11-03  Dan Bernstein  <mitz@apple.com>
938
939         WKWebView’s _observedRenderingProgressEvents not restored after web process crash
940         https://bugs.webkit.org/show_bug.cgi?id=164368
941         <rdar://problem/29091954>
942
943         Reviewed by Anders Carlsson.
944
945         Test: TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm.
946
947         * Shared/WebPageCreationParameters.cpp:
948         (WebKit::WebPageCreationParameters::encode): Encode new observedLayoutMilestones member.
949         (WebKit::WebPageCreationParameters::decode): Decode it.
950         * Shared/WebPageCreationParameters.h: Declared new observedLayoutMilestones member variable.
951
952         * UIProcess/WebPageProxy.cpp:
953         (WebKit::WebPageProxy::WebPageProxy): Removed initializer for
954           m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
955         (WebKit::WebPageProxy::listenForLayoutMilestones): Update new m_observedLayoutMilestones
956           member variable. Don’t update m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
957         (WebKit::WebPageProxy::creationParameters): Set the observedLayoutMilestones member in the
958           creation parameters.
959
960         * UIProcess/WebPageProxy.h: Declared new member variable, deleted
961           m_wantsSessionRestorationRenderTreeSizeThresholdEvent declaration.
962
963         * UIProcess/ios/WebPageProxyIOS.mm:
964         (WebKit::WebPageProxy::didCommitLayerTree): Rather than using
965           m_wantsSessionRestorationRenderTreeSizeThresholdEvent, use m_observedLayoutMilestones.
966
967         * WebProcess/WebPage/WebPage.cpp:
968         (WebKit::WebPage::WebPage): Add the observed layout milestones from the creation parameters.
969
970 2016-11-02  Alex Christensen  <achristensen@webkit.org>
971
972         Reduce PassRefPtr use in WebKit2
973         https://bugs.webkit.org/show_bug.cgi?id=164360
974
975         Reviewed by Tim Horton.
976
977         * Shared/API/APISecurityOrigin.h:
978         (API::SecurityOrigin::SecurityOrigin):
979         * Shared/API/APISerializedScriptValue.h:
980         (API::SerializedScriptValue::create):
981         (API::SerializedScriptValue::SerializedScriptValue):
982         * Shared/API/c/WKSharedAPICast.h:
983         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
984         (WebKit::toAPI):
985         * Shared/APIWebArchive.h:
986         * Shared/APIWebArchive.mm:
987         (API::WebArchive::create):
988         (API::WebArchive::WebArchive):
989         * UIProcess/API/APIHitTestResult.cpp:
990         (API::HitTestResult::create):
991         * UIProcess/API/APIHitTestResult.h:
992         * UIProcess/API/APIUIClient.h:
993         (API::UIClient::createNewPage):
994         * UIProcess/API/C/WKPage.cpp:
995         (WebKit::RunBeforeUnloadConfirmPanelResultListener::create):
996         (WebKit::RunBeforeUnloadConfirmPanelResultListener::RunBeforeUnloadConfirmPanelResultListener):
997         (WebKit::RunJavaScriptAlertResultListener::create):
998         (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
999         (WebKit::RunJavaScriptConfirmResultListener::create):
1000         (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
1001         (WebKit::RunJavaScriptPromptResultListener::create):
1002         (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
1003         (WKPageSetPageUIClient):
1004         * UIProcess/API/Cocoa/WKWebView.mm:
1005         (-[WKWebView _takeViewSnapshot]):
1006         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1007         * UIProcess/Cocoa/UIDelegate.h:
1008         * UIProcess/Cocoa/UIDelegate.mm:
1009         (WebKit::UIDelegate::UIClient::createNewPage):
1010         * UIProcess/ios/WKGeolocationProviderIOS.mm:
1011         (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
1012         * UIProcess/mac/WKImmediateActionController.mm:
1013         (-[WKImmediateActionController _webHitTestResult]):
1014         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1015         (contextMenuItems):
1016         (WKBundlePageCopyContextMenuItems):
1017         (WKBundlePageCopyContextMenuAtPointInWindow):
1018         * WebProcess/UserContent/WebUserContentController.cpp:
1019         (WebKit::WebUserMessageHandlerDescriptorProxy::create):
1020         * WebProcess/WebPage/WebUndoStep.cpp:
1021         (WebKit::WebUndoStep::create):
1022         * WebProcess/WebPage/WebUndoStep.h:
1023         (WebKit::WebUndoStep::WebUndoStep):
1024
1025 2016-11-01  Gavin Barraclough  <barraclough@apple.com>
1026
1027         Remove PageThrottler & all related code
1028         https://bugs.webkit.org/show_bug.cgi?id=164302
1029
1030         Reviewed by Ryosuke Niwa.
1031
1032         All relevant information now available from the ActivityState.
1033
1034         * PluginProcess/PluginProcess.cpp:
1035         (WebKit::PluginProcess::PluginProcess):
1036         (WebKit::PluginProcess::createWebProcessConnection):
1037         (WebKit::PluginProcess::audioHardwareDidBecomeActive): Deleted.
1038         (WebKit::PluginProcess::audioHardwareDidBecomeInactive): Deleted.
1039         * PluginProcess/PluginProcess.h:
1040         (): Deleted.
1041         * PluginProcess/WebProcessConnection.cpp:
1042         (WebKit::WebProcessConnection::audioHardwareDidBecomeActive): Deleted.
1043         (WebKit::WebProcessConnection::audioHardwareDidBecomeInactive): Deleted.
1044         * PluginProcess/WebProcessConnection.h:
1045         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1046         (WebKit::NPRuntimeObjectMap::evaluate):
1047         * WebProcess/Plugins/Plugin.h:
1048         (WebKit::Plugin::audioHardwareActivity): Deleted.
1049         * WebProcess/Plugins/PluginProcessConnection.cpp:
1050         (WebKit::PluginProcessConnection::PluginProcessConnection):
1051         (WebKit::PluginProcessConnection::didReceiveMessage):
1052         (WebKit::PluginProcessConnection::audioHardwareDidBecomeActive): Deleted.
1053         (WebKit::PluginProcessConnection::audioHardwareDidBecomeInactive): Deleted.
1054         * WebProcess/Plugins/PluginProcessConnection.h:
1055         (WebKit::PluginProcessConnection::supportsAsynchronousPluginInitialization):
1056         (WebKit::PluginProcessConnection::audioHardwareActivity): Deleted.
1057         * WebProcess/Plugins/PluginProcessConnection.messages.in:
1058         * WebProcess/Plugins/PluginProxy.cpp:
1059         (WebKit::PluginProxy::audioHardwareActivity): Deleted.
1060         * WebProcess/Plugins/PluginProxy.h:
1061         * WebProcess/Plugins/PluginView.cpp:
1062         (WebKit::PluginView::audioHardwareActivity): Deleted.
1063         * WebProcess/Plugins/PluginView.h:
1064         * WebProcess/WebPage/WebPage.cpp:
1065
1066 2016-11-03  Dan Bernstein  <mitz@apple.com>
1067
1068         REGRESSION (r206247): Painting milestones can be delayed until the next layer flush
1069         https://bugs.webkit.org/show_bug.cgi?id=164340
1070         <rdar://problem/29074344>
1071
1072         Reviewed by Tim Horton.
1073
1074         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Declared new helper function.
1075         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1076         (WebKit::TiledCoreAnimationDrawingArea::sendPendingNewlyReachedLayoutMilestones): Helper
1077           function that sends the message to the UI process and resets
1078           m_pendingNewlyReachedLayoutMilestones.
1079         (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Wait until after the commit to get the
1080           pending milestones and send them to the UI process. This way we don’t miss milestones that
1081           fire during the commit.
1082
1083 2016-11-02  David Kilzer  <ddkilzer@apple.com>
1084
1085         Bug 164333: Add logging for "WebKit encountered an internal error" messages due to Network process crashes
1086         <https://webkit.org/b/164333>
1087         <rdar://problem/29072727>
1088
1089         Reviewed by Alex Christensen.
1090
1091         * WebProcess/WebProcess.cpp:
1092         (WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
1093         Add private method to log diagnostic message.
1094         (WebKit::WebProcess::networkProcessConnectionClosed):
1095         Call logDiagnosticMessageForNetworkProcessCrash().
1096         * WebProcess/WebProcess.h:
1097         (WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
1098         Declare new method.
1099
1100 2016-11-02  Alex Christensen  <achristensen@webkit.org>
1101
1102         Remove Battery Status API from the tree
1103         https://bugs.webkit.org/show_bug.cgi?id=164213
1104
1105         Reviewed by Sam Weinig.
1106
1107         * CMakeLists.txt:
1108         * PlatformEfl.cmake:
1109         * Shared/API/APIObject.h:
1110         * Shared/API/c/WKBase.h:
1111         * Shared/WebBatteryStatus.cpp: Removed.
1112         * Shared/WebBatteryStatus.h: Removed.
1113         * UIProcess/API/C/WKAPICast.h:
1114         * UIProcess/API/C/WKBatteryManager.cpp: Removed.
1115         * UIProcess/API/C/WKBatteryManager.h: Removed.
1116         * UIProcess/API/C/WKBatteryStatus.cpp: Removed.
1117         * UIProcess/API/C/WKBatteryStatus.h: Removed.
1118         * UIProcess/API/C/WKContext.cpp:
1119         (WKContextGetBatteryManager): Deleted.
1120         * UIProcess/API/C/WKContext.h:
1121         * UIProcess/API/efl/ewk_context.cpp:
1122         (EwkContext::EwkContext):
1123         * UIProcess/API/efl/ewk_context_private.h:
1124         * UIProcess/API/efl/ewk_main.cpp:
1125         (WebKit::EwkMain::initialize):
1126         (WebKit::EwkMain::finalize):
1127         (WebKit::EwkMain::shutdownInitializedEFLModules):
1128         * UIProcess/API/gtk/WebKitBatteryProvider.cpp: Removed.
1129         * UIProcess/API/gtk/WebKitBatteryProvider.h: Removed.
1130         * UIProcess/API/gtk/WebKitWebContext.cpp:
1131         (webkitWebContextConstructed):
1132         * UIProcess/WebBatteryManagerProxy.cpp: Removed.
1133         * UIProcess/WebBatteryManagerProxy.h: Removed.
1134         * UIProcess/WebBatteryManagerProxy.messages.in: Removed.
1135         * UIProcess/WebBatteryProvider.cpp: Removed.
1136         * UIProcess/WebBatteryProvider.h: Removed.
1137         * UIProcess/WebProcessPool.cpp:
1138         (WebKit::m_hiddenPageThrottlingTimer):
1139         * UIProcess/efl/BatteryProvider.cpp: Removed.
1140         * UIProcess/efl/BatteryProvider.h: Removed.
1141         * WebProcess/Battery: Removed.
1142         * WebProcess/Battery/WebBatteryManager.cpp: Removed.
1143         * WebProcess/Battery/WebBatteryManager.h: Removed.
1144         * WebProcess/Battery/WebBatteryManager.messages.in: Removed.
1145         * WebProcess/WebCoreSupport/WebBatteryClient.cpp: Removed.
1146         * WebProcess/WebCoreSupport/WebBatteryClient.h: Removed.
1147         * WebProcess/WebPage/WebPage.cpp:
1148         (WebKit::m_userInterfaceLayoutDirection):
1149         * WebProcess/WebProcess.cpp:
1150         (WebKit::m_resourceLoadStatisticsStorage):
1151
1152 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1153
1154         NetworkSession: Add NetworkDataTask implementation for blobs
1155         https://bugs.webkit.org/show_bug.cgi?id=163939
1156
1157         Reviewed by Alex Christensen.
1158
1159         Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
1160         adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
1161         is enabled.
1162
1163         * CMakeLists.txt: Add new files to compilation.
1164         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1165         * NetworkProcess/Downloads/BlobDownloadClient.h:
1166         * NetworkProcess/Downloads/Download.cpp:
1167         (WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
1168         definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
1169         reveices a NetworkDataTask and is used by Soup backend and blobs.
1170         (WebKit::Download::~Download):
1171         (WebKit::Download::start):
1172         (WebKit::Download::startWithHandle):
1173         (WebKit::Download::cancel):
1174         (WebKit::Download::didReceiveAuthenticationChallenge):
1175         (WebKit::Download::didReceiveData):
1176         (WebKit::Download::didFinish):
1177         (WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
1178         this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.
1179         * NetworkProcess/Downloads/Download.h:
1180         (WebKit::Download::Download):
1181         (WebKit::Download::suggestedName):
1182         (WebKit::Download::request):
1183         * NetworkProcess/Downloads/DownloadManager.cpp:
1184         (WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
1185         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
1186         * NetworkProcess/Downloads/DownloadManager.h:
1187         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
1188         (WebKit::Download::platformCancelNetworkLoad):
1189         * NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
1190         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1191         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
1192         using NetworkSession.
1193         * NetworkProcess/NetworkDataTask.cpp:
1194         (WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.
1195         * NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
1196         * NetworkProcess/NetworkDataTaskBlob.cpp: Added.
1197         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
1198         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
1199         (WebKit::NetworkDataTaskBlob::clearStream):
1200         (WebKit::NetworkDataTaskBlob::resume):
1201         (WebKit::NetworkDataTaskBlob::suspend):
1202         (WebKit::NetworkDataTaskBlob::cancel):
1203         (WebKit::NetworkDataTaskBlob::invalidateAndCancel):
1204         (WebKit::NetworkDataTaskBlob::getSizeForNext):
1205         (WebKit::NetworkDataTaskBlob::didGetSize):
1206         (WebKit::NetworkDataTaskBlob::seek):
1207         (WebKit::NetworkDataTaskBlob::didReceiveResponse):
1208         (WebKit::NetworkDataTaskBlob::read):
1209         (WebKit::NetworkDataTaskBlob::readData):
1210         (WebKit::NetworkDataTaskBlob::readFile):
1211         (WebKit::NetworkDataTaskBlob::didOpen):
1212         (WebKit::NetworkDataTaskBlob::didRead):
1213         (WebKit::NetworkDataTaskBlob::consumeData):
1214         (WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
1215         (WebKit::NetworkDataTaskBlob::suggestedFilename):
1216         (WebKit::NetworkDataTaskBlob::download):
1217         (WebKit::NetworkDataTaskBlob::writeDownload):
1218         (WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
1219         (WebKit::NetworkDataTaskBlob::didFailDownload):
1220         (WebKit::NetworkDataTaskBlob::didFinishDownload):
1221         (WebKit::NetworkDataTaskBlob::didFail):
1222         (WebKit::NetworkDataTaskBlob::didFinish):
1223         * NetworkProcess/NetworkDataTaskBlob.h: Added.
1224         * NetworkProcess/NetworkLoad.cpp:
1225         (WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
1226         (WebKit::NetworkLoad::~NetworkLoad):
1227         (WebKit::NetworkLoad::setDefersLoading):
1228         (WebKit::NetworkLoad::cancel):
1229         (WebKit::NetworkLoad::continueWillSendRequest):
1230         (WebKit::NetworkLoad::continueDidReceiveResponse):
1231         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
1232         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
1233         * NetworkProcess/NetworkLoad.h:
1234         * NetworkProcess/NetworkSession.cpp:
1235         (WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.
1236         * NetworkProcess/NetworkSession.h:
1237         (WebKit::NetworkSession::registerNetworkDataTask): Ditto.
1238         (WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.
1239         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing
1240         because in Cocoa all tasks are invalidated and canceled by the network session.
1241         * NetworkProcess/mac/NetworkLoadMac.mm:
1242         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1243         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
1244         (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
1245         (WebKit::NetworkDataTaskSoup::download):
1246         * NetworkProcess/soup/NetworkDataTaskSoup.h:
1247         * NetworkProcess/soup/NetworkSessionSoup.cpp:
1248         * NetworkProcess/soup/NetworkSessionSoup.h:
1249         * PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
1250         * PlatformGTK.cmake: Ditto.
1251         * WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.
1252
1253 2016-11-02  Andy Estes  <aestes@apple.com>
1254
1255         REGRESSION (r199558): File paths selected for upload are stored using the wrong string encoding
1256         https://bugs.webkit.org/show_bug.cgi?id=164311
1257         <rdar://problem/26995374>
1258
1259         Reviewed by Tim Horton.
1260
1261         -[NSURL fileSystemRepresentation] returns a char* in file system representation, which on
1262         iOS is UTF-8, but we were implicitly converting it to a String, which assumes a char* is
1263         Latin-1 encoded.
1264
1265         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1266         (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]): Changed to use fromUTF8() to
1267         convert fileURL.fileSystemRepresentation to a String.
1268
1269 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1270
1271         NetworkSession: Network process crash when converting main resource to download
1272         https://bugs.webkit.org/show_bug.cgi?id=164220
1273
1274         Reviewed by Alex Christensen.
1275
1276         Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
1277         sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
1278         NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
1279         download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
1280         NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
1281         having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
1282         load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
1283         NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
1284         client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
1285         created yet. That's not expected to happen and when the response completion handler is called in the
1286         NetworkDataTask it tries to use either the client or the download and it crashes.
1287
1288         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1289         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Update ASSERT, because abort doesn't cleanup the
1290         resource loader in case it's becoming a download.
1291         * NetworkProcess/NetworkResourceLoader.cpp:
1292         (WebKit::NetworkResourceLoader::didBecomeDownload): Call cleanup() instead of just deleting the network load.
1293         (WebKit::NetworkResourceLoader::isBecomingDownload): Helper method to check if the resource load was converted to a
1294         download, but didBecomeDownload() hasn't been called yet.
1295         (WebKit::NetworkResourceLoader::abort): If the resource load is becoming a download do not call cleanup()
1296         because it will be called by didBecomeDownload() later.
1297         * NetworkProcess/NetworkResourceLoader.h:
1298
1299 2016-11-02  David Kilzer  <ddkilzer@apple.com>
1300
1301         Add logging for "WebKit encountered an internal error" messages
1302         <https://webkit.org/b/164272>
1303         <rdar://problem/28546064>
1304
1305         Reviewed by Alex Christensen.
1306
1307         * NetworkProcess/NetworkResourceLoader.cpp:
1308         (WebKit::NetworkResourceLoader::startNetworkLoad):
1309         * WebProcess/Network/WebLoaderStrategy.cpp:
1310         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
1311         * WebProcess/Network/WebResourceLoader.cpp:
1312         (WebKit::WebResourceLoader::didReceiveResource):
1313         - Add logging for various internalError() events.
1314
1315 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1316
1317         [GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
1318         https://bugs.webkit.org/show_bug.cgi?id=164303
1319
1320         Reviewed by Michael Catanzaro.
1321
1322         This can happen if the web process exits before the UI process has cleaned up the accelerated surface. Trap
1323         BadDrawable and BadDamage X errors and ignore them, while still crashing for any other X error.
1324
1325         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
1326         (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
1327         (WebKit::AcceleratedBackingStoreX11::update):
1328
1329 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1330
1331         [GTK] Remove FileSystem::filenameToString() and use FileSystem::stringFromFileSystemRepresentation() everywhere instead
1332         https://bugs.webkit.org/show_bug.cgi?id=164315
1333
1334         Reviewed by Michael Catanzaro.
1335
1336         * Shared/gtk/ProcessExecutablePathGtk.cpp:
1337         (WebKit::getExecutablePath):
1338         (WebKit::findWebKitProcess):
1339         * UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp:
1340         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
1341         (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
1342         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
1343         * UIProcess/API/gtk/WebKitWebContext.cpp:
1344         (webkitWebContextConstructed):
1345         (webkit_web_context_set_favicon_database_directory):
1346         (webkit_web_context_set_additional_plugins_directory):
1347         (webkit_web_context_set_disk_cache_directory):
1348         * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
1349         (webkitWebsiteDataManagerGetDataStore):
1350         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
1351         (WebKit::PluginInfoCache::PluginInfoCache):
1352         * UIProcess/gtk/WebProcessPoolGtk.cpp:
1353         (WebKit::WebProcessPool::platformDefaultIconDatabasePath):
1354         * WebProcess/gtk/WebGtkExtensionManager.cpp:
1355         (WebKit::parseUserData):
1356
1357 2016-11-02  Romain Bellessort  <romain.bellessort@crf.canon.fr>
1358
1359         [Readable Streams API] Enable creation of ReadableByteStreamController
1360         https://bugs.webkit.org/show_bug.cgi?id=164014
1361
1362         Reviewed by Youenn Fablet.
1363
1364         Added flag for the byte stream part of Readable Streams API.
1365
1366         * Configurations/FeatureDefines.xcconfig:
1367
1368 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1369
1370         PluginInfoStore::loadPluginsIfNecessary can still load plugins multiple times
1371         https://bugs.webkit.org/show_bug.cgi?id=164103
1372
1373         Reviewed by Michael Catanzaro.
1374
1375         Follow symlinks when scanning plugins to avoid duplicates.
1376
1377         * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Bump the cache version to ensure duplicated plugins are removed
1378         from the cache.
1379         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
1380         (WebKit::PluginInfoStore::pluginPathsInDirectory): Use realpath() to always return the actual file path.
1381
1382 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1383
1384         [GTK] Plugin process crash in WebKit::NetscapePluginX11::visibilityDidChange with evince browser plugin
1385         https://bugs.webkit.org/show_bug.cgi?id=164204
1386
1387         Reviewed by Michael Catanzaro.
1388
1389         Check the platform plugin widget is embedded before trying to get its socket window.
1390
1391         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1392         (WebKit::NetscapePluginX11::geometryDidChange):
1393         (WebKit::NetscapePluginX11::visibilityDidChange):
1394
1395 2016-11-01  Wenson Hsieh  <wenson_hsieh@apple.com>
1396
1397         Turn the Input Events runtime flag on by default
1398         https://bugs.webkit.org/show_bug.cgi?id=164297
1399
1400         Reviewed by Ryosuke Niwa.
1401
1402         * Shared/WebPreferencesDefinitions.h:
1403
1404 2016-11-01  Jaehun Lim  <ljaehun.lim@samsung.com>
1405
1406         Unreviewed, EFL build fix after r208225
1407
1408         Rename ViewState to ActivityState
1409
1410         * UIProcess/efl/WebView.cpp:
1411         (WebKit::WebView::setActive):
1412         (WebKit::WebView::setFocused):
1413         (WebKit::WebView::setVisible):
1414
1415 2016-11-01  Alex Christensen  <achristensen@webkit.org>
1416
1417         Fix CMake build.
1418
1419         * PlatformMac.cmake:
1420
1421 2016-11-01  Ryosuke Niwa  <rniwa@webkit.org>
1422
1423         Remove CUSTOM_ELEMENTS build flag
1424         https://bugs.webkit.org/show_bug.cgi?id=164267
1425
1426         Reviewed by Antti Koivisto.
1427
1428         Removed the build flag.
1429
1430         * Configurations/FeatureDefines.xcconfig:
1431         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1432         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1433         * WebProcess/WebPage/WebPage.cpp:
1434         (WebKit::WebPage::updatePreferences):
1435
1436 2016-11-01  Eric Carlson  <eric.carlson@apple.com>
1437
1438         [MediaStream] restrict media capture secure connections
1439         https://bugs.webkit.org/show_bug.cgi?id=164234
1440         <rdar://problem/28944906>
1441
1442         Reviewed by Alex Christensen.
1443
1444         * Shared/WebPreferencesDefinitions.h:
1445    
1446         * UIProcess/API/C/WKPreferences.cpp:
1447         (WKPreferencesSetMediaCaptureRequiresSecureConnection):
1448         (WKPreferencesGetMediaCaptureRequiresSecureConnection):
1449         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1450    
1451         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1452         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Drive by
1453          fix: remove some unused parameters in a lambda call.
1454
1455         * WebProcess/WebPage/WebPage.cpp:
1456         (WebKit::WebPage::updatePreferences):
1457
1458 2016-11-01  Gavin Barraclough  <barraclough@apple.com>
1459
1460         Add IsAudible, IsLoading to ActivityState
1461         https://bugs.webkit.org/show_bug.cgi?id=164286
1462
1463         Reviewed by Geoff Garen.
1464
1465         By computing these values in the UIProcess and passing them to WebContent we can
1466         more closely unify iOS & macOS throttling, and remove the PageThrottler class.
1467
1468         * UIProcess/WebPageProxy.cpp:
1469         (WebKit::WebPageProxy::updateActivityState):
1470             - Added update for IsAudible, IsLoading flags.
1471         (WebKit::WebPageProxy::updateThrottleState):
1472             - Read IsAudible, IsLoading flags from ActivityState.
1473         (WebKit::WebPageProxy::setMuted):
1474             - call activityStateDidChange to trigger update.
1475         (WebKit::WebPageProxy::isPlayingMediaDidChange):
1476             - call activityStateDidChange to trigger update.
1477         * UIProcess/WebPageProxy.h:
1478         (WebKit::WebPageProxy::isLoadingChanged):
1479             - call activityStateDidChange to trigger update.
1480
1481 2016-10-31  Gavin Barraclough  <barraclough@apple.com>
1482
1483         Rename ViewState to ActivityState
1484         https://bugs.webkit.org/show_bug.cgi?id=164254
1485
1486         Reviewed by Andreas Kling.
1487
1488         We plan to add a couple more flags to ViewState that aren't directly related to the view
1489         itself - whether there is an ongoing page load, and whether whether there is audio playback.
1490         This will allow viewState (now activityState) to fully drive throttling decisions.
1491
1492         Renaming this bitfield accordingly.
1493
1494         * Shared/WebPageCreationParameters.cpp:
1495         (WebKit::WebPageCreationParameters::encode):
1496         (WebKit::WebPageCreationParameters::decode):
1497         * Shared/WebPageCreationParameters.h:
1498         * UIProcess/API/Cocoa/WKWebView.mm:
1499         (-[WKWebView didMoveToWindow]):
1500         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1501         (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
1502         (_WebKitWebViewBasePrivate::updateActivityStateTimerFired):
1503         (webkitWebViewBaseScheduleUpdateActivityState):
1504         (toplevelWindowFocusInEvent):
1505         (toplevelWindowFocusOutEvent):
1506         (toplevelWindowStateEvent):
1507         (webkitWebViewBaseSetToplevelOnScreenWindow):
1508         (webkitWebViewBaseMap):
1509         (webkitWebViewBaseUnmap):
1510         (webkitWebViewBaseSetFocus):
1511         (webkitWebViewBaseIsInWindowActive):
1512         (webkitWebViewBaseIsFocused):
1513         (webkitWebViewBaseIsVisible):
1514         (webkitWebViewBaseIsInWindow):
1515         (_WebKitWebViewBasePrivate::updateViewStateTimerFired): Deleted.
1516         (webkitWebViewBaseScheduleUpdateViewState): Deleted.
1517         * UIProcess/Cocoa/WebViewImpl.mm:
1518         (WebKit::WebViewImpl::becomeFirstResponder):
1519         (WebKit::WebViewImpl::resignFirstResponder):
1520         (WebKit::WebViewImpl::windowDidOrderOffScreen):
1521         (WebKit::WebViewImpl::windowDidOrderOnScreen):
1522         (WebKit::WebViewImpl::windowDidBecomeKey):
1523         (WebKit::WebViewImpl::windowDidResignKey):
1524         (WebKit::WebViewImpl::windowDidMiniaturize):
1525         (WebKit::WebViewImpl::windowDidDeminiaturize):
1526         (WebKit::WebViewImpl::windowDidChangeOcclusionState):
1527         (WebKit::WebViewImpl::viewDidMoveToWindow):
1528         (WebKit::WebViewImpl::viewDidHide):
1529         (WebKit::WebViewImpl::viewDidUnhide):
1530         (WebKit::WebViewImpl::activeSpaceDidChange):
1531         (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
1532         (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
1533         (WebKit::WebViewImpl::prepareForMoveToWindow):
1534         * UIProcess/DrawingAreaProxy.h:
1535         (WebKit::DrawingAreaProxy::waitForDidUpdateActivityState):
1536         (WebKit::DrawingAreaProxy::waitForDidUpdateViewState): Deleted.
1537         * UIProcess/WebPageProxy.cpp:
1538         (WebKit::WebPageProxy::WebPageProxy):
1539         (WebKit::WebPageProxy::reattachToWebProcess):
1540         (WebKit::WebPageProxy::setSuppressVisibilityUpdates):
1541         (WebKit::WebPageProxy::updateActivityState):
1542         (WebKit::WebPageProxy::activityStateDidChange):
1543         (WebKit::WebPageProxy::dispatchActivityStateChange):
1544         (WebKit::WebPageProxy::updateThrottleState):
1545         (WebKit::WebPageProxy::waitForDidUpdateActivityState):
1546         (WebKit::WebPageProxy::creationParameters):
1547         (WebKit::WebPageProxy::installActivityStateChangeCompletionHandler):
1548         (WebKit::WebPageProxy::updateViewState): Deleted.
1549         (WebKit::WebPageProxy::viewStateDidChange): Deleted.
1550         (WebKit::WebPageProxy::dispatchViewStateChange): Deleted.
1551         (WebKit::WebPageProxy::waitForDidUpdateViewState): Deleted.
1552         (WebKit::WebPageProxy::installViewStateChangeCompletionHandler): Deleted.
1553         * UIProcess/WebPageProxy.h:
1554         (WebKit::WebPageProxy::isInWindow):
1555         (WebKit::WebPageProxy::didUpdateActivityState):
1556         (WebKit::WebPageProxy::isViewVisible):
1557         (WebKit::WebPageProxy::didUpdateViewState): Deleted.
1558         * UIProcess/WebPageProxy.messages.in:
1559         * UIProcess/WebProcessProxy.cpp:
1560         (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
1561         * UIProcess/efl/WebView.cpp:
1562         * UIProcess/ios/WKContentView.mm:
1563         (-[WKContentView _applicationDidEnterBackground]):
1564         (-[WKContentView _applicationWillEnterForeground]):
1565         * UIProcess/ios/WKPDFView.mm:
1566         (-[WKPDFView _applicationDidEnterBackground]):
1567         (-[WKPDFView _applicationWillEnterForeground]):
1568         * UIProcess/ios/WebPageProxyIOS.mm:
1569         (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
1570         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1571         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1572         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
1573         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
1574         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
1575         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1576         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1577         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
1578         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
1579         * WebProcess/Plugins/PluginView.cpp:
1580         (WebKit::PluginView::activityStateDidChange):
1581         (WebKit::PluginView::viewStateDidChange): Deleted.
1582         * WebProcess/Plugins/PluginView.h:
1583         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1584         (WebKit::AcceleratedDrawingArea::activityStateDidChange):
1585         (WebKit::AcceleratedDrawingArea::viewStateDidChange): Deleted.
1586         * WebProcess/WebPage/AcceleratedDrawingArea.h:
1587         * WebProcess/WebPage/DrawingArea.h:
1588         (WebKit::DrawingArea::activityStateDidChange):
1589         (WebKit::DrawingArea::viewStateDidChange): Deleted.
1590         * WebProcess/WebPage/WebPage.cpp:
1591         (WebKit::m_userInterfaceLayoutDirection):
1592         (WebKit::WebPage::reinitializeWebPage):
1593         (WebKit::WebPage::updateIsInWindow):
1594         (WebKit::WebPage::setActivityState):
1595         (WebKit::WebPage::setViewState): Deleted.
1596         * WebProcess/WebPage/WebPage.h:
1597         (WebKit::WebPage::isVisible):
1598         (WebKit::WebPage::isVisibleOrOccluded):
1599         * WebProcess/WebPage/WebPage.messages.in:
1600         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1601         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1602         (WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):
1603         (WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange): Deleted.
1604         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1605         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1606         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1607         (WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):
1608         (WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired):
1609         (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange): Deleted.
1610         (WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired): Deleted.
1611
1612 2016-10-31  Jaehun Lim  <ljaehun.lim@samsung.com>
1613
1614         Unreviewed, CMake build fix
1615
1616         Adds #include <WebCore/IDBGetAllRecordsData.h>
1617
1618         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1619
1620 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
1621
1622         Add basic visual/layout viewport support for fixed position layout
1623         https://bugs.webkit.org/show_bug.cgi?id=164261
1624
1625         Reviewed by Dean Jackson.
1626
1627         Don't make visualViewportEnabled an experimental feature, because I don't want it enabled
1628         by default in WebKitTestRunner (and therefore mismatching DumpRenderTree).
1629
1630         * Shared/WebPreferencesDefinitions.h:
1631
1632 2016-10-29  Filip Pizlo  <fpizlo@apple.com>
1633
1634         JSC should support SharedArrayBuffer
1635         https://bugs.webkit.org/show_bug.cgi?id=163986
1636
1637         Reviewed by Keith Miller.
1638         
1639         Adds some small things we need for SharedArrayBuffer.
1640
1641         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1642         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1643         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1644         (WebKit::InjectedBundle::createWebDataFromUint8Array):
1645
1646 2016-10-31  Brady Eidson  <beidson@apple.com>
1647
1648         IndexedDB 2.0: Support IDBObjectStore getAll/getAllKeys.
1649         <rdar://problem/28806934> and https://bugs.webkit.org/show_bug.cgi?id=164097
1650
1651         Reviewed by Darin Adler.
1652
1653         - Handle moving "Get All" requests to and from the DatabaseProcess.
1654         - Handle the additional task of creating/passing Sandbox Extensions for
1655           referenced files when necessary. 
1656           
1657         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1658         (WebKit::WebIDBConnectionToClient::handleGetResult):
1659         (WebKit::WebIDBConnectionToClient::didGetAllRecords):
1660         (WebKit::WebIDBConnectionToClient::getAllRecords):
1661         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
1662         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
1663         
1664         * Shared/WebCoreArgumentCoders.h:
1665         
1666         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1667         (WebKit::WebIDBConnectionToServer::getAllRecords):
1668         (WebKit::preregisterSandboxExtensionsIfNecessary):
1669         (WebKit::WebIDBConnectionToServer::didGetAllRecords):
1670         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1671         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
1672
1673 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
1674
1675         [WK1] Candidate visibility should not update as a result of selection during a dictionary lookup
1676         https://bugs.webkit.org/show_bug.cgi?id=164236
1677         <rdar://problem/28747712>
1678
1679         Reviewed by Beth Dakin.
1680
1681         See WebCore ChangeLog for more detail. Removes m_isGettingDictionaryPopupInfo from the WebPage in favor of
1682         keeping track of the same state in Editor, so that both the WK1 and WK2 cases can share the same codepath.
1683
1684         * WebProcess/WebPage/WebPage.cpp:
1685         (WebKit::WebPage::didChangeSelection):
1686         * WebProcess/WebPage/WebPage.h:
1687         * WebProcess/WebPage/mac/WebPageMac.mm:
1688         (WebKit::WebPage::dictionaryPopupInfoForRange):
1689
1690 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
1691
1692         Implement IntersectionObserver
1693         https://bugs.webkit.org/show_bug.cgi?id=159475
1694
1695         Reviewed by Ryosuke Niwa.
1696
1697         Add ENABLE_INTERSECTION_OBSERVER, enabled by default.
1698
1699         * Configurations/FeatureDefines.xcconfig:
1700
1701 2016-10-31  Ryan Haddad  <ryanhaddad@apple.com>
1702
1703         Unreviewed, rolling out r208154.
1704
1705         This change caused an assertion failure during API tests on
1706         macOS.
1707
1708         Reverted changeset:
1709
1710         "NetworkSession: Network process crash when converting main
1711         resource to download"
1712         https://bugs.webkit.org/show_bug.cgi?id=164220
1713         http://trac.webkit.org/changeset/208154
1714
1715 2016-10-28  Brent Fulgham  <bfulgham@apple.com>
1716
1717         Do a better job of protecting Frame objects in the context of JavaScript calls
1718         https://bugs.webkit.org/show_bug.cgi?id=164163
1719         <rdar://problem/28955249>
1720
1721         Reviewed by Darin Adler.
1722
1723         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1724         (WebKit::InjectedBundleRangeHandle::renderedImage): Protected the Frame.
1725         * WebProcess/WebPage/WebPage.cpp:
1726         (WebKit::WebPage::insertTextAsync): Ditto.
1727         (WebKit::WebPage::setComposition): Ditto.
1728         * WebProcess/WebPage/mac/WebPageMac.mm:
1729         (WebKit::WebPage::insertDictatedTextAsync): Ditto.
1730
1731 2016-10-31  Carlos Garcia Campos  <cgarcia@igalia.com>
1732
1733         NetworkSession: Network process crash when converting main resource to download
1734         https://bugs.webkit.org/show_bug.cgi?id=164220
1735
1736         Reviewed by Alex Christensen.
1737
1738         Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
1739         sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
1740         NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
1741         download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
1742         NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
1743         having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
1744         load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
1745         NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
1746         client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
1747         created yet. That's not expected to happen and when the response completion handler is called in the
1748         NetworkDataTask it tries to use either the client or the download and it crashes.
1749
1750         * NetworkProcess/NetworkResourceLoader.cpp:
1751         (WebKit::NetworkResourceLoader::didBecomeDownload): Call cleanup() instead of just deleting the network load.
1752         (WebKit::NetworkResourceLoader::abort): If we still have a network load that was converted to a download, do not
1753         call cleanup() because it will be called by didBecomeDownload() later.
1754
1755 2016-10-31  Darin Adler  <darin@apple.com>
1756
1757         Move ChildNode and ParentNode from ExceptionCode to Exception, add support for ExceptionOr<T&>
1758         https://bugs.webkit.org/show_bug.cgi?id=164214
1759
1760         Reviewed by Alex Christensen.
1761
1762         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
1763         (webkit_dom_document_query_selector): Updated exception handling.
1764         (webkit_dom_document_query_selector_all): Ditto.
1765         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
1766         (webkit_dom_document_fragment_query_selector): Ditto.
1767         (webkit_dom_document_fragment_query_selector_all): Ditto.
1768         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
1769         (webkit_dom_element_query_selector): Ditto.
1770         (webkit_dom_element_query_selector_all): Ditto.
1771
1772 2016-10-31  Darin Adler  <darin@apple.com>
1773
1774         Convert Document from ExceptionCode to Exception
1775         https://bugs.webkit.org/show_bug.cgi?id=164212
1776
1777         Reviewed by Alex Christensen.
1778
1779         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
1780         (webkit_dom_document_create_element): Updated exception handling.
1781         (webkit_dom_document_create_cdata_section): Ditto.
1782         (webkit_dom_document_create_processing_instruction): Ditto.
1783         (webkit_dom_document_create_attribute): Ditto.
1784         (webkit_dom_document_import_node): Ditto.
1785         (webkit_dom_document_create_element_ns): Ditto.
1786         (webkit_dom_document_create_attribute_ns): Ditto.
1787         (webkit_dom_document_adopt_node): Ditto.
1788         (webkit_dom_document_create_event): Ditto.
1789         (webkit_dom_document_set_xml_version): Ditto.
1790         (webkit_dom_document_get_cookie): Ditto.
1791         (webkit_dom_document_set_cookie): Ditto.
1792         (webkit_dom_document_set_body): Ditto.
1793         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
1794         (-[WKDOMDocument createElement:]): Ditto.
1795
1796 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
1797
1798         Holding down a key to choose an accented character should fire "insertReplacementText" input events
1799         https://bugs.webkit.org/show_bug.cgi?id=164209
1800         <rdar://problem/29019305>
1801
1802         Reviewed by Darin Adler.
1803
1804         When replacing text, call Editor::insertText with the correct TextEventInputType so that WebCore will know to
1805         use EditActionInsertReplacement when creating and applying the corresponding TypingCommand. Additional minor
1806         changes in order to support testing replacement text insertion.
1807
1808         * UIProcess/API/Cocoa/WKWebView.mm:
1809         (-[WKWebView _insertText:replacementRange:]):
1810         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1811         * WebProcess/WebPage/WebPage.cpp:
1812         (WebKit::WebPage::insertTextAsync):
1813
1814 2016-10-30  Darin Adler  <darin@apple.com>
1815
1816         Move Element, NamedNodeMap, and DOMStringMap from ExceptionCode to Exception
1817         https://bugs.webkit.org/show_bug.cgi?id=164206
1818
1819         Reviewed by Chris Dumez.
1820
1821         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
1822         (webkit_dom_named_node_map_set_named_item): Updated exception handling.
1823         (webkit_dom_named_node_map_remove_named_item): Ditto.
1824         (webkit_dom_named_node_map_set_named_item_ns): Ditto.
1825         (webkit_dom_named_node_map_remove_named_item_ns): Ditto.
1826         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
1827         (webkit_dom_element_set_attribute): Ditto.
1828         (webkit_dom_element_set_attribute_node): Ditto.
1829         (webkit_dom_element_remove_attribute_node): Ditto.
1830         (webkit_dom_element_set_attribute_ns): Ditto.
1831         (webkit_dom_element_set_attribute_node_ns): Ditto.
1832         (webkit_dom_element_matches): Ditto.
1833         (webkit_dom_element_closest): Ditto.
1834         (webkit_dom_element_webkit_matches_selector): Ditto.
1835         (webkit_dom_element_insert_adjacent_element): Ditto.
1836         (webkit_dom_element_insert_adjacent_html): Ditto.
1837         (webkit_dom_element_insert_adjacent_text): Ditto.
1838         (webkit_dom_element_set_inner_html): Ditto.
1839         (webkit_dom_element_set_outer_html): Ditto.
1840         * WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
1841         (-[WKDOMElement setAttribute:value:]): Ditto.
1842
1843 2016-10-30  Yusuke Suzuki  <utatane.tea@gmail.com>
1844
1845         [DOM] Introduce WebCore::jsDynamicDowncast
1846         https://bugs.webkit.org/show_bug.cgi?id=164137
1847
1848         Reviewed by Darin Adler.
1849
1850         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
1851         (WebKit::WebAutomationSessionProxy::elementForNodeHandle):
1852
1853 2016-10-29  Darin Adler  <darin@apple.com>
1854
1855         Convert more of DOM from ExceptionCode to Exception
1856         https://bugs.webkit.org/show_bug.cgi?id=164173
1857
1858         Reviewed by Ryosuke Niwa.
1859
1860         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
1861         (webkit_dom_character_data_substring_data): Updated since this
1862         now uses ExceptionOr.
1863         (webkit_dom_character_data_insert_data): Ditto.
1864         (webkit_dom_character_data_delete_data): Ditto.
1865         (webkit_dom_character_data_replace_data): Ditto.
1866         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
1867         (webkit_dom_text_replace_whole_text): Ditto.
1868         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
1869         (webkit_dom_text_split_text): Ditto.
1870
1871 2016-10-28  Darin Adler  <darin@apple.com>
1872
1873         Move all classes in the HTML directory from ExceptionCode to Exception
1874         https://bugs.webkit.org/show_bug.cgi?id=163876
1875
1876         Reviewed by Sam Weinig.
1877
1878         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
1879         (webkit_dom_dom_token_list_add): Updated exception handling.
1880         (webkit_dom_dom_token_list_remove): Ditto.
1881         (webkit_dom_dom_token_list_toggle): Ditto.
1882         (webkit_dom_dom_token_list_replace): Ditto.
1883         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
1884         (webkit_dom_element_remove): Ditto.
1885         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
1886         (webkit_dom_html_element_set_inner_text): Ditto.
1887         (webkit_dom_html_element_set_outer_text): Ditto.
1888         (webkit_dom_html_element_set_content_editable): Ditto.
1889         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
1890         (webkit_dom_html_input_element_set_max_length): Ditto.
1891         (webkit_dom_html_input_element_set_size): Ditto.
1892         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
1893         (webkit_dom_html_select_element_set_length): Ditto.
1894         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
1895         (webkit_dom_html_table_element_insert_row): Ditto.
1896         (webkit_dom_html_table_element_delete_row): Ditto.
1897         (webkit_dom_html_table_element_set_caption): Ditto.
1898         (webkit_dom_html_table_element_set_t_head): Ditto.
1899         (webkit_dom_html_table_element_set_t_foot): Ditto.
1900         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
1901         (webkit_dom_html_table_row_element_insert_cell): Ditto.
1902         (webkit_dom_html_table_row_element_delete_cell): Ditto.
1903         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
1904         (webkit_dom_html_table_section_element_insert_row): Ditto.
1905         (webkit_dom_html_table_section_element_delete_row): Ditto.
1906
1907         * WebProcess/WebPage/WebPage.cpp:
1908         (WebKit::WebPage::editorState): Removed ASSERT_NO_EXCEPTION.
1909
1910         * WebProcess/WebPage/ios/WebPageIOS.mm:
1911         (WebKit::WebPage::setAssistedNodeValueAsNumber): Removed ASSERT_NO_EXCEPTION.
1912
1913         * WebProcess/cocoa/WebPlaybackSessionManager.mm:
1914         (WebKit::WebPlaybackSessionManager::seekableRangesChanged):
1915         Changed the code to use a different interface to TimeRange that does
1916         not involve exceptions.
1917
1918 2016-10-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1919
1920         iOS autocorrection does not trigger an input event of inputType "insertReplacementText"
1921         https://bugs.webkit.org/show_bug.cgi?id=164077
1922         <rdar://problem/28987810>
1923
1924         Reviewed by Simon Fraser.
1925
1926         Small tweak to mark text insertion when autocorrecting as such, as opposed to regular keyboard input.
1927
1928         * WebProcess/WebPage/ios/WebPageIOS.mm:
1929         (WebKit::WebPage::syncApplyAutocorrection):
1930
1931 2016-10-28  Megan Gardner  <megan_gardner@apple.com>
1932
1933         Rename SharedMemoryMac to SharedMemoryCocoa
1934         https://bugs.webkit.org/show_bug.cgi?id=164156
1935
1936         Reviewed by Alex Christensen.
1937
1938         Renamed SharedMemoryMac to SharedMemoryCocoa, as it runs on all cocoa platforms, not exclusively just mac, and
1939         thus should be named to reflect that reality.
1940
1941         * Platform/cocoa: Added.
1942         * Platform/cocoa/SharedMemoryCocoa.cpp: Copied from Source/WebKit2/Platform/mac/SharedMemoryMac.cpp.
1943         * Platform/mac/SharedMemoryMac.cpp: Removed.
1944         * WebKit2.xcodeproj/project.pbxproj:
1945
1946 2016-10-28  Antti Koivisto  <antti@apple.com>
1947
1948         Enable CFNetwork connection cache fast lane for WebKit2
1949         https://bugs.webkit.org/show_bug.cgi?id=164129
1950
1951         Reviewed by Andreas Kling.
1952
1953         The idea of this feature is keep a connection free for higher priority requests so low-priority
1954         image loads can't take all the available connections.
1955
1956         We have this enabled on WK1 but not on WK2. See what enabling it does for performance in bots.
1957
1958         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1959         (WebKit::initializeNetworkSettings):
1960
1961             Based on code inspection setting kHTTPMinimumFastLanePriority is not sufficient to enable this feature,
1962             kHTTPNumFastLanes needs also be set to a non-zero value. Use the same constants as WK1.
1963             Also enable this on Mac to unify behavior.
1964
1965 2016-10-27  Michael Catanzaro  <mcatanzaro@igalia.com>
1966
1967         [GTK] New stable DOM API headers should be included from webkitdom.h
1968         https://bugs.webkit.org/show_bug.cgi?id=164069
1969
1970         Reviewed by Carlos Garcia Campos.
1971
1972         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h:
1973
1974 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
1975
1976         Fix when building against the MacOSX10.12.sdk where "macos" is not recognized
1977         in the availability macros.
1978
1979         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1980
1981 2016-10-27  Megan Gardner  <megan_gardner@apple.com>
1982
1983         Add support for wide gamut for ShareableBitmap for image popovers
1984         https://bugs.webkit.org/show_bug.cgi?id=164001
1985
1986         Reviewed by Simon Fraser.
1987
1988         Added suppport for wide gamut in ShareableBitmap. SharableBitmaps now know the size of their pixels,
1989         and that data is passed back and forth between the processes. The callers of SharedBitmap will determine
1990         if their image should support wide gamut, but ShareableBitmap will override a set flag on a device that
1991         is incapbable of supporting a wide gamut image.
1992         This makes it possible to show wide gamut images in image popovers on iOS.
1993         This is currently untestable, so no tests added.
1994
1995         * Platform/IPC/Decoder.cpp:
1996         (IPC::Decoder::decode):
1997         * Platform/IPC/Decoder.h:
1998         * Platform/IPC/Encoder.cpp:
1999         (IPC::Encoder::encode):
2000         * Platform/IPC/Encoder.h:
2001         * Shared/ShareableBitmap.cpp:
2002         (WebKit::bytesPerPixel):
2003         (WebKit::ShareableBitmap::Handle::encode):
2004         (WebKit::ShareableBitmap::Handle::decode):
2005         (WebKit::ShareableBitmap::Handle::clear):
2006         (WebKit::ShareableBitmap::create):
2007         (WebKit::ShareableBitmap::createShareable):
2008         (WebKit::ShareableBitmap::createHandle):
2009         (WebKit::ShareableBitmap::ShareableBitmap):
2010         * Shared/ShareableBitmap.h:
2011         (WebKit::ShareableBitmap::numBytesForSize):
2012         (WebKit::ShareableBitmap::sizeInBytes):
2013         * Shared/cg/ShareableBitmapCG.cpp:
2014         (WebKit::bitmapInfo):
2015         (WebKit::ShareableBitmap::createGraphicsContext):
2016         (WebKit::ShareableBitmap::createCGImage):
2017         * WebProcess/WebPage/ios/WebPageIOS.mm:
2018         (WebKit::WebPage::getPositionInformation):
2019
2020 2016-10-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2021
2022         Support "insertFromDrop" and "deleteByDrag" for the InputEvent spec
2023         https://bugs.webkit.org/show_bug.cgi?id=163948
2024         <rdar://problem/28921433>
2025
2026         Reviewed by Darin Adler.
2027
2028         Add support for new drag and drop-related EditAction enum values.
2029
2030         * UIProcess/WebEditCommandProxy.cpp:
2031         (WebKit::WebEditCommandProxy::nameForEditAction):
2032
2033 2016-10-26  Chris Dumez  <cdumez@apple.com>
2034
2035         Replace IDBKeyPath with a WTF::Variant
2036         https://bugs.webkit.org/show_bug.cgi?id=163909
2037
2038         Reviewed by Darin Adler.
2039
2040         Add coders to encode / decode IDBKeyPath type for IPC.
2041
2042         * Shared/Databases/IndexedDB/WebIDBResult.cpp:
2043         * Shared/WebCoreArgumentCoders.cpp:
2044         (IPC::ArgumentCoder<IDBKeyPath>::encode):
2045         (IPC::ArgumentCoder<IDBKeyPath>::decode):
2046         * Shared/WebCoreArgumentCoders.h:
2047         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2048
2049 2016-10-26  Brian Burg  <bburg@apple.com>
2050
2051         Web Inspector: remove unused bool return value from FrontendChannel::sendMessageToFrontend
2052         https://bugs.webkit.org/show_bug.cgi?id=164046
2053
2054         Reviewed by Joseph Pecoraro.
2055
2056         * WebProcess/WebPage/WebInspector.cpp:
2057         (WebKit::WebInspector::sendMessageToFrontend):
2058         * WebProcess/WebPage/WebInspector.h:
2059
2060 2016-10-26  Eric Carlson  <eric.carlson@apple.com>
2061
2062         [MediaStream] Add "has capture device" bit to media state flags
2063         https://bugs.webkit.org/show_bug.cgi?id=163952
2064
2065         Unreviewed fix after r207839.
2066
2067         * WebProcess/WebPage/WebPage.cpp:
2068         (WebKit::WebPage::setMuted): Take an MutedStateFlags, not a bool.
2069         * WebProcess/WebPage/WebPage.h:
2070
2071 2016-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2072
2073         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.1 release.
2074
2075         * gtk/NEWS: Add release notes for 2.15.1.
2076
2077 2016-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2078
2079         REGRESSION(r206505) [GTK] Build broken with GTK+ 3.14
2080         https://bugs.webkit.org/show_bug.cgi?id=162776
2081
2082         Reviewed by Xabier Rodriguez-Calvar.
2083
2084         Do not use gtk_widget_get_action_group() when GTK+ < 3.16, use g_object_set instead to attach the action group
2085         to the menu widget.
2086
2087         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2088         (WebKit::WebContextMenuProxyGtk::append):
2089         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
2090         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
2091
2092 2016-10-25  Alex Christensen  <achristensen@webkit.org>
2093
2094         CMake build fix.
2095
2096         * PlatformMac.cmake:
2097         * Shared/WebHitTestResultData.cpp:
2098         (WebKit::WebHitTestResultData::WebHitTestResultData):
2099         Explicitly call AtomicString::string to make the String constructor no longer ambiguous.
2100         It couldn't decide whether to use operator const String& or operator NSString*.
2101
2102 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2103
2104         [SOUP] Network process assertion in NetworkDataTask::continueHTTPRedirection
2105         https://bugs.webkit.org/show_bug.cgi?id=163941
2106
2107         Reviewed by Michael Catanzaro.
2108
2109         equalLettersIgnoringASCIICase() expects the second argument to be the letters to compare in lowercase, so use
2110         "get" instead of "GET".
2111
2112         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2113         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
2114
2115 2016-10-25  Eric Carlson  <eric.carlson@apple.com>
2116
2117         [MediaStream] Add "has capture device" bit to media state flags
2118         https://bugs.webkit.org/show_bug.cgi?id=163952
2119
2120         Reviewed by Sam Weinig.
2121
2122         * UIProcess/API/C/WKPage.cpp:
2123         (WKPageGetMediaState): Support MediaProducer::HasMediaCaptureDevice.
2124         * UIProcess/API/C/WKPagePrivate.h: Define kWKMediaHasCaptureDevice.
2125
2126 2016-10-25  Commit Queue  <commit-queue@webkit.org>
2127
2128         Unreviewed, rolling out r207827 and r207828.
2129         https://bugs.webkit.org/show_bug.cgi?id=163965
2130
2131         Caused LayoutTest webaudio/web-audio-is-playing.html to time
2132         out on macOS. (Requested by ryanhaddad on #webkit).
2133
2134         Reverted changesets:
2135
2136         "[MediaStream] Add "has capture device" bit to media state
2137         flags"
2138         https://bugs.webkit.org/show_bug.cgi?id=163952
2139         http://trac.webkit.org/changeset/207827
2140
2141         "[MediaStream] Add "has capture device" bit to media state
2142         flags"
2143         https://bugs.webkit.org/show_bug.cgi?id=163952
2144         http://trac.webkit.org/changeset/207828
2145
2146 2016-10-25  Eric Carlson  <eric.carlson@apple.com>
2147
2148         [MediaStream] Add "has capture device" bit to media state flags
2149         https://bugs.webkit.org/show_bug.cgi?id=163952
2150
2151         Reviewed by Sam Weinig.
2152
2153         * UIProcess/API/C/WKPage.cpp:
2154         (WKPageGetMediaState): Support MediaProducer::HasMediaCaptureDevice.
2155         * UIProcess/API/C/WKPagePrivate.h: Define kWKMediaHasCaptureDevice.
2156
2157 2016-10-25  Chris Dumez  <cdumez@apple.com>
2158
2159         Unreviewed, rolling out r207494.
2160
2161         iOS SDK has been updated on the bots now so rollout the
2162         rollout
2163
2164         Reverted changeset:
2165
2166         "Unreviewed, rolling out r207413."
2167         https://bugs.webkit.org/show_bug.cgi?id=163547
2168         http://trac.webkit.org/changeset/207494
2169
2170 2016-10-25  Jonathan Bedard  <jbedard@apple.com>
2171
2172         Unreviewed build fix.
2173
2174         * UIProcess/API/Cocoa/WKWebView.mm:
2175         (-[WKWebView _fullscreenDelegate]): Removed unneeded parenthesis.
2176
2177 2016-10-19  Jer Noble  <jer.noble@apple.com>
2178
2179         Add WKWebView fullscreen delegate SPI
2180         https://bugs.webkit.org/show_bug.cgi?id=163674
2181
2182         Reviewed by Anders Carlsson.
2183
2184         Add a new SPI property to WKWebView allowing clients to be notified when fullscreen mode enters and exits.
2185
2186         * UIProcess/API/APIFullscreenClient.h: Added.
2187         (API::FullscreenClient::~FullscreenClient):
2188         (API::FullscreenClient::willEnterFullscreen):
2189         (API::FullscreenClient::didEnterFullscreen):
2190         (API::FullscreenClient::willExitFullscreen):
2191         (API::FullscreenClient::didExitFullscreen):
2192         * UIProcess/API/Cocoa/WKWebView.mm:
2193         (-[WKWebView _initializeWithConfiguration:]):
2194         (-[WKWebView _setFullscreenDelegate:]):
2195         (-[WKWebView _fullscreenDelegate]):
2196         (-[WKWebView _isInFullscreen]):
2197         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2198         * UIProcess/API/Cocoa/_WKFullscreenDelegate.h: Added.
2199         * UIProcess/Cocoa/FullscreenClient.h: Added.
2200         (WebKit::FullscreenClient::~FullscreenClient):
2201         * UIProcess/Cocoa/FullscreenClient.mm: Added.
2202         (WebKit::FullscreenClient::FullscreenClient):
2203         (WebKit::FullscreenClient::delegate):
2204         (WebKit::FullscreenClient::setDelegate):
2205         (WebKit::FullscreenClient::willEnterFullscreen):
2206         (WebKit::FullscreenClient::didEnterFullscreen):
2207         (WebKit::FullscreenClient::willExitFullscreen):
2208         (WebKit::FullscreenClient::didExitFullscreen):
2209         * UIProcess/WebFullScreenManagerProxy.cpp:
2210         (WebKit::WebFullScreenManagerProxy::willEnterFullScreen):
2211         (WebKit::WebFullScreenManagerProxy::didEnterFullScreen):
2212         (WebKit::WebFullScreenManagerProxy::willExitFullScreen):
2213         (WebKit::WebFullScreenManagerProxy::didExitFullScreen):
2214         * UIProcess/WebPageProxy.cpp:
2215         (WebKit::WebPageProxy::WebPageProxy):
2216         (WebKit::WebPageProxy::setFullscreenClient):
2217         (WebKit::WebPageProxy::fullScreenManager): Deleted.
2218         * UIProcess/WebPageProxy.h:
2219         (WebKit::WebPageProxy::fullscreenClient):
2220         * WebKit2.xcodeproj/project.pbxproj:
2221
2222 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2223
2224         Unreviewed. Fix timeouts in 12 GTK+ unit tests after r207812.
2225
2226         * NetworkProcess/NetworkProcessCreationParameters.h: Initialize loadThrottleLatency.
2227
2228 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2229
2230         Unreviewed. Fix Soup based ports debug build after r207813.
2231
2232         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2233         (WebKit::NetworkDataTaskSoup::authenticateCallback):
2234         (WebKit::NetworkDataTaskSoup::requestStartedCallback):
2235
2236 2016-10-25  Andreas Kling  <akling@apple.com>
2237
2238         More PassRefPtr purging in WebCore.
2239         <https://webkit.org/b/163895>
2240
2241         Reviewed by Antti Koivisto.
2242
2243         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
2244         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
2245         (WebKit::PDFPlugin::createScrollbar):
2246
2247 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2248
2249         NetworkSession: switch to use subclasses for NetworkSession and NetworkDataTask implementations
2250         https://bugs.webkit.org/show_bug.cgi?id=163777
2251
2252         Reviewed by Alex Christensen.
2253
2254         The subclass model allows us to choose the implementation at run time, so we could add other implementations
2255         like a mock network class to measure performance, and even one for blobs and finally get rid of ResourceHandle
2256         in WebKit2.
2257
2258         * CMakeLists.txt: Add new files to compilation.
2259         * NetworkProcess/NetworkDataTask.cpp: Added.
2260         (WebKit::NetworkDataTask::create): Create a NetworkDataTaskCocoa or NetworkDataTaskSoup.
2261         (WebKit::NetworkDataTask::NetworkDataTask): Move common code from NetworkDataTaskCocoa and NetworkDataTaskSoup
2262         here to handle the early failures.
2263         (WebKit::NetworkDataTask::~NetworkDataTask):
2264         (WebKit::NetworkDataTask::scheduleFailure):
2265         (WebKit::NetworkDataTask::failureTimerFired):
2266         * NetworkProcess/NetworkDataTask.h: Remove platform specific members.
2267         (WebKit::NetworkDataTask::setPendingDownloadLocation): Make it virtual and set the m_pendingDownloadLocation.
2268         (WebKit::NetworkDataTask::suggestedFilename): Make it virtual and const with a default implementation.
2269         (WebKit::NetworkDataTask::setSuggestedFilename): Ditto.
2270         (WebKit::NetworkDataTask::allowsSpecificHTTPSCertificateForHost): Ditto.
2271         * NetworkProcess/NetworkLoad.cpp: Include NetworkDataTaskCocoa.h.
2272         * NetworkProcess/NetworkLoad.h: Include NetworkDataTask.h instead of NetworkSession.h.
2273         * NetworkProcess/NetworkProcess.cpp:
2274         (WebKit::NetworkProcess::NetworkProcess): Use NetworkSessionCocoa.
2275         * NetworkProcess/NetworkSession.cpp:
2276         (WebKit::NetworkSession::create): Create a NetworkSessionCocoa or NetworkSessionSoup.
2277         (WebKit::NetworkSession::defaultSession): In case of cocoa use NetworkSessionCocoa::defaultSession() because of
2278         the custom protocol manager, otherwise simply create a default session.
2279         (WebKit::NetworkSession::networkStorageSession): Move common code from NetworkSessionCocoa and
2280         NetworkSessionSoup here.
2281         (WebKit::NetworkSession::NetworkSession):
2282         (WebKit::NetworkSession::~NetworkSession):
2283         * NetworkProcess/NetworkSession.h: Remove platform specific members.
2284         (WebKit::NetworkSession::invalidateAndCancel): Make it virtual.
2285         (WebKit::NetworkSession::clearCredentials): Ditto.
2286         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: Include NetworkSession.h.
2287         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Added.
2288         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2289         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
2290         (WebKit::NetworkDataTaskCocoa::~NetworkDataTaskCocoa):
2291         (WebKit::NetworkDataTaskCocoa::didSendData):
2292         (WebKit::NetworkDataTaskCocoa::didReceiveChallenge):
2293         (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
2294         (WebKit::NetworkDataTaskCocoa::didReceiveResponse):
2295         (WebKit::NetworkDataTaskCocoa::didReceiveData):
2296         (WebKit::NetworkDataTaskCocoa::didBecomeDownload):
2297         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
2298         (WebKit::NetworkDataTaskCocoa::setPendingDownloadLocation):
2299         (WebKit::NetworkDataTaskCocoa::tryPasswordBasedAuthentication):
2300         (WebKit::NetworkDataTaskCocoa::transferSandboxExtensionToDownload):
2301         (WebKit::NetworkDataTaskCocoa::allowsSpecificHTTPSCertificateForHost):
2302         (WebKit::NetworkDataTaskCocoa::suggestedFilename):
2303         (WebKit::NetworkDataTaskCocoa::cancel):
2304         (WebKit::NetworkDataTaskCocoa::resume):
2305         (WebKit::NetworkDataTaskCocoa::suspend):
2306         (WebKit::NetworkDataTaskCocoa::state):
2307         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2308         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2309         * NetworkProcess/cocoa/NetworkSessionCocoa.h: Added.
2310         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2311         (-[WKNetworkSessionDelegate initWithNetworkSession:withCredentials:]):
2312         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
2313         (WebKit::configurationForSessionID):
2314         (WebKit::NetworkSessionCocoa::setCustomProtocolManager):
2315         (WebKit::NetworkSessionCocoa::setSourceApplicationAuditTokenData):
2316         (WebKit::NetworkSessionCocoa::setSourceApplicationBundleIdentifier):
2317         (WebKit::NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier):
2318         (WebKit::NetworkSessionCocoa::setCTDataConnectionServiceType):
2319         (WebKit::NetworkSessionCocoa::create):
2320         (WebKit::NetworkSessionCocoa::defaultSession):
2321         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2322         (WebKit::NetworkSessionCocoa::~NetworkSessionCocoa):
2323         (WebKit::NetworkSessionCocoa::invalidateAndCancel):
2324         (WebKit::NetworkSessionCocoa::clearCredentials):
2325         (WebKit::NetworkSessionCocoa::dataTaskForIdentifier):
2326         (WebKit::NetworkSessionCocoa::addDownloadID):
2327         (WebKit::NetworkSessionCocoa::downloadID):
2328         (WebKit::NetworkSessionCocoa::takeDownloadID):
2329         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2330         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
2331         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2332         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
2333         (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
2334         (WebKit::NetworkDataTaskSoup::suggestedFilename):
2335         (WebKit::NetworkDataTaskSoup::setPendingDownloadLocation):
2336         (WebKit::NetworkDataTaskSoup::createRequest):
2337         (WebKit::NetworkDataTaskSoup::clearRequest):
2338         (WebKit::NetworkDataTaskSoup::resume):
2339         (WebKit::NetworkDataTaskSoup::suspend):
2340         (WebKit::NetworkDataTaskSoup::cancel):
2341         (WebKit::NetworkDataTaskSoup::invalidateAndCancel):
2342         (WebKit::NetworkDataTaskSoup::state):
2343         (WebKit::NetworkDataTaskSoup::timeoutFired):
2344         (WebKit::NetworkDataTaskSoup::startTimeout):
2345         (WebKit::NetworkDataTaskSoup::stopTimeout):
2346         (WebKit::NetworkDataTaskSoup::sendRequestCallback):
2347         (WebKit::NetworkDataTaskSoup::didSendRequest):
2348         (WebKit::NetworkDataTaskSoup::didReceiveResponse):
2349         (WebKit::NetworkDataTaskSoup::tlsErrorsChangedCallback):
2350         (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
2351         (WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):
2352         (WebKit::NetworkDataTaskSoup::authenticateCallback):
2353         (WebKit::NetworkDataTaskSoup::authenticate):
2354         (WebKit::NetworkDataTaskSoup::continueAuthenticate):
2355         (WebKit::NetworkDataTaskSoup::skipInputStreamForRedirectionCallback):
2356         (WebKit::NetworkDataTaskSoup::skipInputStreamForRedirection):
2357         (WebKit::NetworkDataTaskSoup::didFinishSkipInputStreamForRedirection):
2358         (WebKit::NetworkDataTaskSoup::shouldStartHTTPRedirection):
2359         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
2360         (WebKit::NetworkDataTaskSoup::readCallback):
2361         (WebKit::NetworkDataTaskSoup::read):
2362         (WebKit::NetworkDataTaskSoup::didRead):
2363         (WebKit::NetworkDataTaskSoup::didFinishRead):
2364         (WebKit::NetworkDataTaskSoup::requestNextPartCallback):
2365         (WebKit::NetworkDataTaskSoup::requestNextPart):
2366         (WebKit::NetworkDataTaskSoup::didRequestNextPart):
2367         (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
2368         (WebKit::NetworkDataTaskSoup::gotHeadersCallback):
2369         (WebKit::NetworkDataTaskSoup::didGetHeaders):
2370         (WebKit::NetworkDataTaskSoup::wroteBodyDataCallback):
2371         (WebKit::NetworkDataTaskSoup::didWriteBodyData):
2372         (WebKit::NetworkDataTaskSoup::download):
2373         (WebKit::NetworkDataTaskSoup::writeDownloadCallback):
2374         (WebKit::NetworkDataTaskSoup::writeDownload):
2375         (WebKit::NetworkDataTaskSoup::didWriteDownload):
2376         (WebKit::NetworkDataTaskSoup::didFinishDownload):
2377         (WebKit::NetworkDataTaskSoup::didFailDownload):
2378         (WebKit::NetworkDataTaskSoup::cleanDownloadFiles):
2379         (WebKit::NetworkDataTaskSoup::didFail):
2380         (WebKit::NetworkDataTaskSoup::networkEventCallback):
2381         (WebKit::NetworkDataTaskSoup::networkEvent):
2382         (WebKit::NetworkDataTaskSoup::startingCallback):
2383         (WebKit::NetworkDataTaskSoup::requestStartedCallback):
2384         (WebKit::NetworkDataTaskSoup::didStartRequest):
2385         (WebKit::NetworkDataTaskSoup::restartedCallback):
2386         (WebKit::NetworkDataTaskSoup::didRestart):
2387         * NetworkProcess/soup/NetworkDataTaskSoup.h: Added.
2388         * NetworkProcess/soup/NetworkSessionSoup.cpp:
2389         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
2390         (WebKit::NetworkSessionSoup::~NetworkSessionSoup):
2391         (WebKit::NetworkSessionSoup::soupSession):
2392         (WebKit::NetworkSessionSoup::invalidateAndCancel):
2393         * NetworkProcess/soup/NetworkSessionSoup.h: Added.
2394         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
2395         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Update to new NetworkSession::create() API.
2396         * PlatformEfl.cmake: Add new files to compilation.
2397         * PlatformGTK.cmake: Ditto.
2398         * WebKit2.xcodeproj/project.pbxproj: Ditto.
2399         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2400         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Update to new NetworkSession::create() API.
2401         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2402         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Ditto.
2403
2404 2016-10-25  Antti Koivisto  <antti@apple.com>
2405
2406         Add support for introducing simulated latency in network process
2407         https://bugs.webkit.org/show_bug.cgi?id=163902
2408
2409         Reviewed by Alex Christensen.
2410
2411         For testing purposes it is useful to have a mechanism for simulating high latency.
2412         This patch adds a basic mechanism that introduces a delay to each response in network
2413         process. In Safari it can be used with
2414
2415              defaults write com.apple.Safari WebKitNetworkLoadThrottleLatencyMilliseconds 200
2416
2417         Setting the delay to 0 disables the feature.
2418
2419         * NetworkProcess/NetworkLoad.cpp:
2420         (WebKit::NetworkLoad::Throttle::Throttle):
2421         (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
2422         (WebKit::NetworkLoad::notifyDidReceiveResponse):
2423         (WebKit::NetworkLoad::didReceiveData):
2424         (WebKit::NetworkLoad::didCompleteWithError):
2425         (WebKit::NetworkLoad::throttleDelayCompleted):
2426         * NetworkProcess/NetworkLoad.h:
2427         * NetworkProcess/NetworkProcess.cpp:
2428         (WebKit::NetworkProcess::initializeNetworkProcess):
2429         * NetworkProcess/NetworkProcess.h:
2430         (WebKit::NetworkProcess::loadThrottleLatency):
2431         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2432         (WebKit::NetworkProcessCreationParameters::encode):
2433         (WebKit::NetworkProcessCreationParameters::decode):
2434         * NetworkProcess/NetworkProcessCreationParameters.h:
2435         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2436         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2437
2438 2016-10-24  Dan Bernstein  <mitz@apple.com>
2439
2440         REGRESSION (r206410): Sandbox violations beneath WebProcessProxy::platformIsBeingDebugged
2441         https://bugs.webkit.org/show_bug.cgi?id=163879
2442         <rdar://problem/28728735>
2443
2444         Reviewed by Darin Adler.
2445
2446         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
2447         (WebKit::WebProcessProxy::platformIsBeingDebugged): Check if the current process, which is
2448           the UI process, is sandboxed before trying to find out if the Web process is being
2449           debugged.
2450
2451 2016-10-21  Alex Christensen  <achristensen@webkit.org>
2452
2453         URL::port should return Optional<uint16_t>
2454         https://bugs.webkit.org/show_bug.cgi?id=163806
2455
2456         Reviewed by Darin Adler.
2457
2458         * NetworkProcess/mac/NetworkProcessMac.mm:
2459         (WebKit::overrideSystemProxies):
2460         * Shared/API/APISecurityOrigin.h:
2461         (API::SecurityOrigin::create):
2462         * Shared/API/APIURL.h:
2463         (API::URL::protocol):
2464         * Shared/API/c/WKSecurityOriginRef.cpp:
2465         (WKSecurityOriginGetPort):
2466         * UIProcess/API/Cocoa/WKSecurityOrigin.mm:
2467         (-[WKSecurityOrigin port]):
2468         * WebProcess/WebPage/WebPage.cpp:
2469         (WebKit::WebPage::canHandleRequest):
2470         * WebProcess/cocoa/WebProcessCocoa.mm:
2471         (WebKit::origin):
2472
2473 2016-10-24  Eric Carlson  <eric.carlson@apple.com>
2474
2475         [MediaStream] Separate media capture and audio playback muting
2476         https://bugs.webkit.org/show_bug.cgi?id=163855
2477         <rdar://problem/28827186>
2478
2479         Reviewed by Darin Adler.
2480
2481         * Shared/WebPageCreationParameters.h: Change 'muted' from bool to MutedStateFlags.
2482
2483         * UIProcess/API/C/WKPage.cpp: Change parameter from bool to WKMediaMutedState.
2484         (WKPageSetMuted):
2485         * UIProcess/API/C/WKPagePrivate.h: Define WKMediaMutedState.
2486
2487         * UIProcess/WebPageProxy.cpp:
2488         (WebKit::WebPageProxy::WebPageProxy):
2489         (WebKit::WebPageProxy::setMuted): m_muted -> m_mutedState.
2490         (WebKit::WebPageProxy::creationParameters): Ditto.
2491         * UIProcess/WebPageProxy.h:
2492
2493         * WebProcess/Plugins/PluginView.cpp:
2494         (WebKit::PluginView::isMuted): page.isMuted -> page.mutedState.
2495
2496         * WebProcess/WebPage/WebPage.messages.in: Change SetMuted parameter.
2497
2498 2016-10-24  Youenn Fablet  <youenn@apple.com>
2499
2500         Activate WEB_RTC compilation flags for Mac bots
2501         https://bugs.webkit.org/show_bug.cgi?id=163886
2502
2503         Reviewed by Eric Carlson.
2504
2505         * Configurations/FeatureDefines.xcconfig:
2506
2507 2016-10-24  Brady Eidson  <beidson@apple.com>
2508
2509         IndexedDB 2.0: Support IDBIndex name assignment.
2510         <rdar://problem/28806932> and https://bugs.webkit.org/show_bug.cgi?id=163805
2511
2512         Reviewed by Alex Christensen.
2513
2514         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2515         (WebKit::WebIDBConnectionToClient::didRenameIndex):
2516         (WebKit::WebIDBConnectionToClient::renameIndex):
2517         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
2518         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
2519
2520         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2521         (WebKit::WebIDBConnectionToServer::renameIndex):
2522         (WebKit::WebIDBConnectionToServer::didRenameIndex):
2523         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
2524         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
2525
2526 2016-10-23  Michael Catanzaro  <mcatanzaro@igalia.com>
2527
2528         [GTK] Remove DO NOT MODIFY headers from files that are no longer autogenerated
2529         https://bugs.webkit.org/show_bug.cgi?id=163867
2530
2531         Reviewed by Darin Adler.
2532
2533         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
2534         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.h:
2535         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttrPrivate.h:
2536         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
2537         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h:
2538         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlobPrivate.h:
2539         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
2540         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h:
2541         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASectionPrivate.h:
2542         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h:
2543         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
2544         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h:
2545         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleListPrivate.h:
2546         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRulePrivate.h:
2547         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.h:
2548         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclarationPrivate.h:
2549         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.h:
2550         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheetPrivate.h:
2551         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.h:
2552         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValuePrivate.h:
2553         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
2554         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h:
2555         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterDataPrivate.h:
2556         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
2557         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h:
2558         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCommentPrivate.h:
2559         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.h:
2560         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementationPrivate.h:
2561         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
2562         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h:
2563         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelectionPrivate.h:
2564         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
2565         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h:
2566         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenListPrivate.h:
2567         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
2568         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h:
2569         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowPrivate.h:
2570         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowUnstable.h:
2571         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h:
2572         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
2573         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h:
2574         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragmentPrivate.h:
2575         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragmentUnstable.h:
2576         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentPrivate.h:
2577         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
2578         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.h:
2579         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentTypePrivate.h:
2580         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentUnstable.h:
2581         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
2582         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
2583         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementPrivate.h:
2584         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementUnstable.h:
2585         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
2586         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.h:
2587         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventPrivate.h:
2588         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
2589         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.h:
2590         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
2591         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.h:
2592         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileListPrivate.h:
2593         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFilePrivate.h:
2594         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
2595         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h:
2596         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElementPrivate.h:
2597         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
2598         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.h:
2599         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElementPrivate.h:
2600         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
2601         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h:
2602         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElementPrivate.h:
2603         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
2604         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.h:
2605         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElementPrivate.h:
2606         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
2607         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.h:
2608         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElementPrivate.h:
2609         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
2610         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.h:
2611         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElementPrivate.h:
2612         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
2613         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.h:
2614         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElementPrivate.h:
2615         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
2616         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.h:
2617         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElementPrivate.h:
2618         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
2619         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.h:
2620         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollectionPrivate.h:
2621         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
2622         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.h:
2623         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElementPrivate.h:
2624         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
2625         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.h:
2626         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElementPrivate.h:
2627         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
2628         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.h:
2629         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElementPrivate.h:
2630         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
2631         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.h:
2632         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocumentPrivate.h:
2633         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
2634         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h:
2635         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElementPrivate.h:
2636         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElementUnstable.h:
2637         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
2638         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.h:
2639         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElementPrivate.h:
2640         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
2641         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.h:
2642         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElementPrivate.h:
2643         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
2644         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.h:
2645         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElementPrivate.h:
2646         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
2647         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.h:
2648         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElementPrivate.h:
2649         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
2650         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.h:
2651         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElementPrivate.h:
2652         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
2653         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.h:
2654         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElementPrivate.h:
2655         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
2656         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.h:
2657         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElementPrivate.h:
2658         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
2659         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.h:
2660         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElementPrivate.h:
2661         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
2662         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.h:
2663         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElementPrivate.h:
2664         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
2665         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.h:
2666         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElementPrivate.h:
2667         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
2668         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.h:
2669         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElementPrivate.h:
2670         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
2671         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.h:
2672         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElementPrivate.h:
2673         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
2674         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
2675         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElementPrivate.h:
2676         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
2677         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.h:
2678         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElementPrivate.h:
2679         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
2680         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.h:
2681         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElementPrivate.h:
2682         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
2683         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.h:
2684         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElementPrivate.h:
2685         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
2686         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h:
2687         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElementPrivate.h:
2688         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
2689         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.h:
2690         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElementPrivate.h:
2691         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
2692         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.h:
2693         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElementPrivate.h:
2694         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
2695         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.h:
2696         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElementPrivate.h:
2697         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
2698         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.h:
2699         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElementPrivate.h:
2700         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
2701         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.h:
2702         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElementPrivate.h:
2703         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
2704         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.h:
2705         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElementPrivate.h:
2706         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
2707         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.h:
2708         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElementPrivate.h:
2709         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
2710         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.h:
2711         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElementPrivate.h:
2712         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
2713         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.h:
2714         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElementPrivate.h:
2715         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
2716         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.h:
2717         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollectionPrivate.h:
2718         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
2719         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.h:
2720         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElementPrivate.h:
2721         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
2722         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.h:
2723         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElementPrivate.h:
2724         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
2725         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.h:
2726         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElementPrivate.h:
2727         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp:
2728         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
2729         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.h:
2730         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElementPrivate.h:
2731         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
2732         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.h:
2733         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElementPrivate.h:
2734         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
2735         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.h:
2736         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElementPrivate.h:
2737         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
2738         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.h:
2739         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElementPrivate.h:
2740         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
2741         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.h:
2742         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElementPrivate.h:
2743         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
2744         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.h:
2745         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElementPrivate.h:
2746         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
2747         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.h:
2748         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElementPrivate.h:
2749         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
2750         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.h:
2751         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElementPrivate.h:
2752         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
2753         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.h:
2754         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElementPrivate.h:
2755         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
2756         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.h:
2757         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElementPrivate.h:
2758         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
2759         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.h:
2760         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElementPrivate.h:
2761         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
2762         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.h:
2763         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElementPrivate.h:
2764         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
2765         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.h:
2766         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElementPrivate.h:
2767         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
2768         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.h:
2769         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEventPrivate.h:
2770         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.h:
2771         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaListPrivate.h:
2772         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
2773         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.h:
2774         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEventPrivate.h:
2775         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
2776         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.h:
2777         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMapPrivate.h:
2778         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.h:
2779         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
2780         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.h:
2781         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIteratorPrivate.h:
2782         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
2783         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.h:
2784         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeListPrivate.h:
2785         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodePrivate.h:
2786         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
2787         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.h:
2788         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstructionPrivate.h:
2789         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
2790         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.h:
2791         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRangePrivate.h:
2792         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRangeUnstable.h:
2793         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
2794         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.h:
2795         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
2796         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.h:
2797         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetListPrivate.h:
2798         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetPrivate.h:
2799         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
2800         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.h:
2801         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextPrivate.h:
2802         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
2803         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.h:
2804         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalkerPrivate.h:
2805         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
2806         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.h:
2807         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEventPrivate.h:
2808         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
2809         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.h:
2810         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEventPrivate.h:
2811         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
2812         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.h:
2813         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpressionPrivate.h:
2814         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolverPrivate.h:
2815         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
2816         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.h:
2817         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResultPrivate.h:
2818         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h:
2819         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups.h:
2820         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h:
2821
2822 2016-10-23  Chris Dumez  <cdumez@apple.com>
2823
2824         Another unreviewed attempt to fix the WatchOS / TvOS build after r207585.
2825         <rdar://problem/28902292>
2826
2827         Disable USE_CFURLCONNECTION on newer WatchOS / TvOS.
2828
2829         * config.h:
2830
2831 2016-10-23  Chris Dumez  <cdumez@apple.com>
2832
2833         Unreviewed attempt to fix WatchOS / TvOS build after r207585.
2834         <rdar://problem/28902292>
2835
2836         Enable NETWORK_SESSION on those platforms.
2837
2838         * config.h:
2839
2840 2016-10-22  Dan Bernstein  <mitz@apple.com>
2841
2842         [iOS] _webViewWillEndNavigationGesture:withNavigationToBackForwardListItem: is never called
2843         https://bugs.webkit.org/show_bug.cgi?id=163758
2844
2845         Reviewed by Darin Adler.
2846
2847         * UIProcess/ios/ViewGestureControllerIOS.mm:
2848         (WebKit::ViewGestureController::beginSwipeGesture): Don’t reset the interactive update
2849           handler.
2850
2851 2016-10-21  David Kilzer  <ddkilzer@apple.com>
2852
2853         Bug 163762: IntSize::area() should used checked arithmetic
2854         <https://webkit.org/b/163762>
2855
2856         Reviewed by Darin Adler.
2857
2858         * Shared/ShareableBitmap.cpp:
2859         (WebKit::ShareableBitmap::create): Add overflow check and return
2860         nullptr on overflow.
2861         (WebKit::ShareableBitmap::createShareable): Ditto.
2862         (WebKit::ShareableBitmap::create): Change debug assert for
2863         adequate buffer size check into release check.
2864         * Shared/ShareableBitmap.h:
2865         (WebKit::ShareableBitmap::numBytesForSize): Change to return a
2866         Checked<unsigned, RecordOverflow> value.
2867         (WebKit::ShareableBitmap::sizeInBytes):
2868         * Shared/cairo/ShareableBitmapCairo.cpp:
2869         (WebKit::ShareableBitmap::numBytesForSize): Ditto.
2870         * UIProcess/API/Cocoa/WKWebView.mm:
2871         (-[WKWebView _takeViewSnapshot]): Call unsafeGet().
2872
2873 2016-10-21  Eric Carlson  <eric.carlson@apple.com>
2874
2875         [MediaStream] Dynamically generate media capture sandbox extensions
2876         https://bugs.webkit.org/show_bug.cgi?id=154861
2877         <rdar://problem/24909411>
2878
2879         Reviewed by Tim Horton.
2880
2881         * Shared/SandboxExtension.h:
2882         (WebKit::SandboxExtension::createHandleForGenericExtension):
2883         * Shared/mac/SandboxExtensionMac.mm:
2884         (WebKit::wkSandboxExtensionType): Add case for generic handle.
2885         (WebKit::SandboxExtension::createHandleForGenericExtension): New.
2886
2887         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2888         (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Clear the list of extensions granted.
2889         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Extend the web 
2890           process sandbox as necessary.
2891         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2892
2893         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2894         (WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Revoke all
2895           sandbox extensions.
2896         (WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Consume
2897           sandbox extensions.
2898         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
2899
2900         * WebProcess/WebPage/WebPage.cpp:
2901         (WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Pass-through to user media manager.
2902         * WebProcess/WebPage/WebPage.h:
2903
2904         * WebProcess/WebPage/WebPage.messages.in: Add GrantUserMediaDevicesSandboxExtension.
2905
2906         * WebProcess/com.apple.WebProcess.sb.in: Add rules, defines, and a macro to allow dynamic extensions
2907           for media capture devices.
2908
2909 2016-10-21  Gavin Barraclough  <barraclough@apple.com>
2910
2911         WebPageProxy should not need PageActivityState
2912         https://bugs.webkit.org/show_bug.cgi?id=163821
2913
2914         Reviewed by Geoff Garen.
2915
2916         The PageActivityState is currently plumbed back from WebCore up to the UI process, to
2917         determine whether to enabled process suppression. However the information it contains
2918         (whether a page load is ongoing, whether audio is playing) is already available via
2919         other means. Remove this use of PageActivityState.
2920
2921         * UIProcess/PageLoadState.cpp:
2922         (WebKit::PageLoadState::commitChanges):
2923             - PageLoadState notifies WebPageProxy when loading state changes.
2924         * UIProcess/WebPageProxy.cpp:
2925         (WebKit::WebPageProxy::updateThrottleState):
2926             - Now relies on info from PageLoadState, setMuted, isPlayingMediaDidChange.
2927         (WebKit::WebPageProxy::setMuted):
2928         (WebKit::WebPageProxy::isPlayingMediaDidChange):
2929             - If audio playback state changes we may need to update the throttle state.
2930         (WebKit::WebPageProxy::setPageActivityState): Deleted.
2931             - removed PageActivityState from WK2.
2932         * UIProcess/WebPageProxy.h:
2933         (WebKit::WebPageProxy::isLoadingChanged):
2934             - PageLoadState notifies WebPageProxy when loading state changes.
2935         * UIProcess/WebPageProxy.messages.in:
2936             - removed PageActivityState from WK2.
2937         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2938         (WebKit::WebChromeClient::setPageActivityState): Deleted.
2939             - removed PageActivityState from WK2.
2940         * WebProcess/WebCoreSupport/WebChromeClient.h:
2941             - removed PageActivityState from WK2.
2942         * WebProcess/WebPage/WebPage.cpp:
2943         (WebKit::WebPage::setPageActivityState): Deleted.
2944             - removed PageActivityState from WK2.
2945         * WebProcess/WebPage/WebPage.h:
2946             - removed PageActivityState from WK2.
2947
2948 2016-10-21  Gavin Barraclough  <barraclough@apple.com>
2949
2950         WebPage should take UserActivity directly for user input
2951         https://bugs.webkit.org/show_bug.cgi?id=163813
2952
2953         Reviewed by Anders Carlsson.
2954
2955         When we receive mouse/keyboard events in a page, we want to prevent AppNap. We currently do so
2956         via the PageThrottler. This patch is to just make the WebPage drive the UserActivity directly.
2957
2958         Two reasons to do so: (1) to cleanup & simplify for further refactoring. (2) The current code
2959         isn't really achieving the desired effect. The page setting the flag in the throttler to get
2960         the activity to be set is now a less effective way of achieving this goal, since the
2961         PageActivityState bounces back across to the UI process & then messages back to the WebContent
2962         process to take the UserActivity. These extra hops defeat the purpose of making sure the boost
2963         from the initial message isn't lost.
2964
2965         * WebProcess/WebPage/WebPage.cpp:
2966         (WebKit::m_userActivityHysteresis):
2967             - m_userActivityHysteresis triggers updateUserActivity.
2968         (WebKit::WebPage::setPageSuppressed):
2969             - setPageSuppressed starts/stops m_userActivityHysteresis.
2970         (WebKit::WebPage::updateUserActivity):
2971             - update UserActivity based on state of m_userActivityHysteresis.
2972         (WebKit::WebPage::mouseEvent):
2973         (WebKit::WebPage::wheelEvent):
2974         (WebKit::WebPage::keyEvent):
2975             - input events impulse m_userActivityHysteresis.
2976         * WebProcess/WebPage/WebPage.h:
2977
2978 2016-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2979
2980         Support (insertFrom|deleteBy)Composition and (insert|delete)CompositionText inputTypes for InputEvents
2981         https://bugs.webkit.org/show_bug.cgi?id=163460
2982         <rdar://problem/28784142>
2983
2984         Reviewed by Darin Adler.
2985
2986         Handle new EditAction types for inserting/deleting pending/final compositions.
2987
2988         * UIProcess/WebEditCommandProxy.cpp:
2989         (WebKit::WebEditCommandProxy::nameForEditAction):
2990
2991 2016-10-21  Jeremy Jones  <jeremyj@apple.com>
2992
2993         Implement basic pointer lock behavior for WebKit and WebKit2.
2994         https://bugs.webkit.org/show_bug.cgi?id=162745
2995
2996         Reviewed by Simon Fraser.
2997
2998         Enable basic pointer lock functionality by plumbing requests through WebPage IPC.
2999         Pass through mouse movement deltas.
3000         Unlock pointer when view is no longer visible.
3001
3002         * Shared/WebEventConversion.cpp:
3003         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): Pass along mouse movement.
3004         * UIProcess/WebPageProxy.cpp:
3005         (WebKit::WebPageProxy::dispatchViewStateChange): Unlock pointer when page is not visible.
3006         (WebKit::WebPageProxy::requestPointerLock): Hide and disassociate pointer.
3007         (WebKit::WebPageProxy::requestPointerUnlock): Show and associate pointer.
3008         * UIProcess/WebPageProxy.h:
3009         * UIProcess/WebPageProxy.messages.in: Add methods.
3010         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3011         (WebKit::WebChromeClient::requestPointerLock): Pass along to web page.
3012         (WebKit::WebChromeClient::requestPointerUnlock): Ditto.
3013         * WebProcess/WebCoreSupport/WebChromeClient.h:
3014         * WebProcess/WebPage/WebPage.cpp:
3015         (WebKit::WebPage::didAcquirePointerLock): Forward to PointerLockController.
3016         (WebKit::WebPage::didNotAcquirePointerLock): Ditto.
3017         (WebKit::WebPage::didLosePointerLock): Ditto.
3018         * WebProcess/WebPage/WebPage.h:
3019         * WebProcess/WebPage/WebPage.messages.in: Add methods.
3020
3021 2016-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
3022
3023         Implement InputEvent.getTargetRanges() for the input events spec
3024         https://bugs.webkit.org/show_bug.cgi?id=162947
3025         <rdar://problem/28853079>
3026
3027         Reviewed by Darin Adler.
3028
3029         Boilerplate change to add a runtime guard for InputEvents-related IDL interfaces. See WebCore ChangeLog entry
3030         for more details.
3031
3032         * WebProcess/WebPage/WebPage.cpp:
3033         (WebKit::WebPage::updatePreferences):
3034
3035 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3036
3037         [GTK] Configures but fails to link with ENABLE_OPENGL=OFF
3038         https://bugs.webkit.org/show_bug.cgi?id=163449
3039
3040         Reviewed by Michael Catanzaro.
3041
3042         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3043         (webkitWebViewBaseRealize): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER and also ensure the current
3044         display is X11.
3045         (webkitWebViewBaseUnrealize): Ditto.
3046         (webkitWebViewBaseDidRelaunchWebProcess): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.
3047         (webkitWebViewBasePageClosed): Ditto.
3048         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
3049         (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState): Ditto.
3050         (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): Check EGL is enabled before
3051         trying to use the WaylandCompositor.
3052         * UIProcess/AcceleratedDrawingAreaProxy.h:
3053         * UIProcess/WebProcessPool.cpp:
3054         (WebKit::WebProcessPool::createNewWebProcess): Ditto.
3055         * UIProcess/gtk/AcceleratedBackingStore.cpp:
3056         (WebKit::AcceleratedBackingStore::create): Ditto.
3057         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
3058         * UIProcess/gtk/WaylandCompositor.cpp:
3059         * UIProcess/gtk/WaylandCompositor.h:
3060         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
3061         (WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.
3062         * WebProcess/WebPage/AcceleratedDrawingArea.h:
3063         * WebProcess/WebPage/DrawingArea.h:
3064         * WebProcess/WebPage/DrawingArea.messages.in:
3065         * WebProcess/WebPage/LayerTreeHost.h:
3066
3067 2016-10-20  Chris Dumez  <cdumez@apple.com>
3068
3069         "Download Linked File" context menu action should use 'download' attribute as suggested filename
3070         https://bugs.webkit.org/show_bug.cgi?id=163742
3071         <rdar://problem/28840734>
3072
3073         Reviewed by Darin Adler.
3074
3075         Update "Download Linked File" context menu action to use the anchor
3076         element's 'download' attribute as suggested filename for the download.
3077
3078         * NetworkProcess/NetworkProcess.cpp:
3079         (WebKit::NetworkProcess::downloadRequest):
3080         * NetworkProcess/NetworkProcess.h:
3081         * NetworkProcess/NetworkProcess.messages.in:
3082         * Shared/WebHitTestResultData.cpp:
3083         (WebKit::WebHitTestResultData::WebHitTestResultData):
3084         (WebKit::WebHitTestResultData::encode):
3085         (WebKit::WebHitTestResultData::decode):
3086         * Shared/WebHitTestResultData.h:
3087         * UIProcess/WebPageProxy.cpp:
3088         (WebKit::WebPageProxy::contextMenuItemSelected):
3089         * UIProcess/WebProcessPool.cpp:
3090         (WebKit::WebProcessPool::download):
3091         * UIProcess/WebProcessPool.h:
3092         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
3093         (WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):
3094
3095 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3096
3097         [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
3098         https://bugs.webkit.org/show_bug.cgi?id=163374
3099
3100         Reviewed by Darin Adler.
3101
3102         * Configurations/FeatureDefines.xcconfig:
3103
3104 2016-10-20  Brady Eidson  <beidson@apple.com>
3105
3106         IndexedDB 2.0: Support IDBObjectStore name assignment.
3107         <rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749
3108
3109         Reviewed by Alex Christensen.
3110
3111         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
3112         (WebKit::WebIDBConnectionToClient::didRenameObjectStore):
3113         (WebKit::WebIDBConnectionToClient::renameObjectStore):
3114         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
3115         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
3116
3117         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3118         (WebKit::WebIDBConnectionToServer::renameObjectStore):
3119         (WebKit::WebIDBConnectionToServer::didRenameObjectStore):
3120         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
3121         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
3122
3123 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3124
3125         [GTK] Avoid strstr() when checking (E)GL extensions
3126         https://bugs.webkit.org/show_bug.cgi?id=161958
3127
3128         Reviewed by Žan Doberšek.
3129
3130         Use GLContext::isExtensionSupported() instead of strstr().
3131
3132         * UIProcess/gtk/WaylandCompositor.cpp:
3133         (WebKit::WaylandCompositor::initializeEGL):
3134
3135 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3136
3137         Wrong use of EGL_DEPTH_SIZE
3138         https://bugs.webkit.org/show_bug.cgi?id=155536
3139
3140         Reviewed by Michael Catanzaro.
3141
3142         Use XErrorTrapper class instead of the custom XErrorHandler.
3143
3144         * PluginProcess/unix/PluginProcessMainUnix.cpp:
3145         (WebKit::PluginProcessMainUnix):
3146
3147 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3148
3149         [SOUP] Add NetworkSession implementation and switch to use it
3150         https://bugs.webkit.org/show_bug.cgi?id=163597
3151
3152         Reviewed by Alex Christensen.
3153
3154         Basically move the ResourceHandle implementation to the network process, but modernized, cleaned up, and adapted
3155         to the NetworkSession model.
3156
3157         * CMakeLists.txt: Add new files to compilation.
3158         * NetworkProcess/Downloads/Download.cpp:
3159         (WebKit::Download::Download): Use the same code for all ports using NetworkSession and add missing
3160         initialization of m_sessionID.
3161         * NetworkProcess/Downloads/Download.h:
3162         (WebKit::Download::Download): Define PlatformDownloadTaskRef on every platform to make the constructor common to
3163         all ports using NetworkSession.
3164         * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
3165         (WebKit::Download::cancelNetworkLoad):
3166         (WebKit::Download::platformDidFinish):
3167         * NetworkProcess/NetworkDataTask.h:
3168         (WebKit::NetworkDataTask::pendingDownloadID): Make const.
3169         (WebKit::NetworkDataTask::pendingDownload): Ditto.
3170         (WebKit::NetworkDataTask::pendingDownloadLocation): Ditto.
3171         (WebKit::NetworkDataTask::isDownload): Helper to check if the task is a download.
3172         * NetworkProcess/NetworkLoad.cpp:
3173         (WebKit::NetworkLoad::didReceiveResponseNetworkSession): Use NetworkDataTask::isDownload().
3174         * NetworkProcess/NetworkProcess.cpp:
3175         (WebKit::NetworkProcess::NetworkProcess): NetworkSession::setCustomProtocolManager() is Cocoa only.
3176         * NetworkProcess/NetworkSession.h:
3177         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3178         (WebKit::NetworkSession::networkStorageSession): Make const.
3179         * NetworkProcess/soup/NetworkDataTaskSoup.cpp: Added.
3180         (WebKit::NetworkDataTask::NetworkDataTask):
3181         (WebKit::NetworkDataTask::~NetworkDataTask):
3182         (WebKit::NetworkDataTask::scheduleFailure):
3183         (WebKit::NetworkDataTask::failureTimerFired):
3184         (WebKit::NetworkDataTask::suggestedFilename):
3185         (WebKit::NetworkDataTask::setSuggestedFilename):
3186         (WebKit::NetworkDataTask::setPendingDownloadLocation):
3187         (WebKit::NetworkDataTask::allowsSpecificHTTPSCertificateForHost):
3188         (WebKit::NetworkDataTask::createRequest):
3189         (WebKit::NetworkDataTask::clearRequest):
3190         (WebKit::NetworkDataTask::resume):
3191         (WebKit::NetworkDataTask::suspend):
3192         (WebKit::NetworkDataTask::cancel):
3193         (WebKit::NetworkDataTask::invalidateAndCancel):
3194         (WebKit::NetworkDataTask::state):
3195         (WebKit::NetworkDataTask::timeoutFired):
3196         (WebKit::NetworkDataTask::startTimeout):
3197         (WebKit::NetworkDataTask::stopTimeout):
3198         (WebKit::NetworkDataTask::sendRequestCallback):
3199         (WebKit::NetworkDataTask::didSendRequest):
3200         (WebKit::NetworkDataTask::didReceiveResponse):
3201         (WebKit::NetworkDataTask::tlsErrorsChangedCallback):
3202         (WebKit::NetworkDataTask::tlsErrorsChanged):
3203         (WebKit::NetworkDataTask::applyAuthenticationToRequest):
3204         (WebKit::NetworkDataTask::authenticateCallback):
3205         (WebKit::isAuthenticationFailureStatusCode):
3206         (WebKit::NetworkDataTask::authenticate):
3207         (WebKit::NetworkDataTask::continueAuthenticate):
3208         (WebKit::NetworkDataTask::skipInputStreamForRedirectionCallback):
3209         (WebKit::NetworkDataTask::skipInputStreamForRedirection):
3210         (WebKit::NetworkDataTask::didFinishSkipInputStreamForRedirection):
3211         (WebKit::shouldRedirectAsGET):
3212         (WebKit::NetworkDataTask::shouldStartHTTPRedirection):
3213         (WebKit::NetworkDataTask::continueHTTPRedirection):
3214         (WebKit::NetworkDataTask::readCallback):
3215         (WebKit::NetworkDataTask::read):
3216         (WebKit::NetworkDataTask::didRead):
3217         (WebKit::NetworkDataTask::didFinishRead):
3218         (WebKit::NetworkDataTask::requestNextPartCallback):
3219         (WebKit::NetworkDataTask::requestNextPart):
3220         (WebKit::NetworkDataTask::didRequestNextPart):
3221         (WebKit::NetworkDataTask::didFinishRequestNextPart):
3222         (WebKit::NetworkDataTask::gotHeadersCallback):
3223         (WebKit::NetworkDataTask::didGetHeaders):
3224         (WebKit::NetworkDataTask::wroteBodyDataCallback):
3225         (WebKit::NetworkDataTask::didWriteBodyData):
3226         (WebKit::NetworkDataTask::download):
3227         (WebKit::NetworkDataTask::writeDownloadCallback):
3228         (WebKit::NetworkDataTask::writeDownload):
3229         (WebKit::NetworkDataTask::didWriteDownload):
3230         (WebKit::NetworkDataTask::didFinishDownload):
3231         (WebKit::NetworkDataTask::didFailDownload):
3232         (WebKit::NetworkDataTask::cleanDownloadFiles):
3233         (WebKit::NetworkDataTask::didFail):
3234         (WebKit::NetworkDataTask::networkEventCallback):
3235         (WebKit::NetworkDataTask::networkEvent):
3236         (WebKit::NetworkDataTask::startingCallback):
3237         (WebKit::NetworkDataTask::requestStartedCallback):
3238         (WebKit::NetworkDataTask::didStartRequest):
3239         (WebKit::NetworkDataTask::restartedCallback):
3240         (WebKit::NetworkDataTask::didRestart):
3241         * NetworkProcess/soup/NetworkSessionSoup.cpp:
3242         (WebKit::NetworkSession::create):
3243         (WebKit::NetworkSession::defaultSession):
3244         (WebKit::NetworkSession::networkStorageSession):
3245         (WebKit::NetworkSession::NetworkSession):
3246         (WebKit::NetworkSession::~NetworkSession):
3247         (WebKit::NetworkSession::soupSession):
3248         (WebKit::NetworkSession::invalidateAndCancel):
3249         (WebKit::NetworkSession::clearCredentials):
3250         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
3251         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Add implementation matching
3252         WebFrameNetworkingContext::ensurePrivateBrowsingSession().
3253         (WebKit::RemoteNetworkingContext::storageSession): Do not always return the default session if the given one is
3254         in the global map.
3255         * PlatformEfl.cmake: Ad new files to compilation.
3256         * PlatformGTK.cmake: Ditto.
3257         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3258         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Also create a NetworkSession.
3259         * config.h: Enable NetworkSession unconditionally for Soup based ports.
3260
3261 2016-10-19  Alex Christensen  <achristensen@webkit.org>
3262
3263         Revert r207151
3264         https://bugs.webkit.org/show_bug.cgi?id=163675
3265
3266         Reviewed by Brent Fulgham.
3267
3268         * NetworkProcess/Downloads/Download.h:
3269         * NetworkProcess/Downloads/mac/DownloadMac.mm:
3270         * NetworkProcess/NetworkLoad.h:
3271         * NetworkProcess/mac/NetworkLoadMac.mm:
3272         (WebKit::NetworkLoad::willCacheResponseAsync):
3273         * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
3274         (WebKit::AuthenticationManager::receivedCredential):
3275         (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
3276         (WebKit::AuthenticationManager::receivedCancellation):
3277         (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
3278         (WebKit::AuthenticationManager::receivedChallengeRejection):
3279         * Shared/WebProcessCreationParameters.cpp:
3280         (WebKit::WebProcessCreationParameters::encode):
3281         (WebKit::WebProcessCreationParameters::decode):
3282         * Shared/WebProcessCreationParameters.h:
3283         * Shared/mac/WebCoreArgumentCodersMac.mm:
3284         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
3285         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
3286         * WebKit2.xcodeproj/project.pbxproj:
3287
3288 2016-10-19  Chris Dumez  <cdumez@apple.com>
3289
3290         [WK2] Expose suggested filename via WKBundleHitTestResult API
3291         https://bugs.webkit.org/show_bug.cgi?id=163693
3292         <rdar://problem/28840734>
3293
3294         Reviewed by Anders Carlsson.
3295
3296         Expose suggested filename via WKBundleHitTestResult API. The implementation
3297         currently relies on the 'download' attribute on anchor / area elements
3298         that we recently started supporting.
3299
3300         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
3301         (WKBundleHitTestResultCopyLinkSuggestedFilename):
3302         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
3303         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
3304         (WebKit::InjectedBundleHitTestResult::create):
3305         (WebKit::InjectedBundleHitTestResult::mediaType):
3306         (WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):
3307         (WebKit::InjectedBundleHitTestResult::imageRect):
3308         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
3309
3310 2016-10-19  Ryan Haddad  <ryanhaddad@apple.com>
3311
3312         Unreviewed, rolling out r207557.
3313
3314         This change caused animations/font-variations tests to time
3315         out on pre-Sierra Macs.
3316
3317         Reverted changeset:
3318
3319         "[macOS] [iOS] Disable variation fonts on macOS El Capitan and
3320         iOS 9"
3321         https://bugs.webkit.org/show_bug.cgi?id=163374
3322         http://trac.webkit.org/changeset/207557
3323
3324 2016-10-19  Andy Estes  <aestes@apple.com>
3325
3326         Crash in ASCIICaseInsensitiveHash::hash() when a response has a null MIME type
3327         https://bugs.webkit.org/show_bug.cgi?id=163476
3328         <rdar://problem/26941395>
3329
3330         Reviewed by Andreas Kling.
3331
3332         When custom content providers are registered and a response has a null MIME type, WebPage
3333         will pass a null String to HashSet::contains(). This results in a null pointer dereference,
3334         since the String hash functions do not support null Strings and unconditionally dereference
3335         their StringImpls. Fixed by checking that Strings are non-null before calling
3336         HashSet::contains() on m_mimeTypesWithCustomContentProviders.
3337
3338         New API test: WebKit2.LoadDataWithNilMIMEType.
3339
3340         * WebProcess/WebPage/WebPage.cpp:
3341         (WebKit::WebPage::shouldUseCustomContentProviderForResponse): Checked if mimeType is null
3342         before calling m_mimeTypesWithCustomContentProviders.contains().
3343         (WebKit::WebPage::canShowMIMEType): Ditto.
3344         * WebProcess/WebPage/WebPage.h: Made private the declaration of canPluginHandleResponse().
3345
3346 2016-10-19  Chris Dumez  <cdumez@apple.com>
3347
3348         Move HTML Interactive Form Validation behind an experimental flag
3349         https://bugs.webkit.org/show_bug.cgi?id=163673
3350
3351         Reviewed by Daniel Bates.
3352
3353         Move HTML Interactive Form Validation behind an experimental feature flag
3354         and disable by default until by have a better UI.
3355
3356         * Shared/WebPreferencesDefinitions.h:
3357         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3358         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3359
3360 2016-10-19  Damian Kaleta  <dkaleta@apple.com>
3361
3362         https://bugs.webkit.org/show_bug.cgi?id=163292
3363
3364         Reviewed by Brady Eidson.
3365         
3366         Added ability to display context menu asynchronously.
3367
3368         * Shared/API/APIObject.h: Added ContextMenuListener.
3369         * Shared/API/c/WKBase.h: Added WKContextMenuListenerRef struct.
3370         * UIProcess/API/APIContextMenuClient.h:
3371         (API::ContextMenuClient::getContextMenuFromProposedMenuAsync): New method that allows showing context menu asynchronously.
3372         * UIProcess/API/C/WKAPICast.h: Added a new mapping for WebContextMenuListenerProxy.
3373         * UIProcess/API/C/WKContextMenuListener.cpp: Added. New class that allow a client to return results asynchronously.
3374         (WKContextMenuListenerGetTypeID):
3375         (WKContextMenuListenerUseContextMenuItems):
3376         * UIProcess/API/C/WKContextMenuListener.h: Added.
3377         * UIProcess/API/C/WKPage.cpp: Added WKPageContextMenuClientV4.
3378         (WKPageSetPageContextMenuClient):
3379         * UIProcess/API/C/WKPageContextMenuClient.h:
3380         * UIProcess/WebContextMenuListenerProxy.cpp: Copied from Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h.
3381         (WebKit::WebContextMenuListenerProxy::WebContextMenuListenerProxy):
3382         (WebKit::WebContextMenuListenerProxy::~WebContextMenuListenerProxy):
3383         (WebKit::WebContextMenuListenerProxy::useContextMenuItems): Passes items to m_contextMenuMac.
3384         (WebKit::WebContextMenuListenerProxy::invalidate):
3385         * UIProcess/WebContextMenuListenerProxy.h: Copied from Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h.
3386         (WebKit::WebContextMenuListenerProxy::create):
3387         * UIProcess/mac/WebContextMenuProxyMac.h:
3388         * UIProcess/mac/WebContextMenuProxyMac.mm:
3389         (WebKit::WebContextMenuProxyMac::showContextMenuWithItems): Shows context menu.
3390         (WebKit::WebContextMenuProxyMac::showContextMenu): Extracted some logic to showContextMenuWithItems().
3391         * WebKit2.xcodeproj/project.pbxproj:
3392
3393 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3394
3395         [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
3396         https://bugs.webkit.org/show_bug.cgi?id=163374
3397
3398         Reviewed by Darin Adler.
3399
3400         * Configurations/FeatureDefines.xcconfig:
3401
3402 2016-10-19  Darin Adler  <darin@apple.com>
3403
3404         Move XPath from ExceptionCode to Exception
3405         https://bugs.webkit.org/show_bug.cgi?id=163656
3406
3407         Reviewed by Chris Dumez.
3408
3409         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
3410         (webkit_dom_document_create_expression): Use ExceptionOr.
3411         (webkit_dom_document_evaluate): Ditto.
3412         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
3413         (webkit_dom_xpath_expression_evaluate): Ditto.
3414         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
3415         (webkit_dom_xpath_result_iterate_next): Ditto.
3416         (webkit_dom_xpath_result_snapshot_item): Ditto.
3417         (webkit_dom_xpath_result_get_number_value): Ditto.
3418         (webkit_dom_xpath_result_get_string_value): Ditto.
3419         (webkit_dom_xpath_result_get_boolean_value): Ditto.
3420         (webkit_dom_xpath_result_get_single_node_value): Ditto.
3421         (webkit_dom_xpath_result_get_snapshot_length): Ditto.
3422
3423 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3424
3425         NetworkSession: updatedRequest parameter of NetworkProcess::findPendingDownloadLocation is unused since r206988
3426         https://bugs.webkit.org/show_bug.cgi?id=163588
3427
3428         Reviewed by Alex Christensen.
3429
3430         The parameter was used only for the DownloadProxy::DidStart message that is no longer sent from
3431         findPendingDownloadLocation since r206988.
3432
3433         * NetworkProcess/NetworkDataTask.h:
3434         (WebKit::NetworkDataTask::currentRequest): Removed since it's unused now.
3435         * NetworkProcess/NetworkLoad.cpp:
3436         (WebKit::NetworkLoad::convertTaskToDownload): Update the m_currentRequest and pass it to DidStart message.
3437         (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
3438         * NetworkProcess/NetworkProcess.cpp:
3439         (WebKit::NetworkProcess::findPendingDownloadLocation):
3440         * NetworkProcess/NetworkProcess.h:
3441         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: Remove currentRequest() implementation.
3442
3443 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3444
3445         Unreviewed. Fix GTK+ build after r207522.
3446
3447         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
3448         (webkit_dom_dom_window_webkit_message_handlers_post_message): Use new exceptions.
3449
3450 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3451
3452         Unreviewed. Fix GTK+ build after r207497.
3453
3454         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
3455         (webkit_dom_html_select_element_add): Update implementation since add() now takes a Variant.
3456
3457 2016-10-18  Simon Fraser  <simon.fraser@apple.com>
3458
3459         Add a MiniBrowser menu item to apply page scale in WK1 and WK2
3460         https://bugs.webkit.org/show_bug.cgi?id=163627
3461
3462         Reviewed by Dean Jackson.
3463
3464         New SPI to set and retrieve page scale.
3465
3466         * UIProcess/API/Cocoa/WKWebView.mm:
3467         (-[WKWebView _setPageScale:withOrigin:]):
3468         (-[WKWebView _pageScale]):
3469         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3470
3471 2016-10-18  Dean Jackson  <dino@apple.com>
3472
3473         Remove CSS_SHAPES feature definition. This should always be on.
3474         https://bugs.webkit.org/show_bug.cgi?id=163628
3475         <rdar://problem/28834613>
3476
3477         Reviewed by Tim Horton.
3478
3479         * Configurations/FeatureDefines.xcconfig:
3480
3481 2016-10-18  Ryan Haddad  <ryanhaddad@apple.com>
3482
3483         Unreviewed, rolling out r207413.
3484
3485         This change broke iOS builds.
3486
3487         Reverted changeset:
3488
3489         "[iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to
3490         _UIWebTouchPoint.majorRadiusInScreenCoordinates"
3491         https://bugs.webkit.org/show_bug.cgi?id=163547
3492         http://trac.webkit.org/changeset/207413
3493
3494 2016-10-18  Commit Queue  <commit-queue@webkit.org>
3495
3496         Unreviewed, rolling out r207443.
3497         https://bugs.webkit.org/show_bug.cgi?id=163616
3498
3499         "Caused 5% PLT regression" (Requested by krollin on #webkit).
3500
3501         Reverted changeset:
3502
3503         "Crash in ASCIICaseInsensitiveHash::hash() when a response has
3504         a null MIME type"
3505         https://bugs.webkit.org/show_bug.cgi?id=163476
3506         http://trac.webkit.org/changeset/207443
3507
3508 2016-10-18  Megan Gardner  <megan_gardner@apple.com>
3509
3510         Fix build for platforms where HAVE(LINK_PREVIEW) is false
3511         https://bugs.webkit.org/show_bug.cgi?id=163607
3512
3513         Reviewed by Tim Horton.
3514
3515         Added needed # for link preview
3516
3517         * UIProcess/ios/WKContentViewInteraction.mm:
3518         (-[WKContentView _contentsOfUserInterfaceItem:]):
3519
3520 2016-10-18  Joseph Pecoraro  <pecoraro@apple.com>
3521
3522         Remote Web Inspector: Timeline UI not updating while recording
3523         https://bugs.webkit.org/show_bug.cgi?id=163582
3524         <rdar://problem/28766837>
3525
3526         Reviewed by Timothy Hatcher.
3527
3528         * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
3529         (WebKit::RemoteWebInspectorUI::frontendLoaded):
3530         Local inspector windows keep the web view alive and toggle the
3531         WebInspector.visible state depending on whether or not an inspector is
3532         open. Remote Inspector windows go away when closed, so they can always
3533         be marked as open. This matches earlier remote inspector behavior.
3534
3535 2016-10-18  Eric Carlson  <eric.carlson@apple.com>
3536
3537         [MediaStream] Resolve constraints and enumerate devices in the UI process
3538         https://bugs.webkit.org/show_bug.cgi?id=162147
3539         <rdar://problem/28803569>
3540
3541         Reviewed by Darin Adler.
3542         
3543         Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device
3544         access happens in the UI process.
3545
3546         * Scripts/webkit/messages.py:
3547         (headers_for_type): Special case MediaConstraintsData.
3548
3549         * Shared/WebCoreArgumentCoders.cpp:
3550         (IPC::encodeMediaTrackConstraintSetMap): MediaTrackConstraintSetMap encoder.
3551         (IPC::ArgumentCoder<MediaConstraintsData>::encode): MediaConstraintsData encoder.
3552         (IPC::decodeMediaTrackConstraintSetMap): MediaTrackConstraintSetMap decoder.
3553         (IPC::ArgumentCoder<MediaConstraintsData>::decode): MediaConstraintsData decoder.
3554         (IPC::ArgumentCoder<CaptureDevice>::encode): CaptureDevice enoder.
3555         (IPC::ArgumentCoder<CaptureDevice>::decode): CaptureDevice decoder.
3556         * Shared/WebCoreArgumentCoders.h:
3557
3558         * UIProcess/API/APIUIClient.h:  Remove UserMediaPermissionCheckProxy forward declaration.
3559
3560         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
3561         (toWK): Translate UserMediaPermissionRequestDenialReason to UserMediaAccessDenialReason.
3562         (WKUserMediaPermissionRequestDeny): Add "reason" parameter.
3563         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
3564
3565         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3566         (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Invalidate pending device requests.
3567         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Make private.
3568         (WebKit::toWebCore): Map from UserMediaAccessDenialReason to MediaAccessDenialReason, cast to
3569           uint64_t to pass to web process.
3570         (WebKit::UserMediaPermissionRequestManagerProxy::denyRequest): Send to web process.
3571         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Ditto.
3572         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Validate
3573           constraints and make sure gUM is enabled before prompting user.
3574         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): New.
3575         (WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Send 
3576           results of device enumeration to web process.
3577         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Deleted.
3578         (WebKit::UserMediaPermissionRequestManagerProxy::createUserMediaPermissionCheck): Deleted.
3579         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
3580
3581         * UIProcess/UserMediaPermissionRequestProxy.cpp:
3582         (WebKit::UserMediaPermissionRequestProxy::allow):
3583         (WebKit::UserMediaPermissionRequestProxy::deny): Take "reason" parameter.
3584         * UIProcess/UserMediaPermissionRequestProxy.h:
3585
3586         * UIProcess/WebPageProxy.cpp:
3587         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
3588         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
3589         (WebKit::WebPageProxy::checkUserMediaPermissionForFrame): Deleted.
3590         * UIProcess/WebPageProxy.h:
3591         * UIProcess/WebPageProxy.messages.in:
3592
3593         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
3594         (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): userMediaAccessDenied -> deny.
3595           Pass the audio and video constraints to the UI process.
3596         (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted): 
3597         (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasDenied):
3598         (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices): Send the enumeration request
3599           to the UI process.
3600         (WebKit::UserMediaPermissionRequestManager::cancelMediaDevicesEnumeration):
3601         (WebKit::UserMediaPermissionRequestManager::didCompleteMediaDeviceEnumeration):
3602         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Deleted.
3603         (WebKit::UserMediaPermissionRequestManager::startUserMediaPermissionCheck): Deleted.
3604         (WebKit::UserMediaPermissionRequestManager::cancelUserMediaPermissionCheck): Deleted.
3605         (WebKit::UserMediaPermissionRequestManager::didCompleteUserMediaPermissionCheck): Deleted.
3606         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
3607
3608         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
3609         (WebKit::WebUserMediaClient::enumerateMediaDevices): New.
3610         (WebKit::WebUserMediaClient::cancelMediaDevicesEnumerationRequest): New.
3611         (WebKit::WebUserMediaClient::checkUserMediaPermission): Deleted.
3612         (WebKit::WebUserMediaClient::cancelUserMediaPermissionCheck): Deleted.
3613         * WebProcess/WebCoreSupport/WebUserMediaClient.h:
3614
3615         * WebProcess/WebPage/WebPage.cpp:
3616         (WebKit::WebPage::userMediaAccessWasGranted): New.
3617         (WebKit::WebPage::userMediaAccessWasDenied): Ditto.
3618         (WebKit::WebPage::didCompleteMediaDeviceEnumeration):
3619         (WebKit::WebPage::didReceiveUserMediaPermissionDecision): Deleted.
3620         (WebKit::WebPage::didCompleteUserMediaPermissionCheck): Deleted.
3621         * WebProcess/WebPage/WebPage.h:
3622         * WebProcess/WebPage/WebPage.messages.in:
3623
3624 2016-10-17  Antti Koivisto  <antti@apple.com>
3625
3626         Rename setNeedsStyleRecalc to invalidateStyle
3627         https://bugs.webkit.org/show_bug.cgi?id=163542
3628
3629         Reviewed by Darin Adler.
3630
3631         * WebProcess/Plugins/PluginView.cpp:
3632         (WebKit::PluginView::didInitializePlugin):
3633         (WebKit::PluginView::pluginProcessCrashed):
3634
3635 2016-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3636
3637         NetworkSession: PendingDownload is leaked if canceled before willDecidePendingDownloadDestination
3638         https://bugs.webkit.org/show_bug.cgi?id=163545
3639
3640         Reviewed by Alex Christensen.
3641
3642         If a download started by DownloadManager::startDownload() is cancelled before
3643         DownloadManager::willDecidePendingDownloadDestination() is called, DownloadManager::cancelDownload() does
3644         nothing, because the Download hasn't been created yet and m_downloadsWaitingForDestination map doesn't contain
3645         the download ID, and the PendingDownload is never removed from the m_pendingDownloads map.
3646
3647         * NetworkProcess/Downloads/DownloadManager.cpp:
3648         (WebKit::DownloadManager::cancelDownload): Always take the PendingDownload from m_pendingDownloads map. Then, if
3649         the download was already in m_downloadsWaitingForDestination map, get the network data task to properly cancel
3650         it and then call the completion handler to ignore the request. Otherwise cancel the pending download if exists.
3651         * NetworkProcess/Downloads/PendingDownload.cpp:
3652         (WebKit::PendingDownload::cancel): Cancel the network load and notify the UI process that the download was canceled.
3653         * NetworkProcess/Downloads/PendingDownload.h:
3654
3655 2016-10-17  Megan Gardner  <megan_gardner@apple.com>
3656
3657         Add test and infrastructure for link popover
3658         https://bugs.webkit.org/show_bug.cgi?id=163406
3659
3660         Reviewed by Simon Fraser.
3661
3662         Add infrastructure to see when a link popover appears, and what URL it has loaded.
3663
3664         * UIProcess/API/Cocoa/WKWebView.mm:
3665         (-[WKWebView didShowForcePressPreview]):
3666         (-[WKWebView didDismissForcePressPreview]):
3667         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3668         * UIProcess/ios/WKContentViewInteraction.mm:
3669         (-[WKContentView _contentsOfUserInterfaceItem:]):
3670         (-[WKContentView _presentedViewControllerForPreviewItemController:]):
3671         (-[WKContentView _previewItemController:didDismissPreview:committing:]):
3672         (-[WKContentView _previewItemControllerDidCancelPreview:]):
3673
3674 2016-10-17  Tim Horton  <timothy_horton@apple.com>
3675
3676         REGRESSION (r169805): WKWebView canGoBack returning YES when nothing is in the back-forward list after restoring session state
3677         https://bugs.webkit.org/show_bug.cgi?id=163573
3678         <rdar://problem/28744549>
3679
3680         Reviewed by Dan Bernstein.
3681
3682         * UIProcess/WebPageProxy.cpp:
3683         (WebKit::WebPageProxy::restoreFromSessionState):
3684         Update PageLoadState's canGoBack/canGoForward bits when restoring from
3685         session state, because in the don't-navigate case, nothing else will make this happen,
3686         and it will remain stale.
3687
3688 2016-10-17  Andy Estes  <aestes@apple.com>
3689
3690         Crash in ASCIICaseInsensitiveHash::hash() when a response has a null MIME type
3691         https://bugs.webkit.org/show_bug.cgi?id=163476
3692         <rdar://problem/26941395>
3693
3694         Reviewed by Tim Horton.
3695
3696         When custom content providers are registered and a response has a null MIME type, WebPage
3697         will pass a null String to HashSet::contains(). This results in a null pointer dereference,
3698         since the String hash functions do not support null Strings and unconditionally dereference
3699         their StringImpls. Fixed by checking that Strings are non-null before calling
3700         HashSet::contains() on m_mimeTypesWithCustomContentProviders.
3701
3702         Rearranging WebPage::shouldUseCustomContentProviderForResponse() to call
3703         canPluginHandleResponse() before checking m_mimeTypesWithCustomContentProviders uncovered a
3704         crash in existing layout tests where WebPage::m_mainFrame can be NULL during WebPage
3705         construction (m_mainFrame isn't yet initialized). Fixed this by passing the main Frame to
3706         canPluginHandleResponseInFrame() instead of relying on m_mainFrame.
3707
3708         New API test: WebKit2.LoadDataWithNilMIMEType.
3709
3710         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3711         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): Passed
3712         m_frame->coreFrame() to shouldUseCustomContentProviderForResponse().
3713         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Ditto.
3714         * WebProcess/WebPage/WebPage.cpp:
3715         (WebKit::WebPage::canPluginHandleResponse): Added a mainFrame parameter and used it instead
3716         of m_mainFrame->coreFrame().
3717         (WebKit::WebPage::shouldUseCustomContentProviderForResponse): Passed mainFrame to
3718         canPluginHandleResponse(), and checked if mimeType is null before calling
3719         m_mimeTypesWithCustomContentProviders.contains().
3720         (WebKit::WebPage::canShowMIMEType): Checked if MIMEType is null before calling
3721         m_mimeTypesWithCustomContentProviders.contains().
3722         * WebProcess/WebPage/WebPage.h: Made canPluginHandleResponse() a private declaration.
3723
3724 2016-10-17  Chris Dumez  <cdumez@apple.com>
3725
3726         [WK2][NetworkCache] PendingFrameLoad objects are sometimes leaked
3727         https://bugs.webkit.org/show_bug.cgi?id=163569
3728         <rdar://problem/28810836>
3729
3730         Reviewed by Antti Koivisto.
3731
3732         PendingFrameLoad objects are created to track frame loads and added to
3733         the m_pendingFrameLoads hash map. These objects are supposed to remove
3734         themselves from the hash map once they detect that the page load has
3735         finished by calling PendingFrameLoad::m_loadCompletionHandler().
3736
3737         PendingFrameLoad::m_loadCompletionHandler() is called from
3738         markLoadAsCompleted() when we detect that the page load has finished
3739         via the m_loadHysteresisActivity HysteresisActivity. We call impulse()
3740         on the HysteresisActivity every time a subresource is loaded in the
3741         frame. The issue is that if no subresource is ever loaded, then we
3742         never call impulse() on the HysteresisActivity, which is therefore
3743         never started. If it nevers starts, then it nevers stops and never
3744         calls markLoadAsCompleted(). To address the problem, we now call
3745         impulse() on the HysteresisActivity as soon as we construct it.
3746
3747         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
3748
3749 2016-10-17  Jeremy Jones  <jeremyj@apple.com>
3750
3751         Enable keyboard in fullscreen.
3752         https://bugs.webkit.org/show_bug.cgi?id=163146
3753
3754         Reviewed by Jer Noble.
3755
3756         Allow keyboard in fullscreen.
3757
3758         * UIProcess/WebFullScreenManagerProxy.cpp:
3759         (WebKit::WebFullScreenManagerProxy::supportsFullScreen):
3760
3761 2016-10-17  Chris Dumez  <cdumez@apple.com>
3762
3763         Move form.reportValidity() behind InteractiveFormValidation setting
3764         https://bugs.webkit.org/show_bug.cgi?id=163550
3765
3766         Reviewed by Darin Adler.
3767
3768         Enable InteractiveFormValidation setting by default and link it to
3769         RuntimeEnabledFeatures so we can use it in the IDL.
3770
3771         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3772         * WebProcess/WebPage/WebPage.cpp:
3773         (WebKit::WebPage::updatePreferences):
3774
3775 2016-10-17  Gavin Barraclough  <barraclough@apple.com>
3776
3777         UIProcess should determine throttle state for WebContent process
3778         https://bugs.webkit.org/show_bug.cgi?id=163556
3779
3780         Reviewed by Anders Carlsson.
3781
3782         This is a step towards merging page/process throttling code for mac & iOS.
3783
3784         Previously WebPage determined whether to start a UserActivity based on page activity,
3785         visibility and the preference to disable. Now WebPage passes the activity state across
3786         to WebPageProxy, which makes the decision & explicitly instructs WebPage to start/stop
3787         the UserActivity.
3788
3789         * UIProcess/WebPageProxy.cpp:
3790         (WebKit::WebPageProxy::WebPageProxy):
3791             - updateActivityToken + updateProccessSuppressionState -> updateThrottleState
3792         (WebKit::WebPageProxy::reattachToWebProcess):
3793             - updateActivityToken -> updateThrottleState
3794         (WebKit::WebPageProxy::dispatchViewStateChange):
3795             - updateActivityToken -> updateThrottleState
3796         (WebKit::WebPageProxy::setPageActivityState):
3797             - Record activity state passed from WebPage, and update.
3798         (WebKit::WebPageProxy::preferencesDidChange):
3799             - updateProccessSuppressionState -> updateThrottleState
3800         (WebKit::WebPageProxy::updateActivityToken): Deleted.
3801         (WebKit::WebPageProxy::updateProccessSuppressionState): Deleted.
3802         (WebKit::WebPageProxy::updateThrottleState):
3803             - Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
3804             - Compute whether page should be suppressed, and send SetPageSuppressed message accordingly.
3805         * UIProcess/WebPageProxy.h:
3806             - Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
3807             - Added setPageActivityState/m_activityState to report/record page activity.
3808             - Added m_pageSuppressed to prevent redundant message sends.
3809         * UIProcess/WebPageProxy.messages.in:
3810             - Expose SetPageActivityState message (called by WebPage).
3811         * WebProcess/WebPage/WebPage.cpp:
3812         (WebKit::WebPage::WebPage):
3813             - removed m_processSuppressionEnabled
3814             - updateUserActivity -> setPageSuppressed - explicitly set the page to not be suppressed, until WebPageProxy tells us to do so.
3815         (WebKit::WebPage::setPageActivityState):
3816             - post activity state on to WebPageProxy.
3817         (WebKit::WebPage::setPageSuppressed):
3818             - Start/stop USerActivity accordingly.
3819         (WebKit::WebPage::setViewState):
3820             - No longer need to monitor ViewState changes on the WebProcess side.
3821         (WebKit::WebPage::updatePreferences):
3822             - No longer need to monitor preference changes on the WebProcess side.
3823         (WebKit::WebPage::updateUserActivity): Deleted.
3824             - Only updated on reciept of setPageSuppressed message.
3825         * WebProcess/WebPage/WebPage.h:
3826             - Removed m_activityState, m_processSuppressionEnabled, updateUserActivity.
3827             - Added setPageSuppressed message.
3828         * WebProcess/WebPage/WebPage.messages.in:
3829             - Added SetPageSuppressed message.
3830
3831 2016-10-17  Michael Catanzaro  <mcatanzaro@igalia.com>
3832
3833         REGRESSION(r206189): logs error statements when API::URLRequest is canceled
3834         https://bugs.webkit.org/show_bug.cgi?id=163393
3835
3836         Reviewed by Antti Koivisto.
3837
3838         Print this case at normal logging level, not as an error.
3839
3840         * WebProcess/Network/WebLoaderStrategy.cpp:
3841         (WebKit::WebLoaderStrategy::loadResource):
3842
3843 2016-10-17  Chris Dumez  <cdumez@apple.com>
3844
3845         [iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
3846         https://bugs.webkit.org/show_bug.cgi?id=163547
3847
3848         Reviewed by Darin Adler.
3849
3850         Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
3851         now that it is available in UIKit.
3852
3853         * Platform/spi/ios/UIKitSPI.h:
3854         * Shared/ios/NativeWebTouchEventIOS.mm:
3855         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
3856
3857 2016-10-17  Konstantin Tokarev  <annulen@yandex.ru>
3858
3859         Eleminate code duplication between ResourceRequest encoding/decoding implementations
3860         https://bugs.webkit.org/show_bug.cgi?id=163507
3861
3862         Reviewed by Carlos Garcia Campos.
3863
3864         ResourceRequestBase::encodeWithoutPlatformData() and Soup implementation of
3865         ArgumentCoder<ResourceRequest>::encodePlatformData() share most of the code,
3866         ditto for decoding implementations.
3867
3868         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
3869         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
3870         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
3871
3872 2016-10-17  Michael Catanzaro  <mcatanzaro@igalia.com>
3873
3874         Move user agent quirks to cross-platform location
3875         https://bugs.webkit.org/show_bug.cgi?id=163508
3876
3877         Reviewed by Carlos Garcia Campos.
3878
3879         #include <WebCore/UserAgent.h> instead of <WebCore/UserAgentGtk.h>.
3880
3881         * UIProcess/API/gtk/WebKitSettings.cpp:
3882         * UIProcess/efl/WebPageProxyEfl.cpp:
3883         * UIProcess/gtk/WebPageProxyGtk.cpp:
3884         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
3885
3886 2016-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3887
3888         [SOUP] Downloads should always sniff contents
3889         https://bugs.webkit.org/show_bug.cgi?id=163538
3890
3891         Reviewed by Michael Catanzaro.
3892
3893         It's quite common that downloads have weird filenames with no extension, so it would be better if the loader
3894         sniff the contents to guess the mime type.
3895
3896         * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
3897         (WebKit::Download::startNetworkLoad): Pass true for shouldContentSniff parameter of ResourceHandle::create().
3898
3899 2016-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3900
3901         [GTK] Switch to use API::DownloadClient instead of the C API client
3902         https://bugs.webkit.org/show_bug.cgi?id=163537
3903
3904         Reviewed by Michael Catanzaro.
3905
3906         The code is simpler and we avoid all the toImpl/toAPI.
3907
3908         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
3909         (attachDownloadClientToContext):
3910         (didStart):
3911         (didReceiveResponse):
3912         (didReceiveData):
3913         (decideDestinationWithSuggestedFilename):
3914         (didCreateDestination):
3915         (didFail):
3916         (didCancel):
3917         (didFinish):
3918
3919 2016-10-17  Manuel Rego Casasnovas  <rego@igalia.com>
3920
3921         [css-grid] Disable CSS Grid Layout runtime flag by default
3922         https://bugs.webkit.org/show_bug.cgi?id=163432
3923
3924         Reviewed by Darin Adler.
3925
3926         It was enabled in r201042, but now Safari Technology Preview
3927         has a UI to switch runtime flags so it doesn't need to be enabled
3928         by default anymore.
3929
3930         * Shared/WebPreferencesDefinitions.h: Disable grid layout runtime flag
3931         by default.
3932
3933 2016-10-16  Darin Adler  <darin@apple.com>
3934
3935         Move CSS classes from ExceptionCode to Exception
3936         https://bugs.webkit.org/show_bug.cgi?id=163494
3937
3938         Reviewed by Sam Weinig.
3939
3940         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
3941         (webkit_dom_css_rule_set_css_text): Updated for ExceptionOr.
3942         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
3943         (webkit_dom_css_style_declaration_remove_property): Ditto.
3944         (webkit_dom_css_style_declaration_set_property): Ditto.
3945         (webkit_dom_css_style_declaration_set_css_text): Ditto.
3946         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
3947         (webkit_dom_css_style_sheet_insert_rule): Ditto.
3948         (webkit_dom_css_style_sheet_delete_rule): Ditto.
3949         (webkit_dom_css_style_sheet_add_rule): Ditto.
3950         (webkit_dom_css_style_sheet_remove_rule): Ditto.
3951         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
3952         (webkit_dom_css_value_set_css_text): Ditto.
3953         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
3954         (webkit_dom_media_list_delete_medium): Ditto.
3955         (webkit_dom_media_list_append_medium): Ditto.
3956         (webkit_dom_media_list_set_media_text): Ditto.
3957
3958 2016-10-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3959
3960         [GTK] Default WebKitWebsiteDataManager is always leaked in WebKitWebContext
3961         https://bugs.webkit.org/show_bug.cgi?id=163443
3962
3963         Reviewed by Michael Catanzaro.
3964
3965         Adopt the reference returned by webkitWebsiteDataManagerCreate().
3966
3967         * UIProcess/API/gtk/WebKitWebContext.cpp:
3968         (webkitWebContextConstructed):
3969
3970 2016-10-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3971
3972         [GTK] WebKitWebPage URI not updated after URI is modified by InjectedBundlePageResourceLoadClient::willSendRequestForFrame
3973         https: