Add a RuntimeEnabledFeature for display: contents, defaulted to false.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2017-05-23  Emilio Cobos Álvarez  <ecobos@igalia.com>
2
3         Add a RuntimeEnabledFeature for display: contents, defaulted to false.
4         https://bugs.webkit.org/show_bug.cgi?id=171984
5
6         Reviewed by Antti Koivisto.
7
8         * Shared/WebPreferencesDefinitions.h:
9         * UIProcess/API/C/WKPreferences.cpp:
10         (WKPreferencesSetDisplayContentsEnabled):
11         (WKPreferencesGetDisplayContentsEnabled):
12         * UIProcess/API/C/WKPreferencesRefPrivate.h:
13         * WebProcess/WebPage/WebPage.cpp:
14         (WebKit::WebPage::updatePreferences):
15
16 2017-05-20  Alex Christensen  <achristensen@webkit.org>
17
18         REGRESSION(r215686): O(n^2) algorithm in CachedRawResource::addDataBuffer
19         https://bugs.webkit.org/show_bug.cgi?id=172406
20         <rdar://32109532>
21
22         Reviewed by Brady Eidson.
23
24         * Platform/IPC/DataReference.cpp:
25         (IPC::SharedBufferDataReference::encode):
26         * WebProcess/Plugins/PluginView.cpp:
27         (WebKit::PluginView::redeliverManualStream):
28
29 2017-05-22  Yongjun Zhang  <yongjun_zhang@apple.com>
30
31         Need a way to allow WKWebView to load request with ShouldOpenExternalURLsPolicy::ShouldAllow.
32         https://bugs.webkit.org/show_bug.cgi?id=172460
33
34         Add an new method [WKWebView _loadRequest:shouldOpenExternalURLs:] to WKWebView; a WebKit client
35         can use this to load request that allows opening external URLs.
36
37         Reviewed by Tim Horton.
38
39         * UIProcess/API/Cocoa/WKWebView.mm:
40         (-[WKWebView _loadRequest:shouldOpenExternalURLs:]): When calling WebPageProxy::loadRequest, also
41             set ShouldOpenExternalURLsPolicy based on the value of shouldOpenExternalURLs.
42         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add [WKWebView _loadRequest:shouldOpenExternalURLs:].
43
44 2017-05-22  Youenn Fablet  <youenn@apple.com>
45
46         Remove AVAudioCaptureSource
47         https://bugs.webkit.org/show_bug.cgi?id=172360
48
49         Reviewed by Sam Weinig.
50
51         Removing the handling of AVAudio/CoreAudio capture source dynamic switch.
52
53         * Shared/WebPreferencesDefinitions.h:
54         * UIProcess/API/C/WKPreferences.cpp:
55         (WKPreferencesSetUseAVFoundationAudioCapture): Deleted.
56         (WKPreferencesGetUseAVFoundationAudioCapture): Deleted.
57         * UIProcess/API/C/WKPreferencesRefPrivate.h:
58         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
59         (WebKit::UserMediaPermissionRequestManagerProxy::syncWithWebCorePrefs):
60         * WebProcess/WebPage/WebPage.cpp:
61         (WebKit::WebPage::updatePreferences):
62
63 2017-05-22  Brian Burg  <bburg@apple.com>
64
65         Web Automation: characters produced with shift modifier on QWERTY keyboard should be delivered as shift-down, char-down, char-up, shift-up events
66         https://bugs.webkit.org/show_bug.cgi?id=172299
67         <rdar://problem/32277988>
68
69         Reviewed by Joseph Pecoraro.
70
71         WebDriver tests expect some ASCII characters to be produced using the shift key,
72         regardless of the actual keyboard layout. Emit extra events when simulating these
73         keystrokes if the shift key is not already pressed.
74
75         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
76         (WebKit::characterIsProducedUsingShift):
77         (WebKit::WebAutomationSession::platformSimulateKeySequence):
78
79 2017-05-22  Sam Weinig  <sam@webkit.org>
80
81         [WebIDL] Support callbacks with arbitrary return types
82         https://bugs.webkit.org/show_bug.cgi?id=172407
83
84         Reviewed by Chris Dumez.
85
86         * WebProcess/InjectedBundle/API/gtk/DOM/GObjectNodeFilterCondition.cpp:
87         * WebProcess/InjectedBundle/API/gtk/DOM/GObjectNodeFilterCondition.h:
88         Update to match new interface of NodeFilterCondition.
89
90         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
91         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
92         Update to account for new WebCore implementation return types.
93
94 2017-05-22  Michael Catanzaro  <mcatanzaro@igalia.com>
95
96         -Wreturn-type warning triggered by WKPage.cpp:2277
97         https://bugs.webkit.org/show_bug.cgi?id=171866
98
99         Reviewed by Žan Doberšek.
100
101         * UIProcess/API/C/WKPage.cpp:
102         (WKPageSetPageUIClient):
103
104 2017-05-22  Michael Catanzaro  <mcatanzaro@igalia.com>
105
106         -Wreturn-type warning triggered by WebAutomationSession.cpp:851
107         https://bugs.webkit.org/show_bug.cgi?id=171867
108
109         Reviewed by Žan Doberšek.
110
111         * UIProcess/Automation/WebAutomationSession.cpp:
112         (WebKit::protocolModifierToWebEventModifier):
113
114 2017-05-22  Wenson Hsieh  <wenson_hsieh@apple.com>
115
116         Remove unused documentIsHandlingNonDefaultDrag plumbing for WebKit2
117         https://bugs.webkit.org/show_bug.cgi?id=172453
118
119         Reviewed by Tim Horton.
120
121         Removes unused plumbing that was originally added to support file uploads.
122
123         * UIProcess/WebPageProxy.cpp:
124         (WebKit::WebPageProxy::didPerformDragControllerAction):
125         (WebKit::WebPageProxy::resetCurrentDragInformation):
126         * UIProcess/WebPageProxy.h:
127         (WebKit::WebPageProxy::currentDragCaretRect):
128         (WebKit::WebPageProxy::documentIsHandlingNonDefaultDrag): Deleted.
129         * UIProcess/WebPageProxy.messages.in:
130         * WebProcess/WebPage/WebPage.cpp:
131         (WebKit::WebPage::performDragControllerAction):
132
133 2017-05-22  Michael Catanzaro  <mcatanzaro@igalia.com>
134
135         Add even more input validation in Connection::processMessage()
136         https://bugs.webkit.org/show_bug.cgi?id=171682
137
138         Reviewed by Carlos Garcia Campos.
139
140         Verify that the size of the out-of-line message body matches the size of the AttachmentInfo
141         that is containing it.
142
143         * Platform/IPC/unix/ConnectionUnix.cpp:
144         (IPC::Connection::processMessage):
145
146 2017-05-22  Tomas Popela  <tpopela@redhat.com>
147
148         Remove some of the EFL port leftovers
149         https://bugs.webkit.org/show_bug.cgi?id=172440
150
151         Reviewed by Carlos Garcia Campos.
152
153         * Scripts/generate-forwarding-headers.pl:
154
155 2017-05-22  Gwang Yoon Hwang  <yoon@igalia.com>
156
157         [CoordinatedGraphics] Clear UpdateAtlases for each tests
158         https://bugs.webkit.org/show_bug.cgi?id=172119
159
160         Reviewed by Carlos Garcia Campos.
161
162         In Coordinated Graphics, we reuses at least one update atlas to
163         render root compositing layer for several tests. So if one of the
164         test cases breaks the internal states of Cairo's states, other
165         followed test cases runs on same instance of WebKitTestRunner will
166         be effected by broken states of Cairo. Because it increases test
167         flaknesses, we should drop update atlases after each tests.
168
169         * WebProcess/WebCoreSupport/WebChromeClient.cpp: Remove a redundant
170         include statement for Coordinated graphics
171         (WebKit::WebChromeClient::resetUpdateAtlasForTesting): Added.
172         * WebProcess/WebCoreSupport/WebChromeClient.h:
173         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
174         (WebKit::AcceleratedDrawingArea::resetUpdateAtlasForTesting): Added.
175         * WebProcess/WebPage/AcceleratedDrawingArea.h:
176         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
177         (WebKit::CompositingCoordinator::clearUpdateAtlases): Added.
178         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
179         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
180         (WebKit::CoordinatedLayerTreeHost::clearUpdateAtlases): Added.
181         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
182         * WebProcess/WebPage/DrawingArea.h:
183         * WebProcess/WebPage/LayerTreeHost.h:
184         * WebProcess/WebPage/wpe/DrawingAreaWPE.cpp:
185         (WebKit::DrawingAreaWPE::resetUpdateAtlasForTesting):
186         * WebProcess/WebPage/wpe/DrawingAreaWPE.h:
187
188 2017-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
189
190         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.17.3 release.
191
192         * gtk/NEWS: Add release notes for 2.17.3.
193
194 2017-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
195
196         [GTK] Add webkit_context_menu_item_new_from_gaction
197         https://bugs.webkit.org/show_bug.cgi?id=159631
198
199         Reviewed by Michael Catanzaro.
200
201         Add new API to create a WebKitContextMenuItem from a GAction and also to get the associated GAction.
202
203         * Shared/gtk/WebContextMenuItemGtk.cpp:
204         (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk): Add constructor that receives a GAction.
205         (WebKit::isGActionChecked): Helper to check if a stateful GAction is checked or not.
206         (WebKit::WebContextMenuItemGtk::createActionIfNeeded): When creating a GAction from a GtkAtion, use the
207         GtkAction name instead of adding a new one. Do not create the GAction if we already have one.
208         * Shared/gtk/WebContextMenuItemGtk.h:
209         (WebKit::WebContextMenuItemGtk::gAction):
210         (WebKit::WebContextMenuItemGtk::gActionTarget):
211         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
212         (webkit_context_menu_item_new_from_gaction):
213         (webkit_context_menu_item_get_gaction):
214         * UIProcess/API/gtk/WebKitContextMenuItem.h:
215         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
216         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
217         (WebKit::contextMenuItemActivatedCallback): Update the state of the internal GAction in case of toggle menu items.
218         (WebKit::WebContextMenuProxyGtk::append): Pass the GAction target to g_menu_item_set_action_and_target_value. Do
219         not connect to activate signal of actions provided by the user.
220
221 2017-05-21  Carlos Garcia Campos  <cgarcia@igalia.com>
222
223         Add more input validation in Connection::readBytesFromSocket()
224         https://bugs.webkit.org/show_bug.cgi?id=171871
225
226         Reviewed by Michael Catanzaro.
227
228         Check the control message length is in the limits. Credit to Nathan Crandall for reporting this issue and
229         submitting an equivalent fix.
230
231         * Platform/IPC/unix/ConnectionUnix.cpp:
232         (IPC::readBytesFromSocket):
233
234 2017-05-20  Michael Catanzaro  <mcatanzaro@igalia.com>
235
236         -Wreturn-type warning triggered by WKNotification.cpp:77
237         https://bugs.webkit.org/show_bug.cgi?id=172414
238
239         Reviewed by Sam Weinig.
240
241         * UIProcess/API/C/WKNotification.cpp:
242         (WKNotificationCopyDir):
243
244 2017-05-19  John Wilander  <wilander@apple.com>
245
246         Resource Load Statistics: Use WebProcessPool::allProcessPools() when sending message to network process about partitioning
247         https://bugs.webkit.org/show_bug.cgi?id=172370
248         <rdar://problem/32288012>
249
250         Reviewed by Alex Christensen.
251
252         The existing test case
253         http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html
254         is currently failing and should start passing again with this patch.
255
256         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
257         (WebKit::WebsiteDataStore::shouldPartitionCookiesForTopPrivatelyOwnedDomains):
258
259 2017-05-19  Chris Dumez  <cdumez@apple.com>
260
261         [WK2] Notify client when a process exceeds background CPU limit while in the foreground
262         https://bugs.webkit.org/show_bug.cgi?id=172246
263         <rdar://problem/32235411>
264
265         Reviewed by Geoffrey Garen.
266
267         When there is a background CPU limit set by the client, we now monitor the CPU
268         usages of all WebContent processes, not just the non-visible ones. This way, we
269         are now able to notify the client a process has exceeded the background CPU
270         limit while in the foreground, via the UIClient's didExceedBackgroundResourceLimitWhileInForeground
271         function, passing kWKResourceLimitCPU.
272
273         * Shared/WebPageCreationParameters.cpp:
274         (WebKit::WebPageCreationParameters::encode):
275         (WebKit::WebPageCreationParameters::decode):
276         * Shared/WebPageCreationParameters.h:
277         * UIProcess/API/APIPageConfiguration.cpp:
278         (API::PageConfiguration::copy):
279         * UIProcess/API/APIPageConfiguration.h:
280         (API::PageConfiguration::cpuLimit):
281         (API::PageConfiguration::setCPULimit):
282         * UIProcess/API/C/WKPageConfigurationRef.cpp:
283         (WKPageConfigurationSetBackgroundCPULimit):
284         * UIProcess/WebPageProxy.cpp:
285         (WebKit::WebPageProxy::updateThrottleState):
286         (WebKit::WebPageProxy::creationParameters):
287         (WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive):
288         (WebKit::WebPageProxy::didExceedBackgroundCPULimitWhileInForeground):
289         * UIProcess/WebPageProxy.h:
290         * UIProcess/WebProcessProxy.cpp:
291         (WebKit::WebProcessProxy::didExceedCPULimit):
292         * UIProcess/WebProcessProxy.h:
293         * UIProcess/WebProcessProxy.messages.in:
294         * WebProcess/WebPage/WebPage.cpp:
295         (WebKit::m_cpuLimit):
296         * WebProcess/WebPage/WebPage.h:
297         (WebKit::WebPage::cpuLimit):
298         * WebProcess/WebProcess.cpp:
299         (WebKit::WebProcess::createWebPage):
300         (WebKit::WebProcess::removeWebPage):
301         (WebKit::WebProcess::updateCPULimit):
302         (WebKit::WebProcess::updateCPUMonitorState):
303         (WebKit::WebProcess::pageActivityStateDidChange):
304         * WebProcess/WebProcess.h:
305         * WebProcess/cocoa/WebProcessCocoa.mm:
306         (WebKit::WebProcess::updateCPULimit):
307         (WebKit::WebProcess::updateCPUMonitorState):
308
309 2017-05-19  Jeremy Jones  <jeremyj@apple.com>
310
311         Remove defunct WebVideoFullscreenInterface
312         https://bugs.webkit.org/show_bug.cgi?id=172254
313
314         Reviewed by Jon Lee.
315
316         Remove reference to WebVideoFullscreenInterface. It has long since been replaced by
317         WebVideoFullscreenModelClient.
318
319         * WebProcess/cocoa/WebVideoFullscreenManager.h:
320
321 2017-05-19  Jeremy Jones  <jeremyj@apple.com>
322
323         [WebRTC] Remove PiP support for video elements that are showing camera capture
324         https://bugs.webkit.org/show_bug.cgi?id=172336
325
326         Reviewed by Eric Carlson.
327
328         Ask video element if it supports picture-in-picture instead of asking the mediaSession directly.
329         This allows the video element to give a more robust answer.
330
331         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
332         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
333
334 2017-05-19  Chris Dumez  <cdumez@apple.com>
335
336         Make sure implementation of InitializeWebKit2() always run on the main thread
337         https://bugs.webkit.org/show_bug.cgi?id=172362
338         <rdar://problem/32295678>
339
340         Reviewed by Geoffrey Garen.
341
342         Add logic in InitializeWebKit2() for Cocoa ports to always run the initialization code
343         is only called once, and on the main thread. If we are called from a non-main thread,
344         we will dispatch synchronously to the main thread to run the initialization code.
345
346         This is needed because WebKit2Initialize() is called from the API::Object constructor.
347         API::Object is thread-safe RefCounted and those objects are sometimes initialized on
348         non-main thread. If the first of such objects happened to be initialized on a non-main
349         thread, then we would run the initialization code for the first time on a non-main
350         thread. This would lead to hard to debug issues because code such as
351         RunLoop::initializeMainRunLoop() is only safe to call on the main thread because it
352         stores a pointer to the current thread's RunLoop in a static variable for later use
353         (i.e. for RunLoop::main()).
354
355         * Shared/Cocoa/WebKit2InitializeCocoa.mm: Copied from Source/WebKit2/Shared/WebKit2Initialize.cpp.
356         (WebKit::runInitializationCode):
357         (WebKit::InitializeWebKit2):
358         * Shared/WebKit2Initialize.cpp:
359         (WebKit::InitializeWebKit2):
360         * WebKit2.xcodeproj/project.pbxproj:
361
362 2017-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
363
364         REGRESSION(r216977): [GTK] Ephemeral sessions broken after r216977
365         https://bugs.webkit.org/show_bug.cgi?id=172345
366
367         Reviewed by Michael Catanzaro.
368
369         Since r216977, WebProcessPool sends the page session ID to the web process, but the WebsiteDataStoreParameters
370         session ID to the network process. WebsiteDataStoreParameters is only implemented for Cocoa, so we are sending 0
371         session ID to the network process, while using the right session ID everywhere else.
372
373         * UIProcess/WebProcessPool.cpp:
374         (WebKit::WebProcessPool::pageAddedToProcess): Add an ASSERT to ensure we are sending the same session ID to Web
375         and Network processes.
376         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
377         (WebKit::WebsiteDataStore::parameters): Add minimal implementation for non-Cocoa ports to at least set the
378         session ID.
379
380 2017-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
381
382         Add more input validation in Connection::processMessage()
383         https://bugs.webkit.org/show_bug.cgi?id=171682
384
385         Reviewed by Michael Catanzaro.
386
387         Check limits of attachments and message size. Credit to Nathan Crandall for reporting this issue and submitting
388         an equivalent fix.
389
390         * Platform/IPC/unix/ConnectionUnix.cpp:
391         (IPC::Connection::processMessage):
392
393 2017-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
394
395         [Threaded Compositor] Remove platform ifdefs from threaded compositor implementation
396         https://bugs.webkit.org/show_bug.cgi?id=172265
397
398         Reviewed by Žan Doberšek.
399
400         Add AcceleratedSurfaceWPE implementation that is equivalent to the PlatformDisplayWPE::EGLTarget. Since WPE needs the
401         surface to be initialized/finalized in the compositing thread, two new virtual methods has been added to
402         AcceleratedSurface initialize/finalize that are only implemented by WPE. The threaded compositor no longer
403         receives a native surface handle as contructor parameter, it now asks the client for it from the compositing
404         thread, right after it's created.
405
406         * PlatformWPE.cmake:
407         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
408         (WebKit::ThreadedCompositor::create): Remove ativeSurfaceHandle parameter.
409         (WebKit::ThreadedCompositor::ThreadedCompositor): Initialize m_nativeSurfaceHandle from the compositing thread
410         asking the client for it.
411         (WebKit::ThreadedCompositor::createGLContext): Remove the WPE implementation.
412         (WebKit::ThreadedCompositor::invalidate): Notify the client that the GL context has been destroyed.
413         (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing): Remove GTK ifdefs.
414         (WebKit::ThreadedCompositor::setViewportSize): Remove WPE implementation.
415         (WebKit::ThreadedCompositor::renderLayerTree): Notify the client the frame will be rendered, and when it has
416         been rendered.
417         (WebKit::ThreadedCompositor::frameComplete): Remove WPE ifdefs.
418         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
419         * WebProcess/WebPage/AcceleratedSurface.cpp:
420         (WebKit::AcceleratedSurface::create): Add client parameter.
421         (WebKit::AcceleratedSurface::AcceleratedSurface): Create a AcceleratedSurfaceWPE if display is WPE.
422         * WebProcess/WebPage/AcceleratedSurface.h:
423         (WebKit::AcceleratedSurface::surfaceID):
424         (WebKit::AcceleratedSurface::initialize):
425         (WebKit::AcceleratedSurface::finalize):
426         (WebKit::AcceleratedSurface::willRenderFrame):
427         (WebKit::AcceleratedSurface::didRenderFrame):
428         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
429         (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): Pass this as client of AcceleratedSurface.
430         (WebKit::ThreadedCoordinatedLayerTreeHost::frameComplete): Notify the compositor.
431         (WebKit::ThreadedCoordinatedLayerTreeHost::nativeSurfaceHandleForCompositing): Initialize the surface and return
432         the window handler.
433         (WebKit::ThreadedCoordinatedLayerTreeHost::didDestroyGLContext): Finalize the surface.
434         (WebKit::ThreadedCoordinatedLayerTreeHost::willRenderFrame): Notify the surface.
435         (WebKit::ThreadedCoordinatedLayerTreeHost::didRenderFrame): Ditto.
436         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
437         * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp:
438         (WebKit::AcceleratedSurfaceWayland::create): Add client parameter.
439         (WebKit::AcceleratedSurfaceWayland::AcceleratedSurfaceWayland): Ditto.
440         (WebKit::AcceleratedSurfaceWayland::didRenderFrame): Call Client::frameComplete().
441         * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h:
442         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
443         (WebKit::AcceleratedSurfaceX11::create): Add client parameter.
444         (WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11): Ditto.
445         (WebKit::AcceleratedSurfaceX11::didRenderFrame): Call Client::frameComplete().
446         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:
447         * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp: Added.
448         (WebKit::AcceleratedSurfaceWPE::create):
449         (WebKit::AcceleratedSurfaceWPE::AcceleratedSurfaceWPE):
450         (WebKit::AcceleratedSurfaceWPE::~AcceleratedSurfaceWPE):
451         (WebKit::AcceleratedSurfaceWPE::initialize):
452         (WebKit::AcceleratedSurfaceWPE::finalize):
453         (WebKit::AcceleratedSurfaceWPE::window):
454         (WebKit::AcceleratedSurfaceWPE::surfaceID):
455         (WebKit::AcceleratedSurfaceWPE::resize):
456         (WebKit::AcceleratedSurfaceWPE::willRenderFrame):
457         (WebKit::AcceleratedSurfaceWPE::didRenderFrame):
458         * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.h: Copied from Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h.
459
460 2017-05-19  Yusuke Suzuki  <utatane.tea@gmail.com>
461
462         [JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass
463         https://bugs.webkit.org/show_bug.cgi?id=172098
464
465         Reviewed by Saam Barati.
466
467         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
468         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
469
470 2017-05-18  Andreas Kling  <akling@apple.com>
471
472         [WK2] Notify WebPageProxy client when an active process goes over the inactive memory limit
473         https://bugs.webkit.org/show_bug.cgi?id=172244
474         <rdar://problem/31800943>
475
476         Reviewed by Geoffrey Garen.
477
478         Add a WKPageUIClient callback that is invoked when an active process exceeds the inactive memory limit.
479
480         With the current state of the implementation, this means that a UI client can learn that backgrounding
481         a non-audible, non-capturing tab may cause it to get killed once the active/inactive hysteresis time
482         is over (8 minutes.)
483
484         The callback can be invoked multiple times if we exceed the limit, and then go under, and exceed again.
485
486         This is the callback:
487
488             didExceedBackgroundResourceLimitWhileInForeground(WKPageRef, WKResourceLimit)
489
490         Where WKResourceLimit is one of { kWKResourceLimitMemory, kWKResourceLimitCPU }
491         The CPU enum value is a placeholder pending implementation soon.
492
493         * UIProcess/API/APIUIClient.h:
494         (API::UIClient::didExceedBackgroundResourceLimitWhileInForeground):
495         * UIProcess/API/C/WKPage.cpp:
496         (WKPageSetPageUIClient):
497         * UIProcess/API/C/WKPageUIClient.h:
498         * UIProcess/WebPageProxy.cpp:
499         (WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive):
500         * UIProcess/WebPageProxy.h:
501         * UIProcess/WebProcessProxy.cpp:
502         (WebKit::WebProcessProxy::didExceedInactiveMemoryLimitWhileActive):
503         * UIProcess/WebProcessProxy.h:
504         * UIProcess/WebProcessProxy.messages.in:
505         * WebProcess/WebProcess.cpp:
506         (WebKit::WebProcess::initializeWebProcess):
507
508 2017-05-18  Eric Carlson  <eric.carlson@apple.com>
509
510         [MediaStream] do not cache gUM permissions
511         https://bugs.webkit.org/show_bug.cgi?id=172245
512
513         Reviewed by Youenn Fablet.
514
515         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
516         (WebKit::UserMediaPermissionRequestManagerProxy::invalidatePendingRequests):
517         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
518         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
519         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
520         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
521         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
522         (WebKit::FrameAuthorizationState::FrameAuthorizationState): Deleted.
523         (WebKit::FrameAuthorizationState::hasPermissionToUseCaptureDevice): Deleted.
524         (WebKit::FrameAuthorizationState::setHasPermissionToUseCaptureDevice): Deleted.
525         (WebKit::FrameAuthorizationState::ensureSecurityOriginsAreEqual): Deleted.
526         (WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest): Deleted.
527         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
528         (WebKit::FrameAuthorizationState::setDeviceIdentifierHashSalt): Deleted.
529         (WebKit::FrameAuthorizationState::deviceIdentifierHashSalt): Deleted.
530         * UIProcess/UserMediaPermissionRequestProxy.cpp:
531         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
532         * UIProcess/UserMediaPermissionRequestProxy.h:
533         (WebKit::UserMediaPermissionRequestProxy::create):
534         (WebKit::UserMediaPermissionRequestProxy::deviceIdentifierHashSalt):
535
536 2017-05-18  Tim Horton  <timothy_horton@apple.com>
537
538         Data interaction conclusion snapshot has too much margin
539         https://bugs.webkit.org/show_bug.cgi?id=172323
540         <rdar://problem/32283772>
541
542         Reviewed by Beth Dakin.
543
544         * WebProcess/WebPage/ios/WebPageIOS.mm:
545         (WebKit::WebPage::didConcludeEditDataInteraction):
546         Disable the default TextIndicator margin.
547
548 2017-05-18  Andy Estes  <aestes@apple.com>
549
550         ENABLE(APPLE_PAY_DELEGATE) should be NO on macOS Sierra and earlier
551         https://bugs.webkit.org/show_bug.cgi?id=172305
552
553         Reviewed by Anders Carlsson.
554
555         * Configurations/FeatureDefines.xcconfig:
556
557 2017-05-18  John Wilander  <wilander@apple.com>
558
559         Resource Load Statistics: Grandfather domains for existing data records
560         https://bugs.webkit.org/show_bug.cgi?id=172155
561         <rdar://problem/24913532>
562
563         Reviewed by Alex Christensen.
564
565         When WebResourceLoadStatisticsStore starts fresh it needs
566         to scan existing website data records and 'grandfather' them to
567         allow ample time to capture user interaction.
568
569         * Shared/WebPreferencesDefinitions.h:
570         * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
571         (WKResourceLoadStatisticsManagerSetGrandfathered):
572         (WKResourceLoadStatisticsManagerIsGrandfathered):
573         (WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
574         (WKResourceLoadStatisticsManagerSetGrandfatheringTime):
575             Functions for testing and configuration.
576         * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
577         * UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm:
578         (WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):
579             Added grandfathering configuration.
580         * UIProcess/WebProcessProxy.cpp:
581         (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData):
582             New function to get all top privately controlled domains that
583             have website data.
584         * UIProcess/WebProcessProxy.h:
585         * UIProcess/WebResourceLoadStatisticsManager.cpp:
586         (WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
587         (WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
588         (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
589         (WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
590         (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
591             Functions for testing and configuration.
592             WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval() changed
593             as a result of WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval()
594             moving to WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
595         * UIProcess/WebResourceLoadStatisticsManager.h:
596         * UIProcess/WebResourceLoadStatisticsStore.cpp:
597         (WebKit::initializeDataTypesToRemove):
598         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
599             Moved handling of pending removal into WebCore::ResourceLoadStatisticsStore since
600             that's where grandfathering happens.
601         (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
602             Moved registration of write persistent store callback and reading of Cocoa defaults to
603             WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver without parameters
604             so they are called for platforms without CFNETWORK_STORAGE_PARTITIONING.
605             Now includes registering WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
606             as handler for grandfathering since it involves reading of the website data store.
607         (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
608         (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
609         (WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval): Deleted.
610             Now happens in WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
611         * UIProcess/WebResourceLoadStatisticsStore.h:
612         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
613         (WebKit::WebsiteDataRecord::topPrivatelyControlledDomain):
614             New function to ask a WebsiteDataRecord for its top privately controlled domain.
615         * UIProcess/WebsiteData/WebsiteDataRecord.h:
616         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
617         (WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):
618             New function to get all top privately controlled domains that
619             have website data.
620         * UIProcess/WebsiteData/WebsiteDataStore.h:
621
622 2017-05-18  Andy Estes  <aestes@apple.com>
623
624         Add "countryCode" to ApplePayErrorContactField
625         https://bugs.webkit.org/show_bug.cgi?id=172264
626         <rdar://problem/32004909>
627
628         Reviewed by Anders Carlsson.
629
630         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
631         (WebKit::toNSError):
632
633 2017-05-18  Commit Queue  <commit-queue@webkit.org>
634
635         Unreviewed, rolling out r217031, r217032, and r217037.
636         https://bugs.webkit.org/show_bug.cgi?id=172293
637
638         cause linking errors in Windows (Requested by yusukesuzuki on
639         #webkit).
640
641         Reverted changesets:
642
643         "[JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass"
644         https://bugs.webkit.org/show_bug.cgi?id=172098
645         http://trac.webkit.org/changeset/217031
646
647         "Unreviewed, rebaseline for newly added ClassInfo"
648         https://bugs.webkit.org/show_bug.cgi?id=172098
649         http://trac.webkit.org/changeset/217032
650
651         "Unreviewed, fix debug and non-JIT build"
652         https://bugs.webkit.org/show_bug.cgi?id=172098
653         http://trac.webkit.org/changeset/217037
654
655 2017-05-18  Claudio Saavedra  <csaavedra@igalia.com>
656
657         [WPE] Unreviewed build fix
658
659         Add missing header after r217041.
660         * UIProcess/API/wpe/WPEView.cpp:
661
662 2017-05-18  Tim Horton  <timothy_horton@apple.com>
663
664         More WebKit2 header cleanup
665         https://bugs.webkit.org/show_bug.cgi?id=172214
666
667         Reviewed by Simon Fraser.
668
669         * Shared/WebFindOptions.h:
670         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
671         * UIProcess/Cocoa/WebViewImpl.mm:
672         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
673         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
674         * UIProcess/UserMediaPermissionRequestProxy.h:
675         * UIProcess/WebPageProxy.cpp:
676         (WebKit::WebPageProxy::setCompositionAsync):
677         * UIProcess/WebPageProxy.h:
678         * UIProcess/mac/PageClientImpl.mm:
679         * UIProcess/mac/ViewGestureControllerMac.mm:
680         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
681         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
682         * WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
683         * WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
684         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
685         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
686         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
687         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
688         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
689         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
690         * WebProcess/Notifications/WebNotificationManager.cpp:
691         * WebProcess/Plugins/PDF/PDFPlugin.mm:
692         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
693         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
694         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
695         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
696         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
697         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
698         * WebProcess/WebCoreSupport/WebValidationMessageClient.cpp:
699         * WebProcess/WebPage/WebPage.cpp:
700         (WebKit::WebPage::WebPage):
701         (WebKit::WebPage::setDeviceScaleFactor):
702         (WebKit::WebPage::centerSelectionInVisibleArea):
703         (WebKit::WebPage::findString):
704         (WebKit::WebPage::findStringMatches):
705         (WebKit::WebPage::getImageForFindMatch):
706         (WebKit::WebPage::selectFindMatch):
707         (WebKit::WebPage::hideFindUI):
708         (WebKit::WebPage::countStringMatches):
709         (WebKit::WebPage::didReceiveGeolocationPermissionDecision):
710         (WebKit::WebPage::mainFrameDidLayout):
711         (WebKit::WebPage::setCompositionAsync):
712         * WebProcess/WebPage/WebPage.h:
713         (WebKit::WebPage::findController):
714         (WebKit::WebPage::geolocationPermissionRequestManager):
715         * WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
716         Many small changes added up to a few percent. Removing UserMediaRequest
717         from UserMediaPermissionRequestProxy, which is included into WebPageProxy.h,
718         was worth another ~10% because it got VM.h out of WebPageProxy.h (like the
719         previous patch did with WebPage.h). In total, in my measurement (WebKit2
720         clean debug build) this is a ~15% speedup.
721
722         We really should figure out how to make DOMPromise.h not bring in all of
723         JavaScriptCore (or how to use promises without including DOMPromise.h in headers).
724
725 2017-05-17  Chris Dumez  <cdumez@apple.com>
726
727         Fix unsafe lambda capture in ContentRuleListStore::lookupContentRuleList()
728         https://bugs.webkit.org/show_bug.cgi?id=172258
729
730         Reviewed by Brady Eidson.
731
732         Fix unsafe lambda capture in ContentRuleListStore::lookupContentRuleList(). The String
733         was moved instead of calling isolatedCopy(), even though we're passing the String to
734         another thread.
735
736         * UIProcess/API/APIContentRuleListStore.cpp:
737         (API::ContentRuleListStore::lookupContentRuleList):
738
739 2017-05-16  Yusuke Suzuki  <utatane.tea@gmail.com>
740
741         [JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass
742         https://bugs.webkit.org/show_bug.cgi?id=172098
743
744         Reviewed by Saam Barati.
745
746         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
747         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
748
749 2017-05-17  Ryan Haddad  <ryanhaddad@apple.com>
750
751         Unreviewed, rolling out r217014.
752
753         This change caused mac-wk2 LayoutTests to exit early due to
754         crashes.
755
756         Reverted changeset:
757
758         "Resource Load Statistics: Grandfather domains for existing
759         data records"
760         https://bugs.webkit.org/show_bug.cgi?id=172155
761         http://trac.webkit.org/changeset/217014
762
763 2017-05-17  John Wilander  <wilander@apple.com>
764
765         Resource Load Statistics: Grandfather domains for existing data records
766         https://bugs.webkit.org/show_bug.cgi?id=172155
767         <rdar://problem/24913532>
768
769         Reviewed by Alex Christensen.
770
771         When WebResourceLoadStatisticsStore starts fresh it needs
772         to scan existing website data records and 'grandfather' them to
773         allow ample time to capture user interaction.
774
775         * Shared/WebPreferencesDefinitions.h:
776         * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
777         (WKResourceLoadStatisticsManagerSetGrandfathered):
778         (WKResourceLoadStatisticsManagerIsGrandfathered):
779         (WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
780         (WKResourceLoadStatisticsManagerSetGrandfatheringTime):
781             Functions for testing and configuration.
782         * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
783         * UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm:
784         (WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):
785             Added grandfathering configuration.
786         * UIProcess/WebProcessProxy.cpp:
787         (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData):
788             New function to get all top privately controlled domains that
789             have website data.
790         * UIProcess/WebProcessProxy.h:
791         * UIProcess/WebResourceLoadStatisticsManager.cpp:
792         (WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
793         (WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
794         (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
795         (WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
796         (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
797             Functions for testing and configuration.
798             WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval() changed
799             as a result of WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval()
800             moving to WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
801         * UIProcess/WebResourceLoadStatisticsManager.h:
802         * UIProcess/WebResourceLoadStatisticsStore.cpp:
803         (WebKit::initializeDataTypesToRemove):
804         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
805             Moved handling of pending removal into WebCore::ResourceLoadStatisticsStore since
806             that's where grandfathering happens.
807         (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
808             Moved registration of write persistent store callback and reading of Cocoa defaults to
809             WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver without parameters
810             so they are called for platforms without CFNETWORK_STORAGE_PARTITIONING.
811             Now includes registering WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
812             as handler for grandfathering since it involves reading of the website data store.
813         (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
814         (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
815         (WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval): Deleted.
816             Now happens in WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
817         * UIProcess/WebResourceLoadStatisticsStore.h:
818         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
819         (WebKit::WebsiteDataRecord::topPrivatelyControlledDomain):
820             New function to ask a WebsiteDataRecord for its top privately controlled domain.
821         * UIProcess/WebsiteData/WebsiteDataRecord.h:
822         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
823         (WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):
824             New function to get all top privately controlled domains that
825             have website data.
826         * UIProcess/WebsiteData/WebsiteDataStore.h:
827
828 2017-05-17  Brent Fulgham  <bfulgham@apple.com>
829
830         [WK2][iOS] Allow access to additional IOHID user class
831         https://bugs.webkit.org/show_bug.cgi?id=172198
832         <rdar://problem/31967635>
833
834         Reviewed by Alex Christensen.
835
836         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
837
838 2017-05-17  Chris Dumez  <cdumez@apple.com>
839
840         Add more assertions in BackgroundProcessResponsivenessTimer
841         https://bugs.webkit.org/show_bug.cgi?id=172239
842
843         Reviewed by Andreas Kling.
844
845         Add more assertions in BackgroundProcessResponsivenessTimer to help figure out the
846         source of <rdar://problem/32251578>.
847
848         * UIProcess/BackgroundProcessResponsivenessTimer.cpp:
849         (WebKit::BackgroundProcessResponsivenessTimer::updateState):
850         (WebKit::BackgroundProcessResponsivenessTimer::scheduleNextResponsivenessCheck):
851
852 2017-05-17  Youenn Fablet  <youenn@apple.com>
853
854         No need to copy origin references in UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo
855         https://bugs.webkit.org/show_bug.cgi?id=172242
856
857         Reviewed by Eric Carlson.
858
859         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
860         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
861
862 2017-05-17  Youenn Fablet  <youenn@apple.com>
863
864         Move-related refactoring on UserMediaPermissionRequestProxy
865         https://bugs.webkit.org/show_bug.cgi?id=172195
866
867         Reviewed by Alex Christensen.
868
869         Moving vectors of strings instead of passing as const ref so that we do not copy them.
870
871         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
872         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
873         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
874         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
875         * UIProcess/UserMediaPermissionRequestProxy.cpp:
876         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
877         * UIProcess/UserMediaPermissionRequestProxy.h:
878         (WebKit::UserMediaPermissionRequestProxy::create):
879
880 2017-05-17  Andy Estes  <aestes@apple.com>
881
882         REGRESSION (r215480): PKPaymentAuthorizationStatusFailure sent to PassKit in completeShippingContactSelection() even when there are no errors
883         https://bugs.webkit.org/show_bug.cgi?id=172227
884         <rdar://problem/31978432>
885
886         Reviewed by Alexey Proskuryakov.
887
888         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
889         (WebKit::toPKPaymentAuthorizationStatus): If there is an update with no errors, we should
890         return PKPaymentAuthorizationStatusSuccess instead of PKPaymentAuthorizationStatusFailure.
891
892 2017-05-17  Matt Lewis  <jlewis3@apple.com>
893
894         Unreviewed, rolling out r216974.
895
896         Revision caused consistent timeouts on all platforms.
897
898         Reverted changeset:
899
900         "Add a RuntimeEnabledFeature for display: contents, defaulted
901         to false."
902         https://bugs.webkit.org/show_bug.cgi?id=171984
903         http://trac.webkit.org/changeset/216974
904
905 2017-05-17  Alex Christensen  <achristensen@webkit.org>
906
907         Interacting with WKHTTPCookieStores before creating WKWebViews and WKProcessPools should affect cookies used
908         https://bugs.webkit.org/show_bug.cgi?id=171987
909
910         Reviewed by Brady Eidson.
911
912         When putting cookies in a WKHTTPCookieStore that hasn't been associated with a WKProcessPool yet, there is no
913         NetworkProcess into which to put the cookies.  In such a case, we should store these cookies in the WebsiteDataStore
914         until there is a NetworkProcess.
915
916         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
917         (WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
918         * NetworkProcess/NetworkProcess.cpp:
919         (WebKit::NetworkProcess::initializeNetworkProcess):
920         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
921         * NetworkProcess/NetworkProcess.h:
922         * NetworkProcess/NetworkProcess.messages.in:
923         * NetworkProcess/RemoteNetworkingContext.h:
924         * NetworkProcess/mac/RemoteNetworkingContext.mm:
925         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
926         (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
927         * Shared/WebsiteDataStoreParameters.cpp:
928         (WebKit::WebsiteDataStoreParameters::~WebsiteDataStoreParameters):
929         (WebKit::WebsiteDataStoreParameters::encode):
930         (WebKit::WebsiteDataStoreParameters::decode):
931         (WebKit::WebsiteDataStoreParameters::WebsiteDataStoreParameters): Deleted.
932         * Shared/WebsiteDataStoreParameters.h:
933         * UIProcess/API/APIHTTPCookieStore.cpp:
934         (API::HTTPCookieStore::cookies):
935         (API::HTTPCookieStore::setCookie):
936         (API::HTTPCookieStore::deleteCookie):
937         * UIProcess/API/APIHTTPCookieStore.h:
938         * UIProcess/WebProcessPool.cpp:
939         (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
940         (WebKit::WebProcessPool::pageAddedToProcess):
941         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
942         (WebKit::WebsiteDataStore::parameters):
943         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
944         (WebKit::WebsiteDataStore::pendingCookies):
945         (WebKit::WebsiteDataStore::addPendingCookie):
946         (WebKit::WebsiteDataStore::removePendingCookie):
947         * UIProcess/WebsiteData/WebsiteDataStore.h:
948
949 2017-05-17  Emilio Cobos Álvarez  <ecobos@igalia.com>
950
951         Add a RuntimeEnabledFeature for display: contents, defaulted to false.
952         https://bugs.webkit.org/show_bug.cgi?id=171984
953
954         Reviewed by Antti Koivisto.
955
956         * Shared/WebPreferencesDefinitions.h:
957         * UIProcess/API/C/WKPreferences.cpp:
958         (WKPreferencesSetDisplayContentsEnabled):
959         (WKPreferencesGetDisplayContentsEnabled):
960         * UIProcess/API/C/WKPreferencesRefPrivate.h:
961         * WebProcess/WebPage/WebPage.cpp:
962         (WebKit::WebPage::updatePreferences):
963
964 2017-05-17  Carlos Garcia Campos  <cgarcia@igalia.com>
965
966         Unreviewed. Fix the build with MEDIA_STREAM disabled after r216952.
967
968         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
969         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
970         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
971
972 2017-05-17  Carlos Garcia Campos  <cgarcia@igalia.com>
973
974         [Threaded Compositor] SHOULD NEVER BE REACHED in WebKit::CompositingRunLoop::updateCompleted
975         https://bugs.webkit.org/show_bug.cgi?id=172167
976
977         Reviewed by Michael Catanzaro.
978
979         This is still happening, even after r216182, less often but still happens. There are two conditions in which
980         this can happen:
981
982          - Again in force repaint. r216182 fixed the case of force repaint called when update state is completed, but it
983            can also crash if update state is inProgress or PendingAfterCompletion when m_coordinateUpdateCompletionWithClient
984            is true.
985          - When the threaded compositor is invalidated right after renderLayerTree() starts, but before it finishes.
986
987         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
988         (WebKit::ThreadedCompositor::invalidate): Invalidate the refresh monitor right after stopping updates in the
989         compositing run loop to ensure no more updates are scheduled.
990         (WebKit::ThreadedCompositor::renderLayerTree): Check the scene is still active before calling sceneUpdateFinished().
991         (WebKit::ThreadedCompositor::updateSceneState): Do not update m_coordinateUpdateCompletionWithClient when in
992         force repaint.
993         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
994         (WebKit::ThreadedDisplayRefreshMonitor::dispatchDisplayRefreshCallback): Return early if the monitor has been invalidated.
995
996 2017-05-16  Sam Weinig  <sam@webkit.org>
997
998         Bring Notification.idl up to spec
999         https://bugs.webkit.org/show_bug.cgi?id=172156
1000
1001         Reviewed by Chris Dumez.
1002
1003         * Shared/WebCoreArgumentCoders.h:
1004         * UIProcess/API/C/WKNotification.cpp:
1005         (WKNotificationCopyDir):
1006         * UIProcess/Notifications/WebNotification.cpp:
1007         (WebKit::WebNotification::WebNotification):
1008         * UIProcess/Notifications/WebNotification.h:
1009         (WebKit::WebNotification::create):
1010         (WebKit::WebNotification::dir):
1011         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1012         (WebKit::WebNotificationManagerProxy::show):
1013         * UIProcess/Notifications/WebNotificationManagerProxy.h:
1014         * UIProcess/WebPageProxy.cpp:
1015         (WebKit::WebPageProxy::showNotification):
1016         * UIProcess/WebPageProxy.h:
1017         * UIProcess/WebPageProxy.messages.in:
1018         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
1019         (WebKit::NotificationPermissionRequestManager::startRequest):
1020         (WebKit::NotificationPermissionRequestManager::permissionLevel):
1021         (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
1022         * WebProcess/Notifications/WebNotificationManager.cpp:
1023         (WebKit::WebNotificationManager::policyForOrigin):
1024         (WebKit::WebNotificationManager::show):
1025         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
1026         (WebKit::WebNotificationClient::checkPermission):
1027         * WebProcess/WebCoreSupport/WebNotificationClient.h:
1028         Update for enum vs String usage.
1029
1030 2017-05-16  Youenn Fablet  <youenn@apple.com>
1031
1032         Modernize WebKit2 getUserMedia passing of parameters
1033         https://bugs.webkit.org/show_bug.cgi?id=172161
1034
1035         Reviewed by Eric Carlson.
1036
1037         Passing SecurityOrigin as SecurityOriginData through IPC instead of Strings.
1038         Making more use of Ref<> instead of RefPtr<>.
1039
1040         * UIProcess/UserMediaPermissionCheckProxy.cpp:
1041         (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy):
1042         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
1043         * UIProcess/UserMediaPermissionCheckProxy.h:
1044         (WebKit::UserMediaPermissionCheckProxy::create):
1045         (WebKit::UserMediaPermissionCheckProxy::userMediaDocumentSecurityOrigin):
1046         (WebKit::UserMediaPermissionCheckProxy::topLevelDocumentSecurityOrigin):
1047         (WebKit::UserMediaPermissionCheckProxy::completionHandler):
1048         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1049         (WebKit::FrameAuthorizationState::FrameAuthorizationState):
1050         (WebKit::FrameAuthorizationState::ensureSecurityOriginsAreEqual):
1051         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
1052         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1053         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
1054         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
1055         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1056         * UIProcess/UserMediaPermissionRequestProxy.cpp:
1057         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
1058         * UIProcess/UserMediaPermissionRequestProxy.h:
1059         (WebKit::UserMediaPermissionRequestProxy::create):
1060         * UIProcess/WebPageProxy.cpp:
1061         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
1062         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
1063         (WebKit::WebPageProxy::requestNotificationPermission):
1064         * UIProcess/WebPageProxy.h:
1065         * UIProcess/WebPageProxy.messages.in:
1066         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1067         (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
1068         (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
1069
1070 2017-05-16  David Kilzer  <ddkilzer@apple.com>
1071
1072         Unused lambdas in UserMediaPermissionRequestManagerProxy.cpp
1073         <https://webkit.org/b/172179>
1074
1075         Reviewed by Eric Carlson.
1076
1077         Fixes unused lambda warnings found with newer clang:
1078
1079             Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:309:46: error: lambda capture 'userMediaID' is not used [-Werror,-Wunused-lambda-capture]
1080                 auto validateConstraintsHandler = [this, userMediaID, validHandler = WTFMove(validHandler), invalidHandler = WTFMove(invalidHandler), audioConstraints = WebCore::MediaConstraints(audioConstraints), videoConstraints = WebCore::MediaConstraints(videoConstraints)](String&& deviceIdentifierHashSalt) mutable {
1081                                                          ^
1082             Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:318:41: error: lambda capture 'userMediaID' is not used [-Werror,-Wunused-lambda-capture]
1083                 auto haveDeviceSaltHandler = [this, userMediaID, frameID, validateConstraintsHandler = WTFMove(validateConstraintsHandler)](uint64_t userMediaID, String&& deviceIdentifierHashSalt, bool originHasPersistentAccess) mutable {
1084                                                     ^
1085             Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:318:54: error: lambda capture 'frameID' is not used [-Werror,-Wunused-lambda-capture]
1086                 auto haveDeviceSaltHandler = [this, userMediaID, frameID, validateConstraintsHandler = WTFMove(validateConstraintsHandler)](uint64_t userMediaID, String&& deviceIdentifierHashSalt, bool originHasPersistentAccess) mutable {
1087                                                                  ^
1088             Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:362:37: error: lambda capture 'userMediaID' is not used [-Werror,-Wunused-lambda-capture]
1089                 auto completionHandler = [this, userMediaID](uint64_t userMediaID, String&& deviceIdentifierHashSalt, bool originHasPersistentAccess) {
1090                                                 ^
1091
1092         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1093         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1094         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
1095         - Remove unused lambdas.
1096
1097 2017-05-16  Brent Fulgham  <bfulgham@apple.com>
1098
1099         [WK2][macOS] Support Flash Player DRM features
1100         https://bugs.webkit.org/show_bug.cgi?id=172157
1101         <rdar://problem/31889297>
1102
1103         Reviewed by Dean Jackson.
1104
1105         Relax the IOKit whitelist to support DRM features needed by
1106         some websites.
1107
1108         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1109
1110 2017-05-16  Brent Fulgham  <bfulgham@apple.com>
1111
1112         [WK2][macOS] Adopt a whitelist for XPC services
1113         https://bugs.webkit.org/show_bug.cgi?id=172151
1114         <rdar://problem/31916325>
1115
1116         Reviewed by Alex Christensen.
1117
1118         * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
1119         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1120         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1121         * WebProcess/com.apple.WebProcess.sb.in:
1122
1123 2017-05-16  Timothy Horton  <timothy_horton@apple.com>
1124
1125         Make it possible to adjust which edges are affected by safe area insets
1126         https://bugs.webkit.org/show_bug.cgi?id=172149
1127         <rdar://problem/31564729>
1128
1129         Reviewed by Beth Dakin.
1130
1131         * UIProcess/API/Cocoa/WKWebView.mm:
1132         (-[WKWebView _initializeWithConfiguration:]):
1133         (-[WKWebView _computedContentInset]):
1134         (-[WKWebView _obscuredInsetEdgesAffectedBySafeArea]):
1135         (-[WKWebView _setObscuredInsetEdgesAffectedBySafeArea:]):
1136         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1137         Add SPI to adjust which edges are taken into account, and adjust the default.
1138
1139 2017-05-16  Zan Dobersek  <zdobersek@igalia.com>
1140
1141         [GLib] Use RunLoopSourcePriority::RunLoopDispatcher as the GSocketMonitor's GSource priority
1142         https://bugs.webkit.org/show_bug.cgi?id=172160
1143
1144         Reviewed by Carlos Garcia Campos.
1145
1146         * Platform/IPC/glib/GSocketMonitor.cpp:
1147         (IPC::GSocketMonitor::start): Explicitly set the priority for the GSocketMonitor's
1148         GSource object to RunLoopSourcePriority::RunLoopDispatcher, equating it to the
1149         priority that's used in RunLoop for dispatches of the queued functions.
1150
1151 2017-05-16  Zan Dobersek  <zdobersek@igalia.com>
1152
1153         [GLib] Name more GSource-based RunLoop::Timers
1154         https://bugs.webkit.org/show_bug.cgi?id=172158
1155
1156         Reviewed by Carlos Garcia Campos.
1157
1158         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
1159         (WebKit::CompositingRunLoop::CompositingRunLoop):
1160         Specify 'CompositingRunLoop' as the name of this GSource-based RunLoop::Timer.
1161         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
1162         (WebKit::ThreadedDisplayRefreshMonitor::ThreadedDisplayRefreshMonitor):
1163         Specify 'ThreadedDisplayRefreshMonitor' as the name of this GSource-based RunLoop::Timer.
1164         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1165         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1166         Specify 'CoordinatedLayerTreeHost' as the name of this GSource-based RunLoop::Timer.
1167
1168 2017-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1169
1170         Unreviewed. Revert change committed by mistakle in r216922.
1171
1172         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1173         (WebKit::ThreadedCompositor::forceRepaint):
1174
1175 2017-05-16  Youenn Fablet  <youenn@apple.com>
1176
1177         Remove MediaConstraintsData and MediaConstraintsImpl
1178         https://bugs.webkit.org/show_bug.cgi?id=172132
1179
1180         Reviewed by Eric Carlson.
1181
1182         Removing MediaConstraintsData and MediaConstraintsImpl allows simplifying the code.
1183         Further simplified the code by making MediaConstraints no longer ref counted and now a struct.
1184
1185         * Scripts/webkit/messages.py:
1186         (headers_for_type):
1187         * Shared/WebCoreArgumentCoders.cpp:
1188         (IPC::ArgumentCoder<MediaConstraints>::encode):
1189         (IPC::ArgumentCoder<MediaConstraints>::decode):
1190         (IPC::ArgumentCoder<MediaConstraintsData>::encode): Deleted.
1191         (IPC::ArgumentCoder<MediaConstraintsData>::decode): Deleted.
1192         * Shared/WebCoreArgumentCoders.h:
1193         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
1194         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
1195         (WebKit::UserMediaCaptureManagerProxy::applyConstraints):
1196         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
1197         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
1198         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1199         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1200         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1201         * UIProcess/WebPageProxy.cpp:
1202         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
1203         * UIProcess/WebPageProxy.h:
1204         * UIProcess/WebPageProxy.messages.in:
1205         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1206         (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
1207         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
1208         (WebKit::UserMediaCaptureManager::applyConstraints):
1209
1210 2017-05-16  Michael Catanzaro  <mcatanzaro@igalia.com>
1211
1212         [SOUP] Remove LATEST_RECORD_VERSION from GnuTLS priority string
1213         https://bugs.webkit.org/show_bug.cgi?id=172153
1214
1215         Based on discussion with Nikos in https://bugzilla.gnome.org/show_bug.cgi?id=782218, we
1216         should remove LATEST_RECORD_VERSION from our GnuTLS priority string. This causes GnuTLS to
1217         use the latest TLS record version (the record format is separate from the TLS protocol
1218         version), which we needed a couple years ago (after dropping SSLv3) for maximum
1219         compatibility with broken web servers. But it's not needed anymore, and is causing new
1220         compatibility problems with other broken web servers, so let's get rid of it.
1221
1222         Reviewed by Carlos Garcia Campos.
1223
1224         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
1225         (main):
1226         * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
1227         (main):
1228
1229 2017-05-15  Andy Estes  <aestes@apple.com>
1230
1231         Make the application PID available to WebCore
1232         https://bugs.webkit.org/show_bug.cgi?id=172133
1233
1234         Reviewed by Andreas Kling.
1235
1236         Added uiProcessPID to Web and Networking process creation parameters. The UI process
1237         initializes these to getpid(), and the child processes call WebCore::setPresentingApplicationPID()
1238         at initialization time.
1239
1240         This replaces presenterApplicationPid.
1241
1242         * NetworkProcess/NetworkProcess.cpp:
1243         (WebKit::NetworkProcess::initializeNetworkProcess):
1244         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1245         (WebKit::NetworkProcessCreationParameters::encode):
1246         (WebKit::NetworkProcessCreationParameters::decode):
1247         * NetworkProcess/NetworkProcessCreationParameters.h:
1248         * Shared/WebProcessCreationParameters.cpp:
1249         (WebKit::WebProcessCreationParameters::encode):
1250         (WebKit::WebProcessCreationParameters::decode):
1251         * Shared/WebProcessCreationParameters.h:
1252         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1253         (WebKit::WebProcessPool::platformInitializeWebProcess):
1254         * UIProcess/WebProcessPool.cpp:
1255         (WebKit::WebProcessPool::ensureNetworkProcess):
1256         (WebKit::WebProcessPool::createNewWebProcess):
1257         * WebProcess/WebPage/mac/WebPageMac.mm:
1258         (WebKit::WebPage::platformInitialize):
1259         * WebProcess/WebProcess.cpp:
1260         (WebKit::WebProcess::initializeWebProcess):
1261         * WebProcess/WebProcess.h:
1262         (WebKit::WebProcess::presenterApplicationPid): Deleted.
1263         * WebProcess/cocoa/WebProcessCocoa.mm:
1264         (WebKit::WebProcess::platformInitializeWebProcess):
1265
1266 2017-05-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
1267
1268         Do not delete asynchronously decoded frames for large images if their clients are in the viewport
1269         https://bugs.webkit.org/show_bug.cgi?id=170640
1270
1271         Reviewed by Simon Fraser.
1272
1273         Enable the async decoding for large images.
1274
1275         * WebProcess/WebPage/WebPage.cpp:
1276         (WebKit::WebPage::updatePreferences):
1277
1278 2017-05-15  Youenn Fablet  <youenn@apple.com>
1279
1280         Simplify RealtimeMediaSource data production and state
1281         https://bugs.webkit.org/show_bug.cgi?id=171999
1282
1283         Reviewed by Eric Carlson.
1284
1285         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
1286         (WebKit::UserMediaCaptureManagerProxy::startProducingData):
1287         (WebKit::UserMediaCaptureManagerProxy::stopProducingData):
1288         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
1289
1290 2017-05-15  Brent Fulgham  <bfulgham@apple.com>
1291
1292         Correct typo (part of r216790).
1293
1294         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: The check-in missed part of a
1295         regular expression needed to fix the audio playback.
1296
1297 2017-05-15  Jer Noble  <jer.noble@apple.com>
1298
1299         Add experimental setting to allow document gesture interaction to fulfill media playback gesture requirement
1300         https://bugs.webkit.org/show_bug.cgi?id=172131
1301
1302         Reviewed by Eric Carlson.
1303
1304         * Shared/WebPreferencesDefinitions.h:
1305         * UIProcess/API/C/WKPreferences.cpp:
1306         (WKPreferencesSetMediaUserGestureInheritsFromDocument):
1307         (WKPreferencesGetMediaUserGestureInheritsFromDocument):
1308         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1309         * WebProcess/WebPage/WebPage.cpp:
1310         (WebKit::WebPage::updatePreferences):
1311
1312 2017-05-15  Brent Fulgham  <bfulgham@apple.com>
1313
1314         [WK2][macOS][iOS] Allow Network process to access nsurlstoraged's top level domain data cache 
1315         https://bugs.webkit.org/show_bug.cgi?id=172128
1316         <rdar://problem/30871490>
1317
1318         Reviewed by Alex Christensen.
1319
1320         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1321         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1322
1323 2017-05-15  David Kilzer  <ddkilzer@apple.com>
1324
1325         Update json.hpp to v2.1.1
1326         <https://webkit.org/b/172085>
1327         <rdar://problem/32180980>
1328
1329         Reviewed by Alex Christensen.
1330
1331         * NetworkProcess/capture/NetworkCaptureEvent.cpp:
1332         - Define JSON_NOEXCEPTION as 1 to disable exceptions in
1333           json.hpp.
1334         (WebKit::NetworkCapture::JSONCoder<String>::encode):
1335         (WebKit::NetworkCapture::JSONCoder<WebCore::SharedBuffer>::encode):
1336         - Build std::string passing in length to avoid the need for a
1337           custom basic_json() constructor, and for efficiency.
1338
1339         * NetworkProcess/capture/json.hpp:
1340         - Update to v2.1.1 and remove customizations.
1341
1342 2017-05-15  Brent Fulgham  <bfulgham@apple.com>
1343
1344         Unreviewed build fix.
1345
1346         Debugging code was accidentally left in the Plugin sandbox profile.
1347
1348         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1349
1350 2017-05-15  Gwang Yoon Hwang  <yoon@igalia.com>
1351
1352         [WPE] Unreviewed debug build fix
1353         https://bugs.webkit.org/show_bug.cgi?id=172118
1354
1355         Unreviewed, remove a dead code accidentally committed in r215259.
1356
1357         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
1358         Remove deprecated CompositingRunLoop::isCurrent.
1359         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1360         (WebKit::ThreadedCompositor::frameComplete):
1361
1362 2017-05-14  Daewoong Jang  <daewoong.jang@navercorp.com>
1363
1364         [CoordinatedGraphics] Remove unused files and lines
1365         https://bugs.webkit.org/show_bug.cgi?id=172080
1366
1367         Reviewed by Darin Adler.
1368
1369         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: Removed.
1370         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h: Removed.
1371         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: Removed.
1372         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h: Removed.
1373         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h: Removed.
1374         * UIProcess/WebPageProxy.h:
1375         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1376         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in: Removed.
1377
1378 2017-05-14  Andreas Kling  <akling@apple.com>
1379
1380         Always reset the assisted node when the main frame commits a new load.
1381         https://bugs.webkit.org/show_bug.cgi?id=172088
1382
1383         Reviewed by Antti Koivisto.
1384
1385         WebPage::m_assistedNode could extend the lifetime of the document it pointed into
1386         if the main frame was navigated while the assisted node was in one of its subframes.
1387         The life-supported document wouldn't be reachable from JavaScript but nevertheless
1388         would consume memory and other resources.
1389
1390         This patch fixes the issue by always clearing WebPage::m_assistedNode when the main
1391         frame commits a new load.
1392
1393         * WebProcess/WebPage/WebPage.cpp:
1394         (WebKit::WebPage::resetAssistedNodeForFrame):
1395
1396 2017-05-14  Csaba Osztrogonác  <ossy@webkit.org>
1397
1398         Unreviewed Mac cmake buildfix after r216690, just for fun.
1399
1400         * PlatformMac.cmake:
1401
1402 2017-05-14  David Kilzer  <ddkilzer@apple.com>
1403
1404         Fix unused lambdas in WebKit2
1405         <https://webkit.org/b/172090>
1406
1407         Reviewed by Chris Dumez.
1408
1409         Fixes unused lambda warnings found with newer clang.
1410
1411         * NetworkProcess/cache/NetworkCache.cpp:
1412         (WebKit::NetworkCache::Cache::retrieve):
1413         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1414         (WebKit::NetworkCache::Statistics::initialize):
1415         - Use UNUSED_PARAM() to silence unused lambda warning since
1416           'startTime' is used in Debug builds.
1417
1418         * NetworkProcess/capture/NetworkCaptureManager.cpp:
1419         (WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
1420         - Remove unused 'this' from lambda capture.
1421
1422         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1423         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1424         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
1425         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1426         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
1427         - Use UNUSED_PARAM() to silence unused lambda warning since
1428           'taskIdentifier' is used in Debug builds.
1429
1430         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1431         (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
1432         (WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):
1433         - Remove unused 'this' from lambda captures.
1434
1435         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1436         (WebKit::WebsiteDataStore::fetchData):
1437         - Remove unused 'fetchOptions' from lambda capture.
1438         (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):
1439         - Remove unused 'this' from lambda capture.
1440
1441         * UIProcess/mac/ViewGestureControllerMac.mm:
1442         (WebKit::ViewGestureController::forceRepaintIfNeeded):
1443         - Remove unused 'this' from lambda capture.
1444
1445         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
1446         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
1447         - Remove unused 'this' from nested lambda captures.
1448
1449 2017-05-13  Eric Carlson  <eric.carlson@apple.com>
1450
1451         [MediaStream] deviceId constraint doesn't work with getUserMedia
1452         https://bugs.webkit.org/show_bug.cgi?id=171877
1453         <rdar://problem/31899730>
1454
1455         Reviewed by Jer Noble.
1456
1457         * Shared/WebCoreArgumentCoders.cpp:
1458         (IPC::ArgumentCoder<MediaConstraintsData>::encode): Encode deviceIDHashSalt.
1459         (IPC::ArgumentCoder<MediaConstraintsData>::decode): Decode deviceIDHashSalt.
1460
1461         * UIProcess/UserMediaPermissionCheckProxy.cpp:
1462         (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): Initialize
1463         completion handler, frame ID, and security origins.
1464         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): Complete by calling
1465         completion handler because we now sometimes request access info before calling gUM.
1466         (WebKit::UserMediaPermissionCheckProxy::invalidate): Clear completion handler.
1467         * UIProcess/UserMediaPermissionCheckProxy.h:
1468
1469         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1470         (WebKit::FrameAuthorizationState::FrameAuthorizationState): Take security origins, not
1471         UserMediaPermissionRequestProxy, so it can be constructed with a UserMediaPermissionCheckProxy.
1472         (WebKit::FrameAuthorizationState::ensureSecurityOriginsAreEqual): Ditto. Clear has salt
1473         when origins don't match.
1474         (WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest): Templatize.
1475         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied): Fix typo.
1476         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Ditto.
1477         Don't set state for empty UIDs. Pass hash salt to web process.
1478         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1479         The device ID hash salt is now required to validate constraints, so get it first.
1480         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Helper
1481         method used to get the device ID hash salt.
1482         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Restructure
1483         to use getUserMediaPermissionInfo.
1484         (WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Deleted.
1485         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1486
1487         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1488         (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted): Add device ID
1489         hash salt parameter.
1490         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
1491
1492         * WebProcess/WebPage/WebPage.cpp:
1493         (WebKit::WebPage::userMediaAccessWasGranted): Ditto.
1494         * WebProcess/WebPage/WebPage.h:
1495         * WebProcess/WebPage/WebPage.messages.in:
1496
1497         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
1498         (WebKit::UserMediaCaptureManager::createCaptureSource): Use new MediaConstraintsData 
1499         constructor.
1500
1501 2017-05-13  Chris Dumez  <cdumez@apple.com>
1502
1503         Stop using RefPtr::release()
1504         https://bugs.webkit.org/show_bug.cgi?id=172074
1505
1506         Reviewed by Geoffrey Garen.
1507
1508         * Platform/unix/SharedMemoryUnix.cpp:
1509         (WebKit::SharedMemory::create):
1510         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1511         (WebKit::CoordinatedGraphicsScene::createImageBacking):
1512         * Shared/cairo/ShareableBitmapCairo.cpp:
1513         (WebKit::ShareableBitmap::createCairoSurface):
1514         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.cpp:
1515         (WebKit::core):
1516         * WebProcess/WebPage/WebPage.cpp:
1517         (WebKit::WebPage::getContentsAsMHTMLData):
1518
1519 2017-05-12  Chris Dumez  <cdumez@apple.com>
1520
1521         Drop remaining uses of PassRefPtr in WebKit2/WebProcess
1522         https://bugs.webkit.org/show_bug.cgi?id=172055
1523
1524         Reviewed by Alex Christensen.
1525
1526         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
1527         (+[WKWebProcessPlugInScriptWorld normalWorld]):
1528         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1529         (contextMenuItems):
1530         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
1531         (WKBundleScriptWorldNormalWorld):
1532         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp:
1533         (webkitScriptWorldCreate):
1534         * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp:
1535         (WebKit::InjectedBundleCSSStyleDeclarationHandle::getOrCreate):
1536         * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.h:
1537         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1538         (WebKit::InjectedBundleRangeHandle::getOrCreate):
1539         (WebKit::InjectedBundleRangeHandle::create):
1540         (WebKit::InjectedBundleRangeHandle::coreRange):
1541         (WebKit::InjectedBundleRangeHandle::renderedImage):
1542         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
1543         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1544         (WebKit::InjectedBundle::create):
1545         (WebKit::InjectedBundle::createWebDataFromUint8Array):
1546         * WebProcess/InjectedBundle/InjectedBundle.h:
1547         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
1548         (WebKit::InjectedBundleBackForwardList::itemAtIndex):
1549         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
1550         (WebKit::InjectedBundleBackForwardList::detach):
1551         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
1552         (WebKit::InjectedBundleBackForwardListItem::create):
1553         (WebKit::InjectedBundleBackForwardListItem::InjectedBundleBackForwardListItem):
1554         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
1555         (WebKit::InjectedBundleHitTestResult::nodeHandle):
1556         (WebKit::InjectedBundleHitTestResult::urlElementHandle):
1557         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
1558         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
1559         (WebKit::InjectedBundleNavigationAction::create):
1560         (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
1561         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
1562         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
1563         (WebKit::InjectedBundleScriptWorld::getOrCreate):
1564         (WebKit::InjectedBundleScriptWorld::normalWorld):
1565         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
1566         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1567         (WebKit::NetscapePlugin::create):
1568         (WebKit::NetscapePlugin::NetscapePlugin):
1569         (WebKit::NetscapePlugin::supportsSnapshotting):
1570         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1571         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
1572         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
1573         (WebKit::PDFPluginAnnotation::create):
1574         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
1575         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
1576         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
1577         * WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
1578         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
1579         (WebKit::PDFPluginPasswordField::createAnnotationElement):
1580         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
1581         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
1582         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
1583         * WebProcess/UserContent/WebUserContentController.cpp:
1584         (WebKit::worldMap):
1585         (WebKit::WebUserMessageHandlerDescriptorProxy::create):
1586         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1587         (WebKit::convertImageToBitmap):
1588         * WebProcess/WebPage/WebPage.cpp:
1589         (WebKit::WebPage::addUserScript):
1590         (WebKit::WebPage::addUserStyleSheet):
1591         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
1592         (WebKit::WebPrintOperationGtk::create):
1593         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
1594         * WebProcess/WebPage/ios/WebPageIOS.mm:
1595         (WebKit::rangeForPosition):
1596         (WebKit::rangeAtWordBoundaryForPosition):
1597         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1598
1599 2017-05-12  Alex Christensen  <achristensen@webkit.org>
1600
1601         Rename WKContentExtension to WKContentRuleList
1602         https://bugs.webkit.org/show_bug.cgi?id=172053
1603         <rdar://problem/32141005>
1604
1605         Reviewed by Geoffrey Garen.
1606
1607         * Shared/API/APIObject.h:
1608         * Shared/API/Cocoa/WebKit.h:
1609         * Shared/API/c/WKDeprecatedFunctions.cpp:
1610         (WKPageGroupAddUserContentFilter):
1611         (WKPageGroupRemoveUserContentFilter):
1612         * Shared/Cocoa/APIObject.mm:
1613         (API::Object::newObject):
1614         * Shared/WebCompiledContentExtension.cpp: Removed.
1615         * Shared/WebCompiledContentExtension.h: Removed.
1616         * Shared/WebCompiledContentExtensionData.cpp: Removed.
1617         * Shared/WebCompiledContentExtensionData.h: Removed.
1618         * Shared/WebCompiledContentRuleList.cpp: Copied from Source/WebKit2/Shared/WebCompiledContentExtension.cpp.
1619         (WebKit::WebCompiledContentRuleList::create):
1620         (WebKit::WebCompiledContentRuleList::WebCompiledContentRuleList):
1621         (WebKit::WebCompiledContentRuleList::~WebCompiledContentRuleList):
1622         (WebKit::WebCompiledContentRuleList::conditionsApplyOnlyToDomain):
1623         (WebKit::WebCompiledContentRuleList::filtersWithoutConditionsBytecode):
1624         (WebKit::WebCompiledContentRuleList::filtersWithoutConditionsBytecodeLength):
1625         (WebKit::WebCompiledContentRuleList::filtersWithConditionsBytecode):
1626         (WebKit::WebCompiledContentRuleList::filtersWithConditionsBytecodeLength):
1627         (WebKit::WebCompiledContentRuleList::topURLFiltersBytecode):
1628         (WebKit::WebCompiledContentRuleList::topURLFiltersBytecodeLength):
1629         (WebKit::WebCompiledContentRuleList::actions):
1630         (WebKit::WebCompiledContentRuleList::actionsLength):
1631         (WebKit::WebCompiledContentExtension::create): Deleted.
1632         (WebKit::WebCompiledContentExtension::WebCompiledContentExtension): Deleted.
1633         (WebKit::WebCompiledContentExtension::~WebCompiledContentExtension): Deleted.
1634         (WebKit::WebCompiledContentExtension::conditionsApplyOnlyToDomain): Deleted.
1635         (WebKit::WebCompiledContentExtension::filtersWithoutConditionsBytecode): Deleted.
1636         (WebKit::WebCompiledContentExtension::filtersWithoutConditionsBytecodeLength): Deleted.
1637         (WebKit::WebCompiledContentExtension::filtersWithConditionsBytecode): Deleted.
1638         (WebKit::WebCompiledContentExtension::filtersWithConditionsBytecodeLength): Deleted.
1639         (WebKit::WebCompiledContentExtension::topURLFiltersBytecode): Deleted.
1640         (WebKit::WebCompiledContentExtension::topURLFiltersBytecodeLength): Deleted.
1641         (WebKit::WebCompiledContentExtension::actions): Deleted.
1642         (WebKit::WebCompiledContentExtension::actionsLength): Deleted.
1643         * Shared/WebCompiledContentRuleList.h: Copied from Source/WebKit2/Shared/WebCompiledContentExtension.h.
1644         * Shared/WebCompiledContentRuleListData.cpp: Copied from Source/WebKit2/Shared/WebCompiledContentExtensionData.cpp.
1645         (WebKit::WebCompiledContentRuleListData::encode):
1646         (WebKit::WebCompiledContentRuleListData::decode):
1647         (WebKit::WebCompiledContentExtensionData::encode): Deleted.
1648         (WebKit::WebCompiledContentExtensionData::decode): Deleted.
1649         * Shared/WebCompiledContentRuleListData.h: Copied from Source/WebKit2/Shared/WebCompiledContentExtensionData.h.
1650         (WebKit::WebCompiledContentRuleListData::WebCompiledContentRuleListData):
1651         (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData): Deleted.
1652         * Shared/WebPageCreationParameters.cpp:
1653         (WebKit::WebPageCreationParameters::encode):
1654         (WebKit::WebPageCreationParameters::decode):
1655         * Shared/WebPageCreationParameters.h:
1656         * UIProcess/API/APIContentExtension.cpp: Removed.
1657         * UIProcess/API/APIContentExtension.h: Removed.
1658         * UIProcess/API/APIContentExtensionStore.cpp: Removed.
1659         * UIProcess/API/APIContentExtensionStore.h: Removed.
1660         * UIProcess/API/APIContentRuleList.cpp: Copied from Source/WebKit2/UIProcess/API/APIContentExtension.cpp.
1661         (API::ContentRuleList::ContentRuleList):
1662         (API::ContentRuleList::~ContentRuleList):
1663         (API::ContentExtension::ContentExtension): Deleted.
1664         (API::ContentExtension::~ContentExtension): Deleted.
1665         * UIProcess/API/APIContentRuleList.h: Copied from Source/WebKit2/UIProcess/API/APIContentExtension.h.
1666         * UIProcess/API/APIContentRuleListStore.cpp: Copied from Source/WebKit2/UIProcess/API/APIContentExtensionStore.cpp.
1667         (API::ContentRuleListStore::legacyDefaultStore):
1668         (API::ContentRuleListStore::nonLegacyDdefaultStore):
1669         (API::ContentRuleListStore::defaultStore):
1670         (API::ContentRuleListStore::storeWithPath):
1671         (API::ContentRuleListStore::ContentRuleListStore):
1672         (API::ContentRuleListStore::~ContentRuleListStore):
1673         (API::constructedPathPrefix):
1674         (API::ContentRuleListMetaData::fileSize):
1675         (API::encodeContentRuleListMetaData):
1676         (API::decodeContentRuleListMetaData):
1677         (API::openAndMapContentRuleList):
1678         (API::compiledToFile):
1679         (API::createExtension):
1680         (API::ContentRuleListStore::lookupContentRuleList):
1681         (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):
1682         (API::ContentRuleListStore::compileContentRuleList):
1683         (API::ContentRuleListStore::removeContentRuleList):
1684         (API::ContentRuleListStore::synchronousRemoveAllContentRuleLists):
1685         (API::ContentRuleListStore::invalidateContentRuleListVersion):
1686         (API::ContentRuleListStore::getContentRuleListSource):
1687         (API::contentRuleListStoreErrorCategory):
1688         (API::ContentExtensionStore::defaultStore): Deleted.
1689         (API::ContentExtensionStore::storeWithPath): Deleted.
1690         (API::ContentExtensionStore::ContentExtensionStore): Deleted.
1691         (API::ContentExtensionStore::~ContentExtensionStore): Deleted.
1692         (API::ContentExtensionMetaData::fileSize): Deleted.
1693         (API::encodeContentExtensionMetaData): Deleted.
1694         (API::decodeContentExtensionMetaData): Deleted.
1695         (API::openAndMapContentExtension): Deleted.
1696         (API::ContentExtensionStore::lookupContentExtension): Deleted.
1697         (API::ContentExtensionStore::getAvailableContentExtensionIdentifiers): Deleted.
1698         (API::ContentExtensionStore::compileContentExtension): Deleted.
1699         (API::ContentExtensionStore::removeContentExtension): Deleted.
1700         (API::ContentExtensionStore::synchronousRemoveAllContentExtensions): Deleted.
1701         (API::ContentExtensionStore::invalidateContentExtensionVersion): Deleted.
1702         (API::ContentExtensionStore::getContentExtensionSource): Deleted.
1703         (API::contentExtensionStoreErrorCategory): Deleted.
1704         * UIProcess/API/APIContentRuleListStore.h: Copied from Source/WebKit2/UIProcess/API/APIContentExtensionStore.h.
1705         (API::make_error_code):
1706         * UIProcess/API/C/WKAPICast.h:
1707         * UIProcess/API/C/WKPageGroup.cpp:
1708         * UIProcess/API/C/WKUserContentControllerRef.cpp:
1709         (WKUserContentControllerAddUserContentFilter):
1710         (WKUserContentControllerRemoveAllUserContentFilters):
1711         * UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:
1712         (WKUserContentExtensionStoreGetTypeID):
1713         * UIProcess/API/Cocoa/APIUserContentExtensionStoreCocoa.mm:
1714         (API::ContentRuleListStore::defaultStorePath):
1715         (API::ContentExtensionStore::defaultStorePath): Deleted.
1716         * UIProcess/API/Cocoa/WKContentExtension.h: Removed.
1717         * UIProcess/API/Cocoa/WKContentExtension.mm: Removed.
1718         * UIProcess/API/Cocoa/WKContentExtensionInternal.h: Removed.
1719         * UIProcess/API/Cocoa/WKContentExtensionStore.h: Removed.
1720         * UIProcess/API/Cocoa/WKContentExtensionStore.mm: Removed.
1721         * UIProcess/API/Cocoa/WKContentExtensionStoreInternal.h: Removed.
1722         * UIProcess/API/Cocoa/WKContentExtensionStorePrivate.h: Removed.
1723         * UIProcess/API/Cocoa/WKContentRuleList.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtension.h.
1724         * UIProcess/API/Cocoa/WKContentRuleList.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtension.mm.
1725         (-[WKContentRuleList dealloc]):
1726         (-[WKContentRuleList _apiObject]):
1727         (-[WKContentRuleList identifier]):
1728         (-[WKContentExtension dealloc]): Deleted.
1729         (-[WKContentExtension _apiObject]): Deleted.
1730         (-[WKContentExtension identifier]): Deleted.
1731         * UIProcess/API/Cocoa/WKContentRuleListInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionInternal.h.
1732         (WebKit::wrapper):
1733         * UIProcess/API/Cocoa/WKContentRuleListStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionStore.h.
1734         * UIProcess/API/Cocoa/WKContentRuleListStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionStore.mm.
1735         (toWKErrorCode):
1736         (-[WKContentRuleListStore dealloc]):
1737         (+[WKContentRuleListStore defaultStore]):
1738         (+[WKContentRuleListStore storeWithURL:]):
1739         (-[WKContentRuleListStore compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:]):
1740         (-[WKContentRuleListStore _compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:releasesArgument:]):
1741         (-[WKContentRuleListStore lookUpContentRuleListForIdentifier:completionHandler:]):
1742         (-[WKContentRuleListStore getAvailableContentRuleListIdentifiers:]):
1743         (-[WKContentRuleListStore removeContentRuleListForIdentifier:completionHandler:]):
1744         (-[WKContentRuleListStore _apiObject]):
1745         (-[WKContentRuleListStore _removeAllContentRuleLists]):
1746         (-[WKContentRuleListStore _invalidateContentRuleListVersionForIdentifier:]):
1747         (-[WKContentRuleListStore _getContentRuleListSourceForIdentifier:completionHandler:]):
1748         (-[WKContentRuleListStore _compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:]):
1749         (-[WKContentExtensionStore dealloc]): Deleted.
1750         (+[WKContentExtensionStore defaultStore]): Deleted.
1751         (+[WKContentExtensionStore storeWithURL:]): Deleted.
1752         (-[WKContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]): Deleted.
1753         (-[WKContentExtensionStore _compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:releasesArgument:]): Deleted.
1754         (-[WKContentExtensionStore lookUpContentExtensionForIdentifier:completionHandler:]): Deleted.
1755         (-[WKContentExtensionStore getAvailableContentExtensionIdentifiers:]): Deleted.
1756         (-[WKContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]): Deleted.
1757         (-[WKContentExtensionStore _apiObject]): Deleted.
1758         (-[WKContentExtensionStore _removeAllContentExtensions]): Deleted.
1759         (-[WKContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]): Deleted.
1760         (-[WKContentExtensionStore _getContentExtensionSourceForIdentifier:completionHandler:]): Deleted.
1761         (-[WKContentExtensionStore _compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]): Deleted.
1762         * UIProcess/API/Cocoa/WKContentRuleListStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionStoreInternal.h.
1763         (WebKit::wrapper):
1764         * UIProcess/API/Cocoa/WKContentRuleListStorePrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionStorePrivate.h.
1765         * UIProcess/API/Cocoa/WKError.h:
1766         * UIProcess/API/Cocoa/WKError.mm:
1767         (localizedDescriptionForErrorCode):
1768         * UIProcess/API/Cocoa/WKUserContentController.h:
1769         * UIProcess/API/Cocoa/WKUserContentController.mm:
1770         (-[WKUserContentController addContentRuleList:]):
1771         (-[WKUserContentController removeContentRuleList:]):
1772         (-[WKUserContentController removeAllContentRuleLists]):
1773         (-[WKUserContentController _addUserContentFilter:]):
1774         (-[WKUserContentController _removeUserContentFilter:]):
1775         (-[WKUserContentController _removeAllUserContentFilters]):
1776         (-[WKUserContentController addContentExtension:]): Deleted.
1777         (-[WKUserContentController removeContentExtension:]): Deleted.
1778         (-[WKUserContentController removeAllContentExtensions]): Deleted.
1779         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
1780         (toUserContentRuleListStoreError):
1781         (+[_WKUserContentExtensionStore defaultStore]):
1782         (+[_WKUserContentExtensionStore storeWithURL:]):
1783         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
1784         (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
1785         (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
1786         (-[_WKUserContentExtensionStore _apiObject]):
1787         (-[_WKUserContentExtensionStore _removeAllContentExtensions]):
1788         (-[_WKUserContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]):
1789         (-[_WKUserContentExtensionStore _initWithWKContentRuleListStore:]):
1790         (toUserContentExtensionStoreError): Deleted.
1791         (-[_WKUserContentExtensionStore _initWithWKContentExtensionStore:]): Deleted.
1792         * UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h:
1793         * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
1794         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
1795         (-[_WKUserContentFilter _apiObject]):
1796         (-[_WKUserContentFilter _initWithWKContentRuleList:]):
1797         (-[_WKUserContentFilter _initWithWKContentExtension:]): Deleted.
1798         * UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:
1799         * UIProcess/API/Cocoa/_WKUserContentFilterPrivate.h:
1800         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1801         (WebKit::WebUserContentControllerProxy::addProcess):
1802         (WebKit::WebUserContentControllerProxy::addContentRuleList):
1803         (WebKit::WebUserContentControllerProxy::removeContentRuleList):
1804         (WebKit::WebUserContentControllerProxy::removeAllContentRuleLists):
1805         (WebKit::WebUserContentControllerProxy::addContentExtension): Deleted.
1806         (WebKit::WebUserContentControllerProxy::removeContentExtension): Deleted.
1807         (WebKit::WebUserContentControllerProxy::removeAllContentExtensions): Deleted.
1808         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1809         * UIProcess/WebPageGroup.cpp:
1810         * WebKit2.xcodeproj/project.pbxproj:
1811         * WebProcess/UserContent/WebUserContentController.cpp:
1812         (WebKit::WebUserContentController::addContentRuleLists):
1813         (WebKit::WebUserContentController::removeContentRuleList):
1814         (WebKit::WebUserContentController::removeAllContentRuleLists):
1815         (WebKit::WebUserContentController::addContentExtensions): Deleted.
1816         (WebKit::WebUserContentController::removeContentExtension): Deleted.
1817         (WebKit::WebUserContentController::removeAllContentExtensions): Deleted.
1818         * WebProcess/UserContent/WebUserContentController.h:
1819         * WebProcess/UserContent/WebUserContentController.messages.in:
1820         * WebProcess/WebPage/WebPage.cpp:
1821         (WebKit::m_backgroundCPULimit):
1822
1823 2017-05-12  Jeremy Jones  <jeremyj@apple.com>
1824
1825         Add objc version of WK2 UIPageClient setHasVideoInPictureInPicture and rename it to hasVideoInPictureInPictureDidChange.
1826         https://bugs.webkit.org/show_bug.cgi?id=172048
1827         rdar://problem/32163054
1828
1829         Reviewed by Simon Fraser.
1830
1831         Rename UIPageClient setHasVideoInPictureInPicture to hasVideoInPictureInPictureDidChange.
1832         Add missing _allowsPictureInPictureMediaPlayback property to WKPreferences.
1833         Add -hasVideoInPictureInPictureDidChange to UIDelegate.
1834
1835         * UIProcess/API/APIUIClient.h:
1836         (API::UIClient::hasVideoInPictureInPictureDidChange):
1837         * UIProcess/API/C/WKPage.cpp:
1838         (WKPageSetPageUIClient):
1839         * UIProcess/API/C/WKPageUIClient.h:
1840         * UIProcess/API/Cocoa/WKPreferences.mm:
1841         (-[WKPreferences _allowsPictureInPictureMediaPlayback]):
1842         (-[WKPreferences _setAllowsPictureInPictureMediaPlayback:]):
1843         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1844         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1845         * UIProcess/Cocoa/UIDelegate.h:
1846         * UIProcess/Cocoa/UIDelegate.mm:
1847         (WebKit::UIDelegate::setDelegate):
1848         (WebKit::UIDelegate::UIClient::hasVideoInPictureInPictureDidChange):
1849         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
1850         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
1851         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
1852
1853 2017-05-12  David Quesada  <david_quesada@apple.com>
1854
1855         Add SPI for overriding WKWebView's clipping behavior for _visibleContentRect
1856         https://bugs.webkit.org/show_bug.cgi?id=172000
1857         rdar://problem/32144756
1858
1859         Reviewed by Simon Fraser.
1860
1861         Extract -[WKWebView _visibleContentRect]'s use of -_scroller to a new property
1862         _enclosingViewForExposedRectComputation, which is declared in the private
1863         header for subclasses to implement custom logic for determining the view to
1864         clip rendering to.
1865
1866         * UIProcess/API/Cocoa/WKWebView.mm:
1867         (-[WKWebView _enclosingViewForExposedRectComputation]):
1868         (-[WKWebView _visibleRectInEnclosingView:]):
1869         (-[WKWebView _visibleContentRect]):
1870         (-[WKWebView _visibleRectInEnclosingScrollView:]): Deleted.
1871         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1872
1873 2017-05-12  Chris Dumez  <cdumez@apple.com>
1874
1875         Stop using PassRefPtr under WebKit2/UIProcess
1876         https://bugs.webkit.org/show_bug.cgi?id=172029
1877
1878         Reviewed by Alex Christensen.
1879
1880         * UIProcess/API/Cocoa/WKWebView.mm:
1881         (-[WKWebView _takeViewSnapshot]):
1882         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1883         * UIProcess/API/gtk/PageClientImpl.cpp:
1884         (WebKit::PageClientImpl::registerEditCommand):
1885         * UIProcess/API/gtk/PageClientImpl.h:
1886         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
1887         (getIconSurfaceSynchronously):
1888         * UIProcess/API/gtk/WebKitWebContext.cpp:
1889         * UIProcess/API/wpe/PageClientImpl.cpp:
1890         (WebKit::PageClientImpl::registerEditCommand):
1891         * UIProcess/API/wpe/PageClientImpl.h:
1892         * UIProcess/Cocoa/WebViewImpl.h:
1893         * UIProcess/Cocoa/WebViewImpl.mm:
1894         (WebKit::WebViewImpl::registerEditCommand):
1895         * UIProcess/DefaultUndoController.cpp:
1896         (WebKit::DefaultUndoController::registerEditCommand):
1897         * UIProcess/DefaultUndoController.h:
1898         * UIProcess/Downloads/DownloadProxy.cpp:
1899         (WebKit::DownloadProxy::create):
1900         * UIProcess/Downloads/DownloadProxy.h:
1901         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
1902         (WebKit::GeolocationPermissionRequestManagerProxy::createRequest):
1903         * UIProcess/GeolocationPermissionRequestManagerProxy.h:
1904         * UIProcess/InspectorServer/HTTPRequest.cpp:
1905         (WebKit::HTTPRequest::parseHTTPRequestFromBuffer):
1906         * UIProcess/InspectorServer/HTTPRequest.h:
1907         * UIProcess/InspectorServer/WebInspectorServer.cpp:
1908         (WebKit::WebInspectorServer::didReceiveUnrecognizedHTTPRequest):
1909         (WebKit::WebInspectorServer::didReceiveWebSocketUpgradeHTTPRequest):
1910         (WebKit::WebInspectorServer::didEstablishWebSocketConnection):
1911         * UIProcess/InspectorServer/WebInspectorServer.h:
1912         * UIProcess/InspectorServer/WebSocketServerClient.h:
1913         (WebKit::WebSocketServerClient::didReceiveUnrecognizedHTTPRequest):
1914         (WebKit::WebSocketServerClient::didReceiveWebSocketUpgradeHTTPRequest):
1915         (WebKit::WebSocketServerClient::didEstablishWebSocketConnection):
1916         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
1917         (WebKit::WebSocketServerConnection::readHTTPMessage):
1918         (WebKit::WebSocketServerConnection::upgradeToWebSocketServerConnection):
1919         * UIProcess/InspectorServer/WebSocketServerConnection.h:
1920         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp:
1921         (WebKit::NotificationPermissionRequestManagerProxy::createRequest):
1922         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h:
1923         * UIProcess/Notifications/WebNotificationProvider.cpp:
1924         (WebKit::WebNotificationProvider::notificationPermissions):
1925         * UIProcess/Notifications/WebNotificationProvider.h:
1926         * UIProcess/PageClient.h:
1927         * UIProcess/Storage/LocalStorageDatabase.cpp:
1928         * UIProcess/WebContextMenuListenerProxy.h:
1929         * UIProcess/WebCookieManagerProxy.h:
1930         * UIProcess/WebEditCommandProxy.cpp:
1931         (WebKit::WebEditCommandProxy::unapply):
1932         (WebKit::WebEditCommandProxy::reapply):
1933         * UIProcess/WebEditCommandProxy.h:
1934         * UIProcess/WebGrammarDetail.cpp:
1935         (WebKit::WebGrammarDetail::create):
1936         * UIProcess/WebGrammarDetail.h:
1937         * UIProcess/WebPageProxy.cpp:
1938         (WebKit::ExceededDatabaseQuotaRecords::createRecord):
1939         (WebKit::WebPageProxy::registerEditCommand):
1940         (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
1941         (WebKit::WebPageProxy::exceededDatabaseQuota):
1942         (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
1943         (WebKit::WebPageProxy::takeViewSnapshot):
1944         * UIProcess/WebPageProxy.h:
1945         * UIProcess/WebProcessPool.cpp:
1946         (WebKit::WebProcessPool::plugInAutoStartOriginHashes):
1947         * UIProcess/WebProcessPool.h:
1948         * UIProcess/WebProcessProxy.h:
1949         * UIProcess/ios/PageClientImplIOS.h:
1950         * UIProcess/ios/PageClientImplIOS.mm:
1951         (-[WKEditCommandObjC initWithWebEditCommandProxy:]):
1952         (WebKit::PageClientImpl::registerEditCommand):
1953         (WebKit::PageClientImpl::saveImageToLibrary):
1954         (WebKit::PageClientImpl::setDragImage):
1955         (WebKit::PageClientImpl::takeViewSnapshot):
1956         * UIProcess/ios/WKGeolocationProviderIOS.mm:
1957         (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
1958         * UIProcess/ios/WebPageProxyIOS.mm:
1959         (WebKit::WebPageProxy::saveImageToLibrary):
1960         * UIProcess/mac/PageClientImpl.h:
1961         * UIProcess/mac/PageClientImpl.mm:
1962         (WebKit::PageClientImpl::registerEditCommand):
1963         (WebKit::PageClientImpl::setDragImage):
1964         (WebKit::PageClientImpl::setPromisedDataForImage):
1965         (WebKit::PageClientImpl::takeViewSnapshot):
1966         * UIProcess/mac/WKImmediateActionController.mm:
1967         (-[WKImmediateActionController _webHitTestResult]):
1968         * UIProcess/mac/WebPageProxyMac.mm:
1969         (WebKit::WebPageProxy::setDragImage):
1970         (WebKit::WebPageProxy::setPromisedDataForImage):
1971         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
1972
1973 2017-05-12  Jeremy Jones  <jeremyj@apple.com>
1974
1975         Add UIClient callback for when picture-in-picture is activated.
1976         https://bugs.webkit.org/show_bug.cgi?id=172023
1977
1978         Reviewed by Simon Fraser.
1979
1980         Add WKUIPageClientV10 with setHasVideoInPictureInPicture.
1981
1982         * UIProcess/API/APIUIClient.h:
1983         (API::UIClient::setHasVideoInPictureInPicture):
1984         * UIProcess/API/C/WKPage.cpp:
1985         (WKPageSetPageUIClient):
1986         * UIProcess/API/C/WKPageUIClient.h:
1987         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
1988         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
1989         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
1990
1991 2017-05-12  Brent Fulgham  <bfulgham@apple.com>
1992
1993         REGRESSION(r213564): Flash audio playback failures
1994         https://bugs.webkit.org/show_bug.cgi?id=171876
1995         <rdar://problem/32082745>
1996
1997         Reviewed by Alexey Proskuryakov.
1998
1999         The IOKit property filters added in r213564 need to be expanded to support
2000         some Flash features.
2001
2002         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2003
2004 2017-05-12  Brent Fulgham  <bfulgham@apple.com>
2005
2006         [WK2][macOS] Add a mach-lookup exception for 'com.apple.analyticsd'
2007         https://bugs.webkit.org/show_bug.cgi?id=172040
2008         <rdar://problem/31765514>
2009
2010         Reviewed by Alexey Proskuryakov.
2011
2012         * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
2013         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2014         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2015         * WebProcess/com.apple.WebProcess.sb.in:
2016
2017 2017-05-12  Simon Fraser  <simon.fraser@apple.com>
2018
2019         Add some logging for layer tree commits, and resize and orientation change events
2020         https://bugs.webkit.org/show_bug.cgi?id=172041
2021
2022         Reviewed by Tim Horton.
2023
2024         Add some logging that's useful during rotation investigations.
2025
2026         * UIProcess/API/Cocoa/WKWebView.mm:
2027         (-[WKWebView _didCommitLayerTree:]):
2028         * UIProcess/ios/WKContentView.mm:
2029         (-[WKContentView _didCommitLayerTree:]):
2030
2031 2017-05-12  Andy Estes  <aestes@apple.com>
2032
2033         [Cocoa] Stop setting a status on PKPaymentRequestShippingContactUpdate when there are errors
2034         https://bugs.webkit.org/show_bug.cgi?id=172036
2035         <rdar://problem/31587957>
2036
2037         Reviewed by Anders Carlsson.
2038
2039         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2040         (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
2041
2042 2017-05-12  Chris Dumez  <cdumez@apple.com>
2043
2044         Stop using PassRefPtr under WebKit2/Shared
2045         https://bugs.webkit.org/show_bug.cgi?id=172017
2046
2047         Reviewed by Antti Koivisto.
2048
2049         * Shared/API/APIDictionary.cpp:
2050         (API::Dictionary::add):
2051         (API::Dictionary::set):
2052         * Shared/API/APIDictionary.h:
2053         * Shared/API/APISecurityOrigin.h:
2054         (API::SecurityOrigin::createFromString):
2055         (API::SecurityOrigin::create):
2056         (API::SecurityOrigin::securityOrigin):
2057         (API::SecurityOrigin::SecurityOrigin):
2058         * Shared/API/APISerializedScriptValue.h:
2059         (API::SerializedScriptValue::create):
2060         (API::SerializedScriptValue::SerializedScriptValue):
2061         * Shared/API/c/WKSharedAPICast.h:
2062         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
2063         * Shared/APIWebArchiveResource.h:
2064         * Shared/APIWebArchiveResource.mm:
2065         (API::WebArchiveResource::create):
2066         (API::WebArchiveResource::WebArchiveResource):
2067         * Shared/AsyncRequest.h:
2068         (WebKit::AsyncRequestMap::add):
2069         * Shared/BlobDataFileReferenceWithSandboxExtension.cpp:
2070         (WebKit::BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension):
2071         * Shared/BlobDataFileReferenceWithSandboxExtension.h:
2072         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
2073         (WebKit::CoordinatedBackingStoreTile::setBackBuffer):
2074         (WebKit::CoordinatedBackingStore::updateTile):
2075         * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
2076         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2077         (WebKit::CoordinatedGraphicsScene::createUpdateAtlas):
2078         (WebKit::CoordinatedGraphicsScene::updateImageBacking):
2079         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2080         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
2081         (WebKit::NetscapePluginModule::getOrCreate):
2082         * Shared/Plugins/Netscape/NetscapePluginModule.h:
2083         * Shared/VisitedLinkTable.cpp:
2084         (WebKit::VisitedLinkTable::setSharedMemory):
2085         * Shared/VisitedLinkTable.h:
2086         * Shared/WebBackForwardListItem.h:
2087         (WebKit::WebBackForwardListItem::setSnapshot):
2088         * Shared/WebContextMenuItem.cpp:
2089         (WebKit::WebContextMenuItem::create):
2090         * Shared/WebContextMenuItem.h:
2091         * Shared/WebGeolocationPosition.h:
2092         * Shared/WebRenderLayer.cpp:
2093         (WebKit::WebRenderLayer::create):
2094         (WebKit::WebRenderLayer::createArrayFromLayerList):
2095         (WebKit::WebRenderLayer::WebRenderLayer):
2096         * Shared/WebRenderLayer.h:
2097         * Shared/WebRenderObject.cpp:
2098         (WebKit::WebRenderObject::create):
2099         (WebKit::WebRenderObject::WebRenderObject):
2100         * Shared/WebRenderObject.h:
2101         * UIProcess/VisitedLinkStore.cpp:
2102         (WebKit::VisitedLinkStore::resizeTable):
2103         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2104         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
2105
2106 2017-05-11  Brady Eidson  <beidson@apple.com>
2107
2108         [WKWebsiteDataStore removeDataOfTypes:...] doesn't work for IndexedDB if the data store has a custom IDB path.
2109         <rdar://problem/30612463> and https://bugs.webkit.org/show_bug.cgi?id=171994
2110
2111         Reviewed by Andy Estes.
2112         Informal review by Maureen Daum.
2113
2114         * DatabaseProcess/DatabaseProcess.cpp:
2115         (WebKit::DatabaseProcess::deleteWebsiteData): Instead of accessing the m_idbServers set directly, make
2116           the method call that creates the server on demand.
2117         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins): Ditto.
2118
2119         * UIProcess/WebProcessPool.cpp:
2120         (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Not only create the DatabaseProcess if necessary,
2121           but also notify it about the passed-in WebsiteDataStore.
2122         (WebKit::WebProcessPool::getDatabaseProcessConnection):
2123         (WebKit::WebProcessPool::ensureDatabaseProcess): Deleted.
2124         * UIProcess/WebProcessPool.h:
2125         (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary):
2126
2127         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2128         (WebKit::WebsiteDataStore::fetchData):
2129         (WebKit::WebsiteDataStore::removeData):
2130         (WebKit::WebsiteDataStore::databaseProcessParameters):
2131
2132 2017-05-11  Dean Jackson  <dino@apple.com>
2133
2134         Modern Media Controls shouldn't be an experimental feature
2135         https://bugs.webkit.org/show_bug.cgi?id=172004
2136         <rdar://problem/32146522>
2137
2138         Reviewed by Simon Fraser.
2139
2140         This is either always on or always off, so shouldn't
2141         show up in an Experimental Features menu.
2142
2143         * Shared/WebPreferencesDefinitions.h: Move ModernMediaControlsEnabled
2144         to a normal preference.
2145
2146 2017-05-11  Tim Horton  <timothy_horton@apple.com>
2147
2148         Mail spins launching spell checker when typing
2149         https://bugs.webkit.org/show_bug.cgi?id=171986
2150         <rdar://problem/26305327>
2151
2152         Reviewed by Beth Dakin.
2153
2154         * UIProcess/API/Cocoa/WKWebView.mm:
2155         (-[WKWebView _setEditable:]):
2156         * UIProcess/Cocoa/WebViewImpl.h:
2157         * UIProcess/Cocoa/WebViewImpl.mm:
2158         (WebKit::WebViewImpl::didBecomeEditable):
2159         (WebKit::WebViewImpl::startObservingFontPanel): Deleted.
2160         Asynchronously pre-warm the spell checker when a WKWebView becomes editable.
2161
2162 2017-05-11  Chris Dumez  <cdumez@apple.com>
2163
2164         Stop using PassRefPtr in platform/graphics
2165         https://bugs.webkit.org/show_bug.cgi?id=171977
2166
2167         Reviewed by Alex Christensen.
2168
2169         Build fix.
2170
2171         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2172         (WebKit::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
2173         (WebKit::CoordinatedGraphicsScene::removeBackingStoreIfNeeded):
2174         * Shared/WebCoreArgumentCoders.cpp:
2175         (IPC::ArgumentCoder<Cursor>::decode):
2176         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
2177         (WebKit::CompositingCoordinator::createImageBackingIfNeeded):
2178         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
2179         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
2180         (WebKit::GraphicsLayerCARemote::createPlatformCALayer):
2181         (WebKit::GraphicsLayerCARemote::createPlatformCAAnimation):
2182         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2183         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2184         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2185         (WebKit::PlatformCAAnimationRemote::copy):
2186
2187 2017-05-11  Tim Horton  <timothy_horton@apple.com>
2188
2189         Data loss when saving a PDF form where only radio buttons/checkboxes were modified
2190         https://bugs.webkit.org/show_bug.cgi?id=171991
2191         <rdar://problem/32115945>
2192
2193         Reviewed by Andy Estes.
2194
2195         * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
2196         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2197         (-[WKPDFLayerControllerDelegate didChangeAnnotationState]):
2198         Mark the PDF as dirty (so we re-encode it when asked to save) if annotations
2199         that only PDFKit knows about change.
2200
2201 2017-05-11  Joseph Pecoraro  <pecoraro@apple.com>
2202
2203         Remove Vibration API
2204         https://bugs.webkit.org/show_bug.cgi?id=171766
2205
2206         Rubber-stamped by Alexey Proskuryakov.
2207
2208         * CMakeLists.txt:
2209         * Shared/API/APIObject.h:
2210         * Shared/API/c/WKBase.h:
2211         * UIProcess/API/C/WKAPICast.h:
2212         * UIProcess/API/C/WKPage.cpp:
2213         (WKPageGetVibration): Deleted.
2214         * UIProcess/API/C/WKPage.h:
2215         * UIProcess/API/C/WKVibration.cpp: Removed.
2216         * UIProcess/API/C/WKVibration.h: Removed.
2217         * UIProcess/WebPageProxy.cpp:
2218         (WebKit::m_weakPtrFactory):
2219         (WebKit::WebPageProxy::resetState):
2220         * UIProcess/WebPageProxy.h:
2221         (WebKit::WebPageProxy::vibration): Deleted.
2222         * UIProcess/WebVibrationProvider.cpp: Removed.
2223         * UIProcess/WebVibrationProvider.h: Removed.
2224         * UIProcess/WebVibrationProxy.cpp: Removed.
2225         * UIProcess/WebVibrationProxy.h: Removed.
2226         * UIProcess/WebVibrationProxy.messages.in: Removed.
2227         * WebProcess/WebCoreSupport/WebVibrationClient.cpp: Removed.
2228         * WebProcess/WebCoreSupport/WebVibrationClient.h: Removed.
2229         * WebProcess/WebPage/WebPage.cpp:
2230
2231 2017-05-11  Andy Estes  <aestes@apple.com>
2232
2233         Fix a spelling mistake in ApplePayErrorCode
2234         https://bugs.webkit.org/show_bug.cgi?id=171981
2235         <rdar://problem/32136567>
2236
2237         Reviewed by Beth Dakin.
2238
2239         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2240         (WebKit::toPKPaymentErrorCode):
2241         (WebKit::toPKPaymentAuthorizationStatus):
2242
2243 2017-05-11  John Wilander  <wilander@apple.com>
2244
2245         Resource Load Statistics: Enable configuration through preferences
2246         https://bugs.webkit.org/show_bug.cgi?id=171949
2247         <rdar://problem/31894518>
2248
2249         Reviewed by Alex Christensen.
2250
2251         * Shared/WebPreferencesDefinitions.h:
2252             Added ResourceLoadStatisticsTimeToLiveUserInteraction,
2253             ResourceLoadStatisticsTimeToLiveCookiePartitionFree, and
2254             ResourceLoadStatisticsReducedTimestampResolution.
2255         * UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm: Added.
2256         (WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):
2257         * UIProcess/WebResourceLoadStatisticsManager.h:
2258         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2259         (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
2260             Now calls WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded().
2261         * WebKit2.xcodeproj/project.pbxproj:
2262
2263 2017-05-11  Claudio Saavedra  <csaavedra@igalia.com>
2264
2265         [GTK] Remove notifications guards from GTK API layer
2266         https://bugs.webkit.org/show_bug.cgi?id=170014
2267
2268         Reviewed by Michael Catanzaro.
2269
2270         ENABLE_NOTIFICATIONS in the GTK port is a private option and
2271         disabling it is unsupported, hence remove its guards from the GTK API
2272         layer.
2273
2274         * UIProcess/API/gtk/WebKitWebContext.cpp:
2275         (webkitWebContextConstructed):
2276
2277 2017-05-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2278
2279         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.17.2 release.
2280
2281         * gtk/NEWS: Add release notes for 2.17.2.
2282
2283 2017-05-11  Claudio Saavedra  <csaavedra@igalia.com>
2284
2285         [GTK] JavaScript prompt uses title of page to be loaded rather than title of current page
2286         https://bugs.webkit.org/show_bug.cgi?id=152690
2287
2288         Reviewed by Michael Catanzaro.
2289
2290         webkit_web_view_get_uri() returns the page to be loaded, use
2291         internal api for this.
2292         * UIProcess/API/gtk/WebKitWebView.cpp:
2293         (webkitWebViewCreateJavaScriptDialog):
2294
2295 2017-05-10  Tim Horton  <timothy_horton@apple.com>
2296
2297         Null deref in WebPage::dictionaryPopupInfoForRange
2298         https://bugs.webkit.org/show_bug.cgi?id=171959
2299         <rdar://problem/20886282>
2300
2301         Reviewed by Beth Dakin.
2302
2303         * WebProcess/WebPage/mac/WebPageMac.mm:
2304         (WebKit::WebPage::dictionaryPopupInfoForRange):
2305         Speculative fix for non-reproducible crash when the startContainer of
2306         the range is in an anonymous node.
2307
2308 2017-05-09  Sam Weinig  <sam@webkit.org>
2309
2310         Remove support for legacy Notifications
2311         https://bugs.webkit.org/show_bug.cgi?id=171487
2312
2313         Reviewed by Jon Lee.
2314
2315         * Configurations/FeatureDefines.xcconfig:
2316         * Shared/WebProcessCreationParameters.cpp:
2317         * Shared/WebProcessCreationParameters.h:
2318         * UIProcess/WebProcessPool.cpp:
2319         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2320         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2321         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
2322         * WebProcess/Notifications/WebNotificationManager.cpp:
2323         * WebProcess/Notifications/WebNotificationManager.h:
2324         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
2325         * WebProcess/WebCoreSupport/WebNotificationClient.h:
2326         * WebProcess/WebPage/WebPage.cpp:
2327         * WebProcess/WebProcess.cpp:
2328         Remove legacy notification specific code.
2329
2330 2017-05-10  Tim Horton  <timothy_horton@apple.com>
2331
2332         Add an experimental feature flag for viewport-fit
2333         https://bugs.webkit.org/show_bug.cgi?id=171948
2334         <rdar://problem/31995518>
2335
2336         Reviewed by Simon Fraser.
2337
2338         * Shared/WebPreferencesDefinitions.h:
2339         * WebProcess/WebPage/WebPage.cpp:
2340         (WebKit::WebPage::updatePreferences):
2341         Add an experimental feature flag.
2342
2343 2017-05-10  Alex Christensen  <achristensen@webkit.org>
2344
2345         Include headers in WebKit.h
2346         https://bugs.webkit.org/show_bug.cgi?id=171943
2347
2348         Reviewed by Dan Bernstein.
2349
2350         * Shared/API/Cocoa/WebKit.h:
2351
2352 2017-05-10  Timothy Horton  <timothy_horton@apple.com>
2353
2354         Disable block selection for dynamic selection granularity
2355         https://bugs.webkit.org/show_bug.cgi?id=171908
2356         <rdar://problem/32098024>
2357
2358         Reviewed by Enrica Casucci.
2359
2360         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2361         (-[WKWebViewConfiguration init]):
2362         (-[WKWebViewConfiguration copyWithZone:]):
2363         (-[WKWebViewConfiguration _allowsBlockSelection]):
2364         (-[WKWebViewConfiguration _setAllowsBlockSelection:]):
2365         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2366         Add a private configuration parameter to re-enable block selection.
2367
2368         * Shared/WebPageCreationParameters.cpp:
2369         (WebKit::WebPageCreationParameters::encode):
2370         (WebKit::WebPageCreationParameters::decode):
2371         * Shared/WebPageCreationParameters.h:
2372         * UIProcess/API/Cocoa/WKWebView.mm:
2373         (-[WKWebView _allowsBlockSelection]):
2374         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2375         * UIProcess/Cocoa/VersionChecks.h:
2376         * UIProcess/PageClient.h:
2377         * UIProcess/WebPageProxy.cpp:
2378         (WebKit::WebPageProxy::creationParameters):
2379         * UIProcess/ios/PageClientImplIOS.h:
2380         * UIProcess/ios/PageClientImplIOS.mm:
2381         (WebKit::PageClientImpl::allowsBlockSelection):
2382         * WebProcess/WebPage/WebPage.cpp:
2383         * WebProcess/WebPage/WebPage.h:
2384         Plumb allowsBlockSelection through from WKWebViewConfiguration to WebPage.
2385
2386         * UIProcess/ios/WKContentViewInteraction.mm:
2387         (-[WKContentView setupInteraction]):
2388         (-[WKContentView useSelectionAssistantWithGranularity:]):
2389         (-[WKContentView _startAssistingKeyboard]):
2390         (-[WKContentView _stopAssistingKeyboard]):
2391         (toUIWebSelectionMode): Deleted.
2392         (-[WKContentView useSelectionAssistantWithMode:]): Deleted.
2393         Stop needlessly converting to UIWebSelectionMode.
2394         
2395         * WebProcess/WebPage/ios/WebPageIOS.mm:
2396         (WebKit::WebPage::shouldSwitchToBlockModeForHandle):
2397         Don't switch to block selection unless allowsBlockSelection is set.
2398
2399 2017-05-10  Tim Horton  <timothy_horton@apple.com>
2400
2401         Add an experimental feature flag for constant properties
2402         https://bugs.webkit.org/show_bug.cgi?id=171913
2403         <rdar://problem/31995518>
2404
2405         Reviewed by Ryosuke Niwa.
2406
2407         * Shared/WebPreferencesDefinitions.h:
2408         * WebProcess/WebPage/WebPage.cpp:
2409         (WebKit::WebPage::updatePreferences):
2410         Add an experimental feature flag.
2411
2412 2017-05-09  Dean Jackson  <dino@apple.com>
2413
2414         Disable WebGL2 by default
2415         https://bugs.webkit.org/show_bug.cgi?id=171894
2416         <rdar://problem/32089917>
2417
2418         Reviewed by Tim Horton.
2419
2420         Some WASM and WebGL2 content is failing because it
2421         detects our WebGL2RenderingContext, but doesn't realise
2422         that we don't implement enough of it to be useful.
2423
2424         * Shared/WebPreferencesDefinitions.h:
2425
2426 2017-05-10  Matt Lewis  <jlewis3@apple.com>
2427
2428         Unreviewed, rolling out r216563.
2429
2430         Revision caused 2 api failures
2431
2432         Reverted changeset:
2433
2434         "[MediaStream] deviceId constraint doesn't work with
2435         getUserMedia"
2436         https://bugs.webkit.org/show_bug.cgi?id=171877
2437         http://trac.webkit.org/changeset/216563
2438
2439 2017-05-10  Claudio Saavedra  <csaavedra@igalia.com>
2440
2441         [GTK] HTTP authentication dialog should focus on first input field
2442         https://bugs.webkit.org/show_bug.cgi?id=151349
2443
2444         Reviewed by Michael Catanzaro.
2445
2446         Setting focus on a widget before it's mapped does nothing. Move
2447         the call to the right place.
2448
2449         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
2450         (webkitAuthenticationDialogInitialize):
2451         (webkitAuthenticationDialogMap):
2452
2453 2017-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
2454
2455         [GTK] -Wmissing-field-initializers triggered by RemoteInspectorServer.cpp:128
2456         https://bugs.webkit.org/show_bug.cgi?id=171273
2457
2458         Reviewed by Carlos Garcia Campos.
2459
2460         * UIProcess/glib/RemoteInspectorClient.cpp:
2461         (WebKit::RemoteInspectorClient::RemoteInspectorClient):
2462
2463 2017-05-09  Eric Carlson  <eric.carlson@apple.com>
2464
2465         [MediaStream] deviceId constraint doesn't work with getUserMedia
2466         https://bugs.webkit.org/show_bug.cgi?id=171877
2467         <rdar://problem/31899730>
2468
2469         Reviewed by Jer Noble.
2470
2471         * Shared/WebCoreArgumentCoders.cpp:
2472         (IPC::ArgumentCoder<MediaConstraintsData>::encode): Encode deviceIDHashSalt.
2473         (IPC::ArgumentCoder<MediaConstraintsData>::decode): Decode deviceIDHashSalt.
2474
2475         * UIProcess/UserMediaPermissionCheckProxy.cpp:
2476         (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): Initialize
2477         completion handler, frame ID, and security origins.
2478         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): Complete by calling
2479         completion handler because we now sometimes request access info before calling gUM.
2480         (WebKit::UserMediaPermissionCheckProxy::invalidate): Clear completion handler.
2481         * UIProcess/UserMediaPermissionCheckProxy.h:
2482
2483         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2484         (WebKit::FrameAuthorizationState::FrameAuthorizationState): Take security origins, not
2485         UserMediaPermissionRequestProxy, so it can be constructed with a UserMediaPermissionCheckProxy.
2486         (WebKit::FrameAuthorizationState::ensureSecurityOriginsAreEqual): Ditto. Clear has salt
2487         when origins don't match.
2488         (WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest): Templatize.
2489         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied): Fix typo.
2490         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Ditto.
2491         Don't set state for empty UIDs. Pass hash salt to web process.
2492         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2493         The device ID hash salt is now required to validate constraints, so get it first.
2494         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Helper
2495         method used to get the device ID hash salt.
2496         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Restructure
2497         to use getUserMediaPermissionInfo.
2498         (WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Deleted.
2499         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2500
2501         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2502         (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted): Add device ID
2503         hash salt parameter.
2504         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
2505
2506         * WebProcess/WebPage/WebPage.cpp:
2507         (WebKit::WebPage::userMediaAccessWasGranted): Ditto.
2508         * WebProcess/WebPage/WebPage.h:
2509         * WebProcess/WebPage/WebPage.messages.in:
2510
2511         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2512         (WebKit::UserMediaCaptureManager::createCaptureSource): Use new MediaConstraintsData 
2513         constructor.
2514
2515 2017-05-09  Alex Christensen  <achristensen@webkit.org>
2516
2517         Buffer media in NetworkProcess to reduce IPC overhead
2518         https://bugs.webkit.org/show_bug.cgi?id=171834
2519         <rdar://problem/31485485>
2520
2521         Reviewed by Jer Noble.
2522
2523         I have measured a significant CPU usage reduction when buffering media data in the NetworkProcess,
2524         especially on arm64 processors.  Buffering data in the NetworkProcess introduces no additional data
2525         copies after r215686, and it reduces the number of messages sent from the NetworkProcess to the WebProcess,
2526         each of which must also be forwarded to mediaserverd by AVFoundation.  This reduces the number of messages
2527         from thousands per second to a maximum of 20 per second.  This adds 1/20 second additional latency in
2528         media loading, which will probably not be noticed by most users.  This also adds the possibility of large
2529         allocations when decoding IPC messages in the WebProcess, and if that becomes the source of crashes we can
2530         add a maximum buffered amount in addition to a maximum buffered time, but we are likely not to receive
2531         so much data in 1/20 second to have problems allocating the buffer.
2532
2533         * WebProcess/Network/WebLoaderStrategy.cpp:
2534         (WebKit::maximumBufferingTime):
2535         Buffer data in the NetworkProcess for up to 50ms before sending it to the WebProcess in one message.
2536         This value is used in NetworkResourceLoader::didReceiveBuffer to append to m_bufferedData instead of
2537         sending the small chunks immediately.
2538
2539 2017-05-09  Commit Queue  <commit-queue@webkit.org>
2540
2541         Unreviewed, rolling out r216545.
2542         https://bugs.webkit.org/show_bug.cgi?id=171889
2543
2544         Caused a test failure (Requested by eric_carlson on #webkit).
2545
2546         Reverted changeset:
2547
2548         "[MediaStream] deviceId constraint doesn't work with
2549         getUserMedia"
2550         https://bugs.webkit.org/show_bug.cgi?id=171877
2551         http://trac.webkit.org/changeset/216545
2552
2553 2017-05-09  Eric Carlson  <eric.carlson@apple.com>
2554
2555         [MediaStream] deviceId constraint doesn't work with getUserMedia
2556         https://bugs.webkit.org/show_bug.cgi?id=171877
2557         <rdar://problem/31899730>
2558
2559         Reviewed by Jer Noble.
2560
2561         * Shared/WebCoreArgumentCoders.cpp:
2562         (IPC::ArgumentCoder<MediaConstraintsData>::encode): Encode deviceIDHashSalt.
2563         (IPC::ArgumentCoder<MediaConstraintsData>::decode): Decode deviceIDHashSalt.
2564
2565         * UIProcess/UserMediaPermissionCheckProxy.cpp:
2566         (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): Initialize
2567         completion handler, frame ID, and security origins.
2568         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): Complete by calling
2569         completion handler because we now sometimes request access info before calling gUM.
2570         (WebKit::UserMediaPermissionCheckProxy::invalidate): Clear completion handler.
2571         * UIProcess/UserMediaPermissionCheckProxy.h:
2572
2573         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2574         (WebKit::FrameAuthorizationState::FrameAuthorizationState): Take security origins, not
2575         UserMediaPermissionRequestProxy, so it can be constructed with a UserMediaPermissionCheckProxy.
2576         (WebKit::FrameAuthorizationState::ensureSecurityOriginsAreEqual): Ditto. Clear has salt
2577         when origins don't match.
2578         (WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest): Templatize.
2579         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied): Fix typo.
2580         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Ditto.
2581         Don't set state for empty UIDs. Pass hash salt to web process.
2582         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2583         The device ID hash salt is now required to validate constraints, so get it first.
2584         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Helper
2585         method used to get the device ID hash salt.
2586         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Restructure
2587         to use getUserMediaPermissionInfo.
2588         (WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Deleted.
2589         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2590
2591         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2592         (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted): Add device ID
2593         hash salt parameter.
2594         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
2595
2596         * WebProcess/WebPage/WebPage.cpp:
2597         (WebKit::WebPage::userMediaAccessWasGranted): Ditto.
2598         * WebProcess/WebPage/WebPage.h:
2599         * WebProcess/WebPage/WebPage.messages.in:
2600
2601         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2602         (WebKit::UserMediaCaptureManager::createCaptureSource): Use new MediaConstraintsData 
2603         constructor.
2604
2605 2017-05-10  Dean Jackson  <dino@apple.com>
2606
2607         Restrict SVG filters to accessible security origins
2608         https://bugs.webkit.org/show_bug.cgi?id=118689
2609         <rdar://problem/27362159>
2610
2611         Reviewed by Brent Fulgham.
2612
2613         Update parameter lists.
2614
2615         * WebProcess/Plugins/PluginView.cpp:
2616         (WebKit::PluginView::paint):
2617         * WebProcess/Plugins/PluginView.h:
2618
2619 2017-05-09  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
2620
2621         [Coordinated Graphics] Debug Visuals don't hide
2622         https://bugs.webkit.org/show_bug.cgi?id=162704
2623
2624         Reviewed by Žan Doberšek.
2625
2626         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2627         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
2628         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
2629         (IPC::ArgumentCoder<DebugVisuals>::encode):
2630         (IPC::ArgumentCoder<DebugVisuals>::decode):
2631         The encoder and decoder for DebugVisuals have been added.
2632
2633         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
2634         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2635         (WebKit::CoordinatedGraphicsScene::setLayerState):
2636         Update the debug visuals of a layer according to the DebugVisuals information
2637         if the debugVisualsChanged flag is set to true.
2638
2639 2017-05-09  Zan Dobersek  <zdobersek@igalia.com>
2640
2641         Upstream the WPE port
2642         https://bugs.webkit.org/show_bug.cgi?id=171110
2643
2644         Reviewed by Alex Christensen.
2645
2646         webkit-dev thread:
2647         https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html
2648
2649         Existing files changed to properly use PLATFORM(WPE) build guards or other
2650         WPE-specific additions (e.g. pasteboard support).
2651         In-file changes removed from this ChangeLog entry for brevity.
2652
2653         * Platform/IPC/glib/GSocketMonitor.cpp:
2654         * PlatformWPE.cmake: Added.
2655         * Scripts/generate-forwarding-headers.pl:
2656         * Shared/API/c/WKBase.h:
2657         * Shared/API/c/wpe/WKBaseWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2658         * Shared/API/c/wpe/WebKit.h: Added.
2659         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
2660         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
2661         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2662         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2663         * Shared/DrawingAreaInfo.h:
2664         * Shared/NativeWebKeyboardEvent.h:
2665         * Shared/NativeWebMouseEvent.h:
2666         * Shared/NativeWebTouchEvent.h:
2667         * Shared/NativeWebWheelEvent.h:
2668         * Shared/WebCoreArgumentCoders.cpp:
2669         * Shared/WebCoreArgumentCoders.h:
2670         * Shared/WebPreferencesDefinitions.h:
2671         * Shared/wpe/NativeWebKeyboardEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2672         * Shared/wpe/NativeWebMouseEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2673         * Shared/wpe/NativeWebTouchEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2674         * Shared/wpe/NativeWebWheelEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2675         * Shared/wpe/ProcessExecutablePathWPE.cpp: Added.
2676         * Shared/wpe/WebEventFactory.cpp: Added.
2677         * Shared/wpe/WebEventFactory.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2678         * UIProcess/API/C/WKAPICast.h:
2679         * UIProcess/API/C/wpe/WKAPICastWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2680         * UIProcess/API/C/wpe/WKView.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2681         * UIProcess/API/C/wpe/WKView.h: Copied from Source/WebKit2/Shared/NativeWebWheelEvent.h.
2682         * UIProcess/API/wpe/CompositingManagerProxy.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2683         * UIProcess/API/wpe/CompositingManagerProxy.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2684         * UIProcess/API/wpe/CompositingManagerProxy.messages.in: Added.
2685         * UIProcess/API/wpe/DrawingAreaProxyWPE.cpp: Added.
2686         * UIProcess/API/wpe/DrawingAreaProxyWPE.h: Copied from Source/WebKit2/Shared/NativeWebWheelEvent.h.
2687         * UIProcess/API/wpe/PageClientImpl.cpp: Added.
2688         * UIProcess/API/wpe/PageClientImpl.h: Added.
2689         * UIProcess/API/wpe/ScrollGestureController.cpp: Added.
2690         * UIProcess/API/wpe/ScrollGestureController.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2691         * UIProcess/API/wpe/WPEView.cpp: Added.
2692         * UIProcess/API/wpe/WPEView.h: Added.
2693         * UIProcess/API/wpe/WPEViewClient.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2694         * UIProcess/API/wpe/WPEViewClient.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2695         * UIProcess/API/wpe/WebKit2InspectorGResourceBundle.xml: Added.
2696         * UIProcess/ChildProcessProxy.cpp:
2697         * UIProcess/Launcher/ProcessLauncher.h:
2698         * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp: Added.
2699         * UIProcess/WebInspectorProxy.h:
2700         * UIProcess/WebPasteboardProxy.h:
2701         * UIProcess/WebPasteboardProxy.messages.in:
2702         * UIProcess/WebProcessPool.cpp:
2703         * UIProcess/wpe/TextCheckerWPE.cpp: Added.
2704         * UIProcess/wpe/WebInspectorProxyWPE.cpp: Added.
2705         * UIProcess/wpe/WebPageProxyWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2706         * UIProcess/wpe/WebPasteboardProxyWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2707         * UIProcess/wpe/WebPreferencesWPE.cpp: Copied from Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h.
2708         * UIProcess/wpe/WebProcessPoolWPE.cpp: Added.
2709         * WebKit2.xcodeproj/project.pbxproj:
2710         * WebKit2Prefix.h:
2711         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2712         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2713         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2714         * WebProcess/WebCoreSupport/wpe/WebContextMenuClientWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2715         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp: Added.
2716         * WebProcess/WebCoreSupport/wpe/WebPopupMenuWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2717         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
2718         * WebProcess/WebPage/DrawingArea.cpp:
2719         * WebProcess/WebPage/WebPage.cpp:
2720         * WebProcess/WebPage/WebPage.h:
2721         * WebProcess/WebPage/wpe/CompositingManager.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2722         * WebProcess/WebPage/wpe/CompositingManager.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2723         * WebProcess/WebPage/wpe/DrawingAreaWPE.cpp: Added.
2724         * WebProcess/WebPage/wpe/DrawingAreaWPE.h: Added.
2725         * WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2726         * WebProcess/WebPage/wpe/WebInspectorWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2727         * WebProcess/WebPage/wpe/WebPageWPE.cpp: Copied from Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h.
2728         * WebProcess/wpe/WebProcessMainWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
2729         * wpe/wpe-webkit.pc.in: Added.
2730
2731 2017-05-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2732
2733         [GTK] Building Webkit2Gtk without OpenGL fails.
2734         https://bugs.webkit.org/show_bug.cgi?id=170959
2735
2736         Reviewed by Žan Doberšek.
2737
2738         * UIProcess/gtk/HardwareAccelerationManager.cpp:
2739         (WebKit::HardwareAccelerationManager::HardwareAccelerationManager):
2740
2741 2017-05-08  Youenn Fablet  <youenn@apple.com>
2742
2743         Follow-up to bug 171710: use more references and reject if either audio or video source creation is failing
2744         https://bugs.webkit.org/show_bug.cgi?id=171824
2745
2746         Reviewed by Alex Christensen.
2747
2748         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
2749         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
2750
2751 2017-05-08  Brent Fulgham  <bfulgham@apple.com>
2752
2753         REGRESSION(r213564): Flash video playback failures
2754         https://bugs.webkit.org/show_bug.cgi?id=171840
2755         <rdar://problem/32041569>
2756
2757         Reviewed by Alexey Proskuryakov.
2758
2759         The sandbox restrictions added in r213564 to prevent access to unused iokit properties
2760         blocked some items needed for Flash video playback. This change relaxes the sandbox
2761         to allow this software to run properly.
2762
2763         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2764
2765 2017-05-08  Alex Christensen  <achristensen@webkit.org>
2766
2767         Reduce PassRefPtr use in WebKit2
2768         https://bugs.webkit.org/show_bug.cgi?id=171831
2769
2770         Reviewed by Chris Dumez.
2771
2772         * UIProcess/API/C/WKPageGroup.cpp:
2773         (WKPageGroupCreateWithIdentifier):
2774         * UIProcess/GenericCallback.h:
2775         (WebKit::GenericCallback::create):
2776         (WebKit::CallbackMap::put):
2777         * UIProcess/StatisticsRequest.cpp:
2778         (WebKit::StatisticsRequest::StatisticsRequest):
2779         * UIProcess/StatisticsRequest.h:
2780         (WebKit::StatisticsRequest::create):
2781         * UIProcess/TextChecker.h:
2782         * UIProcess/TextCheckerCompletion.cpp:
2783         (WebKit::TextCheckerCompletion::create):
2784         * UIProcess/TextCheckerCompletion.h:
2785         * UIProcess/WebColorPicker.h:
2786         (WebKit::WebColorPicker::create):
2787         * UIProcess/WebConnectionToWebProcess.cpp:
2788         (WebKit::WebConnectionToWebProcess::create):
2789         * UIProcess/WebConnectionToWebProcess.h:
2790         * UIProcess/WebContextInjectedBundleClient.cpp:
2791         (WebKit::WebContextInjectedBundleClient::getInjectedBundleInitializationUserData):
2792         * UIProcess/WebContextInjectedBundleClient.h:
2793         * UIProcess/WebContextMenuListenerProxy.h:
2794         (WebKit::WebContextMenuListenerProxy::create):
2795         * UIProcess/WebCookieManagerProxy.cpp:
2796         (WebKit::WebCookieManagerProxy::create):
2797         * UIProcess/WebCookieManagerProxy.h:
2798         * UIProcess/WebEditCommandProxy.h:
2799         (WebKit::WebEditCommandProxy::create):
2800         * UIProcess/WebFormSubmissionListenerProxy.h:
2801         (WebKit::WebFormSubmissionListenerProxy::create):
2802         * UIProcess/WebFrameListenerProxy.h:
2803         * UIProcess/WebFrameProxy.h:
2804         (WebKit::WebFrameProxy::create):
2805         * UIProcess/WebFullScreenManagerProxy.cpp:
2806         (WebKit::WebFullScreenManagerProxy::create):
2807         * UIProcess/WebFullScreenManagerProxy.h:
2808         * UIProcess/WebGeolocationManagerProxy.cpp:
2809         (WebKit::WebGeolocationManagerProxy::create):
2810         * UIProcess/WebGeolocationManagerProxy.h:
2811         * UIProcess/WebIconDatabase.cpp:
2812         (WebKit::WebIconDatabase::create):
2813         (WebKit::WebIconDatabase::iconDataForPageURL):
2814         * UIProcess/WebIconDatabase.h:
2815         * UIProcess/WebMediaSessionFocusManager.cpp:
2816         (WebKit::WebMediaSessionFocusManager::create):
2817         * UIProcess/WebMediaSessionFocusManager.h:
2818         * UIProcess/WebOpenPanelResultListenerProxy.h:
2819         (WebKit::WebOpenPanelResultListenerProxy::create):
2820         * UIProcess/WebPageGroup.cpp:
2821         (WebKit::WebPageGroup::create):
2822         * UIProcess/WebPageGroup.h:
2823         * UIProcess/WebPageProxy.cpp:
2824         (WebKit::WebPageProxy::forceRepaint):
2825         (WebKit::WebPageProxy::computePagesForPrinting):
2826         (WebKit::WebPageProxy::drawRectToImage):
2827         (WebKit::WebPageProxy::drawPagesToPDF):
2828         (WebKit::WebPageProxy::drawPagesForPrinting):
2829         (WebKit::WebPageProxy::callAfterNextPresentationUpdate):
2830         * UIProcess/WebPageProxy.h:
2831         * UIProcess/ios/TextCheckerIOS.mm:
2832         (WebKit::TextChecker::requestCheckingOfString):
2833         * UIProcess/mac/TextCheckerMac.mm:
2834         (WebKit::TextChecker::requestCheckingOfString):
2835         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2836         * UIProcess/mac/WKFullScreenWindowController.mm:
2837         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2838         * UIProcess/mac/WKPrintingView.mm:
2839         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
2840         (-[WKPrintingView _drawPreview:]):
2841         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2842         (WebKit::NetscapePlugin::loadURL):
2843         (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
2844         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2845         (WebKit::NetscapePluginStream::NetscapePluginStream):
2846         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
2847         (WebKit::NetscapePluginStream::create):
2848         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2849         (WebKit::toFormData):
2850
2851 2017-05-08  Youenn Fablet  <youenn@apple.com>
2852
2853         Add support for reading and writing settings from UIProcess audio capture
2854         https://bugs.webkit.org/show_bug.cgi?id=171633
2855
2856         Reviewed by Eric Carlson.
2857
2858         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
2859         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
2860         (WebKit::UserMediaCaptureManagerProxy::applyConstraints):
2861         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
2862         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
2863         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2864         (WebKit::UserMediaCaptureManager::Source::setSettings):
2865         (WebKit::UserMediaCaptureManager::Source::applyConstraintsSucceeded):
2866         (WebKit::UserMediaCaptureManager::Source::applyConstraintsFailed):
2867         (WebKit::UserMediaCaptureManager::createCaptureSource):
2868         (WebKit::UserMediaCaptureManager::sourceSettingsChanged):
2869         (WebKit::UserMediaCaptureManager::applyConstraints):
2870         (WebKit::UserMediaCaptureManager::applyConstraintsSucceeded):
2871         (WebKit::UserMediaCaptureManager::applyConstraintsFailed):
2872         (WebKit::UserMediaCaptureManager::Source::setMuted): Deleted.
2873         (WebKit::UserMediaCaptureManager::Source::setEnabled): Deleted.
2874         * WebProcess/cocoa/UserMediaCaptureManager.h:
2875         * WebProcess/cocoa/UserMediaCaptureManager.messages.in:
2876
2877 2017-05-08  Alex Christensen  <achristensen@webkit.org>
2878
2879         Reduce PassRefPtr use
2880         https://bugs.webkit.org/show_bug.cgi?id=171809
2881
2882         Reviewed by Chris Dumez.
2883
2884         * PluginProcess/PluginControllerProxy.cpp:
2885         (WebKit::PluginControllerProxy::setInitializationReply):
2886         * PluginProcess/PluginControllerProxy.h:
2887         * PluginProcess/WebProcessConnection.cpp:
2888         (WebKit::WebProcessConnection::destroyPlugin):
2889         (WebKit::WebProcessConnection::createPlugin):
2890         * PluginProcess/WebProcessConnection.h:
2891         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2892         (WebKit::WebChromeClient::runOpenPanel):
2893         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2894         (WebKit::WebEditorClient::registerUndoStep):
2895         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2896         (WebKit::VisitedLinkTableController::getOrCreate):
2897         * WebProcess/WebPage/VisitedLinkTableController.h:
2898         * WebProcess/WebPage/WebFrame.cpp:
2899         (WebKit::WebFrame::hitTest):
2900         (WebKit::WebFrame::createSelectionSnapshot):
2901         * WebProcess/WebPage/WebFrame.h:
2902         * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
2903         (WebKit::WebOpenPanelResultListener::create):
2904         (WebKit::WebOpenPanelResultListener::WebOpenPanelResultListener):
2905         * WebProcess/WebPage/WebOpenPanelResultListener.h:
2906         * WebProcess/WebPage/WebPage.cpp:
2907         (WebKit::WebPage::unapplyEditCommand):
2908         (WebKit::WebPage::reapplyEditCommand):
2909         * WebProcess/WebPage/WebPageGroupProxy.cpp:
2910         (WebKit::WebPageGroupProxy::create):
2911         * WebProcess/WebPage/WebPageGroupProxy.h:
2912         * WebProcess/WebPage/WebUndoStep.cpp:
2913         (WebKit::WebUndoStep::create):
2914         * WebProcess/WebPage/WebUndoStep.h:
2915         (WebKit::WebUndoStep::step):
2916         (WebKit::WebUndoStep::WebUndoStep):
2917         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2918         (WebKit::PlatformCALayerRemote::create):
2919         (WebKit::PlatformCALayerRemote::clone):
2920         (WebKit::PlatformCALayerRemote::animationForKey):
2921         (WebKit::PlatformCALayerRemote::createCompatibleLayer):
2922         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2923         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
2924         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
2925         (WebKit::PlatformCALayerRemoteCustom::create):
2926         (WebKit::PlatformCALayerRemoteCustom::clone):
2927
2928 2017-05-08  Jer Noble  <jer.noble@apple.com>
2929
2930         [Mac] Audio capture fails when shouldCaptureAudioInUIProcess is set.
2931         https://bugs.webkit.org/show_bug.cgi?id=171710
2932
2933         Reviewed by Eric Carlson.
2934
2935         RealtimeMediaSourceCenterMac's setUseAVFoundationAudioCapture() is now accessed via a singleton.
2936
2937         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2938         (WebKit::UserMediaPermissionRequestManagerProxy::syncWithWebCorePrefs):
2939
2940 2017-05-08  Andy Estes  <aestes@apple.com>
2941
2942         [macOS] com.macromedia.Flash Player ESR.plugin.sb is installed outside of PlugInSandboxProfiles
2943         https://bugs.webkit.org/show_bug.cgi?id=171774
2944
2945         Reviewed by Dan Bernstein.
2946
2947         * WebKit2.xcodeproj/project.pbxproj:
2948
2949 2017-05-08  Youenn Fablet  <youenn@apple.com>
2950
2951         Clean UserMediaCaptureManager::capabilities return value
2952         https://bugs.webkit.org/show_bug.cgi?id=171808
2953
2954         Reviewed by Eric Carlson.
2955
2956         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2957         (WebKit::UserMediaCaptureManager::capabilities):
2958         * WebProcess/cocoa/UserMediaCaptureManager.h:
2959
2960 2017-05-08  Chris Dumez  <cdumez@apple.com>
2961
2962         Move 'style' from Element to HTMLElement / SVGElement and make it settable
2963         https://bugs.webkit.org/show_bug.cgi?id=171795
2964
2965         Reviewed by Alex Christensen.
2966
2967         Build fix.
2968
2969         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2970         (WebKit::WebEditorClient::shouldApplyStyle):
2971
2972 2017-05-07  Simon Fraser  <simon.fraser@apple.com>
2973
2974         [iOS] REGRESSION (r209409): getBoundingClientRect is wrong for fixed-position elements in resize/orientationchange
2975         https://bugs.webkit.org/show_bug.cgi?id=171140
2976         rdar://problem/31765167
2977
2978         Reviewed by Sam Weinig.
2979
2980         WebPage::dynamicViewportSizeUpdate() is called during rotation, and does a layout which needs to have
2981         an up-to-date layout viewport, since the layout viewport state is detectable in orientationchange and
2982         resize events via fetching the client rect of fixed elements. Normally we send in the layout viewport
2983         from the UI process, but in this case we need to compute one in the web process. So factor code
2984         into FrameView to do the computation, called from both places.
2985
2986         * UIProcess/WebPageProxy.h:
2987         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2988         (WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):
2989         * UIProcess/ios/WKContentView.mm:
2990         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
2991         * UIProcess/ios/WebPageProxyIOS.mm:
2992         (WebKit::WebPageProxy::computeCustomFixedPositionRect):
2993         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2994         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2995         * WebProcess/WebPage/ios/WebPageIOS.mm:
2996         (WebKit::WebPage::dynamicViewportSizeUpdate):
2997
2998 2017-05-07  Youenn Fablet  <youenn@apple.com>
2999
3000         [MediaStream] r216197 caused some webrtc tests to fail
3001         https://bugs.webkit.org/show_bug.cgi?id=171728
3002
3003         Reviewed by Eric Carlson.
3004
3005         * UIProcess/UserMediaProcessManager.cpp:
3006         (WebKit::UserMediaProcessManager::willEnableMediaStreamInPage): Removing muting streams of the page requesting
3007         additional capture streams. This is now done in the WebProcess.
3008
3009 2017-05-07  Tim Horton  <timothy_horton@apple.com>
3010
3011         Clean up some WebProcessProxy, WebPage, and message handler includes
3012         https://bugs.webkit.org/show_bug.cgi?id=171791
3013
3014         Reviewed by Sam Weinig.
3015
3016         This is worth another ~10% off WebKit2 clean build time on Mac.
3017         This time, the most impactful change is the removal of
3018         UserMediaPermissionRequestManager.h from WebPage.h, which completely
3019         eradicates JSC's VM.h (which is enormous) from WebPage.h (at least on Mac).
3020
3021         * Scripts/webkit/messages.py:
3022         (headers_for_type):
3023         Stop specializing CompositionUnderline now that it has its own file.
3024
3025         * Shared/API/c/WKDeprecatedFunctions.cpp:
3026         * Shared/WebCoreArgumentCoders.cpp:
3027         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
3028         * UIProcess/Gamepad/UIGamepadProvider.cpp:
3029         * UIProcess/HiddenPageThrottlingAutoIncreasesCounter.h: Added.
3030         * UIProcess/HighPerformanceGraphicsUsageSampler.cpp:
3031         * UIProcess/Network/NetworkProcessProxy.cpp:
3032         * UIProcess/PerActivityStateCPUUsageSampler.cpp:
3033         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
3034         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3035         (WebKit::toWebCore):
3036         * UIProcess/VisibleWebPageCounter.h: Added.
3037         * UIProcess/VisitedLinkStore.h:
3038         * UIProcess/WebPageGroup.h:
3039         * UIProcess/WebPageProxy.h:
3040         * UIProcess/WebProcessLifetimeTracker.cpp:
3041         * UIProcess/WebProcessPool.h:
3042         * UIProcess/WebProcessProxy.h:
3043         Remove WebPageProxy and forward-declare a whole bunch of things.
3044
3045         * WebKit2.xcodeproj/project.pbxproj:
3046         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
3047         * WebProcess/WebPage/WebPage.cpp:
3048         (WebKit::WebPage::userMediaAccessWasGranted):
3049         (WebKit::WebPage::userMediaAccessWasDenied):
3050         (WebKit::WebPage::didCompleteMediaDeviceEnumeration):
3051         (WebKit::WebPage::grantUserMediaDeviceSandboxExtensions):
3052         (WebKit::WebPage::revokeUserMediaDeviceSandboxExtensions):
3053         * WebProcess/WebPage/WebPage.h:
3054         (WebKit::WebPage::userMediaPermissionRequestManager):
3055         * WebProcess/WebPage/ios/FindControllerIOS.mm:
3056         * WebProcess/WebPage/ios/WebPageIOS.mm:
3057         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
3058         (WebKit::RemoteLayerTreeContext::deviceScaleFactor): Deleted.
3059         (WebKit::RemoteLayerTreeContext::layerHostingMode): Deleted.
3060         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
3061         (WebKit::RemoteLayerTreeContext::deviceScaleFactor):
3062         (WebKit::RemoteLayerTreeContext::layerHostingMode):
3063
3064 2017-05-06  Chris Dumez  <cdumez@apple.com>
3065
3066         Align our IDL files with the latest DOM specification
3067         https://bugs.webkit.org/show_bug.cgi?id=171777
3068
3069         Reviewed by Sam Weinig.
3070
3071         GTK build fix.
3072
3073         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
3074         (webkit_dom_document_get_ready_state):
3075
3076 2017-05-06  Tim Horton  <timothy_horton@apple.com>
3077
3078         Reduce the number of includes in WebPage.h and WebProcess.h
3079         https://bugs.webkit.org/show_bug.cgi?id=171779
3080
3081         Reviewed by Sam Weinig.
3082
3083         * WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
3084         * WebProcess/Network/NetworkProcessConnection.cpp:
3085         * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
3086         * WebProcess/Network/webrtc/LibWebRTCResolver.cpp:
3087         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3088         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3089         * WebProcess/WebPage/FindController.cpp:
3090         * WebProcess/WebPage/WebFrame.cpp:
3091         * WebProcess/WebPage/WebPage.cpp:
3092         (WebKit::WebPage::disableEnumeratingAllNetworkInterfaces):
3093         (WebKit::WebPage::enableEnumeratingAllNetworkInterfaces):
3094         (WebKit::WebPage::didReceivePolicyDecision):
3095         * WebProcess/WebPage/WebPage.h:
3096         (WebKit::WebPage::disableEnumeratingAllNetworkInterfaces): Deleted.
3097         (WebKit::WebPage::enableEnumeratingAllNetworkInterfaces): Deleted.
3098         * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
3099         * WebProcess/WebProcess.cpp:
3100         * WebProcess/WebProcess.h:
3101         In my measurement, this improves WebKit2 debug clean build time by
3102         ~10% for Mac and ~5% for iOS. The most valuable change is the one to
3103         remove LibWebRTC headers..
3104
3105 2017-05-06  Alexey Proskuryakov  <ap@apple.com>
3106
3107         REGRESSION (r216294): The new test fails on WebKit1
3108         https://bugs.webkit.org/show_bug.cgi?id=171780
3109
3110         Rolling back https://trac.webkit.org/r216294, https://trac.webkit.org/r216296,
3111         https://trac.webkit.org/216299, https://trac.webkit.org/216330
3112
3113         * WebProcess/Plugins/PluginView.cpp:
3114         (WebKit::PluginView::paint):
3115         * WebProcess/Plugins/PluginView.h:
3116
3117 2017-05-06  Simon Fraser  <simon.fraser@apple.com>
3118
3119         [iOS WK2] Make rotation tests more reliable
3120         https://bugs.webkit.org/show_bug.cgi?id=171778
3121
3122         Reviewed by Tim Horton.
3123
3124         Switching between "safari-style" rotation and normal rotation left state on the WKWebView
3125         that would cause later viewport-sensitive tests to fail. The WKWebView would be left
3126         with override layout parameters, and an override orientation, and these caused viewport
3127         size to leak into later tests, and WebCore orientation to not get reset correctly.
3128
3129         Also, WKWebView was unregistering for UIWindowDidRotateNotification notifications when
3130         an override orientation was set, and would never re-register, causing lost orientationchanged
3131         events.
3132
3133         Fix by exposing WKWebView SPI to clear the various bits of overide state. Also don't unregister
3134         from the UIWindowDidRotateNotification notification; it's already ignored anyway if it fires.
3135
3136         Also wait for a visible content rect update after resizing the WKWebVeiw between tests, to make sure
3137         the WebProcess is caught up before proceeding with the test.
3138
3139         * UIProcess/API/Cocoa/WKWebView.mm:
3140         (-[WKWebView _setInterfaceOrientationOverride:]):
3141         (-[WKWebView _clearInterfaceOrientationOverride]):
3142         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3143         (-[WKWebView _clearOverrideLayoutParameters]):
3144         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3145
3146 2017-05-06  Konstantin Tokarev  <annulen@yandex.ru>
3147
3148         Remove unused lambda capture
3149         https://bugs.webkit.org/show_bug.cgi?id=171772
3150
3151         Reviewed by Yusuke Suzuki.
3152
3153         * DatabaseProcess/DatabaseProcess.cpp:
3154         (WebKit::DatabaseProcess::fetchWebsiteData):
3155
3156 2017-05-06  David Kilzer  <ddkilzer@apple.com>
3157
3158         messages_unittest.py should support a [-r|--reset-results] switch
3159         <https://webkit.org/b/171627>
3160
3161         Reviewed by Daniel Bates.
3162
3163         This change adds support for a [-r|--reset-results] switch when
3164         running messages_unittest.py to make it easy to update the
3165         expected file results.
3166
3167         This also cleans up a lot of duplicate code in
3168         messages_unittest.py by extracting common code into new methods
3169         and by pushing code down into methods where it's actually used.
3170
3171         * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
3172         * Scripts/webkit/LegacyMessages-expected.h:
3173         * Scripts/webkit/MessageReceiver-expected.cpp:
3174         * Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
3175         * Scripts/webkit/Messages-expected.h:
3176         * Scripts/webkit/MessagesSuperclass-expected.h:
3177         - Update expected files using the new --reset-results switch.
3178
3179         * Scripts/webkit/messages_unittest.py:
3180         - Remove what appears to be a debugging print statement.
3181         - Replace the code that reads in expected files with variables
3182           that contain the expected file names.  The code to read in the
3183           contents moved into
3184           GeneratedFileContentsTest.assertGeneratedFileContentsEqual().
3185         (ParsingTest.check_message):
3186         - Drive-by fix to change "!= None" to "is not None".
3187         (GeneratedFileContentsTest.assertGeneratedFileContentsEqual):
3188         - Add support for [-r|--reset-results] switch here.  This will
3189           write out updated expected file contents when the switch is
3190           used.
3191         - Push down most of the global code that reads in file contents
3192           into this method.
3193         - Change use of split('\n') into splitlines(False).
3194         (GeneratedFileContentsTest.assertHeaderEqual): Add.
3195         - Extracts common code from test_receiver_headers().
3196         (GeneratedFileContentsTest.assertImplementationEqual): Add.
3197         - Extracts common code from test_receiver_implementations().
3198         (HeaderTest):
3199         (HeaderTest.test_receiver_headers):
3200         - Rename from HeaderTest.test_header().
3201         - Simplify by calling assertHeaderEqual().
3202         (ReceiverImplementationTest):
3203         (ReceiverImplementationTest.test_receiver_implementations):
3204         - Rename from
3205           ReceiverImplementationTest.test_receiver_implementation().
3206         - Simplify by calling assertImplementationEqual().
3207         (add_reset_results_to_unittest_help): Add.
3208         - Inserts help text for [-r|--reset-results] switch.
3209         (parse_sys_argv): Add.
3210         - Parses [-r|--reset-results] switch, and then removes it from
3211           sys.argv.  We do this instead of using argparse so that the
3212           original help for the unittest module is still shown when
3213           using --help.
3214
3215 2017-05-05  Timothy Horton  <timothy_horton@apple.com>
3216
3217         [Mac] Adjust cursor position for dragged link (and stop it from moving based on how fast you are dragging)
3218         https://bugs.webkit.org/show_bug.cgi?id=171764
3219         <rdar://problem/32005865>
3220
3221         Reviewed by Simon Fraser.
3222
3223         * UIProcess/Cocoa/WebViewImpl.mm:
3224         (WebKit::WebViewImpl::dragImageForView):
3225         Always use the last mouse down event to originate the drag; this was a 2004 hack
3226         to work around a seemingly-fixed macOS bug that somehow propagated into WebKit2.
3227         With WebKit2, this would cause trouble because currentEvent could move on
3228         during the bounce to the Web Content process and back, causing the delta between
3229         clientPoint and the mouse point to be dependent on timing, and thus causing the
3230         link to sit at timing-dependent distance from the cursor, instead of exactly
3231         where dragOffsetForLinkDragImage placed it.
3232
3233 2017-05-05  Brady Eidson  <beidson@apple.com>
3234
3235         API test WebKit2.WebsiteDataStoreCustomPaths is failing on ios-simulator.
3236         <rdar://problem/31977294> and https://bugs.webkit.org/show_bug.cgi?id=171513
3237
3238         Reviewed by Andy Estes.
3239
3240         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3241         (WebKit::NetworkProcess::syncAllCookies):
3242
3243 2017-05-05  Dean Jackson  <dino@apple.com>
3244
3245         Restrict SVG filters to accessible security origins
3246         https://bugs.webkit.org/show_bug.cgi?id=118689
3247         <rdar://problem/27362159>
3248
3249         Reviewed by Brent Fulgham.
3250
3251         Update parameter lists.
3252
3253         * WebProcess/Plugins/PluginView.cpp:
3254         (WebKit::PluginView::paint):
3255         * WebProcess/Plugins/PluginView.h:
3256
3257 2017-05-05  Beth Dakin  <bdakin@apple.com>
3258
3259         Ensure NSColorPickerTouchBarItem only uses sRGB colors
3260         https://bugs.webkit.org/show_bug.cgi?id=171758
3261         -and corresponding-
3262         rdar://problem/28314183
3263
3264         Reviewed by Tim Horton.
3265
3266         * UIProcess/Cocoa/WebViewImpl.mm:
3267         (-[WKTextTouchBarItemController itemForIdentifier:]):
3268
3269 2017-05-05  Brent Fulgham  <bfulgham@apple.com>
3270
3271         [WK2][iOS][macOS] Expand sandbox to access vm.footprint_suspend 
3272         https://bugs.webkit.org/show_bug.cgi?id=171749
3273         <rdar://problem/32019494>
3274
3275         Reviewed by Geoffrey Garen.
3276
3277         The 'sysctl' whitelist needs to be extended to support an additional VM-related feature.
3278
3279         * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
3280         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
3281         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
3282         * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
3283         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
3284         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3285         * WebProcess/com.apple.WebProcess.sb.in:
3286
3287 2017-05-05  John Wilander  <wilander@apple.com>
3288
3289         Resource Load Statistics: Don't cover in-memory and disk caches during website data removal
3290         https://bugs.webkit.org/show_bug.cgi?id=171741
3291         <rdar://problem/32020691>
3292
3293         Reviewed by Brent Fulgham.
3294
3295         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3296         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
3297             No longer removes WebsiteDataType::DiskCache or WebsiteDataType::MemoryCache.
3298
3299 2017-05-05  Brian Burg  <bburg@apple.com>
3300
3301         CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::commonVMSlow + 57
3302         https://bugs.webkit.org/show_bug.cgi?id=171669
3303         <rdar://problem/31967684>
3304
3305         Reviewed by Mark Lam.
3306
3307         safaridriver's AutomaticInspection capability causes us to call WebInspectorProxy::connect()
3308         underneath the Automation.inspectBrowsingContext command. This fires a NeedDebuggerBreak
3309         interrupt for the web content's VM, but this is racy because the web content process may
3310         not yet be fully initialized when this interrupt is handled.
3311
3312         To work around this, just don't deliver any interrupts if the VM singleton is still null.
3313         This is a reliable signal that the web content process is not fully initialized yet. Not delivering
3314         is harmless; the interrupt only exists to break out of infinite loops in JS code, but there
3315         could not be any such infinite loop yet if the web content process is not fully initialized.
3316
3317         * WebProcess/WebPage/WebInspectorInterruptDispatcher.cpp:
3318         (WebKit::WebInspectorInterruptDispatcher::notifyNeedDebuggerBreak):
3319
3320 2017-05-05  Brian Burg  <bburg@apple.com>
3321
3322         Web Automation: cookie-related commands don't work correctly
3323         https://bugs.webkit.org/show_bug.cgi?id=171713
3324         <rdar://problem/29829930>
3325
3326         Reviewed by Alexey Proskuryakov.
3327
3328         Commands that use WebCookieManager directly should complete when
3329         the manager's completion handler is called. Otherwise, this will race
3330         with subsequent accesses to cookies via the web process (document.cookie).
3331
3332         Also, these commands need to use the active browsing context's session ID.
3333         They currently use the process pool's storage session, which is wrong
3334         since we specially configure automation instances with an ephemeral store.
3335
3336         * UIProcess/Automation/WebAutomationSession.cpp:
3337         (WebKit::WebAutomationSession::addSingleCookie):
3338         (WebKit::WebAutomationSession::deleteAllCookies):
3339
3340 2017-05-05  Chris Dumez  <cdumez@apple.com>
3341
3342         Rename webProcessDidCrashWithReason callback to webProcessDidTerminate and stop calling webProcessDidCrash for client terminations
3343         https://bugs.webkit.org/show_bug.cgi?id=171624
3344
3345         Reviewed by Dan Bernstein.
3346
3347         Follow-up fixes after r216129 based on feedback I have received:
3348         - Rename webProcessDidCrashWithReason callback function to webProcessDidTerminate given that this is called
3349           for non-crashes (e.g. terminations requested by the client).
3350         - Rename WKProcessCrashReason / ProcessCrashReason to WKProcessTerminationReason / ProcessTerminationReason
3351           for consistency with the new naming.
3352         - Stop calling processDidCrash / webProcessDidCrash for terminations requested by the client, to maintain
3353           pre-r216129 behavior. Those are not crashes (The client used an API such as WKPageTerminateProcess()).
3354           webProcessDidTerminate will still be called though.
3355         - Fix a bug where - for terminations due to resource limits - WebPageProxy::processDidCrash() was getting
3356           called twice: First by WebProcessProxy::requestTermination() with reason "RequestedByClient" then a
3357           second time by WebProcessProxy::terminateProcessDueToResourceLimits() with the proper reason.
3358
3359         * Shared/ProcessTerminationReason.h: Renamed from Source/WebKit2/Shared/ProcessCrashReason.h.
3360         * UIProcess/API/APINavigationClient.h:
3361         (API::NavigationClient::processDidTerminate):
3362         * UIProcess/API/C/WKAPICast.h:
3363         (WebKit::toAPI):
3364         * UIProcess/API/C/WKPage.cpp:
3365         (WKPageTerminate):
3366         (WKPageSetPageNavigationClient):
3367         * UIProcess/API/C/WKPageNavigationClient.h:
3368         * UIProcess/API/C/WKProcessTerminationReason.h: Renamed from Source/WebKit2/UIProcess/API/C/WKProcessCrashReason.h.
3369         * UIProcess/API/Cocoa/WKWebView.mm:
3370         (-[WKWebView _killWebContentProcessAndResetState]):
3371         * UIProcess/Cocoa/NavigationState.h:
3372         * UIProcess/Cocoa/NavigationState.mm:
3373         (WebKit::NavigationState::NavigationClient::processDidTerminate):
3374         * UIProcess/WebPageProxy.cpp:
3375         (WebKit::WebPageProxy::processDidTerminate):
3376         * UIProcess/WebPageProxy.h:
3377         * UIProcess/WebProcessProxy.cpp:
3378         (WebKit::WebProcessProxy::didClose):
3379         (WebKit::WebProcessProxy::requestTermination):
3380         (WebKit::WebProcessProxy::logDiagnosticMessageForResourceLimitTermination):
3381         (WebKit::WebProcessProxy::didExceedActiveMemoryLimit):
3382         (WebKit::WebProcessProxy::didExceedInactiveMemoryLimit):
3383         (WebKit::WebProcessProxy::didExceedBackgroundCPULimit):
3384         * UIProcess/WebProcessProxy.h:
3385         * WebKit2.xcodeproj/project.pbxproj:
3386
3387 2017-05-05  Derek Schuff  <dschuff@chromium.org>
3388
3389         Mac cmake buildfix after r216037
3390         https://bugs.webkit.org/show_bug.cgi?id=171558
3391
3392         Reviewed by JF Bastien.
3393
3394         * PlatformMac.cmake:
3395
3396 2017-05-05  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3397
3398         [GTK] Enable runtime flag for MediaDevices with enable-media-stream property.
3399         https://bugs.webkit.org/show_bug.cgi?id=171730
3400
3401         Reviewed by Michael Catanzaro.
3402
3403         After r215939 the MediaDevices runtime setting has to be enabled
3404         also to use MediaStream / WebRTC.
3405
3406         Enable it as part of the enable-media-stream property of the
3407         WebKitGTK+ API.
3408
3409         * UIProcess/API/gtk/WebKitSettings.cpp:
3410         (webkit_settings_set_enable_media_stream):
3411
3412 2017-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3413
3414         [GTK] Assertion failure in Inspector::RemoteInspector::setRemoteInspectorClient when disposing WebKitWebContext