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