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