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