1 2017-07-03 Ryosuke Niwa <rniwa@webkit.org>
3 WebContent processes crash when the network process crashes with pending connection requests
4 https://bugs.webkit.org/show_bug.cgi?id=174065
5 <rdar://problem/30359835>
7 Reviewed by Tim Horton.
9 The bug was caused by the UI process clearing away pending network connection requests whenever the existing
10 network process crashed. This resulted in WebContent process killing itself inside ensureNetworkProcessConnection.
12 Fixed the bug by re-launching a new network process when this happens. We don't try to re-launch a new process
13 if the previous attempt to launch a network process had failed.
15 This patch splits NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch into networkProcessFailedToLaunch
16 and networkProcessCrashed to differentiate those two cases, and invoke the respective callbacks in WebProcessPool.
18 * UIProcess/API/Cocoa/WKProcessPool.mm:
19 (-[WKProcessPool _networkProcessIdentifier]): Added.
20 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
21 * UIProcess/Network/NetworkProcessProxy.cpp:
22 (WebKit::NetworkProcessProxy::networkProcessCrashed): Added.
23 (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch): Split into the two following functions.
24 (WebKit::NetworkProcessProxy::networkProcessFailedToLaunch): Extracted from networkProcessCrashedOrFailedToLaunch.
25 (WebKit::NetworkProcessProxy::clearCallbackStates): Extracted from networkProcessCrashedOrFailedToLaunch
26 (WebKit::NetworkProcessProxy::didClose): Call networkProcessCrashed.
27 (WebKit::NetworkProcessProxy::didFinishLaunching): Call networkProcessFailedToLaunch.
28 * UIProcess/Network/NetworkProcessProxy.h:
29 * UIProcess/WebProcessPool.cpp:
30 (WebKit::WebProcessPool::networkProcessCrashed): Start a new network process when there are pending connection
31 requests the crached network failed to fullfil.
32 (WebKit::WebProcessPool::networkProcessFailedToLaunch):
33 * UIProcess/WebProcessPool.h:
35 2017-07-03 Eric Carlson <eric.carlson@apple.com>
37 [MediaStream] Protect request and web view during gUM client callback
38 https://bugs.webkit.org/show_bug.cgi?id=174096
39 <rdar://problem/32833102>
41 Reviewed by Youenn Fablet.
43 Retain the message and WebView during asynchronous calls so they won't be
44 released if a navigation happens during a call to the UA for getUserMedia
45 or enumerateMediaDevices.
47 * UIProcess/Cocoa/UIDelegate.mm:
48 (WebKit::requestUserMediaAuthorizationForDevices):
49 (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
50 (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
52 2017-07-03 Andy Estes <aestes@apple.com>
54 [Xcode] Add an experimental setting to build with ccache
55 https://bugs.webkit.org/show_bug.cgi?id=173875
57 Reviewed by Tim Horton.
59 * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
61 2017-07-03 Chris Dumez <cdumez@apple.com>
63 Drop ResourceLoadStatisticsStore's statisticsLock
64 https://bugs.webkit.org/show_bug.cgi?id=174080
66 Reviewed by Brent Fulgham.
68 Drop ResourceLoadStatisticsStore's statisticsLock. It added complexity and was only needed
69 do that the SPI exposed to WebKitTestRunner would query the store synchronously from the
70 main thread. Instead, I made the SPI asynchronous and make sure we always access the store
71 from the same background thread. As a result, there is no longer any need for locking.
73 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
74 (-[WKWebsiteDataStore _resourceLoadStatisticsIsPrevalentResource:completionHandler:]):
75 (-[WKWebsiteDataStore _resourceLoadStatisticsHadUserInteraction:completionHandler:]):
76 (-[WKWebsiteDataStore _resourceLoadStatisticsIsGrandfathered:completionHandler:]):
77 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
78 * UIProcess/Storage/ResourceLoadStatisticsStore.cpp:
79 (WebKit::ResourceLoadStatisticsStore::isPrevalentResource):
80 (WebKit::ResourceLoadStatisticsStore::isGrandFathered):
81 (WebKit::ResourceLoadStatisticsStore::ensureResourceStatisticsForPrimaryDomain):
82 (WebKit::ResourceLoadStatisticsStore::createEncoderFromData):
83 (WebKit::ResourceLoadStatisticsStore::readDataFromDecoder):
84 (WebKit::ResourceLoadStatisticsStore::clearInMemory):
85 (WebKit::ResourceLoadStatisticsStore::mergeStatistics):
86 (WebKit::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler):
87 (WebKit::ResourceLoadStatisticsStore::processStatistics):
88 (WebKit::ResourceLoadStatisticsStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor):
89 (WebKit::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
90 (WebKit::ResourceLoadStatisticsStore::updateStatisticsForRemovedDataRecords):
91 (WebKit::ResourceLoadStatisticsStore::handleFreshStartWithEmptyOrNoStore):
92 * UIProcess/Storage/ResourceLoadStatisticsStore.h:
93 * UIProcess/WebResourceLoadStatisticsStore.cpp:
94 (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
95 (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
96 (WebKit::WebResourceLoadStatisticsStore::refreshFromDisk):
97 (WebKit::WebResourceLoadStatisticsStore::clearInMemoryData):
98 (WebKit::WebResourceLoadStatisticsStore::submitTelemetry):
99 (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
100 (WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
101 (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
102 (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
103 (WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
104 (WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
105 (WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
106 (WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
107 (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
108 (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
109 (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
110 * UIProcess/WebResourceLoadStatisticsStore.h:
112 2017-07-03 Wenson Hsieh <wenson_hsieh@apple.com>
114 Pasting single words copied to UIPasteboard inserts URLs in editable areas
115 https://bugs.webkit.org/show_bug.cgi?id=174082
116 <rdar://problem/33046992>
118 Reviewed by Tim Horton.
120 Add a hook to WKPreferences to allow programatic pasting.
122 * UIProcess/API/Cocoa/WKPreferences.mm:
123 (-[WKPreferences _setDOMPasteAllowed:]):
124 (-[WKPreferences _domPasteAllowed]):
125 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
127 2017-07-03 Zan Dobersek <zdobersek@igalia.com>
129 Unreviewed GTK+ and WPE build fix when building with GCC 4.9.
131 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
132 (WebKit::CoordinatedLayerTreeHost::renderNextFrame): Don't use brace-list
133 initialization to override the m_forceRepaintAsync struct. Instead, manually
134 assign the OptionalCallbackID() value to the m_forceRepaintAsync.callbackID
135 member variable, and override the m_forceRepaintAsync.needsFreshFlush member
136 variable with `false`.
138 2017-07-03 Zan Dobersek <zdobersek@igalia.com>
140 [ThreadedCompositor] Update and retrieve scene attributes under a Lock
141 https://bugs.webkit.org/show_bug.cgi?id=173762
143 Reviewed by Carlos Garcia Campos.
145 Instead of dispatching separate tasks on the composition run loop, update
146 various scene attributes by locking a common lock object and updating the
147 appropriate attribute.
149 In ThreadedCompositor::renderLayerTree(), where these attributes are used
150 in scene composition, the lock is again obtained and the attributes copied
151 into local variables, releasing the lock afterwards. The attribute values
152 in local copies are then used for that renderLayerTree() invocation.
154 This approach is more efficient than dispatching separate tasks that can
155 race against renderLayerTree() dispatches.
157 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
158 (WebKit::ThreadedCompositor::ThreadedCompositor):
159 (WebKit::m_displayRefreshMonitor):
160 (WebKit::ThreadedCompositor::setScaleFactor):
161 (WebKit::ThreadedCompositor::setScrollPosition):
162 (WebKit::ThreadedCompositor::setViewportSize):
163 (WebKit::ThreadedCompositor::setDrawsBackground):
164 (WebKit::ThreadedCompositor::renderLayerTree):
165 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
167 2017-07-01 Dan Bernstein <mitz@apple.com>
169 [iOS] Remove code only needed when building for iOS 9.x
170 https://bugs.webkit.org/show_bug.cgi?id=174068
172 Reviewed by Tim Horton.
174 * Configurations/FeatureDefines.xcconfig:
175 * Configurations/WebKit.xcconfig:
176 * Platform/spi/ios/UIKitSPI.h:
177 * UIProcess/API/Cocoa/WKWebView.mm:
178 (-[WKWebView dealloc]):
179 * UIProcess/ios/WKContentViewInteraction.mm:
180 (-[WKFormInputSession setSuggestions:]):
181 (-[WKFormInputSession invalidate]):
182 (-[WKContentView insertTextSuggestion:]):
183 (contentTypeFromFieldName):
184 (-[WKContentView textInputTraits]):
185 (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
186 * WebProcess/WebPage/ios/WebPageIOS.mm:
187 (WebKit::WebPage::getPositionInformation):
190 2017-07-01 Brady Eidson <beidson@apple.com>
192 When setting a custom cookie storage location on a WKWebsiteDataStore, cookies aren't actually removed.
193 <rdar://problem/32410662> and https://bugs.webkit.org/show_bug.cgi?id=174035
195 Reviewed by Alex Christensen.
197 * UIProcess/API/Cocoa/WKProcessPool.mm:
198 (-[WKProcessPool _terminateNetworkProcess]):
199 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
201 * UIProcess/WebProcessPool.cpp:
202 (WebKit::WebProcessPool::ensureNetworkProcess): Take an optional WebsiteDataStore. If one is passed in,
203 send it to either the existing or new network process.
204 * UIProcess/WebProcessPool.h:
206 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
207 (WebKit::WebsiteDataStore::parameters): Resolve paths first.
209 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
210 (WebKit::WebsiteDataStore::fetchDataAndApply):
211 (WebKit::WebsiteDataStore::removeData):
213 2017-07-01 Ryosuke Niwa <rniwa@webkit.org>
215 Frame.h doesn't need to include FrameLoader.h, IntRect.h, and NavigationScheduler.h
216 https://bugs.webkit.org/show_bug.cgi?id=174004
218 Reviewed by Simon Fraser.
220 * WebProcess/Plugins/WebPluginInfoProvider.cpp:
221 * WebProcess/WebPage/WebInspector.cpp:
223 2017-07-01 Dan Bernstein <mitz@apple.com>
225 [macOS] Remove code only needed when building for OS X Yosemite
226 https://bugs.webkit.org/show_bug.cgi?id=174067
228 Reviewed by Tim Horton.
230 * Configurations/Base.xcconfig:
231 * Configurations/BaseTarget.xcconfig:
232 * Configurations/BaseXPCService.xcconfig:
233 * Configurations/DebugRelease.xcconfig:
234 * Configurations/FeatureDefines.xcconfig:
235 * Configurations/NetworkService.xcconfig:
236 * Configurations/PluginService.32.xcconfig:
237 * Configurations/PluginService.64.xcconfig:
238 * Configurations/Version.xcconfig:
239 * Configurations/WebContentService.xcconfig:
240 * Configurations/WebKit.xcconfig:
241 * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
242 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Removed.
243 * NetworkProcess/NetworkProcessCreationParameters.cpp:
244 (WebKit::NetworkProcessCreationParameters::encode):
245 (WebKit::NetworkProcessCreationParameters::decode):
246 * NetworkProcess/NetworkProcessCreationParameters.h:
247 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
248 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
249 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
250 * Platform/IPC/Connection.h:
251 * Platform/IPC/mac/ConnectionMac.mm:
252 (IPC::Connection::platformInvalidate):
253 (IPC::Connection::platformInitialize):
254 (IPC::Connection::open):
255 (IPC::Connection::exceptionSourceEventHandler): Deleted.
256 (IPC::Connection::setShouldCloseConnectionOnMachExceptions): Deleted.
257 * Platform/mac/LayerHostingContext.h:
258 * Platform/mac/LayerHostingContext.mm:
259 (WebKit::LayerHostingContext::createFencePort):
260 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Removed.
261 * PluginProcess/mac/PluginControllerProxyMac.mm:
262 (WebKit::PluginControllerProxy::updateLayerHostingContext):
263 * PluginProcess/mac/PluginProcessShim.mm:
264 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
265 * Shared/ChildProcess.h:
266 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
267 (WebKit::getPluginInfoFromPropertyLists):
268 (WebKit::NetscapePluginModule::getPluginInfo):
269 (WebKit::contentsOfPropertyListAtURL): Deleted.
270 (WebKit::getMIMETypesFromPluginBundle): Deleted.
271 * Shared/Plugins/PluginProcessCreationParameters.cpp:
272 (WebKit::PluginProcessCreationParameters::encode):
273 (WebKit::PluginProcessCreationParameters::decode):
274 * Shared/Plugins/PluginProcessCreationParameters.h:
275 * Shared/WebProcessCreationParameters.cpp:
276 (WebKit::WebProcessCreationParameters::encode):
277 (WebKit::WebProcessCreationParameters::decode):
278 * Shared/WebProcessCreationParameters.h:
279 * Shared/mac/ChildProcessMac.mm:
280 (WebKit::ChildProcess::setSharedHTTPCookieStorage):
281 * UIProcess/API/C/WKPage.cpp:
282 (WKPageSetPageUIClient):
283 (fixUpBotchedPageUIClient): Deleted.
284 * UIProcess/ChildProcessProxy.cpp:
285 (WebKit::ChildProcessProxy::didFinishLaunching):
286 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
287 (WebKit::WebProcessPool::platformInitializeWebProcess):
288 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
289 (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate):
290 * UIProcess/Cocoa/WebViewImpl.h:
291 * UIProcess/Cocoa/WebViewImpl.mm:
292 (WebKit::WebViewImpl::updateLayer):
293 (WebKit::WebViewImpl::startWindowDrag):
294 * UIProcess/DrawingAreaProxy.h:
295 (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate): Deleted.
296 * UIProcess/Plugins/PluginProcessProxy.cpp:
297 (WebKit::PluginProcessProxy::didFinishLaunching):
298 * UIProcess/Plugins/PluginProcessProxy.h:
299 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
300 (WebKit::PluginProcessProxy::platformInitializePluginProcess):
301 (WebKit::PluginProcessProxy::createPropertyListFile): Deleted.
302 * UIProcess/WebPageProxy.cpp:
303 (WebKit::WebPageProxy::setTopContentInset):
304 * UIProcess/mac/PageClientImpl.mm:
305 (WebKit::PageClientImpl::rootViewToWindow):
306 (WebKit::PageClientImpl::startWindowDrag):
307 * UIProcess/mac/RemoteWebInspectorProxyMac.mm:
308 (WebKit::RemoteWebInspectorProxy::platformStartWindowDrag):
309 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
310 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
311 (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
312 (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate): Deleted.
313 * UIProcess/mac/WebInspectorProxyMac.mm:
314 (WebKit::WebInspectorProxy::createFrontendWindow):
315 (WebKit::WebInspectorProxy::platformStartWindowDrag):
316 * UIProcess/mac/WebPopupMenuProxyMac.mm:
317 (WebKit::WebPopupMenuProxyMac::showPopupMenu):
318 * WebKit2.xcodeproj/project.pbxproj:
319 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Removed.
320 * WebProcess/WebPage/WebPage.cpp:
321 * WebProcess/WebPage/WebPage.h:
322 * WebProcess/WebPage/WebPage.messages.in:
323 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
324 (WebKit::addAnimationToLayer):
325 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
326 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
327 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
328 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
329 (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
330 * WebProcess/cocoa/WebProcessCocoa.mm:
331 (WebKit::WebProcess::platformInitializeWebProcess):
332 * WebProcess/com.apple.WebProcess.sb.in:
334 2017-07-01 Chris Dumez <cdumez@apple.com>
336 Replace ResourceLoadStatisticsStore C API with Cocoa SPI
337 https://bugs.webkit.org/show_bug.cgi?id=174060
339 Reviewed by Brent Fulgham.
341 Replace ResourceLoadStatisticsStore C API by Cocoa SPI. The new Cocoa SPI is on
342 WKWebsiteDataStore, which allows us to get rid of the WebResourceLoadStatisticsManager
343 singleton as the SPI can now interact directly with the WebResourceLoadStatisticsStore.
345 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp: Removed.
346 * UIProcess/API/C/WKResourceLoadStatisticsManager.h: Removed.
349 * UIProcess/WebResourceLoadStatisticsManager.cpp: Removed.
350 * UIProcess/WebResourceLoadStatisticsManager.h: Removed.
351 Drop WebResourceLoadStatisticsManager singleton which was only required by the
352 C API. This is because the C API was global, rather than working on a specific
355 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
356 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
357 Add new Cocoa SPI on WKWebsiteDataStore. This is only used for testing.
359 * UIProcess/WebResourceLoadStatisticsStore.cpp:
360 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
361 Stop registering the store with the WebResourceLoadStatisticsManager singleton,
362 as this singleton is gone.
364 * UIProcess/WebsiteData/WebsiteDataStore.h:
365 (WebKit::WebsiteDataStore::resourceLoadStatistics):
366 Add new getter to retrieve the WebResourceLoadStatisticsStore from the
367 WebsiteDataStore. This is needed by the new Cocoa SPI.
369 * WebKit2.xcodeproj/project.pbxproj:
372 2017-06-30 Megan Gardner <megan_gardner@apple.com>
374 Unreviewed mac build fix.
376 * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
377 * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
379 2017-06-30 Megan Gardner <megan_gardner@apple.com>
381 Add API to get WKActivatedElementInfo
382 https://bugs.webkit.org/show_bug.cgi?id=174001
383 <rdar://problem/29165518>
385 Adding a way to get a WKActivatedElementInfo for a point on a WKWebView.
387 Reviewed by Tim Horton.
389 * UIProcess/API/Cocoa/WKWebView.mm:
390 (-[WKWebView requestActivatedElementAtPosition:completionBlock:]):
391 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
392 * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
393 (+[_WKActivatedElementInfo infoWithType:withInteractionInformationAtPosition:]):
394 (-[_WKActivatedElementInfo infoWithType:withInteractionInformationAtPosition:]):
395 * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
397 2017-06-30 Tim Horton <timothy_horton@apple.com>
399 Use API instead of SPI for content inset adjustment behavior
400 https://bugs.webkit.org/show_bug.cgi?id=174050
402 Reviewed by Sam Weinig.
404 * Platform/spi/ios/UIKitSPI.h:
405 * UIProcess/ios/WKScrollView.mm:
406 (-[WKScrollView initWithFrame:]):
407 (-[WKScrollView setContentInsetAdjustmentBehavior:]):
408 (-[WKScrollView _setContentInsetAdjustmentBehaviorInternal:]):
409 (-[WKScrollView _setContentInsetAdjustmentBehavior:]): Deleted.
410 Switch over to the API. The old SPI calls the API internally, so our
411 override will now cover all callers.
413 2017-06-30 Chris Dumez <cdumez@apple.com>
415 Move store logic from WebResourceLoadStatisticsManager to WebResourceLoadStatisticsStore
416 https://bugs.webkit.org/show_bug.cgi?id=174038
418 Reviewed by Brent Fulgham.
420 Move store logic from WebResourceLoadStatisticsManager to WebResourceLoadStatisticsStore.
421 WebResourceLoadStatisticsManager is now essentially a proxy to the
422 WebResourceLoadStatisticsStore to support the current C API.
424 In a follow-up, I plan to to replace the C API with a Cocoa SPI which works on a
425 WebResourceLoadStatisticsStore directly instead of requiring a
426 WebResourceLoadStatisticsManager singleton.
428 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
429 (WKResourceLoadStatisticsManagerSetMinimumTimeBetweenDataRecordsRemoval):
430 (WKResourceLoadStatisticsManagerResetToConsistentState):
431 * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
432 * UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm: Removed.
433 * UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm:
434 (WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded):
435 * UIProcess/WebResourceLoadStatisticsManager.cpp:
436 (WebKit::WebResourceLoadStatisticsManager::WebResourceLoadStatisticsManager):
437 (WebKit::WebResourceLoadStatisticsManager::~WebResourceLoadStatisticsManager):
438 (WebKit::WebResourceLoadStatisticsManager::setStatisticsStore):
439 (WebKit::WebResourceLoadStatisticsManager::clearInMemoryStore):
440 (WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStore):
441 (WebKit::WebResourceLoadStatisticsManager::logUserInteraction):
442 (WebKit::WebResourceLoadStatisticsManager::clearUserInteraction):
443 (WebKit::WebResourceLoadStatisticsManager::hasHadUserInteraction):
444 (WebKit::WebResourceLoadStatisticsManager::setPrevalentResource):
445 (WebKit::WebResourceLoadStatisticsManager::isPrevalentResource):
446 (WebKit::WebResourceLoadStatisticsManager::clearPrevalentResource):
447 (WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
448 (WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
449 (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
450 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
451 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
452 (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
453 (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveCookiePartitionFree):
454 (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweenDataRecordsRemoval):
455 (WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
456 (WebKit::WebResourceLoadStatisticsManager::fireDataModificationHandler):
457 (WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):
458 (WebKit::WebResourceLoadStatisticsManager::fireTelemetryHandler):
459 * UIProcess/WebResourceLoadStatisticsManager.h:
460 * UIProcess/WebResourceLoadStatisticsStore.cpp:
461 (WebKit::primaryDomain):
462 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
463 (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
464 (WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
465 (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
466 (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
467 (WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
468 (WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
469 (WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
470 (WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
471 (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
472 (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
473 (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
474 (WebKit::WebResourceLoadStatisticsStore::fireDataModificationHandler):
475 (WebKit::WebResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler):
476 (WebKit::WebResourceLoadStatisticsStore::fireTelemetryHandler):
477 (WebKit::WebResourceLoadStatisticsStore::clearInMemory):
478 (WebKit::WebResourceLoadStatisticsStore::clearInMemoryAndPersistent):
479 (WebKit::WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
480 (WebKit::WebResourceLoadStatisticsStore::setTimeToLiveCookiePartitionFree):
481 (WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweenDataRecordsRemoval):
482 (WebKit::WebResourceLoadStatisticsStore::setGrandfatheringTime):
483 * UIProcess/WebResourceLoadStatisticsStore.h:
484 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
485 (WebKit::WebsiteDataStore::removeData):
486 * WebKit2.xcodeproj/project.pbxproj:
488 2017-06-30 John Wilander <wilander@apple.com>
490 [WK2] Resource load statistics code is spamming the WebProcess with a test-only message
491 https://bugs.webkit.org/show_bug.cgi?id=174048
492 <rdar://problem/33062376>
494 Reviewed by Brent Fulgham.
496 Fix the telemetry data message send so that it is not generated during normal operations.
497 This is only meant to be used by WebKitTestRunner.
499 * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
500 (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
502 2017-06-30 Daniel Bates <dabates@apple.com>
504 Attempt to fix the WPE build following <https://trac.webkit.org/changeset/219013>
505 (https://bugs.webkit.org/show_bug.cgi?id=165160)
507 Update the prototype of UIClient::createNewPage() to take a API::FrameInfo& instead of
508 a WebFrameProxy* and a const WebCore::SecurityOriginData&.
510 * UIProcess/API/glib/WebKitUIClient.cpp:
512 2017-06-30 Alex Christensen <achristensen@webkit.org>
514 Stop soft linking with CFNetwork
515 https://bugs.webkit.org/show_bug.cgi?id=174029
517 Reviewed by Jer Noble.
519 * Shared/mac/CookieStorageShim.mm:
521 2017-06-30 Daniel Bates <dabates@apple.com>
523 API::FrameInfo should know the web page that contains the frame; add API property webView to WKFrameInfo
524 https://bugs.webkit.org/show_bug.cgi?id=165160
525 <rdar://problem/29451999>
527 Reviewed by Brady Eidson.
529 Expose a property on WKFrameInfo to retrieve the WKWebView of the web page that contains the
530 frame. This will allow an embedding client to know the web view that initiated the navigation
531 request as well as differentiate between a navigation initiated by web content from one
534 The majority of this change is passing the document D that initiated the targeted navigation
535 or called window.open() through the loading machinery to the FrameLoaderClient. The changes
536 to pass this information to the FrameLoaderClient when creating a new window are straightforward.
537 For targeted navigation, the WebKit2 FrameLoaderClient implementation now computes the info
538 for the originating frame regardless of the navigation type (NavigationAction::type()).
539 (Currently we only compute the originating frame for hyperlink activated navigations,
540 form submissions, and form resubmissions). The WebProcess computes the page ID of the page
541 that contains the originating frame and sends that to the UIProcess so that it can create
542 an API::FrameInfo for the originating frame and associate the page that contains the frame,
543 if the navigation was triggered by web content. If the navigation was triggered by API
544 (e.g. -[WKWebView goBack]) then the created API::FrameInfo does not have an associated page
545 so that an embedding client can distinguish between a navigation initiated by web content
546 from a navigation that it initiated via API depending on whether API::FrameInfo::page() is
547 nullptr. We expose property webView on the Mac and iOS API class WKFrameInfo to return the
548 WKWebView corresponding to API::FrameInfo::page().
550 A small change that this patch makes is to have the WebProcess compute the originating frame
551 info (call WebFrame::info()) and send it over to the UIProcess as opposed to sending the frame
552 ID of the originating frame and having the UIProcess compute the frame info from it. We do this
553 because the UIProcess may not be able to compute the frame info for the originating frame if
554 the window that it was contained in was closed between the time the WebProcess sent the frame
555 ID to the UIProcess and the UIProcess received it.
557 * UIProcess/API/APIFrameInfo.cpp:
558 (API::FrameInfo::create):
559 (API::FrameInfo::FrameInfo):
560 (API::FrameInfo::clearPage):
561 * UIProcess/API/APIFrameInfo.h:
562 * UIProcess/API/APIUIClient.h:
563 (API::UIClient::createNewPage):
564 (API::UIClient::createNewPageAsync):
565 * UIProcess/API/C/WKPage.cpp:
566 (WKPageSetPageUIClient):
567 * UIProcess/API/Cocoa/WKFrameInfo.h:
568 * UIProcess/API/Cocoa/WKFrameInfo.mm:
569 (-[WKFrameInfo description]):
570 (-[WKFrameInfo webView]):
571 * UIProcess/API/Cocoa/WKUserContentController.mm:
572 * UIProcess/Cocoa/UIDelegate.h:
573 * UIProcess/Cocoa/UIDelegate.mm:
574 (WebKit::UIDelegate::UIClient::createNewPageCommon):
575 (WebKit::UIDelegate::UIClient::createNewPage):
576 (WebKit::UIDelegate::UIClient::createNewPageAsync):
577 * UIProcess/WebPageProxy.cpp:
578 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
579 (WebKit::WebPageProxy::createNewPage):
580 * UIProcess/WebPageProxy.h:
581 * UIProcess/WebPageProxy.messages.in:
582 * WebProcess/Plugins/PluginView.cpp:
583 (WebKit::PluginView::loadURL):
584 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
585 (WebKit::WebChromeClient::createWindow):
586 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
587 (WebKit::WebFrameLoaderClient::dispatchCreatePage):
588 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
589 * WebProcess/WebPage/WebInspector.cpp:
590 (WebKit::WebInspector::openInNewTab):
592 2017-06-29 Jer Noble <jer.noble@apple.com>
594 Make Legacy EME API controlled by RuntimeEnabled setting.
595 https://bugs.webkit.org/show_bug.cgi?id=173994
597 Reviewed by Sam Weinig.
599 Add a new WKWebViewConfiguration property, as well as a new WKPreferences function, both able to control
600 WebCore's new RuntimeEnabledFeature setting for the Legacy EME API.
602 * Configurations/FeatureDefines.xcconfig:
603 * Shared/WebPreferencesDefinitions.h:
604 * UIProcess/API/C/WKPreferences.cpp:
605 (WKPreferencesGetLegacyEncryptedMediaAPIEnabled):
606 (WKPreferencesSetLegacyEncryptedMediaAPIEnabled):
607 * UIProcess/API/C/WKPreferencesRef.h:
608 * UIProcess/API/Cocoa/WKWebView.mm:
609 (-[WKWebView _initializeWithConfiguration:]):
610 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
611 (-[WKWebViewConfiguration init]):
612 (-[WKWebViewConfiguration copyWithZone:]):
613 (-[WKWebViewConfiguration _setLegacyEncryptedMediaAPIEnabled:]):
614 (-[WKWebViewConfiguration _legacyEncryptedMediaAPIEnabled]):
615 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
616 * WebProcess/WebPage/WebPage.cpp:
617 (WebKit::WebPage::updatePreferences):
619 2017-06-30 Jer Noble <jer.noble@apple.com>
621 REGRESSION (r218757): Touch Bar's media scrubber timeline runs from 00:00 to 00:00 and has no playhead
622 https://bugs.webkit.org/show_bug.cgi?id=174032
624 Reviewed by Eric Carlson.
626 Fix a copypasta error where durationChange notifications were changing the value of muted.
628 * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
629 (WebKit::WebPlaybackSessionManagerProxy::durationChanged):
631 2017-06-30 Chris Dumez <cdumez@apple.com>
633 Move ResourceLoadStatisticsStore to WebKit2/UIProcess
634 https://bugs.webkit.org/show_bug.cgi?id=174033
636 Reviewed by Brent Fulgham.
638 Move ResourceLoadStatisticsStore to WebKit2/UIProcess since it is only
639 used in the WebKit2 UIProcess.
642 * UIProcess/Storage/ResourceLoadStatisticsStore.cpp: Renamed from Source/WebCore/loader/ResourceLoadStatisticsStore.cpp.
643 (WebKit::ResourceLoadStatisticsStore::createEncoderFromData):
644 (WebKit::ResourceLoadStatisticsStore::readDataFromDecoder):
645 (WebKit::ResourceLoadStatisticsStore::clearInMemory):
646 (WebKit::ResourceLoadStatisticsStore::clearInMemoryAndPersistent):
647 (WebKit::ResourceLoadStatisticsStore::mergeStatistics):
648 (WebKit::ResourceLoadStatisticsStore::fireDataModificationHandler):
649 (WebKit::ResourceLoadStatisticsStore::fireTelemetryHandler):
650 (WebKit::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler):
651 (WebKit::ResourceLoadStatisticsStore::processStatistics):
652 (WebKit::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
653 (WebKit::ResourceLoadStatisticsStore::shouldRemoveDataRecords):
654 (WebKit::ResourceLoadStatisticsStore::dataRecordsBeingRemoved):
655 (WebKit::ResourceLoadStatisticsStore::dataRecordsWereRemoved):
656 (WebKit::ResourceLoadStatisticsStore::statisticsLock):
657 * UIProcess/Storage/ResourceLoadStatisticsStore.h: Renamed from Source/WebCore/loader/ResourceLoadStatisticsStore.h.
658 * UIProcess/WebResourceLoadStatisticsManager.cpp:
659 (WebKit::primaryDomain):
660 * UIProcess/WebResourceLoadStatisticsManager.h:
661 * UIProcess/WebResourceLoadStatisticsStore.h:
662 * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
663 * UIProcess/WebResourceLoadStatisticsTelemetry.h:
664 * WebKit2.xcodeproj/project.pbxproj:
666 2017-06-30 Ryosuke Niwa <rniwa@webkit.org>
668 Ran sort-Xcode-project-file.
670 * WebKit2.xcodeproj/project.pbxproj:
672 2017-06-30 Chris Dumez <cdumez@apple.com>
674 ResourceLoadObserver does not need a ResourceLoadStatisticsStore
675 https://bugs.webkit.org/show_bug.cgi?id=174013
677 Reviewed by Brent Fulgham.
679 ResourceLoadObserver does not need a ResourceLoadStatisticsStore. ResourceLoadStatisticsStore is too complicated for its needs.
680 ResourceLoadStatisticsStore can then be moved to WebKit2/UIProcess in a follow-up.
682 * WebProcess/WebProcess.cpp:
683 (WebKit::m_webSQLiteDatabaseTracker):
684 (WebKit::WebProcess::statisticsChangedTimerFired):
685 * WebProcess/WebProcess.h:
687 2017-06-30 Brent Fulgham <bfulgham@apple.com>
689 [WK2][iOS][macOS] Update XPC services process launch dictionary
690 https://bugs.webkit.org/show_bug.cgi?id=173995
691 <rdar://problem/32797264>
693 Reviewed by Alex Christensen.
695 Update the WebProcess and Plugin Process XPC launch dictionaries to activate
696 improved ALSR features when launching.
698 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
699 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
700 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
702 2017-06-30 Chris Dumez <cdumez@apple.com>
704 Merge WebResourceLoadStatisticsManager and WebResourceLoadObserver
705 https://bugs.webkit.org/show_bug.cgi?id=174008
707 Reviewed by Brent Fulgham.
709 Merge WebResourceLoadStatisticsManager and WebResourceLoadObserver. One was basically
710 a proxy to the other.
712 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
713 (WKResourceLoadStatisticsManagerSetPrevalentResource):
714 (WKResourceLoadStatisticsManagerIsPrevalentResource):
715 (WKResourceLoadStatisticsManagerSetHasHadUserInteraction):
716 (WKResourceLoadStatisticsManagerIsHasHadUserInteraction):
717 (WKResourceLoadStatisticsManagerSetGrandfathered):
718 (WKResourceLoadStatisticsManagerIsGrandfathered):
719 (WKResourceLoadStatisticsManagerSetSubframeUnderTopFrameOrigin):
720 (WKResourceLoadStatisticsManagerSetSubresourceUnderTopFrameOrigin):
721 (WKResourceLoadStatisticsManagerSetSubresourceUniqueRedirectTo):
722 (WKResourceLoadStatisticsManagerSetTimeToLiveUserInteraction):
723 (WKResourceLoadStatisticsManagerSetTimeToLiveCookiePartitionFree):
724 (WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
725 (WKResourceLoadStatisticsManagerSetGrandfatheringTime):
726 (WKResourceLoadStatisticsManagerFireDataModificationHandler):
727 (WKResourceLoadStatisticsManagerFireShouldPartitionCookiesHandler):
728 (WKResourceLoadStatisticsManagerFireShouldPartitionCookiesHandlerForOneDomain):
729 (WKResourceLoadStatisticsManagerFireTelemetryHandler):
730 (WKResourceLoadStatisticsManagerSetNotifyPagesWhenDataRecordsWereScanned):
731 (WKResourceLoadStatisticsManagerSetShouldClassifyResourcesBeforeDataRecordsRemoval):
732 (WKResourceLoadStatisticsManagerSetNotifyPagesWhenTelemetryWasCaptured):
733 (WKResourceLoadStatisticsManagerSetShouldSubmitTelemetry):
734 (WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStore):
735 (WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStoreModifiedSinceHours):
736 (WKResourceLoadStatisticsManagerResetToConsistentState):
737 * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
738 * UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm:
739 (WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):
740 * UIProcess/WebResourceLoadObserver.cpp: Removed.
741 * UIProcess/WebResourceLoadObserver.h: Removed.
742 * UIProcess/WebResourceLoadStatisticsManager.cpp:
743 (WebKit::primaryDomain):
744 (WebKit::WebResourceLoadStatisticsManager::shared):
745 (WebKit::WebResourceLoadStatisticsManager::setStatisticsStore):
746 (WebKit::WebResourceLoadStatisticsManager::setStatisticsQueue):
747 (WebKit::WebResourceLoadStatisticsManager::clearInMemoryStore):
748 (WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStore):
749 (WebKit::WebResourceLoadStatisticsManager::logUserInteraction):
750 (WebKit::WebResourceLoadStatisticsManager::clearUserInteraction):
751 (WebKit::WebResourceLoadStatisticsManager::hasHadUserInteraction):
752 (WebKit::WebResourceLoadStatisticsManager::setPrevalentResource):
753 (WebKit::WebResourceLoadStatisticsManager::isPrevalentResource):
754 (WebKit::WebResourceLoadStatisticsManager::clearPrevalentResource):
755 (WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
756 (WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
757 (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
758 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
759 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
760 (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
761 (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveCookiePartitionFree):
762 (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
763 (WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
764 (WebKit::WebResourceLoadStatisticsManager::fireDataModificationHandler):
765 (WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):
766 (WebKit::WebResourceLoadStatisticsManager::fireTelemetryHandler):
767 * UIProcess/WebResourceLoadStatisticsManager.h:
768 * UIProcess/WebResourceLoadStatisticsStore.cpp:
769 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
770 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
771 (WebKit::WebsiteDataStore::removeData):
772 * WebKit2.xcodeproj/project.pbxproj:
774 2017-06-30 Wenson Hsieh <wenson_hsieh@apple.com>
776 [iOS DnD] Drag caret rect is incorrectly computed when dropping in editable content in iframes
777 https://bugs.webkit.org/show_bug.cgi?id=174017
778 <rdar://problem/32959782>
780 Reviewed by Simon Fraser.
782 Send the drag caret rect in root view coordinates over to the UI process.
784 * UIProcess/API/Cocoa/WKWebView.mm:
785 (-[WKWebView _dragCaretRect]):
786 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
788 Add basic test plumbing to fetch the current drag caret rect.
790 * WebProcess/WebPage/WebPage.cpp:
791 (WebKit::WebPage::performDragControllerAction):
793 2017-06-30 Youenn Fablet <youenn@apple.com>
795 Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
796 https://bugs.webkit.org/show_bug.cgi?id=169389
798 Reviewed by Alex Christensen.
800 * fast/mediastream/RTCPeerConnection-getConfiguration-expected.txt:
802 2017-06-29 Ryosuke Niwa <rniwa@webkit.org>
804 Assert that callback ID is not 0 or -1 during encoding and decoding
805 https://bugs.webkit.org/show_bug.cgi?id=173803
807 Reviewed by Brady Eidson.
809 To diagnosing the hang inside Safari (<rdar://problem/32841256>), add assertions for the callback ID
810 to be not 0 or -1 during encoding and decoding of IPC messages since the latest analysis seems to
811 indicate the hang is caused by the hash map getting corrupted by the insertion of 0 (empty value).
813 Wrapped the uint64_t in CallbackID and OptionalCallbackID to add assertions.
815 * NetworkProcess/soup/NetworkProcessSoup.cpp:
816 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
817 * Shared/CallbackID.h: Added.
818 (WebKit::CallbackID::CallbackID):
819 (WebKit::CallbackID::operator==):
820 (WebKit::CallbackID::toInteger):
821 (WebKit::CallbackID::isValid):
822 (WebKit::CallbackID::isValidCallbackID): A callback ID is valid when it's neither 0 nor -1.
823 (WebKit::CallbackID::fromInteger): Create a CallbackID object from potentially unsafe value.
824 (WebKit::CallbackID::generateID): Generates the next callback ID. Moved from CallbackBase.
825 (WebKit::CallbackID::encode): Added. Assert that it's neither 0 nor -1.
826 (WebKit::CallbackID::decode): Ditto.
827 (WTF::CallbackIDHash::hash):
828 (WTF::CallbackIDHash::equal):
829 (WTF::HashTraits<WebKit::CallbackID>::emptyValue):
830 (WTF::HashTraits<WebKit::CallbackID>::constructDeletedValue):
831 (WTF::HashTraits<WebKit::CallbackID>::isDeletedValue):
832 * Shared/OptionalCallbackID.h: Added. Unlike CallbackID, callback ID here can be 0.
833 (WebKit::OptionalCallbackID::OptionalCallbackID):
834 (WebKit::OptionalCallbackID::toInteger):
835 (WebKit::OptionalCallbackID::callbackID): Returns a valid CallbackID object. The caller of
836 this function must have verified that the ID is neither 0 or -1 before calling this function.
837 (WebKit::OptionalCallbackID::operator bool):
838 (WebKit::OptionalCallbackID::isValid):
839 (WebKit::OptionalCallbackID::isValidCallbackID):
840 (WebKit::OptionalCallbackID::encode): Since OptionalCallbackID can be 0, only assert that it's not -1.
841 (WebKit::OptionalCallbackID::decode): Ditto.
842 * Shared/mac/RemoteLayerTreeTransaction.h:
843 * Shared/mac/RemoteLayerTreeTransaction.h:
844 * UIProcess/GenericCallback.h:
845 (WebKit::CallbackBase::callbackID): Returns a CallbackID object instead of uint64_t.
846 (WebKit::CallbackBase::CallbackBase):
847 (WebKit::CallbackBase::generateCallbackID): Deleted.
848 (WebKit::CallbackMap::put): Returns a callback ID. Also added a version that doesn't take activity token
849 as used in WebCookieManagerProxy
850 (WebKit::CallbackMap::take): Takes a callback ID.
851 * UIProcess/WebCookieManagerProxy.cpp: Updated the code as callback maps are merged.
852 (WebKit::WebCookieManagerProxy::processPoolDestroyed):
853 (WebKit::WebCookieManagerProxy::processDidClose):
854 (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
855 (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
856 (WebKit::WebCookieManagerProxy::deleteCookie):
857 (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
858 (WebKit::WebCookieManagerProxy::setCookie):
859 (WebKit::WebCookieManagerProxy::setCookies):
860 (WebKit::WebCookieManagerProxy::getAllCookies):
861 (WebKit::WebCookieManagerProxy::getCookies):
862 (WebKit::WebCookieManagerProxy::didSetCookies):
863 (WebKit::WebCookieManagerProxy::didGetCookies):
864 (WebKit::WebCookieManagerProxy::didDeleteCookies):
865 (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
866 (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
867 (WebKit::WebCookieManagerProxy::didGetHTTPCookieAcceptPolicy):
868 (WebKit::WebCookieManagerProxy::didSetHTTPCookieAcceptPolicy):
869 * UIProcess/WebCookieManagerProxy.h:
870 * UIProcess/WebCookieManagerProxy.messages.in:
871 * UIProcess/WebPageProxy.cpp:
872 (WebKit::WebPageProxy::setInitialFocus):
873 (WebKit::WebPageProxy::validateCommand):
874 (WebKit::WebPageProxy::runJavaScriptInMainFrame):
875 (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
876 (WebKit::WebPageProxy::getSourceForFrame):
877 (WebKit::WebPageProxy::getContentsAsString):
878 (WebKit::WebPageProxy::getBytecodeProfile):
879 (WebKit::WebPageProxy::getSamplingProfilerOutput):
880 (WebKit::WebPageProxy::getContentsAsMHTMLData):
881 (WebKit::WebPageProxy::getSelectionOrContentsAsString):
882 (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
883 (WebKit::WebPageProxy::getMainResourceDataOfFrame):
884 (WebKit::WebPageProxy::getResourceDataFromFrame):
885 (WebKit::WebPageProxy::getWebArchiveOfFrame):
886 (WebKit::WebPageProxy::forceRepaint):
887 (WebKit::WebPageProxy::clearLoadDependentCallbacks):
888 (WebKit::WebPageProxy::voidCallback):
889 (WebKit::WebPageProxy::dataCallback):
890 (WebKit::WebPageProxy::imageCallback):
891 (WebKit::WebPageProxy::stringCallback):
892 (WebKit::WebPageProxy::invalidateStringCallback):
893 (WebKit::WebPageProxy::scriptValueCallback):
894 (WebKit::WebPageProxy::computedPagesCallback):
895 (WebKit::WebPageProxy::validateCommandCallback):
896 (WebKit::WebPageProxy::unsignedCallback):
897 (WebKit::WebPageProxy::editingRangeCallback):
898 (WebKit::WebPageProxy::machSendRightCallback):
899 (WebKit::WebPageProxy::rectForCharacterRangeCallback):
900 (WebKit::WebPageProxy::printFinishedCallback):
901 (WebKit::WebPageProxy::computePagesForPrinting):
902 (WebKit::WebPageProxy::drawRectToImage):
903 (WebKit::WebPageProxy::drawPagesToPDF):
904 (WebKit::WebPageProxy::drawPagesForPrinting):
905 (WebKit::WebPageProxy::getMarkedRangeAsync):
906 (WebKit::WebPageProxy::getSelectedRangeAsync):
907 (WebKit::WebPageProxy::characterIndexForPointAsync):
908 (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
909 (WebKit::WebPageProxy::takeSnapshot):
910 (WebKit::WebPageProxy::installActivityStateChangeCompletionHandler):
911 (WebKit::WebPageProxy::getLoadDecisionForIcon):
912 (WebKit::WebPageProxy::finishedLoadingIcon):
913 * UIProcess/WebPageProxy.h:
914 * UIProcess/WebPageProxy.messages.in:
915 * UIProcess/ios/WebPageProxyIOS.mm:
916 (WebKit::WebPageProxy::gestureCallback):
917 (WebKit::WebPageProxy::touchesCallback):
918 (WebKit::WebPageProxy::autocorrectionDataCallback):
919 (WebKit::WebPageProxy::selectionContextCallback):
920 (WebKit::WebPageProxy::autocorrectionContextCallback):
921 (WebKit::WebPageProxy::selectionRectsCallback):
922 (WebKit::WebPageProxy::selectWithGesture):
923 (WebKit::WebPageProxy::updateSelectionWithTouches):
924 (WebKit::WebPageProxy::requestAutocorrectionData):
925 (WebKit::WebPageProxy::applyAutocorrection):
926 (WebKit::WebPageProxy::executeEditCommand):
927 (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
928 (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
929 (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
930 (WebKit::WebPageProxy::selectPositionAtPoint):
931 (WebKit::WebPageProxy::beginSelectionInDirection):
932 (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
933 (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
934 (WebKit::WebPageProxy::requestDictationContext):
935 (WebKit::WebPageProxy::requestAutocorrectionContext):
936 (WebKit::WebPageProxy::getSelectionContext):
937 (WebKit::WebPageProxy::selectWithTwoTouches):
938 (WebKit::WebPageProxy::requestRectsForGranularityWithSelectionOffset):
939 (WebKit::WebPageProxy::requestRectsAtSelectionOffsetWithText):
940 (WebKit::WebPageProxy::moveSelectionByOffset):
941 (WebKit::WebPageProxy::focusNextAssistedNode):
942 (WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF):
943 (WebKit::WebPageProxy::drawToPDFCallback):
944 * UIProcess/mac/WKPrintingView.mm:
945 (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
946 (-[WKPrintingView _askPageToComputePageRects]):
947 (-[WKPrintingView _drawPreview:]):
948 * UIProcess/mac/WebPageProxyMac.mm:
949 (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
950 (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
951 (WebKit::WebPageProxy::fontAtSelection):
952 (WebKit::WebPageProxy::fontAtSelectionCallback):
953 * WebKit2.xcodeproj/project.pbxproj:
954 * WebProcess/Cookies/WebCookieManager.cpp:
955 (WebKit::WebCookieManager::getHostnamesWithCookies):
956 (WebKit::WebCookieManager::deleteCookie):
957 (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
958 (WebKit::WebCookieManager::getAllCookies):
959 (WebKit::WebCookieManager::getCookies):
960 (WebKit::WebCookieManager::setCookie):
961 (WebKit::WebCookieManager::setCookies):
962 (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
963 (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
964 * WebProcess/Cookies/WebCookieManager.h:
965 * WebProcess/Cookies/WebCookieManager.messages.in:
966 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
967 (WebKit::WebFrameLoaderClient::getLoadDecisionForIcon):
968 (WebKit::WebFrameLoaderClient::finishedLoadingIcon):
969 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
970 (WebKit::AcceleratedDrawingArea::forceRepaintAsync):
971 (WebKit::AcceleratedDrawingArea::activityStateDidChange):
972 * WebProcess/WebPage/AcceleratedDrawingArea.h:
973 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
974 (WebKit::CoordinatedLayerTreeHost::forceRepaintAsync):
975 (WebKit::CoordinatedLayerTreeHost::renderNextFrame):
976 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
977 * WebProcess/WebPage/DrawingArea.h:
978 (WebKit::DrawingArea::forceRepaintAsync):
979 (WebKit::DrawingArea::activityStateDidChange):
980 (WebKit::DrawingArea::addTransactionCallbackID):
981 * WebProcess/WebPage/DrawingArea.messages.in:
982 * WebProcess/WebPage/LayerTreeHost.h:
983 (WebKit::LayerTreeHost::forceRepaintAsync):
984 * WebProcess/WebPage/WebPage.cpp:
985 (WebKit::WebPage::reinitializeWebPage):
986 (WebKit::WebPage::takeSnapshot):
987 (WebKit::WebPage::validateCommand):
988 (WebKit::WebPage::setInitialFocus):
989 (WebKit::WebPage::setActivityState):
990 (WebKit::WebPage::runJavaScriptInMainFrame):
991 (WebKit::WebPage::getContentsAsString):
992 (WebKit::WebPage::getContentsAsMHTMLData):
993 (WebKit::WebPage::getRenderTreeExternalRepresentation):
994 (WebKit::WebPage::getSelectionAsWebArchiveData):
995 (WebKit::WebPage::getSelectionOrContentsAsString):
996 (WebKit::WebPage::getSourceForFrame):
997 (WebKit::WebPage::getMainResourceDataOfFrame):
998 (WebKit::WebPage::getResourceDataFromFrame):
999 (WebKit::WebPage::getWebArchiveOfFrame):
1000 (WebKit::WebPage::forceRepaint):
1001 (WebKit::WebPage::computePagesForPrinting):
1002 (WebKit::WebPage::drawRectToImage):
1003 (WebKit::WebPage::drawPagesToPDF):
1004 (WebKit::WebPage::drawPagesForPrinting):
1005 (WebKit::WebPage::didFinishPrintOperation):
1006 (WebKit::WebPage::getMarkedRangeAsync):
1007 (WebKit::WebPage::getSelectedRangeAsync):
1008 (WebKit::WebPage::characterIndexForPointAsync):
1009 (WebKit::WebPage::firstRectForCharacterRangeAsync):
1010 (WebKit::WebPage::getBytecodeProfile):
1011 (WebKit::WebPage::getSamplingProfilerOutput):
1012 (WebKit::WebPage::didGetLoadDecisionForIcon):
1013 * WebProcess/WebPage/WebPage.h:
1014 * WebProcess/WebPage/WebPage.messages.in:
1015 * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
1016 (WebKit::WebPrintOperationGtk::WebPrintOperationGtk):
1017 * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
1018 * WebProcess/WebPage/ios/WebPageIOS.mm:
1019 (WebKit::WebPage::getSelectionContext):
1020 (WebKit::WebPage::selectWithGesture):
1021 (WebKit::WebPage::updateSelectionWithTouches):
1022 (WebKit::WebPage::selectWithTwoTouches):
1023 (WebKit::WebPage::moveSelectionByOffset):
1024 (WebKit::WebPage::getRectsForGranularityWithSelectionOffset):
1025 (WebKit::WebPage::getRectsAtSelectionOffsetWithText):
1026 (WebKit::WebPage::selectPositionAtPoint):
1027 (WebKit::WebPage::selectPositionAtBoundaryWithDirection):
1028 (WebKit::WebPage::moveSelectionAtBoundaryWithDirection):
1029 (WebKit::WebPage::selectTextWithGranularityAtPoint):
1030 (WebKit::WebPage::beginSelectionInDirection):
1031 (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
1032 (WebKit::WebPage::updateSelectionWithExtentPoint):
1033 (WebKit::WebPage::requestDictationContext):
1034 (WebKit::WebPage::requestAutocorrectionData):
1035 (WebKit::WebPage::applyAutocorrection):
1036 (WebKit::WebPage::executeEditCommandWithCallback):
1037 (WebKit::WebPage::requestAutocorrectionContext):
1038 (WebKit::WebPage::focusNextAssistedNode):
1039 (WebKit::WebPage::computePagesForPrintingAndDrawToPDF):
1040 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1041 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1042 (WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):
1043 (WebKit::RemoteLayerTreeDrawingArea::addTransactionCallbackID):
1044 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1045 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1046 (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
1047 (WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):
1048 (WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired):
1049 * WebProcess/WebPage/mac/WebPageMac.mm:
1050 (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
1051 (WebKit::WebPage::fontAtSelection):
1053 2017-06-29 Andy Estes <aestes@apple.com>
1055 [iOS] Don't confuse coordinate spaces when computing the size of PDF snapshots
1056 https://bugs.webkit.org/show_bug.cgi?id=173996
1057 <rdar://problem/32961028>
1059 Reviewed by Tim Horton.
1061 When computing the printing rect for PDF snapshots, we were getting the width the
1062 WKContentView's bounds and the height from the WKScrollView's contentSize. These sizes are
1063 in different coordinate spaces, leading to incorrect clipping on sites that have a non-1
1066 Fix this by using the WKContentView's bounds for both width and height.
1068 * UIProcess/ios/WKContentView.mm:
1069 (-[WKContentView _wk_pageCountForPrintFormatter:]):
1071 2017-06-29 Matt Lewis <jlewis3@apple.com>
1073 Unreviewed, rolling out r218903.
1075 This patch and its fix cause immediate flakiness on all WK2
1080 "Support PeerConnectionStates::BundlePolicy::MaxBundle when
1081 setting rtc configuration"
1082 https://bugs.webkit.org/show_bug.cgi?id=169389
1083 http://trac.webkit.org/changeset/218903
1085 2017-06-29 Chris Dumez <cdumez@apple.com>
1087 Split ResourceLoadObserver into 2 classes: one for WebCore and one for the UIProcess
1088 https://bugs.webkit.org/show_bug.cgi?id=173990
1090 Reviewed by Brent Fulgham.
1092 Split ResourceLoadObserver into 2 classes: one for WebCore and one for the UIProcess.
1093 They really have different API and there is therefore close to no code duplication.
1096 * UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm:
1097 (WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):
1098 * UIProcess/WebResourceLoadObserver.cpp: Added.
1099 (WebKit::primaryDomain):
1100 (WebKit::WebResourceLoadObserver::sharedObserver):
1101 (WebKit::WebResourceLoadObserver::setStatisticsStore):
1102 (WebKit::WebResourceLoadObserver::setStatisticsQueue):
1103 (WebKit::WebResourceLoadObserver::clearInMemoryStore):
1104 (WebKit::WebResourceLoadObserver::clearInMemoryAndPersistentStore):
1105 (WebKit::WebResourceLoadObserver::logUserInteraction):
1106 (WebKit::WebResourceLoadObserver::clearUserInteraction):
1107 (WebKit::WebResourceLoadObserver::hasHadUserInteraction):
1108 (WebKit::WebResourceLoadObserver::setPrevalentResource):
1109 (WebKit::WebResourceLoadObserver::isPrevalentResource):
1110 (WebKit::WebResourceLoadObserver::clearPrevalentResource):
1111 (WebKit::WebResourceLoadObserver::setGrandfathered):
1112 (WebKit::WebResourceLoadObserver::isGrandfathered):
1113 (WebKit::WebResourceLoadObserver::setSubframeUnderTopFrameOrigin):
1114 (WebKit::WebResourceLoadObserver::setSubresourceUnderTopFrameOrigin):
1115 (WebKit::WebResourceLoadObserver::setSubresourceUniqueRedirectTo):
1116 (WebKit::WebResourceLoadObserver::setTimeToLiveUserInteraction):
1117 (WebKit::WebResourceLoadObserver::setTimeToLiveCookiePartitionFree):
1118 (WebKit::WebResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval):
1119 (WebKit::WebResourceLoadObserver::setGrandfatheringTime):
1120 (WebKit::WebResourceLoadObserver::fireDataModificationHandler):
1121 (WebKit::WebResourceLoadObserver::fireShouldPartitionCookiesHandler):
1122 (WebKit::WebResourceLoadObserver::fireTelemetryHandler):
1123 * UIProcess/WebResourceLoadObserver.h: Added.
1124 * UIProcess/WebResourceLoadStatisticsManager.cpp:
1125 (WebKit::WebResourceLoadStatisticsManager::setPrevalentResource):
1126 (WebKit::WebResourceLoadStatisticsManager::isPrevalentResource):
1127 (WebKit::WebResourceLoadStatisticsManager::setHasHadUserInteraction):
1128 (WebKit::WebResourceLoadStatisticsManager::hasHadUserInteraction):
1129 (WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
1130 (WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
1131 (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
1132 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
1133 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
1134 (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
1135 (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveCookiePartitionFree):
1136 (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
1137 (WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
1138 (WebKit::WebResourceLoadStatisticsManager::fireDataModificationHandler):
1139 (WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):
1140 (WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandlerForOneDomain):
1141 (WebKit::WebResourceLoadStatisticsManager::fireTelemetryHandler):
1142 (WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStore):
1143 (WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStoreModifiedSinceHours):
1144 (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
1145 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1146 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
1147 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1148 (WebKit::WebsiteDataStore::removeData):
1149 * WebKit2.xcodeproj/project.pbxproj:
1151 2017-06-29 Sam Weinig <sam@webkit.org>
1153 [WebIDL] Remove custom binding for UserMessageHandlersNamespace
1154 https://bugs.webkit.org/show_bug.cgi?id=173956
1156 Reviewed by Darin Adler.
1158 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
1159 (webkit_dom_dom_window_webkit_message_handlers_post_message):
1160 Update for name change.
1162 2017-06-29 John Wilander <wilander@apple.com>
1164 Fix for intermittent Layout Test fail http/tests/loading/resourceLoadStatistics/telemetry-generation.html
1165 https://bugs.webkit.org/show_bug.cgi?id=173940
1166 <rdar://problem/33018125>
1168 Reviewed by Brent Fulgham.
1170 This change allows the TestController to turn off
1171 regular resource load statistics telemetry submission
1172 and to manually control when telemetry is calculated
1175 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
1176 (WKResourceLoadStatisticsManagerSetShouldSubmitTelemetry):
1177 New test infrastructure.
1178 * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
1179 * UIProcess/WebResourceLoadStatisticsManager.cpp:
1180 (WebKit::WebResourceLoadStatisticsManager::setShouldSubmitTelemetry):
1181 New test infrastructure.
1182 * UIProcess/WebResourceLoadStatisticsManager.h:
1183 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1184 (WebKit::WebResourceLoadStatisticsStore::setShouldSubmitTelemetry):
1185 New test infrastructure.
1186 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
1187 The test function now calls
1188 WebResourceLoadStatisticsStore::submitTelemetry() directly
1189 instead of firing the timer.
1190 (WebKit::WebResourceLoadStatisticsStore::telemetryTimerFired):
1191 Now checks whether it should submit telemetry or not.
1192 (WebKit::WebResourceLoadStatisticsStore::submitTelemetry):
1193 Split out so that the test code doesn't have to fire the timer.
1194 * UIProcess/WebResourceLoadStatisticsStore.h:
1195 * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
1196 (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
1197 Now doesn't submit if it's executed by test code.
1199 2017-06-29 Chris Dumez <cdumez@apple.com>
1201 Slight clean up of WebResourceLoadStatisticsStore
1202 https://bugs.webkit.org/show_bug.cgi?id=173976
1204 Reviewed by Brent Fulgham.
1206 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1207 (WebKit::dataTypesToRemove):
1208 (WebKit::WebResourceLoadStatisticsStore::classifyResource):
1209 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
1210 (WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsEnabled):
1211 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
1212 (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
1213 (WebKit::WebResourceLoadStatisticsStore::stopMonitoringStatisticsStorage):
1214 (WebKit::initializeDataTypesToRemove): Deleted.
1215 * UIProcess/WebResourceLoadStatisticsStore.h:
1216 (WebKit::WebResourceLoadStatisticsStore::coreStore): Deleted.
1218 2017-06-29 Alex Christensen <achristensen@webkit.org>
1220 WKContentRuleLists with if-top-url or unless-top-url should run regex against entire top URL
1221 https://bugs.webkit.org/show_bug.cgi?id=173980
1223 Reviewed by Tim Horton.
1225 if-top-url and unless-top-url were broken inside WebKit2 apps. This fixes them and adds a test.
1226 ContentExtension::populateConditionCacheIfNeeded was calling WebCompiledContentRuleList::conditionsApplyOnlyToDomain
1227 but m_data.conditionsApplyOnlyToDomainOffset was always 0 instead of ConditionsApplyOnlyToDomainOffset because
1228 it wasn't being encoded and decoded when telling the WebProcess about the content rule list. This was causing us
1229 to use whatever was at offset 0 in the file instead of the correct value stored in the file to determine
1230 whether to run regular expressions against the entire top URL for if-top-url or unless-top-url or against
1231 just the domain for if-top-domain or unless-top-domain. Luckily, offset 0 in the file is always
1232 ContentRuleListStore::CurrentContentRuleListFileVersion, so it was deterministic and easy to debug.
1234 I should have added a LayoutTest with r213669 to verify correct behavior in an actual WKWebView,
1235 but I didn't because it wouldn't have caught regressions since the contentextension tests are
1236 marked as flaky since r206914, but once that is fixed the new test http/tests/contentextensions/top-url.html
1237 will verify that this feature is behaving correctly. It failed before this change and passes after.
1239 * Shared/WebCompiledContentRuleListData.cpp:
1240 (WebKit::WebCompiledContentRuleListData::encode):
1241 (WebKit::WebCompiledContentRuleListData::decode):
1243 2017-06-29 Chris Dumez <cdumez@apple.com>
1245 statistics.mostRecentUserInteraction should be of type WallTime
1246 https://bugs.webkit.org/show_bug.cgi?id=173974
1248 Reviewed by Brent Fulgham.
1250 statistics.mostRecentUserInteraction should be of type WallTime for clarity.
1252 * Shared/WebCoreArgumentCoders.cpp:
1253 (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
1254 (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
1256 2017-06-29 Wenson Hsieh <wenson_hsieh@apple.com>
1258 Replace staging-prefixed UIKit drag and drop delegate methods with their public SDK versions
1259 https://bugs.webkit.org/show_bug.cgi?id=173959
1261 Reviewed by Sam Weinig.
1263 Remove references to _api_-prefixed UIDragInteractionDelegate and UIDropInteractionDelegate methods,
1264 and replace them with their counterparts in the public SDK.
1266 * UIProcess/ios/WKContentViewInteraction.mm:
1267 (-[WKContentView dragInteraction:previewForLiftingItem:session:]):
1268 (-[WKContentView dragInteraction:session:didEndWithOperation:]):
1269 (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
1270 (-[WKContentView dropInteraction:sessionDidEnter:]):
1271 (-[WKContentView dropInteraction:sessionDidUpdate:]):
1272 (-[WKContentView _simulateDataInteractionEntered:]):
1273 (-[WKContentView _simulateDataInteractionUpdated:]):
1274 (-[WKContentView _simulateDataInteractionSessionDidEnd:]):
1275 (-[WKContentView _api_dragInteraction:previewForLiftingItem:session:]): Deleted.
1276 (-[WKContentView _api_dragInteraction:session:didEndWithOperation:]): Deleted.
1277 (-[WKContentView _api_dragInteraction:item:willAnimateCancelWithAnimator:]): Deleted.
1278 (-[WKContentView _api_dropInteraction:sessionDidEnter:]): Deleted.
1279 (-[WKContentView _api_dropInteraction:sessionDidUpdate:]): Deleted.
1281 2017-06-29 Carlos Garcia Campos <cgarcia@igalia.com>
1283 Unreviewed. Fix GTK+ unit tests crashing after r218922.
1285 We need to check if icon database exists and is open now on dispose and API entry points.
1287 * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
1288 (webkitFaviconDatabaseDispose):
1289 (webkit_favicon_database_get_favicon_uri):
1290 (webkit_favicon_database_clear):
1292 2017-06-29 Carlos Garcia Campos <cgarcia@igalia.com>
1294 [GTK][WPE] Implement API::IconLoadingClient and rework WebKitFaviconDatabase to use IconDatabase directly
1295 https://bugs.webkit.org/show_bug.cgi?id=173877
1297 Reviewed by Brady Eidson.
1299 This way IconDatabase and its related classes can be removed from WebCore, as well as the WebKit2 implementation
1300 and C API. For now I've copied IconDatabase from WebCore to WebKit2 under the glib API directory, adding the
1301 related classes as private inside IconDatabase, and removing some methods that are not used by the GLib API.
1303 * PlatformGTK.cmake:
1304 * UIProcess/API/glib/IconDatabase.cpp: Added.
1305 (WebKit::urlForLogging):
1306 (WebKit::defaultClient):
1307 (WebKit::IconDatabase::IconRecord::IconRecord):
1308 (WebKit::IconDatabase::IconRecord::~IconRecord):
1309 (WebKit::IconDatabase::IconRecord::image):
1310 (WebKit::IconDatabase::IconRecord::setImageData):
1311 (WebKit::IconDatabase::IconRecord::loadImageFromResource):
1312 (WebKit::IconDatabase::IconRecord::imageDataStatus):
1313 (WebKit::IconDatabase::IconRecord::snapshot):
1314 (WebKit::IconDatabase::PageURLRecord::PageURLRecord):
1315 (WebKit::IconDatabase::PageURLRecord::~PageURLRecord):
1316 (WebKit::IconDatabase::PageURLRecord::setIconRecord):
1317 (WebKit::IconDatabase::PageURLRecord::snapshot):
1318 (WebKit::IconDatabase::setClient):
1319 (WebKit::IconDatabase::open):
1320 (WebKit::IconDatabase::close):
1321 (WebKit::IconDatabase::removeAllIcons):
1322 (WebKit::documentCanHaveIcon):
1323 (WebKit::IconDatabase::synchronousIconForPageURL):
1324 (WebKit::IconDatabase::synchronousIconURLForPageURL):
1325 (WebKit::IconDatabase::retainIconForPageURL):
1326 (WebKit::IconDatabase::performRetainIconForPageURL):
1327 (WebKit::IconDatabase::releaseIconForPageURL):
1328 (WebKit::IconDatabase::performReleaseIconForPageURL):
1329 (WebKit::IconDatabase::setIconDataForIconURL):
1330 (WebKit::IconDatabase::setIconURLForPageURL):
1331 (WebKit::IconDatabase::synchronousLoadDecisionForIconURL):
1332 (WebKit::IconDatabase::synchronousIconDataKnownForIconURL):
1333 (WebKit::IconDatabase::setEnabled):
1334 (WebKit::IconDatabase::isEnabled):
1335 (WebKit::IconDatabase::setPrivateBrowsingEnabled):
1336 (WebKit::IconDatabase::isPrivateBrowsingEnabled):
1337 (WebKit::IconDatabase::delayDatabaseCleanup):
1338 (WebKit::IconDatabase::allowDatabaseCleanup):
1339 (WebKit::IconDatabase::checkIntegrityBeforeOpening):
1340 (WebKit::IconDatabase::IconDatabase):
1341 (WebKit::IconDatabase::~IconDatabase):
1342 (WebKit::IconDatabase::wakeSyncThread):
1343 (WebKit::IconDatabase::scheduleOrDeferSyncTimer):
1344 (WebKit::IconDatabase::syncTimerFired):
1345 (WebKit::IconDatabase::isOpen):
1346 (WebKit::IconDatabase::isOpenBesidesMainThreadCallbacks):
1347 (WebKit::IconDatabase::databasePath):
1348 (WebKit::IconDatabase::defaultDatabaseFilename):
1349 (WebKit::IconDatabase::getOrCreateIconRecord):
1350 (WebKit::IconDatabase::getOrCreatePageURLRecord):
1351 (WebKit::IconDatabase::shouldStopThreadActivity):
1352 (WebKit::IconDatabase::iconDatabaseSyncThread):
1353 (WebKit::databaseVersionNumber):
1354 (WebKit::isValidDatabase):
1355 (WebKit::createDatabaseTables):
1356 (WebKit::IconDatabase::performOpenInitialization):
1357 (WebKit::IconDatabase::checkIntegrity):
1358 (WebKit::IconDatabase::performURLImport):
1359 (WebKit::IconDatabase::syncThreadMainLoop):
1360 (WebKit::IconDatabase::performPendingRetainAndReleaseOperations):
1361 (WebKit::IconDatabase::readFromDatabase):
1362 (WebKit::IconDatabase::writeToDatabase):
1363 (WebKit::IconDatabase::pruneUnretainedIcons):
1364 (WebKit::IconDatabase::checkForDanglingPageURLs):
1365 (WebKit::IconDatabase::removeAllIconsOnThread):
1366 (WebKit::IconDatabase::deleteAllPreparedStatements):
1367 (WebKit::IconDatabase::cleanupSyncThread):
1368 (WebKit::readySQLiteStatement):
1369 (WebKit::IconDatabase::setIconURLForPageURLInSQLDatabase):
1370 (WebKit::IconDatabase::setIconIDForPageURLInSQLDatabase):
1371 (WebKit::IconDatabase::removePageURLFromSQLDatabase):
1372 (WebKit::IconDatabase::getIconIDForIconURLFromSQLDatabase):
1373 (WebKit::IconDatabase::addIconURLToSQLDatabase):
1374 (WebKit::IconDatabase::getImageDataForIconURLFromSQLDatabase):
1375 (WebKit::IconDatabase::removeIconFromSQLDatabase):
1376 (WebKit::IconDatabase::writeIconSnapshotToSQLDatabase):
1377 (WebKit::IconDatabase::checkClosedAfterMainThreadCallback):
1378 (WebKit::IconDatabase::dispatchDidImportIconURLForPageURLOnMainThread):
1379 (WebKit::IconDatabase::dispatchDidImportIconDataForPageURLOnMainThread):
1380 (WebKit::IconDatabase::dispatchDidRemoveAllIconsOnMainThread):
1381 (WebKit::IconDatabase::dispatchDidFinishURLImportOnMainThread):
1382 * UIProcess/API/glib/IconDatabase.h: Added.
1383 (WebKit::IconDatabaseClient::didImportIconURLForPageURL):
1384 (WebKit::IconDatabaseClient::didImportIconDataForPageURL):
1385 (WebKit::IconDatabaseClient::didChangeIconForPageURL):
1386 (WebKit::IconDatabaseClient::didRemoveAllIcons):
1387 (WebKit::IconDatabaseClient::didFinishURLImport):
1388 (WebKit::IconDatabaseClient::didClose):
1389 (WebKit::IconDatabase::IconSnapshot::IconSnapshot):
1390 (WebKit::IconDatabase::IconSnapshot::iconURL):
1391 (WebKit::IconDatabase::IconSnapshot::timestamp):
1392 (WebKit::IconDatabase::IconSnapshot::data):
1393 (WebKit::IconDatabase::IconRecord::create):
1394 (WebKit::IconDatabase::IconRecord::getTimestamp):
1395 (WebKit::IconDatabase::IconRecord::setTimestamp):
1396 (WebKit::IconDatabase::IconRecord::iconURL):
1397 (WebKit::IconDatabase::IconRecord::retainingPageURLs):
1398 (WebKit::IconDatabase::PageURLSnapshot::PageURLSnapshot):
1399 (WebKit::IconDatabase::PageURLSnapshot::pageURL):
1400 (WebKit::IconDatabase::PageURLSnapshot::iconURL):
1401 (WebKit::IconDatabase::PageURLRecord::url):
1402 (WebKit::IconDatabase::PageURLRecord::iconRecord):
1403 (WebKit::IconDatabase::PageURLRecord::retain):
1404 (WebKit::IconDatabase::PageURLRecord::release):
1405 (WebKit::IconDatabase::PageURLRecord::retainCount):
1406 * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
1407 (_WebKitFaviconDatabasePrivate::~_WebKitFaviconDatabasePrivate):
1408 (getIconSurfaceSynchronously):
1409 (webkitFaviconDatabaseSetIconURLForPageURL):
1410 (webkitFaviconDatabaseCreate):
1411 (webkitFaviconDatabaseOpen):
1412 (webkitFaviconDatabaseIsOpen):
1413 (webkitFaviconDatabaseSetPrivateBrowsingEnabled):
1414 (webkitFaviconDatabaseGetLoadDecisionForIcon):
1415 (webkitFaviconDatabaseSetIconForPageURL):
1416 (webkit_favicon_database_get_favicon):
1417 (webkit_favicon_database_get_favicon_uri):
1418 * UIProcess/API/glib/WebKitFaviconDatabasePrivate.h:
1419 * UIProcess/API/glib/WebKitIconLoadingClient.cpp: Added.
1420 (IconLoadingClient::IconLoadingClient):
1421 (attachIconLoadingClientToView):
1422 * UIProcess/API/glib/WebKitIconLoadingClient.h: Copied from Source/WebKit2/UIProcess/API/glib/WebKitFaviconDatabasePrivate.h.
1423 * UIProcess/API/glib/WebKitWebContext.cpp:
1424 (ensureFaviconDatabase):
1425 (webkitWebContextEnableIconDatabasePrivateBrowsingIfNeeded):
1426 (webkitWebContextDisableIconDatabasePrivateBrowsingIfNeeded):
1427 (webkit_web_context_set_favicon_database_directory):
1428 * UIProcess/API/glib/WebKitWebView.cpp:
1429 (webkitWebViewConstructed):
1430 (webkitWebViewGetLoadDecisionForIcon):
1431 (webkitWebViewSetIcon):
1432 * UIProcess/API/glib/WebKitWebViewPrivate.h:
1434 2017-06-28 Tim Horton <timothy_horton@apple.com>
1436 MobileSafari was constantly using 10-15% CPU viewing a PDF
1437 https://bugs.webkit.org/show_bug.cgi?id=173944
1438 <rdar://problem/33039910>
1440 Reviewed by Simon Fraser.
1442 * UIProcess/API/Cocoa/WKWebView.mm:
1443 (-[WKWebView _doAfterNextStablePresentationUpdate:]):
1444 (-[WKWebView _doAfterNextPresentationUpdate:]):
1445 (-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForPainting:]):
1446 Bail early and just dispatch_async the completion block if we are using a custom
1447 content view; these methods are very specific to the implementation of WKContentView
1448 and don't make sense with custom content views.
1450 doAfterNextStablePresentationUpdate is particularly egregious because, since
1451 we will never call the stable update callbacks (because we bail from didCommitLayerTree
1452 if we aren't using WKContentView), it will keep calling doAfterNextPresentationUpdate
1453 over and over again.
1455 2017-06-28 Brent Fulgham <bfulgham@apple.com>
1457 [WK2][macOS][iOS] Don't request microphone access for clients that don't need it.
1458 https://bugs.webkit.org/show_bug.cgi?id=173948
1459 <rdar://problem/32103275>
1461 Reviewed by Eric Carlson.
1463 Don't bother requesting a sandbox extension to access the microphone for any clients
1464 on the Cocoa platform that are not Safari. Other clients don't have the necessary
1465 system entitlements, and always fail leading to annoying SandboxViolation reports.
1467 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1468 (WebKit::WebProcessPool::platformInitializeWebProcess):
1470 2017-06-29 Zalan Bujtas <zalan@apple.com>
1472 Move RenderEmbeddedObject::isReplacementObscured to HTMLPlugInElement
1473 https://bugs.webkit.org/show_bug.cgi?id=173802
1474 <rdar://problem/32884389>
1476 Reviewed by Simon Fraser.
1478 * WebProcess/WebPage/WebPage.cpp:
1479 (WebKit::WebPage::createPlugin):
1481 2017-06-28 Ryosuke Niwa <rniwa@webkit.org>
1483 REGRESSION (r218842): com.apple.WebKit crash in WebKit::ProcessLauncher::launchProcess
1484 https://bugs.webkit.org/show_bug.cgi?id=173950
1486 Reviewed by Chris Dumez.
1488 Added a null check as m_xpcConnection could be nullptr here in the case platformInvalidate had been called.
1490 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1491 (WebKit::ProcessLauncher::launchProcess):
1493 2017-06-28 Youenn Fablet <youenn@apple.com>
1495 Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
1496 https://bugs.webkit.org/show_bug.cgi?id=169389
1498 Reviewed by Alex Christensen.
1500 Updating according new WebCore LIbWebRTCProvider API.
1502 * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
1503 (WebKit::LibWebRTCProvider::createPeerConnection):
1504 * WebProcess/Network/webrtc/LibWebRTCProvider.h:
1506 2017-06-28 Chris Dumez <cdumez@apple.com>
1508 [iOS] Allow WKWebView clients to play audio in the background
1509 https://bugs.webkit.org/show_bug.cgi?id=173932
1510 <rdar://problem/32851547>
1512 Reviewed by Ryosuke Niwa.
1514 Allow WKWebView clients (such as MobileSafari) to play audio in the background
1515 by taking a process assertion whenever a WebPage is audible.
1517 * UIProcess/WebPageProxy.cpp:
1518 (WebKit::WebPageProxy::updateThrottleState):
1520 2017-06-28 Brent Fulgham <bfulgham@apple.com>
1522 Teach ResourceLoadStatistics to recognize changes in the file system
1523 https://bugs.webkit.org/show_bug.cgi?id=173800
1524 <rdar://problem/32937842>
1526 Reviewed by Chris Dumez.
1528 We want to support the case where multiple UI processes choose to share the same
1529 statistics file. To support this, update the ResourceLoadStatistics logic to be aware
1530 that the statistics data file might change underneath it, and to take appropriate
1531 action when it does.
1533 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1534 (WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsEnabled): When we enable
1535 the statistics, read in the data and then watch for changes.
1536 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver): Add a
1537 'delete data' handler to remove the file on disk, not just write an empty store.
1538 (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded): Use ASCIILiteral.
1539 (WebKit::WebResourceLoadStatisticsStore::refreshFromDisk): Convenience function.
1540 (WebKit::WebResourceLoadStatisticsStore::writeStoreToDisk): Sync with any on-disk
1541 storage before writing out.
1542 (WebKit::openAndLockFile): Convenience function.
1543 (WebKit::closeAndUnlockFile): Ditto.
1544 (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk): Revise to lock file (on
1545 platforms that support it) before writing to disk.
1546 (WebKit::WebResourceLoadStatisticsStore::deleteStoreFromDisk): Added convenience function.
1547 (WebKit::WebResourceLoadStatisticsStore::clearInMemoryData): Ditto.
1548 (WebKit::WebResourceLoadStatisticsStore::startMonitoringStatisticsStorage): Create a
1549 file system monitor to watch for file changes.
1550 (WebKit::WebResourceLoadStatisticsStore::syncWithExistingStatisticsStorageIfNeeded): Added
1551 convenience function.
1552 (WebKit::WebResourceLoadStatisticsStore::createDecoderFromDisk): Revise to read data
1553 directly so we can control file locking.
1554 * UIProcess/WebResourceLoadStatisticsStore.h:
1556 2017-06-28 Wenson Hsieh <wenson_hsieh@apple.com>
1558 Followup to r218885: adjust for further UIKit SPI changes
1559 https://bugs.webkit.org/show_bug.cgi?id=173927
1560 <rdar://problem/33020792>
1562 Reviewed by Tim Horton.
1564 On ToT, UIKit now invokes -_dragInteraction:item:shouldDelaySetDownAnimationWithCompletion: before the
1565 completion block of -dragInteraction:willAnimateLiftWithAnimator:session: is called. This means we now need to
1566 store the completion block in -shouldDelaySetDownAnimationWithCompletion: and wait until the UIDragAnimating
1567 completion block in -willAnimateCancelWithAnimator: before invoking it.
1569 * UIProcess/ios/WKContentViewInteraction.h:
1570 * UIProcess/ios/WKContentViewInteraction.mm:
1571 (-[WKContentView cleanUpDragSourceSessionState]):
1573 Ensure that the set-down completion block is invoked when a drag session ends (e.g., if the web content process
1576 (-[WKContentView _dragInteraction:item:shouldDelaySetDownAnimationWithCompletion:]):
1577 (-[WKContentView _api_dragInteraction:item:willAnimateCancelWithAnimator:]):
1579 2017-06-28 Wenson Hsieh <wenson_hsieh@apple.com>
1581 dropInteraction:sessionDidEnd: invokes dragEnded with a UIDragOperation rather than a WebCore::DragOperation
1582 https://bugs.webkit.org/show_bug.cgi?id=173935
1584 Reviewed by Tim Horton.
1586 Replaces a use of UIDragOperationNone with DragOperationNone.
1587 Currently, there is no change in behavior since these are currently the same value (0).
1589 * UIProcess/ios/WKContentViewInteraction.mm:
1590 (-[WKContentView dropInteraction:sessionDidEnd:]):
1592 2017-06-28 Alex Christensen <achristensen@webkit.org>
1594 WebsitePolicies given with navigation policy for redirects should apply to the provisional document
1595 https://bugs.webkit.org/show_bug.cgi?id=173886
1596 <rdar://problem/32543191>
1598 Reviewed by Andy Estes.
1600 If, for example, we deny video autoplay for the initial request but allow it for the redirect destination
1601 location, the document should allow video autoplay. We were putting these settings onto the wrong DocumentLoader.
1602 When a navigation policy is given to a response of a redirect location, we currently have the DocumentLoader
1603 for the loading document in the FrameLoader's provisionalDocumentLoader, not the documentLoader.
1605 Covered by a new API test.
1607 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1608 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1610 2017-06-28 Konstantin Tokarev <annulen@yandex.ru>
1612 [cmake] Improve configuration tests for librt and libatomic
1613 https://bugs.webkit.org/show_bug.cgi?id=173921
1615 Reviewed by Michael Catanzaro.
1617 1. Both tests are converted to use specialized CMake modules
1618 2. Both libraries are now linked only if they are really needed and usable
1620 3. librt is no more required to be detected by find_library(), which may fail
1621 in case of cross-compilation
1622 4. libatomic test moved to port-independent CMakeLists.txt
1625 * PlatformGTK.cmake:
1627 2017-06-28 Alex Christensen <achristensen@webkit.org>
1631 * PlatformMac.cmake:
1633 2017-06-28 Wenson Hsieh <wenson_hsieh@apple.com>
1635 [iOS DnD] [WK2] Dragged content flashes after the preview sets down when cancelling a drag
1636 https://bugs.webkit.org/show_bug.cgi?id=173927
1637 <rdar://problem/33020792>
1639 Reviewed by Tim Horton.
1641 When a drag is cancelled, UIKit normally animates fly-back and set-down animations back-to-back. However, for
1642 WebKit2, we need to call out to the web process in order to trigger a repaint of the dragged content at normal
1643 opacity when the drag cancel animation completes. Thus, we can hook into UIKit SPI to split the cancellation
1644 animation into two discrete phases: the fly-back and the set-down (the latter of which may be deferred using a
1647 To do this, we implement a new SPI hook, _dragInteraction:item:shouldDelaySetDownAnimationWithCompletion:, to
1648 indicate that the set-down should be deferred, and call the completion block after the next layer tree commit.
1649 Since -shouldDelaySetDownAnimationWithCompletion: is invoked after the UIDragAnimating completion block in
1650 -willAnimateCancelWithAnimator:, this layer tree commit is guaranteed to come after we've told the web process
1651 to repaint at full opacity.
1653 This patch also accounts for additional changes in UIKit. Once -shouldDelaySetDownAnimationWithCompletion:
1654 becomes available, -sessionDidEnd: will no longer be invoked after a cancelled drag lift if the user did not
1655 begin moving. This means that our cleanup logic in -sessionDidEnd: will no longer be executed in this case,
1656 leaving the view with an inconsistent dragging state. To fix this, we need to implement
1657 -dragInteraction:willAnimateLiftWithAnimator:session: to perform drag session cleanup following a cancelled drag
1658 lift, for which the drag animator's final position will be UIViewAnimatingPositionStart.
1660 * UIProcess/ios/WKContentViewInteraction.mm:
1661 (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
1662 (-[WKContentView _dragInteraction:item:shouldDelaySetDownAnimationWithCompletion:]):
1664 2017-06-28 Chris Dumez <cdumez@apple.com>
1666 Avoid double thread dispatch in WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains()
1667 https://bugs.webkit.org/show_bug.cgi?id=173904
1669 Reviewed by Brent Fulgham.
1671 Avoid double thread dispatch in WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains().
1672 It calls fetchData() which dispatches to the main queue, then fetchDataForTopPrivatelyControlledDomains()
1673 dispatches to the background queue. It should be possible to get fetchData() to dispatch directly
1676 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1677 (WebKit::WebsiteDataStore::fetchData):
1678 (WebKit::WebsiteDataStore::fetchDataAndApply):
1679 (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):
1680 * UIProcess/WebsiteData/WebsiteDataStore.h:
1682 2017-06-27 Chris Dumez <cdumez@apple.com>
1684 [ResourceLoadStatistics] Update minimumTimeBetweeenDataRecordsRemoval to 1 hour instead of 1 minute
1685 https://bugs.webkit.org/show_bug.cgi?id=173895
1686 <rdar://problem/32984366>
1688 Reviewed by Brent Fulgham.
1690 Update minimumTimeBetweeenDataRecordsRemoval to 1 hour instead of 1 minute to save battery.
1691 Also port code to modern time types.
1693 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
1694 (WKResourceLoadStatisticsManagerSetTimeToLiveUserInteraction):
1695 (WKResourceLoadStatisticsManagerSetTimeToLiveCookiePartitionFree):
1696 (WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
1697 (WKResourceLoadStatisticsManagerSetGrandfatheringTime):
1698 * UIProcess/WebResourceLoadStatisticsManager.cpp:
1699 (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
1700 (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveCookiePartitionFree):
1701 (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
1702 (WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
1703 * UIProcess/WebResourceLoadStatisticsManager.h:
1704 * UIProcess/WebResourceLoadStatisticsStore.h:
1706 2017-06-27 Chris Dumez <cdumez@apple.com>
1708 Port HysteresisActivity to Seconds type
1709 https://bugs.webkit.org/show_bug.cgi?id=173902
1711 Reviewed by Simon Fraser.
1713 * WebProcess/WebPage/WebPage.cpp:
1714 (WebKit::m_pageScrolledHysteresis):
1716 2017-06-27 Chris Dumez <cdumez@apple.com>
1718 Move WebsiteDataRecord processing off-thread in WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains()
1719 https://bugs.webkit.org/show_bug.cgi?id=173882
1720 <rdar://problem/32984366>
1722 Reviewed by Darin Adler.
1724 Move WebsiteDataRecord processing off-thread in WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains()
1725 as we have data showing it is slow and hangs the UIProcess' main thread.
1727 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1728 (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):
1730 2017-06-27 Brent Fulgham <bfulgham@apple.com>
1732 [WK2][macOS] Expand sandbox to allow access to the CoreMedia volume control endpoint
1733 https://bugs.webkit.org/show_bug.cgi?id=173898
1734 <rdar://problem/32930754>
1736 Reviewed by Ryosuke Niwa.
1738 * WebProcess/com.apple.WebProcess.sb.in:
1740 2017-06-27 Wenson Hsieh <wenson_hsieh@apple.com>
1742 [iOS DnD] Support dragging out of contenteditable areas without a prior selection
1743 https://bugs.webkit.org/show_bug.cgi?id=173854
1744 <rdar://problem/32236827>
1746 Reviewed by Ryosuke Niwa and Tim Horton.
1748 Instead of allowing a drag to occur only if a position information request discovers a clickable node, remove
1749 the position information request entirely and just call into WebCore to try and begin the drag. Currently, the
1750 position information request serves two purposes:
1751 1. To adjust the hit-test location to account for nearby clickable nodes.
1752 2. To obtain information about the content being dragged.
1754 The first requirement is fulfilled by performing the drag location adjustment in WebCore instead (see
1755 ChangeLogs for more detail). The second requirement is fulfilled by refactoring in
1756 https://bugs.webkit.org/show_bug.cgi?id=173832 to fold all information relevant to starting a drag into the
1757 DragItem struct, and then propagating the DragItem struct. The relevant information from the position
1758 information update is now populated when the UI process receives the drag start response.
1760 * UIProcess/ios/WKContentViewInteraction.h:
1761 * UIProcess/ios/WKContentViewInteraction.mm:
1762 (-[WKContentView _startDrag:item:]):
1763 (-[WKContentView computeClientAndGlobalPointsForDropSession:outClientPoint:outGlobalPoint:]):
1764 (-[WKContentView _dragInteraction:prepareForSession:completion:]):
1765 (-[WKContentView _api_dropInteraction:sessionDidEnter:]):
1766 (-[WKContentView _api_dropInteraction:sessionDidUpdate:]):
1767 (positionInformationMayStartDataInteraction): Deleted.
1769 2017-06-27 Chris Dumez <cdumez@apple.com>
1771 [iOS] Avoid taking / releasing process assertions too quickly due to database activity
1772 https://bugs.webkit.org/show_bug.cgi?id=173879
1773 <rdar://problem/32412701>
1775 Reviewed by Antti Koivisto.
1777 Specify an activity name when taking the process assertion to facilitate
1778 debugging in the future. It took me a while to figure out this assertion
1779 was the one that was too aggressive because it was anonymous.
1781 * UIProcess/API/Cocoa/WKWebView.mm:
1782 (-[WKWebView _setUpSQLiteDatabaseTrackerClient]):
1784 2017-06-27 Don Olmstead <don.olmstead@sony.com>
1786 [PAL] Add symbol export macros for PAL
1787 https://bugs.webkit.org/show_bug.cgi?id=171519
1789 Reviewed by Konstantin Tokarev.
1793 2017-06-27 Ryosuke Niwa <rniwa@webkit.org>
1795 ProcessLauncherMac could leak a xpc connection when the process had failed to launch
1796 https://bugs.webkit.org/show_bug.cgi?id=173865
1798 Reviewed by Antti Koivisto.
1800 Explicitly cancel the XPC connection even When the process launch had failed to avoid a leak.
1802 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1803 (WebKit::ProcessLauncher::launchProcess):
1805 2017-06-27 John Wilander <wilander@apple.com>
1807 Resource Load Statistics: Add telemetry
1808 https://bugs.webkit.org/show_bug.cgi?id=173499
1809 <rdar://problem/32826094>
1811 Reviewed by Brent Fulgham.
1813 * PlatformGTK.cmake:
1814 Added UIProcess/WebResourceLoadStatisticsTelemetry.cpp
1815 * PlatformMac.cmake:
1816 Added UIProcess/WebResourceLoadStatisticsTelemetry.cpp
1817 * PlatformWPE.cmake:
1818 Added UIProcess/WebResourceLoadStatisticsTelemetry.cpp
1819 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
1820 (WKResourceLoadStatisticsManagerFireTelemetryHandler):
1821 (WKResourceLoadStatisticsManagerSetNotifyPagesWhenTelemetryWasCaptured):
1822 Test infrastructure.
1823 * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
1824 * UIProcess/WebProcessProxy.cpp:
1825 (WebKit::WebProcessProxy::notifyPageStatisticsTelemetryFinished):
1826 Test infrastructure.
1827 * UIProcess/WebProcessProxy.h:
1828 * UIProcess/WebResourceLoadStatisticsManager.cpp:
1829 (WebKit::WebResourceLoadStatisticsManager::fireTelemetryHandler):
1830 (WebKit::WebResourceLoadStatisticsManager::setNotifyPagesWhenTelemetryWasCaptured):
1831 (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
1832 Test infrastructure.
1833 * UIProcess/WebResourceLoadStatisticsManager.h:
1834 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1835 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
1836 Configures a timer for telemetry capture. Fires 5 seconds after launch
1837 and then every 24 hours.
1838 (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned):
1839 Variable renamed notifyPages -> notifyPagesWhenDataRecordsWereScanned.
1840 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
1841 Variable renamed notifyPages -> notifyPagesWhenDataRecordsWereScanned.
1842 (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
1843 Variable renamed notifyPages -> notifyPagesWhenDataRecordsWereScanned.
1844 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
1845 Variable renamed notifyPages -> notifyPagesWhenDataRecordsWereScanned.
1846 (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
1847 Variable renamed notifyPages -> notifyPagesWhenDataRecordsWereScanned.
1848 (WebKit::WebResourceLoadStatisticsStore::telemetryTimerFired):
1849 Calls WebResourceLoadStatisticsTelemetry::calculateAndSubmit().
1850 * UIProcess/WebResourceLoadStatisticsStore.h:
1851 * UIProcess/WebResourceLoadStatisticsTelemetry.cpp: Added.
1852 (WebKit::numberOfResourcesWithUserInteraction):
1854 (WebKit::nonEphemeralWebPageProxy):
1855 (WebKit::submitTopList):
1856 (WebKit::submitTopLists):
1857 (WebKit::notifyPages):
1858 (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
1859 (WebKit::WebResourceLoadStatisticsTelemetry::setNotifyPagesWhenTelemetryWasCaptured):
1860 * UIProcess/WebResourceLoadStatisticsTelemetry.h: Added.
1861 * WebKit2.xcodeproj/project.pbxproj:
1863 2017-06-27 Ting-Wei Lan <lantw44@gmail.com>
1865 Add missing includes to fix compilation error on FreeBSD
1866 https://bugs.webkit.org/show_bug.cgi?id=172919
1868 Reviewed by Mark Lam.
1870 * UIProcess/API/C/WKContextPrivate.h:
1871 * UIProcess/API/C/WKPagePrivate.h:
1872 * UIProcess/ProcessAssertion.h:
1874 2017-06-27 Wenson Hsieh <wenson_hsieh@apple.com>
1876 Refactor drag start codepaths to plumb a DragItem to client layers
1877 https://bugs.webkit.org/show_bug.cgi?id=173832
1878 Work towards <rdar://problem/32236827>
1880 Reviewed by Ryosuke Niwa and Tim Horton.
1882 Add support for serializing a DragItem over IPC. This encodes and decodes all members of DragItem except for the
1883 PasteboardWriterData and the DragImage's image. The DragItem is sent over to the UI process in
1884 WebDragClient::startDrag via the WebPageProxy::startDrag IPC message (renamed from WebPageProxy::setDragImage)
1885 which now takes a DragItem.
1887 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1888 (WebKit::WebPageProxy::startDrag):
1889 (WebKit::WebPageProxy::setDragImage): Deleted.
1890 * UIProcess/PageClient.h:
1891 * UIProcess/WebPageProxy.h:
1892 * UIProcess/WebPageProxy.messages.in:
1894 Rename SetDragImage to StartDrag and refactor to receive only a DragItem and shareable bitmap handle.
1896 * UIProcess/ios/PageClientImplIOS.h:
1897 * UIProcess/ios/PageClientImplIOS.mm:
1898 (WebKit::PageClientImpl::startDrag):
1899 (WebKit::PageClientImpl::startDataInteractionWithImage): Deleted.
1900 * UIProcess/ios/WKContentViewInteraction.h:
1901 * UIProcess/ios/WKContentViewInteraction.mm:
1902 (-[WKContentView _startDrag:item:]):
1903 (-[WKContentView _startDataInteractionWithImage:withIndicatorData:atClientPosition:anchorPoint:action:]): Deleted.
1905 Rename startDataInteractionWithImage to startDrag.
1907 * UIProcess/mac/WebPageProxyMac.mm:
1908 (WebKit::WebPageProxy::startDrag):
1909 (WebKit::WebPageProxy::setDragImage): Deleted.
1910 * WebProcess/WebCoreSupport/WebDragClient.cpp:
1911 (WebKit::WebDragClient::startDrag):
1912 * WebProcess/WebCoreSupport/WebDragClient.h:
1913 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
1914 (WebKit::WebDragClient::startDrag):
1915 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1916 (WebKit::WebDragClient::startDrag):
1918 2017-06-27 Wenson Hsieh <wenson_hsieh@apple.com>
1920 [iOS DnD] [WK2] WKWebView does not handle drag sessions that exit and re-enter
1921 https://bugs.webkit.org/show_bug.cgi?id=173856
1922 <rdar://problem/32957100>
1924 Reviewed by Ryosuke Niwa.
1926 Upon exiting a WKContentView, the dropSession tracked by _dataInteractionState is not cleared out. If the drag
1927 session re-enters the WKWebView, a _different_ UIDropSession is sent to the drop delegate, causing us to bail
1928 from handling the session altogether in -dropInteraction:canHandleSession:. To fix this, we need to clear out
1929 the dropSession when the drag session exits the view.
1931 * UIProcess/ios/WKContentViewInteraction.mm:
1932 (-[WKContentView dropInteraction:sessionDidExit:]):
1934 2017-06-26 Chris Dumez <cdumez@apple.com>
1936 WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains() is inefficient
1937 https://bugs.webkit.org/show_bug.cgi?id=173850
1939 Reviewed by Ryosuke Niwa.
1941 Update WebsiteDataRecord::matchesTopPrivatelyControlledDomain() to rely on
1942 SecurityOriginData::host rather than SecurityOriginData::securityOrigin()->host().
1943 SecurityOriginData::securityOrigin() is expensive and it seems unnecessary to call
1944 it here since we already have the host.
1946 Also update WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains() to return
1947 domains as a HashSet rather than a Vector to avoid having duplicate domains.
1949 * UIProcess/WebProcessProxy.cpp:
1950 (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
1951 * UIProcess/WebProcessProxy.h:
1952 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1953 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
1954 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
1955 (WebKit::WebsiteDataRecord::matchesTopPrivatelyControlledDomain):
1956 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1957 (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):
1958 (WebKit::WebsiteDataStore::removeDataForTopPrivatelyControlledDomains):
1959 * UIProcess/WebsiteData/WebsiteDataStore.h:
1961 2017-06-26 Jeremy Jones <jeremyj@apple.com>
1963 Invalidate WebVideoFullscreenManager when WebPage is destroyed.
1964 https://bugs.webkit.org/show_bug.cgi?id=173835
1965 rdar://problem/32969161
1967 Reviewed by Jer Noble.
1969 WebVideoFullscreenManager has a pointer to WebPage, and even null checks it in a few places,
1970 but the only place it is nulled out is in the destructor. This allows a dangling reference.
1972 This changes invalidates that reference when WebPage is destructed and adds nullchecks
1973 or asserts throughout WebVideoFullscreenManager as appropriate.
1975 * WebProcess/WebPage/WebPage.cpp:
1976 (WebKit::WebPage::~WebPage):
1977 * WebProcess/cocoa/WebVideoFullscreenManager.h:
1978 (WebKit::WebVideoFullscreenManager::invalidate):
1979 * WebProcess/cocoa/WebVideoFullscreenManager.mm:
1980 (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager):
1981 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
1982 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
1983 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):
1984 (WebKit::WebVideoFullscreenManager::hasVideoChanged):
1985 (WebKit::WebVideoFullscreenManager::videoDimensionsChanged):
1986 (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
1987 (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
1988 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
1989 (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
1991 2017-06-26 Chris Dumez <cdumez@apple.com>
1993 Disable diagnostic logging in ephemeral sessions
1994 https://bugs.webkit.org/show_bug.cgi?id=173849
1995 <rdar://problem/32987341>
1997 Reviewed by Geoffrey Garen.
1999 * UIProcess/WebPageProxy.cpp:
2000 (WebKit::WebPageProxy::setDiagnosticLoggingClient):
2001 Construct a dummy logging client if the page's session is ephemeral.
2003 (WebKit::WebPageProxy::logDiagnosticMessage):
2004 (WebKit::WebPageProxy::logDiagnosticMessageWithResult):
2005 (WebKit::WebPageProxy::logDiagnosticMessageWithValue):
2006 (WebKit::WebPageProxy::logDiagnosticMessageWithEnhancedPrivacy):
2007 Slight cleanup to make the code look a bit safer.
2009 2017-06-26 Zan Dobersek <zdobersek@igalia.com>
2011 [GCrypt] Properly initialize libgcrypt before using it
2012 https://bugs.webkit.org/show_bug.cgi?id=173589
2014 Reviewed by Michael Catanzaro.
2016 Initialize libgcrypt in the Unix-specific main() entrypoint. This is early enough
2017 to ensure no other libgcrypt API function is invoked and to also ensure this is
2018 done in a thread-safe manner.
2020 Initialization is initiated through the gcry_check_version() call. 16 kilobytes of
2021 secure memory is pre-allocated before we mark the initialization as complete, as
2022 recommended by the libgcrypt documentation.
2024 * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
2027 2017-06-26 Jeremy Jones <jeremyj@apple.com>
2029 When Mission Control closes fullscreen window, allow media element to update its state.
2030 https://bugs.webkit.org/show_bug.cgi?id=173671
2031 rdar://problem/32892671
2033 Reviewed by Eric Carlson.
2035 When Mission Control closes element fullscreen without an animation, we need to notify the
2036 media element that fullscreen has exited.
2038 Without this change, the page still behaves like the element is in fullscreen.
2040 * UIProcess/mac/WKFullScreenWindowController.mm:
2041 (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
2042 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2044 2017-06-26 Wenson Hsieh <wenson_hsieh@apple.com>
2046 [iOS DnD] [WK2] Beginning a drag session should prevent clicking via long press
2047 https://bugs.webkit.org/show_bug.cgi?id=173838
2049 Reviewed by Tim Horton.
2051 After r218579, WebKit no longer attempts to replace out-of-the-box UIKit long-press/drag lift disambiguation by
2052 firing events immediately. However, this means that dragging will defer the highlight long press gesture
2053 recognizer until dragging ends rather than cancel it immediately, which causes WKContentView to dispatch a
2054 synthetic click immediately upon lift. To fix this, we should bail out of the highlight long press gesture when
2057 * UIProcess/ios/WKContentViewInteraction.mm:
2058 (-[WKContentView _dragInteraction:prepareForSession:completion:]):
2060 2017-06-26 Konstantin Tokarev <annulen@yandex.ru>
2062 Unreviewed, add missing header icncludes
2064 * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
2066 2017-06-26 Konstantin Tokarev <annulen@yandex.ru>
2068 [GTK] Unreviewed, added missing includes to fix debug build
2070 * NetworkProcess/NetworkSession.cpp:
2072 2017-06-25 Konstantin Tokarev <annulen@yandex.ru>
2074 Remove excessive headers from WebCore/platform
2075 https://bugs.webkit.org/show_bug.cgi?id=173822
2077 Reviewed by Tim Horton.
2079 * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2081 2017-06-25 Michael Catanzaro <mcatanzaro@igalia.com>
2083 Unreviewed, rolling out r215190.
2085 Broke product select element on GNOME Bugzilla
2089 "[GTK] Misplaced right click menu on web page due to
2090 deprecated gtk_menu_popup()"
2091 https://bugs.webkit.org/show_bug.cgi?id=170553
2092 http://trac.webkit.org/changeset/215190
2094 2017-06-25 Michael Catanzaro <mcatanzaro@igalia.com>
2096 [GTK][WPE] Unreviewed, fix typo in translatable string
2098 Thanks to Yuri Chornoivan for reporting this typo.
2100 * UIProcess/API/glib/WebKitWebView.cpp:
2101 (webkit_web_view_class_init):
2103 2017-06-25 Konstantin Tokarev <annulen@yandex.ru>
2105 Remove excessive headers from JavaScriptCore
2106 https://bugs.webkit.org/show_bug.cgi?id=173812
2108 Reviewed by Darin Adler.
2110 * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2112 2017-06-24 Chris Dumez <cdumez@apple.com>
2114 [WK2] Make sure encodeClientTypesAndData() / decodeClientTypesAndData() match exactly
2115 https://bugs.webkit.org/show_bug.cgi?id=173813
2117 Reviewed by Ryosuke Niwa.
2119 Make sure encodeClientTypesAndData() / decodeClientTypesAndData() match exactly. The previous
2120 IPC encoder code would assume types and data vector have the same length. It would first encode
2121 the length of data using |data.size()| but then would encode types.size() values from the
2122 data vector. While there are debug assertions to ensure both vectors have the same size, this
2123 seems unnecessarily fragile in release builds. If both vectors happen to have different sizes,
2124 this will lead to weird IPC bugs.
2126 * Shared/WebCoreArgumentCoders.cpp:
2127 (IPC::encodeClientTypesAndData):
2128 (IPC::decodeClientTypesAndData):
2130 2017-06-24 Michael Catanzaro <mcatanzaro@igalia.com>
2132 [GTK] Introspection: webkit_web_view_new_with_related_view needs to be marked as a constructor
2133 https://bugs.webkit.org/show_bug.cgi?id=173765
2135 Reviewed by Carlos Garcia Campos.
2137 Because the first parameter to this WebKitWebView constructor is itself a WebKitWebView,
2138 the gi-scanner's heuristics decide that it's probably an object method rather than a
2139 constructor, resulting in improper introspection generation. Annotate it with (constructor)
2140 to override this behavior.
2142 * UIProcess/API/gtk/WebKitWebViewGtk.cpp:
2143 * UIProcess/API/wpe/WebKitWebViewWPE.cpp:
2145 2017-06-24 Commit Queue <commit-queue@webkit.org>
2147 Unreviewed, rolling out r218785.
2148 https://bugs.webkit.org/show_bug.cgi?id=173808
2150 This change broke the macOS Sierra build (Requested by
2151 annulen|home on #webkit).
2155 "Removed unused lambda captures from WebKit2"
2156 https://bugs.webkit.org/show_bug.cgi?id=173555
2157 http://trac.webkit.org/changeset/218785
2159 2017-06-24 Konstantin Tokarev <annulen@yandex.ru>
2161 Removed unused lambda captures from WebKit2
2162 https://bugs.webkit.org/show_bug.cgi?id=173555
2164 Reviewed by Alex Christensen.
2166 * UIProcess/Network/NetworkProcessProxy.cpp:
2167 (WebKit::NetworkProcessProxy::fetchWebsiteData):
2168 (WebKit::NetworkProcessProxy::deleteWebsiteData):
2169 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
2170 * UIProcess/WebProcessProxy.cpp:
2171 (WebKit::WebProcessProxy::fetchWebsiteData):
2172 (WebKit::WebProcessProxy::deleteWebsiteData):
2173 (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
2174 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2175 (WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):
2177 2017-06-23 Chris Dumez <cdumez@apple.com>
2179 Add release assertion to make sure callbackIdentifier is not 0 in DocumentLoader::finishedLoadingIcon()
2180 https://bugs.webkit.org/show_bug.cgi?id=173792
2182 Reviewed by Ryosuke Niwa.
2184 Add release assertion to make sure callbackIdentifier is not 0 in DocumentLoader::finishedLoadingIcon()
2185 as this could cause HashTable corruption on WebPageProxy side.
2187 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2188 (WebKit::WebFrameLoaderClient::finishedLoadingIcon):
2189 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2191 2017-06-23 Chris Dumez <cdumez@apple.com>
2193 Stop passing Vector by value in WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores()
2194 https://bugs.webkit.org/show_bug.cgi?id=173782
2196 Reviewed by Brent Fulgham.
2198 * UIProcess/WebProcessProxy.cpp:
2199 (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
2200 * UIProcess/WebProcessProxy.h:
2201 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2202 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
2204 2017-06-23 Chris Dumez <cdumez@apple.com>
2206 Avoid copying HashSet to Vector in WebPageProxy::clearLoadDependentCallbacks()
2207 https://bugs.webkit.org/show_bug.cgi?id=173786
2209 Reviewed by Geoffrey Garen.
2211 Avoid copying HashSet to Vector in WebPageProxy::clearLoadDependentCallbacks().
2212 Instead, just move the HashSet and iterate on that. This is OK since we were
2213 clearing the HashSet right after copying it to the vector anyway.
2215 * UIProcess/WebPageProxy.cpp:
2216 (WebKit::WebPageProxy::clearLoadDependentCallbacks):
2218 2017-06-23 Chris Dumez <cdumez@apple.com>
2220 Unreviewed, fix Debug build after r218763
2222 * NetworkProcess/NetworkDataTask.cpp:
2224 2017-06-23 Chris Dumez <cdumez@apple.com>
2226 Add more release logging for process assertions
2227 https://bugs.webkit.org/show_bug.cgi?id=173624
2228 <rdar://problem/32412701>
2230 Reviewed by Geoffrey Garen.
2232 Add more release logging for process assertions to help debug issues such
2233 as <rdar://problem/32412701>.
2235 * UIProcess/ProcessThrottler.cpp:
2236 (WebKit::ProcessThrottler::didConnectToProcess):
2237 * UIProcess/ios/ProcessAssertionIOS.mm:
2238 (WebKit::ProcessAssertion::ProcessAssertion):
2239 (WebKit::ProcessAssertion::~ProcessAssertion):
2240 (WebKit::ProcessAssertion::setState):
2242 2017-06-23 Chris Dumez <cdumez@apple.com>
2244 Consistently use RunLoop::isMain() in WebKit2
2245 https://bugs.webkit.org/show_bug.cgi?id=173745
2246 <rdar://problem/32936527>
2248 Reviewed by Brent Fulgham.
2250 Consistently use RunLoop:isMain() on WebKit2 instead of WTF::isMainThread().
2251 WTF::isMainThread() returns true for the WebThread instead of the UIThread
2252 in WebKit1. Therefore WTF::isMainThread() is unsafe to use in the UIProcess
2253 as the application may be using WebKit1 as well and have a WebThread.
2255 Technically, we only *need* to move from WTF::isMainThread() to
2256 RunLoop::isMain() in the UIProcess code but I ported all of WebKit2 for
2257 consistency. RunLoop::isMain() is always safe in WebKit2.
2259 * NetworkProcess/NetworkDataTask.cpp:
2260 (WebKit::NetworkDataTask::NetworkDataTask):
2261 (WebKit::NetworkDataTask::~NetworkDataTask):
2262 * NetworkProcess/NetworkDataTaskBlob.cpp:
2263 (WebKit::NetworkDataTaskBlob::getSizeForNext):
2264 (WebKit::NetworkDataTaskBlob::didGetSize):
2265 (WebKit::NetworkDataTaskBlob::seek):
2266 (WebKit::NetworkDataTaskBlob::read):
2267 * NetworkProcess/NetworkLoad.cpp:
2268 (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
2269 (WebKit::NetworkLoad::notifyDidReceiveResponse):
2270 * NetworkProcess/NetworkSession.cpp:
2271 (WebKit::NetworkSession::defaultSession):
2272 * NetworkProcess/cache/NetworkCache.cpp:
2273 (WebKit::NetworkCache::resourceType):
2274 (WebKit::NetworkCache::Cache::initialize):
2275 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2276 (WebKit::NetworkCache::IOChannel::read):
2277 (WebKit::NetworkCache::IOChannel::readSyncInThread):
2278 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2279 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
2280 (WebKit::NetworkSessionCocoa::defaultSession):
2281 (WebKit::NetworkSessionCocoa::dataTaskForIdentifier):
2282 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2283 (WebKit::CoordinatedGraphicsScene::dispatchOnMainThread):
2284 (WebKit::CoordinatedGraphicsScene::syncRemoteContent):
2285 (WebKit::CoordinatedGraphicsScene::detach):
2286 (WebKit::CoordinatedGraphicsScene::appendUpdate):
2287 * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
2288 (WebKit::WorkQueuePool::singleton):
2289 (WebKit::WorkQueuePool::dispatch):
2290 (WebKit::CompositingRunLoop::~CompositingRunLoop):
2291 (WebKit::CompositingRunLoop::performTask):
2292 (WebKit::CompositingRunLoop::performTaskSync):
2293 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2294 (WebKit::ThreadedCompositor::createGLContext):
2295 (WebKit::ThreadedCompositor::renderNextFrame):
2296 (WebKit::ThreadedCompositor::commitScrollOffset):
2297 (WebKit::ThreadedCompositor::updateSceneState):
2298 (WebKit::ThreadedCompositor::releaseUpdateAtlases):
2299 (WebKit::ThreadedCompositor::frameComplete):
2300 * Shared/Plugins/NPObjectProxy.cpp:
2301 (WebKit::NPObjectProxy::NP_Deallocate):
2302 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2303 (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
2304 * UIProcess/WebProcessProxy.cpp:
2305 (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
2306 (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData):
2307 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2308 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
2309 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
2310 (WebKit::WebResourceLoadStatisticsStore::writeStoreToDisk):
2311 (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
2312 * UIProcess/ios/WKPDFView.mm:
2313 (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
2314 * UIProcess/ios/forms/WKFileUploadPanel.mm:
2315 (-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
2316 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2317 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2318 * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
2319 (webkitSoupRequestInputStreamReadAsync):
2321 2017-06-23 David Kilzer <ddkilzer@apple.com>
2323 v3: REGRESSION (r218419): 3 NSMutableDictionary leaks calling -[WKProcessPool _pluginLoadClientPolicies]
2324 <https://webkit.org/b/173689>
2326 Reviewed by Tim Horton.
2328 * UIProcess/API/Cocoa/WKProcessPool.mm:
2329 (policiesHashMapToDictionary): Use adoptNS().get() to avoid
2330 dumping objects into autoreleasepools unnecessarily.
2331 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2332 (-[WKProcessPool _pluginLoadClientPolicies]): Add back 'copy'
2333 attribute to document that we're returning a new object on each
2334 invocation. I shouldn't have removed it in the v2 patch.
2336 2017-06-23 Youenn Fablet <youenn@apple.com>
2338 LibWebRTCSocketClient should not destroy its socket within signalClose callback
2339 https://bugs.webkit.org/show_bug.cgi?id=173739
2341 Reviewed by Brent Fulgham.
2343 * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
2344 (WebKit::LibWebRTCSocketClient::signalClose): Destroy 'this' asynchronously to make the caller of signalClose valid until it is not used.
2346 2017-06-23 Chris Dumez <cdumez@apple.com>
2348 Fix typo in WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData() naming
2349 https://bugs.webkit.org/show_bug.cgi?id=173781
2351 Reviewed by Brent Fulgham.
2353 * UIProcess/WebProcessProxy.cpp:
2354 (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):
2355 (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData): Deleted.
2356 * UIProcess/WebProcessProxy.h:
2357 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2358 (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
2360 2017-06-23 Jer Noble <jer.noble@apple.com>
2362 [WK2] Support -[WebAVPlayerController setMuted:]
2363 https://bugs.webkit.org/show_bug.cgi?id=173777
2365 Reviewed by Eric Carlson.
2367 Add a SetMuted message to WebPlaybackSessionManager.
2369 Drive-by refactoring: Because the new setMuted() method conflicts with the existing setMuted()
2370 notification, do a giant rename of the notificiation methods from set(Value) -> (value)Changed.
2372 * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
2373 * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
2374 * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
2375 (WebKit::WebPlaybackSessionModelContext::setMuted):
2376 (WebKit::WebPlaybackSessionModelContext::playbackStartedTimeChanged):
2377 (WebKit::WebPlaybackSessionModelContext::durationChanged):
2378 (WebKit::WebPlaybackSessionModelContext::currentTimeChanged):
2379 (WebKit::WebPlaybackSessionModelContext::bufferedTimeChanged):
2380 (WebKit::WebPlaybackSessionModelContext::rateChanged):
2381 (WebKit::WebPlaybackSessionModelContext::seekableRangesChanged):
2382 (WebKit::WebPlaybackSessionModelContext::canPlayFastReverseChanged):
2383 (WebKit::WebPlaybackSessionModelContext::audioMediaSelectionOptionsChanged):
2384 (WebKit::WebPlaybackSessionModelContext::legibleMediaSelectionOptionsChanged):
2385 (WebKit::WebPlaybackSessionModelContext::audioMediaSelectionIndexChanged):
2386 (WebKit::WebPlaybackSessionModelContext::legibleMediaSelectionIndexChanged):
2387 (WebKit::WebPlaybackSessionModelContext::externalPlaybackChanged):
2388 (WebKit::WebPlaybackSessionModelContext::wirelessVideoPlaybackDisabledChanged):
2389 (WebKit::WebPlaybackSessionModelContext::mutedChanged):
2390 (WebKit::WebPlaybackSessionManagerProxy::currentTimeChanged):
2391 (WebKit::WebPlaybackSessionManagerProxy::bufferedTimeChanged):
2392 (WebKit::WebPlaybackSessionManagerProxy::seekableRangesVectorChanged):
2393 (WebKit::WebPlaybackSessionManagerProxy::canPlayFastReverseChanged):
2394 (WebKit::WebPlaybackSessionManagerProxy::audioMediaSelectionOptionsChanged):
2395 (WebKit::WebPlaybackSessionManagerProxy::legibleMediaSelectionOptionsChanged):
2396 (WebKit::WebPlaybackSessionManagerProxy::audioMediaSelectionIndexChanged):
2397 (WebKit::WebPlaybackSessionManagerProxy::legibleMediaSelectionIndexChanged):
2398 (WebKit::WebPlaybackSessionManagerProxy::externalPlaybackPropertiesChanged):
2399 (WebKit::WebPlaybackSessionManagerProxy::wirelessVideoPlaybackDisabledChanged):
2400 (WebKit::WebPlaybackSessionManagerProxy::mutedChanged):
2401 (WebKit::WebPlaybackSessionManagerProxy::durationChanged):
2402 (WebKit::WebPlaybackSessionManagerProxy::playbackStartedTimeChanged):
2403 (WebKit::WebPlaybackSessionManagerProxy::rateChanged):
2404 (WebKit::WebPlaybackSessionManagerProxy::setMuted):
2405 (WebKit::WebPlaybackSessionManagerProxy::controlsManagerInterface):
2406 (WebKit::WebPlaybackSessionModelContext::setPlaybackStartedTime): Deleted.
2407 (WebKit::WebPlaybackSessionModelContext::setDuration): Deleted.
2408 (WebKit::WebPlaybackSessionModelContext::setCurrentTime): Deleted.
2409 (WebKit::WebPlaybackSessionModelContext::setBufferedTime): Deleted.
2410 (WebKit::WebPlaybackSessionModelContext::setRate): Deleted.
2411 (WebKit::WebPlaybackSessionModelContext::setSeekableRanges): Deleted.
2412 (WebKit::WebPlaybackSessionModelContext::setCanPlayFastReverse): Deleted.
2413 (WebKit::WebPlaybackSessionModelContext::setAudioMediaSelectionOptions): Deleted.
2414 (WebKit::WebPlaybackSessionModelContext::setLegibleMediaSelectionOptions): Deleted.
2415 (WebKit::WebPlaybackSessionModelContext::setAudioMediaSelectionIndex): Deleted.
2416 (WebKit::WebPlaybackSessionModelContext::setLegibleMediaSelectionIndex): Deleted.
2417 (WebKit::WebPlaybackSessionModelContext::setExternalPlayback): Deleted.
2418 (WebKit::WebPlaybackSessionModelContext::setWirelessVideoPlaybackDisabled): Deleted.
2419 (WebKit::WebPlaybackSessionManagerProxy::setCurrentTime): Deleted.
2420 (WebKit::WebPlaybackSessionManagerProxy::setBufferedTime): Deleted.
2421 (WebKit::WebPlaybackSessionManagerProxy::setSeekableRangesVector): Deleted.
2422 (WebKit::WebPlaybackSessionManagerProxy::setCanPlayFastReverse): Deleted.
2423 (WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionOptions): Deleted.
2424 (WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionOptions): Deleted.
2425 (WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionIndex): Deleted.
2426 (WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionIndex): Deleted.
2427 (WebKit::WebPlaybackSessionManagerProxy::setExternalPlaybackProperties): Deleted.
2428 (WebKit::WebPlaybackSessionManagerProxy::setWirelessVideoPlaybackDisabled): Deleted.
2429 (WebKit::WebPlaybackSessionManagerProxy::setDuration): Deleted.
2430 (WebKit::WebPlaybackSessionManagerProxy::setPlaybackStartedTime): Deleted.
2431 (WebKit::WebPlaybackSessionManagerProxy::setRate): Deleted.
2432 * WebProcess/cocoa/WebPlaybackSessionManager.h:
2433 * WebProcess/cocoa/WebPlaybackSessionManager.messages.in:
2434 * WebProcess/cocoa/WebPlaybackSessionManager.mm:
2435 (WebKit::WebPlaybackSessionManager::durationChanged):
2436 (WebKit::WebPlaybackSessionManager::currentTimeChanged):
2437 (WebKit::WebPlaybackSessionManager::bufferedTimeChanged):
2438 (WebKit::WebPlaybackSessionManager::playbackStartedTimeChanged):
2439 (WebKit::WebPlaybackSessionManager::rateChanged):
2440 (WebKit::WebPlaybackSessionManager::seekableRangesChanged):
2441 (WebKit::WebPlaybackSessionManager::canPlayFastReverseChanged):
2442 (WebKit::WebPlaybackSessionManager::audioMediaSelectionOptionsChanged):
2443 (WebKit::WebPlaybackSessionManager::legibleMediaSelectionOptionsChanged):
2444 (WebKit::WebPlaybackSessionManager::externalPlaybackChanged):
2445 (WebKit::WebPlaybackSessionManager::audioMediaSelectionIndexChanged):
2446 (WebKit::WebPlaybackSessionManager::legibleMediaSelectionIndexChanged):
2447 (WebKit::WebPlaybackSessionManager::wirelessVideoPlaybackDisabledChanged):
2448 (WebKit::WebPlaybackSessionManager::mutedChanged):
2449 (WebKit::WebPlaybackSessionManager::setMuted):
2451 2017-06-23 Frederic Wang <fwang@igalia.com>
2453 Use window.internals instead of overridePreference to set WebCore settings in tests
2454 https://bugs.webkit.org/show_bug.cgi?id=173714
2456 Reviewed by Simon Fraser.
2458 This commit remove preference to settings mapping in overrideBoolPreferenceForTestRunner that
2459 are no longer necessary after the changes done in LayoutTests.
2461 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2462 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Remove mapping for preferences
2463 that no longer require testRunner.overridePreference calls in tests.
2465 2017-06-23 Brent Fulgham <bfulgham@apple.com>
2467 Avoid moving the same vector multiple times
2468 https://bugs.webkit.org/show_bug.cgi?id=173748
2469 <rdar://problem/32936804>
2471 Reviewed by Chris Dumez.
2473 We discovered that a Vector<String> was being moved inside a loop, causing it to be moved more than once.
2474 We should never do this!
2476 * UIProcess/WebProcessProxy.cpp:
2477 (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
2478 Do not perform a move at each step of the iteration.
2479 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2480 (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains): Receive vector of top privately
2481 controlled domains as a const reference. Copy this vector into the completion handler. Do not move
2482 origins out of the vector in the inner loop.
2483 (WebKit::WebsiteDataStore::removeDataForTopPrivatelyControlledDomains): Receive vector of top privately
2484 controlled domains as a const reference.
2485 * UIProcess/WebsiteData/WebsiteDataStore.h:
2487 2017-06-23 Alex Christensen <achristensen@webkit.org>
2489 Add SPI to WKURLSchemeTask for redirection
2490 https://bugs.webkit.org/show_bug.cgi?id=173730
2492 Reviewed by Brady Eidson.
2494 This is needed for testing an upcoming fix for redirect callbacks, and it might be
2495 necessary for loading with custom schemes in general. Right now just responding with
2496 an HTTP 301/302/307/308 response code doesn't work because there is nothing that
2497 synthesizes an NSURLRequest from the Location header like we do in
2498 SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest et al. for HSTS,
2499 and that would require using an NSHTTPURLResponse for non-HTTP responses, which is
2500 conceptually wrong. Instead of waiting for a completion handler in the API, we are
2501 following the pattern of WKNavigationDelegate.didReceiveServerRedirectForProvisionalNavigation
2502 and allowing the SPI to indicate that a redirect has happened to update the state of
2503 WebKit, but not allowing the SPI to wait for a processed request and slow down loading.
2505 This adds WKURLSchemeTaskPrivate._didPerformRedirection which is covered by new API tests.
2507 * UIProcess/API/Cocoa/WKURLSchemeTask.mm:
2508 (raiseExceptionIfNecessary):
2509 (-[WKURLSchemeTaskImpl _didPerformRedirection:newRequest:completionHandler:]):
2510 * UIProcess/API/Cocoa/WKURLSchemeTaskInternal.h:
2511 * UIProcess/API/Cocoa/WKURLSchemeTaskPrivate.h: Added.
2512 * UIProcess/WebPageProxy.cpp:
2513 (WebKit::WebPageProxy::startURLSchemeTask):
2514 (WebKit::WebPageProxy::stopURLSchemeTask):
2515 * UIProcess/WebPageProxy.h:
2516 * UIProcess/WebPageProxy.messages.in:
2517 * UIProcess/WebURLSchemeHandler.cpp:
2518 (WebKit::WebURLSchemeHandler::startTask):
2519 (WebKit::WebURLSchemeHandler::stopTask):
2520 * UIProcess/WebURLSchemeHandler.h:
2521 * UIProcess/WebURLSchemeTask.cpp:
2522 (WebKit::WebURLSchemeTask::didReceiveResponse): Deleted.
2523 (WebKit::WebURLSchemeTask::didReceiveData): Deleted.
2524 (WebKit::WebURLSchemeTask::didComplete): Deleted.
2525 * UIProcess/WebURLSchemeTask.h:
2526 * WebKit2.xcodeproj/project.pbxproj:
2527 * WebProcess/WebPage/WebPage.cpp:
2528 (WebKit::WebPage::urlSchemeTaskDidPerformRedirection):
2529 * WebProcess/WebPage/WebPage.h:
2530 * WebProcess/WebPage/WebPage.messages.in:
2531 * WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:
2532 (WebKit::WebURLSchemeHandlerProxy::taskDidPerformRedirection):
2533 * WebProcess/WebPage/WebURLSchemeHandlerProxy.h:
2534 * WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
2535 (WebKit::WebURLSchemeTaskProxy::didPerformRedirection):
2536 * WebProcess/WebPage/WebURLSchemeTaskProxy.h:
2538 2017-06-23 Brent Fulgham <bfulgham@apple.com>
2540 [WK2][macOS] Support Mac Mini Flash Player Features
2541 https://bugs.webkit.org/show_bug.cgi?id=173581
2542 <rdar://problem/32804073>
2544 Reviewed by Dean Jackson.
2546 Revise the sandboxes for additional IOKit properties identified during Flash video player
2549 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2550 * WebProcess/com.apple.WebProcess.sb.in:
2552 2017-06-23 Zan Dobersek <zdobersek@igalia.com>
2554 [CoordinatedGraphics] Clean up type aliases in CoordinatedGraphicsScene
2555 https://bugs.webkit.org/show_bug.cgi?id=173764
2557 Reviewed by Carlos Garcia Campos.
2559 Drop the various type aliases created in the CoordinatedGraphicsScene
2560 class. We can leave without these by leveraging `auto` where necessary.
2562 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2563 (WebKit::CoordinatedGraphicsScene::updateTilesIfNeeded):
2564 (WebKit::CoordinatedGraphicsScene::updateImageBacking):
2565 (WebKit::CoordinatedGraphicsScene::clearImageBackingContents):
2566 (WebKit::CoordinatedGraphicsScene::assignImageBackingToLayer):
2567 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2569 2017-06-23 Carlos Garcia Campos <cgarcia@igalia.com>
2571 [WPE] Crash in wpe_view_backend_get_renderer_host_fd
2572 https://bugs.webkit.org/show_bug.cgi?id=173760
2574 Reviewed by Žan Doberšek.
2576 This can happen if views are created and destroyed quickly. The problem is that CompositingManagerProxy adds a
2577 message receiver but never removes it, so it's possible that the message arrives right after the view has been
2578 destroyed. This is happening most of the times running /wpe/WebKitAutomationSession/request-session that creates
2579 3 web views in a row that are deleted when the test finishes.
2581 Fixes /wpe/WebKitAutomationSession/request-session.
2583 * UIProcess/API/wpe/CompositingManagerProxy.cpp:
2584 (WebKit::CompositingManagerProxy::finalize): Remove the message handler.
2585 * UIProcess/API/wpe/CompositingManagerProxy.h:
2586 * UIProcess/API/wpe/WPEView.cpp:
2587 (WKWPE::View::~View): Call CompositingManagerProxy::finalize().
2589 2017-06-23 Carlos Garcia Campos <cgarcia@igalia.com>
2591 [WPE] User script messages don't work
2592 https://bugs.webkit.org/show_bug.cgi?id=173712
2594 Reviewed by Žan Doberšek.
2596 When a user script message is received we need to create a WebKitJavascriptResult to deserialize the script
2597 value. WebKitJavascriptResult is created with a WebKitWebView for two reasons: to get its JavaScript global
2598 context and to take a reference that ensures the JavaScript context will be alive while the results is
2599 alive. However, we could create the WebKitJavascriptResult with the JavaScript global context and take a
2600 reference of the context itself. This way we don't need to access the WebKitWebView from the
2601 WebScriptMessageHandler client. But we still need access to the JavaScript context, so I've added a
2602 javascriptGlobalContext() method to WebPageProxy for GTK+ and WPE that is implemented from the page client.
2604 Fixes /wpe/WebKitUserContentManager/script-message-received.
2606 * UIProcess/API/glib/WebKitJavascriptResult.cpp:
2607 (_WebKitJavascriptResult::_WebKitJavascriptResult): Create the WebKitJavascriptResult with a JSGlobalContextRef
2608 instead of a WEbKitWebView.
2609 (webkitJavascriptResultCreate): Pass the js context to the constructor.
2610 (webkit_javascript_result_get_global_context): Return the js context.
2611 * UIProcess/API/glib/WebKitJavascriptResultPrivate.h:
2612 * UIProcess/API/glib/WebKitUserContentManager.cpp:
2613 * UIProcess/API/glib/WebKitWebView.cpp:
2614 (_WebKitWebViewPrivate::~_WebKitWebViewPrivate): Use JSRetainPtr
2615 (webkit_web_view_get_javascript_global_context):
2616 (webkitWebViewRunJavaScriptCallback):
2617 * UIProcess/API/gtk/PageClientImpl.cpp:
2618 (WebKit::PageClientImpl::javascriptGlobalContext):
2619 * UIProcess/API/gtk/PageClientImpl.h:
2620 * UIProcess/API/wpe/APIViewClient.h:
2621 (API::ViewClient::javascriptGlobalContext):
2622 * UIProcess/API/wpe/PageClientImpl.cpp:
2623 (WebKit::PageClientImpl::javascriptGlobalContext):
2624 * UIProcess/API/wpe/PageClientImpl.h:
2625 * UIProcess/API/wpe/WPEView.cpp:
2626 (WKWPE::View::javascriptGlobalContext):
2627 * UIProcess/API/wpe/WPEView.h:
2628 * UIProcess/PageClient.h:
2629 (WebKit::PageClient::javascriptGlobalContext):
2630 * UIProcess/WebPageProxy.h:
2631 * UIProcess/gtk/WebPageProxyGtk.cpp:
2632 (WebKit::WebPageProxy::javascriptGlobalContext):
2633 * UIProcess/wpe/WebPageProxyWPE.cpp:
2634 (WebKit::WebPageProxy::javascriptGlobalContext):
2636 2017-06-22 Wenson Hsieh <wenson_hsieh@apple.com>
2638 [iOS DnD] [WK2] Enable in-app dragging from WKWebView on the phone
2639 https://bugs.webkit.org/show_bug.cgi?id=173736
2640 <rdar://problem/32873545>
2642 Reviewed by Tim Horton.
2644 Flip the drag interaction enabled switch on when initializing WKContentView's UIDragInteraction.
2646 * UIProcess/ios/WKContentViewInteraction.mm:
2647 (-[WKContentView setupDataInteractionDelegates]):
2649 2017-06-22 Chris Dumez <cdumez@apple.com>
2651 isMainThread() assertions in CallbackMap are incorrectly failing on some iOS apps
2652 https://bugs.webkit.org/show_bug.cgi?id=173738
2653 <rdar://problem/32923933>
2655 Reviewed by Brady Eidson.
2657 The assertions hit on certain iOS apps even though the crash traces clearly
2658 show them on the main thread. We have verified locally that RunLoop::isMain()
2659 propertly return true in this case (while WTF::isMainThread() returns false).
2660 Update the assertions to use RunLoop::isMain() instead.
2662 * UIProcess/GenericCallback.h:
2663 (WebKit::CallbackMap::put):
2664 (WebKit::CallbackMap::take):
2665 (WebKit::CallbackMap::invalidate):
2667 2017-06-22 Daniel Bates <dabates@apple.com>
2669 Make FrameLoadRequest a move-only type
2670 https://bugs.webkit.org/show_bug.cgi?id=173682
2672 Reviewed by Alex Christensen and Darin Adler.
2674 A FrameLoadRequest groups together the information to perform a load into a single object
2675 that is more manageable to pass around than its constituent parts. Code that receives a
2676 FrameLoadRequest is expected to extract out the information it needs to complete its task.
2677 And it does not make sense to re-use the same FrameLoadRequest object for more than one
2678 load. Therefore, it is sufficient to make FrameLoadRequest a move-only type.
2680 * WebProcess/Plugins/PluginView.cpp:
2681 (WebKit::PluginView::URLRequest::create):
2682 (WebKit::PluginView::URLRequest::URLRequest):
2683 (WebKit::PluginView::performFrameLoadURLRequest):
2684 (WebKit::PluginView::loadURL):
2685 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2686 (WebKit::WebFrameLoaderClient::dispatchCreatePage):
2687 * WebProcess/WebPage/WebInspector.cpp:
2688 (WebKit::WebInspector::openInNewTab):
2689 * WebProcess/WebPage/WebPage.cpp:
2690 (WebKit::WebPage::loadRequest):
2692 2017-06-22 Chris Dumez <cdumez@apple.com>
2694 Add release assertion in CallbackMap::invalidate()
2695 https://bugs.webkit.org/show_bug.cgi?id=173722
2697 Reviewed by Brady Eidson.
2699 Add release assertion in CallbackMap::invalidate() to make sure it is called on the main thread.
2701 * UIProcess/GenericCallback.h:
2702 (WebKit::CallbackMap::invalidate):
2704 2017-06-22 Brady Eidson <beidson@apple.com>
2706 Add some thread safety guards to GenericCallback.
2707 https://bugs.webkit.org/show_bug.cgi?id=173693
2709 Reviewed by Sam Weinig.
2711 A callback should be created, performed, invalidated, and/or destroyed all on the same thread.
2712 Let's write code to notify us if that doesn't happen.
2714 * UIProcess/GenericCallback.h:
2715 (WebKit::GenericCallback::~GenericCallback):
2716 (WebKit::GenericCallback::performCallbackWithReturnValue):
2717 (WebKit::GenericCallback::invalidate):
2719 2017-06-22 David Kilzer <ddkilzer@apple.com>
2721 v2: REGRESSION (r218419): 3 NSMutableDictionary leaks calling -[WKProcessPool _pluginLoadClientPolicies]
2722 <https://webkit.org/b/173689>
2724 Reviewed by Chris Dumez.
2726 * UIProcess/API/Cocoa/WKProcessPool.mm:
2727 (policiesHashMapToDictionary): Use -dictionaryWithCapacity:
2728 instead of -new since the former returns an autoreleased object
2729 while the latter does not. This has the added benefit of tuning
2730 the size of each NSMutableDictionary.
2731 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2732 (-[WKProcessPool _pluginLoadClientPolicies]): Remove 'copy'
2733 attribute from @property declaration since it is read-only.
2735 2017-06-22 Carlos Garcia Campos <cgarcia@igalia.com>
2737 [WPE] Downloads never have a web view associated in WPE
2738 https://bugs.webkit.org/show_bug.cgi?id=173709
2740 Reviewed by Žan Doberšek.
2742 Convert the WPE view client into an API client and add handleDownloadRequest(). WebKitWebView now uses it to
2743 associate itself to the download like the GTK+ port does.
2745 * PlatformWPE.cmake:
2746 * UIProcess/API/C/wpe/WKView.cpp:
2747 (WKViewSetViewClient): Add C API client implementation here.
2748 * UIProcess/API/glib/WebKitWebView.cpp:
2749 (webkitWebViewConstructed): Set the view client in WPE.
2750 * UIProcess/API/wpe/APIViewClient.h: Renamed from Source/WebKit2/UIProcess/API/wpe/WPEViewClient.h.
2751 (API::ViewClient::frameDisplayed):
2752 (API::ViewClient::handleDownloadRequest):
2753 * UIProcess/API/wpe/PageClientImpl.cpp:
2754 (WebKit::PageClientImpl::handleDownloadRequest): Call WKWPE::View::handleDownloadRequest().
2755 * UIProcess/API/wpe/WPEView.cpp:
2756 (WKWPE::View::View): Initialize the view client.
2757 (WKWPE::View::setClient): Set or reset the client.
2758 (WKWPE::View::handleDownloadRequest): Notify the client.
2759 * UIProcess/API/wpe/WPEView.h:
2760 * UIProcess/API/wpe/WPEViewClient.cpp: Removed.
2762 2017-06-22 Carlos Garcia Campos <cgarcia@igalia.com>
2764 [WPE] Page should be closed on WebKitWebView dispose
2765 https://bugs.webkit.org/show_bug.cgi?id=173707
2767 Reviewed by Žan Doberšek.
2769 In the GTK+ port it's done in the WebKitWebViewBase dispose implementation. It fixes TestMultiprocess.
2771 * UIProcess/API/glib/WebKitWebView.cpp:
2772 (webkitWebViewDispose): Call WKWPE::View::close().
2773 * UIProcess/API/wpe/WPEView.cpp:
2774 (WKWPE::View::close): Close the WebPageProxy.
2775 * UIProcess/API/wpe/WPEView.h:
2777 2017-06-22 Carlos Garcia Campos <cgarcia@igalia.com>
2779 Remove unused coordinated graphics C API
2780 https://bugs.webkit.org/show_bug.cgi?id=173706
2782 Reviewed by Žan Doberšek.
2784 * UIProcess/API/C/CoordinatedGraphics/WKView.cpp: Removed.
2785 * UIProcess/API/C/CoordinatedGraphics/WKView.h: Removed.
2786 * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp: Removed.
2787 * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h: Removed.
2789 2017-06-22 Carlos Garcia Campos <cgarcia@igalia.com>
2791 [WPE] Add initial web extensions API
2792 https://bugs.webkit.org/show_bug.cgi?id=173640
2794 Reviewed by Žan Doberšek.
2796 Build the glib web extensions API files and the builtin injected bundle library for WPE.
2798 * PlatformWPE.cmake:
2799 * UIProcess/API/glib/WebKitWebContext.cpp:
2800 (webkitWebContextConstructed): Use a different injected bundle filename in WPE and GTK+.
2801 * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
2802 (webkit_web_page_class_init): Do not expose DOM bindings in WPE.
2803 (webkitWebPageCreate): Ditto.
2804 * WebProcess/InjectedBundle/API/wpe/WebKitConsoleMessage.h: Added.
2805 * WebProcess/InjectedBundle/API/wpe/WebKitFrame.h: Added.
2806 * WebProcess/InjectedBundle/API/wpe/WebKitScriptWorld.h: Added.
2807 * WebProcess/InjectedBundle/API/wpe/WebKitWebEditor.h: Added.
2808 * WebProcess/InjectedBundle/API/wpe/WebKitWebExtension.h: Added.
2809 * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h: Added.
2810 * WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h: Added.
2812 2017-06-21 David Kilzer <ddkilzer@apple.com>
2814 REGRESSION (r218419): 3 NSMutableDictionary leaks calling -[WKProcessPool _pluginLoadClientPolicies]
2815 <https://webkit.org/b/173689>
2817 Reviewed by Chris Dumez.
2819 Caught by the clang static analyzer.
2821 * UIProcess/API/Cocoa/WKProcessPool.mm:
2822 (policiesHashMapToDictionary): Switch from using
2823 [[NSMutableDictionary alloc] init] which returns a +1 retained
2824 object in MRR to [NSMutableDictionary new] which returns an
2825 autoreleased object under MRR. This bug caused 3 leaks when
2826 calling -[WKProcessPool _pluginLoadClientPolicies], which should
2827 return an autoreleased object based on its signature.
2829 2017-06-21 Ryosuke Niwa <rniwa@webkit.org>
2831 Add release assertions help diagnose a hang in CallbackMap
2832 https://bugs.webkit.org/show_bug.cgi?id=173680
2833 <rdar://problem/32911286>
2835 Reviewed by Chris Dumez.
2837 Assert that these functions are only called in the main thread and the empty value is never used as a key.
2839 * UIProcess/GenericCallback.h:
2840 (WebKit::CallbackMap::put):
2841 (WebKit::CallbackMap::take):
2843 2017-06-21 Wenson Hsieh <wenson_hsieh@apple.com>
2845 [iOS DnD] [WK2] Cancelling a drag interaction using the ObjC SPI causes subsequent dragging to fail
2846 https://bugs.webkit.org/show_bug.cgi?id=173659
2847 <rdar://problem/32879788>
2849 Reviewed by Tim Horton.
2851 Currently, a drag session that failed to begin is cleaned up either when the web process responds in
2852 -[WKContentView _didHandleStartDataInteractionRequest:] with started = NO, or if started is YES, in
2853 -dragInteraction:session:didEndWithOperation: instead. However, it is possible that even when the pasteboard has
2854 items and the drag has started in the web process, something in the UI process may then cause the drag to be
2855 cancelled (for instance, an SPI client returning empty arrays for all adjusted item providers, or UIKit not even
2856 calling into -dragInteraction:itemsForBeginningSession: when we invoke their completion block).
2858 In any case, if the drag session is drag-item-less after calling the drag start completion block, clean up and
2861 * UIProcess/ios/WKContentViewInteraction.mm:
2862 (-[WKContentView _didHandleStartDataInteractionRequest:]):
2863 (-[WKContentView dragInteraction:itemsForBeginningSession:]):
2865 2017-06-21 Tim Horton <timothy_horton@apple.com>
2867 REGRESSION (r218606): 3D Touch action menu for links is missing items
2868 https://bugs.webkit.org/show_bug.cgi?id=173669
2869 <rdar://problem/32905541>
2871 Reviewed by Wenson Hsieh.
2873 * UIProcess/ios/WKActionSheetAssistant.mm:
2874 (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
2875 defaultActionsForLinkSheet is used outside the usual action sheet flow,
2876 by 3D Touch code. Therefore, we're not guaranteed to have a _positionInformation.
2877 We don't need one, though -- we can get the URL from the passed-in
2878 _WKActivatedElementInfo, exactly like defaultActionsForImageSheet already did.
2880 (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
2881 Remove the delegate null check, which isn't used after r218606.
2883 2017-06-21 Daniel Bates <dabates@apple.com>
2885 Cleanup FrameLoadRequest
2886 https://bugs.webkit.org/show_bug.cgi?id=173564
2887 <rdar://problem/32903570>
2889 Reviewed by Brent Fulgham.
2891 * WebProcess/Plugins/PluginView.cpp:
2892 (WebKit::PluginView::loadURL): Explicitly pass the null-string for the target frame
2893 name as we do not have one. Use C++11 brace initialization syntax.
2894 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2895 (WebKit::WebFrameLoaderClient::dispatchCreatePage): Ditto.
2896 * WebProcess/WebPage/WebInspector.cpp:
2897 (WebKit::WebInspector::openInNewTab): It is no longer necessary to pass ReplaceDocumentIfJavaScriptURL
2898 when instantiating the FrameLoadRequest as it defaults to this policy. Use C++11 brace initialization syntax.
2900 2017-06-21 Wenson Hsieh <wenson_hsieh@apple.com>
2902 [iOS DnD] [WK2] Add drag-and-drop release logging around WKContentView
2903 https://bugs.webkit.org/show_bug.cgi?id=173636
2905 Reviewed by Tim Horton.
2907 Add logging at key points in the drag-and-drop lifecycle in the UI process, so that sysdiagnoses will contain
2908 sufficient information to debug sparse failures.
2910 * Platform/Logging.h:
2911 * UIProcess/ios/WKContentViewInteraction.mm:
2912 (-[WKContentView _didHandleStartDataInteractionRequest:]):
2913 (-[WKContentView cleanUpDragSourceSessionState]):
2914 (-[WKContentView _didPerformDataInteractionControllerOperation:]):
2915 (-[WKContentView _dragInteraction:prepareForSession:completion:]):
2916 (-[WKContentView dragInteraction:itemsForBeginningSession:]):
2917 (-[WKContentView dragInteraction:sessionWillBegin:]):
2918 (-[WKContentView _api_dragInteraction:session:didEndWithOperation:]):
2919 (-[WKContentView dropInteraction:canHandleSession:]):
2920 (-[WKContentView _api_dropInteraction:sessionDidEnter:]):
2921 (-[WKContentView dropInteraction:sessionDidExit:]):
2922 (-[WKContentView dropInteraction:performDrop:]):
2923 (-[WKContentView dropInteraction:sessionDidEnd:]):
2925 2017-06-21 Jeremy Jones <jeremyj@apple.com>
2927 Don't clear audio mute when muting capture.
2928 https://bugs.webkit.org/show_bug.cgi?id=173639
2929 rdar://problem/32749737
2931 Reviewed by Eric Carlson.
2933 Setting capture mute was clearing audio mute.
2934 Added setMediaStreamCaptureMuted to set just the capture mute bit.
2936 * UIProcess/API/Cocoa/WKWebView.mm:
2937 (-[WKWebView _muteMediaCapture]):
2938 * UIProcess/UserMediaProcessManager.cpp:
2939 (WebKit::UserMediaProcessManager::muteCaptureMediaStreamsExceptIn):
2940 * UIProcess/WebPageProxy.cpp:
2941 (WebKit::WebPageProxy::setMediaStreamCaptureMuted):
2942 * UIProcess/WebPageProxy.h:
2944 2017-06-21 Miguel Gomez <magomez@igalia.com>
2946 [GTK][WAYLAND] Create WaylandCompositorDisplay unconditionally when initializing the WebProcess
2947 https://bugs.webkit.org/show_bug.cgi?id=173598
2949 Reviewed by Carlos Garcia Campos.
2951 Move WaylandCompositorDisplay code to its own files so it can be used from other classes. Then, instead of
2952 storing the waylandCompositorDisplayName in the WebProcess, keep a WaylandCompositorDisplay instance that
2953 is created during the initialization. This way the appropriate sharedDisplayForCompositing will be set
2954 since the creation of the WebProcess.
2956 * PlatformGTK.cmake:
2957 * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp:
2958 (WebKit::AcceleratedSurfaceWayland::create):
2959 (WebKit::AcceleratedSurfaceWayland::AcceleratedSurfaceWayland):
2960 * WebProcess/WebProcess.cpp:
2961 (WebKit::WebProcess::initializeWebProcess):
2962 * WebProcess/WebProcess.h:
2963 (WebKit::WebProcess::waylandCompositorDisplay):
2964 * WebProcess/gtk/WaylandCompositorDisplay.cpp: Added.
2965 (WebKit::WaylandCompositorDisplay::create):
2966 (WebKit::WaylandCompositorDisplay::bindSurfaceToPage):
2967 (WebKit::WaylandCompositorDisplay::WaylandCompositorDisplay):
2968 (WebKit::WaylandCompositorDisplay::registryGlobal):
2969 * WebProcess/gtk/WaylandCompositorDisplay.h: Added.
2970 * WebProcess/soup/WebProcessSoup.cpp:
2971 (WebKit::WebProcess::platformInitializeWebProcess):
2973 2017-06-21 Carlos Garcia Campos <cgarcia@igalia.com>
2975 [GTK] Move WebGtkExtensionManager and WebGtkInjectedBundleMain to glib API dir
2976 https://bugs.webkit.org/show_bug.cgi?id=173606
2978 Reviewed by Žan Doberšek.
2980 And rename them to use WebKit prefix instead of WebGtk.
2982 * PlatformGTK.cmake:
2983 * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp.
2984 (WebKit::WebKitExtensionManager::singleton):
2985 (WebKit::WebKitExtensionManager::WebKitExtensionManager):
2986 (WebKit::WebKitExtensionManager::scanModules):
2987 (WebKit::WebKitExtensionManager::initializeWebExtension):
2988 (WebKit::WebKitExtensionManager::initialize):
2989 * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h.
2990 * WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp.
2991 (WKBundleInitialize):
2993 2017-06-20 Frederic Wang <fwang@igalia.com>
2995 Pass the argument of DrawingArea::shouldUseTiledBackingForFrameView by reference
2996 https://bugs.webkit.org/show_bug.cgi?id=173605
2998 DrawingArea::shouldUseTiledBackingForFrameView is only called from
2999 WebChromeClient::shouldUseTiledBackingForFrameView where the frame view is already available
3000 as a reference. This patch makes the argument of
3001 DrawingArea::shouldUseTiledBackingForFrameView a reference, so it does not need to be
3002 converted to a pointer or to perform nullchecks.
3004 Reviewed by Simon Fraser.
3006 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3007 (WebKit::WebChromeClient::shouldUseTiledBackingForFrameView): Just pass the reference.
3008 * WebProcess/WebPage/DrawingArea.h: Make the parameter a reference.
3009 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: Ditto.
3010 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Ditto.
3011 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3012 (WebKit::RemoteLayerTreeDrawingArea::shouldUseTiledBackingForFrameView): Use the reference
3013 to frame view and remove the nullcheck.
3014 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3015 (WebKit::TiledCoreAnimationDrawingArea::shouldUseTiledBackingForFrameView): Ditto.
3017 2017-06-20 Myles C. Maxfield <mmaxfield@apple.com>
3019 Disable font variations on macOS Sierra and iOS 10
3020 https://bugs.webkit.org/show_bug.cgi?id=173618
3021 <rdar://problem/32879164>
3023 Reviewed by Jon Lee.
3025 * Configurations/FeatureDefines.xcconfig:
3027 2017-06-20 Daniel Bates <dabates@apple.com>
3029 Have FrameLoadRequest takes a Frame& instead of a Frame*
3030 https://bugs.webkit.org/show_bug.cgi?id=173614
3031 <rdar://problem/32884890>
3033 Reviewed by Brent Fulgham.
3035 * WebProcess/Plugins/PluginView.cpp:
3036 (WebKit::PluginView::performFrameLoadURLRequest):
3037 * WebProcess/WebPage/WebPage.cpp:
3038 (WebKit::WebPage::loadURLInFrame):
3039 (WebKit::WebPage::loadRequest):
3040 (WebKit::WebPage::loadDataImpl):
3042 2017-06-20 Tim Horton <timothy_horton@apple.com>
3044 Occasional deadlocks under ensurePositionInformationIsUpToDate (incoming sync message with waitForAndDispatchImmediately)
3045 https://bugs.webkit.org/show_bug.cgi?id=173570
3046 <rdar://problem/32720928>
3048 Reviewed by Wenson Hsieh.
3050 * UIProcess/WebPageProxy.h:
3051 * UIProcess/ios/WebPageProxyIOS.mm:
3052 (WebKit::WebPageProxy::getPositionInformation): Deleted.
3053 Get rid of getPositionInformation; it only has one caller, and it's easier
3054 to reason about the code if it's all in one place. Also, we shouldn't
3057 * UIProcess/ios/WKContentViewInteraction.h:
3058 * UIProcess/ios/WKContentViewInteraction.mm:
3059 (-[WKContentView ensurePositionInformationIsUpToDate:]):
3060 Add a return value to ensurePositionInformationIsUpToDate that indicates
3061 whether we succeeded in that effort.
3063 Add the flag to our waitForAndDispatchImmediately that causes the wait
3064 to be interrupted if a sync message arrives.
3066 (-[WKContentView gestureRecognizerShouldBegin:]):
3067 (-[WKContentView hasSelectablePositionAtPoint:]):
3068 (-[WKContentView pointIsNearMarkedText:]):
3069 (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
3070 (-[WKContentView positionInformationForActionSheetAssistant:]):
3071 (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
3072 If anything happens to interrupt our position information update, fail
3073 in the most graceful possible way at each callsite (generally by bailing
3074 from doing whatever action required position information).
3076 * UIProcess/ios/WKPDFView.mm:
3077 (-[WKPDFView positionInformationForActionSheetAssistant:]):
3078 * UIProcess/ios/WKActionSheetAssistant.h:
3079 * UIProcess/ios/WKActionSheetAssistant.mm:
3080 (-[WKActionSheetAssistant synchronouslyRetrievePositionInformation]):
3081 (-[WKActionSheetAssistant presentationRectForElementUsingClosestIndicatedRect]):
3082 (-[WKActionSheetAssistant presentationRectForIndicatedElement]):
3083 (-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
3084 (-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
3085 (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
3086 (-[WKActionSheetAssistant showImageSheet]):
3087 (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
3088 (-[WKActionSheetAssistant showLinkSheet]):
3089 (-[WKActionSheetAssistant showDataDetectorsSheet]):
3090 (-[WKActionSheetAssistant cleanupSheet]):
3091 Instead of constantly re-querying the position information, save it aside
3092 when presenting an action sheet, and use it to respond to all of the
3093 subsequent questions. Also, bail from presenting the action sheet if we fail
3094 to retrieve correct position information.
3096 2017-06-20 Matt Lewis <jlewis3@apple.com>
3098 Unreviewed, rolling out r218530.
3100 This revision caused multiple media stream test crashes on
3105 "Merge MediaDevicesRequest and MediaDevicesEnumerationRequest
3106 to tighten up code and object lifetime"
3107 https://bugs.webkit.org/show_bug.cgi?id=173527
3108 http://trac.webkit.org/changeset/218530
3110 2017-06-20 Wenson Hsieh <wenson_hsieh@apple.com>
3112 [iOS DnD] [WK2] Remove custom logic for disambiguating long press action sheet gestures and drag lift
3113 https://bugs.webkit.org/show_bug.cgi?id=173578
3114 <rdar://problem/32825028>
3116 Reviewed by Tim Horton.
3118 Custom logic to cancel the long press action gesture recognizer in WebKit2 was added months ago to achieve
3119 spec'ed behavior when initiating a drag on an element with an action sheet to show on long press. Now that UIKit
3120 defers firing long-press gesture recognizers while a drag lift is recognizing, no extra work in WebKit is needed
3121 to achieve expected behavior.
3123 * UIProcess/API/Cocoa/WKWebView.mm:
3124 (-[WKWebView _simulateLongPressActionAtLocation:]):
3125 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3127 Add testing SPI for showing an action sheet popover at a given location in content view coordinates.
3129 * UIProcess/ios/WKContentViewInteraction.h:
3130 * UIProcess/ios/WKContentViewInteraction.mm:
3131 (-[WKContentView _startDataInteractionWithImage:withIndicatorData:atClientPosition:anchorPoint:action:]):
3132 (-[WKContentView _didHandleStartDataInteractionRequest:]):
3133 (-[WKContentView _dragInteraction:prepareForSession:completion:]):
3134 (-[WKContentView dragInteraction:sessionWillBegin:]):
3135 (-[WKContentView _api_dragInteraction:session:didEndWithOperation:]):
3136 (-[WKContentView _simulateLongPressActionAtLocation:]):
3137 (longPressActionDelayAfterLift): Deleted.
3138 (-[WKContentView performDeferredActionAtDragOrigin]): Deleted.
3139 (-[WKContentView cancelDeferredActionAtDragOrigin]): Deleted.
3141 2017-06-20 Carlos Garcia Campos <cgarcia@igalia.com>
3143 [WPE] Add initial implementation of glib API
3144 https://bugs.webkit.org/show_bug.cgi?id=173546
3146 Reviewed by Žan Doberšek.
3148 Make current API files under glib directories build in WPE, and add the minimum implementation to make it
3149 work. For now it doesn't have web extensions API, and there are a few FIXMEs that will be fixed in follow up
3150 commits. It doesn't include install rules yet, since it's still not ready to be installed.
3152 * PlatformGTK.cmake:
3153 * PlatformWPE.cmake:
3154 * Shared/API/glib/WebKitContextMenuActions.cpp:
3155 (webkitContextMenuActionGetActionTag):
3156 (webkitContextMenuActionGetForContextMenuItem):
3157 (webkitContextMenuActionGetLabel):
3158 * Shared/API/glib/WebKitContextMenuItem.cpp:
3159 * UIProcess/API/glib/WebKitEditorState.cpp:
3160 (webkitEditorStateChanged):
3161 * UIProcess/API/glib/WebKitError.cpp:
3162 * UIProcess/API/glib/WebKitFileChooserRequest.cpp:
3163 (webkitFileChooserRequestGetProperty):
3164 (webkit_file_chooser_request_class_init):
3165 * UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
3166 (createGstInstallPluginsContext):
3167 (webkitInstallMissingMediaPluginsPermissionRequestAllow):
3168 * UIProcess/API/glib/WebKitNavigationAction.cpp:
3169 * UIProcess/API/glib/WebKitNavigationActionPrivate.h:
3170 (_WebKitNavigationAction::_WebKitNavigationAction):
3171 * UIProcess/API/glib/WebKitNotificationPrivate.h:
3172 * UIProcess/API/glib/WebKitNotificationProvider.cpp:
3173 (WebKitNotificationProvider::show):
3174 * UIProcess/API/glib/WebKitPrivate.cpp:
3175 (toPlatformModifiers):
3178 * UIProcess/API/glib/WebKitPrivate.h:
3179 * UIProcess/API/glib/WebKitSettings.cpp:
3180 (webKitSettingsSetProperty):
3181 (webKitSettingsGetProperty):
3182 (webkit_settings_class_init):
3183 (webkit_settings_set_user_agent):
3184 (webkit_settings_set_user_agent_with_application_details):
3185 * UIProcess/API/glib/WebKitUIClient.cpp:
3186 * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
3187 (webkit_uri_scheme_request_get_web_view):
3188 * UIProcess/API/glib/WebKitUserContentManager.cpp:
3189 * UIProcess/API/glib/WebKitWebContext.cpp:
3190 (webkitWebContextConstructed):
3191 * UIProcess/API/glib/WebKitWebView.cpp:
3192 (webkitWebViewCreate):
3193 (webkit_web_view_class_init):
3194 (webkitWebViewCreatePage):
3195 (webkitWebViewRunAsModal):
3196 (webkitWebViewMouseTargetChanged):
3197 (webkitWebViewEnterFullScreen):
3198 (webkitWebViewExitFullScreen):
3199 (webkitWebViewPopulateContextMenu):
3200 * UIProcess/API/glib/WebKitWebViewPrivate.h:
3201 * UIProcess/API/glib/WebKitWindowProperties.cpp:
3202 (webkitWindowPropertiesGetProperty):
3203 (webkitWindowPropertiesSetProperty):
3204 (webkit_window_properties_class_init):
3205 (webkitWindowPropertiesUpdateFromWebWindowFeatures):
3206 * UIProcess/API/glib/WebKitWindowPropertiesPrivate.h:
3207 * UIProcess/API/gtk/WebKitWebViewGtk.cpp: Added.
3208 (webkitWebViewAuthenticate):
3209 (webkitWebViewCreateJavaScriptDialog):
3210 (webkitWebViewScriptDialog):
3211 (fileChooserDialogResponseCallback):
3212 (webkitWebViewRunFileChooser):
3213 (webkit_web_view_new):
3214 (webkit_web_view_new_with_context):
3215 (webkit_web_view_new_with_related_view):
3216 (webkit_web_view_new_with_settings):
3217 (webkit_web_view_new_with_user_content_manager):
3218 * UIProcess/API/wpe/WPEView.h:
3219 * UIProcess/API/wpe/WebKitAuthenticationRequest.h: Added.
3220 * UIProcess/API/wpe/WebKitAutomationSession.h: Added.
3221 * UIProcess/API/wpe/WebKitBackForwardList.h: Added.
3222 * UIProcess/API/wpe/WebKitBackForwardListItem.h: Added.
3223 * UIProcess/API/wpe/WebKitContextMenu.h: Added.
3224 * UIProcess/API/wpe/WebKitContextMenuActions.h: Added.
3225 * UIProcess/API/wpe/WebKitContextMenuItem.h: Added.
3226 * UIProcess/API/wpe/WebKitCookieManager.h: Added.
3227 * UIProcess/API/wpe/WebKitCredential.h: Added.
3228 * UIProcess/API/wpe/WebKitDefines.h: Copied from Source/WebKit2/UIProcess/API/glib/WebKitPrivate.h.
3229 * UIProcess/API/wpe/WebKitDownload.h: Added.
3230 * UIProcess/API/wpe/WebKitEditingCommands.h: Added.
3231 * UIProcess/API/wpe/WebKitEditorState.h: Added.
3232 * UIProcess/API/wpe/WebKitEnumTypes.cpp.template: Added.
3233 * UIProcess/API/wpe/WebKitEnumTypes.h.template: Copied from Source/WebKit2/UIProcess/API/glib/WebKitNotificationPrivate.h.
3234 * UIProcess/API/wpe/WebKitError.h: Added.
3235 * UIProcess/API/wpe/WebKitFaviconDatabase.h: Added.
3236 * UIProcess/API/wpe/WebKitFileChooserRequest.h: Added.
3237 * UIProcess/API/wpe/WebKitFindController.h: Added.
3238 * UIProcess/API/wpe/WebKitFormSubmissionRequest.h: Added.
3239 * UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h: Added.
3240 * UIProcess/API/wpe/WebKitHitTestResult.h: Added.
3241 * UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h: Added.
3242 * UIProcess/API/wpe/WebKitJavascriptResult.h: Added.
3243 * UIProcess/API/wpe/WebKitMimeInfo.h: Added.
3244 * UIProcess/API/wpe/WebKitNavigationAction.h: Added.
3245 * UIProcess/API/wpe/WebKitNavigationPolicyDecision.h: Added.
3246 * UIProcess/API/wpe/WebKitNetworkProxySettings.h: Added.
3247 * UIProcess/API/wpe/WebKitNotification.h: Added.
3248 * UIProcess/API/wpe/WebKitNotificationPermissionRequest.h: Added.
3249 * UIProcess/API/wpe/WebKitPermissionRequest.h: Added.
3250 * UIProcess/API/wpe/WebKitPlugin.h: Added.
3251 * UIProcess/API/wpe/WebKitPolicyDecision.h: Added.
3252 * UIProcess/API/wpe/WebKitResponsePolicyDecision.h: Added.
3253 * UIProcess/API/wpe/WebKitScriptDialog.h: Added.
3254 * UIProcess/API/wpe/WebKitSecurityManager.h: Added.
3255 * UIProcess/API/wpe/WebKitSecurityOrigin.h: Added.
3256 * UIProcess/API/wpe/WebKitSettings.h: Added.
3257 * UIProcess/API/wpe/WebKitURIRequest.h: Added.
3258 * UIProcess/API/wpe/WebKitURIResponse.h: Added.
3259 * UIProcess/API/wpe/WebKitURISchemeRequest.h: Added.
3260 * UIProcess/API/wpe/WebKitUserContent.h: Added.
3261 * UIProcess/API/wpe/WebKitUserContentManager.h: Added.
3262 * UIProcess/API/wpe/WebKitUserMediaPermissionRequest.h: Added.
3263 * UIProcess/API/wpe/WebKitWebContext.h: Added.
3264 * UIProcess/API/wpe/WebKitWebResource.h: Added.
3265 * UIProcess/API/wpe/WebKitWebView.h: Added.
3266 * UIProcess/API/wpe/WebKitWebViewSessionState.h: Added.
3267 * UIProcess/API/wpe/WebKitWebViewWPE.cpp: Added.
3268 (webkitWebViewAuthenticate):
3269 (webkitWebViewScriptDialog):
3270 (webkitWebViewRunFileChooser):
3271 (webkit_web_view_new):
3272 (webkit_web_view_new_with_context):
3273 (webkit_web_view_new_with_related_view):
3274 (webkit_web_view_new_with_settings):
3275 (webkit_web_view_new_with_user_content_manager):
3276 * UIProcess/API/wpe/WebKitWebsiteData.h: Added.
3277 * UIProcess/API/wpe/WebKitWebsiteDataManager.h: Added.
3278 * UIProcess/API/wpe/WebKitWindowProperties.h: Added.
3279 * UIProcess/API/wpe/webkit.h: Added.
3281 2017-06-19 Frederic Wang <fwang@igalia.com>
3283 [iOS] Always include frames in the scrolling tree when async frame scrolling is enabled
3284 https://bugs.webkit.org/show_bug.cgi?id=173405
3286 Reviewed by Simon Fraser.
3288 * WebProcess/WebCoreSupport/WebChromeClient.h: Set the ScrollableNonMainFrameTrigger bit by
3289 default on iOS too. RenderLayerCompositor::requiresCompositingForScrollableFrame will ignore
3290 this change when async frame scrolling is disabled.
3292 2017-06-19 Frederic Wang <fred.wang@free.fr>
3294 [Mac] Add an experimental feature setting for async frame scrolling
3295 https://bugs.webkit.org/show_bug.cgi?id=173359
3297 Reviewed by Simon Fraser.
3299 * Shared/WebPreferencesDefinitions.h: Add experimental feature "async frame scrolling".
3300 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3301 (WKBundleSetAsyncFrameScrollingEnabled): Add setter for async frame scrolling.
3302 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Declare setter.
3303 * WebProcess/InjectedBundle/InjectedBundle.cpp:
3304 (WebKit::InjectedBundle::setAsyncFrameScrollingEnabled): Add setter for async frame scrolling.
3305 * WebProcess/InjectedBundle/InjectedBundle.h: Declare setter.
3306 * WebProcess/WebPage/WebPage.cpp:
3307 (WebKit::WebPage::updatePreferences): Take into account preference update for async frame
3310 2017-06-19 Darin Adler <darin@apple.com>
3312 Merge MediaDevicesRequest and MediaDevicesEnumerationRequest to tighten up code and object lifetime
3313 https://bugs.webkit.org/show_bug.cgi?id=173527
3315 Reviewed by Sam Weinig.
3317 * UIProcess/API/C/WKUserMediaPermissionCheck.h: Fixed incorrect file name in comment.
3319 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
3320 (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices): Use the new frame
3321 function from MediaDevicesEnumerationRequest rather than finding the frame with our
3324 * WebProcess/WebCoreSupport/WebUserMediaClient.cpp: Removed unneeded include of UserMediaController.h.
3326 2017-06-19 Chris Dumez <cdumez@apple.com>
3328 Regression(r217570): com.apple.WebKit.Networking crash at com.apple.WebKit: WebKit::ChildProcess::didReceiveInvalidMessage (Breaks 32-bit apps)
3329 https://bugs.webkit.org/show_bug.cgi?id=173576
3330 <rdar://problem/32416291>
3332 Reviewed by Tim Horton.
3334 The IPC encoding / decoding code cannot be architecture-specific because a 32bit UIProcess
3335 talks to a 64bit NetworkProcess. The WEB_RTC build time flag is enabled on 64bit only.
3336 Therefore, we should not use #if ENABLE(WEB_RTC) in IPC encoding / decoding code.
3338 * Shared/WebPageCreationParameters.cpp:
3339 (WebKit::WebPageCreationParameters::encode):
3340 (WebKit::WebPageCreationParameters::decode):
3341 * Shared/WebPageCreationParameters.h:
3343 2017-06-19 Chris Dumez <cdumez@apple.com>
3345 Unreviewed, partial rollout of r218501 to address crashes on iOS.
3347 * UIProcess/Cocoa/NavigationState.mm:
3348 (WebKit::tryAppLink):
3350 2017-06-19 Darin Adler <darin@apple.com>
3352 [Cocoa] implement URLSession:task:needNewBodyStream: delegate method
3353 https://bugs.webkit.org/show_bug.cgi?id=173551
3354 rdar://problem/32250512
3356 Reviewed by Alex Christensen.
3358 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3359 (-[WKNetworkSessionDelegate existingTask:]): Added helper method.
3360 (-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
3361 Updated to use existingTask: method.
3362 (-[WKNetworkSessionDelegate URLSession:task:needNewBodyStream:]): Added.
3363 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
3364 Updated to use existingTask: method.
3365 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]): Ditto.
3366 (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]): Ditto.
3367 (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]): Ditto.
3368 (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]): Ditto.
3369 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): Ditto.
3370 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]): Ditto.
3371 (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]): Ditto.
3372 (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): Ditto.
3373 (WebKit::globalAllowsCellularAccess): Deleted. Just use a normal global.
3374 (WebKit::globalLegacyCustomProtocolManager): Deleted. Just use a normal global.
3375 (WebKit::NetworkSessionCocoa::setLegacyCustomProtocolManager): Updated for normal global.
3376 (WebKit::NetworkSessionCocoa::setAllowsCellularAccess): Ditto.
3377 (WebKit::NetworkSessionCocoa::defaultSession): Ditto.
3378 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): Ditto.
3380 2017-06-19 Ryan Haddad <ryanhaddad@apple.com>
3382 Unreviewed, rolling out r218503.
3384 This change broke the macOS Sierra build.
3388 "Removed unused lambda captures from WebKit2"
3389 https://bugs.webkit.org/show_bug.cgi?id=173555
3390 http://trac.webkit.org/changeset/218503
3392 2017-06-19 Wenson Hsieh <wenson_hsieh@apple.com>
3394 [iOS DnD] [WK2] Add an internal hook to change the drag lift delay
3395 https://bugs.webkit.org/show_bug.cgi?id=173523
3396 <rdar://problem/32224510>
3398 Reviewed by Tim Horton.
3400 Add a new private property on WKWebViewConfiguration, _dragLiftDelay, for changing the UIDragInteraction's lift
3401 delay to one of three values: short, medium or long. The short setting simply uses UIKit's default drag lift
3402 delay (at the time of writing, this is 325ms); medium and long are 500ms and 650ms, respectively.
3404 In combination with an internal switch to toggle between lift delays, the purpose of this change is to make it
3405 easier to choose a drag lift delay for web content that doesn't easily cause unintended dragging while panning.
3407 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3410 Converts an integer (e.g. retrieved from user defaults) to a drag lift delay type.
3412 (-[WKWebViewConfiguration init]):
3413 (-[WKWebViewConfiguration encodeWithCoder:]):
3414 (-[WKWebViewConfiguration initWithCoder:]):
3415 (-[WKWebViewConfiguration copyWithZone:]):
3416 (-[WKWebViewConfiguration _dragLiftDelay]):
3418 Add boilerplate plumbing for the _dragLiftDelay setting.
3420 (-[WKWebViewConfiguration _setDragLiftDelay:]):
3421 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3423 Add _dragLiftDelay to as a private property of WKWebViewConiguration.
3425 * UIProcess/ios/WKContentViewInteraction.mm:
3426 (-[WKContentView dragLiftDelay]):
3428 Convert the web view configuration's _WKDragLiftDelay to an actual time interval.
3430 (-[WKContentView setupDataInteractionDelegates]):
3432 2017-06-19 Konstantin Tokarev <annulen@yandex.ru>
3434 Removed unused lambda captures from WebKit2
3435 https://bugs.webkit.org/show_bug.cgi?id=173555
3437 Reviewed by Alex Christensen.
3439 * UIProcess/Network/NetworkProcessProxy.cpp:
3440 (WebKit::NetworkProcessProxy::fetchWebsiteData):
3441 (WebKit::NetworkProcessProxy::deleteWebsiteData):
3442 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
3443 * UIProcess/WebProcessProxy.cpp:
3444 (WebKit::WebProcessProxy::fetchWebsiteData):
3445 (WebKit::WebProcessProxy::deleteWebsiteData):
3446 (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
3447 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3448 (WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):
3450 2017-06-19 Chris Dumez <cdumez@apple.com>
3452 Use WTF::Function instead of std::function in more places in WebCore/
3453 https://bugs.webkit.org/show_bug.cgi?id=173535
3455 Reviewed by Antti Koivisto.
3457 Use WTF::Function instead of std::function in more places in WebCore/ to avoid copying.
3459 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3460 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
3461 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
3462 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3463 (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
3464 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3465 * WebProcess/WebPage/WebFrame.cpp:
3466 (WebKit::WebFrame::setUpPolicyListener):
3467 (WebKit::WebFrame::invalidatePolicyListener):
3468 * WebProcess/WebPage/WebFrame.h:
3470 2017-06-19 Chris Dumez <cdumez@apple.com>
3472 [WK2] Add WKProcessPool SPI to efficiently reset all plugin load client policies
3473 https://bugs.webkit.org/show_bug.cgi?id=173472
3474 <rdar://problem/28858817>
3476 Reviewed by Antti Koivisto.
3478 Follow-up to r218419 to avoid copying the HashMap unnecessarily.
3480 * UIProcess/WebProcessPool.cpp:
3481 (WebKit::WebProcessPool::resetPluginLoadClientPolicies):
3482 * UIProcess/WebProcessPool.h:
3484 2017-06-19 Youenn Fablet <youenn@apple.com>
3486 A cloned MediaStreamTrack should mute independently other tracks using the same source
3487 https://bugs.webkit.org/show_bug.cgi?id=172831
3488 <rdar://problem/32518527>
3490 Reviewed by Eric Carlson.
3492 * WebProcess/cocoa/UserMediaCaptureManager.cpp:
3493 (WebKit::UserMediaCaptureManager::Source::setStorage):
3495 2017-06-19 Carlos Garcia Campos <cgarcia@igalia.com>
3497 [GTK] Move GTK+ API files that could be shared to glib dirs
3498 https://bugs.webkit.org/show_bug.cgi?id=173545
3500 Reviewed by Žan Doberšek.
3502 Most of the files don't use GTK+ at all, or only for a few things that could be ifdefed. Public headers can
3503 never be shared, so move only private headers and cpp files. This patch moves the files without any
3504 modification to make everything easier, in follow up commits we will add the required ifdefs and refactorings to
3505 ensure the code can actually be shared.
3507 * PlatformGTK.cmake:
3508 * Shared/API/glib/WebKitContextMenu.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenu.cpp.
3509 * Shared/API/glib/WebKitContextMenuActions.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuActions.cpp.
3510 * Shared/API/glib/WebKitContextMenuActionsPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h.
3511 * Shared/API/glib/WebKitContextMenuItem.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp.
3512 * Shared/API/glib/WebKitContextMenuItemPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItemPrivate.h.
3513 * Shared/API/glib/WebKitContextMenuPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuPrivate.h.
3514 * Shared/API/glib/WebKitHitTestResult.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp.
3515 * Shared/API/glib/WebKitHitTestResultPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResultPrivate.h.
3516 * Shared/API/glib/WebKitURIRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURIRequest.cpp.
3517 * Shared/API/glib/WebKitURIRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURIRequestPrivate.h.
3518 * Shared/API/glib/WebKitURIResponse.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp.
3519 * Shared/API/glib/WebKitURIResponsePrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURIResponsePrivate.h.
3520 * UIProcess/API/glib/WebKitAuthenticationRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationRequest.cpp.
3521 * UIProcess/API/glib/WebKitAuthenticationRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationRequestPrivate.h.
3522 * UIProcess/API/glib/WebKitAutomationSession.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitAutomationSession.cpp.
3523 * UIProcess/API/glib/WebKitAutomationSessionPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitAutomationSessionPrivate.h.
3524 * UIProcess/API/glib/WebKitBackForwardList.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.cpp.
3525 * UIProcess/API/glib/WebKitBackForwardListItem.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListItem.cpp.
3526 * UIProcess/API/glib/WebKitBackForwardListPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListPrivate.h.
3527 * UIProcess/API/glib/WebKitContextMenuClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuClient.cpp.
3528 * UIProcess/API/glib/WebKitContextMenuClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuClient.h.
3529 * UIProcess/API/glib/WebKitCookieManager.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.cpp.
3530 * UIProcess/API/glib/WebKitCookieManagerPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCookieManagerPrivate.h.
3531 * UIProcess/API/glib/WebKitCredential.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCredential.cpp.
3532 * UIProcess/API/glib/WebKitCredentialPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCredentialPrivate.h.
3533 * UIProcess/API/glib/WebKitCustomProtocolManagerClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp.
3534 * UIProcess/API/glib/WebKitCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h.
3535 * UIProcess/API/glib/WebKitDownload.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp.
3536 * UIProcess/API/glib/WebKitDownloadClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitDownloadClient.cpp.
3537 * UIProcess/API/glib/WebKitDownloadClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitDownloadClient.h.
3538 * UIProcess/API/glib/WebKitDownloadPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitDownloadPrivate.h.
3539 * UIProcess/API/glib/WebKitEditorState.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitEditorState.cpp.
3540 * UIProcess/API/glib/WebKitEditorStatePrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitEditorStatePrivate.h.
3541 * UIProcess/API/glib/WebKitError.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitError.cpp.
3542 * UIProcess/API/glib/WebKitFaviconDatabase.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.cpp.
3543 * UIProcess/API/glib/WebKitFaviconDatabasePrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h.
3544 * UIProcess/API/glib/WebKitFileChooserRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFileChooserRequest.cpp.
3545 * UIProcess/API/glib/WebKitFileChooserRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h.
3546 * UIProcess/API/glib/WebKitFindController.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp.
3547 * UIProcess/API/glib/WebKitFormClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFormClient.cpp.
3548 * UIProcess/API/glib/WebKitFormClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFormClient.h.
3549 * UIProcess/API/glib/WebKitFormSubmissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp.
3550 * UIProcess/API/glib/WebKitFormSubmissionRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h.
3551 * UIProcess/API/glib/WebKitGeolocationPermissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp.
3552 * UIProcess/API/glib/WebKitGeolocationPermissionRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h.
3553 * UIProcess/API/glib/WebKitGeolocationProvider.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.cpp.
3554 * UIProcess/API/glib/WebKitGeolocationProvider.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.h.
3555 * UIProcess/API/glib/WebKitInjectedBundleClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitInjectedBundleClient.cpp.
3556 * UIProcess/API/glib/WebKitInjectedBundleClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitInjectedBundleClient.h.
3557 * UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp.
3558 * UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h.
3559 * UIProcess/API/glib/WebKitJavascriptResult.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitJavascriptResult.cpp.
3560 * UIProcess/API/glib/WebKitJavascriptResultPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitJavascriptResultPrivate.h.
3561 * UIProcess/API/glib/WebKitLoaderClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp.
3562 * UIProcess/API/glib/WebKitLoaderClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.h.
3563 * UIProcess/API/glib/WebKitMimeInfo.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitMimeInfo.cpp.
3564 * UIProcess/API/glib/WebKitMimeInfoPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitMimeInfoPrivate.h.
3565 * UIProcess/API/glib/WebKitNavigationAction.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNavigationAction.cpp.
3566 * UIProcess/API/glib/WebKitNavigationActionPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNavigationActionPrivate.h.
3567 * UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp.
3568 * UIProcess/API/glib/WebKitNavigationPolicyDecisionPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h.
3569 * UIProcess/API/glib/WebKitNetworkProxySettings.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNetworkProxySettings.cpp.
3570 * UIProcess/API/glib/WebKitNetworkProxySettingsPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNetworkProxySettingsPrivate.h.
3571 * UIProcess/API/glib/WebKitNotification.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotification.cpp.
3572 * UIProcess/API/glib/WebKitNotificationPermissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotificationPermissionRequest.cpp.
3573 * UIProcess/API/glib/WebKitNotificationPermissionRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotificationPermissionRequestPrivate.h.
3574 * UIProcess/API/glib/WebKitNotificationPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotificationPrivate.h.
3575 * UIProcess/API/glib/WebKitNotificationProvider.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotificationProvider.cpp.
3576 * UIProcess/API/glib/WebKitNotificationProvider.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotificationProvider.h.
3577 * UIProcess/API/glib/WebKitPermissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPermissionRequest.cpp.
3578 * UIProcess/API/glib/WebKitPlugin.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPlugin.cpp.
3579 * UIProcess/API/glib/WebKitPluginPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPluginPrivate.h.
3580 * UIProcess/API/glib/WebKitPolicyClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPolicyClient.cpp.
3581 * UIProcess/API/glib/WebKitPolicyClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPolicyClient.h.
3582 * UIProcess/API/glib/WebKitPolicyDecision.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPolicyDecision.cpp.
3583 * UIProcess/API/glib/WebKitPolicyDecisionPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h.
3584 * UIProcess/API/glib/WebKitPrivate.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.cpp.
3585 * UIProcess/API/glib/WebKitPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h.
3586 * UIProcess/API/glib/WebKitResponsePolicyDecision.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp.
3587 * UIProcess/API/glib/WebKitResponsePolicyDecisionPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h.
3588 * UIProcess/API/glib/WebKitScriptDialog.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitScriptDialog.cpp.
3589 * UIProcess/API/glib/WebKitScriptDialogPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitScriptDialogPrivate.h.
3590 * UIProcess/API/glib/WebKitSecurityManager.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSecurityManager.cpp.
3591 * UIProcess/API/glib/WebKitSecurityManagerPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSecurityManagerPrivate.h.
3592 * UIProcess/API/glib/WebKitSecurityOrigin.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSecurityOrigin.cpp.
3593 * UIProcess/API/glib/WebKitSecurityOriginPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSecurityOriginPrivate.h.
3594 * UIProcess/API/glib/WebKitSettings.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp.
3595 * UIProcess/API/glib/WebKitSettingsPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSettingsPrivate.h.
3596 * UIProcess/API/glib/WebKitUIClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp.
3597 * UIProcess/API/glib/WebKitUIClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.h.
3598 * UIProcess/API/glib/WebKitURISchemeRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp.
3599 * UIProcess/API/glib/WebKitURISchemeRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h.
3600 * UIProcess/API/glib/WebKitUserContent.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserContent.cpp.
3601 * UIProcess/API/glib/WebKitUserContentManager.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserContentManager.cpp.
3602 * UIProcess/API/glib/WebKitUserContentManagerPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserContentManagerPrivate.h.
3603 * UIProcess/API/glib/WebKitUserContentPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserContentPrivate.h.
3604 * UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp.
3605 * UIProcess/API/glib/WebKitUserMediaPermissionRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h.
3606 * UIProcess/API/glib/WebKitWebContext.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp.
3607 * UIProcess/API/glib/WebKitWebContextPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h.
3608 * UIProcess/API/glib/WebKitWebResource.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebResource.cpp.
3609 * UIProcess/API/glib/WebKitWebResourcePrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebResourcePrivate.h.
3610 * UIProcess/API/glib/WebKitWebView.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp.
3611 * UIProcess/API/glib/WebKitWebViewPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h.
3612 * UIProcess/API/glib/WebKitWebViewSessionState.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewSessionState.cpp.
3613 * UIProcess/API/glib/WebKitWebViewSessionStatePrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewSessionStatePrivate.h.
3614 * UIProcess/API/glib/WebKitWebsiteData.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebsiteData.cpp.
3615 * UIProcess/API/glib/WebKitWebsiteDataManager.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebsiteDataManager.cpp.
3616 * UIProcess/API/glib/WebKitWebsiteDataManagerPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h.
3617 * UIProcess/API/glib/WebKitWebsiteDataPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebsiteDataPrivate.h.
3618 * UIProcess/API/glib/WebKitWindowProperties.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWindowProperties.cpp.
3619 * UIProcess/API/glib/WebKitWindowPropertiesPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h.
3620 * WebProcess/InjectedBundle/API/glib/WebKitConsoleMessage.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.cpp.
3621 * WebProcess/InjectedBundle/API/glib/WebKitConsoleMessagePrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessagePrivate.h.
3622 * WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp.
3623 * WebProcess/InjectedBundle/API/glib/WebKitFramePrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitFramePrivate.h.
3624 * WebProcess/InjectedBundle/API/glib/WebKitScriptWorld.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp.
3625 * WebProcess/InjectedBundle/API/glib/WebKitScriptWorldPrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h.
3626 * WebProcess/InjectedBundle/API/glib/WebKitWebEditor.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp.
3627 * WebProcess/InjectedBundle/API/glib/WebKitWebEditorPrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebEditorPrivate.h.
3628 * WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp.
3629 * WebProcess/InjectedBundle/API/glib/WebKitWebExtensionPrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionPrivate.h.
3630 * WebProcess/InjectedBundle/API/glib/WebKitWebHitTestResult.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp.
3631 * WebProcess/InjectedBundle/API/glib/WebKitWebHitTestResultPrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResultPrivate.h.
3632 * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp.
3633 * WebProcess/InjectedBundle/API/glib/WebKitWebPagePrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h.
3635 2017-05-14 Frederic Wang <fwang@igalia.com>
3637 Add heuristic to avoid flattening "fullscreen" iframes
3638 https://bugs.webkit.org/show_bug.cgi?id=171914
3640 Reviewed by Simon Fraser.
3642 This commit ajusts the preference API to internally treat frame flattening as an enum.
3643 However, the "partial frame flattening" value is not exposed to GTK, C or InjectedBundle APIs yet.
3645 * Shared/WebPreferencesDefinitions.h: Define frame flattening as an enum.
3646 * UIProcess/API/C/WKPreferences.cpp:
3647 (WKPreferencesSetFrameFlatteningEnabled): Treat frame flattening as an enum.
3648 (WKPreferencesGetFrameFlatteningEnabled): Ditto.
3649 * UIProcess/API/gtk/WebKitSettings.cpp:
3650 (webkit_settings_get_enable_frame_flattening): Ditto.
3651 (webkit_settings_set_enable_frame_flattening): Ditto.
3652 * WebProcess/InjectedBundle/InjectedBundle.cpp:
3653 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Do not handle frame flattening since it is an enum.
3654 For now, this breaks one test checking preference overriding because of bug 128594.
3655 (WebKit::InjectedBundle::setFrameFlatteningEnabled): Treat frame flattening as an enum.
3656 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3657 (WebKit::WebChromeClient::contentsSizeChanged): Use enum value.
3658 * WebProcess/WebPage/WebPage.cpp:
3659 (WebKit::WebPage::updatePreferences): Ditto.
3661 2017-06-18 Carlos Garcia Campos <cgarcia@igalia.com>
3663 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.17.4 release.
3665 * gtk/NEWS: Add release notes for 2.17.4.
3667 2017-06-18 Chris Dumez <cdumez@apple.com>
3669 Drop redundant IPC in WebPage::tryClose()
3670 https://bugs.webkit.org/show_bug.cgi?id=173533
3672 Reviewed by Sam Weinig.
3674 Drop redundant IPC to stop the responsiveness timer in WebPage::tryClose(). The
3675 destructor for the SendStopResponsivenessTimer already takes care of sending the
3678 * WebProcess/WebPage/WebPage.cpp:
3679 (WebKit::WebPage::tryClose):
3681 2017-06-18 Chris Dumez <cdumez@apple.com>
3683 Drop unused UserMediaPermissionRequestManager::cancelPendingRequests()
3684 https://bugs.webkit.org/show_bug.cgi?id=173529
3685 <rdar://problem/32836986>
3687 Reviewed by Sam Weinig.
3689 Drop UserMediaPermissionRequestManager::cancelPendingRequests() as it is unused
3690 and its implementation is wrong (modifies the hash maps it is iterating on).
3692 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
3693 (WebKit::UserMediaPermissionRequestManager::cancelPendingRequests): Deleted.
3694 * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
3696 2017-06-17 Chris Dumez <cdumez@apple.com>
3698 Unreviewed, follow-up build fix after r218457.
3700 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
3701 (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
3703 2017-06-17 Chris Dumez <cdumez@apple.com>
3705 Unreviewed, follow-up build fix after r218457.
3707 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
3708 (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
3710 2017-06-17 Chris Dumez <cdumez@apple.com>
3712 Use WTF::Function instead of std::function in WebKit2/
3713 https://bugs.webkit.org/show_bug.cgi?id=173504
3715 Reviewed by Darin Adler.
3717 Use WTF::Function instead of std::function in WebKit2/ to avoid
3718 unnecessary copying.
3720 * DatabaseProcess/DatabaseProcess.cpp:
3721 (WebKit::DatabaseProcess::getSandboxExtensionsForBlobFiles):
3722 * DatabaseProcess/DatabaseProcess.h:
3723 * NetworkProcess/cache/NetworkCacheData.h:
3724 * NetworkProcess/cache/NetworkCacheFileSystem.h:
3725 * Platform/IPC/Connection.cpp:
3726 (IPC::Connection::installIncomingSyncMessageCallback):
3727 * Platform/IPC/Connection.h:
3728 * Platform/IPC/glib/GSocketMonitor.h:
3729 * Platform/Logging.h:
3730 * Shared/API/APIObject.h:
3731 * Shared/AsyncRequest.cpp:
3732 (WebKit::AsyncRequest::AsyncRequest):
3733 (WebKit::AsyncRequest::setAbortHandler):
3734 * Shared/AsyncRequest.h:
3735 * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
3736 (WebKit::CompositingRunLoop::CompositingRunLoop):
3737 * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
3738 * Shared/WebContextMenuItemData.h:
3739 * UIProcess/API/APIDownloadClient.h:
3740 (API::DownloadClient::willSendRequest):
3741 * UIProcess/API/APIIconLoadingClient.h:
3742 (API::IconLoadingClient::getLoadDecisionForIcon):
3743 * UIProcess/API/APIUIClient.h:
3744 (API::UIClient::createNewPageAsync):
3745 * UIProcess/API/C/WKPage.cpp:
3746 (toGenericCallbackFunction):
3747 * UIProcess/API/Cocoa/WKWebView.mm:
3748 * UIProcess/API/mac/WKView.mm:
3749 (-[WKView maybeInstallIconLoadingClient]):
3750 * UIProcess/AcceleratedDrawingAreaProxy.cpp:
3751 (WebKit::AcceleratedDrawingAreaProxy::dispatchAfterEnsuringDrawing):
3752 * UIProcess/AcceleratedDrawingAreaProxy.h:
3753 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
3754 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
3755 (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
3756 (WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):
3757 * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
3758 (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
3759 * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
3760 (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
3761 * UIProcess/Automation/WebAutomationSession.cpp:
3762 (WebKit::WebAutomationSession::performKeyboardInteractions):
3763 * UIProcess/Cocoa/IconLoadingDelegate.h:
3764 * UIProcess/Cocoa/IconLoadingDelegate.mm:
3765 (WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):
3766 * UIProcess/Cocoa/NavigationState.mm:
3767 (WebKit::tryAppLink):
3768 * UIProcess/Cocoa/UIDelegate.h:
3769 * UIProcess/Cocoa/UIDelegate.mm:
3770 (WebKit::UIDelegate::UIClient::createNewPageCommon):
3771 (WebKit::UIDelegate::UIClient::createNewPageAsync):
3772 * UIProcess/Cocoa/ViewGestureController.cpp:
3773 (WebKit::ViewGestureController::SnapshotRemovalTracker::start):
3774 * UIProcess/Cocoa/ViewGestureController.h:
3775 * UIProcess/Cocoa/WebViewImpl.h:
3776 * UIProcess/Cocoa/WebViewImpl.mm:
3777 (WebKit::WebViewImpl::prepareForMoveToWindow):
3778 * UIProcess/Databases/DatabaseProcessProxy.cpp:
3779 (WebKit::DatabaseProcessProxy::fetchWebsiteData):
3780 (WebKit::DatabaseProcessProxy::deleteWebsiteData):
3781 (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
3782 * UIProcess/Databases/DatabaseProcessProxy.h:
3783 * UIProcess/DrawingAreaProxy.h:
3784 (WebKit::DrawingAreaProxy::dispatchAfterEnsuringDrawing):
3785 * UIProcess/DrawingAreaProxyImpl.cpp:
3786 (WebKit::DrawingAreaProxyImpl::DrawingMonitor::start):
3787 (WebKit::DrawingAreaProxyImpl::dispatchAfterEnsuringDrawing):
3788 * UIProcess/DrawingAreaProxyImpl.h:
3789 * UIProcess/GenericCallback.h:
3790 * UIProcess/Network/NetworkProcessProxy.cpp:
3791 (WebKit::NetworkProcessProxy::fetchWebsiteData):
3792 (WebKit::NetworkProcessProxy::deleteWebsiteData):
3793 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
3794 * UIProcess/Network/NetworkProcessProxy.h:
3795 * UIProcess/PageClient.h:
3796 * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
3797 (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
3798 * UIProcess/Plugins/PlugInAutoStartProvider.h:
3799 * UIProcess/Plugins/PluginProcessManager.cpp:
3800 (WebKit::PluginProcessManager::fetchWebsiteData):
3801 (WebKit::PluginProcessManager::deleteWebsiteData):
3802 (WebKit::PluginProcessManager::deleteWebsiteDataForHostNames):
3803 * UIProcess/Plugins/PluginProcessManager.h:
3804 * UIProcess/Plugins/PluginProcessProxy.cpp:
3805 (WebKit::PluginProcessProxy::fetchWebsiteData):
3806 (WebKit::PluginProcessProxy::deleteWebsiteData):
3807 (WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):
3808 * UIProcess/Plugins/PluginProcessProxy.h:
3809 * UIProcess/ProcessAssertion.h:
3810 * UIProcess/WebBackForwardList.cpp:
3811 (WebKit::WebBackForwardList::backForwardListState):
3812 * UIProcess/WebBackForwardList.h:
3813 * UIProcess/WebCookieManagerProxy.cpp:
3814 (WebKit::WebCookieManagerProxy::setCookieObserverCallback):
3815 (WebKit::WebCookieManagerProxy::cookiesDidChange):
3816 * UIProcess/WebCookieManagerProxy.h:
3817 * UIProcess/WebPageProxy.cpp:
3818 (WebKit::WebPageProxy::setInitialFocus):
3819 (WebKit::WebPageProxy::validateCommand):
3820 (WebKit::WebPageProxy::sessionState):
3821 (WebKit::WebPageProxy::runJavaScriptInMainFrame):
3822 (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
3823 (WebKit::WebPageProxy::getSourceForFrame):
3824 (WebKit::WebPageProxy::getContentsAsString):
3825 (WebKit::WebPageProxy::getBytecodeProfile):
3826 (WebKit::WebPageProxy::getSamplingProfilerOutput):
3827 (WebKit::WebPageProxy::isWebProcessResponsive):
3828 (WebKit::WebPageProxy::getSelectionOrContentsAsString):
3829 (WebKit::WebPageProxy::createNewPage):
3830 (WebKit::WebPageProxy::getMarkedRangeAsync):
3831 (WebKit::WebPageProxy::getSelectedRangeAsync):
3832 (WebKit::WebPageProxy::characterIndexForPointAsync):
3833 (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
3834 (WebKit::WebPageProxy::takeSnapshot):
3835 (WebKit::WebPageProxy::installActivityStateChangeCompletionHandler):
3836 (WebKit::WebPageProxy::callAfterNextPresentationUpdate):
3837 (WebKit::WebPageProxy::getLoadDecisionForIcon):
3838 * UIProcess/WebPageProxy.h:
3839 * UIProcess/WebProcessProxy.cpp:
3840 (WebKit::WebProcessProxy::isResponsive):
3841 * UIProcess/WebProcessProxy.h:
3842 * UIProcess/WebsiteData/WebsiteDataStore.h:
3843 * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
3844 (WebKit::XDamageNotifier::add):
3845 * UIProcess/ios/PageClientImplIOS.h:
3846 * UIProcess/ios/PageClientImplIOS.mm:
3847 (WebKit::PageClientImpl::requestPasswordForQuickLookDocument):
3848 * UIProcess/ios/WebPageProxyIOS.mm:
3849 (WebKit::WebPageProxy::selectWithGesture):
3850 (WebKit::WebPageProxy::updateSelectionWithTouches):
3851 (WebKit::WebPageProxy::requestAutocorrectionData):
3852 (WebKit::WebPageProxy::applyAutocorrection):
3853 (WebKit::WebPageProxy::executeEditCommand):
3854 (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
3855 (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
3856 (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
3857 (WebKit::WebPageProxy::selectPositionAtPoint):
3858 (WebKit::WebPageProxy::beginSelectionInDirection):
3859 (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
3860 (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
3861 (WebKit::WebPageProxy::requestDictationContext):
3862 (WebKit::WebPageProxy::requestAutocorrectionContext):
3863 (WebKit::WebPageProxy::getSelectionContext):
3864 (WebKit::WebPageProxy::selectWithTwoTouches):
3865 (WebKit::WebPageProxy::requestRectsForGranularityWithSelectionOffset):
3866 (WebKit::WebPageProxy::requestRectsAtSelectionOffsetWithText):
3867 (WebKit::WebPageProxy::moveSelectionByOffset):
3868 (WebKit::WebPageProxy::focusNextAssistedNode):
3869 (WebKit::WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrame):
3870 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3871 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3872 (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
3873 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
3874 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
3875 (WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
3876 * UIProcess/mac/WKTextFinderClient.mm:
3877 * UIProcess/mac/WebContextMenuProxyMac.mm:
3878 (-[WKSelectionHandlerWrapper initWithSelectionHandler:]):
3879 * UIProcess/mac/WebPageProxyMac.mm:
3880 (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
3881 (WebKit::WebPageProxy::fontAtSelection):
3882 * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
3883 (WebKit::WebPaymentCoordinator::canMakePaymentsWithActiveCard):
3884 (WebKit::WebPaymentCoordinator::openPaymentSetup):
3885 * WebProcess/ApplePay/WebPaymentCoordinator.h:
3886 * WebProcess/Plugins/PluginView.cpp:
3887 (WebKit::PluginView::Stream::willSendRequest):
3888 * WebProcess/WebPage/DrawingArea.cpp:
3889 (WebKit::DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
3890 * WebProcess/WebPage/DrawingArea.h:
3891 * WebProcess/WebPage/WebPage.cpp:
3892 (WebKit::WebPage::markLayersVolatile):
3893 * WebProcess/WebPage/WebPage.h:
3894 (WebKit::WebPage::markLayersVolatile):
3895 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3896 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3897 (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
3898 * WebProcess/WebProcess.cpp:
3899 (WebKit::WebProcess::markAllLayersVolatile):
3900 * WebProcess/WebProcess.h:
3902 2017-06-17 Alex Christensen <achristensen@webkit.org>
3907 * NetworkProcess/capture/NetworkCaptureEvent.cpp:
3908 * PlatformGTK.cmake:
3909 * PlatformWPE.cmake:
3911 2017-06-17 Dan Bernstein <mitz@apple.com>