[GLIB] Make remote inspector DBus protocol common to all glib based ports
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2017-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [GLIB] Make remote inspector DBus protocol common to all glib based ports
4         https://bugs.webkit.org/show_bug.cgi?id=172970
5
6         Reviewed by Žan Doberšek.
7
8         Use webkit instead of webkitgtk and reomve platform idfeds.
9
10         * UIProcess/glib/RemoteInspectorClient.cpp:
11
12 2017-06-06  Zan Dobersek  <zdobersek@igalia.com>
13
14         [WPE] Don't disable Web security preference by default
15         https://bugs.webkit.org/show_bug.cgi?id=172964
16
17         Reviewed by Carlos Garcia Campos.
18
19         * UIProcess/API/wpe/WPEView.cpp:
20         (WKWPE::View::View): Don't disable Web security by default.
21
22 2017-06-05  Chris Dumez  <cdumez@apple.com>
23
24         ASSERTION FAILED: RunLoop::isMain() in com.apple.WebKit: IPC::Connection::sendSyncMessage + 128
25         https://bugs.webkit.org/show_bug.cgi?id=172943
26         <rdar://problem/31288058>
27
28         Reviewed by Alexey Proskuryakov.
29
30         In Connection::sendMessage(), make sure we only ever transform asynchronous messages into synchronous
31         ones if sendMessage() is called on the main thread. This is necessary because we no longer support
32         sending synchronous messages from a background thread since r205125.
33
34         * Platform/IPC/Connection.cpp:
35         (IPC::Connection::sendMessage):
36         (IPC::Connection::sendSyncMessage):
37
38 2017-06-05  Joseph Pecoraro  <pecoraro@apple.com>
39
40         Revert r217405, this headerpad increase is no longer needed.
41
42         Rubber-stamped by Dan Bernstein.
43
44         * Configurations/BaseXPCService.xcconfig:
45
46 2017-06-05  Dan Bernstein  <mitz@apple.com>
47
48         Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.
49
50         * UIProcess/Cocoa/WebViewImpl.h:
51         * UIProcess/Cocoa/WebViewImpl.mm:
52         (WebKit::WebViewImpl::mediaPlaybackControlsView):
53
54 2017-06-05  Jer Noble  <jer.noble@apple.com>
55
56         Allow clients to specify a list of codecs which should require hardware decode support.
57         https://bugs.webkit.org/show_bug.cgi?id=172787
58
59         Reviewed by Alex Christensen.
60
61         Add a WKWebPageConfiguration (and associated WebPreferences and WKPreferencesRef) properties
62         allowing clients to require specified codecs have hardware decode support. Also open up the
63         sandbox on Cocoa ports to services required to check for hardware decode availability.
64
65         * Shared/WebPreferencesDefinitions.h:
66         * UIProcess/API/C/WKPreferences.cpp:
67         (WKPreferencesSetMediaCodecsRequiringHardwareSupport):
68         (WKPreferencesCopyMediaCodecsRequiringHardwareSupport):
69         * UIProcess/API/C/WKPreferencesRefPrivate.h:
70         * UIProcess/API/Cocoa/WKWebView.mm:
71         (-[WKWebView _initializeWithConfiguration:]):
72         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
73         (-[WKWebViewConfiguration copyWithZone:]):
74         (-[WKWebViewConfiguration _mediaCodecsRequiringHardwareSupport]):
75         (-[WKWebViewConfiguration _setMediaCodecsRequiringHardwareSupport:]):
76         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
77         * WebProcess/com.apple.WebProcess.sb.in:
78
79 2017-06-05  Beth Dakin  <bdakin@apple.com>
80
81         Modify Netflix controlsManager quirk to prevent only scrubbing
82         https://bugs.webkit.org/show_bug.cgi?id=172881
83         -and corresponding-
84         rdar://problem/32228660
85
86         Reviewed by Andy Estes.
87
88         Plumbing for allowsTouchBarScrubbing. See WebCore ChangeLog for more details.
89
90         * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
91         * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
92         * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
93         (WebKit::WebPlaybackSessionModelContext::setAllowsTouchBarScrubbing):
94         (WebKit::WebPlaybackSessionManagerProxy::setAllowsTouchBarScrubbing):
95         * WebProcess/cocoa/WebPlaybackSessionManager.h:
96         * WebProcess/cocoa/WebPlaybackSessionManager.mm:
97         (WebKit::WebPlaybackSessionInterfaceContext::allowsTouchBarScrubbingChanged):
98         (WebKit::WebPlaybackSessionManager::allowsTouchBarScrubbingChanged):
99
100 2017-06-05  Carlos Garcia Campos  <cgarcia@igalia.com>
101
102         Unreviewed. Fix GTK+ build with OpenGL disabled after r217779.
103
104         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
105         (WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged):
106
107 2017-06-05  Carlos Garcia Campos  <cgarcia@igalia.com>
108
109         [WPE] Use AcceleratedDrawingArea instead of its fork
110         https://bugs.webkit.org/show_bug.cgi?id=172496
111
112         Reviewed by Žan Doberšek.
113
114         WPE uses its own drawing area implementation, which is actually a fork of AcceleratedDrawingArea, but simplified
115         for the case of compositing being always forced. AcceleratedDrawingArea already handles the case of compositing
116         being forced, so now that WPE is upstream we could simply use AcceleratedDrawingArea instead.
117
118         * PlatformWPE.cmake:
119         * Shared/DrawingAreaInfo.h: Remove DrawingAreaTypeWPE type.
120         * UIProcess/API/wpe/DrawingAreaProxyWPE.cpp: Removed.
121         * UIProcess/API/wpe/DrawingAreaProxyWPE.h: Removed.
122         * UIProcess/API/wpe/PageClientImpl.cpp:
123         (WebKit::PageClientImpl::createDrawingAreaProxy): Create an AcceleratedDrawingAreaProxy.
124         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
125         (WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged): Moved from DrawingAreaImpl since it actually
126         belongs here.
127         * WebProcess/WebPage/DrawingArea.cpp:
128         (WebKit::DrawingArea::create): Create an AcceleratedDrawingArea for WPE port.
129         * WebProcess/WebPage/DrawingAreaImpl.cpp: Remove mainFrameContentSizeChanged() that doesn't belong here.
130         * WebProcess/WebPage/DrawingAreaImpl.h:
131         * WebProcess/WebPage/wpe/DrawingAreaWPE.cpp: Removed.
132         * WebProcess/WebPage/wpe/DrawingAreaWPE.h: Removed.
133
134 2017-06-03  Simon Fraser  <simon.fraser@apple.com>
135
136         Sort the project file.
137
138         * WebKit2.xcodeproj/project.pbxproj:
139
140 2017-06-02  Chris Dumez  <cdumez@apple.com>
141
142         ResourceLoadStatistics are not using unique paths during test runs
143         https://bugs.webkit.org/show_bug.cgi?id=172861
144         <rdar://problem/32442251>
145
146         Reviewed by Darin Adler.
147
148         Add WKContextConfigurationSetResourceLoadStatisticsDirectory() C API to allow
149         WKTR to use a custom directory.
150
151         * UIProcess/API/APIProcessPoolConfiguration.cpp:
152         (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
153         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
154         (API::ProcessPoolConfiguration::copy):
155         * UIProcess/API/APIProcessPoolConfiguration.h:
156         * UIProcess/API/C/WKContextConfigurationRef.cpp:
157         (WKContextConfigurationCopyResourceLoadStatisticsDirectory):
158         (WKContextConfigurationSetResourceLoadStatisticsDirectory):
159         * UIProcess/API/C/WKContextConfigurationRef.h:
160         * UIProcess/WebProcessPool.cpp:
161         (WebKit::legacyWebsiteDataStoreConfiguration):
162
163 2017-06-02  Brady Eidson  <beidson@apple.com>
164
165         Prevent scheme handlers from handling all built-in URL schemes.
166         <rdar://problem/32404790> and https://bugs.webkit.org/show_bug.cgi?id=172869
167
168         Reviewed by Andy Estes.
169
170         * UIProcess/API/Cocoa/WKWebView.mm:
171         (+[WKWebView handlesURLScheme:]): Check against WebCore's new master list of URL schemes.
172
173 2017-06-02  Simon Fraser  <simon.fraser@apple.com>
174
175         All scroll peformance logging should happen in the UI process
176         https://bugs.webkit.org/show_bug.cgi?id=172874
177         rdar://problem/24474830
178
179         Reviewed by Tim Horton.
180
181         Printing to stdout from the WebProcess doesn't show up anywhere in non-development builds,
182         so we have to log from the UI process.
183
184         Achieve this by adding a PerformanceLoggingClient to Page which forwards messages to
185         WebPageProxy, which prints them with the same format they had before. Some plumbing through
186         PlatformCALayerClient and GraphicsLayerClient is required to get messages from TileControllers
187         through to something that can get to Page.
188
189         * UIProcess/WebPageProxy.cpp:
190         (WebKit::WebPageProxy::logScrollingEvent):
191         * UIProcess/WebPageProxy.h:
192         * UIProcess/WebPageProxy.messages.in:
193         * WebKit2.xcodeproj/project.pbxproj:
194         * WebProcess/WebCoreSupport/WebPerformanceLoggingClient.cpp: Added.
195         (WebKit::WebPerformanceLoggingClient::WebPerformanceLoggingClient):
196         (WebKit::WebPerformanceLoggingClient::logScrollingEvent):
197         * WebProcess/WebCoreSupport/WebPerformanceLoggingClient.h: Added.
198         * WebProcess/WebPage/WebPage.cpp:
199         (WebKit::m_cpuLimit):
200
201 2017-06-02  Chris Dumez  <cdumez@apple.com>
202
203         REGRESSION (r206386): Xactimate Website Crashes @ com.apple.WebKit: WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant + 255
204         https://bugs.webkit.org/show_bug.cgi?id=172846
205         <rdar://problem/31093005>
206
207         Reviewed by Mark Lam.
208
209         Follow-up to r217695 to deal with exceptions potentially thrown by
210         NPRuntimeObjectMap::convertJSValueToNPVariant() as well.
211
212         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
213         (WebKit::NPJSObject::invoke):
214
215 2017-06-02  Jeremy Jones  <jeremyj@apple.com>
216
217         Add abilility to specify presentingApplicationPID for a WebProcessPool.
218         https://bugs.webkit.org/show_bug.cgi?id=172839
219         rdar://problem/32247170
220
221         Reviewed by Tim Horton.
222
223         Expose presentingApplicationPID through WebProcessPoolConfiguration.
224         This allows rehosted WebViews to specify the hosting application.
225
226         * UIProcess/API/APIProcessPoolConfiguration.cpp:
227         (API::ProcessPoolConfiguration::copy):
228         * UIProcess/API/APIProcessPoolConfiguration.h:
229         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
230         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
231         (-[_WKProcessPoolConfiguration setPresentingApplicationPID:]):
232         (-[_WKProcessPoolConfiguration presentingApplicationPID]):
233         * UIProcess/WebProcessPool.cpp:
234         (WebKit::WebProcessPool::ensureNetworkProcess):
235         (WebKit::WebProcessPool::createNewWebProcess):
236
237 2017-06-02  Frederic Wang  <fwang@igalia.com>
238
239         [Mac] Use compositing for frames when ScrollingTreeIncludesFrames=true
240         https://bugs.webkit.org/show_bug.cgi?id=172851
241
242         Reviewed by Simon Fraser.
243
244         When fast frame scrolling is supported on mac (bug 171667), scrollable frames will require
245         special composited layer. This commit enables that on mac but only when
246         ScrollingTreeIncludesFrames=true, so that the default behavior is unchanged.
247
248         * WebProcess/WebCoreSupport/WebChromeClient.h: Make scrollable inner frame trigger
249         compositing on Mac by default. This is ignored on mac when ScrollingTreeIncludesFrames=false.
250         Rename ScrollableInnerFrameTrigger to ScrollableNonMainFrameTrigger.
251
252 2017-06-02  Zalan Bujtas  <zalan@apple.com>
253
254         Allow clients to override viewport size for CSS viewport units.
255         https://bugs.webkit.org/show_bug.cgi?id=172838
256         <rdar://problem/32523441>
257
258         Reviewed by Tim Horton.
259
260         This enables auto-sizing clients to ensure that styles relative to the viewport are
261         resolved to a set value (presumably the size of the container) as opposed to the preferred
262         document size (which is set as the FrameView size).
263
264         * Shared/WebPageCreationParameters.cpp:
265         (WebKit::WebPageCreationParameters::encode):
266         (WebKit::WebPageCreationParameters::decode):
267         * Shared/WebPageCreationParameters.h:
268         * UIProcess/API/Cocoa/WKWebView.mm:
269         (-[WKWebView _viewportSizeForCSSViewportUnits]):
270         (-[WKWebView _setViewportSizeForCSSViewportUnits:]):
271         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
272         * UIProcess/WebPageProxy.cpp:
273         (WebKit::WebPageProxy::creationParameters):
274         (WebKit::WebPageProxy::setViewportSizeForCSSViewportUnits):
275         * UIProcess/WebPageProxy.h:
276         (WebKit::WebPageProxy::viewportSizeForCSSViewportUnits):
277         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
278         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
279         * WebProcess/WebPage/WebPage.cpp:
280         (WebKit::m_cpuLimit):
281         (WebKit::WebPage::setViewportSizeForCSSViewportUnits):
282         * WebProcess/WebPage/WebPage.h:
283         (WebKit::WebPage::viewportSizeForCSSViewportUnits):
284         * WebProcess/WebPage/WebPage.messages.in:
285
286 2017-06-02  Simon Fraser  <simon.fraser@apple.com>
287
288         Get <chrono> out of StdLibExtras.h
289         https://bugs.webkit.org/show_bug.cgi?id=172744
290
291         Reviewed by Zalan Bujtas.
292
293         Only bring in <chrono> and namespace std::literals::chrono_literals when necessary.
294
295         * NetworkProcess/cache/NetworkCache.cpp:
296         * NetworkProcess/cache/NetworkCacheFileSystem.h:
297         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
298         * NetworkProcess/cache/NetworkCacheStorage.cpp:
299         (WebKit::NetworkCache::computeRecordWorth):
300         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
301         * WebProcess/Cookies/WebCookieManager.h:
302
303 2017-06-02  Andy Estes  <aestes@apple.com>
304
305         [Cocoa] Add a "supportedCountries" property to ApplePayPaymentRequest
306         https://bugs.webkit.org/show_bug.cgi?id=172832
307         <rdar://problem/30735544>
308
309         Reviewed by Alex Christensen.
310
311         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
312         (IPC::ArgumentCoder<PaymentRequest>::encode):
313         (IPC::ArgumentCoder<PaymentRequest>::decode):
314         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
315         (WebKit::toNSSet):
316         (WebKit::toPKPaymentRequest):
317
318 2017-06-02  Dan Bernstein  <mitz@apple.com>
319
320         [Xcode] Header postprocessing should be based on the target OS version rather than the builder OS version
321         https://bugs.webkit.org/show_bug.cgi?id=172860
322
323         Reviewed by Anders Carlsson.
324
325         * Configurations/WebKit.xcconfig: Use TARGET_MAC_OS_X_VERSION_MAJOR
326
327 2017-06-02  Gwang Yoon Hwang  <yoon@igalia.com>
328
329         REGRESSION(r217214): [Coordinated Graphics] UpdateAtlas didn't released while resetting testrunner
330         https://bugs.webkit.org/show_bug.cgi?id=172746
331
332         Reviewed by Žan Doberšek.
333
334         After clearing update atlases in CompositingCoordinator, we should
335         release update atlases at the compositing thread, too.
336
337         We cannot remove update atlases from the CoordinatedGraphicsScene
338         without regard to update scheduling, since previously committed scene
339         states can try to use already released update atlases.
340         To prevent this timing problem, releasing update atlases should be done
341         with a update scheduler.
342
343         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
344         (WebKit::CoordinatedGraphicsScene::syncRemoteContent):
345         (WebKit::CoordinatedGraphicsScene::appendUpdate):
346         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
347         Use WTF::Function instead of std::function
348         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
349         (WebKit::ThreadedCompositor::updateSceneState):
350         (WebKit::ThreadedCompositor::releaseUpdateAtlases):
351         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
352         (WebKit::ThreadedCompositor::flushPendingLayerChanges):
353         Release UpdateAtlases at the end of compositing states update, too.
354         (WebKit::CompositingCoordinator::clearUpdateAtlases):
355
356 2017-06-01  Andreas Kling  <akling@apple.com>
357
358         [Mac] Remove backing store for layers that are outside the viewport
359         https://bugs.webkit.org/show_bug.cgi?id=170082
360         <rdar://problem/31245009>
361
362         Reviewed by Simon Fraser.
363
364         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
365
366 2017-06-01  Chris Dumez  <cdumez@apple.com>
367
368         REGRESSION (r206386): Xactimate Website Crashes @ com.apple.WebKit: WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant + 255
369         https://bugs.webkit.org/show_bug.cgi?id=172846
370         <rdar://problem/31093005>
371
372         Reviewed by Andreas Kling.
373
374         In NPJSObject::invoke(), return early if there was an exception when calling JSC::call().
375         Using the value returned by JSC::call() when an exception occurred is unsafe.
376
377         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
378         (WebKit::NPJSObject::invoke):
379
380 2017-06-01  Jon Lee  <jonlee@apple.com>
381
382         Rename an experimental feature item
383         https://bugs.webkit.org/show_bug.cgi?id=172830
384
385         Reviewed by Joseph Pecoraro.
386
387         * Shared/WebPreferencesDefinitions.h:
388
389 2017-06-01  Andy Estes  <aestes@apple.com>
390
391         REGRESSION (r217626): ENABLE_APPLE_PAY_SESSION_V3 was disabled by mistake
392         https://bugs.webkit.org/show_bug.cgi?id=172828
393
394         Reviewed by Beth Dakin.
395
396         * Configurations/FeatureDefines.xcconfig:
397
398 2017-06-01  Chris Dumez  <cdumez@apple.com>
399
400         [WK2] Update plugin process sandbox profile for flash plugin on HBONow
401         https://bugs.webkit.org/show_bug.cgi?id=172820
402         <rdar://problem/32513297>
403
404         Reviewed by Brent Fulgham.
405
406         Relax the IOKit whitelist to silence sandbox violations by Flash plugin on
407         HBONow.
408
409         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
410
411 2017-06-01  Andy Estes  <aestes@apple.com>
412
413         [Cocoa] Upstream support for JCB as a supported payment network
414         https://bugs.webkit.org/show_bug.cgi?id=172819
415
416         Reviewed by Tim Horton.
417
418         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
419         (WebKit::toSupportedNetwork):
420         (WebKit::toAdditionalSupportedNetwork): Deleted.
421
422 2017-05-31  Andy Estes  <aestes@apple.com>
423
424         [Cocoa] "administrativeArea" contact field maps to the wrong CNPostalAddress key when creating NSErrors
425         https://bugs.webkit.org/show_bug.cgi?id=172784
426         <rdar://problem/32414416>
427
428         Reviewed by Beth Dakin.
429
430         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
431         (WebKit::toNSError): Used CNPostalAddressStateKey instead of CNPostalAddressCityKey.
432
433 2017-05-31  Andy Estes  <aestes@apple.com>
434
435         Rename ENABLE_APPLE_PAY_DELEGATE to ENABLE_APPLE_PAY_SESSION_V3 and bump the supported version number
436         https://bugs.webkit.org/show_bug.cgi?id=172366
437
438         Reviewed by Daniel Bates.
439
440         * Configurations/FeatureDefines.xcconfig:
441         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
442         (WebKit::WebPaymentCoordinator::supportsVersion):
443
444 2017-05-31  Chris Dumez  <cdumez@apple.com>
445
446         [WK2] Fix bad assertion in BackgroundProcessResponsivenessTimer::scheduleNextResponsivenessCheck()
447         https://bugs.webkit.org/show_bug.cgi?id=172763
448
449         Reviewed by Zalan Bujtas.
450
451         Fix bad assertion in BackgroundProcessResponsivenessTimer::scheduleNextResponsivenessCheck().
452         It gets hit when a process becomes unresponsive. The reason is that RunLoop::Timer::isActive()
453         still returns true while the timerFired() callback is called.
454
455         * UIProcess/BackgroundProcessResponsivenessTimer.cpp:
456         (WebKit::BackgroundProcessResponsivenessTimer::scheduleNextResponsivenessCheck):
457
458 2017-05-31  Youenn Fablet  <youenn@apple.com>
459
460         Make WebRTC legacy API switch an experimental feature
461         https://bugs.webkit.org/show_bug.cgi?id=172760
462
463         Reviewed by Eric Carlson.
464
465         This patch adds an experimental feature to disable WebRTC legacy API.
466         We keep the runtime flag as "enable WebRTC legacy API" to minimize the changes and as it is clearer in the code.
467
468         * Shared/WebPreferencesDefinitions.h:
469         * UIProcess/API/C/WKPreferences.cpp:
470         (WKPreferencesSetWebRTCLegacyAPIEnabled):
471         (WKPreferencesGetWebRTCLegacyAPIEnabled):
472         * UIProcess/API/Cocoa/WKPreferences.mm:
473         (-[WKPreferences _webRTCLegacyAPIEnabled]):
474         (-[WKPreferences _setWebRTCLegacyAPIEnabled:]):
475         * WebProcess/WebPage/WebPage.cpp:
476         (WebKit::WebPage::updatePreferences):
477
478 2017-05-31  Matt Lewis  <jlewis3@apple.com>
479
480         Unreviewed, rolling out r217603.
481
482         This patch broke the internal builds.
483
484         Reverted changeset:
485
486         "Get <chrono> out of StdLibExtras.h"
487         https://bugs.webkit.org/show_bug.cgi?id=172744
488         http://trac.webkit.org/changeset/217603
489
490 2017-05-31  Brent Fulgham  <bfulgham@apple.com>
491
492         Make ResourceLoadStatistics testing more reliable
493         https://bugs.webkit.org/show_bug.cgi?id=172730
494         <rdar://problem/32028373>
495
496         Reviewed by Andy Estes.
497
498         * UIProcess/WebProcessProxy.cpp:
499         (WebKit::WebProcessProxy::notifyPageStatisticsAndDataRecordsProcessed): Add a convenience method to notify the
500         WebProcess when the UIProcess has finished processing the load statistics data.
501         * UIProcess/WebProcessProxy.h:
502         * UIProcess/WebResourceLoadStatisticsStore.cpp:
503         (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords): Notify clients (if they requested) when
504         statistics have been processed.
505
506 2017-05-31  Simon Fraser  <simon.fraser@apple.com>
507
508         Get <chrono> out of StdLibExtras.h
509         https://bugs.webkit.org/show_bug.cgi?id=172744
510
511         Reviewed by Saam Barati.
512
513         Only bring in <chrono> and namespace std::literals::chrono_literals when necessary.
514
515         * NetworkProcess/cache/NetworkCache.cpp:
516         * NetworkProcess/cache/NetworkCacheFileSystem.h:
517         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
518         * NetworkProcess/cache/NetworkCacheStorage.cpp:
519         (WebKit::NetworkCache::computeRecordWorth):
520         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
521         * WebProcess/Cookies/WebCookieManager.h:
522
523 2017-05-31  Zan Dobersek  <zdobersek@igalia.com>
524
525         CoordinatedLayerTreeHost: properly support async force repaints
526         https://bugs.webkit.org/show_bug.cgi?id=172444
527
528         Reviewed by Carlos Garcia Campos.
529
530         Before these changes the force-repaint callbacks were executed once
531         the next layer flush was performed. This is not appropriate since
532         with the threaded compositor this was done even before the flushed
533         state was handled on the rendering thread.
534
535         Instead, the callback should be invoked once the first following
536         flushed state is rendered through the compositor and the update
537         finish is reported back to CoordinatedLayerTreeHost through invoking
538         the renderNextFrame() method.
539
540         If the force-repaint callback is registered while a state update is
541         already being processed by the renderer (i.e. the threaded compositor),
542         the callback is invoked only after the following flush, which is
543         executed when renderNextFrame() is called for the current state update.
544
545         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
546         Add the forceFrameSync() method that forces the following state flush
547         to produce a state update that will be handled by the compositor.
548         This ensures that the compositor informs the CoordinatedLayerTreeHost
549         once this state update is done, invoking renderNextFrame() which would
550         handle the force-repaint callback.
551         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
552         (WebKit::CoordinatedLayerTreeHost::forceRepaintAsync):
553         (WebKit::CoordinatedLayerTreeHost::renderNextFrame):
554         (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
555         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
556         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
557         Remove the forceRepaintAsync() override that returned false.
558
559 2017-05-31  Carlos Garcia Campos  <cgarcia@igalia.com>
560
561         Unreviewed. Fix copy-paste error added in r217209.
562
563         It seems I pasted twice.
564
565         * UIProcess/API/gtk/WebKitContextMenuItem.h:
566
567 2017-05-30  Tim Horton  <timothy_horton@apple.com>
568
569         Keyboard autocorrections do not apply with an active selection (but keyboard acts like they did)
570         https://bugs.webkit.org/show_bug.cgi?id=172735
571         <rdar://problem/32015977>
572
573         Reviewed by Enrica Casucci.
574
575         * UIProcess/API/Cocoa/WKWebView.mm:
576         (-[WKWebView applyAutocorrection:toString:withCompletionHandler:]):
577         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
578         Expose applyAutocorrection on the WKTesting category for use from UIScriptController.
579
580         * WebProcess/WebPage/ios/WebPageIOS.mm:
581         (WebKit::WebPage::syncApplyAutocorrection):
582         If there is a range selection and it precisely matches the autocorrection's "before"
583         string, allow the autocorrection to take place.
584
585 2017-05-30  Joseph Pecoraro  <pecoraro@apple.com>
586
587         Web Inspector: images dragged from Inspector to Desktop are named "Unknown.png"
588         https://bugs.webkit.org/show_bug.cgi?id=141515
589         <rdar://problem/9251308>
590
591         Reviewed by Wenson Hsieh.
592
593         In Web Inspector these images are <img src="..."> with data: or blob:
594         content. In these cases we have the image data but the URL does not
595         provide a useful name. In fact the name "Unknown.png" comes from
596         -[NSURLResponse suggestedFilename] for this URL / content.
597
598         To start, improve this situation for drags in Web Inspector pages.
599         If the image element being dragged has a filename attribute use that
600         as the suggested filename for the drag.
601
602         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
603         (WebKit::WebDragClient::declareAndWriteDragImage):
604
605 2017-05-30  Ryosuke Niwa  <rniwa@webkit.org>
606
607         Only include DataDetectorsUI headers in iOS
608         https://bugs.webkit.org/show_bug.cgi?id=172633
609
610         Reviewed by David Kilzer.
611
612         Enable data detectors only on iOS and not other variants of iOS.
613
614         * Platform/spi/ios/ManagedConfigurationSPI.h:
615         * UIProcess/API/Cocoa/WKWebView.mm:
616         (-[WKWebView _dataDetectionResults]):
617         * UIProcess/ios/WKActionSheetAssistant.h:
618         * UIProcess/ios/WKActionSheetAssistant.mm:
619         (-[WKActionSheetAssistant showDataDetectorsSheet]):
620         * UIProcess/ios/WKContentViewInteraction.h:
621         * UIProcess/ios/WKContentViewInteraction.mm:
622         (-[WKContentView _actionForLongPressFromPositionInformation:]):
623         (-[WKContentView _didNotHandleTapAsClick:]):
624         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm:
625         (-[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:]):
626         * WebProcess/WebPage/ios/WebPageIOS.mm:
627         (WebKit::WebPage::handleTap):
628         (WebKit::WebPage::handleTwoFingerTapAtPoint):
629         (WebKit::WebPage::commitPotentialTap):
630
631 2017-05-30  Chris Dumez  <cdumez@apple.com>
632
633         REGRESSION(r215946): Can't reference a table cell in Google spreadsheet
634         https://bugs.webkit.org/show_bug.cgi?id=172703
635         <rdar://problem/32458086>
636
637         Reviewed by Ryosuke Niwa.
638
639         Fix GObject bindings accordingly.
640
641         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
642         (WebKit::kit):
643         (WebKit::core):
644         (WebKit::wrapDOMRectList):
645         (webkit_dom_client_rect_list_constructed):
646         (webkit_dom_client_rect_list_item):
647         (webkit_dom_client_rect_list_get_length):
648         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h:
649         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
650         (webkit_dom_element_get_client_rects):
651
652 2017-05-30  Daniel Bates  <dabates@apple.com>
653
654         [WK2] Add runBeforeUnloadConfirmPanel WKUIDelegate SPI; support onbeforeunload confirm panel in MiniBrowser
655         https://bugs.webkit.org/show_bug.cgi?id=172603
656         <rdar://problem/32471306>
657
658         Reviewed by Brady Eidson.
659
660         A page loaded in MiniBrowser using WebKit2 cannot show a beforeunload confirm panel (by registering
661         an onbeforeunload event handler) when it is unloaded. The same page loaded in MiniBrowser using
662         WebKit1 can show such a confirm panel. We need to add WKUIDelegate SPI so that an embedding client,
663         such as MiniBrowser, can register to receive a callback to show a beforeunload confirm panel.
664
665         * UIProcess/API/APIUIClient.h:
666         (API::UIClient::runBeforeUnloadConfirmPanel): Modified to take a SecurityOriginData object. This
667         makes the API consistent with the existing JavaScript dialog callbacks.
668         * UIProcess/API/C/WKPage.cpp:
669         (WKPageSetPageUIClient):
670         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add SPI -_webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler:.
671         * UIProcess/API/Cocoa/WKWebView.mm:
672         (-[WKWebView setUIDelegate:]): Set the delegate of WebKit::UIDelegate to the specified WKUIDelegate
673         before we set the UI client on the page so as to ensure that API::UIClient callbacks that depend
674         -respondsToSelector: checks (e.g. API::UIClient::canRunBeforeUnloadConfirmPanel()) return the correct
675         result. To elaborate further, a API::UIClient client must override both canRunBeforeUnloadConfirmPanel()
676         and runBeforeUnloadConfirmPanel() to support running a beforeunload confirm dialog. When mapping
677         the Cocoa SPI, WKUIDelegatePrivate, to API::UIClient we implement API::UIClient::canRunBeforeUnloadConfirmPanel()
678         in terms of whether the Cocoa delegate responds at runtime to the selector -_webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler:.
679         We need to do such runtime checks before we pass the API::UIClient to the page. Otherwise, querying
680         API::UIClient::canRunBeforeUnloadConfirmPanel() will return the wrong result.
681         * UIProcess/API/gtk/WebKitUIClient.cpp: Modified runBeforeUnloadConfirmPanel() to take a SecurityOriginData object.
682         * UIProcess/Cocoa/UIDelegate.h: Add declarations for API::UIClient overrides: canRunBeforeUnloadConfirmPanel()
683         and runBeforeUnloadConfirmPanel(). Add a bit to m_delegateMethods as to whether the Cocoa delegate
684         responds to selector -_webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler:.
685         * UIProcess/Cocoa/UIDelegate.mm:
686         (WebKit::UIDelegate::setDelegate): Set the above m_delegateMethods bit if the Cocoa delegate responds
687         to selector -_webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler:.
688         (WebKit::UIDelegate::UIClient::canRunBeforeUnloadConfirmPanel): Return whether the above m_delegateMethods
689         bit was set.
690         (WebKit::UIDelegate::UIClient::runBeforeUnloadConfirmPanel): Turn around and call -_webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler: (if applicable).
691         * UIProcess/WebPageProxy.cpp:
692         (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): Modified to take a SecurityOriginData object
693         and pass it to API::UIClient::runBeforeUnloadConfirmPanel().
694         * UIProcess/WebPageProxy.h:
695         * UIProcess/WebPageProxy.messages.in: Add SecurityOriginData argument to message RunBeforeUnloadConfirmPanel.
696         Also pass the message for the panel as the last argument so as to make the order of arguments to message
697         RunBeforeUnloadConfirmPanel more closely match the order of arguments passed to other JavaScript dialog
698         messages (e.g. RunJavaScriptAlert) for consistency.
699         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
700         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel): Include the SecurityOriginData object for the
701         frame in message RunBeforeUnloadConfirmPanel.
702
703 2017-05-30  Alex Christensen  <achristensen@webkit.org>
704
705         Update libwebrtc configuration
706         https://bugs.webkit.org/show_bug.cgi?id=172727
707
708         Reviewed by Geoffrey Garen.
709
710         * Configurations/FeatureDefines.xcconfig:
711
712 2017-05-30  Tim Horton  <timothy_horton@apple.com>
713
714         Dictionary lookup disappears after a few seconds on observer.com
715         https://bugs.webkit.org/show_bug.cgi?id=172725
716         <rdar://problem/32328324>
717
718         Reviewed by Beth Dakin.
719
720         Only dismiss content-relative child windows on main frame loads,
721         not all subframes. This was causing e.g. dictionary popovers
722         relative to main-frame content to be dismissed when subframe
723         ads finished loading, which is likely the cause of most incidents
724         of this problem.
725
726         If the popover is relative to subframe content and the subframe
727         navigates out from under the popover, the popover will persist until
728         dismissed by the user (or one of the other automatic dismissal
729         mechanisms), but that seems preferable to the old behavior.
730
731         * UIProcess/Cocoa/WebViewImpl.h:
732         Remove an unimplemented and unused declaration.
733
734         * UIProcess/Cocoa/WebViewImpl.mm:
735         (WebKit::WebViewImpl::processDidExit):
736         Move dismissContentRelativeChildWindows call here from WebPageProxy.
737
738         * UIProcess/PageClient.h:
739         * UIProcess/WebPageProxy.cpp:
740         (WebKit::WebPageProxy::didCommitLoadForFrame):
741         (WebKit::WebPageProxy::resetStateAfterProcessExited):
742         * UIProcess/mac/PageClientImpl.h:
743         * UIProcess/mac/PageClientImpl.mm:
744         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
745         (WebKit::PageClientImpl::navigationGestureDidBegin):
746         (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
747         Remove dismissContentRelativeChildWindows from PageClient(Impl),
748         call it from inside PageClientImpl and other Mac-specific places
749         instead of inside ifdefs in WebPageProxy.
750
751 2017-05-30  Konstantin Tokarev  <annulen@yandex.ru>
752
753         Don't use designated initializers in WebBackForwardListProxy.cpp
754         https://bugs.webkit.org/show_bug.cgi?id=172667
755
756         Reviewed by Alex Christensen.
757
758         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
759         (WebKit::WebBackForwardListProxy::addItemFromUIProcess):
760         (WebKit::WebBackForwardListProxy::addItem):
761
762 2017-05-30  Antti Koivisto  <antti@apple.com>
763
764         REGRESSION(r191402?): Safari, Mail crash at com.apple.WebKit: WebKit::WebContextMenuListenerProxy::invalidate + 4
765         https://bugs.webkit.org/show_bug.cgi?id=172704
766
767         Reviewed by Andreas Kling.
768
769         r191402 made WebContextMenuProxy non-refcounted. However there are several potential ways for WebContextMenuProxyMac::show()
770         to re-enter WebPageProxy and delete itself. This patch partially reverts r191402 bringing refcounting back and protects
771         WebContextMenuProxy during show().
772
773         Speculative fix. No test, can't repro the crash.
774
775         * UIProcess/PageClient.h:
776         * UIProcess/WebContextMenuProxy.h:
777         * UIProcess/WebPageProxy.cpp:
778         (WebKit::WebPageProxy::internalShowContextMenu):
779
780             Protect WebContextMenuProxy during show().
781
782         * UIProcess/WebPageProxy.h:
783         * UIProcess/gtk/WebContextMenuProxyGtk.h:
784         (WebKit::WebContextMenuProxyGtk::create):
785         * UIProcess/ios/PageClientImplIOS.h:
786         * UIProcess/ios/PageClientImplIOS.mm:
787         (WebKit::PageClientImpl::createContextMenuProxy):
788         * UIProcess/mac/PageClientImpl.h:
789         * UIProcess/mac/PageClientImpl.mm:
790         (WebKit::PageClientImpl::createContextMenuProxy):
791         * UIProcess/mac/WebContextMenuProxyMac.h:
792         (WebKit::WebContextMenuProxyMac::create):
793
794 2017-05-30  Zan Dobersek  <zdobersek@igalia.com>
795
796         Invalidate the LayerTreeHost when destroying the DrawingAreaWPE object.
797
798         Rubber-stamped by Carlos Garcia Campos.
799
800         * WebProcess/WebPage/wpe/DrawingAreaWPE.cpp:
801         (WebKit::DrawingAreaWPE::~DrawingAreaWPE): Invalidate the LayerTreeHost
802         object, properly deconstructing the graphics pipeline.
803
804 2017-05-29  Claudio Saavedra  <csaavedra@igalia.com>
805
806         [GTK] Remove unneeded forward declaration
807
808         Rubber-stamped by Zan Dobersek.
809
810         * UIProcess/API/C/gtk/WKAPICastGtk.h: Remove WebGrammarDetail as
811         its header is included in the same file.
812
813 2017-05-29  Claudio Saavedra  <csaavedra@igalia.com>
814
815         [WPE] Build fix after r217531
816
817         Unreviewed.
818
819         * UIProcess/API/C/wpe/WKAPICastWPE.h:
820         (WebKit::toAPI): Add missing WebGrammarDetail API cast.
821
822 2017-05-28  Dan Bernstein  <mitz@apple.com>
823
824         [Xcode] ALWAYS_SEARCH_USER_PATHS is set to YES
825         https://bugs.webkit.org/show_bug.cgi?id=172691
826
827         Reviewed by Tim Horton.
828
829         * Configurations/Base.xcconfig: Set ALWAYS_SEARCH_USER_PATHS to NO.
830
831         * UIProcess/API/C/WKAPICast.h: Moved GTK-only definitions that used WebGrammarDetail.h to
832           WKAPICastGtk.h. This had the effect of no longer including APIArray.h from this header.
833
834         * UIProcess/API/C/gtk/WKAPICastGtk.h: Moved GTK-only definitions to here.
835         (WebKit::toAPI):
836         * UIProcess/WebGrammarDetail.h: Replaced include of APIArray.h with a forward declaration.
837
838         * Shared/API/c/WKRenderLayer.cpp:
839         * Shared/API/c/WKRenderObject.cpp:
840         * UIProcess/API/C/WKApplicationCacheManager.cpp:
841         * UIProcess/API/C/WKContext.cpp:
842         * UIProcess/API/C/WKContextConfigurationRef.cpp:
843         * UIProcess/API/C/WKCookieManager.cpp:
844         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
845         * UIProcess/API/C/WKNotificationManager.cpp:
846         * UIProcess/API/C/WKOpenPanelResultListener.cpp:
847         * UIProcess/API/C/WKPageGroup.cpp:
848         * UIProcess/API/C/WKResourceCacheManager.cpp:
849         * UIProcess/API/C/WKUserContentControllerRef.cpp:
850         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
851         * UIProcess/WebContextMenuListenerProxy.cpp:
852
853           Added #include "APIArray.h" to these files now that WKAPICast.h does not include it.
854
855 2017-05-26  Joseph Pecoraro  <pecoraro@apple.com>
856
857         Simply some NSNumber usage
858         https://bugs.webkit.org/show_bug.cgi?id=172677
859
860         Reviewed by Sam Weinig.
861
862         * PluginProcess/mac/PluginControllerProxyMac.mm:
863         (WebKit::PluginControllerProxy::platformGeometryDidChange):
864         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
865         (WebKit::registerUserDefaultsIfNeeded):
866         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
867         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
868
869 2017-05-26  Brent Fulgham  <bfulgham@apple.com>
870
871         [WK2] Address thread safety issues with ResourceLoadStatistics
872         https://bugs.webkit.org/show_bug.cgi?id=172519
873         <rdar://problem/31707642>
874
875         Reviewed by Chris Dumez.
876
877         Address some thread safety issues with the ResourceLoadStatistics architecture.
878
879         * UIProcess/WebResourceLoadStatisticsStore.cpp:
880         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords): Assert that this is never called on the main thread. Also
881         ensure that coreStore is only accessed on the statistics queue, not the main thread.
882         (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords): Dispatch coreStore-accessing code
883         on the statistics queue.
884         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated): Assert we do not hit this method
885         on the main thread.
886         (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver): Assert that this is being called on the
887         main thread. Also ensure that coreStore is only accessed on the statistics queue, not the main thread.
888         (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData): Dispatch coreStore-accessing code
889         on the statistics queue.
890         (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded): Lock data before operating on it.
891         (WebKit::WebResourceLoadStatisticsStore::writeStoreToDisk): Assert we do not hit this method on the main thread.
892         (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk): Ditto.
893         * UIProcess/WebResourceLoadStatisticsStore.h:
894         * WebProcess/WebProcess.cpp: Add a queue for the local WebProcess ResourceLoadStatisticsStore to use while processing data.
895         (WebKit::m_statisticsQueue): Added.
896         * WebProcess/WebProcess.h:
897
898 2017-05-26  Joseph Pecoraro  <pecoraro@apple.com>
899
900         [Cocoa] Simplify some WebViewImpl pasteboard code
901         https://bugs.webkit.org/show_bug.cgi?id=172668
902
903         Reviewed by Tim Horton.
904
905         * Shared/mac/PasteboardTypes.mm:
906         * UIProcess/Cocoa/WebViewImpl.mm:
907         (WebKit::WebViewImpl::setFileAndURLTypes):
908         (WebKit::WebViewImpl::setPromisedDataForAttachment):
909
910 2017-05-26  Joseph Pecoraro  <pecoraro@apple.com>
911
912         JSContext Inspector: Improve the reliability of automatically pausing in auto-attach
913         https://bugs.webkit.org/show_bug.cgi?id=172664
914         <rdar://problem/32362933>
915
916         Reviewed by Matt Baker.
917
918         * UIProcess/Automation/WebAutomationSession.cpp:
919         (WebKit::WebAutomationSession::connect):
920         * UIProcess/Automation/WebAutomationSession.h:
921         Special connection options are ignored in automation sessions.
922
923 2017-05-26  Commit Queue  <commit-queue@webkit.org>
924
925         Unreviewed, rolling out r217479.
926         https://bugs.webkit.org/show_bug.cgi?id=172642
927
928         Exposes an underlying bug in WPEBackend-mesa that we have to
929         resolve separately (Requested by zdobersek on #webkit).
930
931         Reverted changeset:
932
933         "[WPE] Use AcceleratedDrawingArea instead of its fork"
934         https://bugs.webkit.org/show_bug.cgi?id=172496
935         http://trac.webkit.org/changeset/217479
936
937 2017-05-26  Csaba Osztrogonác  <ossy@webkit.org>
938
939         Unreviewed Mac cmake buildfix after r217137, just for fun.
940         https://bugs.webkit.org/show_bug.cgi?id=172362
941
942         * PlatformMac.cmake:
943
944 2017-05-26  Carlos Garcia Campos  <cgarcia@igalia.com>
945
946         [WPE] Use AcceleratedDrawingArea instead of its fork
947         https://bugs.webkit.org/show_bug.cgi?id=172496
948
949         Reviewed by Žan Doberšek.
950
951         WPE uses its own drawing area implementation, which is actually a fork of AcceleratedDrawingArea, but simplified
952         for the case of compositing being always forced. AcceleratedDrawingArea already handles the case of compositing
953         being forced, so now that WPE is upstream we could simply use AcceleratedDrawingArea instead.
954
955         * PlatformWPE.cmake:
956         * Shared/DrawingAreaInfo.h: Remove DrawingAreaTypeWPE type.
957         * UIProcess/API/wpe/DrawingAreaProxyWPE.cpp: Removed.
958         * UIProcess/API/wpe/DrawingAreaProxyWPE.h: Removed.
959         * UIProcess/API/wpe/PageClientImpl.cpp:
960         (WebKit::PageClientImpl::createDrawingAreaProxy): Create an AcceleratedDrawingAreaProxy.
961         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
962         (WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged): Moved from DrawingAreaImpl since it actually
963         belongs here.
964         * WebProcess/WebPage/DrawingArea.cpp:
965         (WebKit::DrawingArea::create): Create an AcceleratedDrawingArea for WPE port.
966         * WebProcess/WebPage/DrawingAreaImpl.cpp: Remove mainFrameContentSizeChanged() that doesn't belong here.
967         * WebProcess/WebPage/DrawingAreaImpl.h:
968         * WebProcess/WebPage/wpe/DrawingAreaWPE.cpp: Removed.
969         * WebProcess/WebPage/wpe/DrawingAreaWPE.h: Removed.
970
971 2017-05-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
972
973         [iOS] Disbale async image decoding when synchronously painting a newly parented WebView
974         https://bugs.webkit.org/show_bug.cgi?id=172626
975
976         Reviewed by Simon Fraser.
977
978         Large images have to be synchronously decoded when bringing a WebView to 
979         the foreground because the whole page will be painted when we unblock the
980         UI process.
981
982         * Shared/mac/RemoteLayerBackingStore.mm:
983         (WebKit::RemoteLayerBackingStore::drawInContext): Get nextFlushIsForImmediatePaint
984         from RemoteLayerTreeContext and pass the correct GraphicsLayerPaintFlags
985         to drawLayerContents().
986         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
987         (WebKit::RemoteLayerTreeContext::setNextFlushIsForImmediatePaint):
988         (WebKit::RemoteLayerTreeContext::nextFlushIsForImmediatePaint):
989         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
990         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
991         (WebKit::RemoteLayerTreeDrawingArea::flushLayers): Pass
992         m_nextFlushIsForImmediatePaint to RemoteLayerTreeContext and then reset it.
993         (WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):
994         Set m_nextFlushIsForImmediatePaint to true to say that in the next flush,
995         large images have to be synchronously decoded.
996
997 2017-05-25  Joseph Pecoraro  <pecoraro@apple.com>
998
999         _WKUserStyleSheet and WKUserScript leak string data
1000         https://bugs.webkit.org/show_bug.cgi?id=172583
1001         <rdar://problem/32395209>
1002
1003         Reviewed by Sam Weinig.
1004
1005         * UIProcess/API/Cocoa/WKUserScript.mm:
1006         (-[WKUserScript dealloc]):
1007         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
1008         (-[_WKUserStyleSheet dealloc]):
1009         Follow the pattern of destructing the internal API object.
1010
1011         * UIProcess/API/Cocoa/WKUserScriptInternal.h:
1012         * UIProcess/API/Cocoa/_WKUserStyleSheetInternal.h:
1013         Remove unnecessary includes.
1014
1015 2017-05-25  Chris Dumez  <cdumez@apple.com>
1016
1017         ASSERT(m_websiteDataStore->websiteDataStore().sessionID() == m_sessionID) in PageConfiguration::sessionID()
1018         https://bugs.webkit.org/show_bug.cgi?id=172615
1019         <rdar://problem/32277488>
1020
1021         Reviewed by Brady Eidson.
1022
1023         Fix assertion added in r215923 to take into account the fact that the PageConfiguration's sessionID
1024         is SessionID::legacyPrivateSessionID() when private browsing is enabled, instead of being the
1025         WebsiteDataStore's sessionID.
1026
1027         See code in WebProcessPool::createWebPage():
1028         """
1029         pageConfiguration->setSessionID(pageConfiguration->preferences()->privateBrowsingEnabled() ? SessionID::legacyPrivateSessionID() : m_websiteDataStore->websiteDataStore().sessionID());
1030         """
1031
1032         * UIProcess/API/APIPageConfiguration.cpp:
1033         (API::PageConfiguration::sessionID):
1034
1035 2017-05-25  Brent Fulgham  <bfulgham@apple.com>
1036
1037         [WK2][iOS] Add a mach-lookup exception for 'com.apple.lsd.mapdb' to Network sandbox
1038         https://bugs.webkit.org/show_bug.cgi?id=172465
1039         <rdar://problem/32332836>
1040
1041         Reviewed by Alex Christensen.
1042
1043         Expand sandbox to allow lookup of the mapdb that contains UTI information used
1044         by the Network process.
1045
1046         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1047
1048 2017-05-25  Youenn Fablet  <youenn@apple.com>
1049
1050         com.apple.coremedia.videoencoder XPC service should be allowed by WebProcess sandbox
1051         https://bugs.webkit.org/show_bug.cgi?id=172599
1052
1053         Reviewed by Alex Christensen.
1054
1055         * WebProcess/com.apple.WebProcess.sb.in:
1056
1057 2017-05-25  Simon Fraser  <simon.fraser@apple.com>
1058
1059         [iOS WK2] Avoid setting contentsScale and rasterizationScale on CATransformLayers
1060         https://bugs.webkit.org/show_bug.cgi?id=172569
1061
1062         Reviewed by Dean Jackson.
1063
1064         Setting contentsScale and rasterizationScale on CATransformLayers is a waste of CPU time,
1065         and triggers unwanted logging, so don't do it.
1066
1067         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1068         (WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
1069
1070 2017-05-25  Matt Lewis  <jlewis3@apple.com>
1071
1072         Unreviewed, rolling out r217409.
1073
1074         The revision caused api failures
1075
1076         Reverted changeset:
1077
1078         "_WKUserStyleSheet leaks string data"
1079         https://bugs.webkit.org/show_bug.cgi?id=172583
1080         http://trac.webkit.org/changeset/217409
1081
1082 2017-05-25  Joseph Pecoraro  <pecoraro@apple.com>
1083
1084         _WKUserStyleSheet leaks string data
1085         https://bugs.webkit.org/show_bug.cgi?id=172583
1086         <rdar://problem/32395209>
1087
1088         Reviewed by Dan Bernstein.
1089
1090         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
1091         (-[_WKUserStyleSheet dealloc]):
1092
1093 2017-05-24  Joseph Pecoraro  <pecoraro@apple.com>
1094
1095         Increase the headerpad for WebKit XPC Services
1096         https://bugs.webkit.org/show_bug.cgi?id=172571
1097
1098         Reviewed by Dan Bernstein.
1099
1100         * Configurations/BaseXPCService.xcconfig:
1101         Increase the headerpad to make room for additional dyld commands.
1102
1103 2017-05-24  David Keijser  <keijser@gmail.com>
1104
1105         [GTK] Provide details on javascript exception
1106         https://bugs.webkit.org/show_bug.cgi?id=161187
1107
1108         Reviewed by Carlos Garcia Campos.
1109
1110         * UIProcess/API/gtk/WebKitWebView.cpp:
1111         (webkitWebViewRunJavaScriptCallback):
1112         (webkit_web_view_run_javascript):
1113         (resourcesStreamReadCallback):
1114
1115 2017-05-24  Ryan Haddad  <ryanhaddad@apple.com>
1116
1117         Unreviewed, suppress deprecation warnings to fix the build.
1118
1119         * Shared/mac/ColorSpaceData.mm:
1120         (WebKit::ColorSpaceData::decode):
1121
1122 2017-05-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1123
1124         Plumb additional image metadata to item providers when beginning data interaction on an image
1125         https://bugs.webkit.org/show_bug.cgi?id=172536
1126         <rdar://problem/32371300>
1127
1128         Reviewed by Beth Dakin.
1129
1130         Boilerplate plumbing to send suggestedName over IPC.
1131
1132         * Shared/WebCoreArgumentCoders.cpp:
1133         (IPC::ArgumentCoder<PasteboardImage>::encode):
1134         (IPC::ArgumentCoder<PasteboardImage>::decode):
1135
1136 2017-05-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1137
1138         [WK2] Remove workaround to disable zooming to the focus rect while performing a data interaction
1139         https://bugs.webkit.org/show_bug.cgi?id=172546
1140
1141         Reviewed by Beth Dakin.
1142
1143         Removes a now-unnecessary workaround to prevent scrolling when performing a data interaction operation in
1144         editable content.
1145
1146         * UIProcess/ios/WKContentViewInteraction.mm:
1147         (-[WKContentView _displayFormNodeInputView]):
1148
1149 2017-05-24  John Wilander  <wilander@apple.com>
1150
1151         Resource Load Statistics: Change grandfathering default to one hour
1152         https://bugs.webkit.org/show_bug.cgi?id=172524
1153         <rdar://problem/32360462>
1154
1155         Reviewed by Brent Fulgham.
1156
1157         * Shared/WebPreferencesDefinitions.h:
1158         * UIProcess/WebResourceLoadStatisticsManager.cpp:
1159         (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
1160
1161 2017-05-24  Jer Noble  <jer.noble@apple.com>
1162
1163         Rename DisplaySleepDisabler -> SleepDisabler
1164         https://bugs.webkit.org/show_bug.cgi?id=172478
1165
1166         Reviewed by Sam Weinig.
1167
1168         * UIProcess/mac/WKFullScreenWindowController.h:
1169         * UIProcess/mac/WKFullScreenWindowController.mm:
1170
1171 2017-05-23  John Wilander  <wilander@apple.com>
1172
1173         Resource Load Statistics: Don't include HSTS cache data in website data removal
1174         https://bugs.webkit.org/show_bug.cgi?id=172525
1175         <rdar://problem/32332704>
1176
1177         Reviewed by Brent Fulgham.
1178
1179         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1180         (WebKit::initializeDataTypesToRemove):
1181
1182 2017-05-15  Matt Rajca  <mrajca@apple.com>
1183
1184         Replace autoplay events that fire at navigation with a DidAutoplayMediaPastThreshold event.
1185         https://bugs.webkit.org/show_bug.cgi?id=172138
1186
1187         Reviewed by Alex Christensen.
1188
1189         Updated auto-play event types.
1190
1191         * Shared/WebCoreArgumentCoders.h:
1192         * UIProcess/API/C/WKPage.cpp:
1193         (WKPageSetPageUIClient):
1194         * UIProcess/API/C/WKPageUIClient.h:
1195
1196 2017-05-23  Chris Dumez  <cdumez@apple.com>
1197
1198         ASSERT(!m_timeoutTimer.isActive()) hit in BackgroundProcessResponsivenessTimer::responsivenessCheckTimerFired()
1199         https://bugs.webkit.org/show_bug.cgi?id=172509
1200         <rdar://problem/32251578>
1201
1202         Reviewed by Geoffrey Garen.
1203
1204         In the BackgroundProcessResponsivenessTimer class, we have 2 timers:
1205         - m_responsivenessCheckTimer that causes us to do an IPC handshake with
1206           the WebProcess.
1207         - m_timeoutTimer that is started when we send the IPC message to the
1208           WebProcess and which is stopped when we get the response from the
1209           WebProcess. If we do not get the response by the time m_timeoutTimer
1210           fires, then we mark the process as unresponsive.
1211
1212         As a result, of the behavior above, whenever the BackgroundProcessResponsivenessTimer
1213         is considered "active", there should be one of the 2 timers above that
1214         is active, and only one.
1215
1216         The assertion hit showed that we decided to start the m_responsivenessCheckTimer
1217         timer even though the m_timeoutTimer timer is still active (we are still waiting
1218         for an IPC message from the WebProcess and the process is not considered
1219         unresponsive yet), which is wrong. The reason was that in
1220         BackgroundProcessResponsivenessTimer::updateState(), if we should be active,
1221         we would start the m_responsivenessCheckTimer if m_responsivenessCheckTimer is
1222         not already active, without checking if m_timeoutTimer is active. So if
1223         updateState() was called while the IPC handshake was in process, we would have
1224         both timers running at the same time.
1225
1226         * UIProcess/BackgroundProcessResponsivenessTimer.cpp:
1227         (WebKit::BackgroundProcessResponsivenessTimer::updateState):
1228         (WebKit::BackgroundProcessResponsivenessTimer::isActive):
1229         * UIProcess/BackgroundProcessResponsivenessTimer.h:
1230
1231 2017-05-22  Simon Fraser  <simon.fraser@apple.com>
1232
1233         Snapshotting via -renderInContext: should do synchronous image decodes
1234         https://bugs.webkit.org/show_bug.cgi?id=172485
1235         rdar://problem/32276146
1236
1237         Reviewed by Tim Horton.
1238
1239         Pass the PaintBehaviorSnapshotting flag in functions that do snapshotting.
1240
1241         * Shared/mac/RemoteLayerBackingStore.mm:
1242         (WebKit::RemoteLayerBackingStore::drawInContext):
1243         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1244         (WebKit::imageForRect):
1245         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1246         (WebKit::InjectedBundleRangeHandle::renderedImage):
1247
1248 2017-05-23  Myles C. Maxfield  <mmaxfield@apple.com>
1249
1250         Remove dead ENABLE(FONT_LOAD_EVENTS) code
1251         https://bugs.webkit.org/show_bug.cgi?id=172517
1252
1253         Rubber-stamped by Simon Fraser.
1254
1255         * Configurations/FeatureDefines.xcconfig:
1256
1257 2017-05-23  Tim Horton  <timothy_horton@apple.com>
1258
1259         Zoom in/out is slow in Safari with large PDFs
1260         https://bugs.webkit.org/show_bug.cgi?id=172495
1261         <rdar://problem/32338631>
1262
1263         Reviewed by Simon Fraser.
1264
1265         No tests; just a performance improvement.
1266
1267         * WebProcess/Plugins/PDF/PDFPlugin.h:
1268         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1269         (WebKit::PDFPlugin::computePageBoxes):
1270         Use PDFKit instead of CGPDF to compute the first page box, so we can take
1271         advantage of PDFKit optimizations. PDFKit also handles box fallback,
1272         so we don't need to do that ourselves. Stop fetching all the boxes, as
1273         we only seem to use the first one.
1274
1275 2017-05-23  Tim Horton  <timothy_horton@apple.com>
1276
1277         REGRESSION: API test WebKit2.WKObject is failing
1278         https://bugs.webkit.org/show_bug.cgi?id=172497
1279         <rdar://problem/31694641>
1280
1281         Reviewed by Geoff Garen.
1282
1283         * Shared/Cocoa/WKNSString.mm:
1284         (-[WKNSString superclass]):
1285         (-[WKNSString class]):
1286         Pretend to be NSString instead of the more specific subclass (__NSCFString)
1287         that we actually are. There is code underneath us that assumes that if
1288         -class returns __NSCFString, that the object is a CFStringRef, which is
1289         not true in our case.
1290
1291 2017-05-23  Brent Fulgham  <bfulgham@apple.com>
1292
1293         [WK2][iOS] Add a mach-lookup exception for 'com.apple.analyticsd'
1294         https://bugs.webkit.org/show_bug.cgi?id=172462
1295         <rdar://problem/32331638>
1296
1297         Reviewed by Alexey Proskuryakov.
1298
1299         * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
1300         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1301         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1302
1303 2017-05-22  Brent Fulgham  <bfulgham@apple.com>
1304
1305         [WK2][iOS] Adopt a whitelist for XPC services
1306         https://bugs.webkit.org/show_bug.cgi?id=172182
1307         <rdar://problem/30669445>
1308
1309         Reviewed by Sam Weinig.
1310
1311         Tell the Sandbox to block all XPC connections that are not explicitly allowed by
1312         the sandbox profile. The default behavior is to allow everything by default.
1313
1314         If the restriction is set before including the standard iOS sandbox profiles, there
1315         does not seem to be a need to white list any other services. 
1316
1317         General web browsing on multiple devices indicate that these sandbox profiles work
1318         properly with media, accessibility, webgl, and general web content.
1319
1320         * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
1321         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1322         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1323
1324 2017-05-23  Emilio Cobos Álvarez  <ecobos@igalia.com>
1325
1326         Add a RuntimeEnabledFeature for display: contents, defaulted to false.
1327         https://bugs.webkit.org/show_bug.cgi?id=171984
1328
1329         Reviewed by Antti Koivisto.
1330
1331         * Shared/WebPreferencesDefinitions.h:
1332         * UIProcess/API/C/WKPreferences.cpp:
1333         (WKPreferencesSetDisplayContentsEnabled):
1334         (WKPreferencesGetDisplayContentsEnabled):
1335         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1336         * WebProcess/WebPage/WebPage.cpp:
1337         (WebKit::WebPage::updatePreferences):
1338
1339 2017-05-20  Alex Christensen  <achristensen@webkit.org>
1340
1341         REGRESSION(r215686): O(n^2) algorithm in CachedRawResource::addDataBuffer
1342         https://bugs.webkit.org/show_bug.cgi?id=172406
1343         <rdar://32109532>
1344
1345         Reviewed by Brady Eidson.
1346
1347         * Platform/IPC/DataReference.cpp:
1348         (IPC::SharedBufferDataReference::encode):
1349         * WebProcess/Plugins/PluginView.cpp:
1350         (WebKit::PluginView::redeliverManualStream):
1351
1352 2017-05-22  Yongjun Zhang  <yongjun_zhang@apple.com>
1353
1354         Need a way to allow WKWebView to load request with ShouldOpenExternalURLsPolicy::ShouldAllow.
1355         https://bugs.webkit.org/show_bug.cgi?id=172460
1356
1357         Add an new method [WKWebView _loadRequest:shouldOpenExternalURLs:] to WKWebView; a WebKit client
1358         can use this to load request that allows opening external URLs.
1359
1360         Reviewed by Tim Horton.
1361
1362         * UIProcess/API/Cocoa/WKWebView.mm:
1363         (-[WKWebView _loadRequest:shouldOpenExternalURLs:]): When calling WebPageProxy::loadRequest, also
1364             set ShouldOpenExternalURLsPolicy based on the value of shouldOpenExternalURLs.
1365         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add [WKWebView _loadRequest:shouldOpenExternalURLs:].
1366
1367 2017-05-22  Youenn Fablet  <youenn@apple.com>
1368
1369         Remove AVAudioCaptureSource
1370         https://bugs.webkit.org/show_bug.cgi?id=172360
1371
1372         Reviewed by Sam Weinig.
1373
1374         Removing the handling of AVAudio/CoreAudio capture source dynamic switch.
1375
1376         * Shared/WebPreferencesDefinitions.h:
1377         * UIProcess/API/C/WKPreferences.cpp:
1378         (WKPreferencesSetUseAVFoundationAudioCapture): Deleted.
1379         (WKPreferencesGetUseAVFoundationAudioCapture): Deleted.
1380         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1381         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1382         (WebKit::UserMediaPermissionRequestManagerProxy::syncWithWebCorePrefs):
1383         * WebProcess/WebPage/WebPage.cpp:
1384         (WebKit::WebPage::updatePreferences):
1385
1386 2017-05-22  Brian Burg  <bburg@apple.com>
1387
1388         Web Automation: characters produced with shift modifier on QWERTY keyboard should be delivered as shift-down, char-down, char-up, shift-up events
1389         https://bugs.webkit.org/show_bug.cgi?id=172299
1390         <rdar://problem/32277988>
1391
1392         Reviewed by Joseph Pecoraro.
1393
1394         WebDriver tests expect some ASCII characters to be produced using the shift key,
1395         regardless of the actual keyboard layout. Emit extra events when simulating these
1396         keystrokes if the shift key is not already pressed.
1397
1398         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
1399         (WebKit::characterIsProducedUsingShift):
1400         (WebKit::WebAutomationSession::platformSimulateKeySequence):
1401
1402 2017-05-22  Sam Weinig  <sam@webkit.org>
1403
1404         [WebIDL] Support callbacks with arbitrary return types
1405         https://bugs.webkit.org/show_bug.cgi?id=172407
1406
1407         Reviewed by Chris Dumez.
1408
1409         * WebProcess/InjectedBundle/API/gtk/DOM/GObjectNodeFilterCondition.cpp:
1410         * WebProcess/InjectedBundle/API/gtk/DOM/GObjectNodeFilterCondition.h:
1411         Update to match new interface of NodeFilterCondition.
1412
1413         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
1414         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
1415         Update to account for new WebCore implementation return types.
1416
1417 2017-05-22  Michael Catanzaro  <mcatanzaro@igalia.com>
1418
1419         -Wreturn-type warning triggered by WKPage.cpp:2277
1420         https://bugs.webkit.org/show_bug.cgi?id=171866
1421
1422         Reviewed by Žan Doberšek.
1423
1424         * UIProcess/API/C/WKPage.cpp:
1425         (WKPageSetPageUIClient):
1426
1427 2017-05-22  Michael Catanzaro  <mcatanzaro@igalia.com>
1428
1429         -Wreturn-type warning triggered by WebAutomationSession.cpp:851
1430         https://bugs.webkit.org/show_bug.cgi?id=171867
1431
1432         Reviewed by Žan Doberšek.
1433
1434         * UIProcess/Automation/WebAutomationSession.cpp:
1435         (WebKit::protocolModifierToWebEventModifier):
1436
1437 2017-05-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1438
1439         Remove unused documentIsHandlingNonDefaultDrag plumbing for WebKit2
1440         https://bugs.webkit.org/show_bug.cgi?id=172453
1441
1442         Reviewed by Tim Horton.
1443
1444         Removes unused plumbing that was originally added to support file uploads.
1445
1446         * UIProcess/WebPageProxy.cpp:
1447         (WebKit::WebPageProxy::didPerformDragControllerAction):
1448         (WebKit::WebPageProxy::resetCurrentDragInformation):
1449         * UIProcess/WebPageProxy.h:
1450         (WebKit::WebPageProxy::currentDragCaretRect):
1451         (WebKit::WebPageProxy::documentIsHandlingNonDefaultDrag): Deleted.
1452         * UIProcess/WebPageProxy.messages.in:
1453         * WebProcess/WebPage/WebPage.cpp:
1454         (WebKit::WebPage::performDragControllerAction):
1455
1456 2017-05-22  Michael Catanzaro  <mcatanzaro@igalia.com>
1457
1458         Add even more input validation in Connection::processMessage()
1459         https://bugs.webkit.org/show_bug.cgi?id=171682
1460
1461         Reviewed by Carlos Garcia Campos.
1462
1463         Verify that the size of the out-of-line message body matches the size of the AttachmentInfo
1464         that is containing it.
1465
1466         * Platform/IPC/unix/ConnectionUnix.cpp:
1467         (IPC::Connection::processMessage):
1468
1469 2017-05-22  Tomas Popela  <tpopela@redhat.com>
1470
1471         Remove some of the EFL port leftovers
1472         https://bugs.webkit.org/show_bug.cgi?id=172440
1473
1474         Reviewed by Carlos Garcia Campos.
1475
1476         * Scripts/generate-forwarding-headers.pl:
1477
1478 2017-05-22  Gwang Yoon Hwang  <yoon@igalia.com>
1479
1480         [CoordinatedGraphics] Clear UpdateAtlases for each tests
1481         https://bugs.webkit.org/show_bug.cgi?id=172119
1482
1483         Reviewed by Carlos Garcia Campos.
1484
1485         In Coordinated Graphics, we reuses at least one update atlas to
1486         render root compositing layer for several tests. So if one of the
1487         test cases breaks the internal states of Cairo's states, other
1488         followed test cases runs on same instance of WebKitTestRunner will
1489         be effected by broken states of Cairo. Because it increases test
1490         flaknesses, we should drop update atlases after each tests.
1491
1492         * WebProcess/WebCoreSupport/WebChromeClient.cpp: Remove a redundant
1493         include statement for Coordinated graphics
1494         (WebKit::WebChromeClient::resetUpdateAtlasForTesting): Added.
1495         * WebProcess/WebCoreSupport/WebChromeClient.h:
1496         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1497         (WebKit::AcceleratedDrawingArea::resetUpdateAtlasForTesting): Added.
1498         * WebProcess/WebPage/AcceleratedDrawingArea.h:
1499         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
1500         (WebKit::CompositingCoordinator::clearUpdateAtlases): Added.
1501         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
1502         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1503         (WebKit::CoordinatedLayerTreeHost::clearUpdateAtlases): Added.
1504         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1505         * WebProcess/WebPage/DrawingArea.h:
1506         * WebProcess/WebPage/LayerTreeHost.h:
1507         * WebProcess/WebPage/wpe/DrawingAreaWPE.cpp:
1508         (WebKit::DrawingAreaWPE::resetUpdateAtlasForTesting):
1509         * WebProcess/WebPage/wpe/DrawingAreaWPE.h:
1510
1511 2017-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1512
1513         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.17.3 release.
1514
1515         * gtk/NEWS: Add release notes for 2.17.3.
1516
1517 2017-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1518
1519         [GTK] Add webkit_context_menu_item_new_from_gaction
1520         https://bugs.webkit.org/show_bug.cgi?id=159631
1521
1522         Reviewed by Michael Catanzaro.
1523
1524         Add new API to create a WebKitContextMenuItem from a GAction and also to get the associated GAction.
1525
1526         * Shared/gtk/WebContextMenuItemGtk.cpp:
1527         (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk): Add constructor that receives a GAction.
1528         (WebKit::isGActionChecked): Helper to check if a stateful GAction is checked or not.
1529         (WebKit::WebContextMenuItemGtk::createActionIfNeeded): When creating a GAction from a GtkAtion, use the
1530         GtkAction name instead of adding a new one. Do not create the GAction if we already have one.
1531         * Shared/gtk/WebContextMenuItemGtk.h:
1532         (WebKit::WebContextMenuItemGtk::gAction):
1533         (WebKit::WebContextMenuItemGtk::gActionTarget):
1534         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
1535         (webkit_context_menu_item_new_from_gaction):
1536         (webkit_context_menu_item_get_gaction):
1537         * UIProcess/API/gtk/WebKitContextMenuItem.h:
1538         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
1539         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1540         (WebKit::contextMenuItemActivatedCallback): Update the state of the internal GAction in case of toggle menu items.
1541         (WebKit::WebContextMenuProxyGtk::append): Pass the GAction target to g_menu_item_set_action_and_target_value. Do
1542         not connect to activate signal of actions provided by the user.
1543
1544 2017-05-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1545
1546         Add more input validation in Connection::readBytesFromSocket()
1547         https://bugs.webkit.org/show_bug.cgi?id=171871
1548
1549         Reviewed by Michael Catanzaro.
1550
1551         Check the control message length is in the limits. Credit to Nathan Crandall for reporting this issue and
1552         submitting an equivalent fix.
1553
1554         * Platform/IPC/unix/ConnectionUnix.cpp:
1555         (IPC::readBytesFromSocket):
1556
1557 2017-05-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1558
1559         -Wreturn-type warning triggered by WKNotification.cpp:77
1560         https://bugs.webkit.org/show_bug.cgi?id=172414
1561
1562         Reviewed by Sam Weinig.
1563
1564         * UIProcess/API/C/WKNotification.cpp:
1565         (WKNotificationCopyDir):
1566
1567 2017-05-19  John Wilander  <wilander@apple.com>
1568
1569         Resource Load Statistics: Use WebProcessPool::allProcessPools() when sending message to network process about partitioning
1570         https://bugs.webkit.org/show_bug.cgi?id=172370
1571         <rdar://problem/32288012>
1572
1573         Reviewed by Alex Christensen.
1574
1575         The existing test case
1576         http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html
1577         is currently failing and should start passing again with this patch.
1578
1579         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1580         (WebKit::WebsiteDataStore::shouldPartitionCookiesForTopPrivatelyOwnedDomains):
1581
1582 2017-05-19  Chris Dumez  <cdumez@apple.com>
1583
1584         [WK2] Notify client when a process exceeds background CPU limit while in the foreground
1585         https://bugs.webkit.org/show_bug.cgi?id=172246
1586         <rdar://problem/32235411>
1587
1588         Reviewed by Geoffrey Garen.
1589
1590         When there is a background CPU limit set by the client, we now monitor the CPU
1591         usages of all WebContent processes, not just the non-visible ones. This way, we
1592         are now able to notify the client a process has exceeded the background CPU
1593         limit while in the foreground, via the UIClient's didExceedBackgroundResourceLimitWhileInForeground
1594         function, passing kWKResourceLimitCPU.
1595
1596         * Shared/WebPageCreationParameters.cpp:
1597         (WebKit::WebPageCreationParameters::encode):
1598         (WebKit::WebPageCreationParameters::decode):
1599         * Shared/WebPageCreationParameters.h:
1600         * UIProcess/API/APIPageConfiguration.cpp:
1601         (API::PageConfiguration::copy):
1602         * UIProcess/API/APIPageConfiguration.h:
1603         (API::PageConfiguration::cpuLimit):
1604         (API::PageConfiguration::setCPULimit):
1605         * UIProcess/API/C/WKPageConfigurationRef.cpp:
1606         (WKPageConfigurationSetBackgroundCPULimit):
1607         * UIProcess/WebPageProxy.cpp:
1608         (WebKit::WebPageProxy::updateThrottleState):
1609         (WebKit::WebPageProxy::creationParameters):
1610         (WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive):
1611         (WebKit::WebPageProxy::didExceedBackgroundCPULimitWhileInForeground):
1612         * UIProcess/WebPageProxy.h:
1613         * UIProcess/WebProcessProxy.cpp:
1614         (WebKit::WebProcessProxy::didExceedCPULimit):
1615         * UIProcess/WebProcessProxy.h:
1616         * UIProcess/WebProcessProxy.messages.in:
1617         * WebProcess/WebPage/WebPage.cpp:
1618         (WebKit::m_cpuLimit):
1619         * WebProcess/WebPage/WebPage.h:
1620         (WebKit::WebPage::cpuLimit):
1621         * WebProcess/WebProcess.cpp:
1622         (WebKit::WebProcess::createWebPage):
1623         (WebKit::WebProcess::removeWebPage):
1624         (WebKit::WebProcess::updateCPULimit):
1625         (WebKit::WebProcess::updateCPUMonitorState):
1626         (WebKit::WebProcess::pageActivityStateDidChange):
1627         * WebProcess/WebProcess.h:
1628         * WebProcess/cocoa/WebProcessCocoa.mm:
1629         (WebKit::WebProcess::updateCPULimit):
1630         (WebKit::WebProcess::updateCPUMonitorState):
1631
1632 2017-05-19  Jeremy Jones  <jeremyj@apple.com>
1633
1634         Remove defunct WebVideoFullscreenInterface
1635         https://bugs.webkit.org/show_bug.cgi?id=172254
1636
1637         Reviewed by Jon Lee.
1638
1639         Remove reference to WebVideoFullscreenInterface. It has long since been replaced by
1640         WebVideoFullscreenModelClient.
1641
1642         * WebProcess/cocoa/WebVideoFullscreenManager.h:
1643
1644 2017-05-19  Jeremy Jones  <jeremyj@apple.com>
1645
1646         [WebRTC] Remove PiP support for video elements that are showing camera capture
1647         https://bugs.webkit.org/show_bug.cgi?id=172336
1648
1649         Reviewed by Eric Carlson.
1650
1651         Ask video element if it supports picture-in-picture instead of asking the mediaSession directly.
1652         This allows the video element to give a more robust answer.
1653
1654         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
1655         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
1656
1657 2017-05-19  Chris Dumez  <cdumez@apple.com>
1658
1659         Make sure implementation of InitializeWebKit2() always run on the main thread
1660         https://bugs.webkit.org/show_bug.cgi?id=172362
1661         <rdar://problem/32295678>
1662
1663         Reviewed by Geoffrey Garen.
1664
1665         Add logic in InitializeWebKit2() for Cocoa ports to always run the initialization code
1666         is only called once, and on the main thread. If we are called from a non-main thread,
1667         we will dispatch synchronously to the main thread to run the initialization code.
1668
1669         This is needed because WebKit2Initialize() is called from the API::Object constructor.
1670         API::Object is thread-safe RefCounted and those objects are sometimes initialized on
1671         non-main thread. If the first of such objects happened to be initialized on a non-main
1672         thread, then we would run the initialization code for the first time on a non-main
1673         thread. This would lead to hard to debug issues because code such as
1674         RunLoop::initializeMainRunLoop() is only safe to call on the main thread because it
1675         stores a pointer to the current thread's RunLoop in a static variable for later use
1676         (i.e. for RunLoop::main()).
1677
1678         * Shared/Cocoa/WebKit2InitializeCocoa.mm: Copied from Source/WebKit2/Shared/WebKit2Initialize.cpp.
1679         (WebKit::runInitializationCode):
1680         (WebKit::InitializeWebKit2):
1681         * Shared/WebKit2Initialize.cpp:
1682         (WebKit::InitializeWebKit2):
1683         * WebKit2.xcodeproj/project.pbxproj:
1684
1685 2017-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1686
1687         REGRESSION(r216977): [GTK] Ephemeral sessions broken after r216977
1688         https://bugs.webkit.org/show_bug.cgi?id=172345
1689
1690         Reviewed by Michael Catanzaro.
1691
1692         Since r216977, WebProcessPool sends the page session ID to the web process, but the WebsiteDataStoreParameters
1693         session ID to the network process. WebsiteDataStoreParameters is only implemented for Cocoa, so we are sending 0
1694         session ID to the network process, while using the right session ID everywhere else.
1695
1696         * UIProcess/WebProcessPool.cpp:
1697         (WebKit::WebProcessPool::pageAddedToProcess): Add an ASSERT to ensure we are sending the same session ID to Web
1698         and Network processes.
1699         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1700         (WebKit::WebsiteDataStore::parameters): Add minimal implementation for non-Cocoa ports to at least set the
1701         session ID.
1702
1703 2017-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1704
1705         Add more input validation in Connection::processMessage()
1706         https://bugs.webkit.org/show_bug.cgi?id=171682
1707
1708         Reviewed by Michael Catanzaro.
1709
1710         Check limits of attachments and message size. Credit to Nathan Crandall for reporting this issue and submitting
1711         an equivalent fix.
1712
1713         * Platform/IPC/unix/ConnectionUnix.cpp:
1714         (IPC::Connection::processMessage):
1715
1716 2017-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1717
1718         [Threaded Compositor] Remove platform ifdefs from threaded compositor implementation
1719         https://bugs.webkit.org/show_bug.cgi?id=172265
1720
1721         Reviewed by Žan Doberšek.
1722
1723         Add AcceleratedSurfaceWPE implementation that is equivalent to the PlatformDisplayWPE::EGLTarget. Since WPE needs the
1724         surface to be initialized/finalized in the compositing thread, two new virtual methods has been added to
1725         AcceleratedSurface initialize/finalize that are only implemented by WPE. The threaded compositor no longer
1726         receives a native surface handle as contructor parameter, it now asks the client for it from the compositing
1727         thread, right after it's created.
1728
1729         * PlatformWPE.cmake:
1730         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1731         (WebKit::ThreadedCompositor::create): Remove ativeSurfaceHandle parameter.
1732         (WebKit::ThreadedCompositor::ThreadedCompositor): Initialize m_nativeSurfaceHandle from the compositing thread
1733         asking the client for it.
1734         (WebKit::ThreadedCompositor::createGLContext): Remove the WPE implementation.
1735         (WebKit::ThreadedCompositor::invalidate): Notify the client that the GL context has been destroyed.
1736         (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing): Remove GTK ifdefs.
1737         (WebKit::ThreadedCompositor::setViewportSize): Remove WPE implementation.
1738         (WebKit::ThreadedCompositor::renderLayerTree): Notify the client the frame will be rendered, and when it has
1739         been rendered.
1740         (WebKit::ThreadedCompositor::frameComplete): Remove WPE ifdefs.
1741         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1742         * WebProcess/WebPage/AcceleratedSurface.cpp:
1743         (WebKit::AcceleratedSurface::create): Add client parameter.
1744         (WebKit::AcceleratedSurface::AcceleratedSurface): Create a AcceleratedSurfaceWPE if display is WPE.
1745         * WebProcess/WebPage/AcceleratedSurface.h:
1746         (WebKit::AcceleratedSurface::surfaceID):
1747         (WebKit::AcceleratedSurface::initialize):
1748         (WebKit::AcceleratedSurface::finalize):
1749         (WebKit::AcceleratedSurface::willRenderFrame):
1750         (WebKit::AcceleratedSurface::didRenderFrame):
1751         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
1752         (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): Pass this as client of AcceleratedSurface.
1753         (WebKit::ThreadedCoordinatedLayerTreeHost::frameComplete): Notify the compositor.
1754         (WebKit::ThreadedCoordinatedLayerTreeHost::nativeSurfaceHandleForCompositing): Initialize the surface and return
1755         the window handler.
1756         (WebKit::ThreadedCoordinatedLayerTreeHost::didDestroyGLContext): Finalize the surface.
1757         (WebKit::ThreadedCoordinatedLayerTreeHost::willRenderFrame): Notify the surface.
1758         (WebKit::ThreadedCoordinatedLayerTreeHost::didRenderFrame): Ditto.
1759         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
1760         * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp:
1761         (WebKit::AcceleratedSurfaceWayland::create): Add client parameter.
1762         (WebKit::AcceleratedSurfaceWayland::AcceleratedSurfaceWayland): Ditto.
1763         (WebKit::AcceleratedSurfaceWayland::didRenderFrame): Call Client::frameComplete().
1764         * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h:
1765         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
1766         (WebKit::AcceleratedSurfaceX11::create): Add client parameter.
1767         (WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11): Ditto.
1768         (WebKit::AcceleratedSurfaceX11::didRenderFrame): Call Client::frameComplete().
1769         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:
1770         * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp: Added.
1771         (WebKit::AcceleratedSurfaceWPE::create):
1772         (WebKit::AcceleratedSurfaceWPE::AcceleratedSurfaceWPE):
1773         (WebKit::AcceleratedSurfaceWPE::~AcceleratedSurfaceWPE):
1774         (WebKit::AcceleratedSurfaceWPE::initialize):
1775         (WebKit::AcceleratedSurfaceWPE::finalize):
1776         (WebKit::AcceleratedSurfaceWPE::window):
1777         (WebKit::AcceleratedSurfaceWPE::surfaceID):
1778         (WebKit::AcceleratedSurfaceWPE::resize):
1779         (WebKit::AcceleratedSurfaceWPE::willRenderFrame):
1780         (WebKit::AcceleratedSurfaceWPE::didRenderFrame):
1781         * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.h: Copied from Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h.
1782
1783 2017-05-19  Yusuke Suzuki  <utatane.tea@gmail.com>
1784
1785         [JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass
1786         https://bugs.webkit.org/show_bug.cgi?id=172098
1787
1788         Reviewed by Saam Barati.
1789
1790         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1791         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1792
1793 2017-05-18  Andreas Kling  <akling@apple.com>
1794
1795         [WK2] Notify WebPageProxy client when an active process goes over the inactive memory limit
1796         https://bugs.webkit.org/show_bug.cgi?id=172244
1797         <rdar://problem/31800943>
1798
1799         Reviewed by Geoffrey Garen.
1800
1801         Add a WKPageUIClient callback that is invoked when an active process exceeds the inactive memory limit.
1802
1803         With the current state of the implementation, this means that a UI client can learn that backgrounding
1804         a non-audible, non-capturing tab may cause it to get killed once the active/inactive hysteresis time
1805         is over (8 minutes.)
1806
1807         The callback can be invoked multiple times if we exceed the limit, and then go under, and exceed again.
1808
1809         This is the callback:
1810
1811             didExceedBackgroundResourceLimitWhileInForeground(WKPageRef, WKResourceLimit)
1812
1813         Where WKResourceLimit is one of { kWKResourceLimitMemory, kWKResourceLimitCPU }
1814         The CPU enum value is a placeholder pending implementation soon.
1815
1816         * UIProcess/API/APIUIClient.h:
1817         (API::UIClient::didExceedBackgroundResourceLimitWhileInForeground):
1818         * UIProcess/API/C/WKPage.cpp:
1819         (WKPageSetPageUIClient):
1820         * UIProcess/API/C/WKPageUIClient.h:
1821         * UIProcess/WebPageProxy.cpp:
1822         (WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive):
1823         * UIProcess/WebPageProxy.h:
1824         * UIProcess/WebProcessProxy.cpp:
1825         (WebKit::WebProcessProxy::didExceedInactiveMemoryLimitWhileActive):
1826         * UIProcess/WebProcessProxy.h:
1827         * UIProcess/WebProcessProxy.messages.in:
1828         * WebProcess/WebProcess.cpp:
1829         (WebKit::WebProcess::initializeWebProcess):
1830
1831 2017-05-18  Eric Carlson  <eric.carlson@apple.com>
1832
1833         [MediaStream] do not cache gUM permissions
1834         https://bugs.webkit.org/show_bug.cgi?id=172245
1835
1836         Reviewed by Youenn Fablet.
1837
1838         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1839         (WebKit::UserMediaPermissionRequestManagerProxy::invalidatePendingRequests):
1840         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
1841         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
1842         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
1843         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1844         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
1845         (WebKit::FrameAuthorizationState::FrameAuthorizationState): Deleted.
1846         (WebKit::FrameAuthorizationState::hasPermissionToUseCaptureDevice): Deleted.
1847         (WebKit::FrameAuthorizationState::setHasPermissionToUseCaptureDevice): Deleted.
1848         (WebKit::FrameAuthorizationState::ensureSecurityOriginsAreEqual): Deleted.
1849         (WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest): Deleted.
1850         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1851         (WebKit::FrameAuthorizationState::setDeviceIdentifierHashSalt): Deleted.
1852         (WebKit::FrameAuthorizationState::deviceIdentifierHashSalt): Deleted.
1853         * UIProcess/UserMediaPermissionRequestProxy.cpp:
1854         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
1855         * UIProcess/UserMediaPermissionRequestProxy.h:
1856         (WebKit::UserMediaPermissionRequestProxy::create):
1857         (WebKit::UserMediaPermissionRequestProxy::deviceIdentifierHashSalt):
1858
1859 2017-05-18  Tim Horton  <timothy_horton@apple.com>
1860
1861         Data interaction conclusion snapshot has too much margin
1862         https://bugs.webkit.org/show_bug.cgi?id=172323
1863         <rdar://problem/32283772>
1864
1865         Reviewed by Beth Dakin.
1866
1867         * WebProcess/WebPage/ios/WebPageIOS.mm:
1868         (WebKit::WebPage::didConcludeEditDataInteraction):
1869         Disable the default TextIndicator margin.
1870
1871 2017-05-18  Andy Estes  <aestes@apple.com>
1872
1873         ENABLE(APPLE_PAY_DELEGATE) should be NO on macOS Sierra and earlier
1874         https://bugs.webkit.org/show_bug.cgi?id=172305
1875
1876         Reviewed by Anders Carlsson.
1877
1878         * Configurations/FeatureDefines.xcconfig:
1879
1880 2017-05-18  John Wilander  <wilander@apple.com>
1881
1882         Resource Load Statistics: Grandfather domains for existing data records
1883         https://bugs.webkit.org/show_bug.cgi?id=172155
1884         <rdar://problem/24913532>
1885
1886         Reviewed by Alex Christensen.
1887
1888         When WebResourceLoadStatisticsStore starts fresh it needs
1889         to scan existing website data records and 'grandfather' them to
1890         allow ample time to capture user interaction.
1891
1892         * Shared/WebPreferencesDefinitions.h:
1893         * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
1894         (WKResourceLoadStatisticsManagerSetGrandfathered):
1895         (WKResourceLoadStatisticsManagerIsGrandfathered):
1896         (WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
1897         (WKResourceLoadStatisticsManagerSetGrandfatheringTime):
1898             Functions for testing and configuration.
1899         * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
1900         * UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm:
1901         (WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):
1902             Added grandfathering configuration.
1903         * UIProcess/WebProcessProxy.cpp:
1904         (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData):
1905             New function to get all top privately controlled domains that
1906             have website data.
1907         * UIProcess/WebProcessProxy.h:
1908         * UIProcess/WebResourceLoadStatisticsManager.cpp:
1909         (WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
1910         (WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
1911         (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
1912         (WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
1913         (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
1914             Functions for testing and configuration.
1915             WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval() changed
1916             as a result of WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval()
1917             moving to WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
1918         * UIProcess/WebResourceLoadStatisticsManager.h:
1919         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1920         (WebKit::initializeDataTypesToRemove):
1921         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
1922             Moved handling of pending removal into WebCore::ResourceLoadStatisticsStore since
1923             that's where grandfathering happens.
1924         (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
1925             Moved registration of write persistent store callback and reading of Cocoa defaults to
1926             WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver without parameters
1927             so they are called for platforms without CFNETWORK_STORAGE_PARTITIONING.
1928             Now includes registering WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
1929             as handler for grandfathering since it involves reading of the website data store.
1930         (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
1931         (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
1932         (WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval): Deleted.
1933             Now happens in WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
1934         * UIProcess/WebResourceLoadStatisticsStore.h:
1935         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
1936         (WebKit::WebsiteDataRecord::topPrivatelyControlledDomain):
1937             New function to ask a WebsiteDataRecord for its top privately controlled domain.
1938         * UIProcess/WebsiteData/WebsiteDataRecord.h:
1939         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1940         (WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):
1941             New function to get all top privately controlled domains that
1942             have website data.
1943         * UIProcess/WebsiteData/WebsiteDataStore.h:
1944
1945 2017-05-18  Andy Estes  <aestes@apple.com>
1946
1947         Add "countryCode" to ApplePayErrorContactField
1948         https://bugs.webkit.org/show_bug.cgi?id=172264
1949         <rdar://problem/32004909>
1950
1951         Reviewed by Anders Carlsson.
1952
1953         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1954         (WebKit::toNSError):
1955
1956 2017-05-18  Commit Queue  <commit-queue@webkit.org>
1957
1958         Unreviewed, rolling out r217031, r217032, and r217037.
1959         https://bugs.webkit.org/show_bug.cgi?id=172293
1960
1961         cause linking errors in Windows (Requested by yusukesuzuki on
1962         #webkit).
1963
1964         Reverted changesets:
1965
1966         "[JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass"
1967         https://bugs.webkit.org/show_bug.cgi?id=172098
1968         http://trac.webkit.org/changeset/217031
1969
1970         "Unreviewed, rebaseline for newly added ClassInfo"
1971         https://bugs.webkit.org/show_bug.cgi?id=172098
1972         http://trac.webkit.org/changeset/217032
1973
1974         "Unreviewed, fix debug and non-JIT build"
1975         https://bugs.webkit.org/show_bug.cgi?id=172098
1976         http://trac.webkit.org/changeset/217037
1977
1978 2017-05-18  Claudio Saavedra  <csaavedra@igalia.com>
1979
1980         [WPE] Unreviewed build fix
1981
1982         Add missing header after r217041.
1983         * UIProcess/API/wpe/WPEView.cpp:
1984
1985 2017-05-18  Tim Horton  <timothy_horton@apple.com>
1986
1987         More WebKit2 header cleanup
1988         https://bugs.webkit.org/show_bug.cgi?id=172214
1989
1990         Reviewed by Simon Fraser.
1991
1992         * Shared/WebFindOptions.h:
1993         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
1994         * UIProcess/Cocoa/WebViewImpl.mm:
1995         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1996         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1997         * UIProcess/UserMediaPermissionRequestProxy.h:
1998         * UIProcess/WebPageProxy.cpp:
1999         (WebKit::WebPageProxy::setCompositionAsync):
2000         * UIProcess/WebPageProxy.h:
2001         * UIProcess/mac/PageClientImpl.mm:
2002         * UIProcess/mac/ViewGestureControllerMac.mm:
2003         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
2004         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
2005         * WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
2006         * WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
2007         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
2008         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
2009         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2010         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
2011         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
2012         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2013         * WebProcess/Notifications/WebNotificationManager.cpp:
2014         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2015         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2016         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2017         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2018         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2019         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
2020         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
2021         * WebProcess/WebCoreSupport/WebValidationMessageClient.cpp:
2022         * WebProcess/WebPage/WebPage.cpp:
2023         (WebKit::WebPage::WebPage):
2024         (WebKit::WebPage::setDeviceScaleFactor):
2025         (WebKit::WebPage::centerSelectionInVisibleArea):
2026         (WebKit::WebPage::findString):
2027         (WebKit::WebPage::findStringMatches):
2028         (WebKit::WebPage::getImageForFindMatch):
2029         (WebKit::WebPage::selectFindMatch):
2030         (WebKit::WebPage::hideFindUI):
2031         (WebKit::WebPage::countStringMatches):
2032         (WebKit::WebPage::didReceiveGeolocationPermissionDecision):
2033         (WebKit::WebPage::mainFrameDidLayout):
2034         (WebKit::WebPage::setCompositionAsync):
2035         * WebProcess/WebPage/WebPage.h:
2036         (WebKit::WebPage::findController):
2037         (WebKit::WebPage::geolocationPermissionRequestManager):
2038         * WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
2039         Many small changes added up to a few percent. Removing UserMediaRequest
2040         from UserMediaPermissionRequestProxy, which is included into WebPageProxy.h,
2041         was worth another ~10% because it got VM.h out of WebPageProxy.h (like the
2042         previous patch did with WebPage.h). In total, in my measurement (WebKit2
2043         clean debug build) this is a ~15% speedup.
2044
2045         We really should figure out how to make DOMPromise.h not bring in all of
2046         JavaScriptCore (or how to use promises without including DOMPromise.h in headers).
2047
2048 2017-05-17  Chris Dumez  <cdumez@apple.com>
2049
2050         Fix unsafe lambda capture in ContentRuleListStore::lookupContentRuleList()
2051         https://bugs.webkit.org/show_bug.cgi?id=172258
2052
2053         Reviewed by Brady Eidson.
2054
2055         Fix unsafe lambda capture in ContentRuleListStore::lookupContentRuleList(). The String
2056         was moved instead of calling isolatedCopy(), even though we're passing the String to
2057         another thread.
2058
2059         * UIProcess/API/APIContentRuleListStore.cpp:
2060         (API::ContentRuleListStore::lookupContentRuleList):
2061
2062 2017-05-16  Yusuke Suzuki  <utatane.tea@gmail.com>
2063
2064         [JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass
2065         https://bugs.webkit.org/show_bug.cgi?id=172098
2066
2067         Reviewed by Saam Barati.
2068
2069         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2070         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2071
2072 2017-05-17  Ryan Haddad  <ryanhaddad@apple.com>
2073
2074         Unreviewed, rolling out r217014.
2075
2076         This change caused mac-wk2 LayoutTests to exit early due to
2077         crashes.
2078
2079         Reverted changeset:
2080
2081         "Resource Load Statistics: Grandfather domains for existing
2082         data records"
2083         https://bugs.webkit.org/show_bug.cgi?id=172155
2084         http://trac.webkit.org/changeset/217014
2085
2086 2017-05-17  John Wilander  <wilander@apple.com>
2087
2088         Resource Load Statistics: Grandfather domains for existing data records
2089         https://bugs.webkit.org/show_bug.cgi?id=172155
2090         <rdar://problem/24913532>
2091
2092         Reviewed by Alex Christensen.
2093
2094         When WebResourceLoadStatisticsStore starts fresh it needs
2095         to scan existing website data records and 'grandfather' them to
2096         allow ample time to capture user interaction.
2097
2098         * Shared/WebPreferencesDefinitions.h:
2099         * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
2100         (WKResourceLoadStatisticsManagerSetGrandfathered):
2101         (WKResourceLoadStatisticsManagerIsGrandfathered):
2102         (WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
2103         (WKResourceLoadStatisticsManagerSetGrandfatheringTime):
2104             Functions for testing and configuration.
2105         * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
2106         * UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm:
2107         (WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):
2108             Added grandfathering configuration.
2109         * UIProcess/WebProcessProxy.cpp:
2110         (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData):
2111             New function to get all top privately controlled domains that
2112             have website data.
2113         * UIProcess/WebProcessProxy.h:
2114         * UIProcess/WebResourceLoadStatisticsManager.cpp:
2115         (WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
2116         (WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
2117         (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
2118         (WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
2119         (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
2120             Functions for testing and configuration.
2121             WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval() changed
2122             as a result of WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval()
2123             moving to WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
2124         * UIProcess/WebResourceLoadStatisticsManager.h:
2125         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2126         (WebKit::initializeDataTypesToRemove):
2127         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
2128             Moved handling of pending removal into WebCore::ResourceLoadStatisticsStore since
2129             that's where grandfathering happens.
2130         (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
2131             Moved registration of write persistent store callback and reading of Cocoa defaults to
2132             WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver without parameters
2133             so they are called for platforms without CFNETWORK_STORAGE_PARTITIONING.
2134             Now includes registering WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
2135             as handler for grandfathering since it involves reading of the website data store.
2136         (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
2137         (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
2138         (WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval): Deleted.
2139             Now happens in WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
2140         * UIProcess/WebResourceLoadStatisticsStore.h:
2141         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
2142         (WebKit::WebsiteDataRecord::topPrivatelyControlledDomain):
2143             New function to ask a WebsiteDataRecord for its top privately controlled domain.
2144         * UIProcess/WebsiteData/WebsiteDataRecord.h:
2145         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2146         (WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):
2147             New function to get all top privately controlled domains that
2148             have website data.
2149         * UIProcess/WebsiteData/WebsiteDataStore.h:
2150
2151 2017-05-17  Brent Fulgham  <bfulgham@apple.com>
2152
2153         [WK2][iOS] Allow access to additional IOHID user class
2154         https://bugs.webkit.org/show_bug.cgi?id=172198
2155         <rdar://problem/31967635>
2156
2157         Reviewed by Alex Christensen.
2158
2159         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2160
2161 2017-05-17  Chris Dumez  <cdumez@apple.com>
2162
2163         Add more assertions in BackgroundProcessResponsivenessTimer
2164         https://bugs.webkit.org/show_bug.cgi?id=172239
2165
2166         Reviewed by Andreas Kling.
2167
2168         Add more assertions in BackgroundProcessResponsivenessTimer to help figure out the
2169         source of <rdar://problem/32251578>.
2170
2171         * UIProcess/BackgroundProcessResponsivenessTimer.cpp:
2172         (WebKit::BackgroundProcessResponsivenessTimer::updateState):
2173         (WebKit::BackgroundProcessResponsivenessTimer::scheduleNextResponsivenessCheck):
2174
2175 2017-05-17  Youenn Fablet  <youenn@apple.com>
2176
2177         No need to copy origin references in UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo
2178         https://bugs.webkit.org/show_bug.cgi?id=172242
2179
2180         Reviewed by Eric Carlson.
2181
2182         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2183         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
2184
2185 2017-05-17  Youenn Fablet  <youenn@apple.com>
2186
2187         Move-related refactoring on UserMediaPermissionRequestProxy
2188         https://bugs.webkit.org/show_bug.cgi?id=172195
2189
2190         Reviewed by Alex Christensen.
2191
2192         Moving vectors of strings instead of passing as const ref so that we do not copy them.
2193
2194         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2195         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
2196         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2197         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2198         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2199         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
2200         * UIProcess/UserMediaPermissionRequestProxy.h:
2201         (WebKit::UserMediaPermissionRequestProxy::create):
2202
2203 2017-05-17  Andy Estes  <aestes@apple.com>
2204
2205         REGRESSION (r215480): PKPaymentAuthorizationStatusFailure sent to PassKit in completeShippingContactSelection() even when there are no errors
2206         https://bugs.webkit.org/show_bug.cgi?id=172227
2207         <rdar://problem/31978432>
2208
2209         Reviewed by Alexey Proskuryakov.
2210
2211         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2212         (WebKit::toPKPaymentAuthorizationStatus): If there is an update with no errors, we should
2213         return PKPaymentAuthorizationStatusSuccess instead of PKPaymentAuthorizationStatusFailure.
2214
2215 2017-05-17  Matt Lewis  <jlewis3@apple.com>
2216
2217         Unreviewed, rolling out r216974.
2218
2219         Revision caused consistent timeouts on all platforms.
2220
2221         Reverted changeset:
2222
2223         "Add a RuntimeEnabledFeature for display: contents, defaulted
2224         to false."
2225         https://bugs.webkit.org/show_bug.cgi?id=171984
2226         http://trac.webkit.org/changeset/216974
2227
2228 2017-05-17  Alex Christensen  <achristensen@webkit.org>
2229
2230         Interacting with WKHTTPCookieStores before creating WKWebViews and WKProcessPools should affect cookies used
2231         https://bugs.webkit.org/show_bug.cgi?id=171987
2232
2233         Reviewed by Brady Eidson.
2234
2235         When putting cookies in a WKHTTPCookieStore that hasn't been associated with a WKProcessPool yet, there is no
2236         NetworkProcess into which to put the cookies.  In such a case, we should store these cookies in the WebsiteDataStore
2237         until there is a NetworkProcess.
2238
2239         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2240         (WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
2241         * NetworkProcess/NetworkProcess.cpp:
2242         (WebKit::NetworkProcess::initializeNetworkProcess):
2243         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
2244         * NetworkProcess/NetworkProcess.h:
2245         * NetworkProcess/NetworkProcess.messages.in:
2246         * NetworkProcess/RemoteNetworkingContext.h:
2247         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2248         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
2249         (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
2250         * Shared/WebsiteDataStoreParameters.cpp:
2251         (WebKit::WebsiteDataStoreParameters::~WebsiteDataStoreParameters):
2252         (WebKit::WebsiteDataStoreParameters::encode):
2253         (WebKit::WebsiteDataStoreParameters::decode):
2254         (WebKit::WebsiteDataStoreParameters::WebsiteDataStoreParameters): Deleted.
2255         * Shared/WebsiteDataStoreParameters.h:
2256         * UIProcess/API/APIHTTPCookieStore.cpp:
2257         (API::HTTPCookieStore::cookies):
2258         (API::HTTPCookieStore::setCookie):
2259         (API::HTTPCookieStore::deleteCookie):
2260         * UIProcess/API/APIHTTPCookieStore.h:
2261         * UIProcess/WebProcessPool.cpp:
2262         (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
2263         (WebKit::WebProcessPool::pageAddedToProcess):
2264         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2265         (WebKit::WebsiteDataStore::parameters):
2266         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2267         (WebKit::WebsiteDataStore::pendingCookies):
2268         (WebKit::WebsiteDataStore::addPendingCookie):
2269         (WebKit::WebsiteDataStore::removePendingCookie):
2270         * UIProcess/WebsiteData/WebsiteDataStore.h:
2271
2272 2017-05-17  Emilio Cobos Álvarez  <ecobos@igalia.com>
2273
2274         Add a RuntimeEnabledFeature for display: contents, defaulted to false.
2275         https://bugs.webkit.org/show_bug.cgi?id=171984
2276
2277         Reviewed by Antti Koivisto.
2278
2279         * Shared/WebPreferencesDefinitions.h:
2280         * UIProcess/API/C/WKPreferences.cpp:
2281         (WKPreferencesSetDisplayContentsEnabled):
2282         (WKPreferencesGetDisplayContentsEnabled):
2283         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2284         * WebProcess/WebPage/WebPage.cpp:
2285         (WebKit::WebPage::updatePreferences):
2286
2287 2017-05-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2288
2289         Unreviewed. Fix the build with MEDIA_STREAM disabled after r216952.
2290
2291         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2292         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2293         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
2294
2295 2017-05-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2296
2297         [Threaded Compositor] SHOULD NEVER BE REACHED in WebKit::CompositingRunLoop::updateCompleted
2298         https://bugs.webkit.org/show_bug.cgi?id=172167
2299
2300         Reviewed by Michael Catanzaro.
2301
2302         This is still happening, even after r216182, less often but still happens. There are two conditions in which
2303         this can happen:
2304
2305          - Again in force repaint. r216182 fixed the case of force repaint called when update state is completed, but it
2306            can also crash if update state is inProgress or PendingAfterCompletion when m_coordinateUpdateCompletionWithClient
2307            is true.
2308          - When the threaded compositor is invalidated right after renderLayerTree() starts, but before it finishes.
2309
2310         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2311         (WebKit::ThreadedCompositor::invalidate): Invalidate the refresh monitor right after stopping updates in the
2312         compositing run loop to ensure no more updates are scheduled.
2313         (WebKit::ThreadedCompositor::renderLayerTree): Check the scene is still active before calling sceneUpdateFinished().
2314         (WebKit::ThreadedCompositor::updateSceneState): Do not update m_coordinateUpdateCompletionWithClient when in
2315         force repaint.
2316         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
2317         (WebKit::ThreadedDisplayRefreshMonitor::dispatchDisplayRefreshCallback): Return early if the monitor has been invalidated.
2318
2319 2017-05-16  Sam Weinig  <sam@webkit.org>
2320
2321         Bring Notification.idl up to spec
2322         https://bugs.webkit.org/show_bug.cgi?id=172156
2323
2324         Reviewed by Chris Dumez.
2325
2326         * Shared/WebCoreArgumentCoders.h:
2327         * UIProcess/API/C/WKNotification.cpp:
2328         (WKNotificationCopyDir):
2329         * UIProcess/Notifications/WebNotification.cpp:
2330         (WebKit::WebNotification::WebNotification):
2331         * UIProcess/Notifications/WebNotification.h:
2332         (WebKit::WebNotification::create):
2333         (WebKit::WebNotification::dir):
2334         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2335         (WebKit::WebNotificationManagerProxy::show):
2336         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2337         * UIProcess/WebPageProxy.cpp:
2338         (WebKit::WebPageProxy::showNotification):
2339         * UIProcess/WebPageProxy.h:
2340         * UIProcess/WebPageProxy.messages.in:
2341         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2342         (WebKit::NotificationPermissionRequestManager::startRequest):
2343         (WebKit::NotificationPermissionRequestManager::permissionLevel):
2344         (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
2345         * WebProcess/Notifications/WebNotificationManager.cpp:
2346         (WebKit::WebNotificationManager::policyForOrigin):
2347         (WebKit::WebNotificationManager::show):
2348         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
2349         (WebKit::WebNotificationClient::checkPermission):
2350         * WebProcess/WebCoreSupport/WebNotificationClient.h:
2351         Update for enum vs String usage.
2352
2353 2017-05-16  Youenn Fablet  <youenn@apple.com>
2354
2355         Modernize WebKit2 getUserMedia passing of parameters
2356         https://bugs.webkit.org/show_bug.cgi?id=172161
2357
2358         Reviewed by Eric Carlson.
2359
2360         Passing SecurityOrigin as SecurityOriginData through IPC instead of Strings.
2361         Making more use of Ref<> instead of RefPtr<>.
2362
2363         * UIProcess/UserMediaPermissionCheckProxy.cpp:
2364         (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy):
2365         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
2366         * UIProcess/UserMediaPermissionCheckProxy.h:
2367         (WebKit::UserMediaPermissionCheckProxy::create):
2368         (WebKit::UserMediaPermissionCheckProxy::userMediaDocumentSecurityOrigin):
2369         (WebKit::UserMediaPermissionCheckProxy::topLevelDocumentSecurityOrigin):
2370         (WebKit::UserMediaPermissionCheckProxy::completionHandler):
2371         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2372         (WebKit::FrameAuthorizationState::FrameAuthorizationState):
2373         (WebKit::FrameAuthorizationState::ensureSecurityOriginsAreEqual):
2374         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
2375         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2376         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
2377         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
2378         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2379         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2380         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
2381         * UIProcess/UserMediaPermissionRequestProxy.h:
2382         (WebKit::UserMediaPermissionRequestProxy::create):
2383         * UIProcess/WebPageProxy.cpp:
2384         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
2385         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
2386         (WebKit::WebPageProxy::requestNotificationPermission):
2387         * UIProcess/WebPageProxy.h:
2388         * UIProcess/WebPageProxy.messages.in:
2389         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2390         (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
2391         (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
2392
2393 2017-05-16  David Kilzer  <ddkilzer@apple.com>
2394
2395         Unused lambdas in UserMediaPermissionRequestManagerProxy.cpp
2396         <https://webkit.org/b/172179>
2397
2398         Reviewed by Eric Carlson.
2399
2400         Fixes unused lambda warnings found with newer clang:
2401
2402             Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:309:46: error: lambda capture 'userMediaID' is not used [-Werror,-Wunused-lambda-capture]
2403                 auto validateConstraintsHandler = [this, userMediaID, validHandler = WTFMove(validHandler), invalidHandler = WTFMove(invalidHandler), audioConstraints = WebCore::MediaConstraints(audioConstraints), videoConstraints = WebCore::MediaConstraints(videoConstraints)](String&& deviceIdentifierHashSalt) mutable {
2404                                                          ^
2405             Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:318:41: error: lambda capture 'userMediaID' is not used [-Werror,-Wunused-lambda-capture]
2406                 auto haveDeviceSaltHandler = [this, userMediaID, frameID, validateConstraintsHandler = WTFMove(validateConstraintsHandler)](uint64_t userMediaID, String&& deviceIdentifierHashSalt, bool originHasPersistentAccess) mutable {
2407                                                     ^
2408             Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:318:54: error: lambda capture 'frameID' is not used [-Werror,-Wunused-lambda-capture]
2409                 auto haveDeviceSaltHandler = [this, userMediaID, frameID, validateConstraintsHandler = WTFMove(validateConstraintsHandler)](uint64_t userMediaID, String&& deviceIdentifierHashSalt, bool originHasPersistentAccess) mutable {
2410                                                                  ^
2411             Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:362:37: error: lambda capture 'userMediaID' is not used [-Werror,-Wunused-lambda-capture]
2412                 auto completionHandler = [this, userMediaID](uint64_t userMediaID, String&& deviceIdentifierHashSalt, bool originHasPersistentAccess) {
2413                                                 ^
2414
2415         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2416         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2417         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
2418         - Remove unused lambdas.
2419
2420 2017-05-16  Brent Fulgham  <bfulgham@apple.com>
2421
2422         [WK2][macOS] Support Flash Player DRM features
2423         https://bugs.webkit.org/show_bug.cgi?id=172157
2424         <rdar://problem/31889297>
2425
2426         Reviewed by Dean Jackson.
2427
2428         Relax the IOKit whitelist to support DRM features needed by
2429         some websites.
2430
2431         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2432
2433 2017-05-16  Brent Fulgham  <bfulgham@apple.com>
2434
2435         [WK2][macOS] Adopt a whitelist for XPC services
2436         https://bugs.webkit.org/show_bug.cgi?id=172151
2437         <rdar://problem/31916325>
2438
2439         Reviewed by Alex Christensen.
2440
2441         * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
2442         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2443         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2444         * WebProcess/com.apple.WebProcess.sb.in:
2445
2446 2017-05-16  Timothy Horton  <timothy_horton@apple.com>
2447
2448         Make it possible to adjust which edges are affected by safe area insets
2449         https://bugs.webkit.org/show_bug.cgi?id=172149
2450         <rdar://problem/31564729>
2451
2452         Reviewed by Beth Dakin.
2453
2454         * UIProcess/API/Cocoa/WKWebView.mm:
2455         (-[WKWebView _initializeWithConfiguration:]):
2456         (-[WKWebView _computedContentInset]):
2457         (-[WKWebView _obscuredInsetEdgesAffectedBySafeArea]):
2458         (-[WKWebView _setObscuredInsetEdgesAffectedBySafeArea:]):
2459         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2460         Add SPI to adjust which edges are taken into account, and adjust the default.
2461
2462 2017-05-16  Zan Dobersek  <zdobersek@igalia.com>
2463
2464         [GLib] Use RunLoopSourcePriority::RunLoopDispatcher as the GSocketMonitor's GSource priority
2465         https://bugs.webkit.org/show_bug.cgi?id=172160
2466
2467         Reviewed by Carlos Garcia Campos.
2468
2469         * Platform/IPC/glib/GSocketMonitor.cpp:
2470         (IPC::GSocketMonitor::start): Explicitly set the priority for the GSocketMonitor's
2471         GSource object to RunLoopSourcePriority::RunLoopDispatcher, equating it to the
2472         priority that's used in RunLoop for dispatches of the queued functions.
2473
2474 2017-05-16  Zan Dobersek  <zdobersek@igalia.com>
2475
2476         [GLib] Name more GSource-based RunLoop::Timers
2477         https://bugs.webkit.org/show_bug.cgi?id=172158
2478
2479         Reviewed by Carlos Garcia Campos.
2480
2481         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
2482         (WebKit::CompositingRunLoop::CompositingRunLoop):
2483         Specify 'CompositingRunLoop' as the name of this GSource-based RunLoop::Timer.
2484         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
2485         (WebKit::ThreadedDisplayRefreshMonitor::ThreadedDisplayRefreshMonitor):
2486         Specify 'ThreadedDisplayRefreshMonitor' as the name of this GSource-based RunLoop::Timer.
2487         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2488         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2489         Specify 'CoordinatedLayerTreeHost' as the name of this GSource-based RunLoop::Timer.
2490
2491 2017-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2492
2493         Unreviewed. Revert change committed by mistakle in r216922.
2494
2495         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2496         (WebKit::ThreadedCompositor::forceRepaint):
2497
2498 2017-05-16  Youenn Fablet  <youenn@apple.com>
2499
2500         Remove MediaConstraintsData and MediaConstraintsImpl
2501         https://bugs.webkit.org/show_bug.cgi?id=172132
2502
2503         Reviewed by Eric Carlson.
2504
2505         Removing MediaConstraintsData and MediaConstraintsImpl allows simplifying the code.
2506         Further simplified the code by making MediaConstraints no longer ref counted and now a struct.
2507
2508         * Scripts/webkit/messages.py:
2509         (headers_for_type):
2510         * Shared/WebCoreArgumentCoders.cpp:
2511         (IPC::ArgumentCoder<MediaConstraints>::encode):
2512         (IPC::ArgumentCoder<MediaConstraints>::decode):
2513         (IPC::ArgumentCoder<MediaConstraintsData>::encode): Deleted.
2514         (IPC::ArgumentCoder<MediaConstraintsData>::decode): Deleted.
2515         * Shared/WebCoreArgumentCoders.h:
2516         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
2517         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
2518         (WebKit::UserMediaCaptureManagerProxy::applyConstraints):
2519         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
2520         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
2521         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2522         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2523         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2524         * UIProcess/WebPageProxy.cpp:
2525         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
2526         * UIProcess/WebPageProxy.h:
2527         * UIProcess/WebPageProxy.messages.in:
2528         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2529         (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
2530         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2531         (WebKit::UserMediaCaptureManager::applyConstraints):
2532
2533 2017-05-16  Michael Catanzaro  <mcatanzaro@igalia.com>
2534
2535         [SOUP] Remove LATEST_RECORD_VERSION from GnuTLS priority string
2536         https://bugs.webkit.org/show_bug.cgi?id=172153
2537
2538         Based on discussion with Nikos in https://bugzilla.gnome.org/show_bug.cgi?id=782218, we
2539         should remove LATEST_RECORD_VERSION from our GnuTLS priority string. This causes GnuTLS to
2540         use the latest TLS record version (the record format is separate from the TLS protocol
2541         version), which we needed a couple years ago (after dropping SSLv3) for maximum
2542         compatibility with broken web servers. But it's not needed anymore, and is causing new
2543         compatibility problems with other broken web servers, so let's get rid of it.
2544
2545         Reviewed by Carlos Garcia Campos.
2546
2547         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
2548         (main):
2549         * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
2550         (main):
2551
2552 2017-05-15  Andy Estes  <aestes@apple.com>
2553
2554         Make the application PID available to WebCore
2555         https://bugs.webkit.org/show_bug.cgi?id=172133
2556
2557         Reviewed by Andreas Kling.
2558
2559         Added uiProcessPID to Web and Networking process creation parameters. The UI process
2560         initializes these to getpid(), and the child processes call WebCore::setPresentingApplicationPID()
2561         at initialization time.
2562
2563         This replaces presenterApplicationPid.
2564
2565         * NetworkProcess/NetworkProcess.cpp:
2566         (WebKit::NetworkProcess::initializeNetworkProcess):
2567         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2568         (WebKit::NetworkProcessCreationParameters::encode):
2569         (WebKit::NetworkProcessCreationParameters::decode):
2570         * NetworkProcess/NetworkProcessCreationParameters.h:
2571         * Shared/WebProcessCreationParameters.cpp:
2572         (WebKit::WebProcessCreationParameters::encode):
2573         (WebKit::WebProcessCreationParameters::decode):
2574         * Shared/WebProcessCreationParameters.h:
2575         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2576         (WebKit::WebProcessPool::platformInitializeWebProcess):
2577         * UIProcess/WebProcessPool.cpp:
2578         (WebKit::WebProcessPool::ensureNetworkProcess):
2579         (WebKit::WebProcessPool::createNewWebProcess):
2580         * WebProcess/WebPage/mac/WebPageMac.mm:
2581         (WebKit::WebPage::platformInitialize):
2582         * WebProcess/WebProcess.cpp:
2583         (WebKit::WebProcess::initializeWebProcess):
2584         * WebProcess/WebProcess.h:
2585         (WebKit::WebProcess::presenterApplicationPid): Deleted.
2586         * WebProcess/cocoa/WebProcessCocoa.mm:
2587         (WebKit::WebProcess::platformInitializeWebProcess):
2588
2589 2017-05-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
2590
2591         Do not delete asynchronously decoded frames for large images if their clients are in the viewport
2592         https://bugs.webkit.org/show_bug.cgi?id=170640
2593
2594         Reviewed by Simon Fraser.
2595
2596         Enable the async decoding for large images.
2597
2598         * WebProcess/WebPage/WebPage.cpp:
2599         (WebKit::WebPage::updatePreferences):
2600
2601 2017-05-15  Youenn Fablet  <youenn@apple.com>
2602
2603         Simplify RealtimeMediaSource data production and state
2604         https://bugs.webkit.org/show_bug.cgi?id=171999
2605
2606         Reviewed by Eric Carlson.
2607
2608         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
2609         (WebKit::UserMediaCaptureManagerProxy::startProducingData):
2610         (WebKit::UserMediaCaptureManagerProxy::stopProducingData):
2611         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2612
2613 2017-05-15  Brent Fulgham  <bfulgham@apple.com>
2614
2615         Correct typo (part of r216790).
2616
2617         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: The check-in missed part of a
2618         regular expression needed to fix the audio playback.
2619
2620 2017-05-15  Jer Noble  <jer.noble@apple.com>
2621
2622         Add experimental setting to allow document gesture interaction to fulfill media playback gesture requirement
2623         https://bugs.webkit.org/show_bug.cgi?id=172131
2624
2625         Reviewed by Eric Carlson.
2626
2627         * Shared/WebPreferencesDefinitions.h:
2628         * UIProcess/API/C/WKPreferences.cpp:
2629         (WKPreferencesSetMediaUserGestureInheritsFromDocument):
2630         (WKPreferencesGetMediaUserGestureInheritsFromDocument):
2631         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2632         * WebProcess/WebPage/WebPage.cpp:
2633         (WebKit::WebPage::updatePreferences):
2634
2635 2017-05-15  Brent Fulgham  <bfulgham@apple.com>
2636
2637         [WK2][macOS][iOS] Allow Network process to access nsurlstoraged's top level domain data cache 
2638         https://bugs.webkit.org/show_bug.cgi?id=172128
2639         <rdar://problem/30871490>
2640
2641         Reviewed by Alex Christensen.
2642
2643         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2644         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2645
2646 2017-05-15  David Kilzer  <ddkilzer@apple.com>
2647
2648         Update json.hpp to v2.1.1
2649         <https://webkit.org/b/172085>
2650         <rdar://problem/32180980>
2651
2652         Reviewed by Alex Christensen.
2653
2654         * NetworkProcess/capture/NetworkCaptureEvent.cpp:
2655         - Define JSON_NOEXCEPTION as 1 to disable exceptions in
2656           json.hpp.
2657         (WebKit::NetworkCapture::JSONCoder<String>::encode):
2658         (WebKit::NetworkCapture::JSONCoder<WebCore::SharedBuffer>::encode):
2659         - Build std::string passing in length to avoid the need for a
2660           custom basic_json() constructor, and for efficiency.
2661
2662         * NetworkProcess/capture/json.hpp:
2663         - Update to v2.1.1 and remove customizations.
2664
2665 2017-05-15  Brent Fulgham  <bfulgham@apple.com>
2666
2667         Unreviewed build fix.
2668
2669         Debugging code was accidentally left in the Plugin sandbox profile.
2670
2671         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2672
2673 2017-05-15  Gwang Yoon Hwang  <yoon@igalia.com>
2674
2675         [WPE] Unreviewed debug build fix
2676         https://bugs.webkit.org/show_bug.cgi?id=172118
2677
2678         Unreviewed, remove a dead code accidentally committed in r215259.
2679
2680         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
2681         Remove deprecated CompositingRunLoop::isCurrent.
2682         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2683         (WebKit::ThreadedCompositor::frameComplete):
2684
2685 2017-05-14  Daewoong Jang  <daewoong.jang@navercorp.com>
2686
2687         [CoordinatedGraphics] Remove unused files and lines
2688         https://bugs.webkit.org/show_bug.cgi?id=172080
2689
2690         Reviewed by Darin Adler.
2691
2692         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: Removed.
2693         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h: Removed.
2694         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: Removed.
2695         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h: Removed.
2696         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h: Removed.
2697         * UIProcess/WebPageProxy.h:
2698         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2699         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in: Removed.
2700
2701 2017-05-14  Andreas Kling  <akling@apple.com>
2702
2703         Always reset the assisted node when the main frame commits a new load.
2704         https://bugs.webkit.org/show_bug.cgi?id=172088
2705
2706         Reviewed by Antti Koivisto.
2707
2708         WebPage::m_assistedNode could extend the lifetime of the document it pointed into
2709         if the main frame was navigated while the assisted node was in one of its subframes.
2710         The life-supported document wouldn't be reachable from JavaScript but nevertheless
2711         would consume memory and other resources.
2712
2713         This patch fixes the issue by always clearing WebPage::m_assistedNode when the main
2714         frame commits a new load.
2715
2716         * WebProcess/WebPage/WebPage.cpp:
2717         (WebKit::WebPage::resetAssistedNodeForFrame):
2718
2719 2017-05-14  Csaba Osztrogonác  <ossy@webkit.org>
2720
2721         Unreviewed Mac cmake buildfix after r216690, just for fun.
2722
2723         * PlatformMac.cmake:
2724
2725 2017-05-14  David Kilzer  <ddkilzer@apple.com>
2726
2727         Fix unused lambdas in WebKit2
2728         <https://webkit.org/b/172090>
2729
2730         Reviewed by Chris Dumez.
2731
2732         Fixes unused lambda warnings found with newer clang.
2733
2734         * NetworkProcess/cache/NetworkCache.cpp:
2735         (WebKit::NetworkCache::Cache::retrieve):
2736         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2737         (WebKit::NetworkCache::Statistics::initialize):
2738         - Use UNUSED_PARAM() to silence unused lambda warning since
2739           'startTime' is used in Debug builds.
2740
2741         * NetworkProcess/capture/NetworkCaptureManager.cpp:
2742         (WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
2743         - Remove unused 'this' from lambda capture.
2744
2745         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2746         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
2747         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
2748         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
2749         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
2750         - Use UNUSED_PARAM() to silence unused lambda warning since
2751           'taskIdentifier' is used in Debug builds.
2752
2753         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2754         (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
2755         (WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):
2756         - Remove unused 'this' from lambda captures.
2757
2758         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2759         (WebKit::WebsiteDataStore::fetchData):
2760         - Remove unused 'fetchOptions' from lambda capture.
2761         (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):
2762         - Remove unused 'this' from lambda capture.
2763
2764         * UIProcess/mac/ViewGestureControllerMac.mm:
2765         (WebKit::ViewGestureController::forceRepaintIfNeeded):
2766         - Remove unused 'this' from lambda capture.
2767
2768         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
2769         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
2770         - Remove unused 'this' from nested lambda captures.
2771
2772 2017-05-13  Eric Carlson  <eric.carlson@apple.com>
2773
2774         [MediaStream] deviceId constraint doesn't work with getUserMedia
2775         https://bugs.webkit.org/show_bug.cgi?id=171877
2776         <rdar://problem/31899730>
2777
2778         Reviewed by Jer Noble.
2779
2780         * Shared/WebCoreArgumentCoders.cpp:
2781         (IPC::ArgumentCoder<MediaConstraintsData>::encode): Encode deviceIDHashSalt.
2782         (IPC::ArgumentCoder<MediaConstraintsData>::decode): Decode deviceIDHashSalt.
2783
2784         * UIProcess/UserMediaPermissionCheckProxy.cpp:
2785         (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): Initialize
2786         completion handler, frame ID, and security origins.
2787         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): Complete by calling
2788         completion handler because we now sometimes request access info before calling gUM.
2789         (WebKit::UserMediaPermissionCheckProxy::invalidate): Clear completion handler.
2790         * UIProcess/UserMediaPermissionCheckProxy.h:
2791
2792         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2793         (WebKit::FrameAuthorizationState::FrameAuthorizationState): Take security origins, not
2794         UserMediaPermissionRequestProxy, so it can be constructed with a UserMediaPermissionCheckProxy.
2795         (WebKit::FrameAuthorizationState::ensureSecurityOriginsAreEqual): Ditto. Clear has salt
2796         when origins don't match.
2797         (WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest): Templatize.
2798         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied): Fix typo.
2799         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Ditto.
2800         Don't set state for empty UIDs. Pass hash salt to web process.
2801         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2802         The device ID hash salt is now required to validate constraints, so get it first.
2803         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Helper
2804         method used to get the device ID hash salt.
2805         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Restructure
2806         to use getUserMediaPermissionInfo.
2807         (WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Deleted.
2808         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2809
2810         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2811         (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted): Add device ID
2812         hash salt parameter.
2813         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
2814
2815         * WebProcess/WebPage/WebPage.cpp:
2816         (WebKit::WebPage::userMediaAccessWasGranted): Ditto.
2817         * WebProcess/WebPage/WebPage.h:
2818         * WebProcess/WebPage/WebPage.messages.in:
2819
2820         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2821         (WebKit::UserMediaCaptureManager::createCaptureSource): Use new MediaConstraintsData 
2822         constructor.
2823
2824 2017-05-13  Chris Dumez  <cdumez@apple.com>
2825
2826         Stop using RefPtr::release()
2827         https://bugs.webkit.org/show_bug.cgi?id=172074
2828
2829         Reviewed by Geoffrey Garen.
2830
2831         * Platform/unix/SharedMemoryUnix.cpp:
2832         (WebKit::SharedMemory::create):
2833         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2834         (WebKit::CoordinatedGraphicsScene::createImageBacking):
2835         * Shared/cairo/ShareableBitmapCairo.cpp:
2836         (WebKit::ShareableBitmap::createCairoSurface):
2837         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.cpp:
2838         (WebKit::core):
2839         * WebProcess/WebPage/WebPage.cpp:
2840         (WebKit::WebPage::getContentsAsMHTMLData):
2841
2842 2017-05-12  Chris Dumez  <cdumez@apple.com>
2843
2844         Drop remaining uses of PassRefPtr in WebKit2/WebProcess
2845         https://bugs.webkit.org/show_bug.cgi?id=172055
2846
2847         Reviewed by Alex Christensen.
2848
2849         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
2850         (+[WKWebProcessPlugInScriptWorld normalWorld]):
2851         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2852         (contextMenuItems):
2853         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
2854         (WKBundleScriptWorldNormalWorld):
2855         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp:
2856         (webkitScriptWorldCreate):
2857         * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp:
2858         (WebKit::InjectedBundleCSSStyleDeclarationHandle::getOrCreate):
2859         * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.h:
2860         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
2861         (WebKit::InjectedBundleRangeHandle::getOrCreate):
2862         (WebKit::InjectedBundleRangeHandle::create):
2863         (WebKit::InjectedBundleRangeHandle::coreRange):
2864         (WebKit::InjectedBundleRangeHandle::renderedImage):
2865         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
2866         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2867         (WebKit::InjectedBundle::create):
2868         (WebKit::InjectedBundle::createWebDataFromUint8Array):
2869         * WebProcess/InjectedBundle/InjectedBundle.h:
2870         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
2871         (WebKit::InjectedBundleBackForwardList::itemAtIndex):
2872         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
2873         (WebKit::InjectedBundleBackForwardList::detach):
2874         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
2875         (WebKit::InjectedBundleBackForwardListItem::create):
2876         (WebKit::InjectedBundleBackForwardListItem::InjectedBundleBackForwardListItem):
2877         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2878         (WebKit::InjectedBundleHitTestResult::nodeHandle):
2879         (WebKit::InjectedBundleHitTestResult::urlElementHandle):
2880         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2881         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
2882         (WebKit::InjectedBundleNavigationAction::create):
2883         (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
2884         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
2885         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
2886         (WebKit::InjectedBundleScriptWorld::getOrCreate):
2887         (WebKit::InjectedBundleScriptWorld::normalWorld):
2888         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
2889         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2890         (WebKit::NetscapePlugin::create):
2891         (WebKit::NetscapePlugin::NetscapePlugin):
2892         (WebKit::NetscapePlugin::supportsSnapshotting):
2893         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2894         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
2895         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
2896         (WebKit::PDFPluginAnnotation::create):
2897         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
2898         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
2899         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
2900         * WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
2901         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
2902         (WebKit::PDFPluginPasswordField::createAnnotationElement):
2903         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
2904         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
2905         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
2906         * WebProcess/UserContent/WebUserContentController.cpp:
2907         (WebKit::worldMap):
2908         (WebKit::WebUserMessageHandlerDescriptorProxy::create):
2909         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2910         (WebKit::convertImageToBitmap):
2911         * WebProcess/WebPage/WebPage.cpp:
2912         (WebKit::WebPage::addUserScript):
2913         (WebKit::WebPage::addUserStyleSheet):
2914         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2915         (WebKit::WebPrintOperationGtk::create):
2916         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
2917         * WebProcess/WebPage/ios/WebPageIOS.mm:
2918         (WebKit::rangeForPosition):
2919         (WebKit::rangeAtWordBoundaryForPosition):
2920         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2921
2922 2017-05-12  Alex Christensen  <achristensen@webkit.org>
2923
2924         Rename WKContentExtension to WKContentRuleList
2925         https://bugs.webkit.org/show_bug.cgi?id=172053
2926         <rdar://problem/32141005>
2927
2928         Reviewed by Geoffrey Garen.
2929
2930         * Shared/API/APIObject.h:
2931         * Shared/API/Cocoa/WebKit.h:
2932         * Shared/API/c/WKDeprecatedFunctions.cpp:
2933         (WKPageGroupAddUserContentFilter):
2934         (WKPageGroupRemoveUserContentFilter):
2935         * Shared/Cocoa/APIObject.mm:
2936         (API::Object::newObject):
2937         * Shared/WebCompiledContentExtension.cpp: Removed.
2938         * Shared/WebCompiledContentExtension.h: Removed.
2939         * Shared/WebCompiledContentExtensionData.cpp: Removed.
2940         * Shared/WebCompiledContentExtensionData.h: Removed.
2941         * Shared/WebCompiledContentRuleList.cpp: Copied from Source/WebKit2/Shared/WebCompiledContentExtension.cpp.
2942         (WebKit::WebCompiledContentRuleList::create):
2943         (WebKit::WebCompiledContentRuleList::WebCompiledContentRuleList):
2944         (WebKit::WebCompiledContentRuleList::~WebCompiledContentRuleList):
2945         (WebKit::WebCompiledContentRuleList::conditionsApplyOnlyToDomain):
2946         (WebKit::WebCompiledContentRuleList::filtersWithoutConditionsBytecode):
2947         (WebKit::WebCompiledContentRuleList::filtersWithoutConditionsBytecodeLength):
2948         (WebKit::WebCompiledContentRuleList::filtersWithConditionsBytecode):
2949         (WebKit::WebCompiledContentRuleList::filtersWithConditionsBytecodeLength):
2950         (WebKit::WebCompiledContentRuleList::topURLFiltersBytecode):
2951         (WebKit::WebCompiledContentRuleList::topURLFiltersBytecodeLength):
2952         (WebKit::WebCompiledContentRuleList::actions):
2953         (WebKit::WebCompiledContentRuleList::actionsLength):
2954         (WebKit::WebCompiledContentExtension::create): Deleted.
2955         (WebKit::WebCompiledContentExtension::WebCompiledContentExtension): Deleted.
2956         (WebKit::WebCompiledContentExtension::~WebCompiledContentExtension): Deleted.
2957         (WebKit::WebCompiledContentExtension::conditionsApplyOnlyToDomain): Deleted.
2958         (WebKit::WebCompiledContentExtension::filtersWithoutConditionsBytecode): Deleted.
2959         (WebKit::WebCompiledContentExtension::filtersWithoutConditionsBytecodeLength): Deleted.
2960         (WebKit::WebCompiledContentExtension::filtersWithConditionsBytecode): Deleted.
2961         (WebKit::WebCompiledContentExtension::filtersWithConditionsBytecodeLength): Deleted.
2962         (WebKit::WebCompiledContentExtension::topURLFiltersBytecode): Deleted.
2963         (WebKit::WebCompiledContentExtension::topURLFiltersBytecodeLength): Deleted.
2964         (WebKit::WebCompiledContentExtension::actions): Deleted.
2965         (WebKit::WebCompiledContentExtension::actionsLength): Deleted.
2966         * Shared/WebCompiledContentRuleList.h: Copied from Source/WebKit2/Shared/WebCompiledContentExtension.h.
2967         * Shared/WebCompiledContentRuleListData.cpp: Copied from Source/WebKit2/Shared/WebCompiledContentExtensionData.cpp.
2968         (WebKit::WebCompiledContentRuleListData::encode):
2969         (WebKit::WebCompiledContentRuleListData::decode):
2970         (WebKit::WebCompiledContentExtensionData::encode): Deleted.
2971         (WebKit::WebCompiledContentExtensionData::decode): Deleted.
2972         * Shared/WebCompiledContentRuleListData.h: Copied from Source/WebKit2/Shared/WebCompiledContentExtensionData.h.
2973         (WebKit::WebCompiledContentRuleListData::WebCompiledContentRuleListData):
2974         (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData): Deleted.
2975         * Shared/WebPageCreationParameters.cpp:
2976         (WebKit::WebPageCreationParameters::encode):
2977         (WebKit::WebPageCreationParameters::decode):
2978         * Shared/WebPageCreationParameters.h:
2979         * UIProcess/API/APIContentExtension.cpp: Removed.
2980         * UIProcess/API/APIContentExtension.h: Removed.
2981         * UIProcess/API/APIContentExtensionStore.cpp: Removed.
2982         * UIProcess/API/APIContentExtensionStore.h: Removed.
2983         * UIProcess/API/APIContentRuleList.cpp: Copied from Source/WebKit2/UIProcess/API/APIContentExtension.cpp.
2984         (API::ContentRuleList::ContentRuleList):
2985         (API::ContentRuleList::~ContentRuleList):
2986         (API::ContentExtension::ContentExtension): Deleted.
2987         (API::ContentExtension::~ContentExtension): Deleted.
2988         * UIProcess/API/APIContentRuleList.h: Copied from Source/WebKit2/UIProcess/API/APIContentExtension.h.
2989         * UIProcess/API/APIContentRuleListStore.cpp: Copied from Source/WebKit2/UIProcess/API/APIContentExtensionStore.cpp.
2990         (API::ContentRuleListStore::legacyDefaultStore):
2991         (API::ContentRuleListStore::nonLegacyDdefaultStore):
2992         (API::ContentRuleListStore::defaultStore):
2993         (API::ContentRuleListStore::storeWithPath):
2994         (API::ContentRuleListStore::ContentRuleListStore):
2995         (API::ContentRuleListStore::~ContentRuleListStore):
2996         (API::constructedPathPrefix):
2997         (API::ContentRuleListMetaData::fileSize):
2998         (API::encodeContentRuleListMetaData):
2999         (API::decodeContentRuleListMetaData):
3000         (API::openAndMapContentRuleList):
3001         (API::compiledToFile):
3002         (API::createExtension):
3003         (API::ContentRuleListStore::lookupContentRuleList):
3004         (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):
3005         (API::ContentRuleListStore::compileContentRuleList):
3006         (API::ContentRuleListStore::removeContentRuleList):
3007         (API::ContentRuleListStore::synchronousRemoveAllContentRuleLists):
3008         (API::ContentRuleListStore::invalidateContentRuleListVersion):
3009         (API::ContentRuleListStore::getContentRuleListSource):
3010         (API::contentRuleListStoreErrorCategory):
3011         (API::ContentExtensionStore::defaultStore): Deleted.
3012         (API::ContentExtensionStore::storeWithPath): Deleted.
3013         (API::ContentExtensionStore::ContentExtensionStore): Deleted.
3014         (API::ContentExtensionStore::~ContentExtensionStore): Deleted.
3015         (API::ContentExtensionMetaData::fileSize): Deleted.
3016         (API::encodeContentExtensionMetaData): Deleted.
3017         (API::decodeContentExtensionMetaData): Deleted.
3018         (API::openAndMapContentExtension): Deleted.
3019         (API::ContentExtensionStore::lookupContentExtension): Deleted.
3020         (API::ContentExtensionStore::getAvailableContentExtensionIdentifiers): Deleted.
3021         (API::ContentExtensionStore::compileContentExtension): Deleted.
3022         (API::ContentExtensionStore::removeContentExtension): Deleted.
3023         (API::ContentExtensionStore::synchronousRemoveAllContentExtensions): Deleted.
3024         (API::ContentExtensionStore::invalidateContentExtensionVersion): Deleted.
3025         (API::ContentExtensionStore::getContentExtensionSource): Deleted.
3026         (API::contentExtensionStoreErrorCategory): Deleted.
3027         * UIProcess/API/APIContentRuleListStore.h: Copied from Source/WebKit2/UIProcess/API/APIContentExtensionStore.h.
3028         (API::make_error_code):
3029         * UIProcess/API/C/WKAPICast.h:
3030         * UIProcess/API/C/WKPageGroup.cpp:
3031         * UIProcess/API/C/WKUserContentControllerRef.cpp:
3032         (WKUserContentControllerAddUserContentFilter):
3033         (WKUserContentControllerRemoveAllUserContentFilters):
3034         * UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:
3035         (WKUserContentExtensionStoreGetTypeID):
3036         * UIProcess/API/Cocoa/APIUserContentExtensionStoreCocoa.mm:
3037         (API::ContentRuleListStore::defaultStorePath):
3038         (API::ContentExtensionStore::defaultStorePath): Deleted.
3039         * UIProcess/API/Cocoa/WKContentExtension.h: Removed.
3040         * UIProcess/API/Cocoa/WKContentExtension.mm: Removed.
3041         * UIProcess/API/Cocoa/WKContentExtensionInternal.h: Removed.
3042         * UIProcess/API/Cocoa/WKContentExtensionStore.h: Removed.
3043         * UIProcess/API/Cocoa/WKContentExtensionStore.mm: Removed.
3044         * UIProcess/API/Cocoa/WKContentExtensionStoreInternal.h: Removed.
3045         * UIProcess/API/Cocoa/WKContentExtensionStorePrivate.h: Removed.
3046         * UIProcess/API/Cocoa/WKContentRuleList.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtension.h.
3047         * UIProcess/API/Cocoa/WKContentRuleList.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtension.mm.
3048         (-[WKContentRuleList dealloc]):
3049         (-[WKContentRuleList _apiObject]):
3050         (-[WKContentRuleList identifier]):
3051         (-[WKContentExtension dealloc]): Deleted.
3052         (-[WKContentExtension _apiObject]): Deleted.
3053         (-[WKContentExtension identifier]): Deleted.
3054         * UIProcess/API/Cocoa/WKContentRuleListInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionInternal.h.
3055         (WebKit::wrapper):
3056         * UIProcess/API/Cocoa/WKContentRuleListStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionStore.h.
3057         * UIProcess/API/Cocoa/WKContentRuleListStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionStore.mm.
3058         (toWKErrorCode):
3059         (-[WKContentRuleListStore dealloc]):
3060         (+[WKContentRuleListStore defaultStore]):
3061         (+[WKContentRuleListStore storeWithURL:]):
3062         (-[WKContentRuleListStore compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:]):
3063         (-[WKContentRuleListStore _compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:releasesArgument:]):
3064         (-[WKContentRuleListStore lookUpContentRuleListForIdentifier:completionHandler:]):
3065         (-[WKContentRuleListStore getAvailableContentRuleListIdentifiers:]):
3066         (-[WKContentRuleListStore removeContentRuleListForIdentifier:completionHandler:]):
3067         (-[WKContentRuleListStore _apiObject]):
3068         (-[WKContentRuleListStore _removeAllContentRuleLists]):
3069         (-[WKContentRuleListStore _invalidateContentRuleListVersionForIdentifier:]):
3070         (-[WKContentRuleListStore _getContentRuleListSourceForIdentifier:completionHandler:]):
3071         (-[WKContentRuleListStore _compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:]):
3072         (-[WKContentExtensionStore dealloc]): Deleted.
3073         (+[WKContentExtensionStore defaultStore]): Deleted.
3074         (+[WKContentExtensionStore storeWithURL:]): Deleted.
3075         (-[WKContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]): Deleted.
3076         (-[WKContentExtensionStore _compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:releasesArgument:]): Deleted.
3077         (-[WKContentExtensionStore lookUpContentExtensionForIdentifier:completionHandler:]): Deleted.
3078         (-[WKContentExtensionStore getAvailableContentExtensionIdentifiers:]): Deleted.
3079         (-[WKContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]): Deleted.
3080         (-[WKContentExtensionStore _apiObject]): Deleted.
3081         (-[WKContentExtensionStore _removeAllContentExtensions]): Deleted.
3082         (-[WKContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]): Deleted.
3083         (-[WKContentExtensionStore _getContentExtensionSourceForIdentifier:completionHandler:]): Deleted.
3084         (-[WKContentExtensionStore _compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]): Deleted.
3085         * UIProcess/API/Cocoa/WKContentRuleListStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionStoreInternal.h.
3086         (WebKit::wrapper):
3087         * UIProcess/API/Cocoa/WKContentRuleListStorePrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionStorePrivate.h.
3088         * UIProcess/API/Cocoa/WKError.h:
3089         * UIProcess/API/Cocoa/WKError.mm:
3090         (localizedDescriptionForErrorCode):
3091         * UIProcess/API/Cocoa/WKUserContentController.h:
3092         * UIProcess/API/Cocoa/WKUserContentController.mm:
3093         (-[WKUserContentController addContentRuleList:]):
3094         (-[WKUserContentController removeContentRuleList:]):
3095         (-[WKUserContentController removeAllContentRuleLists]):
3096         (-[WKUserContentController _addUserContentFilter:]):
3097         (-[WKUserContentController _removeUserContentFilter:]):
3098         (-[WKUserContentController _removeAllUserContentFilters]):
3099         (-[WKUserContentController addContentExtension:]): Deleted.
3100         (-[WKUserContentController removeContentExtension:]): Deleted.
3101         (-[WKUserContentController removeAllContentExtensions]): Deleted.
3102         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
3103         (toUserContentRuleListStoreError):
3104         (+[_WKUserContentExtensionStore defaultStore]):
3105         (+[_WKUserContentExtensionStore storeWithURL:]):
3106         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
3107         (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
3108         (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
3109         (-[_WKUserContentExtensionStore _apiObject]):
3110         (-[_WKUserContentExtensionStore _removeAllContentExtensions]):
3111         (-[_WKUserContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]):
3112         (-[_WKUserContentExtensionStore _initWithWKContentRuleListStore:]):
3113         (toUserContentExtensionStoreError): Deleted.
3114         (-[_WKUserContentExtensionStore _initWithWKContentExtensionStore:]): Deleted.
3115         * UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h:
3116         * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
3117         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
3118         (-[_WKUserContentFilter _apiObject]):
3119         (-[_WKUserContentFilter _initWithWKContentRuleList:]):
3120         (-[_WKUserContentFilter _initWithWKContentExtension:]): Deleted.
3121         * UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:
3122         * UIProcess/API/Cocoa/_WKUserContentFilterPrivate.h:
3123         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
3124         (WebKit::WebUserContentControllerProxy::addProcess):
3125         (WebKit::WebUserContentControllerProxy::addContentRuleList):
3126         (WebKit::WebUserContentControllerProxy::removeContentRuleList):
3127         (WebKit::WebUserContentControllerProxy::removeAllContentRuleLists):
3128         (WebKit::WebUserContentControllerProxy::addContentExtension): Deleted.
3129         (WebKit::WebUserContentControllerProxy::removeContentExtension): Deleted.
3130         (WebKit::WebUserContentControllerProxy::removeAllContentExtensions): Deleted.
3131         * UIProcess/UserContent/WebUserContentControllerProxy.h:
3132         * UIProcess/WebPageGroup.cpp:
3133         * WebKit2.xcodeproj/project.pbxproj:
3134         * WebProcess/UserContent/WebUserContentController.cpp:
3135         (WebKit::WebUserContentController::addContentRuleLists):
3136         (WebKit::WebUserContentController::removeContentRuleList):
3137         (WebKit::WebUserContentController::removeAllContentRuleLists):
3138         (WebKit::WebUserContentController::addContentExtensions): Deleted.
3139         (WebKit::WebUserContentController::removeContentExtension): Deleted.
3140         (WebKit::WebUserContentController::removeAllContentExtensions): Deleted.
3141         * WebProcess/UserContent/WebUserContentController.h:
3142         * WebProcess/UserContent/WebUserContentController.messages.in:
3143         * WebProcess/WebPage/WebPage.cpp:
3144         (WebKit::m_backgroundCPULimit):
3145
3146 2017-05-12  Jeremy Jones  <jeremyj@apple.com>
3147
3148         Add objc version of WK2 UIPageClient setHasVideoInPictureInPicture and rename it to hasVideoInPictureInPictureDidChange.
3149         https://bugs.webkit.org/show_bug.cgi?id=172048
3150         rdar://problem/32163054
3151
3152         Reviewed by Simon Fraser.
3153
3154         Rename UIPageClient setHasVideoInPictureInPicture to hasVideoInPictureInPictureDidChange.
3155         Add missing _allowsPictureInPictureMediaPlayback property to WKPreferences.
3156         Add -hasVideoInPictureInPictureDidChange to UIDelegate.
3157
3158         * UIProcess/API/APIUIClient.h:
3159         (API::UIClient::hasVideoInPictureInPictureDidChange):
3160         * UIProcess/API/C/WKPage.cpp:
3161         (WKPageSetPageUIClient):
3162         * UIProcess/API/C/WKPageUIClient.h:
3163         * UIProcess/API/Cocoa/WKPreferences.mm:
3164         (-[WKPreferences _allowsPictureInPictureMediaPlayback]):
3165         (-[WKPreferences _setAllowsPictureInPictureMediaPlayback:]):
3166         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3167         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3168         * UIProcess/Cocoa/UIDelegate.h:
3169         * UIProcess/Cocoa/UIDelegate.mm:
3170         (WebKit::UIDelegate::setDelegate):
3171         (WebKit::UIDelegate::UIClient::hasVideoInPictureInPictureDidChange):
3172         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
3173         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
3174         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
3175
3176 2017-05-12  David Quesada  <david_quesada@apple.com>
3177
3178         Add SPI for overriding WKWebView's clipping behavior for _visibleContentRect
3179         https://bugs.webkit.org/show_bug.cgi?id=172000
3180         rdar://problem/32144756
3181
3182         Reviewed by Simon Fraser.
3183
3184         Extract -[WKWebView _visibleContentRect]'s use of -_scroller to a new property
3185         _enclosingViewForExposedRectComputation, which is declared in the private
3186         header for subclasses to implement custom logic for determining the view to
3187         clip rendering to.
3188
3189         * UIProcess/API/Cocoa/WKWebView.mm:
3190         (-[WKWebView _enclosingViewForExposedRectComputation]):
3191         (-[WKWebView _visibleRectInEnclosingView:]):
3192         (-[WKWebView _visibleContentRect]):
3193         (-[WKWebView _visibleRectInEnclosingScrollView:]): Deleted.
3194         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3195
3196 2017-05-12  Chris Dumez  <cdumez@apple.com>
3197
3198         Stop using PassRefPtr under WebKit2/UIProcess
3199         https://bugs.webkit.org/show_bug.cgi?id=172029
3200
3201         Reviewed by Alex Christensen.
3202
3203         * UIProcess/API/Cocoa/WKWebView.mm:
3204         (-[WKWebView _takeViewSnapshot]):
3205         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3206         * UIProcess/API/gtk/PageClientImpl.cpp:
3207         (WebKit::PageClientImpl::registerEditCommand):
3208         * UIProcess/API/gtk/PageClientImpl.h:
3209         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
3210         (getIconSurfaceSynchronously):
3211         * UIProcess/API/gtk/WebKitWebContext.cpp:
3212         * UIProcess/API/wpe/PageClientImpl.cpp:
3213         (WebKit::PageClientImpl::registerEditCommand):
3214         * UIProcess/API/wpe/PageClientImpl.h:
3215         * UIProcess/Cocoa/WebViewImpl.h:
3216         * UIProcess/Cocoa/WebViewImpl.mm:
3217         (WebKit::WebViewImpl::registerEditCommand):
3218         * UIProcess/DefaultUndoController.cpp:
3219         (WebKit::DefaultUndoController::registerEditCommand):
3220         * UIProcess/DefaultUndoController.h:
3221         * UIProcess/Downloads/DownloadProxy.cpp:
3222         (WebKit::DownloadProxy::create):
3223         * UIProcess/Downloads/DownloadProxy.h:
3224         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
3225         (WebKit::GeolocationPermissionRequestManagerProxy::createRequest):
3226         * UIProcess/GeolocationPermissionRequestManagerProxy.h:
3227         * UIProcess/InspectorServer/HTTPRequest.cpp:
3228         (WebKit::HTTPRequest::parseHTTPRequestFromBuffer):
3229         * UIProcess/InspectorServer/HTTPRequest.h:
3230         * UIProcess/InspectorServer/WebInspectorServer.cpp:
3231         (WebKit::WebInspectorServer::didReceiveUnrecognizedHTTPRequest):
3232         (WebKit::WebInspectorServer::didReceiveWebSocketUpgradeHTTPRequest):
3233         (WebKit::WebInspectorServer::didEstablishWebSocketConnection):
3234         * UIProcess/InspectorServer/WebInspectorServer.h:
3235         * UIProcess/InspectorServer/WebSocketServerClient.h:
3236         (WebKit::WebSocketServerClient::didReceiveUnrecognizedHTTPRequest):
3237         (WebKit::WebSocketServerClient::didReceiveWebSocketUpgradeHTTPRequest):
3238         (WebKit::WebSocketServerClient::didEstablishWebSocketConnection):
3239         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
3240         (WebKit::WebSocketServerConnection::readHTTPMessage):
3241         (WebKit::WebSocketServerConnection::upgradeToWebSocketServerConnection):
3242         * UIProcess/InspectorServer/WebSocketServerConnection.h:
3243         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp:
3244         (WebKit::NotificationPermissionRequestManagerProxy::createRequest):
3245         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h:
3246         * UIProcess/Notifications/WebNotificationProvider.cpp:
3247         (WebKit::WebNotificationProvider::notificationPermissions):
3248         * UIProcess/Notifications/WebNotificationProvider.h:
3249         * UIProcess/PageClient.h:
3250         * UIProcess/Storage/LocalStorageDatabase.cpp:
3251         * UIProcess/WebContextMenuListenerProxy.h:
3252         * UIProcess/WebCookieManagerProxy.h:
3253         * UIProcess/WebEditCommandProxy.cpp:
3254         (WebKit::WebEditCommandProxy::unapply):
3255         (WebKit::WebEditCommandProxy::reapply):
3256         * UIProcess/WebEditCommandProxy.h:
3257         * UIProcess/WebGrammarDetail.cpp:
3258         (WebKit::WebGrammarDetail::create):
3259         * UIProcess/WebGrammarDetail.h:
3260         * UIProcess/WebPageProxy.cpp:
3261         (WebKit::ExceededDatabaseQuotaRecords::createRecord):
3262         (WebKit::WebPageProxy::registerEditCommand):
3263         (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
3264         (WebKit::WebPageProxy::exceededDatabaseQuota):
3265         (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
3266         (WebKit::WebPageProxy::takeViewSnapshot):
3267         * UIProcess/WebPageProxy.h:
3268         * UIProcess/WebProcessPool.cpp:
3269         (WebKit::WebProcessPool::plugInAutoStartOriginHashes):
3270         * UIProcess/WebProcessPool.h:
3271         * UIProcess/WebProcessProxy.h:
3272         * UIProcess/ios/PageClientImplIOS.h:
3273         * UIProcess/ios/PageClientImplIOS.mm:
3274         (-[WKEditCommandObjC initWithWebEditCommandProxy:]):
3275         (WebKit::PageClientImpl::registerEditCommand):
3276         (WebKit::PageClientImpl::saveImageToLibrary):
3277         (WebKit::PageClientImpl::setDragImage):
3278         (WebKit::PageClientImpl::takeViewSnapshot):
3279         * UIProcess/ios/WKGeolocationProviderIOS.mm:
3280         (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
3281         * UIProcess/ios/WebPageProxyIOS.mm:
3282         (WebKit::WebPageProxy::saveImageToLibrary):
3283         * UIProcess/mac/PageClientImpl.h:
3284         * UIProcess/mac/PageClientImpl.mm:
3285         (WebKit::PageClientImpl::registerEditCommand):
3286         (WebKit::PageClientImpl::setDragImage):
3287         (WebKit::PageClientImpl::setPromisedDataForImage):
3288         (WebKit::PageClientImpl::takeViewSnapshot):
3289         * UIProcess/mac/WKImmediateActionController.mm:
3290         (-[WKImmediateActionController _webHitTestResult]):
3291         * UIProcess/mac/WebPageProxyMac.mm:
3292         (WebKit::WebPageProxy::setDragImage):
3293         (WebKit::WebPageProxy::setPromisedDataForImage):
3294         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
3295
3296 2017-05-12  Jeremy Jones  <jeremyj@apple.com>
3297
3298         Add UIClient callback for when picture-in-picture is activated.
3299         https://bugs.webkit.org/show_bug.cgi?id=172023
3300
3301         Reviewed by Simon Fraser.
3302
3303         Add WKUIPageClientV10 with setHasVideoInPictureInPicture.
3304
3305         * UIProcess/API/APIUIClient.h:
3306         (API::UIClient::setHasVideoInPictureInPicture):
3307         * UIProcess/API/C/WKPage.cpp:
3308         (WKPageSetPageUIClient):
3309         * UIProcess/API/C/WKPageUIClient.h:
3310         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
3311         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
3312         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
3313
3314 2017-05-12  Brent Fulgham  <bfulgham@apple.com>
3315
3316         REGRESSION(r213564): Flash audio playback failures
3317         https://bugs.webkit.org/show_bug.cgi?id=171876
3318         <rdar://problem/32082745>
3319
3320         Reviewed by Alexey Proskuryakov.
3321
3322         The IOKit property filters added in r213564 need to be expanded to support
3323         some Flash features.
3324
3325         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
3326
3327 2017-05-12  Brent Fulgham  <bfulgham@apple.com>
3328
3329         [WK2][macOS] Add a mach-lookup exception for 'com.apple.analyticsd'
3330         https://bugs.webkit.org/show_bug.cgi?id=172040
3331         <rdar://problem/31765514>
3332
3333         Reviewed by Alexey Proskuryakov.
3334
3335         * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
3336         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
3337         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
3338         * WebProcess/com.apple.WebProcess.sb.in:
3339
3340 2017-05-12  Simon Fraser  <simon.fraser@apple.com>
3341
3342         Add some logging for layer tree commits, and resize and orientation change events
3343         https://bugs.webkit.org/show_bug.cgi?id=172041
3344
3345         Reviewed by Tim Horton.
3346
3347         Add some logging that's useful during rotation investigations.
3348
3349         * UIProcess/API/Cocoa/WKWebView.mm:
3350         (-[WKWebView _didCommitLayerTree:]):
3351         * UIProcess/ios/WKContentView.mm:
3352         (-[WKContentView _didCommitLayerTree:]):
3353
3354 2017-05-12  Andy Estes  <aestes@apple.com>
3355
3356         [Cocoa] Stop setting a status on PKPaymentRequestShippingContactUpdate when there are errors
3357         https://bugs.webkit.org/show_bug.cgi?id=172036
3358         <rdar://problem/31587957>
3359
3360         Reviewed by Anders Carlsson.
3361
3362         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
3363         (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
3364
3365 2017-05-12  Chris Dumez  <cdumez@apple.com>
3366
3367         Stop using PassRefPtr under WebKit2/Shared
3368         https://bugs.webkit.org/show_bug.cgi?id=172017
3369
3370         Reviewed by Antti Koivisto.
3371
3372         * Shared/API/APIDictionary.cpp:
3373         (API::Dictionary::add):
3374         (API::Dictionary::set):
3375         * Shared/API/APIDictionary.h:
3376         * Shared/API/APISecurityOrigin.h:
3377         (API::SecurityOrigin::createFromString):
3378         (API::SecurityOrigin::create):
3379         (API::SecurityOrigin::securityOrigin):
3380         (API::SecurityOrigin::SecurityOrigin):
3381         * Shared/API/APISerializedScriptValue.h:
3382         (API::SerializedScriptValue::create):
3383         (API::SerializedScriptValue::SerializedScriptValue):
3384         * Shared/API/c/WKSharedAPICast.h:
3385         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
3386         * Shared/APIWebArchiveResource.h:
3387         * Shared/APIWebArchiveResource.mm:
3388         (API::WebArchiveResource::create):
3389         (API::WebArchiveResource::WebArchiveResource):
3390         * Shared/AsyncRequest.h:
3391         (WebKit::AsyncRequestMap::add):
3392         * Shared/BlobDataFileReferenceWithSandboxExtension.cpp:
3393         (WebKit::BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension):
3394         * Shared/BlobDataFileReferenceWithSandboxExtension.h:
3395         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
3396         (WebKit::CoordinatedBackingStoreTile::setBackBuffer):
3397         (WebKit::CoordinatedBackingStore::updateTile):
3398         * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
3399         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
3400         (WebKit::CoordinatedGraphicsScene::createUpdateAtlas):
3401         (WebKit::CoordinatedGraphicsScene::updateImageBacking):
3402         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
3403         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
3404         (WebKit::NetscapePluginModule::getOrCreate):
3405         * Shared/Plugins/Netscape/NetscapePluginModule.h:
3406         * Shared/VisitedLinkTable.cpp:
3407         (WebKit::VisitedLinkTable::setSharedMemory):
3408         * Shared/VisitedLinkTable.h:
3409         * Shared/WebBackForwardListItem.h:
3410         (WebKit::WebBackForwardListItem::setSnapshot):
3411         * Shared/WebContextMenuItem.cpp:
3412         (WebKit::WebContextMenuItem::create):
3413         * Shared/WebContextMenuItem.h:
3414         * Shared/WebGeolocationPosition.h:
3415         * Shared/WebRenderLayer.cpp:
3416         (WebKit::WebRenderLayer::create):
3417         (WebKit::WebRenderLayer::createArrayFromLayerList):
3418         (WebKit::WebRenderLayer::WebRenderLayer):
3419         * Shared/WebRenderLayer.h:
3420         * Shared/WebRenderObject.cpp:
3421         (WebKit::WebRenderObject::create):
3422         (WebKit::WebRenderObject::WebRenderObject):
3423         * Shared/WebRenderObject.h:
3424         * UIProcess/VisitedLinkStore.cpp:
3425         (WebKit::VisitedLinkStore::resizeTable):
3426         * WebProcess/WebPage/VisitedLinkTableController.cpp:
3427         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
3428
3429 2017-05-11  Brady Eidson  <beidson@apple.com>
3430
3431         [WKWebsiteDataStore removeDataOfTypes:...] doesn't work for IndexedDB if the data store has a custom IDB path.
3432         <rdar://problem/30612463> and https://bugs.webkit.org/show_bug.cgi?id=171994
3433
3434         Reviewed by Andy Estes.
3435         Informal review by Maureen Daum.
3436
3437         * DatabaseProcess/DatabaseProcess.cpp:
3438         (WebKit::DatabaseProcess::deleteWebsiteData): Instead of accessing the m_idbServers set directly, make
3439           the method call that creates the server on demand.
3440         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins): Ditto.
3441
3442         * UIProcess/WebProcessPool.cpp:
3443         (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Not only create the DatabaseProcess if necessary,
3444           but also notify it about the passed-in WebsiteDataStore.
3445         (WebKit::WebProcessPool::getDatabaseProcessConnection):
3446         (WebKit::WebProcessPool::ensureDatabaseProcess): Deleted.
3447         * UIProcess/WebProcessPool.h:
3448         (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary):
3449
3450         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3451         (WebKit::WebsiteDataStore::fetchData):
3452         (WebKit::WebsiteDataStore::removeData):
3453         (WebKit::WebsiteDataStore::databaseProcessParameters):
3454
3455 2017-05-11  Dean Jackson  <dino@apple.com>
3456
3457         Modern Media Controls shouldn't be an experimental feature
3458         https://bugs.webkit.org/show_bug.cgi?id=172004
3459         <rdar://problem/32146522>
3460
3461         Reviewed by Simon Fraser.
3462
3463         This is either always on or always off, so shouldn't
3464         show up in an Experimental Features menu.
3465
3466         * Shared/WebPreferencesDefinitions.h: Move ModernMediaControlsEnabled
3467         to a normal preference.
3468
3469 2017-05-11  Tim Horton  <timothy_horton@apple.com>
3470
3471         Mail spins launching spell checker when typing
3472         https://bugs.webkit.org/show_bug.cgi?id=171986
3473         <rdar://problem/26305327>
3474
3475         Reviewed by Beth Dakin.
3476
3477         * UIProcess/API/Cocoa/WKWebView.mm:
3478         (-[WKWebView _setEditable:]):
3479         * UIProcess/Cocoa/WebViewImpl.h:
3480         * UIProcess/Cocoa/WebViewImpl.mm:
3481         (WebKit::WebViewImpl::didBecomeEditable):
3482         (WebKit::WebViewImpl::startObservingFontPanel): Deleted.
3483         Asynchronously pre-warm the spell checker when a WKWebView becomes editable.
3484
3485 2017-05-11  Chris Dumez  <cdumez@apple.com>
3486
3487         Stop using PassRefPtr in platform/graphics
3488         https://bugs.webkit.org/show_bug.cgi?id=171977
3489
3490         Reviewed by Alex Christensen.
3491
3492         Build fix.
3493
3494         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
3495         (WebKit::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
3496         (WebKit::CoordinatedGraphicsScene::removeBackingStoreIfNeeded):
3497         * Shared/WebCoreArgumentCoders.cpp:
3498         (IPC::ArgumentCoder<Cursor>::decode):
3499         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
3500         (WebKit::CompositingCoordinator::createImageBackingIfNeeded):
3501         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
3502         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
3503         (WebKit::GraphicsLayerCARemote::createPlatformCALayer):
3504         (WebKit::GraphicsLayerCARemote::createPlatformCAAnimation):
3505         *&