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