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