e7f2bef829042c268032c2772353adbbd4d83ad3
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-08-24  Hunseop Jeong  <hs85.jeong@samsung.com>
2
3         [EFL] Fix test_ewk2_view
4         https://bugs.webkit.org/show_bug.cgi?id=161131
5
6         Reviewed by Gyuyoung Kim.
7
8         ewk_view_title_changed: null is treated as the string "null" after r203487.
9
10         ewk_view_page_contents_get: aligned encoding labels after r204605.
11
12         * UIProcess/API/efl/tests/resources/resultMHTML.mht:
13         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
14         (TEST_F):
15
16 2016-08-23  Simon Fraser  <simon.fraser@apple.com>
17
18         Add some logging for WKSelectionDrawingInfo
19         https://bugs.webkit.org/show_bug.cgi?id=161055
20
21         Reviewed by Tim Horton.
22
23         Add a Selection logging channel for WK2, and dump WKSelectionDrawingInfo when it changes.
24
25         * Platform/Logging.h:
26         * UIProcess/ios/WKContentViewInteraction.h:
27         * UIProcess/ios/WKContentViewInteraction.mm:
28         (WebKit::operator<<):
29         (-[WKContentView _updateChangedSelection:]):
30
31 2016-08-23  Ryosuke Niwa  <rniwa@webkit.org>
32
33         Another CMake build fix attempt after r204852.
34
35         * CMakeLists.txt:
36
37 2016-08-22  Filip Pizlo  <fpizlo@apple.com>
38
39         Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression
40         https://bugs.webkit.org/show_bug.cgi?id=160125
41
42         Reviewed by Geoffrey Garen.
43         
44         Just rewiring some #includes.
45
46         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
47         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
48
49 2016-08-23  Brady Eidson  <beidson@apple.com>
50
51         WK2 Gamepad layout test support.
52         https://bugs.webkit.org/show_bug.cgi?id=134671
53
54         Reviewed by Alex Christensen.
55         
56         - Teach the UIGamepadProvider to use the default shared provider.
57         - Especially if its the MockGamepadProvider, don't overwrite it.
58
59         * Shared/Gamepad/GamepadData.cpp:
60         (WebKit::GamepadData::GamepadData):
61         (WebKit::GamepadData::encode):
62         (WebKit::GamepadData::decode):
63         (WebKit::GamepadData::loggingString):
64         (WebKit::GamepadData::isNull): Deleted.
65         * Shared/Gamepad/GamepadData.h:
66         (WebKit::GamepadData::GamepadData):
67         (WebKit::GamepadData::isNull):
68         (WebKit::GamepadData::index):
69         (WebKit::GamepadData::axisValues):
70         (WebKit::GamepadData::buttonValues):
71
72         * UIProcess/Gamepad/UIGamepad.h:
73
74         * UIProcess/Gamepad/UIGamepadProvider.cpp:
75         (WebKit::UIGamepadProvider::UIGamepadProvider):
76         (WebKit::UIGamepadProvider::~UIGamepadProvider):
77         (WebKit::UIGamepadProvider::platformGamepadInputActivity):
78         (WebKit::UIGamepadProvider::startMonitoringGamepads):
79         (WebKit::UIGamepadProvider::stopMonitoringGamepads):
80         (WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider):
81         * UIProcess/Gamepad/UIGamepadProvider.h:
82
83         * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
84         (WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider):
85         (WebKit::UIGamepadProvider::platformStopMonitoringInput):
86         (WebKit::UIGamepadProvider::platformStartMonitoringInput):
87         (WebKit::UIGamepadProvider::platformStartMonitoringGamepads): Deleted.
88         (WebKit::UIGamepadProvider::platformStopMonitoringGamepads): Deleted.
89         (WebKit::UIGamepadProvider::platformGamepads): Deleted.
90
91         * UIProcess/WebPageProxy.h:
92
93         * WebProcess/Gamepad/WebGamepad.cpp:
94         (WebKit::WebGamepad::WebGamepad):
95         (WebKit::WebGamepad::updateValues):
96         * WebProcess/Gamepad/WebGamepad.h:
97
98         * WebProcess/Gamepad/WebGamepadProvider.cpp:
99         (WebKit::WebGamepadProvider::gamepadConnected):
100         * WebProcess/Gamepad/WebGamepadProvider.h:
101
102         * WebProcess/WebPage/WebPage.h:
103         * WebProcess/WebProcess.h:
104
105 2016-08-23  Dave Hyatt  <hyatt@apple.com>
106
107         Add pref for enabling new CSS parsing and move parser files into subdirectory.
108         https://bugs.webkit.org/show_bug.cgi?id=161095
109
110         Reviewed by Sam Weinig.
111
112         * Shared/WebPreferencesDefinitions.h:
113         * UIProcess/API/C/WKPreferences.cpp:
114         (WKPreferencesSetNewCSSParserEnabled):
115         (WKPreferencesGetNewCSSParserEnabled):
116         * UIProcess/API/C/WKPreferencesRefPrivate.h:
117         * WebProcess/WebPage/WebPage.cpp:
118         (WebKit::WebPage::updatePreferences):
119
120 2016-08-23  Chris Dumez  <cdumez@apple.com>
121
122         Unreviewed, rolling out r204243.
123
124         Caused some layout test failures
125
126         Reverted changeset:
127
128         "Write API test to cover crash fix in r204135"
129         https://bugs.webkit.org/show_bug.cgi?id=160587
130         http://trac.webkit.org/changeset/204243
131
132 2016-08-23  Hunseop Jeong  <hs85.jeong@samsung.com>
133
134         [EFL] URTBF after r204743.
135
136         * Shared/WebBatteryStatus.cpp: Remove Arguments.h.
137
138 2016-08-22  Yusuke Suzuki  <utatane.tea@gmail.com>
139
140         Use Messages::XXX...::Reply explicitly
141         https://bugs.webkit.org/show_bug.cgi?id=161075
142
143         Reviewed by Carlos Garcia Campos.
144
145         std::tuple's constructor is annotated as `explicit`.
146         So we cannot use the implicit conversion here.
147         This causes the build failure in EFL and GTK.
148
149         Looking through code, the other places use ::Reply explicitly.
150         So in this patch, we follow that.
151
152         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
153         (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
154         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
155         (WebKit::InjectedBundlePageFullScreenClient::supportsFullScreen):
156
157 2016-08-22  Anders Carlsson  <andersca@apple.com>
158
159         Remove Arguments.h
160         https://bugs.webkit.org/show_bug.cgi?id=161060
161
162         Reviewed by Tim Horton.
163
164         * Platform/IPC/Arguments.h: Removed.
165         (IPC::Arguments::Arguments): Deleted.
166         (IPC::Arguments::encode): Deleted.
167         (IPC::Arguments::decode): Deleted.
168         * Platform/IPC/Connection.h:
169         * Platform/IPC/HandleMessage.h:
170         * Shared/AssistedNodeInformation.cpp:
171         * Shared/Cocoa/DataDetectionResult.mm:
172         * Shared/EditorState.cpp:
173         * Shared/WebContextMenuItemData.cpp:
174         * Shared/WebMouseEvent.cpp:
175         * Shared/WebPlatformTouchPoint.cpp:
176         * Shared/WebPopupItem.cpp:
177         * Shared/WebTouchEvent.cpp:
178         * Shared/WebWheelEvent.cpp:
179         * Shared/ios/InteractionInformationAtPosition.mm:
180         * Shared/ios/WebPlatformTouchPointIOS.cpp:
181         * Shared/ios/WebTouchEventIOS.cpp:
182         * Shared/mac/WebGestureEvent.cpp:
183         * WebKit2.xcodeproj/project.pbxproj:
184         * WebProcess/InjectedBundle/InjectedBundle.cpp:
185         * WebProcess/WebPage/WebPage.cpp:
186
187 2016-08-22  Anders Carlsson  <andersca@apple.com>
188
189         Move tuple coding to ArgumentCoders.h
190         https://bugs.webkit.org/show_bug.cgi?id=161059
191
192         Reviewed by Tim Horton.
193
194         * Platform/IPC/ArgumentCoders.h:
195         (IPC::TupleCoder::encode):
196         (IPC::TupleCoder::decode):
197         * Platform/IPC/Arguments.h:
198         (IPC::TupleCoder::encode): Deleted.
199         (IPC::TupleCoder::decode): Deleted.
200         * Scripts/webkit/messages.py:
201         (forward_declarations_and_headers):
202
203 2016-08-22  Anders Carlsson  <andersca@apple.com>
204
205         Simplify the generated message structs
206         https://bugs.webkit.org/show_bug.cgi?id=161057
207
208         Reviewed by Geoffrey Garen.
209
210         Use a class template to transform the Reply and Argument tuple types for encoding/decoding
211         instead of generating them for each message.
212
213         * Platform/IPC/HandleMessage.h:
214         (IPC::handleMessage):
215         (IPC::handleMessageDelayed):
216         * Scripts/webkit/messages.py:
217         (reply_type):
218         (message_to_struct_declaration):
219         (decode_type): Deleted.
220
221 2016-08-19  Anders Carlsson  <andersca@apple.com>
222
223         Remove MessageRecorder
224         https://bugs.webkit.org/show_bug.cgi?id=161022
225
226         Reviewed by Tim Horton.
227
228         * Platform/IPC/ArgumentCoders.cpp:
229         (IPC::ArgumentCoder<uuid_t>::encode): Deleted.
230         (IPC::ArgumentCoder<uuid_t>::decode): Deleted.
231         * Platform/IPC/ArgumentCoders.h:
232         * Platform/IPC/Connection.cpp:
233         (IPC::Connection::sendMessage):
234         (IPC::Connection::sendSyncMessage):
235         (IPC::Connection::sendSyncMessageFromSecondaryThread):
236         (IPC::Connection::dispatchSyncMessage): Deleted.
237         (IPC::Connection::dispatchMessage): Deleted.
238         * Platform/IPC/Connection.h:
239         * Platform/IPC/Encoder.cpp:
240         (IPC::Encoder::encodeHeader): Deleted.
241         * Platform/IPC/MessageRecorder.cpp: Removed.
242         (IPC::MessageRecorder::isEnabled): Deleted.
243         (IPC::MessageRecorder::recordOutgoingMessage): Deleted.
244         (IPC::MessageRecorder::recordIncomingMessage): Deleted.
245         (IPC::MessageRecorder::MessageProcessingToken::MessageProcessingToken): Deleted.
246         (IPC::MessageRecorder::MessageProcessingToken::~MessageProcessingToken): Deleted.
247         * Platform/IPC/MessageRecorder.h: Removed.
248         (IPC::MessageRecorder::MessageRecorder): Deleted.
249         * Platform/IPC/MessageRecorderProbes.d: Removed.
250         * WebKit2.xcodeproj/project.pbxproj:
251
252 2016-08-22  Alex Christensen  <achristensen@webkit.org>
253
254         Fix Mac CMake build after r204717.
255
256         * PlatformMac.cmake:
257
258 2016-08-22  Simon Fraser  <simon.fraser@apple.com>
259
260         <select> menu on iPad causes shifting of hit-testing areas
261         https://bugs.webkit.org/show_bug.cgi?id=150079
262
263         Reviewed by Tim Horton.
264
265         -isAssistingNode (aka the poorly named isEditable) is input into WebPageProxy::computeCustomFixedPositionRect(),
266         so when it changes we have to update visible rects. We were doing this on focus, but failing
267         to do it on blur.
268
269         Added the ability to test by:
270         1. Making it possible to initiate an animated scroll in the UI process
271         2. Adding callbacks for starting and ending interaction with a form control. Sadly
272         the "ending interaction" for <select> popovers on iPad isn't late enough, since we
273         have no way currently to know when the dimming view behind the popover animates out,
274         so for now the test keeps trying to tap a button.
275
276         Test: fast/forms/ios/ipad/unfocus-inside-fixed-hittest.html
277
278         * UIProcess/API/Cocoa/WKWebView.mm:
279         (-[WKWebView _zoomToPoint:atScale:animated:]):
280         (-[WKWebView _scrollToRect:origin:minimumScrollDistance:]):
281         (-[WKWebView _scrollByContentOffset:]):
282         (-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
283         (-[WKWebView didStartFormControlInteraction]):
284         (-[WKWebView didEndFormControlInteraction]):
285         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
286         * UIProcess/ios/WKContentView.mm:
287         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
288         * UIProcess/ios/WKContentViewInteraction.mm:
289         (-[WKContentView setIsEditable:]):
290         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
291         (-[WKContentView _stopAssistingNode]):
292
293 2016-08-22  Daniel Bates  <dabates@apple.com>
294
295         [iOS] <a ping> and <area ping> tests time out
296         https://bugs.webkit.org/show_bug.cgi?id=156857
297
298         Reviewed by Simon Fraser.
299
300         Support single tapping on an HTML area element in WebKit2 just as we do in Legacy WebKit.
301
302         WebKit2 commits to clicking a "clickable" DOM node on a single tap only if it has a
303         renderer. An HTML area element represents a hyperlink in an image map and does not have
304         a renderer.
305
306         * WebProcess/WebPage/ios/WebPageIOS.mm:
307         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Compute the tap highlight with respect
308         to the renderer for the image map associated with the tapped HTML area element (if it has one).
309         (WebKit::WebPage::commitPotentialTap): Allow committing a potential tap on an HTML area element.
310
311 2016-08-22  Darin Adler  <darin@apple.com>
312
313         Move Objective-C DOM bindings from WebCore to legacy WebKit
314         https://bugs.webkit.org/show_bug.cgi?id=160654
315
316         Reviewed by Alex Christensen.
317
318         * WebProcess/WebCoreSupport/WebEditorClient.h: Updated to use RefPtr.
319         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
320         (WebKit::WebEditorClient::documentFragmentFromDelegate): Ditto.
321
322         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: Removed unneeded includes
323         of Objective-C DOM headers that are now part of legacy WebKit, not WebCore.
324         But this file doesn't need to depend on those headers at all.
325
326 2016-08-22  Chris Dumez  <cdumez@apple.com>
327
328         [iOS] Wait a few seconds before release network activity assertion after a load
329         https://bugs.webkit.org/show_bug.cgi?id=160975
330         <rdar://problem/27910964>
331
332         Reviewed by Darin Adler.
333
334         Some apps do several loads one after the other in a non-visible view.
335         This causes us to release the background assertion every time a load
336         completes and then take one again less than a second after. Every
337         time we release the assertion, we send a PrepareToSuspend IPC to the
338         WebContent process, which does all the clean up to get ready to
339         suspend, only to get a CancelPrepareReadyToSuspend later on because
340         the next load has started. To work around this problem, we now wait
341         a few seconds before releasing the background activity after a load.
342
343         * UIProcess/Cocoa/NavigationState.h:
344         * UIProcess/Cocoa/NavigationState.mm:
345         (WebKit::NavigationState::NavigationState):
346         (WebKit::NavigationState::releaseNetworkActivityToken):
347         (WebKit::NavigationState::didChangeIsLoading):
348
349 2016-08-22  Youenn Fablet  <youenn@apple.com>
350
351         [Fetch API] Activate fetch api runtime flag by default
352         https://bugs.webkit.org/show_bug.cgi?id=160452
353
354         Reviewed by Alex Christensen.
355
356         * Shared/WebPreferencesDefinitions.h:
357
358 2016-08-22  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>
359
360         [SOUP] Change MessageDecoder with Decoder
361         https://bugs.webkit.org/show_bug.cgi?id=161040
362
363         Reviewed by Darin Adler.
364
365         Clean up MessageDecoder in files of Soup.
366
367         * Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
368         (WebKit::WebPage::didReceiveMessage):
369         * UIProcess/soup/WebSoupRequestManagerProxy.h:
370         * WebProcess/soup/WebSoupRequestManager.h:
371
372 2016-08-21  Alex Christensen  <achristensen@webkit.org>
373
374         Use Document& instead of Document* when getting cookies
375         https://bugs.webkit.org/show_bug.cgi?id=161011
376
377         Reviewed by Darin Adler.
378
379         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
380         (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
381         (WebKit::WebAutomationSessionProxy::deleteCookie):
382         * WebProcess/Plugins/PluginView.cpp:
383         (WebKit::PluginView::cookiesForURL):
384         (WebKit::PluginView::setCookiesForURL):
385         (WebKit::PluginView::getAuthenticationInfo):
386
387 2016-08-20  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>
388
389         Unreviewed EFL build fix since r204668
390
391         r204668 changed MessageDecoder with Decoder though, MessageDecoder remained
392         in EFL specific files.
393
394         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
395         * UIProcess/WebVibrationProxy.h:
396         * WebProcess/Battery/WebBatteryManager.h:
397         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
398         (WebKit::AcceleratedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage):
399         * WebProcess/WebPage/AcceleratedDrawingArea.h:
400         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
401         * WebProcess/WebPage/LayerTreeHost.h:
402
403 2016-08-20  Dan Bernstein  <mitz@apple.com>
404
405         [Mac] Web Content service with a restricted entitlement may load arbitrary dylibs
406         https://bugs.webkit.org/show_bug.cgi?id=156668
407         <rdar://problem/25429784>
408
409         Reviewed by Sam Weinig.
410
411         * Configurations/WebContentService.xcconfig: Enable library validation when the Web Content
412           service is given the XPC domain extension entitlement.
413
414 2016-08-20  Javier Fernandez  <jfernandez@igalia.com>
415
416         [GTK] Unreviewed GTK build fix since r204665 and 204668
417         https://bugs.webkit.org/show_bug.cgi?id=161020
418
419         * CMakeLists.txt:
420         * Platform/IPC/MessageRecorder.cpp:
421         (IPC::MessageRecorder::recordOutgoingMessage):
422         * Platform/IPC/unix/ConnectionUnix.cpp:
423         (IPC::Connection::processMessage):
424         (IPC::Connection::sendOutgoingMessage):
425         * Platform/unix/SharedMemoryUnix.cpp:
426         (WebKit::SharedMemory::Handle::encode):
427         (WebKit::SharedMemory::Handle::decode):
428         * PlatformGTK.cmake:
429         * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
430         (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply):
431         (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply):
432         (WebKit::WebPage::didReceiveWebPageMessage):
433         (WebKit::WebPage::didReceiveSyncWebPageMessage):
434         * Scripts/webkit/LegacyMessages-expected.h:
435         * Scripts/webkit/MessageReceiver-expected.cpp:
436         (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply):
437         (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply):
438         (WebKit::WebPage::didReceiveMessage):
439         (WebKit::WebPage::didReceiveSyncMessage):
440         * Scripts/webkit/Messages-expected.h:
441         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
442         (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
443         (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
444         (IPC::ArgumentCoder<TransformOperations>::encode):
445         (IPC::ArgumentCoder<TransformOperations>::decode):
446         (IPC::encodeTimingFunction):
447         (IPC::decodeTimingFunction):
448         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
449         (IPC::ArgumentCoder<TextureMapperAnimation>::decode):
450         (IPC::ArgumentCoder<TextureMapperAnimations>::encode):
451         (IPC::ArgumentCoder<TextureMapperAnimations>::decode):
452         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::encode):
453         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::decode):
454         (IPC::ArgumentCoder<SurfaceUpdateInfo>::encode):
455         (IPC::ArgumentCoder<SurfaceUpdateInfo>::decode):
456         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
457         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
458         (IPC::ArgumentCoder<TileUpdateInfo>::encode):
459         (IPC::ArgumentCoder<TileUpdateInfo>::decode):
460         (IPC::ArgumentCoder<TileCreationInfo>::encode):
461         (IPC::ArgumentCoder<TileCreationInfo>::decode):
462         (IPC::encodeCoordinatedSurface):
463         (IPC::decodeCoordinatedSurface):
464         (IPC::ArgumentCoder<CoordinatedGraphicsState>::encode):
465         (IPC::ArgumentCoder<CoordinatedGraphicsState>::decode):
466         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
467         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
468         (WebKit::WebCoordinatedSurface::Handle::encode):
469         (WebKit::WebCoordinatedSurface::Handle::decode):
470         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
471         * Shared/WebBatteryStatus.cpp:
472         (WebKit::WebBatteryStatus::Data::encode):
473         (WebKit::WebBatteryStatus::Data::decode):
474         * Shared/WebBatteryStatus.h:
475         * Shared/gtk/ArgumentCodersGtk.cpp:
476         (IPC::encodeImage):
477         (IPC::decodeImage):
478         (IPC::encodeDataObject):
479         (IPC::decodeDataObject):
480         (IPC::ArgumentCoder<DragData>::encode):
481         (IPC::ArgumentCoder<DragData>::decode):
482         (IPC::encodeGKeyFile):
483         (IPC::decodeGKeyFile):
484         (IPC::encode):
485         (IPC::decode):
486         * Shared/gtk/ArgumentCodersGtk.h:
487         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
488         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
489         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
490         (IPC::ArgumentCoder<CertificateInfo>::encode):
491         (IPC::ArgumentCoder<CertificateInfo>::decode):
492         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
493         (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
494         (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
495         (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData):
496         (IPC::ArgumentCoder<Credential>::encodePlatformData):
497         (IPC::ArgumentCoder<Credential>::decodePlatformData):
498         * UIProcess/LegacySessionStateCodingNone.cpp:
499         (WebKit::encodeLegacySessionState):
500         (WebKit::decodeLegacySessionState):
501         * UIProcess/WebBatteryManagerProxy.h:
502
503 2016-08-20  Yusuke Suzuki  <utatane.tea@gmail.com>
504
505         Unreviewed, build fix attempt after r204665 and r204668.
506
507         * PlatformGTK.cmake:
508
509 2016-08-19  Ryosuke Niwa  <rniwa@webkit.org>
510
511         Another build fix attempt after r204665 and r204668.
512
513         * CMakeLists.txt:
514
515 2016-08-19  Ryosuke Niwa  <rniwa@webkit.org>
516
517         GTK+ / EFL build fix attempt after r204665.
518
519         * CMakeLists.txt:
520
521 2016-08-19  Anders Carlsson  <andersca@apple.com>
522
523         Merge MessageDecoder and ArgumentDecoder into Decoder
524         https://bugs.webkit.org/show_bug.cgi?id=161019
525
526         Reviewed by Tim Horton.
527
528         * DatabaseProcess/DatabaseProcess.cpp:
529         * DatabaseProcess/DatabaseProcess.h:
530         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
531         * DatabaseProcess/DatabaseToWebProcessConnection.h:
532         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
533         * NetworkProcess/CustomProtocols/CustomProtocolManager.h:
534         * NetworkProcess/Downloads/DownloadID.h:
535         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
536         * NetworkProcess/NetworkConnectionToWebProcess.h:
537         * NetworkProcess/NetworkProcess.cpp:
538         * NetworkProcess/NetworkProcess.h:
539         * NetworkProcess/NetworkProcessCreationParameters.cpp:
540         * NetworkProcess/NetworkProcessCreationParameters.h:
541         * NetworkProcess/NetworkResourceLoadParameters.cpp:
542         * NetworkProcess/NetworkResourceLoadParameters.h:
543         * NetworkProcess/NetworkResourceLoader.h:
544         * Platform/IPC/ArgumentCoder.h:
545         * Platform/IPC/ArgumentCoders.cpp:
546         * Platform/IPC/ArgumentCoders.h:
547         * Platform/IPC/ArgumentDecoder.cpp:
548         * Platform/IPC/ArgumentDecoder.h:
549         * Platform/IPC/Arguments.h:
550         * Platform/IPC/Attachment.cpp:
551         * Platform/IPC/Attachment.h:
552         * Platform/IPC/Connection.cpp:
553         * Platform/IPC/Connection.h:
554         * Platform/IPC/DataReference.cpp:
555         * Platform/IPC/DataReference.h:
556         * Platform/IPC/Decoder.cpp: Renamed from Source/WebKit2/Platform/IPC/ArgumentDecoder.cpp.
557         * Platform/IPC/Decoder.h: Renamed from Source/WebKit2/Platform/IPC/ArgumentDecoder.h.
558         * Platform/IPC/HandleMessage.h:
559         * Platform/IPC/MessageDecoder.cpp: Removed.
560         * Platform/IPC/MessageDecoder.h: Removed.
561         * Platform/IPC/MessageReceiver.h:
562         * Platform/IPC/MessageReceiverMap.cpp:
563         * Platform/IPC/MessageReceiverMap.h:
564         * Platform/IPC/MessageRecorder.cpp:
565         * Platform/IPC/MessageRecorder.h:
566         * Platform/IPC/StringReference.cpp:
567         * Platform/IPC/StringReference.h:
568         * Platform/IPC/mac/ConnectionMac.mm:
569         * Platform/IPC/mac/MachPort.h:
570         * Platform/SharedMemory.h:
571         * Platform/mac/SharedMemoryMac.cpp:
572         * PluginProcess/PluginControllerProxy.h:
573         * PluginProcess/PluginCreationParameters.cpp:
574         * PluginProcess/PluginCreationParameters.h:
575         * PluginProcess/PluginProcess.cpp:
576         * PluginProcess/PluginProcess.h:
577         * PluginProcess/WebProcessConnection.cpp:
578         * PluginProcess/WebProcessConnection.h:
579         * Scripts/webkit/messages.py:
580         * Shared/API/APIData.cpp:
581         * Shared/API/APIData.h:
582         * Shared/API/APIError.cpp:
583         * Shared/API/APIError.h:
584         * Shared/API/APIFrameHandle.cpp:
585         * Shared/API/APIFrameHandle.h:
586         * Shared/API/APIGeometry.cpp:
587         * Shared/API/APIGeometry.h:
588         * Shared/API/APINumber.h:
589         * Shared/API/APIPageGroupHandle.cpp:
590         * Shared/API/APIPageGroupHandle.h:
591         * Shared/API/APIPageHandle.cpp:
592         * Shared/API/APIPageHandle.h:
593         * Shared/API/APIURL.h:
594         * Shared/API/APIURLRequest.cpp:
595         * Shared/API/APIURLRequest.h:
596         * Shared/API/APIURLResponse.cpp:
597         * Shared/API/APIURLResponse.h:
598         * Shared/API/Cocoa/RemoteObjectInvocation.h:
599         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
600         * Shared/API/Cocoa/RemoteObjectRegistry.h:
601         * Shared/AssistedNodeInformation.cpp:
602         * Shared/AssistedNodeInformation.h:
603         * Shared/Authentication/AuthenticationManager.h:
604         * Shared/ChildProcess.h:
605         * Shared/Cocoa/DataDetectionResult.h:
606         * Shared/Cocoa/DataDetectionResult.mm:
607         * Shared/Cocoa/LoadParametersCocoa.mm:
608         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
609         * Shared/ContextMenuContextData.cpp:
610         * Shared/ContextMenuContextData.h:
611         * Shared/Databases/DatabaseProcessCreationParameters.cpp:
612         * Shared/Databases/DatabaseProcessCreationParameters.h:
613         * Shared/Databases/IndexedDB/WebIDBResult.cpp:
614         * Shared/Databases/IndexedDB/WebIDBResult.h:
615         * Shared/EditorState.cpp:
616         * Shared/EditorState.h:
617         * Shared/FontInfo.cpp:
618         * Shared/FontInfo.h:
619         * Shared/Gamepad/GamepadData.cpp:
620         * Shared/Gamepad/GamepadData.h:
621         * Shared/LayerTreeContext.cpp:
622         * Shared/LayerTreeContext.h:
623         * Shared/LoadParameters.cpp:
624         * Shared/LoadParameters.h:
625         * Shared/NavigationActionData.cpp:
626         * Shared/NavigationActionData.h:
627         * Shared/PlatformPopupMenuData.cpp:
628         * Shared/PlatformPopupMenuData.h:
629         * Shared/Plugins/NPIdentifierData.cpp:
630         * Shared/Plugins/NPIdentifierData.h:
631         * Shared/Plugins/NPObjectMessageReceiver.h:
632         * Shared/Plugins/NPRemoteObjectMap.cpp:
633         * Shared/Plugins/NPRemoteObjectMap.h:
634         * Shared/Plugins/NPVariantData.cpp:
635         * Shared/Plugins/NPVariantData.h:
636         * Shared/Plugins/PluginProcessCreationParameters.cpp:
637         * Shared/Plugins/PluginProcessCreationParameters.h:
638         * Shared/PrintInfo.cpp:
639         * Shared/PrintInfo.h:
640         * Shared/SandboxExtension.h:
641         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
642         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
643         * Shared/SessionState.cpp:
644         * Shared/SessionState.h:
645         * Shared/ShareableBitmap.cpp:
646         * Shared/ShareableBitmap.h:
647         * Shared/ShareableResource.cpp:
648         * Shared/ShareableResource.h:
649         * Shared/StatisticsData.cpp:
650         * Shared/StatisticsData.h:
651         * Shared/UpdateInfo.cpp:
652         * Shared/UpdateInfo.h:
653         * Shared/UserData.cpp:
654         * Shared/UserData.h:
655         * Shared/VisibleContentRectUpdateInfo.cpp:
656         * Shared/VisibleContentRectUpdateInfo.h:
657         * Shared/WebBackForwardListItem.h:
658         * Shared/WebCompiledContentExtensionData.cpp:
659         * Shared/WebCompiledContentExtensionData.h:
660         * Shared/WebConnection.h:
661         * Shared/WebContextMenuItemData.cpp:
662         * Shared/WebContextMenuItemData.h:
663         * Shared/WebCoreArgumentCoders.cpp:
664         * Shared/WebCoreArgumentCoders.h:
665         * Shared/WebEvent.cpp:
666         * Shared/WebEvent.h:
667         * Shared/WebGeolocationPosition.cpp:
668         * Shared/WebGeolocationPosition.h:
669         * Shared/WebHitTestResultData.cpp:
670         * Shared/WebHitTestResultData.h:
671         * Shared/WebKeyboardEvent.cpp:
672         * Shared/WebMouseEvent.cpp:
673         * Shared/WebNavigationDataStore.h:
674         * Shared/WebPageCreationParameters.cpp:
675         * Shared/WebPageCreationParameters.h:
676         * Shared/WebPageGroupData.cpp:
677         * Shared/WebPageGroupData.h:
678         * Shared/WebPlatformTouchPoint.cpp:
679         * Shared/WebPopupItem.cpp:
680         * Shared/WebPopupItem.h:
681         * Shared/WebPreferencesStore.cpp:
682         * Shared/WebPreferencesStore.h:
683         * Shared/WebProcessCreationParameters.cpp:
684         * Shared/WebProcessCreationParameters.h:
685         * Shared/WebTouchEvent.cpp:
686         * Shared/WebUserContentControllerDataTypes.cpp:
687         * Shared/WebUserContentControllerDataTypes.h:
688         * Shared/WebWheelEvent.cpp:
689         * Shared/WebsiteData/WebsiteData.cpp:
690         * Shared/WebsiteData/WebsiteData.h:
691         * Shared/cf/ArgumentCodersCF.cpp:
692         * Shared/cf/ArgumentCodersCF.h:
693         * Shared/ios/InteractionInformationAtPosition.h:
694         * Shared/ios/InteractionInformationAtPosition.mm:
695         * Shared/ios/QuickLookDocumentData.cpp:
696         * Shared/ios/QuickLookDocumentData.h:
697         * Shared/ios/WebPlatformTouchPointIOS.cpp:
698         * Shared/ios/WebTouchEventIOS.cpp:
699         * Shared/mac/ArgumentCodersMac.h:
700         * Shared/mac/ArgumentCodersMac.mm:
701         * Shared/mac/AttributedString.h:
702         * Shared/mac/AttributedString.mm:
703         * Shared/mac/ColorSpaceData.h:
704         * Shared/mac/ColorSpaceData.mm:
705         * Shared/mac/ObjCObjectGraph.h:
706         * Shared/mac/ObjCObjectGraph.mm:
707         * Shared/mac/RemoteLayerBackingStore.h:
708         * Shared/mac/RemoteLayerBackingStore.mm:
709         * Shared/mac/RemoteLayerTreeTransaction.h:
710         * Shared/mac/RemoteLayerTreeTransaction.mm:
711         * Shared/mac/SandboxExtensionMac.mm:
712         * Shared/mac/SecItemRequestData.cpp:
713         * Shared/mac/SecItemRequestData.h:
714         * Shared/mac/SecItemResponseData.cpp:
715         * Shared/mac/SecItemResponseData.h:
716         * Shared/mac/SecItemShim.h:
717         * Shared/mac/WebCoreArgumentCodersMac.mm:
718         * Shared/mac/WebGestureEvent.cpp:
719         * Shared/mac/WebGestureEvent.h:
720         * Shared/mac/WebHitTestResultData.mm:
721         * UIProcess/API/APIHitTestResult.h:
722         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
723         * UIProcess/Automation/WebAutomationSession.h:
724         * UIProcess/ChildProcessProxy.cpp:
725         * UIProcess/ChildProcessProxy.h:
726         * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
727         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
728         * UIProcess/Databases/DatabaseProcessProxy.cpp:
729         * UIProcess/Databases/DatabaseProcessProxy.h:
730         * UIProcess/Downloads/DownloadProxy.h:
731         * UIProcess/DrawingAreaProxy.h:
732         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
733         * UIProcess/Network/NetworkProcessProxy.cpp:
734         * UIProcess/Network/NetworkProcessProxy.h:
735         * UIProcess/Plugins/PluginProcessProxy.h:
736         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
737         * UIProcess/Storage/StorageManager.h:
738         * UIProcess/UserContent/WebUserContentControllerProxy.h:
739         * UIProcess/VisitedLinkStore.h:
740         * UIProcess/WebCookieManagerProxy.h:
741         * UIProcess/WebFrameProxy.h:
742         * UIProcess/WebFullScreenManagerProxy.h:
743         * UIProcess/WebGeolocationManagerProxy.h:
744         * UIProcess/WebIconDatabase.h:
745         * UIProcess/WebInspectorProxy.h:
746         * UIProcess/WebPageProxy.h:
747         * UIProcess/WebPasteboardProxy.h:
748         * UIProcess/WebProcessPool.cpp:
749         * UIProcess/WebProcessPool.h:
750         * UIProcess/WebProcessProxy.cpp:
751         * UIProcess/WebProcessProxy.h:
752         * UIProcess/WebResourceLoadStatisticsStore.h:
753         * UIProcess/ios/SmartMagnificationController.h:
754         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
755         * UIProcess/mac/SecItemShimProxy.h:
756         * UIProcess/mac/ViewGestureController.h:
757         * WebKit2.xcodeproj/project.pbxproj:
758         * WebProcess/ApplePay/WebPaymentCoordinator.h:
759         * WebProcess/Automation/WebAutomationSessionProxy.h:
760         * WebProcess/Cookies/WebCookieManager.h:
761         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
762         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
763         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
764         * WebProcess/FullScreen/WebFullScreenManager.cpp:
765         * WebProcess/FullScreen/WebFullScreenManager.h:
766         * WebProcess/Geolocation/WebGeolocationManager.h:
767         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
768         * WebProcess/InjectedBundle/InjectedBundle.h:
769         * WebProcess/Network/NetworkProcessConnection.cpp:
770         * WebProcess/Network/NetworkProcessConnection.h:
771         * WebProcess/Network/WebResourceLoader.h:
772         * WebProcess/Notifications/WebNotificationManager.h:
773         * WebProcess/Plugins/Plugin.cpp:
774         * WebProcess/Plugins/Plugin.h:
775         * WebProcess/Plugins/PluginProcessConnection.cpp:
776         * WebProcess/Plugins/PluginProcessConnection.h:
777         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
778         * WebProcess/Plugins/PluginProcessConnectionManager.h:
779         * WebProcess/Plugins/PluginProxy.h:
780         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
781         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
782         * WebProcess/Storage/StorageAreaMap.h:
783         * WebProcess/UserContent/WebUserContentController.h:
784         * WebProcess/WebPage/DrawingArea.h:
785         * WebProcess/WebPage/EventDispatcher.h:
786         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
787         * WebProcess/WebPage/ViewUpdateDispatcher.h:
788         * WebProcess/WebPage/VisitedLinkTableController.h:
789         * WebProcess/WebPage/WebInspector.h:
790         * WebProcess/WebPage/WebInspectorUI.h:
791         * WebProcess/WebPage/WebPage.cpp:
792         * WebProcess/WebPage/WebPage.h:
793         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
794         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
795         * WebProcess/WebProcess.cpp:
796         * WebProcess/WebProcess.h:
797         * WebProcess/cocoa/WebPlaybackSessionManager.h:
798         * WebProcess/cocoa/WebVideoFullscreenManager.h:
799
800 2016-08-19  Anders Carlsson  <andersca@apple.com>
801
802         Update Xcode project.
803
804         * WebKit2.xcodeproj/project.pbxproj:
805
806 2016-08-19  Anders Carlsson  <andersca@apple.com>
807
808         Merge MessageEncoder and ArgumentEncoder into Encoder
809         https://bugs.webkit.org/show_bug.cgi?id=161016
810
811         Reviewed by Tim Horton.
812
813         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
814         (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage):
815         * DatabaseProcess/DatabaseToWebProcessConnection.h:
816         * NetworkProcess/Downloads/DownloadID.h:
817         (IPC::ArgumentCoder<WebKit::DownloadID>::encode):
818         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
819         (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
820         * NetworkProcess/NetworkConnectionToWebProcess.h:
821         * NetworkProcess/NetworkProcess.cpp:
822         (WebKit::NetworkProcess::didReceiveSyncMessage):
823         * NetworkProcess/NetworkProcess.h:
824         * NetworkProcess/NetworkProcessCreationParameters.cpp:
825         (WebKit::NetworkProcessCreationParameters::encode):
826         * NetworkProcess/NetworkProcessCreationParameters.h:
827         * NetworkProcess/NetworkResourceLoadParameters.cpp:
828         (WebKit::NetworkResourceLoadParameters::encode):
829         * NetworkProcess/NetworkResourceLoadParameters.h:
830         * Platform/IPC/ArgumentCoder.h:
831         (IPC::ArgumentCoder::encode):
832         * Platform/IPC/ArgumentCoders.cpp:
833         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode):
834         (IPC::ArgumentCoder<AtomicString>::encode):
835         (IPC::ArgumentCoder<CString>::encode):
836         (IPC::ArgumentCoder<String>::encode):
837         (IPC::ArgumentCoder<uuid_t>::encode):
838         * Platform/IPC/ArgumentCoders.h:
839         (IPC::SimpleArgumentCoder::encode):
840         (IPC::ArgumentCoder<OptionSet<T>>::encode):
841         (IPC::ArgumentCoder<WTF::Optional<T>>::encode):
842         * Platform/IPC/ArgumentEncoder.cpp:
843         (IPC::allocBuffer): Deleted.
844         (IPC::freeBuffer): Deleted.
845         (IPC::ArgumentEncoder::ArgumentEncoder): Deleted.
846         (IPC::ArgumentEncoder::~ArgumentEncoder): Deleted.
847         (IPC::roundUpToAlignment): Deleted.
848         (IPC::ArgumentEncoder::reserve): Deleted.
849         (IPC::ArgumentEncoder::grow): Deleted.
850         (IPC::ArgumentEncoder::encodeFixedLengthData): Deleted.
851         (IPC::ArgumentEncoder::encodeVariableLengthByteArray): Deleted.
852         (IPC::copyValueToBuffer): Deleted.
853         (IPC::ArgumentEncoder::encode): Deleted.
854         (IPC::ArgumentEncoder::addAttachment): Deleted.
855         (IPC::ArgumentEncoder::releaseAttachments): Deleted.
856         * Platform/IPC/ArgumentEncoder.h:
857         (IPC::ArgumentEncoder::encodeEnum): Deleted.
858         (IPC::ArgumentEncoder::encode): Deleted.
859         (IPC::ArgumentEncoder::operator<<): Deleted.
860         (IPC::ArgumentEncoder::buffer): Deleted.
861         (IPC::ArgumentEncoder::bufferSize): Deleted.
862         * Platform/IPC/Arguments.h:
863         (IPC::TupleCoder::encode):
864         (IPC::Arguments::encode):
865         * Platform/IPC/Attachment.cpp:
866         (IPC::Attachment::encode):
867         * Platform/IPC/Attachment.h:
868         * Platform/IPC/Connection.cpp:
869         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
870         (IPC::Connection::createSyncMessageEncoder):
871         (IPC::Connection::sendMessage):
872         (IPC::Connection::sendSyncReply):
873         (IPC::Connection::sendSyncMessage):
874         (IPC::Connection::sendSyncMessageFromSecondaryThread):
875         (IPC::Connection::sendOutgoingMessages):
876         (IPC::Connection::dispatchSyncMessage):
877         * Platform/IPC/Connection.h:
878         (IPC::Connection::send):
879         (IPC::Connection::sendSync):
880         * Platform/IPC/DataReference.cpp:
881         (IPC::DataReference::encode):
882         (IPC::SharedBufferDataReference::encode):
883         * Platform/IPC/DataReference.h:
884         * Platform/IPC/Encoder.cpp: Renamed from Source/WebKit2/Platform/IPC/ArgumentEncoder.cpp.
885         (IPC::allocBuffer):
886         (IPC::freeBuffer):
887         (IPC::Encoder::Encoder):
888         (IPC::Encoder::~Encoder):
889         (IPC::Encoder::isSyncMessage):
890         (IPC::Encoder::shouldDispatchMessageWhenWaitingForSyncReply):
891         (IPC::Encoder::setIsSyncMessage):
892         (IPC::Encoder::setShouldDispatchMessageWhenWaitingForSyncReply):
893         (IPC::Encoder::setFullySynchronousModeForTesting):
894         (IPC::Encoder::wrapForTesting):
895         (IPC::roundUpToAlignment):
896         (IPC::Encoder::reserve):
897         (IPC::Encoder::encodeHeader):
898         (IPC::Encoder::grow):
899         (IPC::Encoder::encodeFixedLengthData):
900         (IPC::Encoder::encodeVariableLengthByteArray):
901         (IPC::copyValueToBuffer):
902         (IPC::Encoder::encode):
903         (IPC::Encoder::addAttachment):
904         (IPC::Encoder::releaseAttachments):
905         * Platform/IPC/Encoder.h: Renamed from Source/WebKit2/Platform/IPC/ArgumentEncoder.h.
906         * Platform/IPC/HandleMessage.h:
907         (IPC::handleMessage):
908         (IPC::handleMessageDelayed):
909         * Platform/IPC/MessageEncoder.cpp: Removed.
910         (IPC::MessageEncoder::MessageEncoder): Deleted.
911         (IPC::MessageEncoder::~MessageEncoder): Deleted.
912         (IPC::MessageEncoder::encodeHeader): Deleted.
913         (IPC::MessageEncoder::isSyncMessage): Deleted.
914         (IPC::MessageEncoder::shouldDispatchMessageWhenWaitingForSyncReply): Deleted.
915         (IPC::MessageEncoder::setIsSyncMessage): Deleted.
916         (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply): Deleted.
917         (IPC::MessageEncoder::setFullySynchronousModeForTesting): Deleted.
918         (IPC::MessageEncoder::wrapForTesting): Deleted.
919         * Platform/IPC/MessageEncoder.h: Removed.
920         (IPC::MessageEncoder::messageReceiverName): Deleted.
921         (IPC::MessageEncoder::messageName): Deleted.
922         (IPC::MessageEncoder::destinationID): Deleted.
923         (IPC::MessageEncoder::UUID): Deleted.
924         * Platform/IPC/MessageReceiver.h:
925         (IPC::MessageReceiver::didReceiveSyncMessage):
926         * Platform/IPC/MessageReceiverMap.cpp:
927         (IPC::MessageReceiverMap::dispatchSyncMessage):
928         * Platform/IPC/MessageReceiverMap.h:
929         * Platform/IPC/MessageRecorder.h:
930         * Platform/IPC/MessageSender.cpp:
931         (IPC::MessageSender::sendMessage):
932         * Platform/IPC/MessageSender.h:
933         (IPC::MessageSender::send):
934         * Platform/IPC/StringReference.cpp:
935         (IPC::StringReference::encode):
936         * Platform/IPC/StringReference.h:
937         * Platform/IPC/mac/ConnectionMac.mm:
938         (IPC::Connection::open):
939         (IPC::Connection::sendOutgoingMessage):
940         * Platform/IPC/mac/MachPort.h:
941         (IPC::MachPort::encode):
942         * Platform/SharedMemory.h:
943         * Platform/mac/SharedMemoryMac.cpp:
944         (WebKit::SharedMemory::Handle::encode):
945         * PluginProcess/PluginControllerProxy.h:
946         * PluginProcess/PluginCreationParameters.cpp:
947         (WebKit::PluginCreationParameters::encode):
948         * PluginProcess/PluginCreationParameters.h:
949         * PluginProcess/WebProcessConnection.cpp:
950         (WebKit::WebProcessConnection::didReceiveSyncMessage):
951         * PluginProcess/WebProcessConnection.h:
952         * Scripts/webkit/messages.py:
953         (message_to_struct_declaration):
954         (forward_declarations_and_headers):
955         (generate_message_handler):
956         (headers_for_type): Deleted.
957         * Shared/API/APIData.cpp:
958         (API::Data::encode):
959         * Shared/API/APIData.h:
960         * Shared/API/APIError.cpp:
961         (API::Error::encode):
962         * Shared/API/APIError.h:
963         * Shared/API/APIFrameHandle.cpp:
964         (API::FrameHandle::encode):
965         * Shared/API/APIFrameHandle.h:
966         * Shared/API/APIGeometry.cpp:
967         (API::Point::encode):
968         (API::Size::encode):
969         (API::Rect::encode):
970         * Shared/API/APIGeometry.h:
971         * Shared/API/APINumber.h:
972         (API::Number::encode):
973         * Shared/API/APIPageGroupHandle.cpp:
974         (API::PageGroupHandle::encode):
975         * Shared/API/APIPageGroupHandle.h:
976         * Shared/API/APIPageHandle.cpp:
977         (API::PageHandle::encode):
978         * Shared/API/APIPageHandle.h:
979         * Shared/API/APIURL.h:
980         (API::URL::encode):
981         * Shared/API/APIURLRequest.cpp:
982         (API::URLRequest::encode):
983         * Shared/API/APIURLRequest.h:
984         * Shared/API/APIURLResponse.cpp:
985         (API::URLResponse::encode):
986         * Shared/API/APIURLResponse.h:
987         * Shared/API/Cocoa/RemoteObjectInvocation.h:
988         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
989         (WebKit::RemoteObjectInvocation::encode):
990         * Shared/AssistedNodeInformation.cpp:
991         (WebKit::OptionItem::encode):
992         (WebKit::AssistedNodeInformation::encode):
993         * Shared/AssistedNodeInformation.h:
994         * Shared/Cocoa/DataDetectionResult.h:
995         * Shared/Cocoa/DataDetectionResult.mm:
996         (WebKit::DataDetectionResult::encode):
997         * Shared/Cocoa/LoadParametersCocoa.mm:
998         (WebKit::LoadParameters::platformEncode):
999         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
1000         (IPC::ArgumentCoder<WebCore::Payment>::encode):
1001         (IPC::ArgumentCoder<WebCore::PaymentContact>::encode):
1002         (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode):
1003         (IPC::ArgumentCoder<WebCore::PaymentMethod>::encode):
1004         (IPC::ArgumentCoder<PaymentRequest>::encode):
1005         (IPC::ArgumentCoder<PaymentRequest::ContactFields>::encode):
1006         (IPC::ArgumentCoder<PaymentRequest::LineItem>::encode):
1007         (IPC::ArgumentCoder<PaymentRequest::MerchantCapabilities>::encode):
1008         (IPC::ArgumentCoder<PaymentRequest::ShippingMethod>::encode):
1009         (IPC::ArgumentCoder<PaymentRequest::TotalAndLineItems>::encode):
1010         * Shared/ContextMenuContextData.cpp:
1011         (WebKit::ContextMenuContextData::encode):
1012         * Shared/ContextMenuContextData.h:
1013         * Shared/Databases/DatabaseProcessCreationParameters.cpp:
1014         (WebKit::DatabaseProcessCreationParameters::encode):
1015         * Shared/Databases/DatabaseProcessCreationParameters.h:
1016         * Shared/Databases/IndexedDB/WebIDBResult.cpp:
1017         (WebKit::WebIDBResult::encode):
1018         * Shared/Databases/IndexedDB/WebIDBResult.h:
1019         * Shared/EditorState.cpp:
1020         (WebKit::EditorState::encode):
1021         (WebKit::EditorState::PostLayoutData::encode):
1022         * Shared/EditorState.h:
1023         * Shared/FontInfo.cpp:
1024         (WebKit::FontInfo::encode):
1025         * Shared/FontInfo.h:
1026         * Shared/Gamepad/GamepadData.cpp:
1027         (WebKit::GamepadData::encode):
1028         * Shared/Gamepad/GamepadData.h:
1029         * Shared/LayerTreeContext.cpp:
1030         (WebKit::LayerTreeContext::encode):
1031         * Shared/LayerTreeContext.h:
1032         * Shared/LoadParameters.cpp:
1033         (WebKit::LoadParameters::encode):
1034         (WebKit::LoadParameters::platformEncode):
1035         * Shared/LoadParameters.h:
1036         * Shared/NavigationActionData.cpp:
1037         (WebKit::NavigationActionData::encode):
1038         * Shared/NavigationActionData.h:
1039         * Shared/PlatformPopupMenuData.cpp:
1040         (WebKit::PlatformPopupMenuData::encode):
1041         * Shared/PlatformPopupMenuData.h:
1042         * Shared/Plugins/NPIdentifierData.cpp:
1043         (WebKit::NPIdentifierData::encode):
1044         * Shared/Plugins/NPIdentifierData.h:
1045         * Shared/Plugins/NPObjectMessageReceiver.h:
1046         * Shared/Plugins/NPRemoteObjectMap.cpp:
1047         (WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
1048         * Shared/Plugins/NPRemoteObjectMap.h:
1049         * Shared/Plugins/NPVariantData.cpp:
1050         (WebKit::NPVariantData::encode):
1051         * Shared/Plugins/NPVariantData.h:
1052         * Shared/Plugins/PluginProcessCreationParameters.cpp:
1053         (WebKit::PluginProcessCreationParameters::encode):
1054         * Shared/Plugins/PluginProcessCreationParameters.h:
1055         * Shared/PrintInfo.cpp:
1056         (WebKit::PrintInfo::encode):
1057         * Shared/PrintInfo.h:
1058         * Shared/SandboxExtension.h:
1059         (WebKit::SandboxExtension::Handle::encode):
1060         (WebKit::SandboxExtension::HandleArray::encode):
1061         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1062         (ArgumentCoder<ScrollingStateNode>::encode):
1063         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
1064         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
1065         (ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode):
1066         (ArgumentCoder<ScrollingStateFixedNode>::encode):
1067         (ArgumentCoder<ScrollingStateStickyNode>::encode):
1068         (WebKit::encodeNodeAndDescendants):
1069         (WebKit::RemoteScrollingCoordinatorTransaction::encode):
1070         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
1071         * Shared/SessionState.cpp:
1072         (WebKit::HTTPBody::Element::encode):
1073         (WebKit::HTTPBody::encode):
1074         (WebKit::FrameState::encode):
1075         (WebKit::PageState::encode):
1076         (WebKit::BackForwardListItemState::encode):
1077         (WebKit::BackForwardListState::encode):
1078         * Shared/SessionState.h:
1079         * Shared/ShareableBitmap.cpp:
1080         (WebKit::ShareableBitmap::Handle::encode):
1081         * Shared/ShareableBitmap.h:
1082         * Shared/ShareableResource.cpp:
1083         (WebKit::ShareableResource::Handle::encode):
1084         * Shared/ShareableResource.h:
1085         * Shared/StatisticsData.cpp:
1086         (WebKit::StatisticsData::encode):
1087         * Shared/StatisticsData.h:
1088         * Shared/UpdateInfo.cpp:
1089         (WebKit::UpdateInfo::encode):
1090         * Shared/UpdateInfo.h:
1091         * Shared/UserData.cpp:
1092         (WebKit::UserData::encode):
1093         * Shared/UserData.h:
1094         * Shared/VisibleContentRectUpdateInfo.cpp:
1095         (WebKit::VisibleContentRectUpdateInfo::encode):
1096         * Shared/VisibleContentRectUpdateInfo.h:
1097         * Shared/WebBackForwardListItem.h:
1098         * Shared/WebCompiledContentExtensionData.cpp:
1099         (WebKit::WebCompiledContentExtensionData::encode):
1100         * Shared/WebCompiledContentExtensionData.h:
1101         * Shared/WebContextMenuItemData.cpp:
1102         (WebKit::WebContextMenuItemData::encode):
1103         * Shared/WebContextMenuItemData.h:
1104         * Shared/WebCoreArgumentCoders.cpp:
1105         (IPC::ArgumentCoder<AffineTransform>::encode):
1106         (IPC::ArgumentCoder<EventTrackingRegions>::encode):
1107         (IPC::ArgumentCoder<TransformationMatrix>::encode):
1108         (IPC::ArgumentCoder<LinearTimingFunction>::encode):
1109         (IPC::ArgumentCoder<CubicBezierTimingFunction>::encode):
1110         (IPC::ArgumentCoder<StepsTimingFunction>::encode):
1111         (IPC::ArgumentCoder<SpringTimingFunction>::encode):
1112         (IPC::ArgumentCoder<FloatPoint>::encode):
1113         (IPC::ArgumentCoder<FloatPoint3D>::encode):
1114         (IPC::ArgumentCoder<FloatRect>::encode):
1115         (IPC::ArgumentCoder<FloatSize>::encode):
1116         (IPC::ArgumentCoder<FloatRoundedRect>::encode):
1117         (IPC::ArgumentCoder<FloatQuad>::encode):
1118         (IPC::ArgumentCoder<ViewportArguments>::encode):
1119         (IPC::ArgumentCoder<IntPoint>::encode):
1120         (IPC::ArgumentCoder<IntRect>::encode):
1121         (IPC::ArgumentCoder<IntSize>::encode):
1122         (IPC::pathEncodeApplierFunction):
1123         (IPC::ArgumentCoder<Path>::encode):
1124         (IPC::ArgumentCoder<RecentSearch>::encode):
1125         (IPC::ArgumentCoder<Region::Span>::encode):
1126         (IPC::ArgumentCoder<Region>::encode):
1127         (IPC::ArgumentCoder<Length>::encode):
1128         (IPC::ArgumentCoder<ViewportAttributes>::encode):
1129         (IPC::ArgumentCoder<MimeClassInfo>::encode):
1130         (IPC::ArgumentCoder<PluginInfo>::encode):
1131         (IPC::ArgumentCoder<AuthenticationChallenge>::encode):
1132         (IPC::ArgumentCoder<ProtectionSpace>::encode):
1133         (IPC::ArgumentCoder<Credential>::encode):
1134         (IPC::encodeImage):
1135         (IPC::encodeOptionalImage):
1136         (IPC::ArgumentCoder<Cursor>::encode):
1137         (IPC::ArgumentCoder<ResourceRequest>::encode):
1138         (IPC::ArgumentCoder<ResourceError>::encode):
1139         (IPC::ArgumentCoder<SelectionRect>::encode):
1140         (IPC::ArgumentCoder<WindowFeatures>::encode):
1141         (IPC::ArgumentCoder<Color>::encode):
1142         (IPC::ArgumentCoder<CompositionUnderline>::encode):
1143         (IPC::ArgumentCoder<Cookie>::encode):
1144         (IPC::ArgumentCoder<DatabaseDetails>::encode):
1145         (IPC::ArgumentCoder<Highlight>::encode):
1146         (IPC::encodeSharedBuffer):
1147         (IPC::ArgumentCoder<PasteboardWebContent>::encode):
1148         (IPC::ArgumentCoder<PasteboardImage>::encode):
1149         (IPC::ArgumentCoder<DictationAlternative>::encode):
1150         (IPC::ArgumentCoder<FileChooserSettings>::encode):
1151         (IPC::ArgumentCoder<GrammarDetail>::encode):
1152         (IPC::ArgumentCoder<TextCheckingRequestData>::encode):
1153         (IPC::ArgumentCoder<TextCheckingResult>::encode):
1154         (IPC::ArgumentCoder<URL>::encode):
1155         (IPC::ArgumentCoder<UserStyleSheet>::encode):
1156         (IPC::ArgumentCoder<MediaSessionMetadata>::encode):
1157         (IPC::ArgumentCoder<UserScript>::encode):
1158         (IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
1159         (IPC::ArgumentCoder<FixedPositionViewportConstraints>::encode):
1160         (IPC::ArgumentCoder<StickyPositionViewportConstraints>::encode):
1161         (IPC::ArgumentCoder<FilterOperation>::encode):
1162         (IPC::ArgumentCoder<FilterOperations>::encode):
1163         (IPC::ArgumentCoder<SessionID>::encode):
1164         (IPC::ArgumentCoder<BlobPart>::encode):
1165         (IPC::ArgumentCoder<TextIndicatorData>::encode):
1166         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode):
1167         (IPC::ArgumentCoder<DictionaryPopupInfo>::encode):
1168         (IPC::ArgumentCoder<ExceptionDetails>::encode):
1169         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
1170         * Shared/WebCoreArgumentCoders.h:
1171         * Shared/WebEvent.cpp:
1172         (WebKit::WebEvent::encode):
1173         * Shared/WebEvent.h:
1174         * Shared/WebGeolocationPosition.cpp:
1175         (WebKit::WebGeolocationPosition::Data::encode):
1176         * Shared/WebGeolocationPosition.h:
1177         * Shared/WebHitTestResultData.cpp:
1178         (WebKit::WebHitTestResultData::encode):
1179         (WebKit::WebHitTestResultData::platformEncode):
1180         * Shared/WebHitTestResultData.h:
1181         * Shared/WebKeyboardEvent.cpp:
1182         (WebKit::WebKeyboardEvent::encode):
1183         * Shared/WebMouseEvent.cpp:
1184         (WebKit::WebMouseEvent::encode):
1185         * Shared/WebNavigationDataStore.h:
1186         (WebKit::WebNavigationDataStore::encode):
1187         * Shared/WebPageCreationParameters.cpp:
1188         (WebKit::WebPageCreationParameters::encode):
1189         * Shared/WebPageCreationParameters.h:
1190         * Shared/WebPageGroupData.cpp:
1191         (WebKit::WebPageGroupData::encode):
1192         * Shared/WebPageGroupData.h:
1193         * Shared/WebPlatformTouchPoint.cpp:
1194         (WebKit::WebPlatformTouchPoint::encode):
1195         * Shared/WebPopupItem.cpp:
1196         (WebKit::WebPopupItem::encode):
1197         * Shared/WebPopupItem.h:
1198         * Shared/WebPreferencesStore.cpp:
1199         (WebKit::WebPreferencesStore::Value::encode):
1200         (WebKit::WebPreferencesStore::encode):
1201         * Shared/WebPreferencesStore.h:
1202         * Shared/WebProcessCreationParameters.cpp:
1203         (WebKit::WebProcessCreationParameters::encode):
1204         * Shared/WebProcessCreationParameters.h:
1205         * Shared/WebTouchEvent.cpp:
1206         (WebKit::WebTouchEvent::encode):
1207         * Shared/WebUserContentControllerDataTypes.cpp:
1208         (WebKit::WebUserScriptData::encode):
1209         (WebKit::WebUserStyleSheetData::encode):
1210         (WebKit::WebScriptMessageHandlerData::encode):
1211         * Shared/WebUserContentControllerDataTypes.h:
1212         * Shared/WebWheelEvent.cpp:
1213         (WebKit::WebWheelEvent::encode):
1214         * Shared/WebsiteData/WebsiteData.cpp:
1215         (WebKit::WebsiteData::Entry::encode):
1216         (WebKit::WebsiteData::encode):
1217         * Shared/WebsiteData/WebsiteData.h:
1218         * Shared/cf/ArgumentCodersCF.cpp:
1219         (IPC::encode):
1220         * Shared/cf/ArgumentCodersCF.h:
1221         * Shared/ios/InteractionInformationAtPosition.h:
1222         * Shared/ios/InteractionInformationAtPosition.mm:
1223         (WebKit::InteractionInformationAtPosition::encode):
1224         * Shared/ios/QuickLookDocumentData.cpp:
1225         (WebKit::QuickLookDocumentData::encode):
1226         * Shared/ios/QuickLookDocumentData.h:
1227         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1228         (WebKit::WebPlatformTouchPoint::encode):
1229         * Shared/ios/WebTouchEventIOS.cpp:
1230         (WebKit::WebTouchEvent::encode):
1231         * Shared/mac/ArgumentCodersMac.h:
1232         * Shared/mac/ArgumentCodersMac.mm:
1233         (IPC::encode):
1234         * Shared/mac/AttributedString.h:
1235         * Shared/mac/AttributedString.mm:
1236         (WebKit::AttributedString::encode):
1237         * Shared/mac/ColorSpaceData.h:
1238         * Shared/mac/ColorSpaceData.mm:
1239         (WebKit::ColorSpaceData::encode):
1240         * Shared/mac/ObjCObjectGraph.h:
1241         * Shared/mac/ObjCObjectGraph.mm:
1242         (WebKit::ObjCObjectGraph::encode):
1243         * Shared/mac/RemoteLayerBackingStore.h:
1244         * Shared/mac/RemoteLayerBackingStore.mm:
1245         (WebKit::RemoteLayerBackingStore::encode):
1246         * Shared/mac/RemoteLayerTreeTransaction.h:
1247         * Shared/mac/RemoteLayerTreeTransaction.mm:
1248         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode):
1249         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1250         (WebKit::RemoteLayerTreeTransaction::encode):
1251         * Shared/mac/SandboxExtensionMac.mm:
1252         (WebKit::SandboxExtension::Handle::encode):
1253         (WebKit::SandboxExtension::HandleArray::encode):
1254         * Shared/mac/SecItemRequestData.cpp:
1255         (WebKit::SecItemRequestData::encode):
1256         * Shared/mac/SecItemRequestData.h:
1257         * Shared/mac/SecItemResponseData.cpp:
1258         (WebKit::SecItemResponseData::encode):
1259         * Shared/mac/SecItemResponseData.h:
1260         * Shared/mac/WebCoreArgumentCodersMac.mm:
1261         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
1262         (IPC::ArgumentCoder<CertificateInfo>::encode):
1263         (IPC::encodeNSError):
1264         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
1265         (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
1266         (IPC::ArgumentCoder<Credential>::encodePlatformData):
1267         (IPC::ArgumentCoder<MachSendRight>::encode):
1268         (IPC::ArgumentCoder<KeypressCommand>::encode):
1269         (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
1270         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData):
1271         * Shared/mac/WebGestureEvent.cpp:
1272         (WebKit::WebGestureEvent::encode):
1273         * Shared/mac/WebGestureEvent.h:
1274         * Shared/mac/WebHitTestResultData.mm:
1275         (WebKit::WebHitTestResultData::platformEncode):
1276         * UIProcess/API/APIHitTestResult.h:
1277         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
1278         * UIProcess/ChildProcessProxy.cpp:
1279         (WebKit::ChildProcessProxy::sendMessage):
1280         (WebKit::ChildProcessProxy::dispatchSyncMessage):
1281         (WebKit::ChildProcessProxy::didFinishLaunching):
1282         * UIProcess/ChildProcessProxy.h:
1283         (WebKit::ChildProcessProxy::send):
1284         * UIProcess/Downloads/DownloadProxy.h:
1285         * UIProcess/Network/NetworkProcessProxy.cpp:
1286         (WebKit::NetworkProcessProxy::didReceiveSyncMessage):
1287         * UIProcess/Network/NetworkProcessProxy.h:
1288         * UIProcess/Notifications/WebNotification.cpp:
1289         * UIProcess/Notifications/WebNotification.h:
1290         * UIProcess/Plugins/PluginProcessManager.h:
1291         * UIProcess/Plugins/PluginProcessProxy.h:
1292         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1293         * UIProcess/Storage/StorageManager.h:
1294         * UIProcess/WebFullScreenManagerProxy.h:
1295         * UIProcess/WebIconDatabase.h:
1296         * UIProcess/WebPageProxy.cpp:
1297         (WebKit::WebPageProxy::sendMessage):
1298         * UIProcess/WebPageProxy.h:
1299         * UIProcess/WebPasteboardProxy.h:
1300         * UIProcess/WebProcessPool.cpp:
1301         (WebKit::WebProcessPool::dispatchSyncMessage):
1302         * UIProcess/WebProcessPool.h:
1303         * UIProcess/WebProcessProxy.cpp:
1304         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1305         * UIProcess/WebProcessProxy.h:
1306         * WebKit2.xcodeproj/project.pbxproj:
1307         * WebProcess/Network/NetworkProcessConnection.cpp:
1308         (WebKit::NetworkProcessConnection::didReceiveSyncMessage):
1309         * WebProcess/Network/NetworkProcessConnection.h:
1310         * WebProcess/Plugins/Plugin.cpp:
1311         (WebKit::Plugin::Parameters::encode):
1312         * WebProcess/Plugins/Plugin.h:
1313         * WebProcess/Plugins/PluginProcessConnection.cpp:
1314         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
1315         * WebProcess/Plugins/PluginProcessConnection.h:
1316         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1317         * WebProcess/Plugins/PluginProxy.h:
1318         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
1319         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
1320         * WebProcess/WebPage/DrawingArea.h:
1321         * WebProcess/WebPage/WebPage.cpp:
1322         (WebKit::WebPage::didReceiveSyncMessage):
1323         * WebProcess/WebPage/WebPage.h:
1324         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1325         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1326         (WebKit::PlatformCAAnimationRemote::KeyframeValue::encode):
1327         (WebKit::PlatformCAAnimationRemote::Properties::encode):
1328         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1329         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1330         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1331         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
1332         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
1333         * WebProcess/WebProcess.cpp:
1334         (WebKit::WebProcess::didReceiveSyncMessage):
1335         * WebProcess/WebProcess.h:
1336
1337 2016-08-16  Simon Fraser  <simon.fraser@apple.com>
1338
1339         Rename didLayout(LayoutMilestones) to didReachLayoutMilestone(), and related WK2 functions
1340         https://bugs.webkit.org/show_bug.cgi?id=160923
1341
1342         Reviewed by Tim Horton.
1343
1344         didLayout(LayoutMilestones) -> didReachLayoutMilestone(LayoutMilestones)
1345         dispatchDidLayout(LayoutMilestones) -> dispatchDidReachLayoutMilestone(LayoutMilestones)
1346
1347         Avoided changing functions that are exposed as API/SPI.
1348
1349         * UIProcess/API/APILoaderClient.h:
1350         (API::LoaderClient::didReachLayoutMilestone):
1351         (API::LoaderClient::didLayout): Deleted.
1352         * UIProcess/API/C/WKPage.cpp:
1353         (WKPageSetPageLoaderClient):
1354         * UIProcess/WebPageProxy.cpp:
1355         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
1356         (WebKit::WebPageProxy::didReachLayoutMilestone):
1357         (WebKit::WebPageProxy::didLayout): Deleted.
1358         * UIProcess/WebPageProxy.h:
1359         * UIProcess/WebPageProxy.messages.in:
1360         * UIProcess/ios/WebPageProxyIOS.mm:
1361         (WebKit::WebPageProxy::didCommitLayerTree):
1362         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1363         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1364         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1365         (didReachLayoutMilestone):
1366         (setUpPageLoaderClient):
1367         (didLayout): Deleted.
1368         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1369         (WebKit::InjectedBundlePageLoaderClient::didReachLayoutMilestone):
1370         (WebKit::InjectedBundlePageLoaderClient::didLayout): Deleted.
1371         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1372         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1373         (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
1374         (WebKit::WebFrameLoaderClient::dispatchDidLayout): Deleted.
1375         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1376         * WebProcess/WebPage/DrawingArea.h:
1377         (WebKit::DrawingArea::dispatchDidReachLayoutMilestone):
1378         (WebKit::DrawingArea::dispatchDidLayout): Deleted.
1379         * WebProcess/WebPage/WebPage.cpp:
1380         (WebKit::WebPage::dispatchDidReachLayoutMilestone):
1381         (WebKit::WebPage::dispatchDidLayout): Deleted.
1382         * WebProcess/WebPage/WebPage.h:
1383         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1384         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1385         (WebKit::RemoteLayerTreeDrawingArea::dispatchDidReachLayoutMilestone):
1386         (WebKit::RemoteLayerTreeDrawingArea::dispatchDidLayout): Deleted.
1387
1388 2016-08-18  Daniel Bates  <dabates@apple.com>
1389
1390         Ld warns of non-existent PrivateFrameworks directory when building WebKit with the public iOS 9.3 SDK
1391         https://bugs.webkit.org/show_bug.cgi?id=160979
1392
1393         Rubber-stamped by Simon Fraser.
1394
1395         Only add the SDK PrivateFrameworks directory to the FRAMEWORK_SEARCH_PATH when building for
1396         iOS Simulator, building with an iOS SDK that does not support text-based stubs, or building
1397         an Apple-internal build.
1398
1399         * Configurations/BaseTarget.xcconfig:
1400
1401 2016-08-18  Hunseop Jeong  <hs85.jeong@samsung.com>
1402
1403         Unreviewed, Fix CMake build after r204614
1404
1405         * PlatformMac.cmake:
1406
1407 2016-08-18  Chris Dumez  <cdumez@apple.com>
1408
1409         [iOS] Network Processes & Database processes do not exit promptly
1410         https://bugs.webkit.org/show_bug.cgi?id=160978
1411         <rdar://problem/27914081>
1412
1413         Reviewed by Anders Carlsson.
1414
1415         Network Processes & Database processes do not exit promptly. They hang
1416         for 10 seconds until they log the following message:
1417         > com.apple.WebKit.Networking: (WebKit) #WK: Exiting process early due to unacknowledged closed-connection
1418
1419         Then forcefully call exit(0).
1420
1421         To address the issue, we now call ChildProcess::stopRunLoop() instead
1422         of RunLoop::current().stop(). stopRunLoop() works as expected on iOS
1423         after r202723.
1424
1425         There is no impact on Mac because stopRunLoop() calls
1426         RunLoop::current().stop().
1427
1428         * DatabaseProcess/DatabaseProcess.cpp:
1429         (WebKit::DatabaseProcess::didClose):
1430         (WebKit::DatabaseProcess::didReceiveInvalidMessage):
1431         * NetworkProcess/NetworkProcess.cpp:
1432         (WebKit::NetworkProcess::didClose):
1433         (WebKit::NetworkProcess::didReceiveInvalidMessage):
1434
1435 2016-08-18  Dan Bernstein  <mitz@apple.com>
1436
1437         [Cocoa] API::Number needs to be wrapped by an NSNumber
1438         https://bugs.webkit.org/show_bug.cgi?id=160977
1439         <rdar://problem/27877735>
1440
1441         Reviewed by Anders Carlsson.
1442
1443         We introduce a single WKNSNumber class to wrap three distinct API::Number instantiations
1444         corresponding to the Boolean, UInt64 and Double types.
1445
1446         Test: TestWebKitAPI/Tests/WebKit2Cocoa/WKNSNumber.mm
1447
1448         * Shared/Cocoa/APIObject.mm:
1449         (API::Object::newObject): Create a WKNSNumber to contain any of the number types, and set
1450           its _type ivar accordingly.
1451         * Shared/Cocoa/WKNSNumber.h: Added.
1452         (WebKit::wrapper):
1453         * Shared/Cocoa/WKNSNumber.mm: Added.
1454         (-[WKNSNumber dealloc]): Call the appropriate destructor.
1455         (-[WKNSNumber objCType]): Implement this NSValue primitive method.
1456         (-[WKNSNumber getValue:]): Ditto.
1457         (-[WKNSNumber boolValue]): Implement this NSNumber method corresponding to one of our
1458           possible types.
1459         (-[WKNSNumber doubleValue]): Ditto.
1460         (-[WKNSNumber unsignedLongLongValue]): Ditto.
1461         (-[WKNSNumber copyWithZone:]): Implement this NSCopying method by retaining self.
1462         (-[WKNSNumber _apiObject]): Implement this WKObject method by returning the appropriate
1463           API object.
1464
1465         * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
1466
1467 2016-08-18  Andy Estes  <aestes@apple.com>
1468
1469         [Cocoa] Add SPI to WKProcessPool for enabling cookie storage partitioning
1470         https://bugs.webkit.org/show_bug.cgi?id=160964
1471
1472         Reviewed by Anders Carlsson.
1473
1474         Followed the guidelines for SPI naming.
1475
1476         * UIProcess/API/Cocoa/WKProcessPool.mm:
1477         (-[WKProcessPool _isCookieStoragePartitioningEnabled]): Renamed from -cookieStoragePartitioningEnabled.
1478         (-[WKProcessPool _setCookieStoragePartitioningEnabled:]): Renamed from -setCookieStoragePartitioningEnabled:.
1479         (-[WKProcessPool cookieStoragePartitioningEnabled]): Renamed to -_isCookieStoragePartitioningEnabled.
1480         (-[WKProcessPool setCookieStoragePartitioningEnabled:]): Renamed to -_setCookieStoragePartitioningEnabled:.
1481         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1482
1483 2016-08-18  Andy Estes  <aestes@apple.com>
1484
1485         Generated messages headers should use #pragma once
1486         https://bugs.webkit.org/show_bug.cgi?id=160965
1487
1488         Reviewed by Anders Carlsson.
1489
1490         * Scripts/webkit/messages.py:
1491         (generate_messages_header): Used #pragma once instead of a header guard.
1492
1493 2016-08-18  Andy Estes  <aestes@apple.com>
1494
1495         [Cocoa] Add SPI to WKProcessPool for enabling cookie storage partitioning
1496         https://bugs.webkit.org/show_bug.cgi?id=160964
1497
1498         Reviewed by Brent Fulgham.
1499
1500         * NetworkProcess/NetworkProcess.h: Declared setCookieStoragePartitioningEnabled().
1501         * NetworkProcess/NetworkProcess.messages.in: Added message SetCookieStoragePartitioningEnabled.
1502         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1503         (WebKit::NetworkProcessCreationParameters::encode): Encoded cookieStoragePartitioningEnabled.
1504         (WebKit::NetworkProcessCreationParameters::decode): Decoded cookieStoragePartitioningEnabled.
1505         * NetworkProcess/NetworkProcessCreationParameters.h: Declared cookieStoragePartitioningEnabled.
1506         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1507         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1508         Called NetworkStorageSession::setCookieStoragePartitioningEnabled() given the cookieStoragePartitioningEnabled parameter.
1509         (WebKit::NetworkProcess::setCookieStoragePartitioningEnabled):
1510         Called NetworkStorageSession::setCookieStoragePartitioningEnabled().
1511         * UIProcess/API/Cocoa/WKProcessPool.mm:
1512         (-[WKProcessPool cookieStoragePartitioningEnabled]): Returned WebProcessPool::cookieStoragePartitioningEnabled().
1513         (-[WKProcessPool setCookieStoragePartitioningEnabled:]): Called WebProcessPool::setCookieStoragePartitioningEnabled().
1514         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Declared cookieStoragePartitioningEnabled as a property.
1515         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1516         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1517         Set the cookieStoragePartitioningEnabled parameter from m_cookieStoragePartitioningEnabled.
1518         (WebKit::WebProcessPool::setCookieStoragePartitioningEnabled):
1519         Set m_cookieStoragePartitioningEnabled and sent the NetworkProcess::SetCookieStoragePartitioningEnabled message.
1520         * UIProcess/WebProcessPool.h: Declared cookieStoragePartitioningEnabled.
1521
1522 2016-08-17  Anders Carlsson  <andersca@apple.com>
1523
1524         Add support for additional networks
1525         https://bugs.webkit.org/show_bug.cgi?id=160951
1526         rdar://problem/27807479
1527
1528         Reviewed by Sam Weinig.
1529
1530         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
1531         (IPC::ArgumentCoder<PaymentRequest>::decode):
1532         (IPC::ArgumentCoder<PaymentRequest::SupportedNetworks>::encode): Deleted.
1533         (IPC::ArgumentCoder<PaymentRequest::SupportedNetworks>::decode): Deleted.
1534         * Shared/WebCoreArgumentCoders.h:
1535         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1536         (WebKit::toAdditionalSupportedNetwork):
1537         (WebKit::toSupportedNetwork):
1538         (WebKit::toSupportedNetworks):
1539         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
1540         (WebKit::WebPaymentCoordinator::supportsVersion):
1541
1542 2016-08-17  Anders Carlsson  <andersca@apple.com>
1543
1544         Remove a couple of unused WKSI function pointers
1545         https://bugs.webkit.org/show_bug.cgi?id=160946
1546
1547         Reviewed by Dan Bernstein.
1548
1549         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1550         (InitWebCoreSystemInterface): Deleted.
1551
1552 2016-08-17  Dan Bernstein  <mitz@apple.com>
1553
1554         [Cocoa] -[NSString isEqualToString:] returns NO for any WKNSString argument
1555         https://bugs.webkit.org/show_bug.cgi?id=160938
1556         <rdar://problem/27876652>
1557
1558         Reviewed by Anders Carlsson.
1559
1560         -[NSString isEqualToString:] calls an internal NSObject method on its argument, which
1561         NSString subclasses override to return YES, but WKObject does not override and does not
1562         forward to its target NSString.
1563
1564         To fix this issue and other similar issues, we make WKObject a root class instead of an
1565         NSObject subclass.
1566
1567         Test: TestWebKitAPI/Tests/WebKit2Cocoa/WKObject.mm
1568
1569         * Platform/spi/Cocoa/objcSPI.h: Added.
1570
1571         * Shared/Cocoa/WKObject.h: Make WKObject a root class instead of inhereting from NSObject.
1572
1573         * Shared/Cocoa/WKObject.mm:
1574         (+[WKObject class]): Return self.
1575         (-[WKObject allowsWeakReference]): Added. Called by the Objective-C runtime.
1576         (-[WKObject retainWeakReference]): Ditto.
1577         (-[WKObject hash]): If we don’t have a target, return our address.
1578         (-[WKObject superclass]): Implement this NSObject protocol method.
1579         (-[WKObject class]): Ditto.
1580         (-[WKObject self]): Ditto.
1581         (-[WKObject performSelector:]): Ditto.
1582         (-[WKObject performSelector:withObject:]): Ditto.
1583         (-[WKObject performSelector:withObject:withObject:]): Ditto.
1584         (-[WKObject isProxy]): Ditto.
1585         (-[WKObject respondsToSelector:]): Changed to not call super.
1586         (-[WKObject conformsToProtocol:]): Ditto.
1587         (-[WKObject description]): Ditto.
1588         (-[WKObject retain]): Implement this NSObject protocol method.
1589         (-[WKObject release]): Ditto.
1590         (-[WKObject autorelease]): Ditto.
1591         (-[WKObject retainCount]): Ditto.
1592         (-[WKObject zone]): Ditto.
1593         (-[WKObject dealloc]): Deleted.
1594         (-[WKObject classForCoder]): Deleted.
1595         (-[WKObject classForKeyedArchiver]): Deleted.
1596         (-[WKObject _cfTypeID]): Deleted.
1597
1598         * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
1599
1600 2016-08-17  Hunseop Jeong  <hs85.jeong@samsung.com>
1601
1602         [EFL] Fix test_ewk2_view after r203612 
1603         https://bugs.webkit.org/show_bug.cgi?id=160937
1604
1605         Reviewed by Gyuyoung Kim.
1606
1607         Default parameter values for window.alert() / prompt() / confirm() was
1608         changed from "undefined" to the empty string after r203612.
1609
1610         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1611         (TEST_F):
1612
1613 2016-08-16  Simon Fraser  <simon.fraser@apple.com>
1614
1615         [iOS WK2] Don't throw touchMove events on the floor
1616         https://bugs.webkit.org/show_bug.cgi?id=160935
1617
1618         Reviewed by Tim Horton.
1619         
1620         EventDispatcher claimed to coalesce touchMove events, but actually threw away any
1621         touchMove if there was one in the queue when the next non-move event came along.
1622         
1623         Fix to strictly coalesce touchMove events, so a start/move/end stream always fires
1624         a move event. This is necessary for move-based interaction to work in testing,
1625         for example the added range slider test.
1626         
1627         Test: fast/forms/ios/drag-range-thumb.html
1628
1629         * WebProcess/WebPage/EventDispatcher.cpp:
1630         (WebKit::EventDispatcher::touchEvent):
1631
1632 2016-08-16  Simon Fraser  <simon.fraser@apple.com>
1633
1634         [iOS WK2] Clean up form select code
1635         https://bugs.webkit.org/show_bug.cgi?id=160915
1636
1637         Reviewed by Enrica Casucci.
1638         
1639         Some minor forms-related cleanup:
1640         1. Give WKFormSelectPopover and WKFormSelectPicker their own header files, making
1641         things easier to find.
1642         
1643         2. Remove WKContentView *_view member variables from classes which also stored
1644         the view in their base classes.
1645         
1646         Sort the project file.
1647
1648         * UIProcess/ios/forms/WKFormPopover.h:
1649         * UIProcess/ios/forms/WKFormPopover.mm:
1650         (-[WKFormRotatingAccessoryPopover accessoryDone]):
1651         (-[WKFormRotatingAccessoryPopover initWithView:]): Deleted.
1652         * UIProcess/ios/forms/WKFormSelectControl.h:
1653         * UIProcess/ios/forms/WKFormSelectControl.mm:
1654         * UIProcess/ios/forms/WKFormSelectPicker.h: Copied from Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h.
1655         * UIProcess/ios/forms/WKFormSelectPicker.mm:
1656         * UIProcess/ios/forms/WKFormSelectPopover.h: Copied from Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h.
1657         * UIProcess/ios/forms/WKFormSelectPopover.mm:
1658         (-[WKSelectPopover initWithView:hasGroups:]):
1659         * WebKit2.xcodeproj/project.pbxproj:
1660
1661 2016-08-16  Daniel Bates  <dabates@apple.com>
1662
1663         WKSI static library should be named by major iOS revision, not individual updates
1664         https://bugs.webkit.org/show_bug.cgi?id=160727
1665         <rdar://problem/22274848>
1666
1667         Reviewed by Alexey Proskuryakov.
1668
1669         * Configurations/Base.xcconfig:
1670         * Configurations/BaseTarget.xcconfig:
1671         * Configurations/DebugRelease.xcconfig:
1672
1673 2016-08-16  Simon Fraser  <simon.fraser@apple.com>
1674
1675         Make it possible to test iOS select elements, and add iPhone and iPad tests for them
1676         https://bugs.webkit.org/show_bug.cgi?id=160909
1677
1678         Reviewed by Enrica Casucci.
1679         
1680         Hook up form-related UIScriptController functions, and plumb through the various
1681         <select> pickers the ability to select a row.
1682
1683         * UIProcess/API/Cocoa/WKWebView.mm:
1684         (-[WKWebView dismissFormAccessoryView]):
1685         (-[WKWebView selectFormAccessoryPickerRow:]):
1686         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1687         * UIProcess/ios/WKContentViewInteraction.h:
1688         * UIProcess/ios/WKContentViewInteraction.mm:
1689         (-[WKContentView selectFormAccessoryPickerRow:]):
1690         * UIProcess/ios/forms/WKFormSelectControl.h:
1691         * UIProcess/ios/forms/WKFormSelectControl.mm:
1692         (-[WKFormSelectControl selectRow:inComponent:extendingSelection:]):
1693         * UIProcess/ios/forms/WKFormSelectPicker.mm:
1694         (-[WKMultipleSelectPicker selectRow:inComponent:extendingSelection:]):
1695         (-[WKSelectSinglePicker selectRow:inComponent:extendingSelection:]):
1696         * UIProcess/ios/forms/WKFormSelectPopover.mm:
1697         (-[WKSelectPopover selectRow:inComponent:extendingSelection:]):
1698
1699 2016-08-16  Brady Eidson  <beidson@apple.com>
1700
1701         Cleanup WK2 platform gamepad handling.
1702         https://bugs.webkit.org/show_bug.cgi?id=160871
1703
1704         Reviewed by Alex Christensen.
1705
1706         This patch does a few things:
1707         1 - Separates the concepts of "monitoring gamepads" and "monitoring gamepad inputs"
1708         2 - Uses this new concept to much more cleanly handle the case where we are not currently
1709             monitoring gamepad inputs because an interested WKWebView is not front and center.
1710         3 - Pre-populates the "initial set of gamepads" in WebProcesses that start listening for gamepads.
1711         
1712         * Platform/Logging.h:
1713         
1714         * UIProcess/Gamepad/UIGamepadProvider.cpp:
1715         (WebKit::UIGamepadProvider::gamepadSyncTimerFired):
1716         (WebKit::UIGamepadProvider::setInitialConnectedGamepads):
1717         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
1718         (WebKit::UIGamepadProvider::viewBecameActive):
1719         (WebKit::UIGamepadProvider::viewBecameInactive):
1720         (WebKit::UIGamepadProvider::stopMonitoringGamepads):
1721         (WebKit::UIGamepadProvider::snapshotGamepads):
1722         (WebKit::UIGamepadProvider::platformStopMonitoringInput):
1723         (WebKit::UIGamepadProvider::platformStartMonitoringInput):
1724         (WebKit::UIGamepadProvider::UIGamepadProvider): Deleted.
1725         (WebKit::UIGamepadProvider::scheduleDisableGamepadMonitoring): Deleted.
1726         (WebKit::UIGamepadProvider::disableMonitoringTimerFired): Deleted.
1727         * UIProcess/Gamepad/UIGamepadProvider.h:
1728         
1729         * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
1730         (WebKit::UIGamepadProvider::platformStopMonitoringInput):
1731         (WebKit::UIGamepadProvider::platformStartMonitoringInput):
1732         
1733         * UIProcess/WebProcessPool.cpp:
1734         (WebKit::WebProcessPool::setInitialConnectedGamepads):
1735         * UIProcess/WebProcessPool.h:
1736         
1737         * WebProcess/Gamepad/WebGamepadProvider.cpp:
1738         (WebKit::WebGamepadProvider::setInitialGamepads):
1739         * WebProcess/Gamepad/WebGamepadProvider.h:
1740         
1741         * WebProcess/WebProcess.cpp:
1742         (WebKit::WebProcess::setInitialGamepads):
1743         * WebProcess/WebProcess.h:
1744         * WebProcess/WebProcess.messages.in:
1745
1746 2016-08-15  Simon Fraser  <simon.fraser@apple.com>
1747
1748         [iOS] Add iPad viewport and form tests, and revert the iPad-testing part of r202132
1749         https://bugs.webkit.org/show_bug.cgi?id=160878
1750
1751         Reviewed by Tim Horton.
1752
1753         Remove testing-specific "forceIPadStyleZoomOnInputFocus" behavior added in r202132
1754         now that we have the ability to run tests in the iPad simulator.
1755
1756         * UIProcess/API/Cocoa/WKWebView.mm:
1757         (-[WKWebView forceIPadStyleZoomOnInputFocus]): Deleted.
1758         (-[WKWebView setForceIPadStyleZoomOnInputFocus:]): Deleted.
1759         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1760         * UIProcess/ios/WKContentViewInteraction.h:
1761         * UIProcess/ios/WKContentViewInteraction.mm:
1762         (-[WKContentView _displayFormNodeInputView]):
1763         (-[WKContentView requiresAccessoryView]):
1764         (-[WKContentView inputAccessoryView]):
1765         (-[WKContentView requiresAccessoryView:]): Deleted.
1766         (-[WKContentView forceIPadStyleZoomOnInputFocus]): Deleted.
1767         (-[WKContentView setForceIPadStyleZoomOnInputFocus:]): Deleted.
1768
1769 2016-08-16  Alex Christensen  <achristensen@webkit.org>
1770
1771         Clean up WebSockets
1772         https://bugs.webkit.org/show_bug.cgi?id=160889
1773
1774         Reviewed by Darin Adler.
1775
1776         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
1777         (WebKit::WebSocketServerConnection::didCloseSocketStream):
1778         (WebKit::WebSocketServerConnection::didReceiveSocketStreamData):
1779         * UIProcess/InspectorServer/WebSocketServerConnection.h:
1780
1781 2016-08-16  Chris Dumez  <cdumez@apple.com>
1782
1783         Unreviewed, rolling out r204506.
1784
1785         Broke the build
1786
1787         Reverted changeset:
1788
1789         "Cleanup WK2 platform gamepad handling."
1790         https://bugs.webkit.org/show_bug.cgi?id=160871
1791         http://trac.webkit.org/changeset/204506
1792
1793 2016-08-16  Darin Adler  <darin@apple.com>
1794
1795         [Cocoa] Remove dependency on Objective-C bindings in WebKit2 editing code
1796         https://bugs.webkit.org/show_bug.cgi?id=160891
1797
1798         Reviewed by Anders Carlsson.
1799
1800         * WebProcess/WebCoreSupport/WebEditorClient.h: Removed documentFragmentFromAttributedString.
1801         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
1802         (WebKit::WebEditorClient::documentFragmentFromAttributedString): Deleted.
1803         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1804         (WebKit::createExcludedElementsForAttributedStringConversion): Deleted.
1805         (WebKit::WebEditorClient::documentFragmentFromAttributedString): Deleted.
1806
1807 2016-08-16  Brady Eidson  <beidson@apple.com>
1808
1809         Cleanup WK2 platform gamepad handling.
1810         https://bugs.webkit.org/show_bug.cgi?id=160871
1811
1812         Reviewed by Alex Christensen.
1813
1814         This patch does a few things:
1815         1 - Separates the concepts of "monitoring gamepads" and "monitoring gamepad inputs"
1816         2 - Uses this new concept to much more cleanly handle the case where we are not currently
1817             monitoring gamepad inputs because an interested WKWebView is not front and center.
1818         3 - Pre-populates the "initial set of gamepads" in WebProcesses that start listening for gamepads.
1819         
1820         * Platform/Logging.h:
1821         
1822         * UIProcess/Gamepad/UIGamepadProvider.cpp:
1823         (WebKit::UIGamepadProvider::gamepadSyncTimerFired):
1824         (WebKit::UIGamepadProvider::setInitialConnectedGamepads):
1825         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
1826         (WebKit::UIGamepadProvider::viewBecameActive):
1827         (WebKit::UIGamepadProvider::viewBecameInactive):
1828         (WebKit::UIGamepadProvider::stopMonitoringGamepads):
1829         (WebKit::UIGamepadProvider::snapshotGamepads):
1830         (WebKit::UIGamepadProvider::platformStopMonitoringInput):
1831         (WebKit::UIGamepadProvider::platformStartMonitoringInput):
1832         (WebKit::UIGamepadProvider::UIGamepadProvider): Deleted.
1833         (WebKit::UIGamepadProvider::scheduleDisableGamepadMonitoring): Deleted.
1834         (WebKit::UIGamepadProvider::disableMonitoringTimerFired): Deleted.
1835         * UIProcess/Gamepad/UIGamepadProvider.h:
1836         
1837         * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
1838         (WebKit::UIGamepadProvider::platformStopMonitoringInput):
1839         (WebKit::UIGamepadProvider::platformStartMonitoringInput):
1840         
1841         * UIProcess/WebProcessPool.cpp:
1842         (WebKit::WebProcessPool::setInitialConnectedGamepads):
1843         * UIProcess/WebProcessPool.h:
1844         
1845         * WebProcess/Gamepad/WebGamepadProvider.cpp:
1846         (WebKit::WebGamepadProvider::setInitialGamepads):
1847         * WebProcess/Gamepad/WebGamepadProvider.h:
1848         
1849         * WebProcess/WebProcess.cpp:
1850         (WebKit::WebProcess::setInitialGamepads):
1851         * WebProcess/WebProcess.h:
1852         * WebProcess/WebProcess.messages.in:
1853
1854 2016-08-15  Alex Christensen  <achristensen@webkit.org>
1855
1856         Rename SocketStreamHandleBase to SocketStreamHandle and SocketStreamHandle to SocketStreamHandleImpl
1857         https://bugs.webkit.org/show_bug.cgi?id=160858
1858
1859         Reviewed by Brady Eidson.
1860
1861         * WebProcess/Network/WebSocketProvider.cpp:
1862         (WebKit::WebSocketProvider::createSocketStreamHandle):
1863
1864 2016-08-15  Anders Carlsson  <andersca@apple.com>
1865
1866         Fix iOS build.
1867
1868         * WebProcess/WebPage/ios/WebPageIOS.mm:
1869         (WebKit::WebPage::webGLPolicyForURL):
1870         (WebKit::WebPage::resolveWebGLPolicyForURL):
1871
1872 2016-08-15  Keith Rollin  <krollin@apple.com>
1873
1874         Rename LOG_ALWAYS
1875         https://bugs.webkit.org/show_bug.cgi?id=160768
1876
1877         Rename LOG_ALWAYS and friends, given that the first parameter to it is
1878         a boolean expression that determines whether or not logging should be
1879         performed.
1880
1881         Reviewed by Chris Dumez.
1882
1883         * NetworkProcess/Downloads/Download.cpp:
1884         (WebKit::Download::didReceiveResponse):
1885         (WebKit::Download::didReceiveData):
1886         (WebKit::Download::didFinish):
1887         (WebKit::Download::didFail):
1888         (WebKit::Download::didCancel):
1889         * NetworkProcess/NetworkProcess.cpp:
1890         (WebKit::NetworkProcess::prepareToSuspend):
1891         (WebKit::NetworkProcess::cancelPrepareToSuspend):
1892         (WebKit::NetworkProcess::processDidResume):
1893         * NetworkProcess/NetworkResourceLoader.cpp:
1894         (WebKit::NetworkResourceLoader::startNetworkLoad):
1895         (WebKit::NetworkResourceLoader::didFinishLoading):
1896         (WebKit::NetworkResourceLoader::didFailLoading):
1897         (WebKit::NetworkResourceLoader::continueWillSendRequest):
1898         * Platform/IPC/Connection.cpp:
1899         (IPC::Connection::waitForSyncReply):
1900         * Shared/ChildProcess.cpp:
1901         (WebKit::didCloseOnConnectionWorkQueue):
1902         * UIProcess/Cocoa/NavigationState.mm:
1903         (WebKit::NavigationState::didChangeIsLoading):
1904         * UIProcess/Network/NetworkProcessProxy.cpp:
1905         (WebKit::NetworkProcessProxy::fetchWebsiteData):
1906         (WebKit::NetworkProcessProxy::deleteWebsiteData):
1907         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
1908         (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
1909         * UIProcess/ProcessThrottler.cpp:
1910         (WebKit::ProcessThrottler::updateAssertionNow):
1911         (WebKit::ProcessThrottler::updateAssertion):
1912         * UIProcess/WebPageProxy.cpp:
1913         (WebKit::WebPageProxy::updateActivityToken):
1914         * UIProcess/WebProcessProxy.cpp:
1915         (WebKit::WebProcessProxy::fetchWebsiteData):
1916         (WebKit::WebProcessProxy::deleteWebsiteData):
1917         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
1918         (WebKit::WebProcessProxy::didSetAssertionState):
1919         (WebKit::WebProcessProxy::setIsHoldingLockedFiles):
1920         * UIProcess/ios/ProcessAssertionIOS.mm:
1921         (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
1922         (WebKit::ProcessAssertion::ProcessAssertion):
1923         * WebProcess/Network/WebLoaderStrategy.cpp:
1924         (WebKit::WebLoaderStrategy::scheduleLoad):
1925         * WebProcess/Network/WebResourceLoader.cpp:
1926         (WebKit::WebResourceLoader::willSendRequest):
1927         (WebKit::WebResourceLoader::didReceiveResponse):
1928         (WebKit::WebResourceLoader::didReceiveData):
1929         (WebKit::WebResourceLoader::didFinishResourceLoad):
1930         (WebKit::WebResourceLoader::didFailResourceLoad):
1931         (WebKit::WebResourceLoader::didReceiveResource):
1932         * WebProcess/WebPage/WebPage.cpp:
1933         (WebKit::WebPage::layerVolatilityTimerFired):
1934         (WebKit::WebPage::markLayersVolatile):
1935         (WebKit::WebPage::cancelMarkLayersVolatile):
1936         * WebProcess/WebProcess.cpp:
1937         (WebKit::WebProcess::actualPrepareToSuspend):
1938         (WebKit::WebProcess::processWillSuspendImminently):
1939         (WebKit::WebProcess::prepareToSuspend):
1940         (WebKit::WebProcess::cancelPrepareToSuspend):
1941         (WebKit::WebProcess::markAllLayersVolatile):
1942         (WebKit::WebProcess::processDidResume):
1943
1944 2016-08-15  Daniel Bates  <dabates@apple.com>
1945
1946         Cannot build WebKit for iOS device using Xcode 7.3/iOS 9.3 public SDK due to missing
1947         private frameworks and libraries
1948         https://bugs.webkit.org/show_bug.cgi?id=155931
1949         <rdar://problem/25807989>
1950
1951         Reviewed by Dan Bernstein.
1952
1953         Add directory WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/X to the framework search path
1954         where X is the major version of the active iOS SDK.
1955
1956         * Configurations/BaseTarget.xcconfig:
1957
1958 2016-08-15  Simon Fraser  <simon.fraser@apple.com>
1959
1960         Add a setting and preferences to enable visual viewport mode
1961         https://bugs.webkit.org/show_bug.cgi?id=160843
1962
1963         Reviewed by Sam Weinig.
1964         
1965         Hook up the visualViewportEnabled setting for WebKit2.
1966
1967         * Shared/WebPreferencesDefinitions.h:
1968         * UIProcess/API/Cocoa/WKPreferences.mm:
1969         (-[WKPreferences _visualViewportEnabled]):
1970         (-[WKPreferences _setVisualViewportEnabled:]):
1971         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1972         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1973         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1974         * WebProcess/WebPage/WebPage.cpp:
1975         (WebKit::WebPage::updatePreferences):
1976
1977 2016-08-15  Joseph Pecoraro  <pecoraro@apple.com>
1978
1979         Remove unused includes of wtf headers
1980         https://bugs.webkit.org/show_bug.cgi?id=160839
1981
1982         Reviewed by Alex Christensen.
1983
1984         * Lots of files.
1985
1986 2016-08-12  Anders Carlsson  <andersca@apple.com>
1987
1988         Move the plug-in and WebGL blacklist code to WebCore
1989         https://bugs.webkit.org/show_bug.cgi?id=160831
1990
1991         Reviewed by Sam Weinig.
1992
1993         Adopt the plug-in and WebGL blacklist code from WebCore instead of using the code from WebKitSystemInterface.
1994
1995         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
1996         (WebKit::getPlatformPluginModuleInformation):
1997         * Shared/Plugins/PluginModuleInfo.h:
1998         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
1999         (WKContextIsPlugInUpdateAvailable):
2000         (WKContextShouldBlockWebGL):
2001         (WKContextShouldSuggestBlockWebGL):
2002         * UIProcess/Plugins/PluginInfoStore.h:
2003         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2004         (WebKit::shouldBlockPlugin):
2005         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
2006         (WebKit::WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy): Deleted.
2007         * UIProcess/WebPageProxy.cpp:
2008         (WebKit::WebPageProxy::findPlugin):
2009
2010 2016-08-10  Brent Fulgham  <bfulgham@apple.com>
2011
2012         Add Sandbox profile for Enterprise support version of Flash Player
2013         https://bugs.webkit.org/show_bug.cgi?id=160753
2014         <rdar://problem/17614483>
2015
2016         Reviewed by Andy Estes.
2017
2018         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player ESR.plugin.sb: Added.
2019         * WebKit2.xcodeproj/project.pbxproj: Add reference to new sandbox profile.
2020
2021 2016-08-14  Dan Bernstein  <mitz@apple.com>
2022
2023         [Cocoa] Remove deprecated _WKFormDelegate
2024         https://bugs.webkit.org/show_bug.cgi?id=160848
2025
2026         Reviewed by Anders Carlsson.
2027
2028         * Shared/API/Cocoa/WebKitPrivate.h: Removed #import.
2029         * UIProcess/API/Cocoa/WKWebView.mm:
2030         (-[WKWebView _formDelegate]): Moved into WKBinaryCompatibilityIOS10 cateogry implementation,
2031           chaged type to id <_WKInputDelegate>.
2032         (-[WKWebView _setFormDelegate:]): Ditto.
2033         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Removed property declaration.
2034         * UIProcess/API/Cocoa/_WKFormDelegate.h: Removed.
2035         * WebKit2.xcodeproj/project.pbxproj: Removed reference to header.
2036         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Fixed comment.
2037
2038 2016-08-14  Daniel Bates  <dabates@apple.com>
2039
2040         Fix compiler errors when building iOS WebKit using the iOS 10 beta SDK
2041         https://bugs.webkit.org/show_bug.cgi?id=160725
2042
2043         Reviewed by Sam Weinig.
2044
2045         * Platform/spi/ios/UIKitSPI.h: Add SPI for UITextInputSuggestionDelegate.
2046         * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm: Remove unnecessary include of PKPaymentMerchantSession.h.
2047
2048 2016-08-14  Dan Bernstein  <mitz@apple.com>
2049
2050         [Cocoa] Remove deprecated _WKVisitedLinkProvider declarations that aren’t needed
2051         https://bugs.webkit.org/show_bug.cgi?id=160846
2052
2053         Reviewed by Darin Adler.
2054
2055         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2056         (-[WKWebViewConfiguration _visitedLinkProvider]): Moved into WKBinaryCompatibilityIOS10
2057           cateogry implementation, changed type to _WKVisitedLinkStore.
2058         (-[WKWebViewConfiguration _setVisitedLinkProvider:]): Ditto.
2059         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Removed property declaration.
2060
2061         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h: Removed.
2062         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Moved declaration in here.
2063
2064         * WebKit2.xcodeproj/project.pbxproj: Updated for header removal.
2065
2066 2016-08-12  Dan Bernstein  <mitz@apple.com>
2067
2068         [Cocoa] Instances of WKObject subclasses don’t work correctly with CFGetTypeID()
2069         https://bugs.webkit.org/show_bug.cgi?id=160820
2070         <rdar://problem/27825875>
2071
2072         Reviewed by Anders Carlsson.
2073
2074         * Shared/Cocoa/WKObject.mm:
2075         (-[WKObject _cfTypeID]): Override this internal method and forward to the target object.
2076
2077 2016-08-12  Johan K. Jensen  <johan_jensen@apple.com>
2078
2079         Rename DocumentLoadTiming and ResourceLoadTiming
2080         https://bugs.webkit.org/show_bug.cgi?id=160821
2081
2082         Reviewed by Alex Christensen.
2083
2084         Rename ResourceLoadTiming to NetworkLoadTiming.
2085
2086         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2087         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
2088
2089 2016-08-12  Anders Carlsson  <andersca@apple.com>
2090
2091         message loading never finishes in Mail
2092         https://bugs.webkit.org/show_bug.cgi?id=160806
2093         rdar://problem/27624095
2094
2095         Reviewed by Dan Bernstein.
2096
2097         Add more checks for when a process goes away before we've established a proper connection to it.
2098
2099         * Platform/IPC/mac/ConnectionMac.mm:
2100         (IPC::Connection::receiveSourceEventHandler):
2101         Handle the MACH_NOTIFY_NO_SENDERS and MACH_NOTIFY_SEND_ONCE messages here. Also, once we receive a send
2102         right from the other side, stop listening for the MACH_NOTIFY_NO_SENDERS notification.
2103
2104         * UIProcess/ChildProcessProxy.cpp:
2105         (WebKit::ChildProcessProxy::didFinishLaunching):
2106         Null check the connection identifier.
2107
2108         * UIProcess/Launcher/ProcessLauncher.cpp:
2109         (WebKit::ProcessLauncher::ProcessLauncher):
2110         (WebKit::processLauncherWorkQueue): Deleted.
2111         Get rid of the process launcher queue - we're not doing any blocking work here.
2112
2113         * UIProcess/Launcher/ProcessLauncher.h:
2114         Add a weak factory.
2115
2116         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2117         (WebKit::systemDirectoryPath):
2118         Move this before launchProcess().
2119
2120         (WebKit::ProcessLauncher::launchProcess):
2121         Merge createService and connectToService into launchProcess. Also make the following changes:
2122         - Use mach_port_request_notification to get a notification for when our receive right loses all its senders.
2123         This lets us listen for the other process going away before we have a send right for it.
2124         - Use xpc_connection_set_event_handler to listen for errors, so we can detect the process going away before
2125         we've sent a message to it.
2126         
2127         (WebKit::connectToService): Deleted.
2128         (WebKit::createService): Deleted.
2129
2130         * UIProcess/Network/NetworkProcessProxy.cpp:
2131         (WebKit::NetworkProcessProxy::didFinishLaunching):
2132         If we failed to launch, call networkProcessCrashedOrFailedToLaunch so we'll unblock any waiting web processes.
2133
2134         * UIProcess/WebProcessProxy.cpp:
2135         (WebKit::WebProcessProxy::didFinishLaunching):
2136         Null check the connection and XPC connection before trying to get its pid.
2137
2138 2016-08-11  Brady Eidson  <beidson@apple.com>
2139
2140         [WK2] Don't monitor gamepads at all unless an interested WebPageProxy is in the active window.
2141         https://bugs.webkit.org/show_bug.cgi?id=160760
2142
2143         Reviewed by Tim Horton.
2144         
2145         This patch makes it such that the UIProcess will only listen to the platform gamepad mechanism
2146         if a WebPageProxy that is interested in gamepads is in the active window.
2147
2148         * UIProcess/Cocoa/WebViewImpl.mm:
2149         (WebKit::WebViewImpl::windowDidBecomeKey):
2150         (WebKit::WebViewImpl::windowDidResignKey):
2151
2152         * UIProcess/Gamepad/UIGamepadProvider.cpp:
2153         (WebKit::UIGamepadProvider::UIGamepadProvider):
2154         (WebKit::UIGamepadProvider::gamepadSyncTimerFired):
2155         (WebKit::UIGamepadProvider::scheduleGamepadStateSync):
2156         (WebKit::UIGamepadProvider::platformGamepadConnected):
2157         (WebKit::UIGamepadProvider::platformGamepadDisconnected):
2158         (WebKit::UIGamepadProvider::platformGamepadInputActivity):
2159         (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
2160         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
2161         (WebKit::UIGamepadProvider::viewBecameActive):
2162         (WebKit::UIGamepadProvider::viewBecameInactive):
2163         (WebKit::UIGamepadProvider::scheduleDisableGamepadMonitoring):
2164         (WebKit::UIGamepadProvider::disableMonitoringTimerFired):
2165         (WebKit::UIGamepadProvider::startMonitoringGamepads):
2166         (WebKit::UIGamepadProvider::stopMonitoringGamepads):
2167         (WebKit::UIGamepadProvider::updateTimerFired): Deleted.
2168         (WebKit::UIGamepadProvider::startOrStopSynchingGamepadState): Deleted.
2169         * UIProcess/Gamepad/UIGamepadProvider.h:
2170
2171 2016-08-11  Brady Eidson  <beidson@apple.com>
2172
2173         Make Gamepads be a WK2 ExperimentalFeature.
2174         https://bugs.webkit.org/show_bug.cgi?id=160788
2175
2176         Reviewed by Alex Christensen.
2177
2178         * Shared/WebPreferencesDefinitions.h:
2179
2180 2016-08-11  Alex Christensen  <achristensen@webkit.org>
2181
2182         Don't use a NetworkingContext when creating SocketStreamHandles
2183         https://bugs.webkit.org/show_bug.cgi?id=160732
2184
2185         Reviewed by Brady Eidson.
2186
2187         * WebProcess/Network/WebSocketProvider.cpp:
2188         (WebKit::WebSocketProvider::createSocketStreamHandle):
2189         * WebProcess/Network/WebSocketProvider.h:
2190
2191 2016-08-11  Alex Christensen  <achristensen@webkit.org>
2192
2193         Use StringBuilder::appendLiteral when possible don't append result of makeString
2194         https://bugs.webkit.org/show_bug.cgi?id=160772
2195
2196         Reviewed by Sam Weinig.
2197
2198         * Shared/Gamepad/GamepadData.cpp:
2199         (WebKit::GamepadData::isNull):
2200         (WebKit::GamepadData::loggingString):
2201         * Shared/Gamepad/GamepadData.h:
2202         * UIProcess/WebProcessPool.h:
2203
2204 2016-08-10  Alex Christensen  <achristensen@webkit.org>
2205
2206         Fix crash when changing cookie accept policy after r204327
2207         https://bugs.webkit.org/show_bug.cgi?id=160758
2208
2209         Reviewed by Simon Fraser.
2210
2211         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2212         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
2213
2214 2016-08-10  Simon Fraser  <simon.fraser@apple.com>
2215
2216         Sort the feature flags in the FEATURE_DEFINES lines
2217         https://bugs.webkit.org/show_bug.cgi?id=160742
2218
2219         Reviewed by Anders Carlsson.
2220
2221         * Configurations/FeatureDefines.xcconfig:
2222
2223 2016-08-09  Alex Christensen  <achristensen@webkit.org>
2224
2225         Move NetworkStorageSession management to WebCore
2226         https://bugs.webkit.org/show_bug.cgi?id=160173
2227
2228         Reviewed by Brady Eidson.
2229
2230         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2231         (WebKit::storageSession):
2232         * NetworkProcess/NetworkProcess.cpp:
2233         (WebKit::NetworkProcess::fetchWebsiteData):
2234         (WebKit::NetworkProcess::deleteWebsiteData):
2235         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2236         * NetworkProcess/NetworkSession.h:
2237         (WebKit::NetworkSession::sessionID):
2238         NetworkSessions no longer own NetworkStorageSessions, but they should still have the same lifetime.
2239         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2240         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
2241         (WebKit::NetworkSession::setSourceApplicationAuditTokenData):
2242         (WebKit::NetworkSession::create):
2243         (WebKit::NetworkSession::defaultSession):
2244         (WebKit::NetworkSession::NetworkSession):
2245         (WebKit::NetworkSession::networkStorageSession):
2246         (WebKit::NetworkSession::clearCredentials):
2247         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2248         (WebKit::RemoteNetworkingContext::storageSession):
2249         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
2250         * Shared/SessionTracker.cpp:
2251         (WebKit::SessionTracker::networkSession):
2252         (WebKit::SessionTracker::setSession):
2253         (WebKit::SessionTracker::destroySession):
2254         (WebKit::SessionTracker::storageSession): Deleted.
2255         (WebKit::staticStorageSessionMap): Deleted.
2256         (WebKit::SessionTracker::sessionID): Deleted.
2257         (WebKit::SessionTracker::forEachNetworkStorageSession): Deleted.
2258         * Shared/SessionTracker.h:
2259         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2260         (WebKit::WebPlatformStrategies::cookiesForDOM):
2261         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
2262         (WebKit::WebPlatformStrategies::cookiesEnabled):
2263         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
2264         (WebKit::WebPlatformStrategies::getRawCookies):
2265         (WebKit::WebPlatformStrategies::deleteCookie):
2266         (WebKit::WebPlatformStrategies::addCookie):
2267         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2268         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2269         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
2270         (WebKit::WebFrameNetworkingContext::storageSession):
2271         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2272         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2273         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
2274         * WebProcess/WebPage/mac/WebPageMac.mm:
2275         * WebProcess/WebProcess.cpp:
2276
2277 2016-08-09  Anders Carlsson  <andersca@apple.com>
2278
2279         Fix iOS build.
2280
2281         * UIProcess/WebProcessPool.cpp:
2282         (WebKit::WebProcessPool::setPluginLoadClientPolicy): Deleted.
2283         (WebKit::WebProcessPool::clearPluginClientPolicies): Deleted.
2284
2285 2016-08-09  Anders Carlsson  <andersca@apple.com>
2286
2287         Instantiate WebKit plug-ins at layout time, instead of at style resolution time
2288         https://bugs.webkit.org/show_bug.cgi?id=160715
2289
2290         Reviewed by Tim Horton.
2291
2292         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2293         (WebKit::WebFrameLoaderClient::objectContentType):
2294
2295 2016-08-09  Brady Eidson  <beidson@apple.com>
2296
2297         [WK2] Only send gamepad input events to the currently focused page.
2298         https://bugs.webkit.org/show_bug.cgi?id=160699
2299
2300         Reviewed by Tim Horton.
2301         
2302         * UIProcess/Gamepad/UIGamepadProvider.cpp:
2303         (WebKit::UIGamepadProvider::updateTimerFired):
2304         (WebKit::UIGamepadProvider::platformWebProcessProxyForGamepadInput):
2305         * UIProcess/Gamepad/UIGamepadProvider.h:
2306         * UIProcess/Gamepad/mac/UIGamepadProviderMac.mm: Copied from Source/WebKit2/UIProcess/API/mac/WKViewInternal.h.
2307         (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
2308         
2309         * UIProcess/WebPageProxy.cpp:
2310         (WebKit::WebPageProxy::gamepadActivity):
2311         * UIProcess/WebPageProxy.h:
2312         
2313         * UIProcess/WebProcessPool.cpp:
2314         (WebKit::WebProcessPool::gamepadActivity): Deleted.
2315         * UIProcess/WebProcessPool.h:
2316         
2317         * WebKit2.xcodeproj/project.pbxproj:
2318         
2319         * WebProcess/WebPage/WebPage.cpp:
2320         (WebKit::WebPage::gamepadActivity):
2321         * WebProcess/WebPage/WebPage.h:
2322         * WebProcess/WebPage/WebPage.messages.in:
2323         
2324         * WebProcess/WebProcess.cpp:
2325         (WebKit::WebProcess::gamepadActivity): Deleted.
2326         * WebProcess/WebProcess.h:
2327         * WebProcess/WebProcess.messages.in:
2328
2329 2016-08-09  Anders Carlsson  <andersca@apple.com>
2330
2331         Remove code that would tell clients whenever the list of installed plug-ins changes
2332         https://bugs.webkit.org/show_bug.cgi?id=160719
2333
2334         Reviewed by Tim Horton.
2335
2336         * UIProcess/Plugins/PluginInfoStore.cpp:
2337         (WebKit::PluginInfoStore::PluginInfoStore): Deleted.
2338         (WebKit::PluginInfoStore::loadPluginsIfNecessary): Deleted.
2339         * UIProcess/Plugins/PluginInfoStore.h:
2340         (WebKit::PluginInfoStoreClient::~PluginInfoStoreClient): Deleted.
2341         (WebKit::PluginInfoStoreClient::PluginInfoStoreClient): Deleted.
2342         (WebKit::PluginInfoStore::setClient): Deleted.
2343         (WebKit::PluginInfoStore::client): Deleted.
2344         * UIProcess/WebContextClient.cpp:
2345         (WebKit::WebContextClient::plugInInformationBecameAvailable): Deleted.
2346         * UIProcess/WebContextClient.h:
2347         * UIProcess/WebProcessPool.cpp:
2348         (WebKit::m_hiddenPageThrottlingTimer): Deleted.
2349         (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins): Deleted.
2350         * UIProcess/WebProcessPool.h:
2351
2352 2016-08-09  George Ruan  <gruan@apple.com>
2353
2354         Implement functionality of media capture on iOS
2355         https://bugs.webkit.org/show_bug.cgi?id=158945
2356         <rdar://problem/26893343>
2357
2358         Reviewed by Tim Horton.
2359
2360         For a input type file element on iOS, the media capture attribute can
2361         now be used to specify which camera to pull up immediately, as opposed
2362         to having to select the camera from a file picker menu. If the
2363         specified capture type camera device is unavailable, the other
2364         built-in camera will be pulled up instead. If no camera is available,
2365         then the file picker menu will be presented to the user.
2366
2367         * Configurations/FeatureDefines.xcconfig: Enable Media Capture feature
2368         on iOS.
2369         * Shared/WebCoreArgumentCoders.cpp:
2370         (IPC::ArgumentCoder<FileChooserSettings>::encode): Encode enum
2371         MediaCaptureType.
2372         (IPC::ArgumentCoder<FileChooserSettings>::decode): Decode enum
2373         MediaCaptureType.
2374         * UIProcess/API/APIOpenPanelParameters.cpp:
2375         (API::OpenPanelParameters::mediaCaptureType):
2376         (API::OpenPanelParameters::capture): Deleted.
2377         * UIProcess/API/APIOpenPanelParameters.h: Capture attribute is now
2378         represented with MediaCaptureType instead of boolean.
2379         * UIProcess/API/C/WKOpenPanelParametersRef.cpp:
2380         (WKOpenPanelParametersGetMediaCaptureType): Change function name to
2381         better represent function.
2382         (WKOpenPanelParametersGetCaptureEnabled): Deleted.
2383         * UIProcess/API/C/WKOpenPanelParametersRef.h:
2384         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2385         (cameraDeviceForMediaCaptureType): Translate MediaCaptureType to media
2386         device.
2387         (-[WKFileUploadPanel presentWithParameters:resultListener:]):
2388         Immediately pull up media capture device if devices are available and
2389         capture attribute is present.
2390         (-[WKFileUploadPanel _showDocumentPickerMenu]): Only show option to
2391         use media capture device if it is available for the source type.
2392         (-[WKFileUploadPanel _adjustMediaCaptureType]): Determines correct
2393         fallback option for the media capture device.
2394         (-[WKFileUploadPanel _shouldMediaCaptureOpenMediaDevice]): Checks if
2395         the media capture device should be immediately pulled up.
2396         (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]): Specified the
2397         media capture device to use.
2398
2399 2016-08-09  Brady Eidson  <beidson@apple.com>
2400
2401         Implement "dumb" WK2 support for gamepads.
2402         https://bugs.webkit.org/show_bug.cgi?id=160700
2403
2404         Reviewed by Alex Christensen.
2405         
2406         With this patch, gamepads work in WK2.
2407
2408         Things known to be missing to make this mechanism more "smart":
2409           - Refresh values along with display sync instead of on a 60hz timer (bug 160673)
2410           - Only send updated values to the current focused web page (bug 160699)
2411
2412         * CMakeLists.txt:
2413         * WebKit2.xcodeproj/project.pbxproj:
2414         
2415         * Shared/Gamepad/GamepadData.cpp: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp.
2416         (WebKit::GamepadData::encode):
2417         (WebKit::GamepadData::decode):
2418         (WebKit::GamepadData::isNull):
2419         (WebKit::GamepadData::loggingString):
2420         * Shared/Gamepad/GamepadData.h: Copied from Source/WebKit2/WebProcess/Gamepad/WebGamepad.h.
2421         
2422         * UIProcess/Gamepad/UIGamepad.cpp: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp.
2423         (WebKit::UIGamepad::UIGamepad):
2424         (WebKit::UIGamepad::updateFromPlatformGamepad):
2425         (WebKit::UIGamepad::gamepadData):
2426         * UIProcess/Gamepad/UIGamepad.h: Copied from Source/WebKit2/WebProcess/Gamepad/WebGamepad.h.
2427         (WebKit::UIGamepad::index):
2428         
2429         * UIProcess/Gamepad/UIGamepadProvider.cpp:
2430         (WebKit::UIGamepadProvider::UIGamepadProvider):
2431         (WebKit::UIGamepadProvider::updateTimerFired):
2432         (WebKit::UIGamepadProvider::startOrStopSynchingGamepadState):
2433         (WebKit::UIGamepadProvider::platformGamepadConnected):
2434         (WebKit::UIGamepadProvider::platformGamepadDisconnected):
2435         (WebKit::UIGamepadProvider::platformGamepadInputActivity):
2436         (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
2437         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
2438         (WebKit::UIGamepadProvider::platformGamepads):
2439         * UIProcess/Gamepad/UIGamepadProvider.h:
2440         * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
2441         (WebKit::UIGamepadProvider::platformGamepads):
2442         
2443         * UIProcess/WebProcessPool.cpp:
2444         (WebKit::WebProcessPool::gamepadConnected):
2445         (WebKit::WebProcessPool::gamepadDisconnected):
2446         (WebKit::WebProcessPool::gamepadActivity):
2447         * UIProcess/WebProcessPool.h:
2448         
2449         * WebProcess/Gamepad/WebGamepad.cpp:
2450         (WebKit::WebGamepad::WebGamepad):
2451         (WebKit::WebGamepad::axisValues):
2452         (WebKit::WebGamepad::buttonValues):
2453         (WebKit::WebGamepad::updateValues):
2454         * WebProcess/Gamepad/WebGamepad.h:
2455         
2456         * WebProcess/Gamepad/WebGamepadProvider.cpp:
2457         (WebKit::WebGamepadProvider::gamepadConnected):
2458         (WebKit::WebGamepadProvider::gamepadDisconnected):
2459         (WebKit::WebGamepadProvider::gamepadActivity):
2460         (WebKit::WebGamepadProvider::platformGamepads):
2461         * WebProcess/Gamepad/WebGamepadProvider.h:
2462         
2463         * WebProcess/WebProcess.cpp:
2464         (WebKit::WebProcess::gamepadConnected):
2465         (WebKit::WebProcess::gamepadDisconnected):
2466         (WebKit::WebProcess::gamepadActivity):
2467         * WebProcess/WebProcess.h:
2468         * WebProcess/WebProcess.messages.in:
2469
2470 2016-08-09  Anders Carlsson  <andersca@apple.com>
2471
2472         Get rid of PluginStrategy
2473         https://bugs.webkit.org/show_bug.cgi?id=160696
2474
2475         Reviewed by Dan Bernstein.
2476
2477         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
2478         (WebKit::NetworkProcessPlatformStrategies::createPluginStrategy): Deleted.
2479         * NetworkProcess/NetworkProcessPlatformStrategies.h:
2480         * WebProcess/Plugins/WebPluginInfoProvider.h:
2481         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2482         (WebKit::WebPlatformStrategies::createPluginStrategy): Deleted.
2483         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2484
2485 2016-08-09  Dan Bernstein  <mitz@apple.com>
2486
2487         Add WKPage SPI for looking up a WKFrame given a WKFrameHandle
2488         https://bugs.webkit.org/show_bug.cgi?id=160695
2489
2490         Reviewed by Anders Carlsson.
2491
2492         * UIProcess/API/C/WKPage.cpp:
2493         (WKPageLookUpFrameFromHandle): Added. Gets the frame from the map in the page’s process and
2494           returns it if it belongs to the page.
2495         * UIProcess/API/C/WKPagePrivate.h:
2496
2497 2016-08-08  Anders Carlsson  <andersca@apple.com>
2498
2499         Move plug-in code from WebPlatformStrategies to WebPluginInfoProvider
2500         https://bugs.webkit.org/show_bug.cgi?id=160679
2501
2502         Reviewed by Alex Christensen.
2503
2504         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
2505         (WebKit::WebPluginInfoProvider::setPluginLoadClientPolicy):
2506         (WebKit::WebPluginInfoProvider::clearPluginClientPolicies):
2507         (WebKit::WebPluginInfoProvider::refreshPlugins):
2508         (WebKit::WebPluginInfoProvider::getPluginInfo):
2509         (WebKit::WebPluginInfoProvider::getWebVisiblePluginInfo):
2510         (WebKit::WebPluginInfoProvider::populatePluginCache):
2511         (WebKit::WebPluginInfoProvider::pluginLoadClientPolicyForHost):
2512         (WebKit::WebPluginInfoProvider::longestMatchedWildcardHostForHost):
2513         (WebKit::WebPluginInfoProvider::replaceHostWithMatchedWildcardHost):
2514         * WebProcess/Plugins/WebPluginInfoProvider.h:
2515         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2516         (WebKit::WebPlatformStrategies::createPluginStrategy):
2517         (WebKit::WebPlatformStrategies::WebPlatformStrategies): Deleted.
2518         (WebKit::WebPlatformStrategies::refreshPlugins): Deleted.
2519         (WebKit::WebPlatformStrategies::getPluginInfo): Deleted.
2520         (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo): Deleted.
2521         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy): Deleted.
2522         (WebKit::WebPlatformStrategies::clearPluginClientPolicies): Deleted.
2523         (WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost): Deleted.
2524         (WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost): Deleted.
2525         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost): Deleted.
2526         (WebKit::WebPlatformStrategies::populatePluginCache): Deleted.
2527         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2528         * WebProcess/WebProcess.cpp:
2529         (WebKit::WebProcess::initializeWebProcess):
2530         (WebKit::WebProcess::setPluginLoadClientPolicy):
2531         (WebKit::WebProcess::clearPluginClientPolicies):
2532
2533 2016-08-08  Anders Carlsson  <andersca@apple.com>
2534
2535         Add a new PluginInfoProvider class, to replace PluginStrategy
2536         https://bugs.webkit.org/show_bug.cgi?id=160670
2537
2538         Reviewed by Sam Weinig.
2539
2540         Add a new WebPluginInfoProvider - it just calls through to the plug-in strategy for now.
2541
2542         * WebKit2.xcodeproj/project.pbxproj:
2543         * WebProcess/Plugins/WebPluginInfoProvider.cpp: Added.
2544         (WebKit::WebPluginInfoProvider::singleton):
2545         (WebKit::WebPluginInfoProvider::WebPluginInfoProvider):
2546         (WebKit::WebPluginInfoProvider::~WebPluginInfoProvider):
2547         (WebKit::WebPluginInfoProvider::refreshPlugins):
2548         (WebKit::WebPluginInfoProvider::getPluginInfo):
2549         (WebKit::WebPluginInfoProvider::getWebVisiblePluginInfo):
2550         (WebKit::WebPluginInfoProvider::setPluginLoadClientPolicy):
2551         (WebKit::WebPluginInfoProvider::clearPluginClientPolicies):
2552         * WebProcess/Plugins/WebPluginInfoProvider.h: Added.
2553         * WebProcess/WebPage/WebPage.cpp:
2554         (WebKit::m_userInterfaceLayoutDirection):
2555
2556 2016-08-08  Brady Eidson  <beidson@apple.com>
2557
2558         Addressing late review feedback in bug 160605
2559         https://bugs.webkit.org/show_bug.cgi?id=160605
2560
2561         Reviewed by Darin's suggestions.
2562
2563         * UIProcess/Gamepad/UIGamepadProvider.cpp:
2564         (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
2565         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
2566         * UIProcess/Gamepad/UIGamepadProvider.h:
2567         
2568         * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
2569         (WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
2570         (WebKit::UIGamepadProvider::platformStopMonitoringGamepads):
2571         
2572         * UIProcess/WebProcessPool.cpp:
2573         (WebKit::WebProcessPool::disconnectProcess):
2574         (WebKit::WebProcessPool::startedUsingGamepads):
2575         (WebKit::WebProcessPool::stoppedUsingGamepads):
2576         (WebKit::WebProcessPool::processStoppedUsingGamepads):
2577         * UIProcess/WebProcessPool.h:
2578         
2579         * WebProcess/Gamepad/WebGamepadProvider.cpp:
2580         (WebKit::WebGamepadProvider::startMonitoringGamepads):
2581         (WebKit::WebGamepadProvider::stopMonitoringGamepads):
2582         * WebProcess/Gamepad/WebGamepadProvider.h:
2583
2584 2016-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2585
2586         [GTK] Bad performance in accelerated compositing mode with the modesetting intel driver and DRI3 enabled
2587         https://bugs.webkit.org/show_bug.cgi?id=160491
2588
2589         Reviewed by Michael Catanzaro.
2590
2591         This is becoming the default in several linux distributions and it makes WebKitGTK+ unusable in accelerated
2592         compositing mode, which is now always enabled because since we switched to use the threaded compositor. The
2593         problem seems to be an optimization of the intel driver for windows that are offscreen, and our redirected
2594         window is always positioned at ScreenWidth + 1, 0. Using negative coordinates to position the redirected window
2595         offscreen fixes the problem.
2596         See also https://bugs.freedesktop.org/show_bug.cgi?id=85064.
2597
2598         * WebProcess/WebPage/gtk/RedirectedXCompositeWindow.cpp:
2599         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow): Position the parent window at -1, -1.
2600
2601 2016-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2602
2603         Duplicated code in DrawingAreaProxyImpl and CoordinatedDrawingAreaProxy
2604         https://bugs.webkit.org/show_bug.cgi?id=160506
2605
2606         Reviewed by Michael Catanzaro.
2607
2608         Same logic as in r202855 but in the UI process. CoordinatedDrawingAreaProxy is just a copy paste of
2609         DrawingAreaProxyImpl with non-accelerated code path removed. There's actually nothing (or very little) specific
2610         to coordinated graphics in the CoordinatedDrawingAreaProxy implementation. This patch renames
2611         CoordinatedDrawingAreaProxy as AcceleratedDrawingAreaProxy and makes DrawingAreaProxyImpl inherit from it, so
2612         that in case of accelerated compositing the parent class is used, and DrawingAreaProxyImpl only adds the non
2613         accelerated code path.
2614         To simplify the common API of AcceleratedDrawingAreaProxy, I have changed CoordinatedLayerTreeHostProxy to
2615         receive a WebPageProxy in the constructor instead of a drawing area, since the drawing area was used just to get
2616         the page proxy.
2617
2618         * PlatformEfl.cmake:
2619         * PlatformGTK.cmake:
2620         * UIProcess/AcceleratedDrawingAreaProxy.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp.
2621         (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
2622         (WebKit::AcceleratedDrawingAreaProxy::~AcceleratedDrawingAreaProxy):
2623         (WebKit::AcceleratedDrawingAreaProxy::alwaysUseCompositing):
2624         (WebKit::AcceleratedDrawingAreaProxy::dispatchAfterEnsuringDrawing):
2625         (WebKit::AcceleratedDrawingAreaProxy::sizeDidChange):
2626         (WebKit::AcceleratedDrawingAreaProxy::deviceScaleFactorDidChange):
2627         (WebKit::AcceleratedDrawingAreaProxy::visibilityDidChange):
2628         (WebKit::AcceleratedDrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint):
2629         (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState):
2630         (WebKit::AcceleratedDrawingAreaProxy::enterAcceleratedCompositingMode):
2631         (WebKit::AcceleratedDrawingAreaProxy::exitAcceleratedCompositingMode):
2632         (WebKit::AcceleratedDrawingAreaProxy::updateAcceleratedCompositingMode):
2633         (WebKit::AcceleratedDrawingAreaProxy::backingStoreStateDidChange):
2634         (WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState):
2635         (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
2636         (WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
2637         (WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
2638         * UIProcess/AcceleratedDrawingAreaProxy.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h.
2639         (WebKit::AcceleratedDrawingAreaProxy::isInAcceleratedCompositingMode):
2640         (WebKit::AcceleratedDrawingAreaProxy::coordinatedLayerTreeHostProxy):
2641         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
2642         (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
2643         (WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy):
2644         (WebKit::CoordinatedLayerTreeHostProxy::updateViewport):
2645         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
2646         (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
2647         (WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame):
2648         (WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset):
2649         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
2650         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
2651         (WebKit::PageViewportController::syncVisibleContents):
2652         * UIProcess/DrawingAreaProxyImpl.cpp:
2653         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2654         (WebKit::DrawingAreaProxyImpl::paint):
2655         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
2656         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
2657         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2658         (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl): Deleted.
2659         (WebKit::DrawingAreaProxyImpl::update): Deleted.
2660         (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Deleted.
2661         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Deleted.
2662         (WebKit::DrawingAreaProxyImpl::discardBackingStore): Deleted.
2663         * UIProcess/DrawingAreaProxyImpl.h:
2664         * UIProcess/efl/WebView.cpp:
2665         (WebKit::WebView::setVisible):
2666         (WebKit::WebView::coordinatedGraphicsScene):
2667         (WebKit::WebView::updateViewportSize):
2668         (WebKit::WebView::createDrawingAreaProxy):
2669
2670 2016-08-07  Dan Bernstein  <mitz@apple.com>
2671
2672         [Cocoa] Reply block leaks if the remote object doesn’t call it
2673         https://bugs.webkit.org/show_bug.cgi?id=160642
2674
2675         Reviewed by Sam Weinig.
2676
2677         * Shared/API/Cocoa/RemoteObjectRegistry.h: Declared new member functions.
2678         * Shared/API/Cocoa/RemoteObjectRegistry.messages.in: Added ReleaseUnusedReplyBlock message.
2679         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
2680         (WebKit::RemoteObjectRegistry::sendUnusedReply): Send the ReleaseUnusedReplyBlock message.
2681         (WebKit::RemoteObjectRegistry::releaseUnusedReplyBlock): Message receiver that call through
2682           to -_releaseReplyWithID:.
2683
2684         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
2685         (-[_WKRemoteObjectRegistry _invokeMethod:]): Define a ReplyBlockCallChecker object and
2686           capture an instance of it in the reply block we pass to the exported object. Have that
2687           block set a flag on the checker when it’s called. If the checker gets destroyed without
2688           the block having been called, which means that the block got destroyed without being
2689           called, call sendUnusedReply to let the other side know that the block will not be invoked.
2690         (-[_WKRemoteObjectRegistry _releaseReplyWithID:]): Added. Removed the pending reply from the
2691           map, which release the block.
2692         * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
2693
2694 2016-08-07  Chris Dumez  <cdumez@apple.com>
2695
2696         Write API test to cover crash fix in r204135
2697         https://bugs.webkit.org/show_bug.cgi?id=160587
2698
2699         Reviewed by Darin Adler.
2700
2701         * UIProcess/WebPageProxy.cpp:
2702         (WebKit::WebPageProxy::terminateProcess):
2703         Stop calling resetStateAfterProcessExited() after calling
2704         requestTermination() because requestTermination() now calls
2705         didClose() which calls processDidCrash() which already calls
2706         resetStateAfterProcessExited(). Because the processDidCrash()
2707         delegates may start new loads, we really do not want to
2708         reset the state again after calling the delegates.
2709
2710         * UIProcess/WebProcessProxy.cpp:
2711         (WebKit::WebProcessProxy::requestTermination):
2712         - Call didClose() in WebProcessProxy::requestTermination() so that
2713           the processDidCrash() delegates get called in API tests whenever
2714           a WebContent process is terminated to simulate a crash.
2715         - Stop calling shutDown() and webConnection()->didClose() because
2716           didClose() already does this for us.
2717
2718 2016-08-06  Chris Dumez  <cdumez@apple.com>
2719
2720         Unreviewed, rolling out r204226.
2721
2722         Broke some API tests
2723
2724         Reverted changeset:
2725
2726         "Write API test to cover crash fix in r204135"
2727         https://bugs.webkit.org/show_bug.cgi?id=160587
2728         http://trac.webkit.org/changeset/204226
2729
2730 2016-08-06  Dan Bernstein  <mitz@apple.com>
2731
2732         [Cocoa] -[_WKRemoteObjectRegistry() _invokeMethod:] leaks a block
2733         https://bugs.webkit.org/show_bug.cgi?id=160636
2734
2735         Reviewed by Darin Adler.
2736
2737         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
2738         (-[_WKRemoteObjectRegistry _invokeMethod:]): Release the block returned from
2739           __NSMakeSpecialForwardingCaptureBlock.
2740
2741 2016-08-06  Chris Dumez  <cdumez@apple.com>
2742
2743         Write API test to cover crash fix in r204135
2744         https://bugs.webkit.org/show_bug.cgi?id=160587
2745
2746         Reviewed by Darin Adler.
2747
2748         Call didClose() in WebProcessProxy::requestTermination() so that
2749         the processDidCrash() delegates get called in API tests whenever
2750         a WebContent process is terminated to simulate a crash.
2751
2752         * UIProcess/WebProcessProxy.cpp:
2753         (WebKit::WebProcessProxy::requestTermination):
2754
2755 2016-08-06  Brady Eidson  <beidson@apple.com>
2756
2757         Lay WebProcess/UIProcess groundwork for an IPC GamepadProvider.
2758         https://bugs.webkit.org/show_bug.cgi?id=160605
2759
2760         Reviewed by Alex Christensen.
2761
2762         This patch:
2763           - Introduces the GamepadProvider that the WebProcess will use (WebGamepadProvider)
2764           - Has that provider message to the UIProcess notifying interest in gamepad state
2765           - Introduces a GamepadProviderClient in the UIProcess (UIGamepadProvider) that will use
2766             one of the existing GamepadProviders to pass gamepad state along to WebProcesses.
2767           - Adds an empty skeleton for the soon-to-be-used WebGamepad, which will be the 
2768             "PlatformGamepad" for WebProcesses.
2769
2770         * CMakeLists.txt:
2771         * WebKit2.xcodeproj/project.pbxproj:
2772
2773         * UIProcess/Gamepads/UIGamepadProvider.cpp: Added.
2774         (WebKit::UIGamepadProvider::singleton):
2775         (WebKit::UIGamepadProvider::UIGamepadProvider):
2776         (WebKit::UIGamepadProvider::~UIGamepadProvider):
2777         (WebKit::UIGamepadProvider::platformGamepadConnected):
2778         (WebKit::UIGamepadProvider::platformGamepadDisconnected):
2779         (WebKit::UIGamepadProvider::platformGamepadInputActivity):
2780         (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
2781         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
2782         (WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
2783         (WebKit::UIGamepadProvider::platformStopMonitoringGamepads):
2784         * UIProcess/Gamepads/UIGamepadProvider.h: Added.
2785
2786         * UIProcess/Gamepads/mac/UIGamepadProviderHID.cpp: Added.
2787         (WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
2788         (WebKit::UIGamepadProvider::platformStopMonitoringGamepads):
2789
2790         * UIProcess/WebProcessPool.cpp:
2791         (WebKit::WebProcessPool::~WebProcessPool):
2792         (WebKit::WebProcessPool::disconnectProcess):
2793         (WebKit::WebProcessPool::startedUsingGamepads):
2794         (WebKit::WebProcessPool::stoppedUsingGamepads):
2795         (WebKit::WebProcessPool::processStoppedUsingGamepads):
2796         * UIProcess/WebProcessPool.h:
2797         * UIProcess/WebProcessPool.messages.in:
2798                 
2799         * WebProcess/Gamepad/WebGamepad.cpp: Added.
2800         * WebProcess/Gamepad/WebGamepad.h: Added.
2801         
2802         * WebProcess/Gamepad/WebGamepadProvider.cpp: Added.
2803         (WebKit::WebGamepadProvider::singleton):
2804         (WebKit::WebGamepadProvider::WebGamepadProvider):
2805         (WebKit::WebGamepadProvider::~WebGamepadProvider):
2806         (WebKit::WebGamepadProvider::startMonitoringGamepads):
2807         (WebKit::WebGamepadProvider::stopMonitoringGamepads):
2808         (WebKit::WebGamepadProvider::platformGamepads):
2809         * WebProcess/Gamepad/WebGamepadProvider.h: Added.
2810         * WebProcess/WebProcess.cpp:
2811         (WebKit::WebProcess::initializeWebProcess):
2812
2813 2016-08-05  Commit Queue  <commit-queue@webkit.org>
2814
2815         Unreviewed, rolling out r204195.
2816         https://bugs.webkit.org/show_bug.cgi?id=160623
2817
2818         This change causes assertion failures in LayoutTests and API
2819         tests. (Requested by ryanhaddad on #webkit).
2820
2821         Reverted changeset:
2822
2823         "Lay WebProcess/UIProcess groundwork for an IPC
2824         GamepadProvider."
2825         https://bugs.webkit.org/show_bug.cgi?id=160605
2826         http://trac.webkit.org/changeset/204195
2827
2828 2016-08-05  Brady Eidson  <beidson@apple.com>
2829
2830         Lay WebProcess/UIProcess groundwork for an IPC GamepadProvider.
2831         https://bugs.webkit.org/show_bug.cgi?id=160605
2832
2833         Reviewed by Alex Christensen.
2834
2835         This patch:
2836           - Introduces the GamepadProvider that the WebProcess will use (WebGamepadProvider)
2837           - Has that provider message to the UIProcess notifying interest in gamepad state
2838           - Introduces a GamepadProviderClient in the UIProcess (UIGamepadProvider) that will use
2839             one of the existing GamepadProviders to pass gamepad state along to WebProcesses.
2840           - Adds an empty skeleton for the soon-to-be-used WebGamepad, which will be the 
2841             "PlatformGamepad" for WebProcesses.
2842
2843         * CMakeLists.txt:
2844         * WebKit2.xcodeproj/project.pbxproj:
2845
2846         * UIProcess/Gamepads/UIGamepadProvider.cpp: Added.
2847         (WebKit::UIGamepadProvider::singleton):
2848         (WebKit::UIGamepadProvider::UIGamepadProvider):
2849         (WebKit::UIGamepadProvider::~UIGamepadProvider):
2850         (WebKit::UIGamepadProvider::platformGamepadConnected):
2851         (WebKit::UIGamepadProvider::platformGamepadDisconnected):
2852         (WebKit::UIGamepadProvider::platformGamepadInputActivity):
2853         (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
2854         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
2855         (WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
2856         (WebKit::UIGamepadProvider::platformStopMonitoringGamepads):
2857         * UIProcess/Gamepads/UIGamepadProvider.h: Added.
2858
2859         * UIProcess/Gamepads/mac/UIGamepadProviderHID.cpp: Added.
2860         (WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
2861         (WebKit::UIGamepadProvider::platformStopMonitoringGamepads):
2862
2863         * UIProcess/WebProcessPool.cpp:
2864         (WebKit::WebProcessPool::~WebProcessPool):
2865         (WebKit::WebProcessPool::disconnectProcess):
2866         (WebKit::WebProcessPool::startedUsingGamepads):
2867         (WebKit::WebProcessPool::stoppedUsingGamepads):
2868         (WebKit::WebProcessPool::processStoppedUsingGamepads):
2869         * UIProcess/WebProcessPool.h:
2870         * UIProcess/WebProcessPool.messages.in:
2871                 
2872         * WebProcess/Gamepad/WebGamepad.cpp: Added.
2873         * WebProcess/Gamepad/WebGamepad.h: Added.
2874         
2875         * WebProcess/Gamepad/WebGamepadProvider.cpp: Added.
2876         (WebKit::WebGamepadProvider::singleton):
2877         (WebKit::WebGamepadProvider::WebGamepadProvider):
2878         (WebKit::WebGamepadProvider::~WebGamepadProvider):
2879         (WebKit::WebGamepadProvider::startMonitoringGamepads):
2880         (WebKit::WebGamepadProvider::stopMonitoringGamepads):
2881         (WebKit::WebGamepadProvider::platformGamepads):
2882         * WebProcess/Gamepad/WebGamepadProvider.h: Added.
2883         * WebProcess/WebProcess.cpp:
2884         (WebKit::WebProcess::initializeWebProcess):
2885
2886 2016-08-05  Dan Bernstein  <mitz@apple.com>
2887
2888         [Cocoa] WKRemoteObjectCoder doesn’t handle NSRange
2889         https://bugs.webkit.org/show_bug.cgi?id=160589
2890
2891         Reviewed by Tim Horton.
2892
2893         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2894         (encodeInvocationArguments): Encode NSRange by wrapping in an NSValue.
2895         (decodeInvocationArguments): Decode wrapped NSRange.
2896
2897 2016-08-04  Chris Dumez  <cdumez@apple.com>
2898
2899         Crash under NavigationState::NavigationClient::processDidCrash()
2900         https://bugs.webkit.org/show_bug.cgi?id=160563
2901         <rdar://problem/19814215>
2902
2903         Reviewed by Sam Weinig.
2904
2905         When WebPageProxy::close() gets called, make sure we destroy the page's
2906         navigationClient. If we don't then the navigationClient can outlive the
2907         navigationState, causing crashes when navigationClient tries to use its
2908         stale navigationState member reference later on. This happens when the
2909         WebPageProxy outlives its WKWebView because:
2910         1. WebPageProxy owns the navigationClient
2911         2. WKWebView owns the navigationState
2912         3. navigationClient has a reference to the navigationState as member.
2913
2914         WebPageProxy can outlive the WKWebView because it is refCounted. It
2915         can happen for example when the client application uses the
2916         RelatedPage API as this extend the lifetime of the related WebPage's
2917         proxy but the application may not keep the related WKWebView alive.
2918
2919         * UIProcess/WebPageProxy.cpp:
2920         (WebKit::WebPageProxy::close):
2921         Note that it is safe to null out m_navigationClient here instead of
2922         creating a fresh one because there is a null check before every use
2923         of m_navigationClient in WebPageProxy.
2924
2925 2016-08-03  Michael Catanzaro  <mcatanzaro@igalia.com>
2926
2927         [SOUP] Deduplicate WebProcessPool::setIgnoreTLSErrors
2928         https://bugs.webkit.org/show_bug.cgi?id=160489
2929
2930         Reviewed by Alex Christensen.
2931
2932         WebProcessPool::setIgnoreTLSErrors has identical implementation in WebProcessPoolEfl.cpp
2933         and WebProcessPoolGtk.cpp. We have WebProcessPoolSoup.cpp and this function is specific to
2934         the soup network backend, so move it there.
2935
2936         * UIProcess/efl/WebProcessPoolEfl.cpp:
2937         (WebKit::WebProcessPool::setIgnoreTLSErrors): Deleted.
2938         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2939         (WebKit::WebProcessPool::setIgnoreTLSErrors): Deleted.
2940         * UIProcess/soup/WebProcessPoolSoup.cpp:
2941         (WebKit::WebProcessPool::setIgnoreTLSErrors):
2942
2943 2016-08-03  Michael Catanzaro  <mcatanzaro@igalia.com>
2944
2945         [GTK] Document how to initialize WebKitFaviconDatabase
2946         https://bugs.webkit.org/show_bug.cgi?id=160391
2947
2948         Reviewed by Carlos Garcia Campos.
2949
2950         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
2951
2952 2016-08-02  Tim Horton  <timothy_horton@apple.com>
2953
2954         REGRESSION (r203385): Frequent RELEASE_ASSERT in WebKit::RemoteLayerTreeDrawingArea::flushLayers()
2955         https://bugs.webkit.org/show_bug.cgi?id=160481
2956         <rdar://problem/27534205>
2957
2958         Reviewed by Simon Fraser.
2959
2960         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2961         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2962         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2963         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
2964         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
2965         If the UI process sends a didUpdate message while the Web process is in
2966         the middle of flushing on a background thread, the drawing area will
2967         allow another commit to start on the main thread, which then (rightfully)
2968         causes the RELEASE_ASSERT.
2969
2970         This is normally not a problem, because didRefreshDisplay (which sends the didUpdate)
2971         bails if m_didUpdateMessageState is anything other than NotSent, and m_didUpdateMessageState
2972         is only NotSent if the Web process has sent a commit (and thus will not commit again until
2973         it gets a didUpdate). This is the fundamental mechanism that avoids multiple commits being
2974         in flight at once.
2975
2976         In r203385, I added a path where didRefreshDisplay could be called
2977         before the first commit arrived (by way of
2978         _applicationWillEnterForeground -> viewStateDidChange -> waitForDidUpdateViewState).
2979
2980         This caused trouble because m_didUpdateMessageState is initialized to NotSent,
2981         which means that we could end up sending a didUpdate immediately, before the first
2982         commit arrives - even worse, while the first commit is being flushed on a background thread,
2983         leading the aforementioned RELEASE_ASSERT to fire.
2984
2985         Instead, initialize it to Sent (which I've renamed to DoesNotNeedDidUpdate), so that
2986         we won't send a didUpdate until after the first commit arrives (at which point
2987         the two processes are in agreement about the order of things).
2988
2989         It's not currently possible to API test this for multiple reasons, though it is fairly
2990         easy to write a test app that reproduces reliably (by simulating suspend/resume notifications
2991         inside the didFinishNavigation: callback).
2992
2993 2016-08-02  Enrica Casucci  <enrica@apple.com>
2994
2995         Allow building with content filtering disabled.
2996         https://bugs.webkit.org/show_bug.cgi?id=160454
2997
2998         Reviewed by Simon Fraser.
2999
3000         * Configurations/FeatureDefines.xcconfig:
3001         * Shared/mac/WebCoreArgumentCodersMac.mm:
3002         (IPC::ArgumentCoder<KeypressCommand>::decode):
3003         (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
3004         (IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode):
3005         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
3006         (WebKit::blockedByContentFilterError):
3007
3008 2016-08-02  Brady Eidson  <beidson@apple.com>
3009
3010         Refactor data passed along for a "GetRecord" request.
3011         https://bugs.webkit.org/show_bug.cgi?id=160352
3012
3013         Reviewed by Tim Horton.
3014
3015         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
3016         (WebKit::WebIDBConnectionToClient::getRecord):
3017         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
3018         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
3019
3020         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3021         (WebKit::WebIDBConnectionToServer::getRecord):
3022         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
3023
3024 2016-08-01  Carlos Garcia Campos  <cgarcia@igalia.com>
3025
3026         [GTK] Move the redirected XComposite window to the web process
3027         https://bugs.webkit.org/show_bug.cgi?id=160389
3028
3029         Reviewed by Žan Doberšek.
3030
3031         In the current code, the UI process creates the redirected window that the web process uses to render
3032         accelerated contents. The redirected window is sent to the web process as native surface handle, and using
3033         XDamage extension the UI process takes a pixmap of the redirected window to render into the widget when there
3034         are updates. This requires several points of synchronization between UI and web processes. When the web view is
3035         resized, the UI process first resizes the redirected window and then sends a new backing store ID to the web
3036         process. The time between the redirected window is resized and the web process renders the new contents the UI
3037         process keeps rendering the previous contents with the previous size in the new window with the new size. This
3038         makes the resize process slow, and it produces rendering artifacts quite often. The redirected window is created
3039         when the web view is realized, to be able to inherit the XVisual from the parent window, and the native window
3040         handle is sent to the web process. The time until the window is realized, the web process doesn't have a context
3041         to render into, so the UI process simply renders an empty page. When the web view is unrealized, for example if
3042         the web view is reparented, the redirected window is destroyed, and a sync message is sent to the web process to
3043         destroy the current gl context and stop drawing. This needs to happen synchronously, because the UI process
3044         can't remove the redirected window until the web process has stopped rendering into it. This makes also the
3045         reparenting process quite unstable and risky.
3046         To all those synchronization points we now have to add the synchronization with the compositing thread when
3047         using the threaded compositor. The threaded compositor made resizing, reparenting, etc. even worse. We can't
3048         avoid the synchronization with the threaded compositor, but we can reduce the synchronization points and improve
3049         the current ones by moving the redirected window to the web process. In this case is web process who creates the
3050         redirected window, so we can be sure that it always has a valid native surface handle to render into. This means
3051         we no longer need the IPC message to send the native surface handle from the UI process to the web process, nor
3052         the sync message to destroy it either. This also means we no longer need to wait until the view is realized to
3053         start rendering accelerated contents, and we don't need to stop when it's unrealized either. We don't really
3054         need to inherit the XVisual from the parent window if the redirected window always uses always a RGBA visual
3055         when available. That way we always render into a transparent window that is composed into the web view
3056         widget. And when the web view is resized, we no longer need to destroy the GL context either, because we use the
3057         same redirected window as the native handle, but create a new pixmap that is what we send to the UI process as
3058         layer tree context ID. The layer tree context ID is already sent to the UI process by the drawing area as part
3059         of the backing store update process, so we don't need any new IPC message for this. When the web view is
3060         resized, the UI process sends a backing store state update message to the web process that updates its size,
3061         relayouts and then renders the new contents, so that when the update backing store state reply gets to the UI
3062         process, we already have a new pixmap with the new contents updated. This makes resizing smooth again, and
3063         avoids flickering and rendering artifacts. And finally all this also prevents several race conditions that were
3064         causing X errors and web process crashes.
3065
3066         * PlatformGTK.cmake:
3067         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3068         (WebKit::ThreadedCompositor::create): Make it possible to optionally pass a native surface handle for
3069         compositing to the ThreadedCompositor contructor.
3070         (WebKit::ThreadedCompositor::ThreadedCompositor): Initialize the native surface handle and make the scene active
3071         after the thread initialization if we already have a valid handle.
3072         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
3073         * UIProcess/API/gtk/PageClientImpl.cpp:
3074         (WebKit::PageClientImpl::enterAcceleratedCompositingMode): Pass the layer tree context ID to the web view.
3075         (WebKit::PageClientImpl::updateAcceleratedCompositingMode): Notify the web view about the update.
3076         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode): Deleted.
3077         * UIProcess/API/gtk/PageClientImpl.h:
3078         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3079         (webkitWebViewBaseSetAcceleratedCompositingPixmap): Helper function to update the pixmap used to render the
3080         accelerated contents.
3081         (webkitWebViewBaseRealize): Remove the code to create the redirected window.
3082         (webkitWebViewBaseUnrealize): Remove the code to destroy the redirected window.
3083         (webkitWebViewBaseDispose): Reset the accelerated compositing pixmap.
3084         (webkitWebViewRenderAcceleratedCompositingResults): Use the accelerated compositing pixmap surface.
3085         (webkitWebViewBaseSizeAllocate): Remove the code to resize the redirected window.
3086         (webkitWebViewBaseEnterAcceleratedCompositingMode): Update the accelerated compositing pixmap.
3087         (webkitWebViewBaseUpdateAcceleratedCompositingMode): Ditto.
3088         (webkitWebViewBaseExitAcceleratedCompositingMode): Reset the accelerated compositing pixmap.
3089         (webkitWebViewBaseDidRelaunchWebProcess): Remove the code to send native surface handle to the web process.
3090         (webkitWebViewBasePageClosed): Reset the accelerated compositing pixmap.
3091         (_WebKitWebViewBasePrivate::updateViewStateTimerFired): Deleted.
3092         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
3093         * UIProcess/DrawingAreaProxy.h:
3094         * UIProcess/DrawingAreaProxy.messages.in:
3095         * UIProcess/DrawingAreaProxyImpl.cpp:
3096         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): Handle the case when the layer tree context ID
3097         changes without leaving the accelerated compositing mode, calling updateAcceleratedCompositingMode().
3098         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): Let the web view know we are leaving accelerated
3099         compositing mode even when it's forced, since in case of web process crash we need to leave the accelerated
3100         compositing mode in the UI process.
3101         (WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode): This message was added only to prepare the
3102         redirected window when the web process was about to enter accelerated compositing mode, so it's no longer needed.
3103         (WebKit::DrawingAreaProxyImpl::setNativeSurfaceHandleForCompositing): This is now only used when building
3104         without redirected XComposite window support.
3105         * UIProcess/DrawingAreaProxyImpl.h:
3106         * UIProcess/PageClient.h:
3107         * UIProcess/WebPageProxy.cpp:
3108         (WebKit::WebPageProxy::willEnterAcceleratedCompositingMode): Deleted.
3109         * UIProcess/WebPageProxy.h:
3110         * UIProcess/efl/WebView.h:
3111         * UIProcess/gtk/RedirectedXCompositeWindow.cpp: Removed.
3112         * UIProcess/gtk/XDamageNotifier.cpp: Helper class to be notified about XDamage events.
3113         (WebKit::XDamageNotifier::singleton):
3114         (WebKit::XDamageNotifier::XDamageNotifier):
3115         (WebKit::XDamageNotifier::add):
3116         (WebKit::XDamageNotifier::remove):
3117         (WebKit::XDamageNotifier::filterXDamageEvent):
3118         (WebKit::XDamageNotifier::notify):
3119         * UIProcess/gtk/XDamageNotifier.h: Added.
3120         * UIProcess/ios/PageClientImplIOS.h:
3121         * UIProcess/ios/PageClientImplIOS.mm:
3122         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode): Deleted.
3123         * UIProcess/mac/PageClientImpl.h:
3124         * UIProcess/mac/PageClientImpl.mm:
3125         (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode): Deleted.
3126         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
3127         (WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode): Remove code to send
3128         WillEnterAcceleratedCompositingMode message.
3129         (WebKit::AcceleratedDrawingArea::setNativeSurfaceHandleForCompositing): This is now only used when building
3130         without redirected XComposite window support.
3131         * WebProcess/WebPage/AcceleratedDrawingArea.h:
3132         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
3133         (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): Create a redirected window and
3134         pass the window ID as native surface handle to the threaded compositor. Use the redirected window pixmap as
3135         layer tree context.
3136         (WebKit::ThreadedCoordinatedLayerTreeHost::invalidate): Destroy the redirected window.
3137         (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): Resize the redirected window and
3138         update the layer tree context.
3139         (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange): Ditto.
3140         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
3141         * WebProcess/WebPage/DrawingArea.h:
3142         * WebProcess/WebPage/DrawingArea.messages.in:
3143         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3144         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Create a redirected window and texture mapper that uses the window
3145         ID as native surface handle. Use the redirected window pixmap as layer tree context.
3146         (WebKit::LayerTreeHostGtk::makeContextCurrent): Use the redirected window as native handle.
3147         (WebKit::LayerTreeHostGtk::invalidate): Destroy the redirected window.
3148         (WebKit::LayerTreeHostGtk::sizeDidChange): Resize the redirected window and update the layer tree context.
3149         (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged): Ditto.
3150         (WebKit::LayerTreeHostGtk::createTextureMapper): Helper function to create the texture mapper.
3151         (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing): Use createTextureMapper().
3152         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
3153         * WebProcess/WebPage/gtk/RedirectedXCompositeWindow.cpp: Added.
3154         (WebKit::RedirectedXCompositeWindow::create):
3155         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
3156         (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
3157         (WebKit::RedirectedXCompositeWindow::resize):
3158         * WebProcess/WebPage/gtk/RedirectedXCompositeWindow.h: Renamed from Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.h.
3159         (WebKit::RedirectedXCompositeWindow::window):
3160         (WebKit::RedirectedXCompositeWindow::pixmap):
3161
3162 2016-08-01  Carlos Garcia Campos  <cgarcia@igalia.com>
3163
3164         Database Process: ASSERTION FAILED: filePaths.size() == result.handles().size() with SANDBOX_EXTENSIONS disabled
3165         https://bugs.webkit.org/show_bug.cgi?id=160398
3166
3167         Reviewed by Brady Eidson.
3168
3169         Same assert as in bug #160188, but this time in preregisterSandboxExtensionsIfNecessary.
3170
3171         * DatabaseProcess/DatabaseProcess.cpp:
3172         * DatabaseProcess/DatabaseProcess.h:
3173         * DatabaseProcess/DatabaseProcess.messages.in:
3174         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
3175         (WebKit::WebIDBConnectionToClient::handleGetResult):
3176         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3177         (WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob):
3178         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3179         * UIProcess/Databases/DatabaseProcessProxy.h:
3180         * UIProcess/Databases/DatabaseProcessProxy.messages.in:
3181         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3182         (WebKit::preregisterSandboxExtensionsIfNecessary):
3183
3184 2016-08-01  Alex Christensen  <achristensen@webkit.org>
3185
3186         _WKDownloadDelegate.didReceiveResponse should be called before decideDestinationWithSuggestedFilename
3187         https://bugs.webkit.org/show_bug.cgi?id=160437
3188         <rdar://problem/27578272>
3189
3190         Reviewed by Brady Eidson.
3191
3192         This preserves the behavior of the NSURLConnection/NSURLDownload code path.
3193         decideDestinationWithSuggestedFilename might need some information from the didReceiveResponse callback
3194         in order to decide what the suggested filename should be.
3195
3196         * NetworkProcess/Downloads/Download.cpp:
3197         (WebKit::Download::didReceiveAuthenticationChallenge):
3198         (WebKit::Download::didReceiveResponse):
3199         (WebKit::Download::didReceiveData):
3200         * NetworkProcess/Downloads/Download.h:
3201         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3202         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
3203         * NetworkProcess/NetworkLoad.cpp:
3204         (WebKit::NetworkLoad::convertTaskToDownload):
3205         (WebKit::NetworkLoad::setPendingDownloadID):
3206         (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
3207         * NetworkProcess/NetworkLoad.h:
3208         (WebKit::NetworkLoad::pendingDownloadID):
3209         * NetworkProcess/NetworkProcess.cpp:
3210         (WebKit::NetworkProcess::pendingDownloadCanceled):
3211         (WebKit::NetworkProcess::findPendingDownloadLocation):
3212         * NetworkProcess/NetworkProcess.h:
3213         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3214         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
3215
3216 2016-07-31  Adrian Perez de Castro  <aperez@igalia.com>
3217
3218         [GTK][Unix] Implement missing WebKit::SharedMemory::create() function
3219         https://bugs.webkit.org/show_bug.cgi?id=160364
3220
3221         Reviewed by Carlos Garcia Campos.
3222
3223         The WebKit::SharedMemory::create() function is missing for the Unix
3224         platform, which is also used by the GTK+ port. The latter is going
3225         to need this in place to use the common content filtering code.
3226
3227         * Platform/unix/SharedMemoryUnix.cpp:
3228         (WebKit::accessModeMMap): Added helper function to convert a
3229         SharedMemory::Protection value into flags useable with mmap().
3230         (WebKit::SharedMemory::create): Added. Implementation reuses code
3231         existing in the SharedMemory::allocate() function.
3232         (WebKit::SharedMemory::allocate): Reimplemented in terms of
3233         SharedMemory::create().
3234
3235 2016-07-30  Dan Bernstein  <mitz@apple.com>
3236
3237         [Xcode] WebKit.framework is touched on incremental build even if nothing’s changed
3238         https://bugs.webkit.org/show_bug.cgi?id=160383
3239
3240         Reviewed by Tim Horton.
3241
3242         * WebKit2.xcodeproj/project.pbxproj: Removed the output files listed under the
3243           Copy iOS Sandbox Profiles for Manual Sandboxing script build phase, because it doesn’t
3244           produce those files on macOS. With no outputs listed, the script will still run every
3245           time, but the fact that it has run won’t trigger touching the framework.
3246
3247 2016-07-28  Ryosuke Niwa  <rniwa@webkit.org>
3248
3249         Crash with an Invalid Web Process IPC Message ID: WebPageProxy.AttributedStringForCharacterRangeCallback
3250         https://bugs.webkit.org/show_bug.cgi?id=160334
3251         <rdar://problem/27078089>
3252
3253         Reviewed by Alexey Proskuryakov.
3254
3255         The crash is most likely caused by an MESSAGE_CHECK failure in WebPageProxy::attributedStringForCharacterRangeCallback
3256         which marks the currently dispatching message was invalid inside the macro.
3257
3258         Make sure we never fail this check by sending an empty EditingRange in attributedSubstringForCharacterRangeAsync when
3259         the editing range we're about to send to the UIProcess is invalid in WebProcess.
3260
3261         Unfortunately, no new tests since we don't have any reproduction and I couldn't spot any code path in which we end up
3262         with an invalid EditingRage here with multiple inspection of the relevant code.
3263
3264         * WebProcess/WebPage/mac/WebPageMac.mm:
3265         (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
3266
3267 2016-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3268
3269         Split calculateCacheSizes in two methods
3270         https://bugs.webkit.org/show_bug.cgi?id=160237
3271
3272         Reviewed by Darin Adler.
3273
3274         It's used to calculate memory and disk cache sizes, but only the web process is interested in memory caches, and
3275         the network process in disk cache. We can also avoid a lot of duplicated code between ports to set the cache model.
3276
3277         * NetworkProcess/NetworkProcess.cpp:
3278         (WebKit::NetworkProcess::setCacheModel): Use calculateURLCacheSizes to set the disk cache size and call
3279         platformSetURLCacheSize if not set to allow ports to setup platform specific cache.
3280         * NetworkProcess/NetworkProcess.h:
3281         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3282         (WebKit::NetworkProcess::platformSetURLCacheSize): Remove common code that is now in cross-platform file.
3283         (WebKit::volumeFreeSize): Deleted.
3284         (WebKit::NetworkProcess::platformSetCacheModel): Renamed to platformSetURLCacheSize().
3285         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3286         (WebKit::NetworkProcess::platformSetURLCacheSize): Remove common code that is now in cross-platform file.
3287         (WebKit::getCacheDiskFreeSize): Deleted.
3288         (WebKit::NetworkProcess::platformSetCacheModel): Renamed to platformSetURLCacheSize().
3289         * Shared/CacheModel.cpp:
3290         (WebKit::calculateMemoryCacheSizes): Calculate the memory and page cache sizes.
3291         (WebKit::calculateURLCacheSizes): Calculate the disk cache size.
3292         (WebKit::calculateCacheSizes): Deleted.
3293         * Shared/CacheModel.h:
3294         * WebProcess/WebProcess.cpp:
3295         (WebKit::WebProcess): Tell the page cache to clear backing stores for GTK+ port too. This was done before when
3296         setting the cache model.
3297         (WebKit::WebProcess::setCacheModel): Use calculateMemoryCacheSizes to setup memory caches and call
3298         platformSetCacheModel to allow ports do more setup according to the cache model.
3299         (WebKit::WebProcess::clearResourceCaches): Deleted.
3300         * WebProcess/WebProcess.h:
3301         * WebProcess/cocoa/WebProcessCocoa.mm:
3302         (WebKit::WebProcess::platformSetCacheModel): Remove common code that is now in cross-platform file.
3303         (WebKit::volumeFreeSize): Deleted.
3304         (WebKit::WebProcess::platformClearResourceCaches): Deleted.
3305         * WebProcess/soup/WebProcessSoup.cpp:
3306         (WebKit::WebProcess::platformSetCacheModel): Remove common code that is now in cross-platform file.
3307         (WebKit::WebProcess::platformInitializeWebProcess):
3308         (WebKit::WebProcess::platformClearResourceCaches): Deleted.
3309
3310 2016-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3311
3312         Database Process: ASSERTION FAILED: paths.size() == handles.size() with SANDBOX_EXTENSIONS disabled
3313         https://bugs.webkit.org/show_bug.cgi?id=160188
3314
3315         Reviewed by Sergio Villar Senin.
3316
3317         This happens in ports with sandbox extensions disabled, and it's making several tests to crash in debug
3318         builds. The SandboxExtension implementation is empty in case of building with sandbox extensions disabled, so
3319         that we are actually allocating no extensions at all in
3320         NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs(). When the message arrives to database
3321         process, we have a list of paths, but an empty list of hanldes which causes the assertion. We can just avoid
3322         that message entirely in case of building without sandbox extensions.
3323
3324         * DatabaseProcess/DatabaseProcess.cpp:
3325         * DatabaseProcess/DatabaseProcess.h:
3326         * DatabaseProcess/DatabaseProcess.messages.in:
3327         * UIProcess/Network/NetworkProcessProxy.cpp:
3328         (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs):
3329
3330 2016-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
3331
3332         Remove deprecated SPI for video inline / fullscreen controls
3333         https://bugs.webkit.org/show_bug.cgi?id=160318
3334
3335         Reviewed by Tim Horton.
3336
3337         * Shared/WebPreferencesDefinitions.h:
3338         * UIProcess/API/C/WKPreferences.cpp:
3339         (WKPreferencesSetAllowsInlineMediaPlaybackWithPlaysInlineAttribute): Deleted.
3340         (WKPreferencesGetAllowsInlineMediaPlaybackWithPlaysInlineAttribute): Deleted.
3341         (WKPreferencesSetAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute): Deleted.
3342         (WKPreferencesGetAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute): Deleted.
3343         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3344         * UIProcess/API/Cocoa/WKWebView.mm:
3345         (-[WKWebView _initializeWithConfiguration:]): Deleted.
3346         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3347         (-[WKWebViewConfiguration init]): Deleted.
3348         (-[WKWebViewConfiguration copyWithZone:]): Deleted.
3349         (-[WKWebViewConfiguration _allowsInlineMediaPlaybackWithPlaysInlineAttribute]): Deleted.
3350         (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackWithPlaysInlineAttribute:]): Deleted.
3351         (-[WKWebViewConfiguration _allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute]): Deleted.
3352         (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute:]): Deleted.
3353         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3354         * WebProcess/WebPage/WebPage.cpp:
3355         (WebKit::WebPage::updatePreferences): Deleted.
3356
3357 2016-07-28  Tim Horton  <timothy_horton@apple.com>
3358
3359         Frequent animation lags when interacting with Safari (sidebar, tab switching, etc.)
3360         https://bugs.webkit.org/show_bug.cgi?id=160289
3361         <rdar://problem/27553464>
3362
3363         Reviewed by Simon Fraser.
3364
3365         API Tests: WebKit2.AnimatedResizeDoesNotHang, WebKit2.ResizeWithHiddenContentDoesNotHang
3366
3367         * UIProcess/API/Cocoa/WKWebView.mm:
3368         (-[WKWebView _didCommitLayerTree:]):
3369         Avoid calling _endAnimatedResize when a commit comes in when we haven't yet received
3370         a dynamic viewport update reply (and thus don't have a transaction ID to wait on).
3371         Previously, in this case, _resizeAnimationTransformTransactionID would be 0,
3372         and *any* commit would cause _endAnimatedResize to be called, causing us to always
3373         fall into the worst-case sync wait.
3374         
3375         * UIProcess/ios/WebPageProxyIOS.mm:
3376         (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
3377         Make use of waitForDidUpdateViewState instead of having a separate waitForAndDispatchImmediately
3378         here, because it knows to do things like dispatch the didUpdate message if it's still
3379         pending. This also shortens the sync wait timeout from 1s to 500ms, which makes it
3380         consistent with e.g. the newly-parented-view timeout duration, and should be nothing
3381         but positive.
3382
3383         * Platform/IPC/Connection.cpp:
3384         (IPC::Connection::timeoutRespectingIgnoreTimeoutsForTesting):
3385         (IPC::Connection::waitForMessage):
3386         (IPC::Connection::sendSyncMessageFromSecondaryThread):
3387         (IPC::Connection::waitForSyncReply):
3388         * Platform/IPC/Connection.h:
3389         (IPC::Connection::ignoreTimeoutsForTesting):
3390         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3391         (API::ProcessPoolConfiguration::copy):
3392         * UIProcess/API/APIProcessPoolConfiguration.h:
3393         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
3394         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
3395         (-[_WKProcessPoolConfiguration ignoreSynchronousMessagingTimeoutsForTesting]):
3396         (-[_WKProcessPoolConfiguration setIgnoreSynchronousMessagingTimeoutsForTesting:]):
3397         * UIProcess/WebProcessPool.cpp:
3398         (WebKit::WebProcessPool::processDidFinishLaunching):
3399         Add a mechanism for clients to cause all synchronous message timeouts to be effectively infinite.
3400         The new API tests use this to ensure that the test will time out if they ever enter
3401         the bad state (otherwise, the shorter sync wait timeout could make the test still pass).
3402
3403 2016-07-27  Andy Estes  <aestes@apple.com>
3404
3405         [iOS] Add WKUIDelegate SPI for specifying that an attachment list is from a managed source
3406         https://bugs.webkit.org/show_bug.cgi?id=160280
3407         <rdar://problem/27471815>
3408
3409         Reviewed by Dan Bernstein.
3410
3411         * Platform/spi/ios/UIKitSPI.h: Declared
3412         UIPreviewItemTypeAttachment, UIPreviewDataAttachmentList, and UIPreviewDataAttachmentIndex.
3413         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Declared -_attachmentListForWebView:sourceIsManaged:.
3414         * UIProcess/ios/WKContentViewInteraction.mm:
3415         (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Used UIPreviewItemTypeAttachment,
3416         UIPreviewDataAttachmentList, and UIPreviewDataAttachmentIndex. If uiDelegate responds to
3417         -_attachmentListForWebView:sourceIsManaged:, called it instead of -_attachmentListForWebView:.
3418         Set sourceIsManaged as the value for the UIPreviewDataAttachmentListSourceIsManaged key in dataForPreview.
3419
3420 2016-07-27  Chelsea Pugh  <cpugh@apple.com>
3421
3422         [iOS] Remove unused textContentType SPI from _WKFormInputSession
3423         https://bugs.webkit.org/show_bug.cgi?id=160260
3424
3425         Reviewed by Dan Bernstein.
3426
3427         * UIProcess/API/Cocoa/_WKFormInputSession.h: Remove unused SPI.
3428
3429         * UIProcess/ios/WKContentViewInteraction.mm:
3430         (-[WKContentView textInputTraits]): Set textContentType of _traits to whatever we classify it as based
3431         on the assisted node info. The default textContentType is nil, and that is our fallback in our method
3432         for determining textContentType.
3433         (-[WKFormInputSession textContentType]): Deleted.
3434         (-[WKFormInputSession setTextContentType:]): Deleted.
3435
3436 2016-07-27  Chris Dumez  <cdumez@apple.com>
3437
3438         Fix m_isInBackground initialization for Safari View Services
3439         https://bugs.webkit.org/show_bug.cgi?id=160255
3440         <rdar://problem/27569255>
3441
3442         Reviewed by Tim Horton.
3443
3444         Fix m_isInBackground initialization for Safari View Services. The
3445         code was using m_applicationStateMonitor without initializing it.
3446         Instead, use the local applicationStateMonitor and make sure we
3447         invalidate it before it gets released.
3448
3449         * UIProcess/ApplicationStateTracker.mm:
3450         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
3451
3452 2016-07-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3453
3454         [Coordinated Graphics] Improve scheduling of tasks between threads in CoordinatedGraphicsScene
3455         https://bugs.webkit.org/show_bug.cgi?id=160238
3456
3457         Reviewed by Michael Catanzaro.
3458
3459         This patch makes the following improvements:
3460
3461          - Avoid scheduling tasks to the main thread if the scene is detached.
3462          - Do not take references when not actually sending tasks to another threads.
3463          - Use Function instead of std::function on dispatch methods.
3464          - Remove purgeBackingStores that is actually never called. It's only scheduled from purgeGLResources() that
3465            is always called after detach.
3466
3467         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
3468         (WebKit::CoordinatedGraphicsScene::dispatchOnMainThread):
3469         (WebKit::CoordinatedGraphicsScene::dispatchOnClientRunLoop):
3470         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
3471         (WebKit::CoordinatedGraphicsScene::updateViewport):
3472         (WebKit::CoordinatedGraphicsScene::onNewBufferAvailable):
3473         (WebKit::CoordinatedGraphicsScene::commitSceneState):
3474         (WebKit::CoordinatedGraphicsScene::renderNextFrame):
3475         (WebKit::CoordinatedGraphicsScene::purgeGLResources):
3476         (WebKit::CoordinatedGraphicsScene::commitScrollOffset):
3477         (WebKit::CoordinatedGraphicsScene::detach):
3478         (WebKit::CoordinatedGraphicsScene::setActive):
3479         (WebKit::CoordinatedGraphicsScene::dispatchCommitScrollOffset): Deleted.
3480         (WebKit::CoordinatedGraphicsScene::purgeBackingStores): Deleted.
3481         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
3482         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3483         (WebKit::ThreadedCompositor::purgeBackingStores): Deleted.
3484         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
3485         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
3486         (WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores): Deleted.
3487         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
3488         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
3489         (WebKit::CompositingCoordinator::invalidate):
3490         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
3491         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3492         (WebKit::CoordinatedLayerTreeHost::invalidate):
3493         (WebKit::CoordinatedLayerTreeHost::purgeBackingStores): Deleted.
3494         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3495         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:
3496         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
3497
3498 2016-07-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3499
3500         [GTK] Remove network setup from web process
3501         https://bugs.webkit.org/show_bug.cgi?id=160236
3502
3503         Reviewed by Michael Catanzaro.
3504
3505         We are still doing network init and finish in th web process. It's useless since we switched to mandatory
3506         network process.
3507
3508         * WebProcess/gtk/WebProcessMainGtk.cpp:
3509
3510 2016-07-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3511
3512         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.13.4 release.
3513
3514         * gtk/NEWS: Add release notes for 2.13.4.
3515
3516 2016-07-26  Simon Fraser  <simon.fraser@apple.com>
3517
3518         Sort the project files.
3519
3520         * WebKit2.xcodeproj/project.pbxproj:
3521
3522 2016-07-26  Myles C. Maxfield  <mmaxfield@apple.com>
3523
3524         [iPhone] Playing a video on tudou.com plays only sound, no video
3525         https://bugs.webkit.org/show_bug.cgi?id=160178
3526         <rdar://problem/27535468>
3527
3528         Reviewed by Eric Carlson and Dan Bernstein.
3529
3530         * Shared/WebPreferencesDefinitions.h:
3531         * UIProcess/API/C/WKPreferences.cpp:
3532         (WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute):
3533         (WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute):
3534         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3535         * UIProcess/API/Cocoa/WKWebView.mm:
3536         (-[WKWebView _initializeWithConfiguration:]):
3537         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3538         (-[WKWebViewConfiguration init]):
3539         (-[WKWebViewConfiguration copyWithZone:]):
3540         (-[WKWebViewConfiguration _inlineMediaPlaybackRequiresPlaysInlineAttribute]):
3541         (-[WKWebViewConfiguration _setInlineMediaPlaybackRequiresPlaysInlineAttribute:]):
3542         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3543         * WebProcess/WebPage/WebPage.cpp:
3544         (WebKit::WebPage::updatePreferences):
3545
3546 2016-07-26  Alex Christensen  <achristensen@webkit.org>
3547
3548         Remove unused DownloadAuthenticationClient
3549         https://bugs.webkit.org/show_bug.cgi?id=160220
3550
3551         Reviewed by Darin Adler.
3552
3553         * CMakeLists.txt:
3554         * NetworkProcess/Downloads/Download.cpp:
3555         * NetworkProcess/Downloads/Download.h:
3556         * NetworkProcess/Downloads/DownloadAuthenticationClient.cpp: Removed.
3557         * NetworkProcess/Downloads/DownloadAuthenticationClient.h: Removed.
3558         * WebKit2.xcodeproj/project.pbxproj:
3559
3560 2016-07-26  Simon Fraser  <simon.fraser@apple.com>
3561
3562         Allow LOG macros to be used outside the namespace, and other logging cleanup
3563         https://bugs.webkit.org/show_bug.cgi?id=160216
3564
3565         Reviewed by Anders Carlsson.
3566
3567         Fix some issues with the LOG macros.
3568         
3569         First, they were not usable outside the WebKit namespace in WebKit2 code. Fix by moving
3570         its log channels outside of the namespace (they are protected by a unique prefix anyway).
3571         
3572         Second, allow LOG_WITH_STREAM to be used in WebKit2 by moving that and a helper macro
3573         into LogMacros.h, which is exported from WebCore as a private header.
3574         
3575         Third, split the Logging.h header into two. Logging.h remains for framework-internal
3576         log channels and log macros. Add LogInitialization.h which is external, and used to
3577         initialize the channels.
3578         
3579         Finally unify "initializeLogChannels" and "initializeLoggingChannels" terminology everywhere.
3580
3581         * NetworkProcess/NetworkProcess.cpp:
3582         * Platform/LogInitialization.h: Copied from Source/WebKit2/Platform/foundation/LoggingFoundation.mm.
3583         * Platform/Logging.cpp:
3584         (WebKit::initializeLogChannelsIfNecessary):
3585         * Platform/Logging.h:
3586         * Platform/foundation/LoggingFoundation.mm:
3587         * Shared/WebKit2Initialize.cpp:
3588         (WebKit::InitializeWebKit2):
3589         * UIProcess/API/Cocoa/WKWebView.mm:
3590         (-[WKWebView _updateContentRectsWithState:]):
3591         (-[WKWebView _navigationGestureDidBegin]):
3592         * UIProcess/WebProcessPool.cpp:
3593         (WebKit::m_hiddenPageThrottlingTimer):
3594         * WebKit2.xcodeproj/project.pbxproj:
3595
3596 2016-07-26  David Kilzer <ddkilzer@apple.com>
3597
3598         Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation
3599         https://bugs.webkit.org/show_bug.cgi?id=156947
3600         <rdar://problem/23325160>
3601
3602         Reviewed by Alex Christensen.
3603
3604         * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
3605         (WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue): 
3606         * UIProcess/API/C/WKAuthenticationDecisionListener.h:
3607         Added new SPI for testing corresponding to calling the completion handler of
3608         WKWebView.didReceiveAuthenticationChallenge with NSURLSessionAuthChallengeRejectProtectionSpace.
3609
3610 2016-07-26  Anders Carlsson  <andersca@apple.com>
3611
3612         Payment session does not end if user closes all Safari windows
3613         https://bugs.webkit.org/show_bug.cgi?id=160213
3614         rdar://problem/27480873
3615
3616         Reviewed by Tim Horton.
3617
3618         Listen for the NSWindowWillCloseNotification of the sheet window and hide the payment UI when
3619         the sheet window is going to be closed.
3620
3621         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
3622         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
3623         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
3624         (WebKit::WebPaymentCoordinatorProxy::hidePaymentUI):
3625
3626 2016-07-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3627
3628         [Threaded Compositor] ASSERTION FAILED: canAccessThreadLocalDataForThread(m_thread) after r203718
3629         https://bugs.webkit.org/show_bug.cgi?id=160201
3630
3631         Reviewed by Michael Catanzaro.
3632
3633         I forgot to call purgeGLResources() before invalidating the scene in the compositing thread.
3634
3635         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3636         (WebKit::ThreadedCompositor::invalidate):
3637
3638 2016-07-26  Enrica Casucci  <enrica@apple.com>
3639
3640         Support configurable autocapitalization.
3641         https://bugs.webkit.org/show_bug.cgi?id=158860
3642         rdar://problem/27536113
3643
3644         Reviewed by Tim Horton.
3645
3646         Autocapitalization should be enabled/disabled regardless of whether
3647         we are using advance spelling feature.
3648
3649         * UIProcess/mac/TextCheckerMac.mm:
3650         (WebKit::TextChecker::checkTextOfParagraph):
3651         (WebKit::TextChecker::getGuessesForWord):
3652
3653
3654 2016-07-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3655
3656         [Coordinated Graphics] Test fast/fixed-layout/fixed-layout.html crashes in debug
3657         https://bugs.webkit.org/show_bug.cgi?id=160117
3658
3659         Reviewed by Michael Catanzaro.
3660
3661         The problem is that WebPage has its own m_useFixedLayout that is only updated when changed from the UI
3662         process. However, layout tests doing internals.setUseFixedLayout() change the frame view directly, and the
3663         WebPage doesn't notice it.
3664
3665         * WebProcess/WebPage/WebPage.cpp:
3666         (WebKit::WebPage::setFixedVisibleContentRect): Deleted.
3667         (WebKit::WebPage::sendViewportAttributesChanged): Change the assert to check the main FrameView is in fixed
3668         layout mode.
3669         * WebProcess/WebPage/WebPage.h:
3670
3671 2016-07-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3672
3673         [Threaded Compositor] ASSERTION FAILED: isMainThread() when ThreadedCompositor is destroyed since r203718
3674         https://bugs.webkit.org/show_bug.cgi?id=160197
3675
3676         Reviewed by Žan Doberšek.
3677
3678         ThreadedCompositor can be destroyed from a secondary thread, for example, when a task takes a reference and the
3679         main threads derefs it, when the task finishes in the secondary thread the lambda ends up deleting the threaded
3680         compositor. This is ok for the Threaded compositor but not for the CompositingRunLoop class. this was not a
3681         problem before r203718 because the CompositingRunLoop object was created and destroyed in the same thread
3682         always, but now it's part of the ThreadedCompositor class. This patch uses std:unique_ptr again to explicitly
3683         create the CompositingRunLoop in the ThreadedCompositor constructor and delete in the invalidate() method to
3684         make sure it happens in the main thread in both cases.
3685
3686         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
3687         (WebKit::WorkQueuePool::invalidate):
3688         (WebKit::WorkQueuePool::getOrCreateWorkQueueForContext):
3689         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
3690         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3691         (WebKit::ThreadedCompositor::ThreadedCompositor):
3692         (WebKit::ThreadedCompositor::invalidate):
3693         (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
3694         (WebKit::ThreadedCompositor::setDeviceScaleFactor):
3695         (WebKit::ThreadedCompositor::setDrawsBackground):
3696         (WebKit::ThreadedCompositor::didChangeViewportSize):
3697         (WebKit::ThreadedCompositor::didChangeViewportAttribute):
3698         (WebKit::ThreadedCompositor::didChangeContentsSize):
3699         (WebKit::ThreadedCompositor::scrollTo):
3700         (WebKit::ThreadedCompositor::scrollBy):
3701         (WebKit::ThreadedCompositor::updateViewport):
3702         (WebKit::ThreadedCompositor::scheduleDisplayImmediately):
3703         (WebKit::ThreadedCompositor::forceRepaint):
3704         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
3705
3706 2016-07-26  Youenn Fablet  <youenn@apple.com>
3707
3708         Remove ClientCredentialPolicy cross-origin option from ResourceLoaderOptions
3709         https://bugs.webkit.org/show_bug.cgi?id=159413
3710
3711         Reviewed by Alex Christensen.
3712
3713         Renaming of ClientCredentialPolicy values.
3714
3715         * NetworkProcess/Downloads/DownloadManager.cpp:
3716         (WebKit::DownloadManager::startDownload):
3717         * NetworkProcess/NetworkLoad.cpp:
3718         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
3719         (WebKit::NetworkLoad::didReceiveAuthenticationChallenge):
3720         * NetworkProcess/NetworkLoadParameters.h:
3721         * NetworkProcess/NetworkResourceLoadParameters.cpp:
3722         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
3723         * NetworkProcess/NetworkResourceLoader.cpp:
3724         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
3725         * WebProcess/Network/WebLoaderStrategy.cpp:
3726         (WebKit::WebLoaderStrategy::scheduleLoad):
3727         * WebProcess/Network/WebResourceLoader.cpp:
3728         (WebKit::WebResourceLoader::willSendRequest):
3729
3730 2016-07-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3731
3732         [Threaded Compositor] Crashes and deadlocks in single web process mode
3733         https://bugs.webkit.org/show_bug.cgi?id=160160
3734
3735         Reviewed by Žan Doberšek.
3736
3737         Every WebPage has its own threaded compositor that runs its own compositing thread. That means that when there's
3738         more than one WebPage in the same process, we are running OpenGL stuff in different secondary threads. That's
3739         causing crashes and deadlocks in X and graphics drivers. We should ensure there's a single compositing thread
3740         per process when multiple threads is not supported. This is causing unit test
3741         WebKit2.WKPageGetScaleFactorNotZero to time out since we switched to the threaded compositor. That test is
3742         creating two pages in the same web process, and most of the times the web process crashes or deadlocks causing
3743         the test to never finish and time out.
3744         This patch makes CompositingRunLoop use a thread pool that spawns the compositing threads and schedules the tasks
3745         there.
3746
3747         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
3748         (WebKit::WorkQueuePool::singleton):
3749         (WebKit::WorkQueuePool::dispatch):
3750         (WebKit::WorkQueuePool::runLoop):
3751         (WebKit::WorkQueuePool::invalidate):
3752         (WebKit::WorkQueuePool::WorkQueuePool):
3753         (WebKit::WorkQueuePool::getOrCreateWorkQueueForContext):
3754         (WebKit::CompositingRunLoop::CompositingRunLoop):
3755         (WebKit::CompositingRunLoop::~CompositingRunLoop):
3756         (WebKit::CompositingRunLoop::performTask):
3757         (WebKit::CompositingRunLoop::performTaskSync):
3758         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
3759         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3760         (WebKit::ThreadedCompositor::ThreadedCompositor):
3761         (WebKit::ThreadedCompositor::invalidate):
3762         (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
3763         (WebKit::ThreadedCompositor::setDeviceScaleFactor):
3764         (WebKit::ThreadedCompositor::setDrawsBackground):
3765         (WebKit::ThreadedCompositor::didChangeViewportSize):
3766         (WebKit::ThreadedCompositor::didChangeViewportAttribute):
3767         (WebKit::ThreadedCompositor::didChangeContentsSize):
3768         (WebKit::ThreadedCompositor::scrollTo):
3769         (WebKit::ThreadedCompositor::scrollBy):
3770         (WebKit::ThreadedCompositor::purgeBackingStores):
3771         (WebKit::ThreadedCompositor::renderNextFrame):
3772         (WebKit::ThreadedCompositor::commitScrollOffset):
3773         (WebKit::ThreadedCompositor::updateViewport):
3774         (WebKit::ThreadedCompositor::scheduleDisplayImmediately):
3775         (WebKit::ThreadedCompositor::forceRepaint):
3776         (WebKit::ThreadedCompositor::tryEnsureGLContext): Deleted.
3777         (WebKit::ThreadedCompositor::glContext): Deleted.
3778         (WebKit::ThreadedCompositor::updateSceneState): Deleted.
3779         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
3780
3781 2016-07-25  Sam Weinig  <sam@webkit.org>
3782
3783         Fix assertion.
3784
3785         * NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:
3786         (WebKit::NetworkCache::encodeCertificateChain):
3787
3788 2016-07-25  Sam Weinig  <sam@webkit.org>
3789
3790         Split platform specific parts of NetworkCacheCoders.cpp into separate files
3791         https://bugs.webkit.org/show_bug.cgi?id=160151
3792
3793         Reviewed by Alex Christensen.
3794
3795         * NetworkProcess/cache/NetworkCacheCoders.cpp:
3796         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Deleted.
3797         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Deleted.
3798         * NetworkProcess/cache/NetworkCacheCodersCocoa.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp.
3799         (WebKit::NetworkCache::encodeCFData): Moved.
3800         (WebKit::NetworkCache::decodeCFData): Moved.
3801         (WebKit::NetworkCache::encodeSecTrustRef): Moved.
3802         (WebKit::NetworkCache::decodeSecTrustRef): Moved.
3803         (WebKit::NetworkCache::encodeCertificateChain): Moved.
3804         (WebKit::NetworkCache::decodeCertificateChain): Moved.
3805         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Moved.
3806         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Moved.
3807         * NetworkProcess/cache/NetworkCacheCodersSoup.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp.
3808         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Moved.
3809         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Moved.
3810
3811         * PlatformGTK.cmake:
3812         * PlatformMac.cmake:
3813         * WebKit2.xcodeproj/project.pbxproj:
3814         Add new files.
3815
3816 2016-07-25  Chris Dumez  <cdumez@apple.com>
3817
3818         [iOS] Make sure we call the ProcessAssertion invalidation handler on the main thread
3819         https://bugs.webkit.org/show_bug.cgi?id=160140
3820         <rdar://problem/27399998>
3821
3822         Reviewed by Darin Adler.
3823
3824         Based on crash traces, it appears BKSProcessAssertion is calling our
3825         invalidation handler on a background thread. This was not anticipated
3826         and therefore, this would lead to thread safety issues and crashes.
3827
3828         We now make sure to call our invalidation handler on the main thread.
3829         We also use a WeakPtr to ensure that the ProcessAssertion is still
3830         alive once on the main thread and before calling the invalidation
3831         handler.
3832
3833         * UIProcess/ProcessAssertion.cpp:
3834         (WebKit::ProcessAssertion::ProcessAssertion):
3835         * UIProcess/ProcessAssertion.h:
3836         (WebKit::ProcessAssertion::ProcessAssertion):
3837         (WebKit::ProcessAssertion::createWeakPtr):
3838         * UIProcess/ios/ProcessAssertionIOS.mm:
3839         (WebKit::ProcessAssertion::ProcessAssertion):
3840         (WebKit::ProcessAssertion::markAsInvalidated):
3841
3842 2016-07-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3843
3844         [GTK][Threaded Compositor] ASSERTION FAILED: !!handle ^ !!m_nativeSurfaceHandle with several layout tests
3845         https://bugs.webkit.org/show_bug.cgi?id=160143
3846
3847         Reviewed by Michael Catanzaro.
3848
3849         We have a message to set the native surface handle and another one for destroying it, the former is a normal
3850         message while the latter is sync. This assertion happens if the web view is realized before the web process is
3851         launched. This is the sequence:
3852
3853         1.- DrawingAreaProxyImpl sends SetNativeSurfaceHandleForCompositing message to the web process, since the
3854         process hasn't been launched yet, the message is queued.
3855         2.- Web process is launched and queued messages are now sent to the web process.
3856         3.- The page is closed right after the web process is launched, and DrawingAreaProxyImpl sends
3857         DestroyNativeSurfaceHandleForCompositing to the web process.
3858         4.- The web process processes incoming messages, and DestroyNativeSurfaceHandleForCompositing is processed before
3859         SetNativeSurfaceHandleForCompositing because it's sync.
3860         5.- The web process processes SetNativeSurfaceHandleForCompositing message.
3861
3862         This is not only producing the assertion, it's also setting a handle for a X window already destroyed in the UI
3863         process, so this could be producing the X errors we have seen in other tests. So, we need to make sure
3864         SetNativeSurfaceHandleForCompositing and DestroyNativeSurfaceHandleForCompositing are handled in order by the
3865         web process. We could make SetNativeSurfaceHandleForCompositing sync as well, but sync messages are just ignored
3866         when sent before the web process has been launched (only normal messages are queued for obvious reasons). The
3867         other option is sending the SetNativeSurfaceHandleForCompositing message with the
3868         IPC::DispatchMessageEvenWhenWaitingForSyncReply flag. In this case the message is queued and dispatched on
3869         process launch, but it's dispatched before other messages also queued without that flag, like
3870         CreateWebPage. Since there's no WebPage the web process doesn't find a valid message receiver for it and
3871         it's discarded. We need to ensure the DrawinArea object has been created before sending the
3872         SetNativeSurfaceHandleForCompositing with the PC::DispatchMessageEvenWhenWaitingForSyncReply flag.
3873
3874         * UIProcess/DrawingAreaProxyImpl.cpp:
3875         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): If we have received the first update and there's a
3876         SetNativeSurfaceHandleForCompositing message pending, send it.
3877         (WebKit::DrawingAreaProxyImpl::setNativeSurfaceHandleForCompositing): Do not send the message before the first
3878         update is received.
3879         (WebKit::DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing): If there was a
3880         SetNativeSurfaceHandleForCompositing message pending, just ignore this destroy since the web process never
3881         received the handle.
3882         * UIProcess/DrawingAreaProxyImpl.h:
3883
3884 2016-07-25  Philippe Normand  <pnormand@igalia.com>
3885
3886         Improve GDB backtrace generation for GTK/EFL
3887         https://bugs.webkit.org/show_bug.cgi?id=128928
3888
3889         Reviewed by Carlos Garcia Campos.
3890
3891         Move the Web, Database and Network ProcessIdentifier functions to
3892         the cross-platform WKContext and WKPage implementations.
3893
3894         * UIProcess/API/C/WKContext.cpp:
3895         (WKContextGetNetworkProcessIdentifier):
3896         (WKContextGetDatabaseProcessIdentifier):
3897         * UIProcess/API/C/WKContextPrivate.h:
3898         * UIProcess/API/C/WKPage.cpp:
3899         (WKPageGetProcessIdentifier):
3900         * UIProcess/API/C/WKPagePrivate.h:
3901         * UIProcess/API/C/mac/WKContextPrivateMac.h:
3902         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3903         * UIProcess/API/C/mac/WKPagePrivateMac.h:
3904         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
3905
3906 2016-07-24  Sam Weinig  <sam@webkit.org>
3907
3908         Add specialization for encoding/decoding WebCore::CertificateInfos in the Network Cache
3909         <rdar://problem/27409315>
3910         https://bugs.webkit.org/show_bug.cgi?id=160144
3911
3912         Reviewed by Chris Dumez.
3913
3914         * NetworkProcess/cache/NetworkCacheCoders.cpp:
3915         (WebKit::NetworkCache::encodeCFData):
3916         (WebKit::NetworkCache::decodeCFData):
3917         (WebKit::NetworkCache::encodeSecTrustRef):
3918         (WebKit::NetworkCache::decodeSecTrustRef):
3919         (WebKit::NetworkCache::encodeCertificateChain):
3920         (WebKit::NetworkCache::decodeCertificateChain):
3921         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode):
3922         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode):
3923
3924         * NetworkProcess/cache/NetworkCacheStorage.h:
3925         (WebKit::NetworkCache::Storage::version):
3926         Bump the version and lastStableVersion to account for the format change.
3927
3928 2016-07-22  Joseph Pecoraro  <pecoraro@apple.com>
3929
3930         Web Automation: All key events should be processed before sending response
3931         https://bugs.webkit.org/show_bug.cgi?id=160114
3932         <rdar://problem/27505943>
3933
3934         Reviewed by Darin Adler.
3935
3936         When evaluating performKeyboardInteractions, we were sending all
3937         NSEvents synchronously, but because WebPageProxy was doing its
3938         own queueing and asynchronous processing of those key events, we
3939         would receive and respond to the next Automation command before
3940         having completed all of the key events.
3941
3942         This change makes performKeyboardInteractions asynchronous. It
3943         will be notified only after WebPageProxy has exhausted its queue
3944         of key events.
3945
3946         * UIProcess/Automation/Automation.json:
3947         * UIProcess/Automation/WebAutomationSession.cpp:
3948         (WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
3949         (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
3950         (WebKit::WebAutomationSession::performKeyboardInteractions):
3951         * UIProcess/Automation/WebAutomationSession.h:
3952         * UIProcess/WebPageProxy.cpp:
3953         (WebKit::WebPageProxy::didReceiveEvent):
3954
3955 2016-07-22  Joseph Pecoraro  <pecoraro@apple.com>
3956
3957         Web Automation: WebAutomationSession::deleteAllCookies never calls callback, hangs automation session
3958         https://bugs.webkit.org/show_bug.cgi?id=160113
3959         <rdar://problem/27308124>
3960
3961         Reviewed by Darin Adler.
3962
3963         Delete all cookies appears to be a straightforward action
3964         where we don't need to wait for a callback. So drop the
3965         async altogether and implicitly complete the action.
3966
3967         * UIProcess/Automation/Automation.json:
3968         * UIProcess/Automation/WebAutomationSession.cpp:
3969         (WebKit::WebAutomationSession::deleteAllCookies):
3970         * UIProcess/Automation/WebAutomationSession.h:
3971
3972 2016-07-22  Zalan Bujtas  <zalan@apple.com>
3973
3974         Handle cases when IOSurface initialization fails.
3975         https://bugs.webkit.org/show_bug.cgi?id=160006
3976         <rdar://problem/27495102>