DOM event handling should pass Event around by reference.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-08-31  Andreas Kling  <akling@apple.com>
2
3         DOM event handling should pass Event around by reference.
4         <https://webkit.org/b/161398>
5
6         Reviewed by Chris Dumez.
7
8         * WebProcess/WebPage/mac/WebPageMac.mm:
9         (WebKit::WebPage::performNonEditingBehaviorForSelector):
10
11 2016-08-31  Brady Eidson  <beidson@apple.com>
12
13         WK2 Gamepad provider on iOS.
14         https://bugs.webkit.org/show_bug.cgi?id=161412
15
16         Reviewed by Tim Horton.
17
18         * Configurations/FeatureDefines.xcconfig:
19
20         * Platform/spi/ios/UIKitSPI.h:
21
22         * UIProcess/Gamepad/UIGamepadProvider.cpp:
23
24         * UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm.
25         (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
26
27         * UIProcess/Gamepad/mac/UIGamepadProviderMac.mm:
28
29         * WebKit2.xcodeproj/project.pbxproj:
30
31 2016-08-30  Anders Carlsson  <andersca@apple.com>
32
33         Try to fix the 32-bit build.
34
35         * UIProcess/WebProcessProxy.cpp:
36         (WebKit::WebProcessProxy::deleteWebsiteData):
37         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
38         * UIProcess/WebProcessProxy.h:
39
40 2016-08-30  Anders Carlsson  <andersca@apple.com>
41
42         Switch more messages over to Connection::sendWithReply
43         https://bugs.webkit.org/show_bug.cgi?id=161415
44
45         Reviewed by Tim Horton.
46
47         * UIProcess/WebProcessProxy.cpp:
48         (WebKit::WebProcessProxy::~WebProcessProxy):
49         (WebKit::WebProcessProxy::processWillShutDown):
50         (WebKit::WebProcessProxy::canTerminateChildProcess):
51         (WebKit::WebProcessProxy::deleteWebsiteData):
52         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
53         (WebKit::generateCallbackID): Deleted.
54         (WebKit::WebProcessProxy::didDeleteWebsiteData): Deleted.
55         (WebKit::WebProcessProxy::didDeleteWebsiteDataForOrigins): Deleted.
56         * UIProcess/WebProcessProxy.h:
57         * UIProcess/WebProcessProxy.messages.in:
58         * WebProcess/WebProcess.cpp:
59         (WebKit::WebProcess::deleteWebsiteData):
60         (WebKit::WebProcess::deleteWebsiteDataForOrigins):
61         * WebProcess/WebProcess.h:
62         * WebProcess/WebProcess.messages.in:
63
64 2016-08-30  Anders Carlsson  <andersca@apple.com>
65
66         Add Connection::sendWithReply
67         https://bugs.webkit.org/show_bug.cgi?id=161399
68
69         Reviewed by Tim Horton.
70
71         Connection::sendWithReply makes it easy to send a message and process its reply asynchronously on a given WorkQueue or RunLoop.
72         The reply handler is guaranteed to be called. If the reply is successfully received, it will consist of an std::tuple with the arguments,
73         otherwise it will be called with Nullopt.
74
75         * Platform/IPC/Connection.cpp:
76         (IPC::Connection::invalidate):
77         Go through all reply handlers and dispatch them with a null Decoder.
78
79         (IPC::Connection::sendMessageWithReply):
80         Add the reply handler to the m_replyHandlers hash map, and send the message.
81
82         (IPC::Connection::processIncomingSyncReply):
83         Check if the incoming reply has an entry in m_replyHandlers. If it does, dispatch its handler using the given dispatcher.
84
85         (IPC::Connection::connectionDidClose):
86         Go through all reply handlers and dispatch them with a null Decoder.
87
88         * Platform/IPC/Connection.h:
89         (IPC::Connection::sendWithReply):
90         Encode the message (we use the sync message ID infrastructure for this), then call sendMessageWithReply with a reply handler that
91         decodes the reply and calls the real reply handler.
92
93         * Platform/IPC/HandleMessage.h:
94         Forward declare Connection.
95
96         * UIProcess/Databases/DatabaseProcessProxy.h:
97         * UIProcess/Network/NetworkProcessProxy.h:
98         Forward declare WebsiteData.
99
100         * UIProcess/WebProcessProxy.cpp:
101         (WebKit::WebProcessProxy::~WebProcessProxy):
102         (WebKit::WebProcessProxy::processWillShutDown):
103         Remove m_pendingFetchWebsiteDataCallbacks.
104
105         (WebKit::WebProcessProxy::fetchWebsiteData):
106         Use Connection::sendWithReply.
107
108         (WebKit::WebProcessProxy::didFetchWebsiteData): Deleted.
109
110         * UIProcess/WebProcessProxy.h:
111         Remove members.
112
113         * UIProcess/WebProcessProxy.messages.in:
114         Remove DidFetchWebsiteData.
115
116         * WebProcess/WebProcess.cpp:
117         (WebKit::WebProcess::fetchWebsiteData):
118         * WebProcess/WebProcess.h:
119         * WebProcess/WebProcess.messages.in:
120         Update the FetchWebsiteData message to have a reply parameter.
121
122 2016-08-30  Brady Eidson  <beidson@apple.com>
123
124         Fix runtime error caused by missing export after https://bugs.webkit.org/show_bug.cgi?id=160846
125
126         Rubberstamped by Dan Bernstein.
127
128         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
129
130 2016-08-30  Brady Eidson  <beidson@apple.com>
131
132         GameController.framework backend for gamepad API.
133         https://bugs.webkit.org/show_bug.cgi?id=161086
134
135         Reviewed by Alex Christensen.
136
137         * UIProcess/API/Cocoa/WKProcessPool.mm:
138         (+[WKProcessPool _forceGameControllerFramework]):
139         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
140
141         * UIProcess/Gamepad/UIGamepadProvider.h:
142
143         * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: Renamed from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp.
144         (WebKit::UIGamepadProvider::setUsesGameControllerFramework):
145         (WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider):
146         (WebKit::UIGamepadProvider::platformStopMonitoringInput):
147         (WebKit::UIGamepadProvider::platformStartMonitoringInput):
148
149         * WebKit2.xcodeproj/project.pbxproj:
150
151 2016-08-30  Mark Lam  <mark.lam@apple.com>
152
153         Introduce the ThrowScope and force every throw site to instantiate a ThrowScope.
154         https://bugs.webkit.org/show_bug.cgi?id=161171
155
156         Reviewed by Filip Pizlo and Geoffrey Garen.
157
158         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
159         (WebKit::callMethod):
160         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
161         (WebKit::JSNPObject::callMethod):
162         (WebKit::JSNPObject::callObject):
163         (WebKit::JSNPObject::callConstructor):
164         (WebKit::JSNPObject::getOwnPropertySlot):
165         (WebKit::JSNPObject::put):
166         (WebKit::JSNPObject::deleteProperty):
167         (WebKit::JSNPObject::getOwnPropertyNames):
168         (WebKit::JSNPObject::propertyGetter):
169         (WebKit::JSNPObject::methodGetter):
170         (WebKit::JSNPObject::throwInvalidAccessError):
171         * WebProcess/Plugins/Netscape/JSNPObject.h:
172         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
173         (WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):
174
175 2016-08-29  Anders Carlsson  <andersca@apple.com>
176
177         Stop using m_client to indicate whether an IPC::Connection is valid
178         https://bugs.webkit.org/show_bug.cgi?id=161362
179
180         Reviewed by Andreas Kling.
181
182         Instead, add an std::atomic<bool> so we can reliably check the state from other threads.
183
184         * Platform/IPC/Connection.cpp:
185         (IPC::Connection::Connection):
186         (IPC::Connection::invalidate):
187         (IPC::Connection::connectionDidClose):
188         (IPC::Connection::dispatchSyncMessage):
189         (IPC::Connection::dispatchDidReceiveInvalidMessage):
190         (IPC::Connection::dispatchMessage):
191         * Platform/IPC/Connection.h:
192         (IPC::Connection::client):
193         (IPC::Connection::isValid):
194         (IPC::Connection::waitForAndDispatchImmediately):
195         * UIProcess/WebGeolocationManagerProxy.cpp:
196         (WebKit::WebGeolocationManagerProxy::startUpdating):
197         (WebKit::WebGeolocationManagerProxy::stopUpdating):
198         (WebKit::WebGeolocationManagerProxy::setEnableHighAccuracy):
199
200 2016-08-30  Carlos Garcia Campos  <cgarcia@igalia.com>
201
202         REGRESSION(r194846): [GTK] UI process crash visiting sites protected with HTTP auth when using GTK+ < 3.14
203         https://bugs.webkit.org/show_bug.cgi?id=161385
204
205         Reviewed by Antonio Gomes.
206
207         Since r194846, we are chaining up webkitWebViewBaseMotionNotifyEvent, but before GTK+ 3.14
208         GtkWidget::motion_notify_event was nullptr, so it can't be used unconditionally.
209
210         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
211         (webkitWebViewBaseMotionNotifyEvent):
212
213 2016-08-30  Carlos Garcia Campos  <cgarcia@igalia.com>
214
215         Unreviewed. Fix GTK+ build after r205150.
216
217         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
218
219 2016-08-29  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>
220
221         Unreviewed EFL/GTK build fix since r205150
222
223         * CMakeLists.txt: Add Shared/FrameInfoData.cpp.
224
225 2016-08-29  Anders Carlsson  <andersca@apple.com>
226
227         Get rid of ChildProcessProxy::fromConnection
228         https://bugs.webkit.org/show_bug.cgi?id=161357
229
230         Reviewed by Tim Horton.
231
232         * UIProcess/ChildProcessProxy.cpp:
233         (WebKit::ChildProcessProxy::fromConnection): Deleted.
234         * UIProcess/ChildProcessProxy.h:
235         * UIProcess/WebProcessProxy.h:
236         (WebKit::WebProcessProxy::fromConnection): Deleted.
237
238 2016-08-29  Anders Carlsson  <andersca@apple.com>
239
240         Remove the last uses of WebProcessProxy::fromConnection
241         https://bugs.webkit.org/show_bug.cgi?id=161355
242
243         Reviewed by Tim Horton.
244
245         * UIProcess/WebProcessPool.cpp:
246         (WebKit::webProcessProxyFromConnection):
247         (WebKit::WebProcessPool::handleMessage):
248         (WebKit::WebProcessPool::handleSynchronousMessage):
249         (WebKit::WebProcessPool::startedUsingGamepads):
250         (WebKit::WebProcessPool::stoppedUsingGamepads):
251
252 2016-08-29  Anders Carlsson  <andersca@apple.com>
253
254         Get rid of another use of WebProcessProxy::fromConnection
255         https://bugs.webkit.org/show_bug.cgi?id=161331
256
257         Reviewed by Dan Bernstein.
258
259         WebUserContentControllerProxy::didPostMessage uses WebProcessProxy::fromConnection to be able to find a WebFrameProxy from
260         a given frame ID. Since the WebFrameProxy is only used to construct an API::FrameInfo object from, introduce a FrameInfoData object
261         and fill it in on the web process side and send it over to the UI process where an API::FrameInfo object can be created.
262
263         * Shared/FrameInfoData.cpp: Added.
264         (WebKit::FrameInfoData::encode):
265         (WebKit::FrameInfoData::decode):
266         * Shared/FrameInfoData.h: Added.
267         * UIProcess/API/APIFrameInfo.cpp:
268         (API::FrameInfo::create):
269         (API::FrameInfo::FrameInfo):
270         * UIProcess/API/APIFrameInfo.h:
271         * UIProcess/API/Cocoa/WKUserContentController.mm:
272         * UIProcess/UserContent/WebScriptMessageHandler.h:
273         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
274         (WebKit::WebUserContentControllerProxy::didPostMessage):
275         * UIProcess/UserContent/WebUserContentControllerProxy.h:
276         * UIProcess/UserContent/WebUserContentControllerProxy.messages.in:
277         * WebKit2.xcodeproj/project.pbxproj:
278         * WebProcess/UserContent/WebUserContentController.cpp:
279         * WebProcess/WebPage/WebFrame.cpp:
280         (WebKit::WebFrame::info):
281         * WebProcess/WebPage/WebFrame.h:
282
283 2016-08-29  Anders Carlsson  <andersca@apple.com>
284
285         Stop using WebProcessProxy::fromConnection in WebPageProxy
286         https://bugs.webkit.org/show_bug.cgi?id=161322
287
288         Reviewed by Dan Bernstein.
289
290         The WebPageProxy already knows its WebProcessProxy - no need to look it up from the connection.
291
292         * UIProcess/WebPageProxy.cpp:
293         (WebKit::WebPageProxy::handleMessage):
294         (WebKit::WebPageProxy::handleSynchronousMessage):
295
296 2016-08-29  Anders Carlsson  <andersca@apple.com>
297
298         Move some structs into Connection.cpp
299         https://bugs.webkit.org/show_bug.cgi?id=161320
300
301         Reviewed by Darin Adler.
302
303         * Platform/IPC/Connection.cpp:
304         (IPC::Connection::PendingSyncReply::PendingSyncReply):
305         * Platform/IPC/Connection.h:
306         (IPC::Connection::PendingSyncReply::PendingSyncReply): Deleted.
307
308 2016-08-26  Anders Carlsson  <andersca@apple.com>
309
310         Remove sync message sending from secondary threads
311         https://bugs.webkit.org/show_bug.cgi?id=161277
312
313         Reviewed by Sam Weinig.
314
315         This codepath hasn't been used for some time, and removing it will make it easier to make IPC::Connection backed by libxpc.
316
317         * Platform/IPC/Connection.cpp:
318         (IPC::Connection::sendSyncMessage):
319         (IPC::Connection::processIncomingSyncReply):
320         (IPC::Connection::connectionDidClose):
321         (IPC::Connection::sendSyncMessageFromSecondaryThread): Deleted.
322         * Platform/IPC/Connection.h:
323
324 2016-08-16  Carlos Garcia Campos  <cgarcia@igalia.com>
325
326         [GTK] Accelerated compositing does not work in Wayland
327         https://bugs.webkit.org/show_bug.cgi?id=115803
328
329         Reviewed by Michael Catanzaro.
330
331         This is the initial implementation of accelerated compositing support in Wayland for the GTK+ port. It's based
332         on previous patches written by Iago Toral, Žan Doberšek, Emanuele Aina and Emilio Pozuelo Monfort.
333
334         The existing WebKitGTK+ Wayland interface previously added for this to WebCore has been moved to the WebKit2
335         layer, since it's actually specific to WebKit2, and it's now actually used. The UI process runs a nested Wayland
336         compositor that web processes connect to. Web processes create a Wayland surface in the nested compositor for
337         the web page, and using the WebKitGTK+ Wayland protocol interface they tell the nested compositor the web page
338         associated to the surface. A Wayland window is created for that surface that is then used as the native window
339         handle for compositing. To communicate with the nested compositor and to ensure all GL operations happen in the
340         nested compositor display, the web process creates a Wayland display that connects to the nested compositor,
341         uses the WebKitGTK+ Wayland interface and it's set as the global shared display for compositing.
342
343         The nested Wayland compositor creates a new display with a unique name that is sent to the web processes at
344         start up. It implements the Wayland surface interface to handle the Wayland buffers created for every surface
345         and scheduling redraws on the web pages when updates are available. It uses the WebKitGTK+ Wayland interface to
346         associate the surfaces to a particular web page. A texture is created for every surface and updated with the
347         Wayland buffer contents using an EGLImageKHR and eglImageTargetTexture2d API.
348
349         To abstract the platform differences and avoid ifdefs as much as possible, new abstract classes have been added
350         to represent the surfaces used in accelerated compositing. AcceleratedSurface is used by the web process and
351         represents the surface where contents are rendered into. The X11 implementation is the redirected XComposite
352         window, and the Wayland implementation is equivalent to the previous Wayland surface added to WebCore but never
353         used. In the UI process the web view creates an abstract AcceleratedBackingStore that is used to render the
354         AcceleratedSurface into the web view using cairo. The X11 implementation creates the cairo surface for the
355         redirected XComposite window pixmap and uses XDamage extension to schedule redraws. The Wayland implementation
356         asks the nested Wayland compositor for the texture associated to the web view page.
357
358         Accelerated compositing is now always enabled by default in both X11 and Wayland, unless it's explicitly
359         disabled by the user using the WEBKIT_DISABLE_COMPOSITING_MODE environment variable, or if any extension or
360         feature required by X11 or Wayland implementations are not available.
361
362         * PlatformGTK.cmake:
363         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
364         (WebKit::ThreadedCompositor::glContext): Pass the shared display for compositing to GLContext::createContextForWindow()
365         * Shared/WebProcessCreationParameters.cpp:
366         (WebKit::WebProcessCreationParameters::encode): Encode wayland compositor display name.
367         (WebKit::WebProcessCreationParameters::decode): Decode wayland compositor display name.
368         * Shared/WebProcessCreationParameters.h: Add wayland compositor display name initial parameter.
369         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
370         (webkitWebViewBaseDispose):
371         (webkitWebViewBaseDraw):
372         (webkitWebViewBaseCreateWebPage):
373         (webkitWebViewBaseEnterAcceleratedCompositingMode):
374         (webkitWebViewBaseUpdateAcceleratedCompositingMode):
375         (webkitWebViewBaseExitAcceleratedCompositingMode):
376         (webkitWebViewBasePageClosed):
377         * UIProcess/WebProcessPool.cpp:
378         (WebKit::WebProcessPool::createNewWebProcess): Initialize the wayland compositor display name initial parameter.
379         * UIProcess/gtk/AcceleratedBackingStore.cpp: Added.
380         (WebKit::AcceleratedBackingStore::create):
381         (WebKit::AcceleratedBackingStore::AcceleratedBackingStore):
382         (WebKit::AcceleratedBackingStore::~AcceleratedBackingStore):
383         (WebKit::AcceleratedBackingStore::paint):
384         * UIProcess/gtk/AcceleratedBackingStore.h: Added.
385         (WebKit::AcceleratedBackingStore::update):
386         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: Added.
387         (WebKit::AcceleratedBackingStoreWayland::create):
388         (WebKit::AcceleratedBackingStoreWayland::AcceleratedBackingStoreWayland):
389         (WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland):
390         (WebKit::AcceleratedBackingStoreWayland::paint):
391         * UIProcess/gtk/AcceleratedBackingStoreWayland.h: Added.
392         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: Added.
393         (WebKit::XDamageNotifier::singleton):
394         (WebKit::XDamageNotifier::add):
395         (WebKit::XDamageNotifier::remove):
396         (WebKit::XDamageNotifier::filterXDamageEvent):
397         (WebKit::XDamageNotifier::notify):
398         (WebKit::AcceleratedBackingStoreX11::create):
399         (WebKit::AcceleratedBackingStoreX11::AcceleratedBackingStoreX11):
400         (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
401         (WebKit::AcceleratedBackingStoreX11::update):
402         (WebKit::AcceleratedBackingStoreX11::paint):
403         * UIProcess/gtk/AcceleratedBackingStoreX11.h: Added.
404         * UIProcess/gtk/WaylandCompositor.cpp: Added.
405         (WebKit::WaylandCompositor::singleton):
406         (WebKit::WaylandCompositor::Buffer::getOrCreate):
407         (WebKit::WaylandCompositor::Buffer::Buffer):
408         (WebKit::WaylandCompositor::Buffer::~Buffer):
409         (WebKit::WaylandCompositor::Buffer::destroyListenerCallback):
410         (WebKit::WaylandCompositor::Buffer::use):
411         (WebKit::WaylandCompositor::Buffer::unuse):
412         (WebKit::WaylandCompositor::Buffer::createImage):
413         (WebKit::WaylandCompositor::Buffer::size):
414         (WebKit::WaylandCompositor::Surface::Surface):
415         (WebKit::WaylandCompositor::Surface::~Surface):
416         (WebKit::WaylandCompositor::Surface::makePendingBufferCurrent):
417         (WebKit::WaylandCompositor::Surface::attachBuffer):
418         (WebKit::WaylandCompositor::Surface::requestFrame):
419         (WebKit::WaylandCompositor::Surface::prepareTextureForPainting):
420         (WebKit::WaylandCompositor::Surface::commit):
421         (WebKit::WaylandCompositor::initializeEGL):
422         (WebKit::createWaylandLoopSource):
423         (WebKit::WaylandCompositor::WaylandCompositor):
424         (WebKit::WaylandCompositor::getTexture):
425         (WebKit::WaylandCompositor::bindSurfaceToWebPage):
426         (WebKit::WaylandCompositor::registerWebPage):
427         (WebKit::WaylandCompositor::unregisterWebPage):
428         * UIProcess/gtk/WaylandCompositor.h: Added.
429         (WebKit::WaylandCompositor::Buffer::createWeakPtr):
430         (WebKit::WaylandCompositor::Surface::setWebPage):
431         (WebKit::WaylandCompositor::isRunning):
432         (WebKit::WaylandCompositor::displayName):
433         * UIProcess/gtk/WebPreferencesGtk.cpp:
434         (WebKit::WebPreferences::platformInitializeStore):
435         * UIProcess/gtk/XDamageNotifier.cpp: Removed.
436         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
437         (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
438         (WebKit::ThreadedCoordinatedLayerTreeHost::invalidate):
439         (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
440         (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
441         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
442         * WebProcess/WebPage/gtk/AcceleratedSurface.cpp: Added.
443         (WebKit::AcceleratedSurface::create):
444         (WebKit::AcceleratedSurface::AcceleratedSurface):
445         (WebKit::AcceleratedSurface::~AcceleratedSurface):
446         (WebKit::AcceleratedSurface::resize):
447         * WebProcess/WebPage/gtk/AcceleratedSurface.h: Added.
448         (WebKit::AcceleratedSurface::window):
449         (WebKit::AcceleratedSurface::surfaceID):
450         * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp: Added.
451         (WebKit::waylandCompositorDisplay):
452         (WebKit::AcceleratedSurfaceWayland::create):
453         (WebKit::AcceleratedSurfaceWayland::AcceleratedSurfaceWayland):
454         (WebKit::AcceleratedSurfaceWayland::~AcceleratedSurfaceWayland):
455         (WebKit::AcceleratedSurfaceWayland::resize):
456         * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h: Added.
457         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/gtk/RedirectedXCompositeWindow.cpp.
458         (WebKit::AcceleratedSurfaceX11::create):
459         (WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11):
460         (WebKit::AcceleratedSurfaceX11::~AcceleratedSurfaceX11):
461         (WebKit::AcceleratedSurfaceX11::resize):
462         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h: Renamed from Source/WebKit2/WebProcess/WebPage/gtk/RedirectedXCompositeWindow.h.
463         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
464         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
465         (WebKit::LayerTreeHostGtk::makeContextCurrent):
466         (WebKit::LayerTreeHostGtk::invalidate):
467         (WebKit::LayerTreeHostGtk::sizeDidChange):
468         (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
469         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler): Deleted.
470         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
471         * WebProcess/WebProcess.cpp:
472         (WebKit::WebProcess::initializeWebProcess): Initialize the wayland compositor display name.
473         * WebProcess/WebProcess.h:
474         (WebKit::WebProcess::waylandCompositorDisplayName): Return the wayland compositor display name.
475
476 2016-08-27  Jonathan Bedard  <jbedard@apple.com>
477
478         WTR needs an implementation of setAutomaticLinkDetectionEnabled
479         https://bugs.webkit.org/show_bug.cgi?id=87162
480
481         Reviewed by Darin Adler
482
483         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
484         (WKBundleSetAutomaticLinkDetectionEnabled): Added WKBundleSetAutomaticLinkDetectionEnabled definition.
485         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetAutomaticLinkDetectionEnabled declaration.
486         * WebProcess/InjectedBundle/InjectedBundle.cpp:
487         (WebKit::InjectedBundle::setAutomaticLinkDetectionEnabled): Added setAutomaticLinkDetectionEnabled definition.
488         * WebProcess/InjectedBundle/InjectedBundle.h: Added setAutomaticLinkDetectionEnabled declaration.
489         * WebProcess/WebProcess.h: Declared setTextCheckerState public.
490
491 2016-08-27  Carlos Garcia Campos  <cgarcia@igalia.com>
492
493         [GTK][Threaded Compositor] Several flaky tests
494         https://bugs.webkit.org/show_bug.cgi?id=161242
495
496         Reviewed by Michael Catanzaro.
497
498         We still have a lot of flaky tests since we switched to the threaded compositor. The UI process might
499         take the screenshot too early, before everything is actually painted. I can't reproduce the problem, so this is
500         actually a speculative fix or workaround. Our implementation of DrawingArea::dispatchAfterEnsuringDrawing() is
501         quite simple, we just dispatch the callback in the next run loop iteration, which doesn't really ensures any
502         drawing at all. So, we can wait for draw events before dispatching the given callback. Since we don't really
503         know if draw events were already processed before dispatchAfterEnsuringDrawing() is called, or if there will be
504         more than one damage event in a short time, this patch waits up to 1 second for draw events, and if a draw
505         happens it stops if there isn't another draw event in the next 100ms. This should ensure a drawing if it was
506         really needed.
507
508         * UIProcess/DrawingAreaProxyImpl.cpp:
509         (WebKit::DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor):
510         (WebKit::DrawingAreaProxyImpl::DrawingMonitor::~DrawingMonitor):
511         (WebKit::DrawingAreaProxyImpl::DrawingMonitor::webViewDrawCallback):
512         (WebKit::DrawingAreaProxyImpl::DrawingMonitor::start):
513         (WebKit::DrawingAreaProxyImpl::DrawingMonitor::stop):
514         (WebKit::DrawingAreaProxyImpl::DrawingMonitor::didDraw):
515         (WebKit::DrawingAreaProxyImpl::dispatchAfterEnsuringDrawing):
516         * UIProcess/DrawingAreaProxyImpl.h:
517
518 2016-08-26  Sam Weinig  <sam@webkit.org>
519
520         Remove support for ENABLE_LEGACY_WEB_AUDIO
521         https://bugs.webkit.org/show_bug.cgi?id=161262
522
523         Reviewed by Anders Carlsson.
524
525         * Configurations/FeatureDefines.xcconfig:
526         Remove ENABLE_LEGACY_WEB_AUDIO.
527
528 2016-08-26  Anders Carlsson  <andersca@apple.com>
529
530         Get rid of NetworkResourceLoader::sendAbortingOnFailure
531         https://bugs.webkit.org/show_bug.cgi?id=161267
532
533         Reviewed by Dan Bernstein.
534
535         NetworkResourceLoader::sendAbortingOnFailure sends an IPC message, and if IPC::Connection::send returns false,
536         it will abort the network resource load.
537
538         IPC::Connection::send will only return false if the connection is invalid, and when it becomes invalidated the
539         connection client member function "didClose" is invoked. For the network process, this will call abort on all outstanding
540         network loads.
541
542         Auditing all the sendAbortingOnFailure call sites, shows that none of them can be called with an invalid connection,
543         so replace sendAbortingOnFailure with send.
544
545         * NetworkProcess/NetworkResourceLoader.cpp:
546         (WebKit::NetworkResourceLoader::didReceiveResponse):
547         This is a NetworkLoadClient function which won't be called if the load has been aborted.
548
549         (WebKit::NetworkResourceLoader::didReceiveBuffer):
550         Ditto.
551
552         (WebKit::NetworkResourceLoader::didFinishLoading):
553         Ditto. Also, update a call to sendBufferMaybeAborting to sendBuffer.
554
555         (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
556         This is another NetworkLoadClient function.
557
558         (WebKit::NetworkResourceLoader::bufferingTimerFired):
559         The buffering timer is stopped when abort() is called.
560
561         (WebKit::NetworkResourceLoader::sendBuffer):
562         Rename this from sendBufferMaybeAborting. It has three call sites:
563         - didReceiveBuffer and didFinishLoading are both NetworkLoadClient functions.
564         - didRetrieveCacheEntry is called from didFinishLoading (a NetworkLoadClient function) and from
565           the completion function of retrieveCacheEntry, which has an early return for when the loader has been aborted.
566
567         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
568         This is called from the retrieveCacheEntry completion function, which has an early return for when the loader has been aborted.
569
570         (WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
571         Ditto.
572
573         (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted.
574         * NetworkProcess/NetworkResourceLoader.h:
575
576 2016-08-26  Dan Bernstein  <mitz@apple.com>
577
578         [Cocoa] Infinite recursion calling -charValue on a WKNSNumber
579         https://bugs.webkit.org/show_bug.cgi?id=161258
580
581         Reviewed by Anders Carlsson.
582
583         * Shared/Cocoa/WKNSNumber.mm:
584         (-[WKNSNumber charValue]): Override this…
585         (-[WKNSNumber boolValue]): …not this.
586
587 2016-08-26  Csaba Osztrogonác  <ossy@webkit.org>
588
589         [EFL][GTK] REGRESSION(204877): Fix the clean build
590         https://bugs.webkit.org/show_bug.cgi?id=161240
591
592         Reviewed by Carlos Garcia Campos.
593
594         * Scripts/generate-forwarding-headers.pl: Added back multiple include-path support. (removed by r183389)
595
596 2016-08-26  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>
597
598         Unreviewed EFL build fix since r204996.
599
600         * UIProcess/efl/WebPageProxyEfl.cpp:
601         (WebKit::WebPageProxy::editorStateChanged):
602         (WebKit::WebPageProxy::setThemePath):
603         (WebKit::WebPageProxy::confirmComposition):
604         (WebKit::WebPageProxy::setComposition):
605         (WebKit::WebPageProxy::cancelComposition):
606
607 2016-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
608
609         Unreviewed. Fix GTK+ build after r204986 and r204996.
610
611         * Platform/IPC/unix/ConnectionUnix.cpp:
612         (IPC::Connection::willSendSyncMessage):
613         (IPC::Connection::didReceiveSyncReply):
614         * UIProcess/WebPageProxy.cpp:
615         (WebKit::WebPageProxy::drawPagesForPrinting):
616
617 2016-08-25  Anders Carlsson  <andersca@apple.com>
618
619         Replace all IPC message send flags with OptionSet
620         https://bugs.webkit.org/show_bug.cgi?id=161211
621
622         Reviewed by Tim Horton.
623
624         * NetworkProcess/NetworkResourceLoader.cpp:
625         (WebKit::NetworkResourceLoader::didFailLoading):
626         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
627         * NetworkProcess/NetworkResourceLoader.h:
628         * Platform/IPC/Connection.cpp:
629         (IPC::WaitForMessageState::WaitForMessageState):
630         (IPC::Connection::sendMessage):
631         (IPC::Connection::sendSyncReply):
632         (IPC::Connection::waitForMessage):
633         (IPC::Connection::sendSyncMessage):
634         (IPC::Connection::sendSyncMessageFromSecondaryThread):
635         (IPC::Connection::waitForSyncReply):
636         (IPC::Connection::processIncomingMessage):
637         * Platform/IPC/Connection.h:
638         (IPC::Connection::send):
639         (IPC::Connection::sendSync):
640         (IPC::Connection::waitForAndDispatchImmediately):
641         * Platform/IPC/MessageSender.cpp:
642         (IPC::MessageSender::sendMessage):
643         * Platform/IPC/MessageSender.h:
644         (IPC::MessageSender::send):
645         (IPC::MessageSender::sendSync):
646         * Platform/IPC/mac/ConnectionMac.mm:
647         (IPC::Connection::open):
648         (IPC::Connection::willSendSyncMessage):
649         (IPC::Connection::didReceiveSyncReply):
650         * PluginProcess/mac/PluginControllerProxyMac.mm:
651         (WebKit::PluginControllerProxy::setComplexTextInputState):
652         * UIProcess/ChildProcessProxy.cpp:
653         (WebKit::ChildProcessProxy::sendMessage):
654         (WebKit::ChildProcessProxy::didFinishLaunching):
655         * UIProcess/ChildProcessProxy.h:
656         (WebKit::ChildProcessProxy::send):
657         (WebKit::ChildProcessProxy::sendSync):
658         * UIProcess/Databases/DatabaseProcessProxy.cpp:
659         (WebKit::DatabaseProcessProxy::getDatabaseProcessConnection):
660         * UIProcess/Network/NetworkProcessProxy.cpp:
661         (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
662         * UIProcess/Plugins/PluginProcessProxy.cpp:
663         (WebKit::PluginProcessProxy::getPluginProcessConnection):
664         * UIProcess/WebEditCommandProxy.cpp:
665         (WebKit::WebEditCommandProxy::unapply):
666         (WebKit::WebEditCommandProxy::reapply):
667         * UIProcess/WebPageProxy.cpp:
668         (WebKit::printingSendOptions):
669         (WebKit::WebPageProxy::preferencesDidChange):
670         (WebKit::WebPageProxy::sendMessage):
671         (WebKit::WebPageProxy::beginPrinting):
672         (WebKit::WebPageProxy::endPrinting):
673         (WebKit::WebPageProxy::computePagesForPrinting):
674         (WebKit::WebPageProxy::drawRectToImage):
675         (WebKit::WebPageProxy::drawPagesToPDF):
676         (WebKit::WebPageProxy::drawPagesForPrinting):
677         (WebKit::WebPageProxy::setMinimumLayoutSize): Deleted.
678         (WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight): Deleted.
679         (WebKit::WebPageProxy::handleAlternativeTextUIResult): Deleted.
680         * UIProcess/WebPageProxy.h:
681         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
682         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
683         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
684         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState):
685         * WebProcess/Plugins/PluginProxy.cpp:
686         (WebKit::PluginProxy::geometryDidChange):
687         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
688         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
689         (WebKit::WebChromeClient::runJavaScriptAlert):
690         (WebKit::WebChromeClient::runJavaScriptConfirm):
691         (WebKit::WebChromeClient::runJavaScriptPrompt):
692         (WebKit::WebChromeClient::print):
693         (WebKit::WebChromeClient::exceededDatabaseQuota):
694         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
695         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
696         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
697         * WebProcess/WebPage/WebFrame.cpp:
698         (WebKit::WebFrame::createWithCoreMainFrame):
699         (WebKit::WebFrame::createSubframe):
700         * WebProcess/WebPage/WebPage.cpp:
701         (WebKit::WebPage::sendPostLayoutEditorStateIfNeeded):
702         (WebKit::WebPage::postSynchronousMessageForTesting):
703         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
704         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
705
706 2016-08-25  Anders Carlsson  <andersca@apple.com>
707
708         Remove some more MessageRecorder gunk
709         https://bugs.webkit.org/show_bug.cgi?id=161209
710
711         Reviewed by Tim Horton.
712
713         * DatabaseProcess/DatabaseProcess.h:
714         * DatabaseProcess/DatabaseToWebProcessConnection.h:
715         * NetworkProcess/NetworkConnectionToWebProcess.h:
716         * NetworkProcess/NetworkProcess.h:
717         * Platform/IPC/Connection.h:
718         * Platform/IPC/ProcessType.h: Removed.
719         * PluginProcess/PluginProcess.h:
720         * PluginProcess/WebProcessConnection.h:
721         * UIProcess/Databases/DatabaseProcessProxy.h:
722         * UIProcess/Network/NetworkProcessProxy.h:
723         * UIProcess/Plugins/PluginProcessProxy.h:
724         * UIProcess/WebProcessProxy.h:
725         * WebKit2.xcodeproj/project.pbxproj:
726         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
727         * WebProcess/Network/NetworkProcessConnection.h:
728         * WebProcess/Plugins/PluginProcessConnection.h:
729         * WebProcess/WebPage/WebInspector.h:
730         * WebProcess/WebPage/WebInspectorUI.h:
731         * WebProcess/WebProcess.h:
732
733 2016-08-25  Johan K. Jensen  <johan_jensen@apple.com>
734
735         Don't store networkLoadTiming in the disk cache
736         https://bugs.webkit.org/show_bug.cgi?id=161161
737
738         Reviewed by Antti Koivisto.
739
740         * NetworkProcess/cache/NetworkCacheStorage.h: Updated version to 10.
741         * NetworkProcess/cache/NetworkCacheDecoder.h:
742         * NetworkProcess/cache/NetworkCacheEncoder.h:
743         * Platform/IPC/Decoder.h:
744         * Platform/IPC/Encoder.h:
745         Added isIPCDecoder/isIPCEncoder static members.
746
747 2016-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
748
749         [GTK][Threaded Compositor] Several flaky tests due to differences in scrollbars
750         https://bugs.webkit.org/show_bug.cgi?id=160450
751
752         Reviewed by Michael Catanzaro.
753
754         The issue is that ThreadedCompositor::didChangeVisibleRect() dispatches the setVisibleContentsRect() call that
755         ends up in CompositingCoordinator. Since we're compositing the scrollbars as well, this visible contents rect
756         needs to encompass the complete width of the view, but that's not happening.
757         In case of non-overlay scrollbars, the scrollbars are clipped from this rect, but that doesn't prevent the
758         scrollbar overlay layers to be flushed and rendered. What does happen is that during tile creation in the
759         backing store the tiles that would normally intersect the visible rect of the view (if it were spanning over the
760         whole actual visible area) are sorted by distance to the visible rect.
761         The top of the two tiles used for the scrollbar is closer to the visible rect, so that gets created and filled
762         in first. The second tile is stored as pending for creation, and does get rendered at the point of the next
763         layer flush.
764
765         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
766         (WebKit::ThreadedCoordinatedLayerTreeHost::setVisibleContentsRect): Update the visible rect taking into account
767         the non-overlay scrollbars before passing it to the compositor.
768
769 2016-08-24  JF Bastien  <jfbastien@apple.com>
770
771         cmake build broken by MessageRecorder removal
772         https://bugs.webkit.org/show_bug.cgi?id=161175
773
774         Reviewed by Dean Jackson.
775
776         * PlatformMac.cmake:
777
778 2016-08-24  Jonathan Bedard  <jbedard@apple.com>
779
780         FocusController multiple dereferenced NULL pointers
781         https://bugs.webkit.org/show_bug.cgi?id=160808
782
783         Reviewed by Darin Adler.
784
785         * WebProcess/WebPage/WebPage.cpp:
786         (WebKit::WebPage::setInitialFocus): Should use nullptr, not 0 to initialize NULL pointer.
787
788 2016-08-23  Anders Carlsson  <andersca@apple.com>
789
790         Add enum traits and use them in the IPC::Decoder
791         https://bugs.webkit.org/show_bug.cgi?id=161103
792
793         Reviewed by Sam Weinig.
794
795         * Platform/IPC/Decoder.h:
796         * Platform/IPC/Encoder.h:
797         Add new encode/decode functions.
798
799         * Shared/mac/ArgumentCodersMac.mm:
800         Change NSType to be a strongly typed enum. Use encode/decode
801         instead of encodeEnum/decodeEnum since the latter don't have the
802         enum check.
803
804 2016-08-24  Filip Pizlo  <fpizlo@apple.com>
805
806         Unreviewed, roll out r204901, r204897, r204866, r204856, r204854.
807
808         * UIProcess/ViewGestureController.cpp:
809         * UIProcess/WebPageProxy.cpp:
810         * UIProcess/WebProcessPool.cpp:
811         * UIProcess/WebProcessProxy.cpp:
812         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
813         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
814
815 2016-08-24  Anders Carlsson  <andersca@apple.com>
816
817         In some cases, an IPC::Connection won't know when the other end has gone away
818         https://bugs.webkit.org/show_bug.cgi?id=161153
819         rdar://problem/27896368
820
821         Reviewed by Dan Bernstein.
822
823         When being asked to invalidate a connection that isn't yet connected, make sure to release
824         our send and receive rights so that the other end will get a failure when trying to connect.
825
826         * Platform/IPC/mac/ConnectionMac.mm:
827         (IPC::Connection::platformInvalidate):
828
829 2016-08-24  Dan Bernstein  <mitz@apple.com>
830
831         Add a convenience function for creating a WKFrameHandleRef from a WKFrameRef without going through WKFrameInfoRef
832         https://bugs.webkit.org/show_bug.cgi?id=161152
833
834         Reviewed by Anders Carlsson.
835
836         * UIProcess/API/C/WKFrame.cpp:
837         (WKFrameCreateFrameHandle): Added. Creates a handle with the frame’s frameID.
838         * UIProcess/API/C/WKFrame.h:
839
840 2016-08-24  Dan Bernstein  <mitz@apple.com>
841
842         [Cocoa] Can’t "po" WKObject instances
843         https://bugs.webkit.org/show_bug.cgi?id=161151
844
845         Reviewed by Anders Carlsson.
846
847         * Shared/Cocoa/WKObject.mm:
848         (-[WKObject debugDescription]): Implement and forward to the target or print a generic
849           description.
850
851 2016-08-24  Brady Eidson  <beidson@apple.com>
852
853         Get timestamps and ids working in WK2 gamepads (and test them!)
854         https://bugs.webkit.org/show_bug.cgi?id=161112
855
856         Reviewed by Alex Christensen.
857
858         * Shared/Gamepad/GamepadData.cpp:
859         (WebKit::GamepadData::GamepadData):
860         (WebKit::GamepadData::encode):
861         (WebKit::GamepadData::decode):
862         * Shared/Gamepad/GamepadData.h:
863         (WebKit::GamepadData::id):
864         (WebKit::GamepadData::index): Deleted.
865         
866         * UIProcess/Gamepad/UIGamepad.cpp:
867         (WebKit::UIGamepad::UIGamepad):
868         (WebKit::UIGamepad::condensedGamepadData):
869         (WebKit::UIGamepad::fullGamepadData): Include the ID for initial WebGamepad creation.
870         (WebKit::UIGamepad::gamepadData): Deleted.
871         * UIProcess/Gamepad/UIGamepad.h:
872         
873         * UIProcess/Gamepad/UIGamepadProvider.cpp:
874         (WebKit::UIGamepadProvider::snapshotGamepads):
875         
876         * UIProcess/WebProcessPool.cpp:
877         (WebKit::WebProcessPool::gamepadConnected):
878         (WebKit::WebProcessPool::setInitialConnectedGamepads):
879         
880         * WebProcess/Gamepad/WebGamepad.cpp:
881         (WebKit::WebGamepad::WebGamepad):
882         (WebKit::WebGamepad::updateValues):
883
884 2016-08-24  Hunseop Jeong  <hs85.jeong@samsung.com>
885
886         [EFL] Fix test_ewk2_view
887         https://bugs.webkit.org/show_bug.cgi?id=161131
888
889         Reviewed by Gyuyoung Kim.
890
891         ewk_view_title_changed: null is treated as the string "null" after r203487.
892
893         ewk_view_page_contents_get: aligned encoding labels after r204605.
894
895         * UIProcess/API/efl/tests/resources/resultMHTML.mht:
896         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
897         (TEST_F):
898
899 2016-08-23  Simon Fraser  <simon.fraser@apple.com>
900
901         Add some logging for WKSelectionDrawingInfo
902         https://bugs.webkit.org/show_bug.cgi?id=161055
903
904         Reviewed by Tim Horton.
905
906         Add a Selection logging channel for WK2, and dump WKSelectionDrawingInfo when it changes.
907
908         * Platform/Logging.h:
909         * UIProcess/ios/WKContentViewInteraction.h:
910         * UIProcess/ios/WKContentViewInteraction.mm:
911         (WebKit::operator<<):
912         (-[WKContentView _updateChangedSelection:]):
913
914 2016-08-23  Ryosuke Niwa  <rniwa@webkit.org>
915
916         Another CMake build fix attempt after r204852.
917
918         * CMakeLists.txt:
919
920 2016-08-22  Filip Pizlo  <fpizlo@apple.com>
921
922         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
923         https://bugs.webkit.org/show_bug.cgi?id=160125
924
925         Reviewed by Geoffrey Garen.
926         
927         Just rewiring some #includes.
928
929         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
930         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
931
932 2016-08-23  Brady Eidson  <beidson@apple.com>
933
934         WK2 Gamepad layout test support.
935         https://bugs.webkit.org/show_bug.cgi?id=134671
936
937         Reviewed by Alex Christensen.
938         
939         - Teach the UIGamepadProvider to use the default shared provider.
940         - Especially if its the MockGamepadProvider, don't overwrite it.
941
942         * Shared/Gamepad/GamepadData.cpp:
943         (WebKit::GamepadData::GamepadData):
944         (WebKit::GamepadData::encode):
945         (WebKit::GamepadData::decode):
946         (WebKit::GamepadData::loggingString):
947         (WebKit::GamepadData::isNull): Deleted.
948         * Shared/Gamepad/GamepadData.h:
949         (WebKit::GamepadData::GamepadData):
950         (WebKit::GamepadData::isNull):
951         (WebKit::GamepadData::index):
952         (WebKit::GamepadData::axisValues):
953         (WebKit::GamepadData::buttonValues):
954
955         * UIProcess/Gamepad/UIGamepad.h:
956
957         * UIProcess/Gamepad/UIGamepadProvider.cpp:
958         (WebKit::UIGamepadProvider::UIGamepadProvider):
959         (WebKit::UIGamepadProvider::~UIGamepadProvider):
960         (WebKit::UIGamepadProvider::platformGamepadInputActivity):
961         (WebKit::UIGamepadProvider::startMonitoringGamepads):
962         (WebKit::UIGamepadProvider::stopMonitoringGamepads):
963         (WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider):
964         * UIProcess/Gamepad/UIGamepadProvider.h:
965
966         * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
967         (WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider):
968         (WebKit::UIGamepadProvider::platformStopMonitoringInput):
969         (WebKit::UIGamepadProvider::platformStartMonitoringInput):
970         (WebKit::UIGamepadProvider::platformStartMonitoringGamepads): Deleted.
971         (WebKit::UIGamepadProvider::platformStopMonitoringGamepads): Deleted.
972         (WebKit::UIGamepadProvider::platformGamepads): Deleted.
973
974         * UIProcess/WebPageProxy.h:
975
976         * WebProcess/Gamepad/WebGamepad.cpp:
977         (WebKit::WebGamepad::WebGamepad):
978         (WebKit::WebGamepad::updateValues):
979         * WebProcess/Gamepad/WebGamepad.h:
980
981         * WebProcess/Gamepad/WebGamepadProvider.cpp:
982         (WebKit::WebGamepadProvider::gamepadConnected):
983         * WebProcess/Gamepad/WebGamepadProvider.h:
984
985         * WebProcess/WebPage/WebPage.h:
986         * WebProcess/WebProcess.h:
987
988 2016-08-23  Dave Hyatt  <hyatt@apple.com>
989
990         Add pref for enabling new CSS parsing and move parser files into subdirectory.
991         https://bugs.webkit.org/show_bug.cgi?id=161095
992
993         Reviewed by Sam Weinig.
994
995         * Shared/WebPreferencesDefinitions.h:
996         * UIProcess/API/C/WKPreferences.cpp:
997         (WKPreferencesSetNewCSSParserEnabled):
998         (WKPreferencesGetNewCSSParserEnabled):
999         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1000         * WebProcess/WebPage/WebPage.cpp:
1001         (WebKit::WebPage::updatePreferences):
1002
1003 2016-08-23  Chris Dumez  <cdumez@apple.com>
1004
1005         Unreviewed, rolling out r204243.
1006
1007         Caused some layout test failures
1008
1009         Reverted changeset:
1010
1011         "Write API test to cover crash fix in r204135"
1012         https://bugs.webkit.org/show_bug.cgi?id=160587
1013         http://trac.webkit.org/changeset/204243
1014
1015 2016-08-23  Hunseop Jeong  <hs85.jeong@samsung.com>
1016
1017         [EFL] URTBF after r204743.
1018
1019         * Shared/WebBatteryStatus.cpp: Remove Arguments.h.
1020
1021 2016-08-22  Yusuke Suzuki  <utatane.tea@gmail.com>
1022
1023         Use Messages::XXX...::Reply explicitly
1024         https://bugs.webkit.org/show_bug.cgi?id=161075
1025
1026         Reviewed by Carlos Garcia Campos.
1027
1028         std::tuple's constructor is annotated as `explicit`.
1029         So we cannot use the implicit conversion here.
1030         This causes the build failure in EFL and GTK.
1031
1032         Looking through code, the other places use ::Reply explicitly.
1033         So in this patch, we follow that.
1034
1035         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1036         (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
1037         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
1038         (WebKit::InjectedBundlePageFullScreenClient::supportsFullScreen):
1039
1040 2016-08-22  Anders Carlsson  <andersca@apple.com>
1041
1042         Remove Arguments.h
1043         https://bugs.webkit.org/show_bug.cgi?id=161060
1044
1045         Reviewed by Tim Horton.
1046
1047         * Platform/IPC/Arguments.h: Removed.
1048         (IPC::Arguments::Arguments): Deleted.
1049         (IPC::Arguments::encode): Deleted.
1050         (IPC::Arguments::decode): Deleted.
1051         * Platform/IPC/Connection.h:
1052         * Platform/IPC/HandleMessage.h:
1053         * Shared/AssistedNodeInformation.cpp:
1054         * Shared/Cocoa/DataDetectionResult.mm:
1055         * Shared/EditorState.cpp:
1056         * Shared/WebContextMenuItemData.cpp:
1057         * Shared/WebMouseEvent.cpp:
1058         * Shared/WebPlatformTouchPoint.cpp:
1059         * Shared/WebPopupItem.cpp:
1060         * Shared/WebTouchEvent.cpp:
1061         * Shared/WebWheelEvent.cpp:
1062         * Shared/ios/InteractionInformationAtPosition.mm:
1063         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1064         * Shared/ios/WebTouchEventIOS.cpp:
1065         * Shared/mac/WebGestureEvent.cpp:
1066         * WebKit2.xcodeproj/project.pbxproj:
1067         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1068         * WebProcess/WebPage/WebPage.cpp:
1069
1070 2016-08-22  Anders Carlsson  <andersca@apple.com>
1071
1072         Move tuple coding to ArgumentCoders.h
1073         https://bugs.webkit.org/show_bug.cgi?id=161059
1074
1075         Reviewed by Tim Horton.
1076
1077         * Platform/IPC/ArgumentCoders.h:
1078         (IPC::TupleCoder::encode):
1079         (IPC::TupleCoder::decode):
1080         * Platform/IPC/Arguments.h:
1081         (IPC::TupleCoder::encode): Deleted.
1082         (IPC::TupleCoder::decode): Deleted.
1083         * Scripts/webkit/messages.py:
1084         (forward_declarations_and_headers):
1085
1086 2016-08-22  Anders Carlsson  <andersca@apple.com>
1087
1088         Simplify the generated message structs
1089         https://bugs.webkit.org/show_bug.cgi?id=161057
1090
1091         Reviewed by Geoffrey Garen.
1092
1093         Use a class template to transform the Reply and Argument tuple types for encoding/decoding
1094         instead of generating them for each message.
1095
1096         * Platform/IPC/HandleMessage.h:
1097         (IPC::handleMessage):
1098         (IPC::handleMessageDelayed):
1099         * Scripts/webkit/messages.py:
1100         (reply_type):
1101         (message_to_struct_declaration):
1102         (decode_type): Deleted.
1103
1104 2016-08-19  Anders Carlsson  <andersca@apple.com>
1105
1106         Remove MessageRecorder
1107         https://bugs.webkit.org/show_bug.cgi?id=161022
1108
1109         Reviewed by Tim Horton.
1110
1111         * Platform/IPC/ArgumentCoders.cpp:
1112         (IPC::ArgumentCoder<uuid_t>::encode): Deleted.
1113         (IPC::ArgumentCoder<uuid_t>::decode): Deleted.
1114         * Platform/IPC/ArgumentCoders.h:
1115         * Platform/IPC/Connection.cpp:
1116         (IPC::Connection::sendMessage):
1117         (IPC::Connection::sendSyncMessage):
1118         (IPC::Connection::sendSyncMessageFromSecondaryThread):
1119         (IPC::Connection::dispatchSyncMessage): Deleted.
1120         (IPC::Connection::dispatchMessage): Deleted.
1121         * Platform/IPC/Connection.h:
1122         * Platform/IPC/Encoder.cpp:
1123         (IPC::Encoder::encodeHeader): Deleted.
1124         * Platform/IPC/MessageRecorder.cpp: Removed.
1125         (IPC::MessageRecorder::isEnabled): Deleted.
1126         (IPC::MessageRecorder::recordOutgoingMessage): Deleted.
1127         (IPC::MessageRecorder::recordIncomingMessage): Deleted.
1128         (IPC::MessageRecorder::MessageProcessingToken::MessageProcessingToken): Deleted.
1129         (IPC::MessageRecorder::MessageProcessingToken::~MessageProcessingToken): Deleted.
1130         * Platform/IPC/MessageRecorder.h: Removed.
1131         (IPC::MessageRecorder::MessageRecorder): Deleted.
1132         * Platform/IPC/MessageRecorderProbes.d: Removed.
1133         * WebKit2.xcodeproj/project.pbxproj:
1134
1135 2016-08-22  Alex Christensen  <achristensen@webkit.org>
1136
1137         Fix Mac CMake build after r204717.
1138
1139         * PlatformMac.cmake:
1140
1141 2016-08-22  Simon Fraser  <simon.fraser@apple.com>
1142
1143         <select> menu on iPad causes shifting of hit-testing areas
1144         https://bugs.webkit.org/show_bug.cgi?id=150079
1145
1146         Reviewed by Tim Horton.
1147
1148         -isAssistingNode (aka the poorly named isEditable) is input into WebPageProxy::computeCustomFixedPositionRect(),
1149         so when it changes we have to update visible rects. We were doing this on focus, but failing
1150         to do it on blur.
1151
1152         Added the ability to test by:
1153         1. Making it possible to initiate an animated scroll in the UI process
1154         2. Adding callbacks for starting and ending interaction with a form control. Sadly
1155         the "ending interaction" for <select> popovers on iPad isn't late enough, since we
1156         have no way currently to know when the dimming view behind the popover animates out,
1157         so for now the test keeps trying to tap a button.
1158
1159         Test: fast/forms/ios/ipad/unfocus-inside-fixed-hittest.html
1160
1161         * UIProcess/API/Cocoa/WKWebView.mm:
1162         (-[WKWebView _zoomToPoint:atScale:animated:]):
1163         (-[WKWebView _scrollToRect:origin:minimumScrollDistance:]):
1164         (-[WKWebView _scrollByContentOffset:]):
1165         (-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
1166         (-[WKWebView didStartFormControlInteraction]):
1167         (-[WKWebView didEndFormControlInteraction]):
1168         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1169         * UIProcess/ios/WKContentView.mm:
1170         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
1171         * UIProcess/ios/WKContentViewInteraction.mm:
1172         (-[WKContentView setIsEditable:]):
1173         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
1174         (-[WKContentView _stopAssistingNode]):
1175
1176 2016-08-22  Daniel Bates  <dabates@apple.com>
1177
1178         [iOS] <a ping> and <area ping> tests time out
1179         https://bugs.webkit.org/show_bug.cgi?id=156857
1180
1181         Reviewed by Simon Fraser.
1182
1183         Support single tapping on an HTML area element in WebKit2 just as we do in Legacy WebKit.
1184
1185         WebKit2 commits to clicking a "clickable" DOM node on a single tap only if it has a
1186         renderer. An HTML area element represents a hyperlink in an image map and does not have
1187         a renderer.
1188
1189         * WebProcess/WebPage/ios/WebPageIOS.mm:
1190         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Compute the tap highlight with respect
1191         to the renderer for the image map associated with the tapped HTML area element (if it has one).
1192         (WebKit::WebPage::commitPotentialTap): Allow committing a potential tap on an HTML area element.
1193
1194 2016-08-22  Darin Adler  <darin@apple.com>
1195
1196         Move Objective-C DOM bindings from WebCore to legacy WebKit
1197         https://bugs.webkit.org/show_bug.cgi?id=160654
1198
1199         Reviewed by Alex Christensen.
1200
1201         * WebProcess/WebCoreSupport/WebEditorClient.h: Updated to use RefPtr.
1202         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
1203         (WebKit::WebEditorClient::documentFragmentFromDelegate): Ditto.
1204
1205         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: Removed unneeded includes
1206         of Objective-C DOM headers that are now part of legacy WebKit, not WebCore.
1207         But this file doesn't need to depend on those headers at all.
1208
1209 2016-08-22  Chris Dumez  <cdumez@apple.com>
1210
1211         [iOS] Wait a few seconds before release network activity assertion after a load
1212         https://bugs.webkit.org/show_bug.cgi?id=160975
1213         <rdar://problem/27910964>
1214
1215         Reviewed by Darin Adler.
1216
1217         Some apps do several loads one after the other in a non-visible view.
1218         This causes us to release the background assertion every time a load
1219         completes and then take one again less than a second after. Every
1220         time we release the assertion, we send a PrepareToSuspend IPC to the
1221         WebContent process, which does all the clean up to get ready to
1222         suspend, only to get a CancelPrepareReadyToSuspend later on because
1223         the next load has started. To work around this problem, we now wait
1224         a few seconds before releasing the background activity after a load.
1225
1226         * UIProcess/Cocoa/NavigationState.h:
1227         * UIProcess/Cocoa/NavigationState.mm:
1228         (WebKit::NavigationState::NavigationState):
1229         (WebKit::NavigationState::releaseNetworkActivityToken):
1230         (WebKit::NavigationState::didChangeIsLoading):
1231
1232 2016-08-22  Youenn Fablet  <youenn@apple.com>
1233
1234         [Fetch API] Activate fetch api runtime flag by default
1235         https://bugs.webkit.org/show_bug.cgi?id=160452
1236
1237         Reviewed by Alex Christensen.
1238
1239         * Shared/WebPreferencesDefinitions.h:
1240
1241 2016-08-22  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>
1242
1243         [SOUP] Change MessageDecoder with Decoder
1244         https://bugs.webkit.org/show_bug.cgi?id=161040
1245
1246         Reviewed by Darin Adler.
1247
1248         Clean up MessageDecoder in files of Soup.
1249
1250         * Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
1251         (WebKit::WebPage::didReceiveMessage):
1252         * UIProcess/soup/WebSoupRequestManagerProxy.h:
1253         * WebProcess/soup/WebSoupRequestManager.h:
1254
1255 2016-08-21  Alex Christensen  <achristensen@webkit.org>
1256
1257         Use Document& instead of Document* when getting cookies
1258         https://bugs.webkit.org/show_bug.cgi?id=161011
1259
1260         Reviewed by Darin Adler.
1261
1262         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
1263         (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
1264         (WebKit::WebAutomationSessionProxy::deleteCookie):
1265         * WebProcess/Plugins/PluginView.cpp:
1266         (WebKit::PluginView::cookiesForURL):
1267         (WebKit::PluginView::setCookiesForURL):
1268         (WebKit::PluginView::getAuthenticationInfo):
1269
1270 2016-08-20  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>
1271
1272         Unreviewed EFL build fix since r204668
1273
1274         r204668 changed MessageDecoder with Decoder though, MessageDecoder remained
1275         in EFL specific files.
1276
1277         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1278         * UIProcess/WebVibrationProxy.h:
1279         * WebProcess/Battery/WebBatteryManager.h:
1280         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1281         (WebKit::AcceleratedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage):
1282         * WebProcess/WebPage/AcceleratedDrawingArea.h:
1283         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1284         * WebProcess/WebPage/LayerTreeHost.h:
1285
1286 2016-08-20  Dan Bernstein  <mitz@apple.com>
1287
1288         [Mac] Web Content service with a restricted entitlement may load arbitrary dylibs
1289         https://bugs.webkit.org/show_bug.cgi?id=156668
1290         <rdar://problem/25429784>
1291
1292         Reviewed by Sam Weinig.
1293
1294         * Configurations/WebContentService.xcconfig: Enable library validation when the Web Content
1295           service is given the XPC domain extension entitlement.
1296
1297 2016-08-20  Javier Fernandez  <jfernandez@igalia.com>
1298
1299         [GTK] Unreviewed GTK build fix since r204665 and 204668
1300         https://bugs.webkit.org/show_bug.cgi?id=161020
1301
1302         * CMakeLists.txt:
1303         * Platform/IPC/MessageRecorder.cpp:
1304         (IPC::MessageRecorder::recordOutgoingMessage):
1305         * Platform/IPC/unix/ConnectionUnix.cpp:
1306         (IPC::Connection::processMessage):
1307         (IPC::Connection::sendOutgoingMessage):
1308         * Platform/unix/SharedMemoryUnix.cpp:
1309         (WebKit::SharedMemory::Handle::encode):
1310         (WebKit::SharedMemory::Handle::decode):
1311         * PlatformGTK.cmake:
1312         * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
1313         (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply):
1314         (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply):
1315         (WebKit::WebPage::didReceiveWebPageMessage):
1316         (WebKit::WebPage::didReceiveSyncWebPageMessage):
1317         * Scripts/webkit/LegacyMessages-expected.h:
1318         * Scripts/webkit/MessageReceiver-expected.cpp:
1319         (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply):
1320         (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply):
1321         (WebKit::WebPage::didReceiveMessage):
1322         (WebKit::WebPage::didReceiveSyncMessage):
1323         * Scripts/webkit/Messages-expected.h:
1324         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1325         (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
1326         (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
1327         (IPC::ArgumentCoder<TransformOperations>::encode):
1328         (IPC::ArgumentCoder<TransformOperations>::decode):
1329         (IPC::encodeTimingFunction):
1330         (IPC::decodeTimingFunction):
1331         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
1332         (IPC::ArgumentCoder<TextureMapperAnimation>::decode):
1333         (IPC::ArgumentCoder<TextureMapperAnimations>::encode):
1334         (IPC::ArgumentCoder<TextureMapperAnimations>::decode):
1335         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::encode):
1336         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::decode):
1337         (IPC::ArgumentCoder<SurfaceUpdateInfo>::encode):
1338         (IPC::ArgumentCoder<SurfaceUpdateInfo>::decode):
1339         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
1340         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
1341         (IPC::ArgumentCoder<TileUpdateInfo>::encode):
1342         (IPC::ArgumentCoder<TileUpdateInfo>::decode):
1343         (IPC::ArgumentCoder<TileCreationInfo>::encode):
1344         (IPC::ArgumentCoder<TileCreationInfo>::decode):
1345         (IPC::encodeCoordinatedSurface):
1346         (IPC::decodeCoordinatedSurface):
1347         (IPC::ArgumentCoder<CoordinatedGraphicsState>::encode):
1348         (IPC::ArgumentCoder<CoordinatedGraphicsState>::decode):
1349         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
1350         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
1351         (WebKit::WebCoordinatedSurface::Handle::encode):
1352         (WebKit::WebCoordinatedSurface::Handle::decode):
1353         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
1354         * Shared/WebBatteryStatus.cpp:
1355         (WebKit::WebBatteryStatus::Data::encode):
1356         (WebKit::WebBatteryStatus::Data::decode):
1357         * Shared/WebBatteryStatus.h:
1358         * Shared/gtk/ArgumentCodersGtk.cpp:
1359         (IPC::encodeImage):
1360         (IPC::decodeImage):
1361         (IPC::encodeDataObject):
1362         (IPC::decodeDataObject):
1363         (IPC::ArgumentCoder<DragData>::encode):
1364         (IPC::ArgumentCoder<DragData>::decode):
1365         (IPC::encodeGKeyFile):
1366         (IPC::decodeGKeyFile):
1367         (IPC::encode):
1368         (IPC::decode):
1369         * Shared/gtk/ArgumentCodersGtk.h:
1370         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1371         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
1372         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
1373         (IPC::ArgumentCoder<CertificateInfo>::encode):
1374         (IPC::ArgumentCoder<CertificateInfo>::decode):
1375         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
1376         (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
1377         (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
1378         (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData):
1379         (IPC::ArgumentCoder<Credential>::encodePlatformData):
1380         (IPC::ArgumentCoder<Credential>::decodePlatformData):
1381         * UIProcess/LegacySessionStateCodingNone.cpp:
1382         (WebKit::encodeLegacySessionState):
1383         (WebKit::decodeLegacySessionState):
1384         * UIProcess/WebBatteryManagerProxy.h:
1385
1386 2016-08-20  Yusuke Suzuki  <utatane.tea@gmail.com>
1387
1388         Unreviewed, build fix attempt after r204665 and r204668.
1389
1390         * PlatformGTK.cmake:
1391
1392 2016-08-19  Ryosuke Niwa  <rniwa@webkit.org>
1393
1394         Another build fix attempt after r204665 and r204668.
1395
1396         * CMakeLists.txt:
1397
1398 2016-08-19  Ryosuke Niwa  <rniwa@webkit.org>
1399
1400         GTK+ / EFL build fix attempt after r204665.
1401
1402         * CMakeLists.txt:
1403
1404 2016-08-19  Anders Carlsson  <andersca@apple.com>
1405
1406         Merge MessageDecoder and ArgumentDecoder into Decoder
1407         https://bugs.webkit.org/show_bug.cgi?id=161019
1408
1409         Reviewed by Tim Horton.
1410
1411         * DatabaseProcess/DatabaseProcess.cpp:
1412         * DatabaseProcess/DatabaseProcess.h:
1413         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1414         * DatabaseProcess/DatabaseToWebProcessConnection.h:
1415         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
1416         * NetworkProcess/CustomProtocols/CustomProtocolManager.h:
1417         * NetworkProcess/Downloads/DownloadID.h:
1418         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1419         * NetworkProcess/NetworkConnectionToWebProcess.h:
1420         * NetworkProcess/NetworkProcess.cpp:
1421         * NetworkProcess/NetworkProcess.h:
1422         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1423         * NetworkProcess/NetworkProcessCreationParameters.h:
1424         * NetworkProcess/NetworkResourceLoadParameters.cpp:
1425         * NetworkProcess/NetworkResourceLoadParameters.h:
1426         * NetworkProcess/NetworkResourceLoader.h:
1427         * Platform/IPC/ArgumentCoder.h:
1428         * Platform/IPC/ArgumentCoders.cpp:
1429         * Platform/IPC/ArgumentCoders.h:
1430         * Platform/IPC/ArgumentDecoder.cpp:
1431         * Platform/IPC/ArgumentDecoder.h:
1432         * Platform/IPC/Arguments.h:
1433         * Platform/IPC/Attachment.cpp:
1434         * Platform/IPC/Attachment.h:
1435         * Platform/IPC/Connection.cpp:
1436         * Platform/IPC/Connection.h:
1437         * Platform/IPC/DataReference.cpp:
1438         * Platform/IPC/DataReference.h:
1439         * Platform/IPC/Decoder.cpp: Renamed from Source/WebKit2/Platform/IPC/ArgumentDecoder.cpp.
1440         * Platform/IPC/Decoder.h: Renamed from Source/WebKit2/Platform/IPC/ArgumentDecoder.h.
1441         * Platform/IPC/HandleMessage.h:
1442         * Platform/IPC/MessageDecoder.cpp: Removed.
1443         * Platform/IPC/MessageDecoder.h: Removed.
1444         * Platform/IPC/MessageReceiver.h:
1445         * Platform/IPC/MessageReceiverMap.cpp:
1446         * Platform/IPC/MessageReceiverMap.h:
1447         * Platform/IPC/MessageRecorder.cpp:
1448         * Platform/IPC/MessageRecorder.h:
1449         * Platform/IPC/StringReference.cpp:
1450         * Platform/IPC/StringReference.h:
1451         * Platform/IPC/mac/ConnectionMac.mm:
1452         * Platform/IPC/mac/MachPort.h:
1453         * Platform/SharedMemory.h:
1454         * Platform/mac/SharedMemoryMac.cpp:
1455         * PluginProcess/PluginControllerProxy.h:
1456         * PluginProcess/PluginCreationParameters.cpp:
1457         * PluginProcess/PluginCreationParameters.h:
1458         * PluginProcess/PluginProcess.cpp:
1459         * PluginProcess/PluginProcess.h:
1460         * PluginProcess/WebProcessConnection.cpp:
1461         * PluginProcess/WebProcessConnection.h:
1462         * Scripts/webkit/messages.py:
1463         * Shared/API/APIData.cpp:
1464         * Shared/API/APIData.h:
1465         * Shared/API/APIError.cpp:
1466         * Shared/API/APIError.h:
1467         * Shared/API/APIFrameHandle.cpp:
1468         * Shared/API/APIFrameHandle.h:
1469         * Shared/API/APIGeometry.cpp:
1470         * Shared/API/APIGeometry.h:
1471         * Shared/API/APINumber.h:
1472         * Shared/API/APIPageGroupHandle.cpp:
1473         * Shared/API/APIPageGroupHandle.h:
1474         * Shared/API/APIPageHandle.cpp:
1475         * Shared/API/APIPageHandle.h:
1476         * Shared/API/APIURL.h:
1477         * Shared/API/APIURLRequest.cpp:
1478         * Shared/API/APIURLRequest.h:
1479         * Shared/API/APIURLResponse.cpp:
1480         * Shared/API/APIURLResponse.h:
1481         * Shared/API/Cocoa/RemoteObjectInvocation.h:
1482         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
1483         * Shared/API/Cocoa/RemoteObjectRegistry.h:
1484         * Shared/AssistedNodeInformation.cpp:
1485         * Shared/AssistedNodeInformation.h:
1486         * Shared/Authentication/AuthenticationManager.h:
1487         * Shared/ChildProcess.h:
1488         * Shared/Cocoa/DataDetectionResult.h:
1489         * Shared/Cocoa/DataDetectionResult.mm:
1490         * Shared/Cocoa/LoadParametersCocoa.mm:
1491         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
1492         * Shared/ContextMenuContextData.cpp:
1493         * Shared/ContextMenuContextData.h:
1494         * Shared/Databases/DatabaseProcessCreationParameters.cpp:
1495         * Shared/Databases/DatabaseProcessCreationParameters.h:
1496         * Shared/Databases/IndexedDB/WebIDBResult.cpp:
1497         * Shared/Databases/IndexedDB/WebIDBResult.h:
1498         * Shared/EditorState.cpp:
1499         * Shared/EditorState.h:
1500         * Shared/FontInfo.cpp:
1501         * Shared/FontInfo.h:
1502         * Shared/Gamepad/GamepadData.cpp:
1503         * Shared/Gamepad/GamepadData.h:
1504         * Shared/LayerTreeContext.cpp:
1505         * Shared/LayerTreeContext.h:
1506         * Shared/LoadParameters.cpp:
1507         * Shared/LoadParameters.h:
1508         * Shared/NavigationActionData.cpp:
1509         * Shared/NavigationActionData.h:
1510         * Shared/PlatformPopupMenuData.cpp:
1511         * Shared/PlatformPopupMenuData.h:
1512         * Shared/Plugins/NPIdentifierData.cpp:
1513         * Shared/Plugins/NPIdentifierData.h:
1514         * Shared/Plugins/NPObjectMessageReceiver.h:
1515         * Shared/Plugins/NPRemoteObjectMap.cpp:
1516         * Shared/Plugins/NPRemoteObjectMap.h:
1517         * Shared/Plugins/NPVariantData.cpp:
1518         * Shared/Plugins/NPVariantData.h:
1519         * Shared/Plugins/PluginProcessCreationParameters.cpp:
1520         * Shared/Plugins/PluginProcessCreationParameters.h:
1521         * Shared/PrintInfo.cpp:
1522         * Shared/PrintInfo.h:
1523         * Shared/SandboxExtension.h:
1524         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1525         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
1526         * Shared/SessionState.cpp:
1527         * Shared/SessionState.h:
1528         * Shared/ShareableBitmap.cpp:
1529         * Shared/ShareableBitmap.h:
1530         * Shared/ShareableResource.cpp:
1531         * Shared/ShareableResource.h:
1532         * Shared/StatisticsData.cpp:
1533         * Shared/StatisticsData.h:
1534         * Shared/UpdateInfo.cpp:
1535         * Shared/UpdateInfo.h:
1536         * Shared/UserData.cpp:
1537         * Shared/UserData.h:
1538         * Shared/VisibleContentRectUpdateInfo.cpp:
1539         * Shared/VisibleContentRectUpdateInfo.h:
1540         * Shared/WebBackForwardListItem.h:
1541         * Shared/WebCompiledContentExtensionData.cpp:
1542         * Shared/WebCompiledContentExtensionData.h:
1543         * Shared/WebConnection.h:
1544         * Shared/WebContextMenuItemData.cpp:
1545         * Shared/WebContextMenuItemData.h:
1546         * Shared/WebCoreArgumentCoders.cpp:
1547         * Shared/WebCoreArgumentCoders.h:
1548         * Shared/WebEvent.cpp:
1549         * Shared/WebEvent.h:
1550         * Shared/WebGeolocationPosition.cpp:
1551         * Shared/WebGeolocationPosition.h:
1552         * Shared/WebHitTestResultData.cpp:
1553         * Shared/WebHitTestResultData.h:
1554         * Shared/WebKeyboardEvent.cpp:
1555         * Shared/WebMouseEvent.cpp:
1556         * Shared/WebNavigationDataStore.h:
1557         * Shared/WebPageCreationParameters.cpp:
1558         * Shared/WebPageCreationParameters.h:
1559         * Shared/WebPageGroupData.cpp:
1560         * Shared/WebPageGroupData.h:
1561         * Shared/WebPlatformTouchPoint.cpp:
1562         * Shared/WebPopupItem.cpp:
1563         * Shared/WebPopupItem.h:
1564         * Shared/WebPreferencesStore.cpp:
1565         * Shared/WebPreferencesStore.h:
1566         * Shared/WebProcessCreationParameters.cpp:
1567         * Shared/WebProcessCreationParameters.h:
1568         * Shared/WebTouchEvent.cpp:
1569         * Shared/WebUserContentControllerDataTypes.cpp:
1570         * Shared/WebUserContentControllerDataTypes.h:
1571         * Shared/WebWheelEvent.cpp:
1572         * Shared/WebsiteData/WebsiteData.cpp:
1573         * Shared/WebsiteData/WebsiteData.h:
1574         * Shared/cf/ArgumentCodersCF.cpp:
1575         * Shared/cf/ArgumentCodersCF.h:
1576         * Shared/ios/InteractionInformationAtPosition.h:
1577         * Shared/ios/InteractionInformationAtPosition.mm:
1578         * Shared/ios/QuickLookDocumentData.cpp:
1579         * Shared/ios/QuickLookDocumentData.h:
1580         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1581         * Shared/ios/WebTouchEventIOS.cpp:
1582         * Shared/mac/ArgumentCodersMac.h:
1583         * Shared/mac/ArgumentCodersMac.mm:
1584         * Shared/mac/AttributedString.h:
1585         * Shared/mac/AttributedString.mm:
1586         * Shared/mac/ColorSpaceData.h:
1587         * Shared/mac/ColorSpaceData.mm:
1588         * Shared/mac/ObjCObjectGraph.h:
1589         * Shared/mac/ObjCObjectGraph.mm:
1590         * Shared/mac/RemoteLayerBackingStore.h:
1591         * Shared/mac/RemoteLayerBackingStore.mm:
1592         * Shared/mac/RemoteLayerTreeTransaction.h:
1593         * Shared/mac/RemoteLayerTreeTransaction.mm:
1594         * Shared/mac/SandboxExtensionMac.mm:
1595         * Shared/mac/SecItemRequestData.cpp:
1596         * Shared/mac/SecItemRequestData.h:
1597         * Shared/mac/SecItemResponseData.cpp:
1598         * Shared/mac/SecItemResponseData.h:
1599         * Shared/mac/SecItemShim.h:
1600         * Shared/mac/WebCoreArgumentCodersMac.mm:
1601         * Shared/mac/WebGestureEvent.cpp:
1602         * Shared/mac/WebGestureEvent.h:
1603         * Shared/mac/WebHitTestResultData.mm:
1604         * UIProcess/API/APIHitTestResult.h:
1605         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
1606         * UIProcess/Automation/WebAutomationSession.h:
1607         * UIProcess/ChildProcessProxy.cpp:
1608         * UIProcess/ChildProcessProxy.h:
1609         * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
1610         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
1611         * UIProcess/Databases/DatabaseProcessProxy.cpp:
1612         * UIProcess/Databases/DatabaseProcessProxy.h:
1613         * UIProcess/Downloads/DownloadProxy.h:
1614         * UIProcess/DrawingAreaProxy.h:
1615         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1616         * UIProcess/Network/NetworkProcessProxy.cpp:
1617         * UIProcess/Network/NetworkProcessProxy.h:
1618         * UIProcess/Plugins/PluginProcessProxy.h:
1619         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1620         * UIProcess/Storage/StorageManager.h:
1621         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1622         * UIProcess/VisitedLinkStore.h:
1623         * UIProcess/WebCookieManagerProxy.h:
1624         * UIProcess/WebFrameProxy.h:
1625         * UIProcess/WebFullScreenManagerProxy.h:
1626         * UIProcess/WebGeolocationManagerProxy.h:
1627         * UIProcess/WebIconDatabase.h:
1628         * UIProcess/WebInspectorProxy.h:
1629         * UIProcess/WebPageProxy.h:
1630         * UIProcess/WebPasteboardProxy.h:
1631         * UIProcess/WebProcessPool.cpp:
1632         * UIProcess/WebProcessPool.h:
1633         * UIProcess/WebProcessProxy.cpp:
1634         * UIProcess/WebProcessProxy.h:
1635         * UIProcess/WebResourceLoadStatisticsStore.h:
1636         * UIProcess/ios/SmartMagnificationController.h:
1637         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1638         * UIProcess/mac/SecItemShimProxy.h:
1639         * UIProcess/mac/ViewGestureController.h:
1640         * WebKit2.xcodeproj/project.pbxproj:
1641         * WebProcess/ApplePay/WebPaymentCoordinator.h:
1642         * WebProcess/Automation/WebAutomationSessionProxy.h:
1643         * WebProcess/Cookies/WebCookieManager.h:
1644         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1645         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
1646         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
1647         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1648         * WebProcess/FullScreen/WebFullScreenManager.h:
1649         * WebProcess/Geolocation/WebGeolocationManager.h:
1650         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
1651         * WebProcess/InjectedBundle/InjectedBundle.h:
1652         * WebProcess/Network/NetworkProcessConnection.cpp:
1653         * WebProcess/Network/NetworkProcessConnection.h:
1654         * WebProcess/Network/WebResourceLoader.h:
1655         * WebProcess/Notifications/WebNotificationManager.h:
1656         * WebProcess/Plugins/Plugin.cpp:
1657         * WebProcess/Plugins/Plugin.h:
1658         * WebProcess/Plugins/PluginProcessConnection.cpp:
1659         * WebProcess/Plugins/PluginProcessConnection.h:
1660         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1661         * WebProcess/Plugins/PluginProcessConnectionManager.h:
1662         * WebProcess/Plugins/PluginProxy.h:
1663         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
1664         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
1665         * WebProcess/Storage/StorageAreaMap.h:
1666         * WebProcess/UserContent/WebUserContentController.h:
1667         * WebProcess/WebPage/DrawingArea.h:
1668         * WebProcess/WebPage/EventDispatcher.h:
1669         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
1670         * WebProcess/WebPage/ViewUpdateDispatcher.h:
1671         * WebProcess/WebPage/VisitedLinkTableController.h:
1672         * WebProcess/WebPage/WebInspector.h:
1673         * WebProcess/WebPage/WebInspectorUI.h:
1674         * WebProcess/WebPage/WebPage.cpp:
1675         * WebProcess/WebPage/WebPage.h:
1676         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1677         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1678         * WebProcess/WebProcess.cpp:
1679         * WebProcess/WebProcess.h:
1680         * WebProcess/cocoa/WebPlaybackSessionManager.h:
1681         * WebProcess/cocoa/WebVideoFullscreenManager.h:
1682
1683 2016-08-19  Anders Carlsson  <andersca@apple.com>
1684
1685         Update Xcode project.
1686
1687         * WebKit2.xcodeproj/project.pbxproj:
1688
1689 2016-08-19  Anders Carlsson  <andersca@apple.com>
1690
1691         Merge MessageEncoder and ArgumentEncoder into Encoder
1692         https://bugs.webkit.org/show_bug.cgi?id=161016
1693
1694         Reviewed by Tim Horton.
1695
1696         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1697         (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage):
1698         * DatabaseProcess/DatabaseToWebProcessConnection.h:
1699         * NetworkProcess/Downloads/DownloadID.h:
1700         (IPC::ArgumentCoder<WebKit::DownloadID>::encode):
1701         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1702         (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
1703         * NetworkProcess/NetworkConnectionToWebProcess.h:
1704         * NetworkProcess/NetworkProcess.cpp:
1705         (WebKit::NetworkProcess::didReceiveSyncMessage):
1706         * NetworkProcess/NetworkProcess.h:
1707         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1708         (WebKit::NetworkProcessCreationParameters::encode):
1709         * NetworkProcess/NetworkProcessCreationParameters.h:
1710         * NetworkProcess/NetworkResourceLoadParameters.cpp:
1711         (WebKit::NetworkResourceLoadParameters::encode):
1712         * NetworkProcess/NetworkResourceLoadParameters.h:
1713         * Platform/IPC/ArgumentCoder.h:
1714         (IPC::ArgumentCoder::encode):
1715         * Platform/IPC/ArgumentCoders.cpp:
1716         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode):
1717         (IPC::ArgumentCoder<AtomicString>::encode):
1718         (IPC::ArgumentCoder<CString>::encode):
1719         (IPC::ArgumentCoder<String>::encode):
1720         (IPC::ArgumentCoder<uuid_t>::encode):
1721         * Platform/IPC/ArgumentCoders.h:
1722         (IPC::SimpleArgumentCoder::encode):
1723         (IPC::ArgumentCoder<OptionSet<T>>::encode):
1724         (IPC::ArgumentCoder<WTF::Optional<T>>::encode):
1725         * Platform/IPC/ArgumentEncoder.cpp:
1726         (IPC::allocBuffer): Deleted.
1727         (IPC::freeBuffer): Deleted.
1728         (IPC::ArgumentEncoder::ArgumentEncoder): Deleted.
1729         (IPC::ArgumentEncoder::~ArgumentEncoder): Deleted.
1730         (IPC::roundUpToAlignment): Deleted.
1731         (IPC::ArgumentEncoder::reserve): Deleted.
1732         (IPC::ArgumentEncoder::grow): Deleted.
1733         (IPC::ArgumentEncoder::encodeFixedLengthData): Deleted.
1734         (IPC::ArgumentEncoder::encodeVariableLengthByteArray): Deleted.
1735         (IPC::copyValueToBuffer): Deleted.
1736         (IPC::ArgumentEncoder::encode): Deleted.
1737         (IPC::ArgumentEncoder::addAttachment): Deleted.
1738         (IPC::ArgumentEncoder::releaseAttachments): Deleted.
1739         * Platform/IPC/ArgumentEncoder.h:
1740         (IPC::ArgumentEncoder::encodeEnum): Deleted.
1741         (IPC::ArgumentEncoder::encode): Deleted.
1742         (IPC::ArgumentEncoder::operator<<): Deleted.
1743         (IPC::ArgumentEncoder::buffer): Deleted.
1744         (IPC::ArgumentEncoder::bufferSize): Deleted.
1745         * Platform/IPC/Arguments.h:
1746         (IPC::TupleCoder::encode):
1747         (IPC::Arguments::encode):
1748         * Platform/IPC/Attachment.cpp:
1749         (IPC::Attachment::encode):
1750         * Platform/IPC/Attachment.h:
1751         * Platform/IPC/Connection.cpp:
1752         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
1753         (IPC::Connection::createSyncMessageEncoder):
1754         (IPC::Connection::sendMessage):
1755         (IPC::Connection::sendSyncReply):
1756         (IPC::Connection::sendSyncMessage):
1757         (IPC::Connection::sendSyncMessageFromSecondaryThread):
1758         (IPC::Connection::sendOutgoingMessages):
1759         (IPC::Connection::dispatchSyncMessage):
1760         * Platform/IPC/Connection.h:
1761         (IPC::Connection::send):
1762         (IPC::Connection::sendSync):
1763         * Platform/IPC/DataReference.cpp:
1764         (IPC::DataReference::encode):
1765         (IPC::SharedBufferDataReference::encode):
1766         * Platform/IPC/DataReference.h:
1767         * Platform/IPC/Encoder.cpp: Renamed from Source/WebKit2/Platform/IPC/ArgumentEncoder.cpp.
1768         (IPC::allocBuffer):
1769         (IPC::freeBuffer):
1770         (IPC::Encoder::Encoder):
1771         (IPC::Encoder::~Encoder):
1772         (IPC::Encoder::isSyncMessage):
1773         (IPC::Encoder::shouldDispatchMessageWhenWaitingForSyncReply):
1774         (IPC::Encoder::setIsSyncMessage):
1775         (IPC::Encoder::setShouldDispatchMessageWhenWaitingForSyncReply):
1776         (IPC::Encoder::setFullySynchronousModeForTesting):
1777         (IPC::Encoder::wrapForTesting):
1778         (IPC::roundUpToAlignment):
1779         (IPC::Encoder::reserve):
1780         (IPC::Encoder::encodeHeader):
1781         (IPC::Encoder::grow):
1782         (IPC::Encoder::encodeFixedLengthData):
1783         (IPC::Encoder::encodeVariableLengthByteArray):
1784         (IPC::copyValueToBuffer):
1785         (IPC::Encoder::encode):
1786         (IPC::Encoder::addAttachment):
1787         (IPC::Encoder::releaseAttachments):
1788         * Platform/IPC/Encoder.h: Renamed from Source/WebKit2/Platform/IPC/ArgumentEncoder.h.
1789         * Platform/IPC/HandleMessage.h:
1790         (IPC::handleMessage):
1791         (IPC::handleMessageDelayed):
1792         * Platform/IPC/MessageEncoder.cpp: Removed.
1793         (IPC::MessageEncoder::MessageEncoder): Deleted.
1794         (IPC::MessageEncoder::~MessageEncoder): Deleted.
1795         (IPC::MessageEncoder::encodeHeader): Deleted.
1796         (IPC::MessageEncoder::isSyncMessage): Deleted.
1797         (IPC::MessageEncoder::shouldDispatchMessageWhenWaitingForSyncReply): Deleted.
1798         (IPC::MessageEncoder::setIsSyncMessage): Deleted.
1799         (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply): Deleted.
1800         (IPC::MessageEncoder::setFullySynchronousModeForTesting): Deleted.
1801         (IPC::MessageEncoder::wrapForTesting): Deleted.
1802         * Platform/IPC/MessageEncoder.h: Removed.
1803         (IPC::MessageEncoder::messageReceiverName): Deleted.
1804         (IPC::MessageEncoder::messageName): Deleted.
1805         (IPC::MessageEncoder::destinationID): Deleted.
1806         (IPC::MessageEncoder::UUID): Deleted.
1807         * Platform/IPC/MessageReceiver.h:
1808         (IPC::MessageReceiver::didReceiveSyncMessage):
1809         * Platform/IPC/MessageReceiverMap.cpp:
1810         (IPC::MessageReceiverMap::dispatchSyncMessage):
1811         * Platform/IPC/MessageReceiverMap.h:
1812         * Platform/IPC/MessageRecorder.h:
1813         * Platform/IPC/MessageSender.cpp:
1814         (IPC::MessageSender::sendMessage):
1815         * Platform/IPC/MessageSender.h:
1816         (IPC::MessageSender::send):
1817         * Platform/IPC/StringReference.cpp:
1818         (IPC::StringReference::encode):
1819         * Platform/IPC/StringReference.h:
1820         * Platform/IPC/mac/ConnectionMac.mm:
1821         (IPC::Connection::open):
1822         (IPC::Connection::sendOutgoingMessage):
1823         * Platform/IPC/mac/MachPort.h:
1824         (IPC::MachPort::encode):
1825         * Platform/SharedMemory.h:
1826         * Platform/mac/SharedMemoryMac.cpp:
1827         (WebKit::SharedMemory::Handle::encode):
1828         * PluginProcess/PluginControllerProxy.h:
1829         * PluginProcess/PluginCreationParameters.cpp:
1830         (WebKit::PluginCreationParameters::encode):
1831         * PluginProcess/PluginCreationParameters.h:
1832         * PluginProcess/WebProcessConnection.cpp:
1833         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1834         * PluginProcess/WebProcessConnection.h:
1835         * Scripts/webkit/messages.py:
1836         (message_to_struct_declaration):
1837         (forward_declarations_and_headers):
1838         (generate_message_handler):
1839         (headers_for_type): Deleted.
1840         * Shared/API/APIData.cpp:
1841         (API::Data::encode):
1842         * Shared/API/APIData.h:
1843         * Shared/API/APIError.cpp:
1844         (API::Error::encode):
1845         * Shared/API/APIError.h:
1846         * Shared/API/APIFrameHandle.cpp:
1847         (API::FrameHandle::encode):
1848         * Shared/API/APIFrameHandle.h:
1849         * Shared/API/APIGeometry.cpp:
1850         (API::Point::encode):
1851         (API::Size::encode):
1852         (API::Rect::encode):
1853         * Shared/API/APIGeometry.h:
1854         * Shared/API/APINumber.h:
1855         (API::Number::encode):
1856         * Shared/API/APIPageGroupHandle.cpp:
1857         (API::PageGroupHandle::encode):
1858         * Shared/API/APIPageGroupHandle.h:
1859         * Shared/API/APIPageHandle.cpp:
1860         (API::PageHandle::encode):
1861         * Shared/API/APIPageHandle.h:
1862         * Shared/API/APIURL.h:
1863         (API::URL::encode):
1864         * Shared/API/APIURLRequest.cpp:
1865         (API::URLRequest::encode):
1866         * Shared/API/APIURLRequest.h:
1867         * Shared/API/APIURLResponse.cpp:
1868         (API::URLResponse::encode):
1869         * Shared/API/APIURLResponse.h:
1870         * Shared/API/Cocoa/RemoteObjectInvocation.h:
1871         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
1872         (WebKit::RemoteObjectInvocation::encode):
1873         * Shared/AssistedNodeInformation.cpp:
1874         (WebKit::OptionItem::encode):
1875         (WebKit::AssistedNodeInformation::encode):
1876         * Shared/AssistedNodeInformation.h:
1877         * Shared/Cocoa/DataDetectionResult.h:
1878         * Shared/Cocoa/DataDetectionResult.mm:
1879         (WebKit::DataDetectionResult::encode):
1880         * Shared/Cocoa/LoadParametersCocoa.mm:
1881         (WebKit::LoadParameters::platformEncode):
1882         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
1883         (IPC::ArgumentCoder<WebCore::Payment>::encode):
1884         (IPC::ArgumentCoder<WebCore::PaymentContact>::encode):
1885         (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode):
1886         (IPC::ArgumentCoder<WebCore::PaymentMethod>::encode):
1887         (IPC::ArgumentCoder<PaymentRequest>::encode):
1888         (IPC::ArgumentCoder<PaymentRequest::ContactFields>::encode):
1889         (IPC::ArgumentCoder<PaymentRequest::LineItem>::encode):
1890         (IPC::ArgumentCoder<PaymentRequest::MerchantCapabilities>::encode):
1891         (IPC::ArgumentCoder<PaymentRequest::ShippingMethod>::encode):
1892         (IPC::ArgumentCoder<PaymentRequest::TotalAndLineItems>::encode):
1893         * Shared/ContextMenuContextData.cpp:
1894         (WebKit::ContextMenuContextData::encode):
1895         * Shared/ContextMenuContextData.h:
1896         * Shared/Databases/DatabaseProcessCreationParameters.cpp:
1897         (WebKit::DatabaseProcessCreationParameters::encode):
1898         * Shared/Databases/DatabaseProcessCreationParameters.h:
1899         * Shared/Databases/IndexedDB/WebIDBResult.cpp:
1900         (WebKit::WebIDBResult::encode):
1901         * Shared/Databases/IndexedDB/WebIDBResult.h:
1902         * Shared/EditorState.cpp:
1903         (WebKit::EditorState::encode):
1904         (WebKit::EditorState::PostLayoutData::encode):
1905         * Shared/EditorState.h:
1906         * Shared/FontInfo.cpp:
1907         (WebKit::FontInfo::encode):
1908         * Shared/FontInfo.h:
1909         * Shared/Gamepad/GamepadData.cpp:
1910         (WebKit::GamepadData::encode):
1911         * Shared/Gamepad/GamepadData.h:
1912         * Shared/LayerTreeContext.cpp:
1913         (WebKit::LayerTreeContext::encode):
1914         * Shared/LayerTreeContext.h:
1915         * Shared/LoadParameters.cpp:
1916         (WebKit::LoadParameters::encode):
1917         (WebKit::LoadParameters::platformEncode):
1918         * Shared/LoadParameters.h:
1919         * Shared/NavigationActionData.cpp:
1920         (WebKit::NavigationActionData::encode):
1921         * Shared/NavigationActionData.h:
1922         * Shared/PlatformPopupMenuData.cpp:
1923         (WebKit::PlatformPopupMenuData::encode):
1924         * Shared/PlatformPopupMenuData.h:
1925         * Shared/Plugins/NPIdentifierData.cpp:
1926         (WebKit::NPIdentifierData::encode):
1927         * Shared/Plugins/NPIdentifierData.h:
1928         * Shared/Plugins/NPObjectMessageReceiver.h:
1929         * Shared/Plugins/NPRemoteObjectMap.cpp:
1930         (WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
1931         * Shared/Plugins/NPRemoteObjectMap.h:
1932         * Shared/Plugins/NPVariantData.cpp:
1933         (WebKit::NPVariantData::encode):
1934         * Shared/Plugins/NPVariantData.h:
1935         * Shared/Plugins/PluginProcessCreationParameters.cpp:
1936         (WebKit::PluginProcessCreationParameters::encode):
1937         * Shared/Plugins/PluginProcessCreationParameters.h:
1938         * Shared/PrintInfo.cpp:
1939         (WebKit::PrintInfo::encode):
1940         * Shared/PrintInfo.h:
1941         * Shared/SandboxExtension.h:
1942         (WebKit::SandboxExtension::Handle::encode):
1943         (WebKit::SandboxExtension::HandleArray::encode):
1944         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1945         (ArgumentCoder<ScrollingStateNode>::encode):
1946         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
1947         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
1948         (ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode):
1949         (ArgumentCoder<ScrollingStateFixedNode>::encode):
1950         (ArgumentCoder<ScrollingStateStickyNode>::encode):
1951         (WebKit::encodeNodeAndDescendants):
1952         (WebKit::RemoteScrollingCoordinatorTransaction::encode):
1953         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
1954         * Shared/SessionState.cpp:
1955         (WebKit::HTTPBody::Element::encode):
1956         (WebKit::HTTPBody::encode):
1957         (WebKit::FrameState::encode):
1958         (WebKit::PageState::encode):
1959         (WebKit::BackForwardListItemState::encode):
1960         (WebKit::BackForwardListState::encode):
1961         * Shared/SessionState.h:
1962         * Shared/ShareableBitmap.cpp:
1963         (WebKit::ShareableBitmap::Handle::encode):
1964         * Shared/ShareableBitmap.h:
1965         * Shared/ShareableResource.cpp:
1966         (WebKit::ShareableResource::Handle::encode):
1967         * Shared/ShareableResource.h:
1968         * Shared/StatisticsData.cpp:
1969         (WebKit::StatisticsData::encode):
1970         * Shared/StatisticsData.h:
1971         * Shared/UpdateInfo.cpp:
1972         (WebKit::UpdateInfo::encode):
1973         * Shared/UpdateInfo.h:
1974         * Shared/UserData.cpp:
1975         (WebKit::UserData::encode):
1976         * Shared/UserData.h:
1977         * Shared/VisibleContentRectUpdateInfo.cpp:
1978         (WebKit::VisibleContentRectUpdateInfo::encode):
1979         * Shared/VisibleContentRectUpdateInfo.h:
1980         * Shared/WebBackForwardListItem.h:
1981         * Shared/WebCompiledContentExtensionData.cpp:
1982         (WebKit::WebCompiledContentExtensionData::encode):
1983         * Shared/WebCompiledContentExtensionData.h:
1984         * Shared/WebContextMenuItemData.cpp:
1985         (WebKit::WebContextMenuItemData::encode):
1986         * Shared/WebContextMenuItemData.h:
1987         * Shared/WebCoreArgumentCoders.cpp:
1988         (IPC::ArgumentCoder<AffineTransform>::encode):
1989         (IPC::ArgumentCoder<EventTrackingRegions>::encode):
1990         (IPC::ArgumentCoder<TransformationMatrix>::encode):
1991         (IPC::ArgumentCoder<LinearTimingFunction>::encode):
1992         (IPC::ArgumentCoder<CubicBezierTimingFunction>::encode):
1993         (IPC::ArgumentCoder<StepsTimingFunction>::encode):
1994         (IPC::ArgumentCoder<SpringTimingFunction>::encode):
1995         (IPC::ArgumentCoder<FloatPoint>::encode):
1996         (IPC::ArgumentCoder<FloatPoint3D>::encode):
1997         (IPC::ArgumentCoder<FloatRect>::encode):
1998         (IPC::ArgumentCoder<FloatSize>::encode):
1999         (IPC::ArgumentCoder<FloatRoundedRect>::encode):
2000         (IPC::ArgumentCoder<FloatQuad>::encode):
2001         (IPC::ArgumentCoder<ViewportArguments>::encode):
2002         (IPC::ArgumentCoder<IntPoint>::encode):
2003         (IPC::ArgumentCoder<IntRect>::encode):
2004         (IPC::ArgumentCoder<IntSize>::encode):
2005         (IPC::pathEncodeApplierFunction):
2006         (IPC::ArgumentCoder<Path>::encode):
2007         (IPC::ArgumentCoder<RecentSearch>::encode):
2008         (IPC::ArgumentCoder<Region::Span>::encode):
2009         (IPC::ArgumentCoder<Region>::encode):
2010         (IPC::ArgumentCoder<Length>::encode):
2011         (IPC::ArgumentCoder<ViewportAttributes>::encode):
2012         (IPC::ArgumentCoder<MimeClassInfo>::encode):
2013         (IPC::ArgumentCoder<PluginInfo>::encode):
2014         (IPC::ArgumentCoder<AuthenticationChallenge>::encode):
2015         (IPC::ArgumentCoder<ProtectionSpace>::encode):
2016         (IPC::ArgumentCoder<Credential>::encode):
2017         (IPC::encodeImage):
2018         (IPC::encodeOptionalImage):
2019         (IPC::ArgumentCoder<Cursor>::encode):
2020         (IPC::ArgumentCoder<ResourceRequest>::encode):
2021         (IPC::ArgumentCoder<ResourceError>::encode):
2022         (IPC::ArgumentCoder<SelectionRect>::encode):
2023         (IPC::ArgumentCoder<WindowFeatures>::encode):
2024         (IPC::ArgumentCoder<Color>::encode):
2025         (IPC::ArgumentCoder<CompositionUnderline>::encode):
2026         (IPC::ArgumentCoder<Cookie>::encode):
2027         (IPC::ArgumentCoder<DatabaseDetails>::encode):
2028         (IPC::ArgumentCoder<Highlight>::encode):
2029         (IPC::encodeSharedBuffer):
2030         (IPC::ArgumentCoder<PasteboardWebContent>::encode):
2031         (IPC::ArgumentCoder<PasteboardImage>::encode):
2032         (IPC::ArgumentCoder<DictationAlternative>::encode):
2033         (IPC::ArgumentCoder<FileChooserSettings>::encode):
2034         (IPC::ArgumentCoder<GrammarDetail>::encode):
2035         (IPC::ArgumentCoder<TextCheckingRequestData>::encode):
2036         (IPC::ArgumentCoder<TextCheckingResult>::encode):
2037         (IPC::ArgumentCoder<URL>::encode):
2038         (IPC::ArgumentCoder<UserStyleSheet>::encode):
2039         (IPC::ArgumentCoder<MediaSessionMetadata>::encode):
2040         (IPC::ArgumentCoder<UserScript>::encode):
2041         (IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
2042         (IPC::ArgumentCoder<FixedPositionViewportConstraints>::encode):
2043         (IPC::ArgumentCoder<StickyPositionViewportConstraints>::encode):
2044         (IPC::ArgumentCoder<FilterOperation>::encode):
2045         (IPC::ArgumentCoder<FilterOperations>::encode):
2046         (IPC::ArgumentCoder<SessionID>::encode):
2047         (IPC::ArgumentCoder<BlobPart>::encode):
2048         (IPC::ArgumentCoder<TextIndicatorData>::encode):
2049         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode):
2050         (IPC::ArgumentCoder<DictionaryPopupInfo>::encode):
2051         (IPC::ArgumentCoder<ExceptionDetails>::encode):
2052         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
2053         * Shared/WebCoreArgumentCoders.h:
2054         * Shared/WebEvent.cpp:
2055         (WebKit::WebEvent::encode):
2056         * Shared/WebEvent.h:
2057         * Shared/WebGeolocationPosition.cpp:
2058         (WebKit::WebGeolocationPosition::Data::encode):
2059         * Shared/WebGeolocationPosition.h:
2060         * Shared/WebHitTestResultData.cpp:
2061         (WebKit::WebHitTestResultData::encode):
2062         (WebKit::WebHitTestResultData::platformEncode):
2063         * Shared/WebHitTestResultData.h:
2064         * Shared/WebKeyboardEvent.cpp:
2065         (WebKit::WebKeyboardEvent::encode):
2066         * Shared/WebMouseEvent.cpp:
2067         (WebKit::WebMouseEvent::encode):
2068         * Shared/WebNavigationDataStore.h:
2069         (WebKit::WebNavigationDataStore::encode):
2070         * Shared/WebPageCreationParameters.cpp:
2071         (WebKit::WebPageCreationParameters::encode):
2072         * Shared/WebPageCreationParameters.h:
2073         * Shared/WebPageGroupData.cpp:
2074         (WebKit::WebPageGroupData::encode):
2075         * Shared/WebPageGroupData.h:
2076         * Shared/WebPlatformTouchPoint.cpp:
2077         (WebKit::WebPlatformTouchPoint::encode):
2078         * Shared/WebPopupItem.cpp:
2079         (WebKit::WebPopupItem::encode):
2080         * Shared/WebPopupItem.h:
2081         * Shared/WebPreferencesStore.cpp:
2082         (WebKit::WebPreferencesStore::Value::encode):
2083         (WebKit::WebPreferencesStore::encode):
2084         * Shared/WebPreferencesStore.h:
2085         * Shared/WebProcessCreationParameters.cpp:
2086         (WebKit::WebProcessCreationParameters::encode):
2087         * Shared/WebProcessCreationParameters.h:
2088         * Shared/WebTouchEvent.cpp:
2089         (WebKit::WebTouchEvent::encode):
2090         * Shared/WebUserContentControllerDataTypes.cpp:
2091         (WebKit::WebUserScriptData::encode):
2092         (WebKit::WebUserStyleSheetData::encode):
2093         (WebKit::WebScriptMessageHandlerData::encode):
2094         * Shared/WebUserContentControllerDataTypes.h:
2095         * Shared/WebWheelEvent.cpp:
2096         (WebKit::WebWheelEvent::encode):
2097         * Shared/WebsiteData/WebsiteData.cpp:
2098         (WebKit::WebsiteData::Entry::encode):
2099         (WebKit::WebsiteData::encode):
2100         * Shared/WebsiteData/WebsiteData.h:
2101         * Shared/cf/ArgumentCodersCF.cpp:
2102         (IPC::encode):
2103         * Shared/cf/ArgumentCodersCF.h:
2104         * Shared/ios/InteractionInformationAtPosition.h:
2105         * Shared/ios/InteractionInformationAtPosition.mm:
2106         (WebKit::InteractionInformationAtPosition::encode):
2107         * Shared/ios/QuickLookDocumentData.cpp:
2108         (WebKit::QuickLookDocumentData::encode):
2109         * Shared/ios/QuickLookDocumentData.h:
2110         * Shared/ios/WebPlatformTouchPointIOS.cpp:
2111         (WebKit::WebPlatformTouchPoint::encode):
2112         * Shared/ios/WebTouchEventIOS.cpp:
2113         (WebKit::WebTouchEvent::encode):
2114         * Shared/mac/ArgumentCodersMac.h:
2115         * Shared/mac/ArgumentCodersMac.mm:
2116         (IPC::encode):
2117         * Shared/mac/AttributedString.h:
2118         * Shared/mac/AttributedString.mm:
2119         (WebKit::AttributedString::encode):
2120         * Shared/mac/ColorSpaceData.h:
2121         * Shared/mac/ColorSpaceData.mm:
2122         (WebKit::ColorSpaceData::encode):
2123         * Shared/mac/ObjCObjectGraph.h:
2124         * Shared/mac/ObjCObjectGraph.mm:
2125         (WebKit::ObjCObjectGraph::encode):
2126         * Shared/mac/RemoteLayerBackingStore.h:
2127         * Shared/mac/RemoteLayerBackingStore.mm:
2128         (WebKit::RemoteLayerBackingStore::encode):
2129         * Shared/mac/RemoteLayerTreeTransaction.h:
2130         * Shared/mac/RemoteLayerTreeTransaction.mm:
2131         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode):
2132         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
2133         (WebKit::RemoteLayerTreeTransaction::encode):
2134         * Shared/mac/SandboxExtensionMac.mm:
2135         (WebKit::SandboxExtension::Handle::encode):
2136         (WebKit::SandboxExtension::HandleArray::encode):
2137         * Shared/mac/SecItemRequestData.cpp:
2138         (WebKit::SecItemRequestData::encode):
2139         * Shared/mac/SecItemRequestData.h:
2140         * Shared/mac/SecItemResponseData.cpp:
2141         (WebKit::SecItemResponseData::encode):
2142         * Shared/mac/SecItemResponseData.h:
2143         * Shared/mac/WebCoreArgumentCodersMac.mm:
2144         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2145         (IPC::ArgumentCoder<CertificateInfo>::encode):
2146         (IPC::encodeNSError):
2147         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
2148         (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
2149         (IPC::ArgumentCoder<Credential>::encodePlatformData):
2150         (IPC::ArgumentCoder<MachSendRight>::encode):
2151         (IPC::ArgumentCoder<KeypressCommand>::encode):
2152         (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
2153         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData):
2154         * Shared/mac/WebGestureEvent.cpp:
2155         (WebKit::WebGestureEvent::encode):
2156         * Shared/mac/WebGestureEvent.h:
2157         * Shared/mac/WebHitTestResultData.mm:
2158         (WebKit::WebHitTestResultData::platformEncode):
2159         * UIProcess/API/APIHitTestResult.h:
2160         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
2161         * UIProcess/ChildProcessProxy.cpp:
2162         (WebKit::ChildProcessProxy::sendMessage):
2163         (WebKit::ChildProcessProxy::dispatchSyncMessage):
2164         (WebKit::ChildProcessProxy::didFinishLaunching):
2165         * UIProcess/ChildProcessProxy.h:
2166         (WebKit::ChildProcessProxy::send):
2167         * UIProcess/Downloads/DownloadProxy.h:
2168         * UIProcess/Network/NetworkProcessProxy.cpp:
2169         (WebKit::NetworkProcessProxy::didReceiveSyncMessage):
2170         * UIProcess/Network/NetworkProcessProxy.h:
2171         * UIProcess/Notifications/WebNotification.cpp:
2172         * UIProcess/Notifications/WebNotification.h:
2173         * UIProcess/Plugins/PluginProcessManager.h:
2174         * UIProcess/Plugins/PluginProcessProxy.h:
2175         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2176         * UIProcess/Storage/StorageManager.h:
2177         * UIProcess/WebFullScreenManagerProxy.h:
2178         * UIProcess/WebIconDatabase.h:
2179         * UIProcess/WebPageProxy.cpp:
2180         (WebKit::WebPageProxy::sendMessage):
2181         * UIProcess/WebPageProxy.h:
2182         * UIProcess/WebPasteboardProxy.h:
2183         * UIProcess/WebProcessPool.cpp:
2184         (WebKit::WebProcessPool::dispatchSyncMessage):
2185         * UIProcess/WebProcessPool.h:
2186         * UIProcess/WebProcessProxy.cpp:
2187         (WebKit::WebProcessProxy::didReceiveSyncMessage):
2188         * UIProcess/WebProcessProxy.h:
2189         * WebKit2.xcodeproj/project.pbxproj:
2190         * WebProcess/Network/NetworkProcessConnection.cpp:
2191         (WebKit::NetworkProcessConnection::didReceiveSyncMessage):
2192         * WebProcess/Network/NetworkProcessConnection.h:
2193         * WebProcess/Plugins/Plugin.cpp:
2194         (WebKit::Plugin::Parameters::encode):
2195         * WebProcess/Plugins/Plugin.h:
2196         * WebProcess/Plugins/PluginProcessConnection.cpp:
2197         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
2198         * WebProcess/Plugins/PluginProcessConnection.h:
2199         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2200         * WebProcess/Plugins/PluginProxy.h:
2201         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
2202         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
2203         * WebProcess/WebPage/DrawingArea.h:
2204         * WebProcess/WebPage/WebPage.cpp:
2205         (WebKit::WebPage::didReceiveSyncMessage):
2206         * WebProcess/WebPage/WebPage.h:
2207         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2208         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2209         (WebKit::PlatformCAAnimationRemote::KeyframeValue::encode):
2210         (WebKit::PlatformCAAnimationRemote::Properties::encode):
2211         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2212         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2213         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2214         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
2215         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
2216         * WebProcess/WebProcess.cpp:
2217         (WebKit::WebProcess::didReceiveSyncMessage):
2218         * WebProcess/WebProcess.h:
2219
2220 2016-08-16  Simon Fraser  <simon.fraser@apple.com>
2221
2222         Rename didLayout(LayoutMilestones) to didReachLayoutMilestone(), and related WK2 functions
2223         https://bugs.webkit.org/show_bug.cgi?id=160923
2224
2225         Reviewed by Tim Horton.
2226
2227         didLayout(LayoutMilestones) -> didReachLayoutMilestone(LayoutMilestones)
2228         dispatchDidLayout(LayoutMilestones) -> dispatchDidReachLayoutMilestone(LayoutMilestones)
2229
2230         Avoided changing functions that are exposed as API/SPI.
2231
2232         * UIProcess/API/APILoaderClient.h:
2233         (API::LoaderClient::didReachLayoutMilestone):
2234         (API::LoaderClient::didLayout): Deleted.
2235         * UIProcess/API/C/WKPage.cpp:
2236         (WKPageSetPageLoaderClient):
2237         * UIProcess/WebPageProxy.cpp:
2238         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
2239         (WebKit::WebPageProxy::didReachLayoutMilestone):
2240         (WebKit::WebPageProxy::didLayout): Deleted.
2241         * UIProcess/WebPageProxy.h:
2242         * UIProcess/WebPageProxy.messages.in:
2243         * UIProcess/ios/WebPageProxyIOS.mm:
2244         (WebKit::WebPageProxy::didCommitLayerTree):
2245         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2246         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2247         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2248         (didReachLayoutMilestone):
2249         (setUpPageLoaderClient):
2250         (didLayout): Deleted.
2251         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2252         (WebKit::InjectedBundlePageLoaderClient::didReachLayoutMilestone):
2253         (WebKit::InjectedBundlePageLoaderClient::didLayout): Deleted.
2254         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2255         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2256         (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
2257         (WebKit::WebFrameLoaderClient::dispatchDidLayout): Deleted.
2258         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2259         * WebProcess/WebPage/DrawingArea.h:
2260         (WebKit::DrawingArea::dispatchDidReachLayoutMilestone):
2261         (WebKit::DrawingArea::dispatchDidLayout): Deleted.
2262         * WebProcess/WebPage/WebPage.cpp:
2263         (WebKit::WebPage::dispatchDidReachLayoutMilestone):
2264         (WebKit::WebPage::dispatchDidLayout): Deleted.
2265         * WebProcess/WebPage/WebPage.h:
2266         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2267         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2268         (WebKit::RemoteLayerTreeDrawingArea::dispatchDidReachLayoutMilestone):
2269         (WebKit::RemoteLayerTreeDrawingArea::dispatchDidLayout): Deleted.
2270
2271 2016-08-18  Daniel Bates  <dabates@apple.com>
2272
2273         Ld warns of non-existent PrivateFrameworks directory when building WebKit with the public iOS 9.3 SDK
2274         https://bugs.webkit.org/show_bug.cgi?id=160979
2275
2276         Rubber-stamped by Simon Fraser.
2277
2278         Only add the SDK PrivateFrameworks directory to the FRAMEWORK_SEARCH_PATH when building for
2279         iOS Simulator, building with an iOS SDK that does not support text-based stubs, or building
2280         an Apple-internal build.
2281
2282         * Configurations/BaseTarget.xcconfig:
2283
2284 2016-08-18  Hunseop Jeong  <hs85.jeong@samsung.com>
2285
2286         Unreviewed, Fix CMake build after r204614
2287
2288         * PlatformMac.cmake:
2289
2290 2016-08-18  Chris Dumez  <cdumez@apple.com>
2291
2292         [iOS] Network Processes & Database processes do not exit promptly
2293         https://bugs.webkit.org/show_bug.cgi?id=160978
2294         <rdar://problem/27914081>
2295
2296         Reviewed by Anders Carlsson.
2297
2298         Network Processes & Database processes do not exit promptly. They hang
2299         for 10 seconds until they log the following message:
2300         > com.apple.WebKit.Networking: (WebKit) #WK: Exiting process early due to unacknowledged closed-connection
2301
2302         Then forcefully call exit(0).
2303
2304         To address the issue, we now call ChildProcess::stopRunLoop() instead
2305         of RunLoop::current().stop(). stopRunLoop() works as expected on iOS
2306         after r202723.
2307
2308         There is no impact on Mac because stopRunLoop() calls
2309         RunLoop::current().stop().
2310
2311         * DatabaseProcess/DatabaseProcess.cpp:
2312         (WebKit::DatabaseProcess::didClose):
2313         (WebKit::DatabaseProcess::didReceiveInvalidMessage):
2314         * NetworkProcess/NetworkProcess.cpp:
2315         (WebKit::NetworkProcess::didClose):
2316         (WebKit::NetworkProcess::didReceiveInvalidMessage):
2317
2318 2016-08-18  Dan Bernstein  <mitz@apple.com>
2319
2320         [Cocoa] API::Number needs to be wrapped by an NSNumber
2321         https://bugs.webkit.org/show_bug.cgi?id=160977
2322         <rdar://problem/27877735>
2323
2324         Reviewed by Anders Carlsson.
2325
2326         We introduce a single WKNSNumber class to wrap three distinct API::Number instantiations
2327         corresponding to the Boolean, UInt64 and Double types.
2328
2329         Test: TestWebKitAPI/Tests/WebKit2Cocoa/WKNSNumber.mm
2330
2331         * Shared/Cocoa/APIObject.mm:
2332         (API::Object::newObject): Create a WKNSNumber to contain any of the number types, and set
2333           its _type ivar accordingly.
2334         * Shared/Cocoa/WKNSNumber.h: Added.
2335         (WebKit::wrapper):
2336         * Shared/Cocoa/WKNSNumber.mm: Added.
2337         (-[WKNSNumber dealloc]): Call the appropriate destructor.
2338         (-[WKNSNumber objCType]): Implement this NSValue primitive method.
2339         (-[WKNSNumber getValue:]): Ditto.
2340         (-[WKNSNumber boolValue]): Implement this NSNumber method corresponding to one of our
2341           possible types.
2342         (-[WKNSNumber doubleValue]): Ditto.
2343         (-[WKNSNumber unsignedLongLongValue]): Ditto.
2344         (-[WKNSNumber copyWithZone:]): Implement this NSCopying method by retaining self.
2345         (-[WKNSNumber _apiObject]): Implement this WKObject method by returning the appropriate
2346           API object.
2347
2348         * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
2349
2350 2016-08-18  Andy Estes  <aestes@apple.com>
2351
2352         [Cocoa] Add SPI to WKProcessPool for enabling cookie storage partitioning
2353         https://bugs.webkit.org/show_bug.cgi?id=160964
2354
2355         Reviewed by Anders Carlsson.
2356
2357         Followed the guidelines for SPI naming.
2358
2359         * UIProcess/API/Cocoa/WKProcessPool.mm:
2360         (-[WKProcessPool _isCookieStoragePartitioningEnabled]): Renamed from -cookieStoragePartitioningEnabled.
2361         (-[WKProcessPool _setCookieStoragePartitioningEnabled:]): Renamed from -setCookieStoragePartitioningEnabled:.
2362         (-[WKProcessPool cookieStoragePartitioningEnabled]): Renamed to -_isCookieStoragePartitioningEnabled.
2363         (-[WKProcessPool setCookieStoragePartitioningEnabled:]): Renamed to -_setCookieStoragePartitioningEnabled:.
2364         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2365
2366 2016-08-18  Andy Estes  <aestes@apple.com>
2367
2368         Generated messages headers should use #pragma once
2369         https://bugs.webkit.org/show_bug.cgi?id=160965
2370
2371         Reviewed by Anders Carlsson.
2372
2373         * Scripts/webkit/messages.py:
2374         (generate_messages_header): Used #pragma once instead of a header guard.
2375
2376 2016-08-18  Andy Estes  <aestes@apple.com>
2377
2378         [Cocoa] Add SPI to WKProcessPool for enabling cookie storage partitioning
2379         https://bugs.webkit.org/show_bug.cgi?id=160964
2380
2381         Reviewed by Brent Fulgham.
2382
2383         * NetworkProcess/NetworkProcess.h: Declared setCookieStoragePartitioningEnabled().
2384         * NetworkProcess/NetworkProcess.messages.in: Added message SetCookieStoragePartitioningEnabled.
2385         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2386         (WebKit::NetworkProcessCreationParameters::encode): Encoded cookieStoragePartitioningEnabled.
2387         (WebKit::NetworkProcessCreationParameters::decode): Decoded cookieStoragePartitioningEnabled.
2388         * NetworkProcess/NetworkProcessCreationParameters.h: Declared cookieStoragePartitioningEnabled.
2389         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2390         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2391         Called NetworkStorageSession::setCookieStoragePartitioningEnabled() given the cookieStoragePartitioningEnabled parameter.
2392         (WebKit::NetworkProcess::setCookieStoragePartitioningEnabled):
2393         Called NetworkStorageSession::setCookieStoragePartitioningEnabled().
2394         * UIProcess/API/Cocoa/WKProcessPool.mm:
2395         (-[WKProcessPool cookieStoragePartitioningEnabled]): Returned WebProcessPool::cookieStoragePartitioningEnabled().
2396         (-[WKProcessPool setCookieStoragePartitioningEnabled:]): Called WebProcessPool::setCookieStoragePartitioningEnabled().
2397         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Declared cookieStoragePartitioningEnabled as a property.
2398         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2399         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2400         Set the cookieStoragePartitioningEnabled parameter from m_cookieStoragePartitioningEnabled.
2401         (WebKit::WebProcessPool::setCookieStoragePartitioningEnabled):
2402         Set m_cookieStoragePartitioningEnabled and sent the NetworkProcess::SetCookieStoragePartitioningEnabled message.
2403         * UIProcess/WebProcessPool.h: Declared cookieStoragePartitioningEnabled.
2404
2405 2016-08-17  Anders Carlsson  <andersca@apple.com>
2406
2407         Add support for additional networks
2408         https://bugs.webkit.org/show_bug.cgi?id=160951
2409         rdar://problem/27807479
2410
2411         Reviewed by Sam Weinig.
2412
2413         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
2414         (IPC::ArgumentCoder<PaymentRequest>::decode):
2415         (IPC::ArgumentCoder<PaymentRequest::SupportedNetworks>::encode): Deleted.
2416         (IPC::ArgumentCoder<PaymentRequest::SupportedNetworks>::decode): Deleted.
2417         * Shared/WebCoreArgumentCoders.h:
2418         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2419         (WebKit::toAdditionalSupportedNetwork):
2420         (WebKit::toSupportedNetwork):
2421         (WebKit::toSupportedNetworks):
2422         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
2423         (WebKit::WebPaymentCoordinator::supportsVersion):
2424
2425 2016-08-17  Anders Carlsson  <andersca@apple.com>
2426
2427         Remove a couple of unused WKSI function pointers
2428         https://bugs.webkit.org/show_bug.cgi?id=160946
2429
2430         Reviewed by Dan Bernstein.
2431
2432         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2433         (InitWebCoreSystemInterface): Deleted.
2434
2435 2016-08-17  Dan Bernstein  <mitz@apple.com>
2436
2437         [Cocoa] -[NSString isEqualToString:] returns NO for any WKNSString argument
2438         https://bugs.webkit.org/show_bug.cgi?id=160938
2439         <rdar://problem/27876652>
2440
2441         Reviewed by Anders Carlsson.
2442
2443         -[NSString isEqualToString:] calls an internal NSObject method on its argument, which
2444         NSString subclasses override to return YES, but WKObject does not override and does not
2445         forward to its target NSString.
2446
2447         To fix this issue and other similar issues, we make WKObject a root class instead of an
2448         NSObject subclass.
2449
2450         Test: TestWebKitAPI/Tests/WebKit2Cocoa/WKObject.mm
2451
2452         * Platform/spi/Cocoa/objcSPI.h: Added.
2453
2454         * Shared/Cocoa/WKObject.h: Make WKObject a root class instead of inhereting from NSObject.
2455
2456         * Shared/Cocoa/WKObject.mm:
2457         (+[WKObject class]): Return self.
2458         (-[WKObject allowsWeakReference]): Added. Called by the Objective-C runtime.
2459         (-[WKObject retainWeakReference]): Ditto.
2460         (-[WKObject hash]): If we don’t have a target, return our address.
2461         (-[WKObject superclass]): Implement this NSObject protocol method.
2462         (-[WKObject class]): Ditto.
2463         (-[WKObject self]): Ditto.
2464         (-[WKObject performSelector:]): Ditto.
2465         (-[WKObject performSelector:withObject:]): Ditto.
2466         (-[WKObject performSelector:withObject:withObject:]): Ditto.
2467         (-[WKObject isProxy]): Ditto.
2468         (-[WKObject respondsToSelector:]): Changed to not call super.
2469         (-[WKObject conformsToProtocol:]): Ditto.
2470         (-[WKObject description]): Ditto.
2471         (-[WKObject retain]): Implement this NSObject protocol method.
2472         (-[WKObject release]): Ditto.
2473         (-[WKObject autorelease]): Ditto.
2474         (-[WKObject retainCount]): Ditto.
2475         (-[WKObject zone]): Ditto.
2476         (-[WKObject dealloc]): Deleted.
2477         (-[WKObject classForCoder]): Deleted.
2478         (-[WKObject classForKeyedArchiver]): Deleted.
2479         (-[WKObject _cfTypeID]): Deleted.
2480
2481         * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
2482
2483 2016-08-17  Hunseop Jeong  <hs85.jeong@samsung.com>
2484
2485         [EFL] Fix test_ewk2_view after r203612 
2486         https://bugs.webkit.org/show_bug.cgi?id=160937
2487
2488         Reviewed by Gyuyoung Kim.
2489
2490         Default parameter values for window.alert() / prompt() / confirm() was
2491         changed from "undefined" to the empty string after r203612.
2492
2493         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2494         (TEST_F):
2495
2496 2016-08-16  Simon Fraser  <simon.fraser@apple.com>
2497
2498         [iOS WK2] Don't throw touchMove events on the floor
2499         https://bugs.webkit.org/show_bug.cgi?id=160935
2500
2501         Reviewed by Tim Horton.
2502         
2503         EventDispatcher claimed to coalesce touchMove events, but actually threw away any
2504         touchMove if there was one in the queue when the next non-move event came along.
2505         
2506         Fix to strictly coalesce touchMove events, so a start/move/end stream always fires
2507         a move event. This is necessary for move-based interaction to work in testing,
2508         for example the added range slider test.
2509         
2510         Test: fast/forms/ios/drag-range-thumb.html
2511
2512         * WebProcess/WebPage/EventDispatcher.cpp:
2513         (WebKit::EventDispatcher::touchEvent):
2514
2515 2016-08-16  Simon Fraser  <simon.fraser@apple.com>
2516
2517         [iOS WK2] Clean up form select code
2518         https://bugs.webkit.org/show_bug.cgi?id=160915
2519
2520         Reviewed by Enrica Casucci.
2521         
2522         Some minor forms-related cleanup:
2523         1. Give WKFormSelectPopover and WKFormSelectPicker their own header files, making
2524         things easier to find.
2525         
2526         2. Remove WKContentView *_view member variables from classes which also stored
2527         the view in their base classes.
2528         
2529         Sort the project file.
2530
2531         * UIProcess/ios/forms/WKFormPopover.h:
2532         * UIProcess/ios/forms/WKFormPopover.mm:
2533         (-[WKFormRotatingAccessoryPopover accessoryDone]):
2534         (-[WKFormRotatingAccessoryPopover initWithView:]): Deleted.
2535         * UIProcess/ios/forms/WKFormSelectControl.h:
2536         * UIProcess/ios/forms/WKFormSelectControl.mm:
2537         * UIProcess/ios/forms/WKFormSelectPicker.h: Copied from Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h.
2538         * UIProcess/ios/forms/WKFormSelectPicker.mm:
2539         * UIProcess/ios/forms/WKFormSelectPopover.h: Copied from Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h.
2540         * UIProcess/ios/forms/WKFormSelectPopover.mm:
2541         (-[WKSelectPopover initWithView:hasGroups:]):
2542         * WebKit2.xcodeproj/project.pbxproj:
2543
2544 2016-08-16  Daniel Bates  <dabates@apple.com>
2545
2546         WKSI static library should be named by major iOS revision, not individual updates
2547         https://bugs.webkit.org/show_bug.cgi?id=160727
2548         <rdar://problem/22274848>
2549
2550         Reviewed by Alexey Proskuryakov.
2551
2552         * Configurations/Base.xcconfig:
2553         * Configurations/BaseTarget.xcconfig:
2554         * Configurations/DebugRelease.xcconfig:
2555
2556 2016-08-16  Simon Fraser  <simon.fraser@apple.com>
2557
2558         Make it possible to test iOS select elements, and add iPhone and iPad tests for them
2559         https://bugs.webkit.org/show_bug.cgi?id=160909
2560
2561         Reviewed by Enrica Casucci.
2562         
2563         Hook up form-related UIScriptController functions, and plumb through the various
2564         <select> pickers the ability to select a row.
2565
2566         * UIProcess/API/Cocoa/WKWebView.mm:
2567         (-[WKWebView dismissFormAccessoryView]):
2568         (-[WKWebView selectFormAccessoryPickerRow:]):
2569         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2570         * UIProcess/ios/WKContentViewInteraction.h:
2571         * UIProcess/ios/WKContentViewInteraction.mm:
2572         (-[WKContentView selectFormAccessoryPickerRow:]):
2573         * UIProcess/ios/forms/WKFormSelectControl.h:
2574         * UIProcess/ios/forms/WKFormSelectControl.mm:
2575         (-[WKFormSelectControl selectRow:inComponent:extendingSelection:]):
2576         * UIProcess/ios/forms/WKFormSelectPicker.mm:
2577         (-[WKMultipleSelectPicker selectRow:inComponent:extendingSelection:]):
2578         (-[WKSelectSinglePicker selectRow:inComponent:extendingSelection:]):
2579         * UIProcess/ios/forms/WKFormSelectPopover.mm:
2580         (-[WKSelectPopover selectRow:inComponent:extendingSelection:]):
2581
2582 2016-08-16  Brady Eidson  <beidson@apple.com>
2583
2584         Cleanup WK2 platform gamepad handling.
2585         https://bugs.webkit.org/show_bug.cgi?id=160871
2586
2587         Reviewed by Alex Christensen.
2588
2589         This patch does a few things:
2590         1 - Separates the concepts of "monitoring gamepads" and "monitoring gamepad inputs"
2591         2 - Uses this new concept to much more cleanly handle the case where we are not currently
2592             monitoring gamepad inputs because an interested WKWebView is not front and center.
2593         3 - Pre-populates the "initial set of gamepads" in WebProcesses that start listening for gamepads.
2594         
2595         * Platform/Logging.h:
2596         
2597         * UIProcess/Gamepad/UIGamepadProvider.cpp:
2598         (WebKit::UIGamepadProvider::gamepadSyncTimerFired):
2599         (WebKit::UIGamepadProvider::setInitialConnectedGamepads):
2600         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
2601         (WebKit::UIGamepadProvider::viewBecameActive):
2602         (WebKit::UIGamepadProvider::viewBecameInactive):
2603         (WebKit::UIGamepadProvider::stopMonitoringGamepads):
2604         (WebKit::UIGamepadProvider::snapshotGamepads):
2605         (WebKit::UIGamepadProvider::platformStopMonitoringInput):
2606         (WebKit::UIGamepadProvider::platformStartMonitoringInput):
2607         (WebKit::UIGamepadProvider::UIGamepadProvider): Deleted.
2608         (WebKit::UIGamepadProvider::scheduleDisableGamepadMonitoring): Deleted.
2609         (WebKit::UIGamepadProvider::disableMonitoringTimerFired): Deleted.
2610         * UIProcess/Gamepad/UIGamepadProvider.h:
2611         
2612         * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
2613         (WebKit::UIGamepadProvider::platformStopMonitoringInput):
2614         (WebKit::UIGamepadProvider::platformStartMonitoringInput):
2615         
2616         * UIProcess/WebProcessPool.cpp:
2617         (WebKit::WebProcessPool::setInitialConnectedGamepads):
2618         * UIProcess/WebProcessPool.h:
2619         
2620         * WebProcess/Gamepad/WebGamepadProvider.cpp:
2621         (WebKit::WebGamepadProvider::setInitialGamepads):
2622         * WebProcess/Gamepad/WebGamepadProvider.h:
2623         
2624         * WebProcess/WebProcess.cpp:
2625         (WebKit::WebProcess::setInitialGamepads):
2626         * WebProcess/WebProcess.h:
2627         * WebProcess/WebProcess.messages.in:
2628
2629 2016-08-15  Simon Fraser  <simon.fraser@apple.com>
2630
2631         [iOS] Add iPad viewport and form tests, and revert the iPad-testing part of r202132
2632         https://bugs.webkit.org/show_bug.cgi?id=160878
2633
2634         Reviewed by Tim Horton.
2635
2636         Remove testing-specific "forceIPadStyleZoomOnInputFocus" behavior added in r202132
2637         now that we have the ability to run tests in the iPad simulator.
2638
2639         * UIProcess/API/Cocoa/WKWebView.mm:
2640         (-[WKWebView forceIPadStyleZoomOnInputFocus]): Deleted.
2641         (-[WKWebView setForceIPadStyleZoomOnInputFocus:]): Deleted.
2642         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2643         * UIProcess/ios/WKContentViewInteraction.h:
2644         * UIProcess/ios/WKContentViewInteraction.mm:
2645         (-[WKContentView _displayFormNodeInputView]):
2646         (-[WKContentView requiresAccessoryView]):
2647         (-[WKContentView inputAccessoryView]):
2648         (-[WKContentView requiresAccessoryView:]): Deleted.
2649         (-[WKContentView forceIPadStyleZoomOnInputFocus]): Deleted.
2650         (-[WKContentView setForceIPadStyleZoomOnInputFocus:]): Deleted.
2651
2652 2016-08-16  Alex Christensen  <achristensen@webkit.org>
2653
2654         Clean up WebSockets
2655         https://bugs.webkit.org/show_bug.cgi?id=160889
2656
2657         Reviewed by Darin Adler.
2658
2659         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
2660         (WebKit::WebSocketServerConnection::didCloseSocketStream):
2661         (WebKit::WebSocketServerConnection::didReceiveSocketStreamData):
2662         * UIProcess/InspectorServer/WebSocketServerConnection.h:
2663
2664 2016-08-16  Chris Dumez  <cdumez@apple.com>
2665
2666         Unreviewed, rolling out r204506.
2667
2668         Broke the build
2669
2670         Reverted changeset:
2671
2672         "Cleanup WK2 platform gamepad handling."
2673         https://bugs.webkit.org/show_bug.cgi?id=160871
2674         http://trac.webkit.org/changeset/204506
2675
2676 2016-08-16  Darin Adler  <darin@apple.com>
2677
2678         [Cocoa] Remove dependency on Objective-C bindings in WebKit2 editing code
2679         https://bugs.webkit.org/show_bug.cgi?id=160891
2680
2681         Reviewed by Anders Carlsson.
2682
2683         * WebProcess/WebCoreSupport/WebEditorClient.h: Removed documentFragmentFromAttributedString.
2684         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2685         (WebKit::WebEditorClient::documentFragmentFromAttributedString): Deleted.
2686         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2687         (WebKit::createExcludedElementsForAttributedStringConversion): Deleted.
2688         (WebKit::WebEditorClient::documentFragmentFromAttributedString): Deleted.
2689
2690 2016-08-16  Brady Eidson  <beidson@apple.com>
2691
2692         Cleanup WK2 platform gamepad handling.
2693         https://bugs.webkit.org/show_bug.cgi?id=160871
2694
2695         Reviewed by Alex Christensen.
2696
2697         This patch does a few things:
2698         1 - Separates the concepts of "monitoring gamepads" and "monitoring gamepad inputs"
2699         2 - Uses this new concept to much more cleanly handle the case where we are not currently
2700             monitoring gamepad inputs because an interested WKWebView is not front and center.
2701         3 - Pre-populates the "initial set of gamepads" in WebProcesses that start listening for gamepads.
2702         
2703         * Platform/Logging.h:
2704         
2705         * UIProcess/Gamepad/UIGamepadProvider.cpp:
2706         (WebKit::UIGamepadProvider::gamepadSyncTimerFired):
2707         (WebKit::UIGamepadProvider::setInitialConnectedGamepads):
2708         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
2709         (WebKit::UIGamepadProvider::viewBecameActive):
2710         (WebKit::UIGamepadProvider::viewBecameInactive):
2711         (WebKit::UIGamepadProvider::stopMonitoringGamepads):
2712         (WebKit::UIGamepadProvider::snapshotGamepads):
2713         (WebKit::UIGamepadProvider::platformStopMonitoringInput):
2714         (WebKit::UIGamepadProvider::platformStartMonitoringInput):
2715         (WebKit::UIGamepadProvider::UIGamepadProvider): Deleted.
2716         (WebKit::UIGamepadProvider::scheduleDisableGamepadMonitoring): Deleted.
2717         (WebKit::UIGamepadProvider::disableMonitoringTimerFired): Deleted.
2718         * UIProcess/Gamepad/UIGamepadProvider.h:
2719         
2720         * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
2721         (WebKit::UIGamepadProvider::platformStopMonitoringInput):
2722         (WebKit::UIGamepadProvider::platformStartMonitoringInput):
2723         
2724         * UIProcess/WebProcessPool.cpp:
2725         (WebKit::WebProcessPool::setInitialConnectedGamepads):
2726         * UIProcess/WebProcessPool.h:
2727         
2728         * WebProcess/Gamepad/WebGamepadProvider.cpp:
2729         (WebKit::WebGamepadProvider::setInitialGamepads):
2730         * WebProcess/Gamepad/WebGamepadProvider.h:
2731         
2732         * WebProcess/WebProcess.cpp:
2733         (WebKit::WebProcess::setInitialGamepads):
2734         * WebProcess/WebProcess.h:
2735         * WebProcess/WebProcess.messages.in:
2736
2737 2016-08-15  Alex Christensen  <achristensen@webkit.org>
2738
2739         Rename SocketStreamHandleBase to SocketStreamHandle and SocketStreamHandle to SocketStreamHandleImpl
2740         https://bugs.webkit.org/show_bug.cgi?id=160858
2741
2742         Reviewed by Brady Eidson.
2743
2744         * WebProcess/Network/WebSocketProvider.cpp:
2745         (WebKit::WebSocketProvider::createSocketStreamHandle):
2746
2747 2016-08-15  Anders Carlsson  <andersca@apple.com>
2748
2749         Fix iOS build.
2750
2751         * WebProcess/WebPage/ios/WebPageIOS.mm:
2752         (WebKit::WebPage::webGLPolicyForURL):
2753         (WebKit::WebPage::resolveWebGLPolicyForURL):
2754
2755 2016-08-15  Keith Rollin  <krollin@apple.com>
2756
2757         Rename LOG_ALWAYS
2758         https://bugs.webkit.org/show_bug.cgi?id=160768
2759
2760         Rename LOG_ALWAYS and friends, given that the first parameter to it is
2761         a boolean expression that determines whether or not logging should be
2762         performed.
2763
2764         Reviewed by Chris Dumez.
2765
2766         * NetworkProcess/Downloads/Download.cpp:
2767         (WebKit::Download::didReceiveResponse):
2768         (WebKit::Download::didReceiveData):
2769         (WebKit::Download::didFinish):
2770         (WebKit::Download::didFail):
2771         (WebKit::Download::didCancel):
2772         * NetworkProcess/NetworkProcess.cpp:
2773         (WebKit::NetworkProcess::prepareToSuspend):
2774         (WebKit::NetworkProcess::cancelPrepareToSuspend):
2775         (WebKit::NetworkProcess::processDidResume):
2776         * NetworkProcess/NetworkResourceLoader.cpp:
2777         (WebKit::NetworkResourceLoader::startNetworkLoad):
2778         (WebKit::NetworkResourceLoader::didFinishLoading):
2779         (WebKit::NetworkResourceLoader::didFailLoading):
2780         (WebKit::NetworkResourceLoader::continueWillSendRequest):
2781         * Platform/IPC/Connection.cpp:
2782         (IPC::Connection::waitForSyncReply):
2783         * Shared/ChildProcess.cpp:
2784         (WebKit::didCloseOnConnectionWorkQueue):
2785         * UIProcess/Cocoa/NavigationState.mm:
2786         (WebKit::NavigationState::didChangeIsLoading):
2787         * UIProcess/Network/NetworkProcessProxy.cpp:
2788         (WebKit::NetworkProcessProxy::fetchWebsiteData):
2789         (WebKit::NetworkProcessProxy::deleteWebsiteData):
2790         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
2791         (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
2792         * UIProcess/ProcessThrottler.cpp:
2793         (WebKit::ProcessThrottler::updateAssertionNow):
2794         (WebKit::ProcessThrottler::updateAssertion):
2795         * UIProcess/WebPageProxy.cpp:
2796         (WebKit::WebPageProxy::updateActivityToken):
2797         * UIProcess/WebProcessProxy.cpp:
2798         (WebKit::WebProcessProxy::fetchWebsiteData):
2799         (WebKit::WebProcessProxy::deleteWebsiteData):
2800         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
2801         (WebKit::WebProcessProxy::didSetAssertionState):
2802         (WebKit::WebProcessProxy::setIsHoldingLockedFiles):
2803         * UIProcess/ios/ProcessAssertionIOS.mm:
2804         (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
2805         (WebKit::ProcessAssertion::ProcessAssertion):
2806         * WebProcess/Network/WebLoaderStrategy.cpp:
2807         (WebKit::WebLoaderStrategy::scheduleLoad):
2808         * WebProcess/Network/WebResourceLoader.cpp:
2809         (WebKit::WebResourceLoader::willSendRequest):
2810         (WebKit::WebResourceLoader::didReceiveResponse):
2811         (WebKit::WebResourceLoader::didReceiveData):
2812         (WebKit::WebResourceLoader::didFinishResourceLoad):
2813         (WebKit::WebResourceLoader::didFailResourceLoad):
2814         (WebKit::WebResourceLoader::didReceiveResource):
2815         * WebProcess/WebPage/WebPage.cpp:
2816         (WebKit::WebPage::layerVolatilityTimerFired):
2817         (WebKit::WebPage::markLayersVolatile):
2818         (WebKit::WebPage::cancelMarkLayersVolatile):
2819         * WebProcess/WebProcess.cpp:
2820         (WebKit::WebProcess::actualPrepareToSuspend):
2821         (WebKit::WebProcess::processWillSuspendImminently):
2822         (WebKit::WebProcess::prepareToSuspend):
2823         (WebKit::WebProcess::cancelPrepareToSuspend):
2824         (WebKit::WebProcess::markAllLayersVolatile):
2825         (WebKit::WebProcess::processDidResume):
2826
2827 2016-08-15  Daniel Bates  <dabates@apple.com>
2828
2829         Cannot build WebKit for iOS device using Xcode 7.3/iOS 9.3 public SDK due to missing
2830         private frameworks and libraries
2831         https://bugs.webkit.org/show_bug.cgi?id=155931
2832         <rdar://problem/25807989>
2833
2834         Reviewed by Dan Bernstein.
2835
2836         Add directory WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/X to the framework search path
2837         where X is the major version of the active iOS SDK.
2838
2839         * Configurations/BaseTarget.xcconfig:
2840
2841 2016-08-15  Simon Fraser  <simon.fraser@apple.com>
2842
2843         Add a setting and preferences to enable visual viewport mode
2844         https://bugs.webkit.org/show_bug.cgi?id=160843
2845
2846         Reviewed by Sam Weinig.
2847         
2848         Hook up the visualViewportEnabled setting for WebKit2.
2849
2850         * Shared/WebPreferencesDefinitions.h:
2851         * UIProcess/API/Cocoa/WKPreferences.mm:
2852         (-[WKPreferences _visualViewportEnabled]):
2853         (-[WKPreferences _setVisualViewportEnabled:]):
2854         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2855         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2856         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2857         * WebProcess/WebPage/WebPage.cpp:
2858         (WebKit::WebPage::updatePreferences):
2859
2860 2016-08-15  Joseph Pecoraro  <pecoraro@apple.com>
2861
2862         Remove unused includes of wtf headers
2863         https://bugs.webkit.org/show_bug.cgi?id=160839
2864
2865         Reviewed by Alex Christensen.
2866
2867         * Lots of files.
2868
2869 2016-08-12  Anders Carlsson  <andersca@apple.com>
2870
2871         Move the plug-in and WebGL blacklist code to WebCore
2872         https://bugs.webkit.org/show_bug.cgi?id=160831
2873
2874         Reviewed by Sam Weinig.
2875
2876         Adopt the plug-in and WebGL blacklist code from WebCore instead of using the code from WebKitSystemInterface.
2877
2878         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
2879         (WebKit::getPlatformPluginModuleInformation):
2880         * Shared/Plugins/PluginModuleInfo.h:
2881         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2882         (WKContextIsPlugInUpdateAvailable):
2883         (WKContextShouldBlockWebGL):
2884         (WKContextShouldSuggestBlockWebGL):
2885         * UIProcess/Plugins/PluginInfoStore.h:
2886         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2887         (WebKit::shouldBlockPlugin):
2888         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
2889         (WebKit::WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy): Deleted.
2890         * UIProcess/WebPageProxy.cpp:
2891         (WebKit::WebPageProxy::findPlugin):
2892
2893 2016-08-10  Brent Fulgham  <bfulgham@apple.com>
2894
2895         Add Sandbox profile for Enterprise support version of Flash Player
2896         https://bugs.webkit.org/show_bug.cgi?id=160753
2897         <rdar://problem/17614483>
2898
2899         Reviewed by Andy Estes.
2900
2901         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player ESR.plugin.sb: Added.
2902         * WebKit2.xcodeproj/project.pbxproj: Add reference to new sandbox profile.
2903
2904 2016-08-14  Dan Bernstein  <mitz@apple.com>
2905
2906         [Cocoa] Remove deprecated _WKFormDelegate
2907         https://bugs.webkit.org/show_bug.cgi?id=160848
2908
2909         Reviewed by Anders Carlsson.
2910
2911         * Shared/API/Cocoa/WebKitPrivate.h: Removed #import.
2912         * UIProcess/API/Cocoa/WKWebView.mm:
2913         (-[WKWebView _formDelegate]): Moved into WKBinaryCompatibilityIOS10 cateogry implementation,
2914           chaged type to id <_WKInputDelegate>.
2915         (-[WKWebView _setFormDelegate:]): Ditto.
2916         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Removed property declaration.
2917         * UIProcess/API/Cocoa/_WKFormDelegate.h: Removed.
2918         * WebKit2.xcodeproj/project.pbxproj: Removed reference to header.
2919         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Fixed comment.
2920
2921 2016-08-14  Daniel Bates  <dabates@apple.com>
2922
2923         Fix compiler errors when building iOS WebKit using the iOS 10 beta SDK
2924         https://bugs.webkit.org/show_bug.cgi?id=160725
2925
2926         Reviewed by Sam Weinig.
2927
2928         * Platform/spi/ios/UIKitSPI.h: Add SPI for UITextInputSuggestionDelegate.
2929         * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm: Remove unnecessary include of PKPaymentMerchantSession.h.
2930
2931 2016-08-14  Dan Bernstein  <mitz@apple.com>
2932
2933         [Cocoa] Remove deprecated _WKVisitedLinkProvider declarations that aren’t needed
2934         https://bugs.webkit.org/show_bug.cgi?id=160846
2935
2936         Reviewed by Darin Adler.
2937
2938         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2939         (-[WKWebViewConfiguration _visitedLinkProvider]): Moved into WKBinaryCompatibilityIOS10
2940           cateogry implementation, changed type to _WKVisitedLinkStore.
2941         (-[WKWebViewConfiguration _setVisitedLinkProvider:]): Ditto.
2942         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Removed property declaration.
2943
2944         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h: Removed.
2945         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Moved declaration in here.
2946
2947         * WebKit2.xcodeproj/project.pbxproj: Updated for header removal.
2948
2949 2016-08-12  Dan Bernstein  <mitz@apple.com>
2950
2951         [Cocoa] Instances of WKObject subclasses don’t work correctly with CFGetTypeID()
2952         https://bugs.webkit.org/show_bug.cgi?id=160820
2953         <rdar://problem/27825875>
2954
2955         Reviewed by Anders Carlsson.
2956
2957         * Shared/Cocoa/WKObject.mm:
2958         (-[WKObject _cfTypeID]): Override this internal method and forward to the target object.
2959
2960 2016-08-12  Johan K. Jensen  <johan_jensen@apple.com>
2961
2962         Rename DocumentLoadTiming and ResourceLoadTiming
2963         https://bugs.webkit.org/show_bug.cgi?id=160821
2964
2965         Reviewed by Alex Christensen.
2966
2967         Rename ResourceLoadTiming to NetworkLoadTiming.
2968
2969         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2970         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
2971
2972 2016-08-12  Anders Carlsson  <andersca@apple.com>
2973
2974         message loading never finishes in Mail
2975         https://bugs.webkit.org/show_bug.cgi?id=160806
2976         rdar://problem/27624095
2977
2978         Reviewed by Dan Bernstein.
2979
2980         Add more checks for when a process goes away before we've established a proper connection to it.
2981
2982         * Platform/IPC/mac/ConnectionMac.mm:
2983         (IPC::Connection::receiveSourceEventHandler):
2984         Handle the MACH_NOTIFY_NO_SENDERS and MACH_NOTIFY_SEND_ONCE messages here. Also, once we receive a send
2985         right from the other side, stop listening for the MACH_NOTIFY_NO_SENDERS notification.
2986
2987         * UIProcess/ChildProcessProxy.cpp:
2988         (WebKit::ChildProcessProxy::didFinishLaunching):
2989         Null check the connection identifier.
2990
2991         * UIProcess/Launcher/ProcessLauncher.cpp:
2992         (WebKit::ProcessLauncher::ProcessLauncher):
2993         (WebKit::processLauncherWorkQueue): Deleted.
2994         Get rid of the process launcher queue - we're not doing any blocking work here.
2995
2996         * UIProcess/Launcher/ProcessLauncher.h:
2997         Add a weak factory.
2998
2999         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3000         (WebKit::systemDirectoryPath):
3001         Move this before launchProcess().
3002
3003         (WebKit::ProcessLauncher::launchProcess):
3004         Merge createService and connectToService into launchProcess. Also make the following changes:
3005         - Use mach_port_request_notification to get a notification for when our receive right loses all its senders.
3006         This lets us listen for the other process going away before we have a send right for it.
3007         - Use xpc_connection_set_event_handler to listen for errors, so we can detect the process going away before
3008         we've sent a message to it.
3009         
3010         (WebKit::connectToService): Deleted.
3011         (WebKit::createService): Deleted.
3012
3013         * UIProcess/Network/NetworkProcessProxy.cpp:
3014         (WebKit::NetworkProcessProxy::didFinishLaunching):
3015         If we failed to launch, call networkProcessCrashedOrFailedToLaunch so we'll unblock any waiting web processes.
3016
3017         * UIProcess/WebProcessProxy.cpp:
3018         (WebKit::WebProcessProxy::didFinishLaunching):
3019         Null check the connection and XPC connection before trying to get its pid.
3020
3021 2016-08-11  Brady Eidson  <beidson@apple.com>
3022
3023         [WK2] Don't monitor gamepads at all unless an interested WebPageProxy is in the active window.
3024         https://bugs.webkit.org/show_bug.cgi?id=160760
3025
3026         Reviewed by Tim Horton.
3027         
3028         This patch makes it such that the UIProcess will only listen to the platform gamepad mechanism
3029         if a WebPageProxy that is interested in gamepads is in the active window.
3030
3031         * UIProcess/Cocoa/WebViewImpl.mm:
3032         (WebKit::WebViewImpl::windowDidBecomeKey):
3033         (WebKit::WebViewImpl::windowDidResignKey):
3034
3035         * UIProcess/Gamepad/UIGamepadProvider.cpp:
3036         (WebKit::UIGamepadProvider::UIGamepadProvider):
3037         (WebKit::UIGamepadProvider::gamepadSyncTimerFired):
3038         (WebKit::UIGamepadProvider::scheduleGamepadStateSync):
3039         (WebKit::UIGamepadProvider::platformGamepadConnected):
3040         (WebKit::UIGamepadProvider::platformGamepadDisconnected):
3041         (WebKit::UIGamepadProvider::platformGamepadInputActivity):
3042         (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
3043         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
3044         (WebKit::UIGamepadProvider::viewBecameActive):
3045         (WebKit::UIGamepadProvider::viewBecameInactive):
3046         (WebKit::UIGamepadProvider::scheduleDisableGamepadMonitoring):
3047         (WebKit::UIGamepadProvider::disableMonitoringTimerFired):
3048         (WebKit::UIGamepadProvider::startMonitoringGamepads):
3049         (WebKit::UIGamepadProvider::stopMonitoringGamepads):
3050         (WebKit::UIGamepadProvider::updateTimerFired): Deleted.
3051         (WebKit::UIGamepadProvider::startOrStopSynchingGamepadState): Deleted.
3052         * UIProcess/Gamepad/UIGamepadProvider.h:
3053
3054 2016-08-11  Brady Eidson  <beidson@apple.com>
3055
3056         Make Gamepads be a WK2 ExperimentalFeature.
3057         https://bugs.webkit.org/show_bug.cgi?id=160788
3058
3059         Reviewed by Alex Christensen.
3060
3061         * Shared/WebPreferencesDefinitions.h:
3062
3063 2016-08-11  Alex Christensen  <achristensen@webkit.org>
3064
3065         Don't use a NetworkingContext when creating SocketStreamHandles
3066         https://bugs.webkit.org/show_bug.cgi?id=160732
3067
3068         Reviewed by Brady Eidson.
3069
3070         * WebProcess/Network/WebSocketProvider.cpp:
3071         (WebKit::WebSocketProvider::createSocketStreamHandle):
3072         * WebProcess/Network/WebSocketProvider.h:
3073
3074 2016-08-11  Alex Christensen  <achristensen@webkit.org>
3075
3076         Use StringBuilder::appendLiteral when possible don't append result of makeString
3077         https://bugs.webkit.org/show_bug.cgi?id=160772
3078
3079         Reviewed by Sam Weinig.
3080
3081         * Shared/Gamepad/GamepadData.cpp:
3082         (WebKit::GamepadData::isNull):
3083         (WebKit::GamepadData::loggingString):
3084         * Shared/Gamepad/GamepadData.h:
3085         * UIProcess/WebProcessPool.h:
3086
3087 2016-08-10  Alex Christensen  <achristensen@webkit.org>
3088
3089         Fix crash when changing cookie accept policy after r204327
3090         https://bugs.webkit.org/show_bug.cgi?id=160758
3091
3092         Reviewed by Simon Fraser.
3093
3094         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3095         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
3096
3097 2016-08-10  Simon Fraser  <simon.fraser@apple.com>
3098
3099         Sort the feature flags in the FEATURE_DEFINES lines
3100         https://bugs.webkit.org/show_bug.cgi?id=160742
3101
3102         Reviewed by Anders Carlsson.
3103
3104         * Configurations/FeatureDefines.xcconfig:
3105
3106 2016-08-09  Alex Christensen  <achristensen@webkit.org>
3107
3108         Move NetworkStorageSession management to WebCore
3109         https://bugs.webkit.org/show_bug.cgi?id=160173
3110
3111         Reviewed by Brady Eidson.
3112
3113         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3114         (WebKit::storageSession):
3115         * NetworkProcess/NetworkProcess.cpp:
3116         (WebKit::NetworkProcess::fetchWebsiteData):
3117         (WebKit::NetworkProcess::deleteWebsiteData):
3118         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
3119         * NetworkProcess/NetworkSession.h:
3120         (WebKit::NetworkSession::sessionID):
3121         NetworkSessions no longer own NetworkStorageSessions, but they should still have the same lifetime.
3122         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3123         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
3124         (WebKit::NetworkSession::setSourceApplicationAuditTokenData):
3125         (WebKit::NetworkSession::create):
3126         (WebKit::NetworkSession::defaultSession):
3127         (WebKit::NetworkSession::NetworkSession):
3128         (WebKit::NetworkSession::networkStorageSession):
3129         (WebKit::NetworkSession::clearCredentials):
3130         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3131         (WebKit::RemoteNetworkingContext::storageSession):
3132         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3133         * Shared/SessionTracker.cpp:
3134         (WebKit::SessionTracker::networkSession):
3135         (WebKit::SessionTracker::setSession):
3136         (WebKit::SessionTracker::destroySession):
3137         (WebKit::SessionTracker::storageSession): Deleted.
3138         (WebKit::staticStorageSessionMap): Deleted.
3139         (WebKit::SessionTracker::sessionID): Deleted.
3140         (WebKit::SessionTracker::forEachNetworkStorageSession): Deleted.
3141         * Shared/SessionTracker.h:
3142         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3143         (WebKit::WebPlatformStrategies::cookiesForDOM):
3144         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
3145         (WebKit::WebPlatformStrategies::cookiesEnabled):
3146         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
3147         (WebKit::WebPlatformStrategies::getRawCookies):
3148         (WebKit::WebPlatformStrategies::deleteCookie):
3149         (WebKit::WebPlatformStrategies::addCookie):
3150         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3151         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3152         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
3153         (WebKit::WebFrameNetworkingContext::storageSession):
3154         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3155         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3156         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
3157         * WebProcess/WebPage/mac/WebPageMac.mm:
3158         * WebProcess/WebProcess.cpp:
3159
3160 2016-08-09  Anders Carlsson  <andersca@apple.com>
3161
3162         Fix iOS build.
3163
3164         * UIProcess/WebProcessPool.cpp:
3165         (WebKit::WebProcessPool::setPluginLoadClientPolicy): Deleted.
3166         (WebKit::WebProcessPool::clearPluginClientPolicies): Deleted.
3167
3168 2016-08-09  Anders Carlsson  <andersca@apple.com>
3169
3170         Instantiate WebKit plug-ins at layout time, instead of at style resolution time
3171         https://bugs.webkit.org/show_bug.cgi?id=160715
3172
3173         Reviewed by Tim Horton.
3174
3175         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3176         (WebKit::WebFrameLoaderClient::objectContentType):
3177
3178 2016-08-09  Brady Eidson  <beidson@apple.com>
3179
3180         [WK2] Only send gamepad input events to the currently focused page.
3181         https://bugs.webkit.org/show_bug.cgi?id=160699
3182
3183         Reviewed by Tim Horton.
3184         
3185         * UIProcess/Gamepad/UIGamepadProvider.cpp:
3186         (WebKit::UIGamepadProvider::updateTimerFired):
3187         (WebKit::UIGamepadProvider::platformWebProcessProxyForGamepadInput):
3188         * UIProcess/Gamepad/UIGamepadProvider.h:
3189         * UIProcess/Gamepad/mac/UIGamepadProviderMac.mm: Copied from Source/WebKit2/UIProcess/API/mac/WKViewInternal.h.
3190         (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
3191         
3192         * UIProcess/WebPageProxy.cpp:
3193         (WebKit::WebPageProxy::gamepadActivity):
3194         * UIProcess/WebPageProxy.h:
3195         
3196         * UIProcess/WebProcessPool.cpp:
3197         (WebKit::WebProcessPool::gamepadActivity): Deleted.
3198         * UIProcess/WebProcessPool.h:
3199         
3200         * WebKit2.xcodeproj/project.pbxproj:
3201         
3202         * WebProcess/WebPage/WebPage.cpp:
3203         (WebKit::WebPage::gamepadActivity):
3204         * WebProcess/WebPage/WebPage.h:
3205         * WebProcess/WebPage/WebPage.messages.in:
3206         
3207         * WebProcess/WebProcess.cpp:
3208         (WebKit::WebProcess::gamepadActivity): Deleted.
3209         * WebProcess/WebProcess.h:
3210         * WebProcess/WebProcess.messages.in:
3211
3212 2016-08-09  Anders Carlsson  <andersca@apple.com>
3213
3214         Remove code that would tell clients whenever the list of installed plug-ins changes
3215         https://bugs.webkit.org/show_bug.cgi?id=160719
3216
3217         Reviewed by Tim Horton.
3218
3219         * UIProcess/Plugins/PluginInfoStore.cpp:
3220         (WebKit::PluginInfoStore::PluginInfoStore): Deleted.
3221         (WebKit::PluginInfoStore::loadPluginsIfNecessary): Deleted.
3222         * UIProcess/Plugins/PluginInfoStore.h:
3223         (WebKit::PluginInfoStoreClient::~PluginInfoStoreClient): Deleted.
3224         (WebKit::PluginInfoStoreClient::PluginInfoStoreClient): Deleted.
3225         (WebKit::PluginInfoStore::setClient): Deleted.
3226         (WebKit::PluginInfoStore::client): Deleted.
3227         * UIProcess/WebContextClient.cpp:
3228         (WebKit::WebContextClient::plugInInformationBecameAvailable): Deleted.
3229         * UIProcess/WebContextClient.h:
3230         * UIProcess/WebProcessPool.cpp:
3231         (WebKit::m_hiddenPageThrottlingTimer): Deleted.
3232         (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins): Deleted.
3233         * UIProcess/WebProcessPool.h:
3234
3235 2016-08-09  George Ruan  <gruan@apple.com>
3236
3237         Implement functionality of media capture on iOS
3238         https://bugs.webkit.org/show_bug.cgi?id=158945
3239         <rdar://problem/26893343>
3240
3241         Reviewed by Tim Horton.
3242
3243         For a input type file element on iOS, the media capture attribute can
3244         now be used to specify which camera to pull up immediately, as opposed
3245         to having to select the camera from a file picker menu. If the
3246         specified capture type camera device is unavailable, the other
3247         built-in camera will be pulled up instead. If no camera is available,
3248         then the file picker menu will be presented to the user.
3249
3250         * Configurations/FeatureDefines.xcconfig: Enable Media Capture feature
3251         on iOS.
3252         * Shared/WebCoreArgumentCoders.cpp:
3253         (IPC::ArgumentCoder<FileChooserSettings>::encode): Encode enum
3254         MediaCaptureType.
3255         (IPC::ArgumentCoder<FileChooserSettings>::decode): Decode enum
3256         MediaCaptureType.
3257         * UIProcess/API/APIOpenPanelParameters.cpp:
3258         (API::OpenPanelParameters::mediaCaptureType):
3259         (API::OpenPanelParameters::capture): Deleted.
3260         * UIProcess/API/APIOpenPanelParameters.h: Capture attribute is now
3261         represented with MediaCaptureType instead of boolean.
3262         * UIProcess/API/C/WKOpenPanelParametersRef.cpp:
3263         (WKOpenPanelParametersGetMediaCaptureType): Change function name to
3264         better represent function.
3265         (WKOpenPanelParametersGetCaptureEnabled): Deleted.
3266         * UIProcess/API/C/WKOpenPanelParametersRef.h:
3267         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3268         (cameraDeviceForMediaCaptureType): Translate MediaCaptureType to media
3269         device.
3270         (-[WKFileUploadPanel presentWithParameters:resultListener:]):
3271         Immediately pull up media capture device if devices are available and
3272         capture attribute is present.
3273         (-[WKFileUploadPanel _showDocumentPickerMenu]): Only show option to
3274         use media capture device if it is available for the source type.
3275         (-[WKFileUploadPanel _adjustMediaCaptureType]): Determines correct
3276         fallback option for the media capture device.
3277         (-[WKFileUploadPanel _shouldMediaCaptureOpenMediaDevice]): Checks if
3278         the media capture device should be immediately pulled up.
3279         (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]): Specified the
3280         media capture device to use.
3281
3282 2016-08-09  Brady Eidson  <beidson@apple.com>
3283
3284         Implement "dumb" WK2 support for gamepads.
3285         https://bugs.webkit.org/show_bug.cgi?id=160700
3286
3287         Reviewed by Alex Christensen.
3288         
3289         With this patch, gamepads work in WK2.
3290
3291         Things known to be missing to make this mechanism more "smart":
3292           - Refresh values along with display sync instead of on a 60hz timer (bug 160673)
3293           - Only send updated values to the current focused web page (bug 160699)
3294
3295         * CMakeLists.txt:
3296         * WebKit2.xcodeproj/project.pbxproj:
3297         
3298         * Shared/Gamepad/GamepadData.cpp: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp.
3299         (WebKit::GamepadData::encode):
3300         (WebKit::GamepadData::decode):
3301         (WebKit::GamepadData::isNull):
3302         (WebKit::GamepadData::loggingString):
3303         * Shared/Gamepad/GamepadData.h: Copied from Source/WebKit2/WebProcess/Gamepad/WebGamepad.h.
3304         
3305         * UIProcess/Gamepad/UIGamepad.cpp: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp.
3306         (WebKit::UIGamepad::UIGamepad):
3307         (WebKit::UIGamepad::updateFromPlatformGamepad):
3308         (WebKit::UIGamepad::gamepadData):
3309         * UIProcess/Gamepad/UIGamepad.h: Copied from Source/WebKit2/WebProcess/Gamepad/WebGamepad.h.
3310         (WebKit::UIGamepad::index):
3311         
3312         * UIProcess/Gamepad/UIGamepadProvider.cpp:
3313         (WebKit::UIGamepadProvider::UIGamepadProvider):
3314         (WebKit::UIGamepadProvider::updateTimerFired):
3315         (WebKit::UIGamepadProvider::startOrStopSynchingGamepadState):
3316         (WebKit::UIGamepadProvider::platformGamepadConnected):
3317         (WebKit::UIGamepadProvider::platformGamepadDisconnected):
3318         (WebKit::UIGamepadProvider::platformGamepadInputActivity):
3319         (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
3320         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
3321         (WebKit::UIGamepadProvider::platformGamepads):
3322         * UIProcess/Gamepad/UIGamepadProvider.h:
3323         * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
3324         (WebKit::UIGamepadProvider::platformGamepads):
3325         
3326         * UIProcess/WebProcessPool.cpp:
3327         (WebKit::WebProcessPool::gamepadConnected):
3328         (WebKit::WebProcessPool::gamepadDisconnected):
3329         (WebKit::WebProcessPool::gamepadActivity):
3330         * UIProcess/WebProcessPool.h:
3331         
3332         * WebProcess/Gamepad/WebGamepad.cpp:
3333         (WebKit::WebGamepad::WebGamepad):
3334         (WebKit::WebGamepad::axisValues):
3335         (WebKit::WebGamepad::buttonValues):
3336         (WebKit::WebGamepad::updateValues):
3337         * WebProcess/Gamepad/WebGamepad.h:
3338         
3339         * WebProcess/Gamepad/WebGamepadProvider.cpp:
3340         (WebKit::WebGamepadProvider::gamepadConnected):
3341         (WebKit::WebGamepadProvider::gamepadDisconnected):
3342         (WebKit::WebGamepadProvider::gamepadActivity):
3343         (WebKit::WebGamepadProvider::platformGamepads):
3344         * WebProcess/Gamepad/WebGamepadProvider.h:
3345         
3346         * WebProcess/WebProcess.cpp:
3347         (WebKit::WebProcess::gamepadConnected):
3348         (WebKit::WebProcess::gamepadDisconnected):
3349         (WebKit::WebProcess::gamepadActivity):
3350         * WebProcess/WebProcess.h:
3351         * WebProcess/WebProcess.messages.in:
3352
3353 2016-08-09  Anders Carlsson  <andersca@apple.com>
3354
3355         Get rid of PluginStrategy
3356         https://bugs.webkit.org/show_bug.cgi?id=160696
3357
3358         Reviewed by Dan Bernstein.
3359
3360         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
3361         (WebKit::NetworkProcessPlatformStrategies::createPluginStrategy): Deleted.
3362         * NetworkProcess/NetworkProcessPlatformStrategies.h:
3363         * WebProcess/Plugins/WebPluginInfoProvider.h:
3364         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3365         (WebKit::WebPlatformStrategies::createPluginStrategy): Deleted.
3366         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3367
3368 2016-08-09  Dan Bernstein  <mitz@apple.com>
3369
3370         Add WKPage SPI for looking up a WKFrame given a WKFrameHandle
3371         https://bugs.webkit.org/show_bug.cgi?id=160695
3372
3373         Reviewed by Anders Carlsson.
3374
3375         * UIProcess/API/C/WKPage.cpp:
3376         (WKPageLookUpFrameFromHandle): Added. Gets the frame from the map in the page’s process and
3377           returns it if it belongs to the page.
3378         * UIProcess/API/C/WKPagePrivate.h:
3379
3380 2016-08-08  Anders Carlsson  <andersca@apple.com>
3381
3382         Move plug-in code from WebPlatformStrategies to WebPluginInfoProvider
3383         https://bugs.webkit.org/show_bug.cgi?id=160679
3384
3385         Reviewed by Alex Christensen.
3386
3387         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
3388         (WebKit::WebPluginInfoProvider::setPluginLoadClientPolicy):
3389         (WebKit::WebPluginInfoProvider::clearPluginClientPolicies):
3390         (WebKit::WebPluginInfoProvider::refreshPlugins):
3391         (WebKit::WebPluginInfoProvider::getPluginInfo):
3392         (WebKit::WebPluginInfoProvider::getWebVisiblePluginInfo):
3393         (WebKit::WebPluginInfoProvider::populatePluginCache):
3394         (WebKit::WebPluginInfoProvider::pluginLoadClientPolicyForHost):
3395         (WebKit::WebPluginInfoProvider::longestMatchedWildcardHostForHost):
3396         (WebKit::WebPluginInfoProvider::replaceHostWithMatchedWildcardHost):
3397         * WebProcess/Plugins/WebPluginInfoProvider.h:
3398         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3399         (WebKit::WebPlatformStrategies::createPluginStrategy):
3400         (WebKit::WebPlatformStrategies::WebPlatformStrategies): Deleted.
3401         (WebKit::WebPlatformStrategies::refreshPlugins): Deleted.
3402         (WebKit::WebPlatformStrategies::getPluginInfo): Deleted.
3403         (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo): Deleted.
3404         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy): Deleted.
3405         (WebKit::WebPlatformStrategies::clearPluginClientPolicies): Deleted.
3406         (WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost): Deleted.
3407         (WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost): Deleted.
3408         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost): Deleted.
3409         (WebKit::WebPlatformStrategies::populatePluginCache): Deleted.
3410         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3411         * WebProcess/WebProcess.cpp:
3412         (WebKit::WebProcess::initializeWebProcess):
3413         (WebKit::WebProcess::setPluginLoadClientPolicy):
3414         (WebKit::WebProcess::clearPluginClientPolicies):
3415
3416 2016-08-08  Anders Carlsson  <andersca@apple.com>
3417
3418         Add a new PluginInfoProvider class, to replace PluginStrategy
3419         https://bugs.webkit.org/show_bug.cgi?id=160670
3420
3421         Reviewed by Sam Weinig.
3422
3423         Add a new WebPluginInfoProvider - it just calls through to the plug-in strategy for now.
3424
3425         * WebKit2.xcodeproj/project.pbxproj:
3426         * WebProcess/Plugins/WebPluginInfoProvider.cpp: Added.
3427         (WebKit::WebPluginInfoProvider::singleton):
3428         (WebKit::WebPluginInfoProvider::WebPluginInfoProvider):
3429         (WebKit::WebPluginInfoProvider::~WebPluginInfoProvider):
3430         (WebKit::WebPluginInfoProvider::refreshPlugins):
3431         (WebKit::WebPluginInfoProvider::getPluginInfo):
3432         (WebKit::WebPluginInfoProvider::getWebVisiblePluginInfo):
3433         (WebKit::WebPluginInfoProvider::setPluginLoadClientPolicy):
3434         (WebKit::WebPluginInfoProvider::clearPluginClientPolicies):
3435         * WebProcess/Plugins/WebPluginInfoProvider.h: Added.
3436         * WebProcess/WebPage/WebPage.cpp:
3437         (WebKit::m_userInterfaceLayoutDirection):
3438
3439 2016-08-08  Brady Eidson  <beidson@apple.com>
3440
3441         Addressing late review feedback in bug 160605
3442         https://bugs.webkit.org/show_bug.cgi?id=160605
3443
3444         Reviewed by Darin's suggestions.
3445
3446         * UIProcess/Gamepad/UIGamepadProvider.cpp:
3447         (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
3448         (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
3449         * UIProcess/Gamepad/UIGamepadProvider.h:
3450         
3451         * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
3452         (WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
3453         (WebKit::UIGamepadProvider::platformStopMonitoringGamepads):
3454         
3455         * UIProcess/WebProcessPool.cpp:
3456         (WebKit::WebProcessPool::disconnectProcess):
3457         (WebKit::WebProcessPool::startedUsingGamepads):
3458         (WebKit::WebProcessPool::stoppedUsingGamepads):
3459         (WebKit::WebProcessPool::processStoppedUsingGamepads):
3460         * UIProcess/We