1 2017-02-20 Youenn Fablet <youenn@apple.com>
3 [WebRTC][Mac] Activate libwebrtc
4 https://bugs.webkit.org/show_bug.cgi?id=167293
5 <rdar://problem/30401864>
7 Reviewed by Alex Christensen.
9 Activating PeerConnection runtime flag based on successful loading of libwebrtc.dylib.
11 * Configurations/WebKit.xcconfig:
12 * Shared/WebPreferencesDefinitions.h:
13 * UIProcess/WebPreferences.cpp:
14 (WebKit::checkWebRTCAvailability):
16 2017-02-20 Ryan Haddad <ryanhaddad@apple.com>
18 Unreviewed, rolling out r212685.
20 This change broke the 32-bit Sierra build.
24 "Resource Load Statistics: Add alternate classification
26 https://bugs.webkit.org/show_bug.cgi?id=168347
27 http://trac.webkit.org/changeset/212685
29 2017-02-20 John Wilander <wilander@apple.com>
31 Resource Load Statistics: Add alternate classification method
32 https://bugs.webkit.org/show_bug.cgi?id=168347
33 <rdar://problem/30352793>
35 Reviewed by Alex Christensen.
37 This patch adds a CorePrediction-based classifier to the WebResourceLoadStatisticsStore.
38 The CorePrediction framework is introduced as a dependency for macOS and iOS. The patch
39 also adds functions to support layout tests of the feature.
41 * Configurations/BaseTarget.xcconfig:
42 * Configurations/WebKit.xcconfig:
43 Added dependency on CorePrediction.
44 * Platform/classifier: Added.
45 * Platform/classifier/ResourceLoadStatisticsClassifier.h: Added.
46 Pulls in the Cocoa-specific classifier for Cocoa-based platforms.
47 (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
48 * Platform/classifier/ResourceLoadStatisticsClassifierBase.cpp: Added.
49 (WebKit::ResourceLoadStatisticsClassifierBase::hasPrevalentResourceCharacteristics):
50 Shared classifier logic.
51 (WebKit::ResourceLoadStatisticsClassifierBase::classifyWithVectorThreshold):
52 Fallback classifier for when we don't have CorePrediction.
53 * Platform/classifier/ResourceLoadStatisticsClassifierBase.h: Added.
54 (WebKit::ResourceLoadStatisticsClassifierBase::ResourceLoadStatisticsClassifierBase):
55 (WebKit::ResourceLoadStatisticsClassifierBase::~ResourceLoadStatisticsClassifierBase):
56 * Platform/classifier/cocoa: Added.
57 * Platform/classifier/cocoa/CorePredictionSPI.h: Added.
58 Includes CorePrediction if available, otherwise declares needed symbols.
59 Always redeclares the functions so we'll get a build error if
60 CorePrediction changes.
61 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: Added.
62 (WebKit::ResourceLoadStatisticsClassifier::classify):
63 (WebKit::ResourceLoadStatisticsClassifier::storagePath):
64 (WebKit::ResourceLoadStatisticsClassifier::shouldUseCorePrediction):
65 The new classifier for Cocoa platforms.
66 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h: Added.
67 (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
69 Added Platform/classifier directory and ResourceLoadStatisticsClassifierBase.cpp.
71 Added Platform/classifier and Platform/classifier/cocoa directories, and
72 source files ResourceLoadStatisticsClassifierBase.cpp and
73 ResourceLoadStatisticsClassifierCocoa.cpp
74 * Resources/ResourceLoadStatistics: Added.
75 * Resources/ResourceLoadStatistics/corePrediction_model: Added.
76 Model file to load into CorePrediction.
77 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
78 (WKResourceLoadStatisticsManagerSetSubframeUnderTopFrameOrigin):
79 (WKResourceLoadStatisticsManagerSetSubresourceUnderTopFrameOrigin):
80 (WKResourceLoadStatisticsManagerSetSubresourceUniqueRedirectTo):
82 * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
83 * UIProcess/WebResourceLoadStatisticsManager.cpp:
84 (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
85 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
86 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
88 * UIProcess/WebResourceLoadStatisticsManager.h:
89 * UIProcess/WebResourceLoadStatisticsStore.cpp:
90 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
91 Renamed m_storagePath to m_statisticsStoragePath for clarity.
92 (WebKit::WebResourceLoadStatisticsStore::classifyResource):
93 Now calls the classifier through its ResourceLoadStatisticsClassifier
95 (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
96 Renamed m_storagePath to m_statisticsStoragePath for clarity.
97 (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
98 Renamed m_storagePath to m_statisticsStoragePath for clarity.
99 (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics): Deleted.
100 * UIProcess/WebResourceLoadStatisticsStore.h:
101 * WebKit2.xcodeproj/project.pbxproj:
102 Added the new classifier source files under Platform/classifier and the
103 corePrediction_model file under Resources/ResourceLoadStatistics.
105 2017-02-20 Wenson Hsieh <wenson_hsieh@apple.com>
107 Add plumbing to the UI process for TextIndicatorData when computing the drag image
108 https://bugs.webkit.org/show_bug.cgi?id=168583
109 Work towards <rdar://problem/30313681>
111 Reviewed by Tim Horton.
113 Changes the SetDragImage IPC message to send TextIndicatorData over to the UI process. Also changes the boolean
114 isLink parameter to be a DragSourceAction instead, leaving it up to the receiving end (in the UI process) to
117 Additionally, renames hasDataInteractionAtPosition to hasSelectionAtPosition to better reflect its purpose.
119 These changes are only infrastructural should not alter any behaviors.
121 * Shared/ios/InteractionInformationAtPosition.h:
122 * Shared/ios/InteractionInformationAtPosition.mm:
123 (WebKit::InteractionInformationAtPosition::encode):
124 (WebKit::InteractionInformationAtPosition::decode):
125 * UIProcess/API/Cocoa/WKWebView.mm:
126 (-[WKWebView _simulateDataInteractionGestureRecognized]):
127 (-[WKWebView _simulateDataInteractionEntered:]):
128 (-[WKWebView _simulateDataInteractionUpdated:]):
129 (-[WKWebView _simulateDataInteractionPerformOperation:]):
130 (-[WKWebView _simulateDataInteractionEnded:]):
131 (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]):
132 (-[WKWebView _simulateFailedDataInteractionWithIndex:]):
133 (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]):
134 (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]):
135 * UIProcess/API/Cocoa/_WKTestingDelegate.h:
136 * UIProcess/PageClient.h:
137 * UIProcess/WebPageProxy.h:
138 * UIProcess/WebPageProxy.messages.in:
139 * UIProcess/ios/PageClientImplIOS.h:
140 * UIProcess/ios/PageClientImplIOS.mm:
141 (WebKit::PageClientImpl::setDragImage):
142 (WebKit::PageClientImpl::startDataInteractionWithImage):
143 * UIProcess/ios/WKContentViewInteraction.h:
144 * UIProcess/ios/WKContentViewInteraction.mm:
145 (-[WKContentView hasSelectablePositionAtPoint:]):
146 (-[WKContentView pointIsInDataInteractionContent:]):
147 (-[WKContentView _dataInteractionGestureRecognizer]):
148 (-[WKContentView pointIsInAssistedNode:]):
149 * UIProcess/mac/PageClientImpl.h:
150 * UIProcess/mac/PageClientImpl.mm:
151 (WebKit::PageClientImpl::setDragImage):
152 * UIProcess/mac/WebPageProxyMac.mm:
153 (WebKit::WebPageProxy::setDragImage):
154 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
155 (WebKit::WebDragClient::startDrag):
156 * WebProcess/WebPage/ios/WebPageIOS.mm:
157 (WebKit::WebPage::getPositionInformation):
159 2017-02-20 David Quesada <david_quesada@apple.com>
161 Don’t set NSURLSessionConfiguration’s _sourceApplicationAuditTokenData if _sourceApplicationBundleIdentifier is also set.
162 https://bugs.webkit.org/show_bug.cgi?id=168607
164 rdar://problem/30239618
166 Reviewed by Geoffrey Garen.
168 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
169 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
170 If the process pool configuration sets a source application bundle identifier, don't give the NSURLSession configuration
171 the audit token from the UI process, as it may be associated with an application with a conflicting bundle identifier.
173 2017-02-20 Ryan Haddad <ryanhaddad@apple.com>
175 Unreviewed, rolling out r212632.
177 This change appears to have caused API test failures.
181 "Reduce platform ifdefs in WebKit2 custom protocols
183 https://bugs.webkit.org/show_bug.cgi?id=165028
184 http://trac.webkit.org/changeset/212632
186 2017-02-20 Youenn Fablet <youenn@apple.com>
188 [WebRTC] Fix some memory leaks in libwebrtc binding code
189 https://bugs.webkit.org/show_bug.cgi?id=168596
191 Reviewed by Eric Carlson.
193 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
194 (WebKit::NetworkRTCProvider::OnMessage):
196 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
198 Remove code under USE(GRAPHICS_SURFACE)
199 https://bugs.webkit.org/show_bug.cgi?id=168592
201 Reviewed by Michael Catanzaro.
203 This was only used by EFL port.
205 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
206 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
207 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
208 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
209 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
210 (WebKit::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
211 (WebKit::CoordinatedGraphicsScene::deleteLayer):
212 (WebKit::CoordinatedGraphicsScene::assignImageBackingToLayer):
213 (WebKit::CoordinatedGraphicsScene::purgeGLResources):
214 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
215 * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
216 (WebKit::WebCoordinatedSurface::Handle::encode):
217 (WebKit::WebCoordinatedSurface::Handle::decode):
218 (WebKit::WebCoordinatedSurface::create):
219 (WebKit::WebCoordinatedSurface::createGraphicsContext):
220 (WebKit::WebCoordinatedSurface::createHandle):
221 (WebKit::WebCoordinatedSurface::copyToTexture):
222 * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
224 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
226 Reduce platform ifdefs in WebKit2 custom protocols implementation
227 https://bugs.webkit.org/show_bug.cgi?id=165028
229 Reviewed by Darin Adler.
231 Make mac implementation use the APICustomProtocolManagerClient to share more code with the soup based ports.
233 * CMakeLists.txt: Add CustomProtocolManagerProxy.cpp.
234 * PlatformEfl.cmake: Remove CustomProtocolManagerProxySoup.cpp.
235 * PlatformGTK.cmake: Ditto.
236 * PlatformMac.cmake: Remove CustomProtocolManagerProxyMac.mm.
237 * UIProcess/API/APICustomProtocolManagerClient.h:
238 (API::CustomProtocolManagerClient::startLoading): Make it void, since we were always returning true and the
239 returned value was ignored.
240 * UIProcess/API/efl/ewk_url_scheme_request.cpp:
241 (EwkUrlSchemeRequest::finish): Update to new CustomProtocolManagerProxy API.
242 * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
243 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
244 (webkitURISchemeRequestReadCallback): Ditto.
245 * UIProcess/Cocoa/CustomProtocolManagerClient.h: Added.
246 * UIProcess/Cocoa/CustomProtocolManagerClient.mm: Added.
247 (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:]):
248 (-[WKCustomProtocolLoader dealloc]):
249 (-[WKCustomProtocolLoader connection:didFailWithError:]):
250 (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
251 (-[WKCustomProtocolLoader connection:didReceiveData:]):
252 (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
253 (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
254 (WebKit::CustomProtocolManagerClient::startLoading):
255 (WebKit::CustomProtocolManagerClient::stopLoading):
256 (WebKit::CustomProtocolManagerClient::invalidate):
257 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
258 (WebKit::WebProcessPool::platformInitialize): Set the CustomProtocolManagerClient.
259 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
260 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Added.
261 (WebKit::CustomProtocolManagerProxy::startLoading):
262 (WebKit::CustomProtocolManagerProxy::processDidClose):
263 (WebKit::CustomProtocolManagerProxy::wasRedirectedToRequest):
264 (WebKit::CustomProtocolManagerProxy::didReceiveResponse):
265 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
266 * UIProcess/WebProcessPool.cpp:
267 (WebKit::globalURLSchemesWithCustomProtocolHandlers): Just moved here to use it from ensureNetworkProcess().
268 (WebKit::WebProcessPool::WebProcessPool): Remove soup ifdefs.
269 (WebKit::WebProcessPool::setCustomProtocolManagerClient): Moved from the soup implementation.
270 (WebKit::WebProcessPool::ensureNetworkProcess): Initialize custom protocols parameters.
271 (WebKit::WebProcessPool::registerSchemeForCustomProtocol): Register the protocol if not already registered globally.
272 (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): Remove soup ifdefs.
273 * UIProcess/WebProcessPool.h: Remove soup ifdefs.
274 * UIProcess/efl/RequestManagerClientEfl.cpp:
275 * UIProcess/soup/WebProcessPoolSoup.cpp:
276 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
277 * WebKit2.xcodeproj/project.pbxproj:
279 2017-02-20 Manuel Rego Casasnovas <rego@igalia.com>
281 [css-grid] Remove compilation flag ENABLE_CSS_GRID_LAYOUT
282 https://bugs.webkit.org/show_bug.cgi?id=167693
284 Reviewed by Sergio Villar Senin.
286 * Configurations/FeatureDefines.xcconfig:
287 * WebProcess/InjectedBundle/InjectedBundle.cpp:
288 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
289 * WebProcess/WebPage/WebPage.cpp:
290 (WebKit::WebPage::updatePreferences):
292 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
294 REGRESSION(r212345): [GTK] ASSERT(cookieChangeCallbackMap().contains(jar)) failed in WebCore::stopObservingCookieChanges:54
295 https://bugs.webkit.org/show_bug.cgi?id=168375
297 Reviewed by Alex Christensen.
299 Simplify the cookies change notification. The current approach of the UI process telling the network process
300 when to start and stop observing cookie changes is quite fragile and error prone. In the GTK+ port we always
301 observe cookies, so our cookie manager always calls start in the constructor and stop in the destructor.
302 Everything would be a lot simpler if the network process always monitored cookies.
304 * NetworkProcess/soup/NetworkSessionSoup.cpp:
305 (WebKit::NetworkSessionSoup::NetworkSessionSoup): Set cookies observer handler for the session.
306 (WebKit::NetworkSessionSoup::~NetworkSessionSoup): Remove the cookies observer handler.
307 * UIProcess/API/gtk/WebKitCookieManager.cpp:
308 (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate): Remove the cookies observer callback.
309 (webkit_cookie_manager_class_init): Remove dispose implementation that is no longer needed.
310 (webkitCookieManagerCreate): Set the cookies observer callback.
311 (webkit_cookie_manager_set_persistent_storage): Remove code to start/stop observing cookies when the jar
312 changes, the network process deals with that now.
313 (webkitCookieManagerDispose): Deleted.
314 * UIProcess/WebCookieManagerProxy.cpp:
315 (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Remove the optional callback method in favor of an
316 explicit method to the set the callback that doesn't send the StartObservingCookieChanges message to the network
318 (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Do not change the callback map here.
319 (WebKit::WebCookieManagerProxy::setCookieObserverCallback): Add the callback to the map or remove the session if
321 * UIProcess/WebCookieManagerProxy.h:
322 * WebProcess/Cookies/WebCookieManager.cpp:
323 (WebKit::WebCookieManager::notifyCookiesDidChange): Send CookiesDidChange message to the UI process.
324 (WebKit::WebCookieManager::startObservingCookieChanges): Use notifyCookiesDidChange().
325 * WebProcess/Cookies/WebCookieManager.h:
326 * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
327 (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Set the policy on all sessions. Code moved from
328 WebFrameNetworkingContext since it doesn't belong there.
329 (WebKit::WebCookieManager::setCookiePersistentStorage): Use new method to set the cookie storage in the
330 NetworkStorageSession.
331 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
332 (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Deleted.
333 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
335 2017-02-19 Chris Dumez <cdumez@apple.com>
337 [WK2] Support termination of unresponsive WebContent processes that are in the background
338 https://bugs.webkit.org/show_bug.cgi?id=168479
339 <rdar://problem/30558745>
341 Reviewed by Antti Koivisto.
343 Support termination of unresponsive WebContent processes that are in the background.
344 This protects us against cases where a background tab is unresponsive and has high CPU
345 usage, thus draining the battery without the user knowing about it (e.g.
346 <rdar://problem/29808005>).
348 The feature works as follows:
349 - If a WebProcessProxy has pages but none of them are visible, then it will check
350 regularly if its associated WebContent process is still responsive.
351 - Every time we find that the WebContent process is responsive, we exponentially
352 back off the timer to avoid waking up the process too often. The timer initially
353 uses a 20 seconds interval and can back off up to 8 hours.
354 - If the WebContent process is unresponsive, then we terminate it. No notification
355 is shown to the user and the termination is not immediately observable since the
356 tab is not visible and its title remains. The tab is not immediately reloaded
357 so as to avoid getting back into a bad state in the background (and have a
359 - If the user switches to a tab that was previously killed for being unresponsive
360 while in the background, we will then reload the tab in a fresh WebContent
361 process. The crash banner will only be shown if the tab has ever been visible.
362 If it wasn't ever visible (e.g. session restore case), then it will look as if
363 the tab loads for the first time when the user switches to it.
365 The functionality is disabled by default and can be enabled by the client via the new
366 WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled() private API.
369 * UIProcess/API/APIProcessPoolConfiguration.cpp:
370 (API::ProcessPoolConfiguration::copy):
371 * UIProcess/API/APIProcessPoolConfiguration.h:
372 * UIProcess/API/C/WKContext.cpp:
373 (WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled):
374 * UIProcess/API/C/WKContextPrivate.h:
375 * UIProcess/UnresponsiveWebProcessTerminator.cpp: Added.
376 (WebKit::UnresponsiveWebProcessTerminator::UnresponsiveWebProcessTerminator):
377 (WebKit::UnresponsiveWebProcessTerminator::updateState):
379 (WebKit::UnresponsiveWebProcessTerminator::timerFired):
380 * UIProcess/UnresponsiveWebProcessTerminator.h: Added.
381 (WebKit::UnresponsiveWebProcessTerminator::shouldBeActive):
382 * UIProcess/WebPageProxy.cpp:
383 (WebKit::WebPageProxy::reattachToWebProcess):
384 (WebKit::WebPageProxy::reloadAfterBeingKilledInBackground):
385 (WebKit::WebPageProxy::dispatchActivityStateChange):
386 (WebKit::WebPageProxy::terminateProcess):
387 (WebKit::WebPageProxy::resetStateAfterProcessExited):
388 * UIProcess/WebPageProxy.h:
389 * UIProcess/WebProcessProxy.cpp:
390 (WebKit::WebProcessProxy::WebProcessProxy):
391 (WebKit::m_backgroundResponsivenessTimer):
392 (WebKit::WebProcessProxy::createWebPage):
393 (WebKit::WebProcessProxy::addExistingWebPage):
394 (WebKit::WebProcessProxy::removeWebPage):
395 (WebKit::WebProcessProxy::updateBackgroundResponsivenessTimer):
396 * UIProcess/WebProcessProxy.h:
397 (WebKit::WebProcessProxy::visiblePageCount):
398 * WebKit2.xcodeproj/project.pbxproj:
400 2017-02-18 Michael Catanzaro <mcatanzaro@igalia.com>
402 Remove COORDINATED_GRAPHICS_MULTIPROCESS
403 https://bugs.webkit.org/show_bug.cgi?id=168514
405 Reviewed by Darin Adler.
407 * Shared/DrawingAreaInfo.h:
408 * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
409 (WKViewFindZoomableAreaForRect):
410 * UIProcess/AcceleratedDrawingAreaProxy.cpp:
411 (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
412 * UIProcess/AcceleratedDrawingAreaProxy.h:
413 (WebKit::AcceleratedDrawingAreaProxy::coordinatedLayerTreeHostProxy): Deleted.
414 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: Removed.
415 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: Removed.
416 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: Removed.
417 * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
418 (WebKit::PageViewportController::pageTransitionViewportReady):
419 * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp: Removed.
420 * UIProcess/DrawingAreaProxy.h:
421 * UIProcess/PageClient.h:
422 * UIProcess/WebPageProxy.cpp:
423 (WebKit::WebPageProxy::pageDidRequestScroll): Deleted.
424 (WebKit::WebPageProxy::pageTransitionViewportReady): Deleted.
425 (WebKit::WebPageProxy::didRenderFrame): Deleted.
426 (WebKit::WebPageProxy::commitPageTransitionViewport): Deleted.
427 * UIProcess/WebPageProxy.h:
428 * UIProcess/WebPageProxy.messages.in:
429 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
430 (WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea):
431 (WebKit::AcceleratedDrawingArea::updateBackingStoreState):
432 (WebKit::AcceleratedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage): Deleted.
433 * WebProcess/WebPage/AcceleratedDrawingArea.h:
434 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
435 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
436 (WebKit::CoordinatedLayerTreeHost::commitSceneState):
437 (WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
438 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
439 * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Removed.
440 * WebProcess/WebPage/DrawingArea.cpp:
441 (WebKit::DrawingArea::create):
442 * WebProcess/WebPage/DrawingArea.h:
443 * WebProcess/WebPage/LayerTreeHost.cpp:
444 (WebKit::LayerTreeHost::create):
445 * WebProcess/WebPage/LayerTreeHost.h:
446 * WebProcess/WebPage/WebPage.cpp:
447 (WebKit::WebPage::~WebPage):
448 (WebKit::WebPage::pageDidRequestScroll):
449 (WebKit::WebPage::didCompletePageTransition):
450 (WebKit::WebPage::didReceiveMessage):
451 (WebKit::WebPage::commitPageTransitionViewport): Deleted.
452 * WebProcess/WebPage/WebPage.h:
453 * WebProcess/WebPage/WebPage.messages.in:
455 2017-02-18 Michael Catanzaro <mcatanzaro@igalia.com>
457 [GTK] Cannot paste primary selection into web view in Wayland
458 https://bugs.webkit.org/show_bug.cgi?id=166949
460 Reviewed by Carlos Garcia Campos.
462 Once upon a time, primary selection (middle-click paste) was not supported in Wayland. At
463 the time, I changed this function to report that primary selection was unsupported. But
464 nowadays, primary selection works fine in all GTK+ applications except WebKit. All we have
465 to do to make it work in WebKit is change this return value.
467 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
468 (WebKit::WebEditorClient::supportsGlobalSelection):
470 2017-02-17 Brian Burg <bburg@apple.com>
472 Web Inspector: RTL: Inspector window should dock to the left when using RTL layout direction
473 https://bugs.webkit.org/show_bug.cgi?id=168273
474 <rdar://problem/29949325>
476 Reviewed by Matt Baker.
478 Add the ability to dock Web Inspector to the left of the inspected view.
479 The frontend decides whether the Dock to Side button docks left or right
480 based on the current layout direction.
482 * UIProcess/WebInspectorProxy.cpp:
483 (WebKit::WebInspectorProxy::attachLeft):
484 (WebKit::WebInspectorProxy::attach):
485 (WebKit::WebInspectorProxy::createInspectorPage):
486 * UIProcess/WebInspectorProxy.h:
487 * UIProcess/WebInspectorProxy.messages.in:
488 Add plumbing for new dock configuration.
490 * UIProcess/mac/WebInspectorProxyMac.mm:
491 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
492 (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
493 (WebKit::WebInspectorProxy::platformAttach):
494 Adapt existing sizing logic to work for docking to left.
496 * WebProcess/WebPage/WebInspectorUI.cpp:
497 (WebKit::WebInspectorUI::requestSetDockSide):
498 (WebKit::WebInspectorUI::setDockSide):
499 * WebProcess/WebPage/WebInspectorUI.h:
500 (WebKit::WebInspectorUI::attachedLeft):
501 * WebProcess/WebPage/WebInspectorUI.messages.in:
502 Add plumbing for new dock configuration.
504 2017-02-16 Simon Fraser <simon.fraser@apple.com>
506 Allow PlatformCALayers to specify that they want deep color backing store
507 https://bugs.webkit.org/show_bug.cgi?id=168495
509 Reviewed by Tim Horton.
511 Currently capable iOS devices get deep color backing store by virtue of a supports
512 check in PlatformCALayerCocoa::PlatformCALayerCocoa(), and LegacyTileGridTile.
514 Future work will make layer contents format selection more complex, so express the need
515 for deep color on PlatformCALayer, and have the creators of PlatformCALayer (mainly the
516 flavors of GraphicsLayerCA) choose for them to support deep color. A bit of special-casing
517 is needed to propagte the state to TileControllers.
519 The deep-colorness now propagates from PlatformCALayerRemote to RemoteLayerBackingStore,
520 instead of RemoteLayerBackingStore looking at the properties of the screen directly.
522 Remove PlatformCALayer::LayerTypeWebTiledLayer which was only used for the old CATiledLayers
523 that we no longer use.
525 * Shared/mac/RemoteLayerBackingStore.h:
526 * Shared/mac/RemoteLayerBackingStore.mm:
527 (WebKit::RemoteLayerBackingStore::ensureBackingStore):
528 (WebKit::RemoteLayerBackingStore::bytesPerPixel):
529 (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
530 (WebKit::RemoteLayerBackingStore::drawInContext):
531 (WebKit::RemoteLayerBackingStore::surfaceBufferFormat):
532 (WebKit::bufferFormat): Deleted.
533 * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
534 (WebKit::GraphicsLayerCARemote::createPlatformCALayer):
535 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
536 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
537 (WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
538 (WebKit::PlatformCALayerRemote::updateBackingStore):
539 (WebKit::PlatformCALayerRemote::wantsDeepColorBackingStore):
540 (WebKit::PlatformCALayerRemote::setWantsDeepColorBackingStore):
541 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
542 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
543 (WebKit::PlatformCALayerRemoteTiledBacking::wantsDeepColorBackingStore):
544 (WebKit::PlatformCALayerRemoteTiledBacking::setWantsDeepColorBackingStore):
545 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
547 2017-02-17 Wenson Hsieh <wenson_hsieh@apple.com>
549 [WK2] Action sheet should not dismiss when a DDAction with user interface is being presented
550 https://bugs.webkit.org/show_bug.cgi?id=168528
551 <rdar://problem/30515324>
553 Reviewed by Beth Dakin.
555 After r211643, -[WKActionSheet doneWithSheet] now dismisses the presenting view controller. This is called when
556 interaction with the sheet is finished and is a reasonable thing to do in most cases. However, when using data
557 detectors, we don't want to dismiss the presenting view controller, since DataDetector handles dismissing on its
558 own and expects that its completion handler will be invoked.
560 To fix this, we add a parameter to doneWithSheet: to indicate whether or not we should additionally dismiss the
561 presenting view controller, and pass in NO in the case where we are handing control over to DataDetector.
563 * UIProcess/ios/WKActionSheet.h:
564 * UIProcess/ios/WKActionSheet.mm:
565 (-[WKActionSheet doneWithSheet:]):
566 (-[WKActionSheet doneWithSheet]): Deleted.
567 * UIProcess/ios/WKActionSheetAssistant.mm:
568 (-[WKActionSheetAssistant showDataDetectorsSheet]):
569 (-[WKActionSheetAssistant cleanupSheet]):
571 2017-02-17 Michael Catanzaro <mcatanzaro@igalia.com>
573 Remove EFL from WebKit2
574 https://bugs.webkit.org/show_bug.cgi?id=168511
576 Reviewed by Alex Christensen.
578 * Platform/IPC/unix/ConnectionUnix.cpp:
579 (IPC::Connection::platformInvalidate):
580 (IPC::Connection::open):
582 * PlatformEfl.cmake: Removed.
583 * PluginProcess/unix/PluginProcessMainUnix.cpp:
584 * Shared/API/APIObject.h:
585 * Shared/API/c/WKBase.h:
586 * Shared/API/c/WKSharedAPICast.h:
589 * Shared/NativeWebKeyboardEvent.h:
590 (WebKit::NativeWebKeyboardEvent::isFakeEventForComposition):
591 (WebKit::NativeWebKeyboardEvent::isFiltered): Deleted.
592 * Shared/NativeWebMouseEvent.h:
593 (WebKit::NativeWebMouseEvent::nativeEvent):
594 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Deleted.
595 * Shared/NativeWebTouchEvent.h:
596 (WebKit::NativeWebTouchEvent::nativeEvent):
597 * Shared/NativeWebWheelEvent.h:
598 (WebKit::NativeWebWheelEvent::nativeEvent):
599 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
600 (WebKit::NetscapePluginModule::determineQuirks):
601 * Shared/WebPreferencesDefinitions.h:
602 * UIProcess/API/APIWebsiteDataStore.cpp:
603 * UIProcess/API/C/WKAPICast.h:
604 * UIProcess/API/C/WKTextChecker.cpp:
605 * UIProcess/API/C/WKTextChecker.h:
606 * UIProcess/ChildProcessProxy.cpp:
607 (WebKit::ChildProcessProxy::getLaunchOptions):
608 * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
609 (WebKit::PageViewportController::pixelAlignedFloatPoint):
610 * UIProcess/InspectorServer/WebInspectorServer.h:
611 * UIProcess/Launcher/ProcessLauncher.h:
612 * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
613 * UIProcess/PageClient.h:
614 * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
615 (WebKit::PluginProcessProxy::scanPlugin):
616 * UIProcess/WebInspectorProxy.h:
617 * UIProcess/WebPageProxy.h:
618 * WebKit2.xcodeproj/project.pbxproj:
619 * WebProcess/InjectedBundle/InjectedBundle.h:
620 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
621 (WebKit::getPluginDisplay):
623 (WebKit::displayDepth):
624 (WebKit::rootWindowID):
625 (WebKit::NetscapePluginX11::paint):
626 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
627 (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
628 (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
629 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
630 (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
631 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
632 (WebKit::WebFrameLoaderClient::saveViewStateToItem):
633 (WebKit::WebFrameLoaderClient::restoreViewState):
634 (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
635 * WebProcess/WebPage/WebPage.cpp:
636 (WebKit::WebPage::WebPage):
637 * WebProcess/WebPage/WebPage.h:
638 * WebProcess/WebPage/WebPage.messages.in:
641 2017-02-15 Brady Eidson <beidson@apple.com>
643 Stop backing up localStorage databases to iCloud by default.
644 <rdar://problem/29045531> and https://bugs.webkit.org/show_bug.cgi?id=168388
646 Reviewed by Geoffrey Garen.
648 * UIProcess/Cocoa/VersionChecks.h:
650 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
651 (WebKit::LocalStorageDatabaseTracker::databasePath):
652 * UIProcess/Storage/LocalStorageDatabaseTracker.h:
653 * UIProcess/Storage/ios/LocalStorageDatabaseTrackerIOS.mm: Copied from Source/WebKit2/UIProcess/Cocoa/VersionChecks.h.
654 (WebKit::LocalStorageDatabaseTracker::platformExcludeFromBackup):
656 * WebKit2.xcodeproj/project.pbxproj:
658 2017-02-16 Aakash Jain <aakash_jain@apple.com>
660 Remove unused methods WKPageGetDebugPaintFlags and WKPageSetDebugPaintFlags
661 https://bugs.webkit.org/show_bug.cgi?id=168464
663 Reviewed by Alexey Proskuryakov.
665 * UIProcess/API/C/WKPagePrivate.h:
667 2017-02-16 Youenn Fablet <youenn@apple.com>
669 [WebRTC] libwebrtc socket addresses should not be passed as strings
670 https://bugs.webkit.org/show_bug.cgi?id=168474
672 Reviewed by Alex Christensen.
674 Removing all seralization of socket addresses as strings.
675 Instead, a dedicated serialization is provided.
676 This allows proper handling of various cases like addresses with both hostnames and resolved IPs.
678 * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
679 (WebKit::LibWebRTCSocketClient::signalReadPacket):
680 (WebKit::LibWebRTCSocketClient::signalSentPacket):
681 (WebKit::LibWebRTCSocketClient::signalAddressReady):
682 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
683 (WebKit::NetworkRTCProvider::createUDPSocket):
684 (WebKit::NetworkRTCProvider::createServerTCPSocket):
685 (WebKit::NetworkRTCProvider::createClientTCPSocket):
686 * NetworkProcess/webrtc/NetworkRTCProvider.h:
687 * NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
688 * NetworkProcess/webrtc/NetworkRTCSocket.cpp:
689 (WebKit::NetworkRTCSocket::sendTo):
690 * NetworkProcess/webrtc/NetworkRTCSocket.h:
691 * NetworkProcess/webrtc/NetworkRTCSocket.messages.in:
692 * Shared/RTCNetwork.cpp:
693 (WebKit::RTCNetwork::SocketAddress::decode):
694 (WebKit::RTCNetwork::SocketAddress::encode):
695 * Shared/RTCNetwork.h:
696 (WebKit::RTCNetwork::SocketAddress::SocketAddress):
697 * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
698 (WebKit::LibWebRTCSocket::signalAddressReady):
699 (WebKit::LibWebRTCSocket::SendTo):
700 * WebProcess/Network/webrtc/LibWebRTCSocket.h:
701 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
702 (WebKit::LibWebRTCSocketFactory::CreateServerTcpSocket):
703 (WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
704 (WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
705 * WebProcess/Network/webrtc/WebRTCSocket.cpp:
706 (WebKit::WebRTCSocket::signalAddressReady):
707 * WebProcess/Network/webrtc/WebRTCSocket.h:
708 * WebProcess/Network/webrtc/WebRTCSocket.messages.in:
710 2017-02-16 Daniel Bates <dabates@apple.com>
712 Remove Chromium-specific code to call FrameLoaderClient::redirectDataToPlugin(nullptr)
713 https://bugs.webkit.org/show_bug.cgi?id=168417
714 <rdar://problem/30541748>
716 Reviewed by Brent Fulgham.
718 Update override of FrameLoaderClient::redirectDataToPlugin() to take a Widget& instead of a
719 Widget* as it is always called with a valid Widget.
721 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
722 (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
723 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
724 * mac/WebKit2.order: Remove symbol for WebFrameLoaderClient::redirectDataToPlugin() that took a Widget*
725 as it no longer exists. I am unclear if this file is still meaningful as it was last modified in
726 r180570 (2 years ago) though Xcode still references this ordering file (why?).
728 2017-02-16 Alex Christensen <achristensen@webkit.org>
730 Remove EFL-specific files in WebKit2.
732 Rubber-stamped by Anders Carlsson
734 * DatabaseProcess/efl: Removed.
735 * DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Removed.
736 * NetworkProcess/Downloads/efl: Removed.
737 * NetworkProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp: Removed.
738 * NetworkProcess/efl: Removed.
739 * NetworkProcess/efl/NetworkProcessMainEfl.cpp: Removed.
740 * Platform/efl: Removed.
741 * Platform/efl/ModuleEfl.cpp: Removed.
742 * Shared/API/c/efl: Removed.
743 * Shared/API/c/efl/WKArrayEfl.cpp: Removed.
744 * Shared/API/c/efl/WKArrayEfl.h: Removed.
745 * Shared/API/c/efl/WKBaseEfl.h: Removed.
746 * Shared/efl: Removed.
747 * Shared/efl/NativeWebKeyboardEventEfl.cpp: Removed.
748 * Shared/efl/NativeWebTouchEventEfl.cpp: Removed.
749 * Shared/efl/NativeWebWheelEventEfl.cpp: Removed.
750 * Shared/efl/ProcessExecutablePathEfl.cpp: Removed.
751 * Shared/efl/WebEventFactory.cpp: Removed.
752 * Shared/efl/WebEventFactory.h: Removed.
753 * UIProcess/API/C/efl: Removed.
754 * UIProcess/API/C/efl/WKAPICastEfl.h: Removed.
755 * UIProcess/API/C/efl/WKColorPickerResultListener.cpp: Removed.
756 * UIProcess/API/C/efl/WKColorPickerResultListener.h: Removed.
757 * UIProcess/API/C/efl/WKEventEfl.cpp: Removed.
758 * UIProcess/API/C/efl/WKEventEfl.h: Removed.
759 * UIProcess/API/C/efl/WKViewEfl.cpp: Removed.
760 * UIProcess/API/C/efl/WKViewEfl.h: Removed.
761 * UIProcess/API/cpp/efl: Removed.
762 * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: Removed.
763 * UIProcess/API/cpp/efl/WKEinaSharedString.h: Removed.
764 * UIProcess/API/efl: Removed.
765 * UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp: Removed.
766 * UIProcess/API/efl/EWebKit2.h.in: Removed.
767 * UIProcess/API/efl/EwkView.cpp: Removed.
768 * UIProcess/API/efl/EwkView.h: Removed.
769 * UIProcess/API/efl/EwkViewCallbacks.h: Removed.
770 * UIProcess/API/efl/GestureRecognizer.cpp: Removed.
771 * UIProcess/API/efl/GestureRecognizer.h: Removed.
772 * UIProcess/API/efl/SnapshotImageGL.cpp: Removed.
773 * UIProcess/API/efl/SnapshotImageGL.h: Removed.
774 * UIProcess/API/efl/WebAccessibility.cpp: Removed.
775 * UIProcess/API/efl/WebAccessibility.h: Removed.
776 * UIProcess/API/efl/ewk_application_cache_manager.cpp: Removed.
777 * UIProcess/API/efl/ewk_application_cache_manager.h: Removed.
778 * UIProcess/API/efl/ewk_application_cache_manager_private.h: Removed.
779 * UIProcess/API/efl/ewk_auth_request.cpp: Removed.
780 * UIProcess/API/efl/ewk_auth_request.h: Removed.
781 * UIProcess/API/efl/ewk_auth_request_private.h: Removed.
782 * UIProcess/API/efl/ewk_back_forward_list.cpp: Removed.
783 * UIProcess/API/efl/ewk_back_forward_list.h: Removed.
784 * UIProcess/API/efl/ewk_back_forward_list_item.cpp: Removed.
785 * UIProcess/API/efl/ewk_back_forward_list_item.h: Removed.
786 * UIProcess/API/efl/ewk_back_forward_list_item_private.h: Removed.
787 * UIProcess/API/efl/ewk_back_forward_list_private.h: Removed.
788 * UIProcess/API/efl/ewk_color_picker.cpp: Removed.
789 * UIProcess/API/efl/ewk_color_picker.h: Removed.
790 * UIProcess/API/efl/ewk_color_picker_private.h: Removed.
791 * UIProcess/API/efl/ewk_context.cpp: Removed.
792 * UIProcess/API/efl/ewk_context.h: Removed.
793 * UIProcess/API/efl/ewk_context_menu.cpp: Removed.
794 * UIProcess/API/efl/ewk_context_menu.h: Removed.
795 * UIProcess/API/efl/ewk_context_menu_item.cpp: Removed.
796 * UIProcess/API/efl/ewk_context_menu_item.h: Removed.
797 * UIProcess/API/efl/ewk_context_menu_item_private.h: Removed.
798 * UIProcess/API/efl/ewk_context_menu_private.h: Removed.
799 * UIProcess/API/efl/ewk_context_private.h: Removed.
800 * UIProcess/API/efl/ewk_cookie_manager.cpp: Removed.
801 * UIProcess/API/efl/ewk_cookie_manager.h: Removed.
802 * UIProcess/API/efl/ewk_cookie_manager_private.h: Removed.
803 * UIProcess/API/efl/ewk_database_manager.cpp: Removed.
804 * UIProcess/API/efl/ewk_database_manager.h: Removed.
805 * UIProcess/API/efl/ewk_database_manager_private.h: Removed.
806 * UIProcess/API/efl/ewk_download_job.cpp: Removed.
807 * UIProcess/API/efl/ewk_download_job.h: Removed.
808 * UIProcess/API/efl/ewk_download_job_private.h: Removed.
809 * UIProcess/API/efl/ewk_error.cpp: Removed.
810 * UIProcess/API/efl/ewk_error.h: Removed.
811 * UIProcess/API/efl/ewk_error_private.h: Removed.
812 * UIProcess/API/efl/ewk_favicon_database.cpp: Removed.
813 * UIProcess/API/efl/ewk_favicon_database.h: Removed.
814 * UIProcess/API/efl/ewk_favicon_database_private.h: Removed.
815 * UIProcess/API/efl/ewk_file_chooser_request.cpp: Removed.
816 * UIProcess/API/efl/ewk_file_chooser_request.h: Removed.
817 * UIProcess/API/efl/ewk_file_chooser_request_private.h: Removed.
818 * UIProcess/API/efl/ewk_form_submission_request.cpp: Removed.
819 * UIProcess/API/efl/ewk_form_submission_request.h: Removed.
820 * UIProcess/API/efl/ewk_form_submission_request_private.h: Removed.
821 * UIProcess/API/efl/ewk_intro.h: Removed.
822 * UIProcess/API/efl/ewk_main.cpp: Removed.
823 * UIProcess/API/efl/ewk_main.h: Removed.
824 * UIProcess/API/efl/ewk_main_private.h: Removed.
825 * UIProcess/API/efl/ewk_navigation_data.cpp: Removed.
826 * UIProcess/API/efl/ewk_navigation_data.h: Removed.
827 * UIProcess/API/efl/ewk_navigation_data_private.h: Removed.
828 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp: Removed.
829 * UIProcess/API/efl/ewk_navigation_policy_decision.h: Removed.
830 * UIProcess/API/efl/ewk_navigation_policy_decision_private.h: Removed.
831 * UIProcess/API/efl/ewk_object.cpp: Removed.
832 * UIProcess/API/efl/ewk_object.h: Removed.
833 * UIProcess/API/efl/ewk_object_private.h: Removed.
834 * UIProcess/API/efl/ewk_page_group.cpp: Removed.
835 * UIProcess/API/efl/ewk_page_group.h: Removed.
836 * UIProcess/API/efl/ewk_page_group_private.h: Removed.
837 * UIProcess/API/efl/ewk_popup_menu.cpp: Removed.
838 * UIProcess/API/efl/ewk_popup_menu.h: Removed.
839 * UIProcess/API/efl/ewk_popup_menu_item.cpp: Removed.
840 * UIProcess/API/efl/ewk_popup_menu_item.h: Removed.
841 * UIProcess/API/efl/ewk_popup_menu_item_private.h: Removed.
842 * UIProcess/API/efl/ewk_popup_menu_private.h: Removed.
843 * UIProcess/API/efl/ewk_security_origin.cpp: Removed.
844 * UIProcess/API/efl/ewk_security_origin.h: Removed.
845 * UIProcess/API/efl/ewk_security_origin_private.h: Removed.
846 * UIProcess/API/efl/ewk_settings.cpp: Removed.
847 * UIProcess/API/efl/ewk_settings.h: Removed.
848 * UIProcess/API/efl/ewk_settings_private.h: Removed.
849 * UIProcess/API/efl/ewk_storage_manager.cpp: Removed.
850 * UIProcess/API/efl/ewk_storage_manager.h: Removed.
851 * UIProcess/API/efl/ewk_storage_manager_private.h: Removed.
852 * UIProcess/API/efl/ewk_text_checker.cpp: Removed.
853 * UIProcess/API/efl/ewk_text_checker.h: Removed.
854 * UIProcess/API/efl/ewk_text_checker_private.h: Removed.
855 * UIProcess/API/efl/ewk_touch.h: Removed.
856 * UIProcess/API/efl/ewk_url_request.cpp: Removed.
857 * UIProcess/API/efl/ewk_url_request.h: Removed.
858 * UIProcess/API/efl/ewk_url_request_private.h: Removed.
859 * UIProcess/API/efl/ewk_url_response.cpp: Removed.
860 * UIProcess/API/efl/ewk_url_response.h: Removed.
861 * UIProcess/API/efl/ewk_url_response_private.h: Removed.
862 * UIProcess/API/efl/ewk_url_scheme_request.cpp: Removed.
863 * UIProcess/API/efl/ewk_url_scheme_request.h: Removed.
864 * UIProcess/API/efl/ewk_url_scheme_request_private.h: Removed.
865 * UIProcess/API/efl/ewk_view.cpp: Removed.
866 * UIProcess/API/efl/ewk_view.h: Removed.
867 * UIProcess/API/efl/ewk_view_configuration.cpp: Removed.
868 * UIProcess/API/efl/ewk_view_configuration.h: Removed.
869 * UIProcess/API/efl/ewk_view_configuration_private.h: Removed.
870 * UIProcess/API/efl/ewk_view_private.h: Removed.
871 * UIProcess/API/efl/ewk_window_features.cpp: Removed.
872 * UIProcess/API/efl/ewk_window_features.h: Removed.
873 * UIProcess/API/efl/ewk_window_features_private.h: Removed.
874 * UIProcess/API/efl/tests: Removed.
875 * UIProcess/API/efl/tests/UnitTestUtils: Removed.
876 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Removed.
877 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: Removed.
878 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: Removed.
879 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h: Removed.
880 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestMain.cpp: Removed.
881 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp: Removed.
882 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h: Removed.
883 * UIProcess/API/efl/tests/extensions: Removed.
884 * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Removed.
885 * UIProcess/API/efl/tests/resources: Removed.
886 * UIProcess/API/efl/tests/resources/Page1.html: Removed.
887 * UIProcess/API/efl/tests/resources/Page2.html: Removed.
888 * UIProcess/API/efl/tests/resources/Page3.html: Removed.
889 * UIProcess/API/efl/tests/resources/blank.ico: Removed.
890 * UIProcess/API/efl/tests/resources/default_test_page.html: Removed.
891 * UIProcess/API/efl/tests/resources/empty_theme.edj: Removed.
892 * UIProcess/API/efl/tests/resources/file_chooser.html: Removed.
893 * UIProcess/API/efl/tests/resources/frame_flattening_test.html: Removed.
894 * UIProcess/API/efl/tests/resources/frame_flattening_test_subframe.html: Removed.
895 * UIProcess/API/efl/tests/resources/local_file_access.html: Removed.
896 * UIProcess/API/efl/tests/resources/redirect_url_to_default.html: Removed.
897 * UIProcess/API/efl/tests/resources/resultMHTML.mht: Removed.
898 * UIProcess/API/efl/tests/resources/same_page_navigation.html: Removed.
899 * UIProcess/API/efl/tests/resources/spelling_selection_tests.html: Removed.
900 * UIProcess/API/efl/tests/resources/spelling_test.html: Removed.
901 * UIProcess/API/efl/tests/resources/test.pdf: Removed.
902 * UIProcess/API/efl/tests/resources/window_move_resize.html: Removed.
903 * UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Removed.
904 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp: Removed.
905 * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp: Removed.
906 * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp: Removed.
907 * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp: Removed.
908 * UIProcess/API/efl/tests/test_ewk2_context.cpp: Removed.
909 * UIProcess/API/efl/tests/test_ewk2_context_history_callbacks.cpp: Removed.
910 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: Removed.
911 * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: Removed.
912 * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp: Removed.
913 * UIProcess/API/efl/tests/test_ewk2_download_job.cpp: Removed.
914 * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: Removed.
915 * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp: Removed.
916 * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp: Removed.
917 * UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Removed.
918 * UIProcess/API/efl/tests/test_ewk2_object.cpp: Removed.
919 * UIProcess/API/efl/tests/test_ewk2_page.cpp: Removed.
920 * UIProcess/API/efl/tests/test_ewk2_page_group.cpp: Removed.
921 * UIProcess/API/efl/tests/test_ewk2_popup_menu.cpp: Removed.
922 * UIProcess/API/efl/tests/test_ewk2_settings.cpp: Removed.
923 * UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Removed.
924 * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp: Removed.
925 * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: Removed.
926 * UIProcess/API/efl/tests/test_ewk2_view.cpp: Removed.
927 * UIProcess/API/efl/tests/test_ewk2_view_configuration.cpp: Removed.
928 * UIProcess/API/efl/tests/test_ewk2_window_features.cpp: Removed.
929 * UIProcess/InspectorServer/efl: Removed.
930 * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp: Removed.
931 * UIProcess/Launcher/efl: Removed.
932 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: Removed.
933 * UIProcess/efl: Removed.
934 * UIProcess/efl/ContextHistoryClientEfl.cpp: Removed.
935 * UIProcess/efl/ContextHistoryClientEfl.h: Removed.
936 * UIProcess/efl/ContextMenuClientEfl.cpp: Removed.
937 * UIProcess/efl/ContextMenuClientEfl.h: Removed.
938 * UIProcess/efl/DownloadManagerEfl.cpp: Removed.
939 * UIProcess/efl/DownloadManagerEfl.h: Removed.
940 * UIProcess/efl/EasingCurves.cpp: Removed.
941 * UIProcess/efl/EasingCurves.h: Removed.
942 * UIProcess/efl/EwkDebug.h: Removed.
943 * UIProcess/efl/EwkTouchEvent.cpp: Removed.
944 * UIProcess/efl/EwkTouchEvent.h: Removed.
945 * UIProcess/efl/EwkTouchPoint.cpp: Removed.
946 * UIProcess/efl/EwkTouchPoint.h: Removed.
947 * UIProcess/efl/FindClientEfl.cpp: Removed.
948 * UIProcess/efl/FindClientEfl.h: Removed.
949 * UIProcess/efl/FormClientEfl.cpp: Removed.
950 * UIProcess/efl/FormClientEfl.h: Removed.
951 * UIProcess/efl/InputMethodContextEfl.cpp: Removed.
952 * UIProcess/efl/InputMethodContextEfl.h: Removed.
953 * UIProcess/efl/PageLoadClientEfl.cpp: Removed.
954 * UIProcess/efl/PageLoadClientEfl.h: Removed.
955 * UIProcess/efl/PagePolicyClientEfl.cpp: Removed.
956 * UIProcess/efl/PagePolicyClientEfl.h: Removed.
957 * UIProcess/efl/PageUIClientEfl.cpp: Removed.
958 * UIProcess/efl/PageUIClientEfl.h: Removed.
959 * UIProcess/efl/PageViewportControllerClientEfl.cpp: Removed.
960 * UIProcess/efl/PageViewportControllerClientEfl.h: Removed.
961 * UIProcess/efl/RequestManagerClientEfl.cpp: Removed.
962 * UIProcess/efl/RequestManagerClientEfl.h: Removed.
963 * UIProcess/efl/TextCheckerClientEfl.cpp: Removed.
964 * UIProcess/efl/TextCheckerClientEfl.h: Removed.
965 * UIProcess/efl/TextCheckerEfl.cpp: Removed.
966 * UIProcess/efl/VibrationClientEfl.cpp: Removed.
967 * UIProcess/efl/VibrationClientEfl.h: Removed.
968 * UIProcess/efl/ViewClientEfl.cpp: Removed.
969 * UIProcess/efl/ViewClientEfl.h: Removed.
970 * UIProcess/efl/WebColorPickerClient.cpp: Removed.
971 * UIProcess/efl/WebColorPickerClient.h: Removed.
972 * UIProcess/efl/WebColorPickerEfl.cpp: Removed.
973 * UIProcess/efl/WebColorPickerEfl.h: Removed.
974 * UIProcess/efl/WebColorPickerResultListenerProxy.cpp: Removed.
975 * UIProcess/efl/WebColorPickerResultListenerProxy.h: Removed.
976 * UIProcess/efl/WebContextMenuProxyEfl.cpp: Removed.
977 * UIProcess/efl/WebContextMenuProxyEfl.h: Removed.
978 * UIProcess/efl/WebInspectorProxyEfl.cpp: Removed.
979 * UIProcess/efl/WebPageProxyEfl.cpp: Removed.
980 * UIProcess/efl/WebPopupItemEfl.cpp: Removed.
981 * UIProcess/efl/WebPopupItemEfl.h: Removed.
982 * UIProcess/efl/WebPopupMenuProxyEfl.cpp: Removed.
983 * UIProcess/efl/WebPopupMenuProxyEfl.h: Removed.
984 * UIProcess/efl/WebPreferencesEfl.cpp: Removed.
985 * UIProcess/efl/WebProcessPoolEfl.cpp: Removed.
986 * UIProcess/efl/WebView.cpp: Removed.
987 * UIProcess/efl/WebView.h: Removed.
988 * UIProcess/efl/WebViewClient.cpp: Removed.
989 * UIProcess/efl/WebViewClient.h: Removed.
990 * WebProcess/InjectedBundle/API/efl: Removed.
991 * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Removed.
992 * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Removed.
993 * WebProcess/InjectedBundle/API/efl/ewk_extension.h: Removed.
994 * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Removed.
995 * WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Removed.
996 * WebProcess/InjectedBundle/API/efl/ewk_page.h: Removed.
997 * WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Removed.
998 * WebProcess/InjectedBundle/efl: Removed.
999 * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp: Removed.
1000 * WebProcess/WebCoreSupport/efl: Removed.
1001 * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp: Removed.
1002 * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: Removed.
1003 * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: Removed.
1004 * WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp: Removed.
1005 * WebProcess/WebPage/efl: Removed.
1006 * WebProcess/WebPage/efl/WebInspectorUIEfl.cpp: Removed.
1007 * WebProcess/WebPage/efl/WebPageEfl.cpp: Removed.
1008 * WebProcess/efl: Removed.
1009 * WebProcess/efl/ExtensionManagerEfl.cpp: Removed.
1010 * WebProcess/efl/ExtensionManagerEfl.h: Removed.
1011 * WebProcess/efl/WebInjectedBundleMainEfl.cpp: Removed.
1012 * WebProcess/efl/WebProcessMainEfl.cpp: Removed.
1014 * efl/EWebKit2Config.cmake.in: Removed.
1015 * efl/EWebKit2ConfigVersion.cmake.in: Removed.
1016 * efl/ewebkit2-extension.pc.in: Removed.
1017 * efl/ewebkit2.pc.in: Removed.
1019 2017-02-16 Alex Christensen <achristensen@webkit.org>
1021 Remove old URL parser
1022 https://bugs.webkit.org/show_bug.cgi?id=168483
1024 Reviewed by Tim Horton.
1026 * NetworkProcess/NetworkProcess.cpp:
1027 (WebKit::NetworkProcess::initializeNetworkProcess):
1028 * NetworkProcess/NetworkProcessCreationParameters.cpp:
1029 (WebKit::NetworkProcessCreationParameters::encode):
1030 (WebKit::NetworkProcessCreationParameters::decode):
1031 * NetworkProcess/NetworkProcessCreationParameters.h:
1032 * PlatformEfl.cmake:
1033 * PlatformGTK.cmake:
1034 * PlatformMac.cmake:
1035 * Shared/Cocoa/WebKit2InitializeCocoa.mm: Removed.
1036 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
1037 (WebKit::XPCServiceInitializer):
1038 * Shared/WebKit2Initialize.cpp:
1039 (WebKit::InitializeWebKit2):
1040 * Shared/WebKit2Initialize.h:
1042 * Shared/WebProcessCreationParameters.cpp:
1043 (WebKit::WebProcessCreationParameters::encode):
1044 (WebKit::WebProcessCreationParameters::decode):
1045 * Shared/WebProcessCreationParameters.h:
1046 * Shared/efl/WebKit2InitializeEFL.cpp: Removed.
1047 * Shared/gtk/WebKit2InitializeGTK.cpp: Removed.
1048 * UIProcess/WebProcessPool.cpp:
1049 (WebKit::WebProcessPool::ensureNetworkProcess):
1050 (WebKit::WebProcessPool::createNewWebProcess):
1051 * WebKit2.xcodeproj/project.pbxproj:
1052 * WebProcess/WebProcess.cpp:
1053 (WebKit::WebProcess::initializeWebProcess):
1055 2017-02-16 Wenson Hsieh <wenson_hsieh@apple.com>
1057 [WK2] Add additional test infrastructure and unit tests for data interaction
1058 https://bugs.webkit.org/show_bug.cgi?id=168439
1059 <rdar://problem/30557942>
1061 Reviewed by Tim Horton.
1063 Adds two new _WKTestingDelegate protocol methods that are fired when a 'start data interaction' request has been
1064 sent to the web process, and when a response has been received. See Tools/ChangeLog for more details.
1066 * UIProcess/API/Cocoa/_WKTestingDelegate.h:
1068 2017-02-16 Aakash Jain <aakash_jain@apple.com>
1070 Remove unused method WKBundlePageCopyContextMenuItemTitle
1071 https://bugs.webkit.org/show_bug.cgi?id=168456
1073 Reviewed by Dan Bernstein.
1075 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Removed WKBundlePageCopyContextMenuItemTitle.
1077 2017-02-16 Aakash Jain <aakash_jain@apple.com>
1079 Remove unused WKContextGetProcessSuppressionEnabled and WKContextSetProcessSuppressionEnabled
1080 https://bugs.webkit.org/show_bug.cgi?id=168460
1082 Reviewed by Dan Bernstein.
1084 * UIProcess/API/C/mac/WKContextPrivateMac.h:
1086 2017-02-16 Aakash Jain <aakash_jain@apple.com>
1088 Removed unused method WKContextGetProcessModel
1089 https://bugs.webkit.org/show_bug.cgi?id=168457
1091 Reviewed by Dan Bernstein.
1093 * UIProcess/API/C/WKContext.h: Removed WKContextGetProcessModel.
1095 2017-02-16 Tim Horton <timothy_horton@apple.com>
1097 WKWebView inside a UICollectionView flashes when items are inserted above it
1098 https://bugs.webkit.org/show_bug.cgi?id=168376
1099 <rdar://problem/29322051>
1101 Reviewed by Simon Fraser.
1103 Previously, we would immediately send visible content rect updates
1104 whenever we scrolled, or our frame or bounds changed, or ... a whole
1105 bunch of other things. This message would be immediately sent to the
1106 Web Content process, and coalesced at the whims of the Web Content process
1107 main thread. However, if we received multiple such updates within the
1108 same runloop cycle in the UI process, the Web Content process could
1109 send back layer tree commits for intermediate states that would
1110 never make it to the screen.
1112 In the UICollectionView case, UIKit would first scroll to the new location
1113 (potentially putting the WKWebView totally off-screen), and then update
1114 our frame (back on screen), and we would get two layer tree commits;
1115 one, with less tile coverage than needed to cover the area, and another
1118 Instead, wait until just before we commit the UI-side layer tree (and
1119 thus everyone is done moving things around) to push the new visible
1120 rect info to the Web Content process.
1122 So far, I have not found a way to test that reliably fails before
1123 and reliably passes after without adding a ton of supporting code to WebKit.
1125 * UIProcess/API/Cocoa/WKWebView.mm:
1126 (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
1127 (-[WKWebView _didCommitLayerTree:]):
1128 (-[WKWebView _didFinishScrolling]):
1129 (-[WKWebView scrollViewDidScroll:]):
1130 (-[WKWebView scrollViewDidZoom:]):
1131 (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
1132 (-[WKWebView _scrollViewDidInterruptDecelerating:]):
1133 (-[WKWebView _didScroll]):
1134 (-[WKWebView _enclosingScrollerScrollingEnded:]):
1135 (-[WKWebView _frameOrBoundsChanged]):
1136 (-[WKWebView _scheduleVisibleContentRectUpdate]):
1137 (-[WKWebView _scrollViewIsInStableState:]):
1138 (-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):
1139 (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
1140 (-[WKWebView _setObscuredInsets:]):
1141 (-[WKWebView _endInteractiveObscuredInsetsChange]):
1142 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1143 (-[WKWebView _endAnimatedResize]):
1144 (-[WKWebView _updateVisibleContentRects]): Deleted.
1145 (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Deleted.
1146 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1147 * UIProcess/ios/WKContentView.mm:
1148 (-[WKContentView _didCommitLayerTree:]):
1149 * UIProcess/ios/WKContentViewInteraction.mm:
1150 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
1151 (-[WKContentView _stopAssistingNode]):
1152 * UIProcess/ios/WKScrollView.mm:
1153 (-[WKScrollView setContentInset:]):
1154 Have existing callers of _updateVisibleContentRect* instead call
1155 _scheduleVisibleContentRectUpdate*.
1157 In _scheduleVisibleContentRectUpdate, schedule a pre-commit callback
1158 in which we will compute the new visible content rect information
1159 and send it to the Web Content process.
1161 Keep track of the stable state of the scroll view which most recently
1162 scheduled an update, and use that to inform _updateVisibleContentRects.
1163 This matches the previous behavior where the updates might get coalesced
1164 in the Web Content process, and the most recent update wins.
1166 Make a few callers of _updateVisibleContentRectAfterScrollInView
1167 that passed in our scroll view just use _scheduleVisibleContentRectUpdate instead.
1169 2017-02-16 Brent Fulgham <bfulgham@apple.com>
1171 [WebRTC][Mac] Conditionally add sandbox extensions to the Network Process
1172 https://bugs.webkit.org/show_bug.cgi?id=168010
1173 <rdar://problem/30245503>
1175 Reviewed by Youenn Fablet.
1177 Conditionally add sandbox extensions to the Network Process when the WebRTC/Media Capture
1178 features are enabled.
1180 * NetworkProcess/NetworkProcess.h:
1181 * NetworkProcess/NetworkProcessCreationParameters.cpp:
1182 (WebKit::NetworkProcessCreationParameters::encode): Serialize new process configuration flag.
1183 (WebKit::NetworkProcessCreationParameters::decode): Ditto.
1184 * NetworkProcess/NetworkProcessCreationParameters.h:
1185 * NetworkProcess/mac/NetworkProcessMac.mm:
1186 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Remember state of WebRTC for when the
1187 sandbox is established.
1188 (WebKit::NetworkProcess::initializeSandbox): Add ENABLE_WEB_RTC parameter to sandbox launch state.
1189 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Add conditional sandbox expansion to allow
1190 bidirectional network access when the ENABLE_LIBWEBRTC flag is present in the sandbox launch parameters.
1191 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1192 (WebKit::WebProcessPool::platformInitializeWebProcess): Use proper compile guards and check media stream
1193 preference, rather than the peer connection preference.
1194 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Notify NetworkProcess at launch time whether the
1195 user wants WebRTC support.
1197 2017-02-16 Brent Fulgham <bfulgham@apple.com>
1199 [WebRTC][Mac][WebKit2] Initial WebProcess does not support WebRTC
1200 https://bugs.webkit.org/show_bug.cgi?id=168438
1201 <rdar://problem/30401818>
1203 Reviewed by Youenn Fablet.
1205 The sandbox extension for microphone access does not take effect until the second WebProcess
1206 is created, causing the initial browser tab to lack microphone support.
1208 This patch checks the setting earlier in the boot process so that the initial WebProcess
1209 instance gets the correct setting.
1211 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1212 (WebKit::WebProcessPool::platformInitializeWebProcess): Move microphone sandbox extension here, so that the
1213 initial WebProcess has the correct microphone access.
1214 * UIProcess/WebProcessPool.cpp:
1215 (WebKit::WebProcessPool::createNewWebProcess): Move microphone sandbox extension from here to platform-specific file.
1216 (WebKit::WebProcessPool::createWebPage): Remove unneeded preference checks.
1218 2017-02-16 Eric Carlson <eric.carlson@apple.com>
1220 Add WebRTC as an off-by-default experimental feature menu item.
1221 https://bugs.webkit.org/show_bug.cgi?id=167972
1222 <rdar://problem/30293429>
1224 Reviewed by Alex Christensen.
1226 * Shared/WebPreferencesDefinitions.h:
1227 * UIProcess/WebPreferences.cpp:
1228 (WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): We need to enable/disable
1229 peer connection and media stream preferences at the same time, so special case them.
1230 (WebKit::WebPreferences::setEnabledForFeature):
1231 * UIProcess/WebPreferences.h:
1233 2017-02-15 Alex Christensen <achristensen@webkit.org>
1235 Unreviewed, rolling out r212394.
1237 Fixed iOS WebInspector
1241 "Unreviewed, rolling out r212169."
1242 https://bugs.webkit.org/show_bug.cgi?id=166681
1243 http://trac.webkit.org/changeset/212394
1245 2017-02-15 Eric Carlson <eric.carlson@apple.com>
1247 [MediaStream] delete CaptureDeviceInfo struct
1248 https://bugs.webkit.org/show_bug.cgi?id=168395
1250 Reviewed by Sam Weinig.
1252 * Shared/WebCoreArgumentCoders.cpp:
1253 (IPC::ArgumentCoder<CaptureDevice>::encode):
1254 (IPC::ArgumentCoder<CaptureDevice>::decode):
1256 2017-02-15 Anders Carlsson <andersca@apple.com>
1260 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
1261 (WebKit::WebDragClient::startDrag):
1263 2017-02-15 Anders Carlsson <andersca@apple.com>
1265 Attempt to fix the GTK+ build.
1267 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
1268 (WebKit::WebDragClient::startDrag):
1270 2017-02-15 Simon Fraser <simon.fraser@apple.com>
1272 Clean up WebProcessCreationParameters a little
1273 https://bugs.webkit.org/show_bug.cgi?id=168349
1275 Reviewed by Alex Christensen.
1277 Initialize the data members better, and rearrange to group the types in a slightly more space-efficient manner.
1279 * Shared/WebProcessCreationParameters.cpp:
1280 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
1281 * Shared/WebProcessCreationParameters.h:
1283 2017-02-15 Jer Noble <jer.noble@apple.com>
1285 REGRESSION(r183937): Fullscreen Exit animation missing mask
1286 https://bugs.webkit.org/show_bug.cgi?id=168360
1288 Reviewed by Eric Carlson.
1290 In r183937, the fullscreen window's clip layer has it's mask removed when the enter
1291 fullscreen animation completes, allowing low-power video playback mode to be entered. But
1292 this breaks the exit fullscreen animaiton, which assumes a mask is present. Abstract the
1293 mask creation code out into a static helper method, and use it at the beginning of the exit
1294 fullscreen animation to re-create the mask before adding animations to it.
1296 * UIProcess/mac/WKFullScreenWindowController.mm:
1298 (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
1299 (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
1301 2017-02-15 Alex Christensen <achristensen@webkit.org>
1303 Unreviewed, rolling out r212169.
1305 Broke iOS WebInspector
1309 "WebInspector: refactor RemoteInspector to move cocoa specific
1310 code to their own files"
1311 https://bugs.webkit.org/show_bug.cgi?id=166681
1312 http://trac.webkit.org/changeset/212169
1314 2017-02-15 Anders Carlsson <andersca@apple.com>
1316 Modernize DragClient::startDrag somewhat
1317 https://bugs.webkit.org/show_bug.cgi?id=168379
1319 Reviewed by Tim Horton.
1321 Update for WebCore changes.
1323 * WebProcess/WebCoreSupport/WebDragClient.cpp:
1324 (WebKit::WebDragClient::startDrag):
1325 * WebProcess/WebCoreSupport/WebDragClient.h:
1326 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1327 (WebKit::WebDragClient::startDrag):
1329 2017-02-15 Aakash Jain <aakash_jain@apple.com>
1331 Remove WebIOSEvent interface
1332 https://bugs.webkit.org/show_bug.cgi?id=168368
1334 Reviewed by Tim Horton.
1336 * Shared/NativeWebKeyboardEvent.h: Using WebEvent from WebCore instead of WebIOSEvent.
1337 * Shared/ios/NativeWebKeyboardEventIOS.mm: Ditto.
1338 * Shared/ios/WebIOSEventFactory.h: Ditto.
1339 * Shared/ios/WebIOSEventFactory.mm: Ditto.
1340 * UIProcess/ios/WKContentViewInteraction.h: Ditto.
1341 * UIProcess/ios/WKContentViewInteraction.mm: Ditto.
1342 * UIProcess/API/C/WKPage.cpp: Using WebEvent from WebKit.
1344 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
1346 [GTK] Update cookie manager API to properly work with ephemeral sessions
1347 https://bugs.webkit.org/show_bug.cgi?id=168230
1349 Reviewed by Michael Catanzaro.
1351 WebKitCookieManager is associated to a particular WebKitWebContext and uses the default session ID
1352 unconditionally. It should be associated to a WebKitWebsiteDataManager instead and use its session ID. This
1353 patch also adds support for handling cookies with WebKitWebsiteDataManager and deprecates
1354 webkit_cookie_manager_get_domains_with_cookies(), webkit_cookie_manager_delete_cookies_for_domain() and
1355 webkit_cookie_manager_delete_all_cookies(). It also adds API to get the the WebKitWebsiteDataManager of a
1356 WebKitWebView, since it's the only way to get the WebKitCookieManager associated to an ephemeral web view.
1358 * UIProcess/API/gtk/WebKitCookieManager.cpp:
1359 (webkitCookieManagerDispose): Stop observing cookie changes.
1360 (webkit_cookie_manager_class_init): Add dispose implementation.
1361 (webkitCookieManagerCreate): Create the WebKitCookieManager with a WebKitWebsiteDataManager.
1362 (webkit_cookie_manager_set_persistent_storage): Work with all contexts having the session.
1363 (webkit_cookie_manager_set_accept_policy): Ditto.
1364 (webkit_cookie_manager_get_accept_policy): Use any context having the session.
1365 (webkit_cookie_manager_get_domains_with_cookies): Deprecate and implement using WebKitWebsiteDataManager.
1366 (webkit_cookie_manager_get_domains_with_cookies_finish): Ditto.
1367 (webkit_cookie_manager_delete_cookies_for_domain): Ditto.
1368 (webkit_cookie_manager_delete_all_cookies): Ditto.
1369 * UIProcess/API/gtk/WebKitCookieManager.h:
1370 * UIProcess/API/gtk/WebKitCookieManagerPrivate.h:
1371 * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
1372 (attachCustomProtocolManagerClientToContext):
1373 * UIProcess/API/gtk/WebKitDownloadClient.cpp:
1374 (attachDownloadClientToContext):
1375 * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
1376 (attachInjectedBundleClientToContext):
1377 * UIProcess/API/gtk/WebKitSecurityManager.cpp:
1378 (registerSecurityPolicyForURIScheme):
1379 * UIProcess/API/gtk/WebKitWebContext.cpp:
1380 (webkitWebContextConstructed): Call webkitWebsiteDataManagerAddProcessPool.
1381 (webkitWebContextDispose): Call webkitWebsiteDataManagerRemoveProcessPool.
1382 (webkit_web_context_get_cookie_manager): Return the WebKitCookieManager of the WebKitWebsiteDataManager.
1383 (webkitWebContextGetProcessPool): Make it return a reference.
1384 * UIProcess/API/gtk/WebKitWebContextPrivate.h:
1385 * UIProcess/API/gtk/WebKitWebView.cpp:
1386 (webkitWebViewConstructed): Call webkitWebsiteDataManagerAddProcessPool when creating a ephemeral web view.
1387 (webkitWebViewDispose): Call webkitWebsiteDataManagerRemoveProcessPool if needed.
1388 (webkit_web_view_get_website_data_manager): Return the WebKitWebsiteDataManager or the context one.
1389 * UIProcess/API/gtk/WebKitWebView.h:
1390 * UIProcess/API/gtk/WebKitWebsiteData.cpp: Add support for Cookies type.
1391 (recordContainsSupportedDataTypes):
1392 (toWebKitWebsiteDataTypes):
1393 * UIProcess/API/gtk/WebKitWebsiteData.h:
1394 * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
1395 (_WebKitWebsiteDataManagerPrivate::~_WebKitWebsiteDataManagerPrivate): Ensure all contexts were unregistered.
1396 (webkitWebsiteDataManagerAddProcessPool): Register the process pool in the session.
1397 (webkitWebsiteDataManagerRemoveProcessPool): Unregister the process poll from the session.
1398 (webkitWebsiteDataManagerGetProcessPools): Return the list of proces pools registered.
1399 (webkit_website_data_manager_get_cookie_manager): Return the WebKitCookieManager.
1400 (toWebsiteDataTypes): Add Cookies.
1401 * UIProcess/API/gtk/WebKitWebsiteDataManager.h:
1402 * UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h:
1403 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
1404 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
1405 (WebKit::WebsiteDataRecord::displayNameForCookieHostName): Handle localhost as a special case here for backwards
1408 2017-02-14 Wenson Hsieh <wenson_hsieh@apple.com>
1410 [WK2] Support data interaction on links
1411 https://bugs.webkit.org/show_bug.cgi?id=168331
1412 <rdar://problem/30200837>
1414 Reviewed by Tim Horton.
1416 Adds support for data interaction on links at the client layer for WebKit2. This involves several changes,
1417 detailed in the per-method changes below:
1419 * Shared/ios/InteractionInformationAtPosition.h:
1420 * Shared/ios/InteractionInformationAtPosition.mm:
1421 (WebKit::InteractionInformationAtPosition::encode):
1422 (WebKit::InteractionInformationAtPosition::decode):
1424 Add adjustedPointForNodeRespondingToClickEvents (the request point, adjusted to take nodeRespondingToClickEvents
1425 into account) to InteractionInformationAtPosition. The web process sends this adjusted point over to the UI
1426 process so that the UI process will be able to begin a data interaction at the adjusted point rather than the
1427 request point, which is necessary for small clickable (and data-interactive) elements such as links.
1429 * UIProcess/ios/WKActionSheet.h:
1430 * UIProcess/ios/WKActionSheet.mm:
1431 (-[WKActionSheet presentSheet:]):
1432 (-[WKActionSheet _presentationRectForStyle:]):
1433 (-[WKActionSheet updateSheetPosition]):
1434 * UIProcess/ios/WKActionSheetAssistant.h:
1435 * UIProcess/ios/WKActionSheetAssistant.mm:
1436 (-[WKActionSheetAssistant presentationRectForElementUsingClosestIndicatedRect]):
1437 (-[WKActionSheetAssistant presentationRectForIndicatedElement]):
1438 (-[WKActionSheetAssistant showImageSheet]):
1439 (-[WKActionSheetAssistant _shouldPresentAtTouchLocationForElementRect:]):
1440 (-[WKActionSheetAssistant needsLinkIndicator]):
1441 (-[WKActionSheetAssistant showLinkSheet]):
1442 (-[WKActionSheetAssistant cleanupSheet]):
1443 (-[WKActionSheetAssistant _presentationStyleForImageAtElementRect:]): Deleted.
1445 Add support for the WKActionSheetPresentAtClosestIndicatorRect style of presenting an action sheet. When
1446 showing the action sheet for a link and there is space along the margins to show a popover in the first place,
1447 we will now target the popover rect to the bounding rect of the set of adjacent (or nearly-adjacent) element
1448 rects closest to the user's touch location. This covers cases where the link is split into multiple rects due to
1449 a line break, when the link is on multiple lines with a jagged rect per line, and when both of the above are
1452 * UIProcess/ios/WKContentViewInteraction.mm:
1453 (-[WKContentView pointIsInDataInteractionContent:]):
1454 (-[WKContentView _positionInformationDidChange:]):
1455 (-[WKContentView positionInformationForActionSheetAssistant:]):
1456 (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
1458 Include link indicator data in the position information request if needed. As the FIXME suggests, this can be
1459 improved by asynchronously presenting the action sheet assistant after the request returns, and is something we
1460 should address in the future.
1462 * WebProcess/WebPage/ios/WebPageIOS.mm:
1463 (WebKit::WebPage::getPositionInformation):
1465 2017-02-14 Jason Rinn <jrinn@apple.com>
1467 Add new WKWebKit Cocoa API for getContentsAsString.
1468 https://bugs.webkit.org/show_bug.cgi?id=168147
1469 <rdar://problem/30502539>
1471 Reviewed by Tim Horton.
1473 * UIProcess/API/Cocoa/WKWebView.mm:
1474 (-[WKWebView _getContentsAsStringWithCompletionHandler:]): New API for getContentsAsString.
1475 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1477 2017-02-14 Chris Dumez <cdumez@apple.com>
1479 HTML Form Validation bubble should take minimum font size setting into consideration
1480 https://bugs.webkit.org/show_bug.cgi?id=168271
1481 <rdar://problem/29869869>
1483 Reviewed by Simon Fraser.
1485 * UIProcess/API/Cocoa/WKWebView.mm:
1486 (-[WKWebView _contentsOfUserInterfaceItem:]):
1487 Return font size used in the validation bubble.
1489 * UIProcess/PageClient.h:
1490 * UIProcess/ios/PageClientImplIOS.h:
1491 * UIProcess/ios/PageClientImplIOS.mm:
1492 (WebKit::PageClientImpl::createValidationBubble):
1493 * UIProcess/ios/WebPageProxyIOS.mm:
1494 (WebKit::WebPageProxy::showValidationMessage):
1495 * UIProcess/mac/PageClientImpl.h:
1496 * UIProcess/mac/PageClientImpl.mm:
1497 (WebKit::PageClientImpl::createValidationBubble):
1498 * UIProcess/mac/WebPageProxyMac.mm:
1499 (WebKit::WebPageProxy::showValidationMessage):
1500 Pass minimum font size setting when constructing the form validation bubble.
1502 2017-02-14 Commit Queue <commit-queue@webkit.org>
1504 Unreviewed, rolling out r211879.
1505 https://bugs.webkit.org/show_bug.cgi?id=168330
1507 Not ready for the menu yet (Requested by eric_car_ on
1512 "Add WebRTC as an off-by-default experimental feature menu
1514 https://bugs.webkit.org/show_bug.cgi?id=167972
1515 http://trac.webkit.org/changeset/211879
1517 2017-02-14 Simon Fraser <simon.fraser@apple.com>
1519 Add logging and defensive fixes to try to detect problems causing blank tabs
1520 https://bugs.webkit.org/show_bug.cgi?id=168270
1521 rdar://problem/30505482
1523 Reviewed by Jon Lee.
1525 Add release logging when -[WKWebView _beginAnimatedResizeWithUpdates:] and -[WKWebView _endAnimatedResize]
1526 are unbalanced across a commit, to detect cases where _endAnimatedResize wasn't called enough times.
1528 Also log when RemoteLayerTreeHost::updateLayerTree() fails to find a root layer, which should never happen.
1530 In WebPageProxy, clear m_firstLayerTreeTransactionIdAfterDidCommitLoad on a web process crash.
1532 * Platform/Logging.h:
1533 * UIProcess/API/Cocoa/WKWebView.mm:
1534 (-[WKWebView _didCommitLayerTree:]):
1535 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1536 (-[WKWebView _endAnimatedResize]):
1537 * UIProcess/WebPageProxy.cpp:
1538 (WebKit::WebPageProxy::resetState):
1539 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1540 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1541 (WebKit::RemoteLayerTreeDrawingAreaProxy::isAlwaysOnLoggingAllowed):
1542 * UIProcess/mac/RemoteLayerTreeHost.mm:
1543 (WebKit::RemoteLayerTreeHost::updateLayerTree):
1544 (WebKit::RemoteLayerTreeHost::clearLayers):
1545 * WebProcess/WebPage/WebFrame.cpp:
1546 (WebKit::WebFrame::WebFrame):
1547 * WebProcess/WebPage/WebFrame.h:
1549 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
1551 Allow to use stored credentials also for downloads started by DownloadManager::startDownload
1552 https://bugs.webkit.org/show_bug.cgi?id=167584
1554 Reviewed by Michael Catanzaro.
1556 Cliking on a link that triggers a download works on an already HTTP authenticated site works, but right clicking
1557 and downloading from the context menu shows the HTTP auth dialog again. This is because PendingDownload uses
1558 DoNotAllowStoredCredentials unconditionally. We want to allow using cached credentials at least for
1559 non-ephemeral sessions.
1561 * NetworkProcess/Downloads/DownloadManager.cpp:
1562 (WebKit::DownloadManager::startDownload):
1564 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
1566 [GTK] Make DragImageRef a RefPtr instead of a plain pointer
1567 https://bugs.webkit.org/show_bug.cgi?id=168296
1569 Reviewed by Sergio Villar Senin.
1571 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
1572 (WebKit::WebDragClient::startDrag):
1574 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
1576 [SOUP] Ensure a response MIME type when Content-Type is missing and sniffing not allowed
1577 https://bugs.webkit.org/show_bug.cgi?id=168299
1579 Reviewed by Sergio Villar Senin.
1581 Sniffing is not allowed but we can try to guess the MIME using the response path, or at least fallback to
1582 default MIME type instead of leaving an empty string. This matches what mac port does.
1584 Fixes: http/tests/inspector/network/fetch-response-body.html
1585 http/tests/inspector/network/xhr-response-body.html
1587 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1588 (WebKit::NetworkDataTaskSoup::didSendRequest):
1590 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
1592 CookieManager only works with the default session
1593 https://bugs.webkit.org/show_bug.cgi?id=168229
1595 Reviewed by Alex Christensen.
1597 Make CookieManager session aware by adding a SessionID parameter to all its functions, and update all the callers
1598 to pass the default session ID, preserving the current
1599 behavior. WebCookieManagerProxy::startObservingCookieChanges() now also receives an optional callback to be
1600 called on every change.
1602 * UIProcess/API/C/WKCookieManager.cpp:
1603 (WKCookieManagerGetHostnamesWithCookies):
1604 (WKCookieManagerDeleteCookiesForHostname):
1605 (WKCookieManagerDeleteAllCookies):
1606 (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
1607 (WKCookieManagerStartObservingCookieChanges):
1608 (WKCookieManagerStopObservingCookieChanges):
1609 * UIProcess/API/gtk/WebKitCookieManager.cpp:
1610 (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate):
1611 (webkitCookieManagerCreate):
1612 (webkit_cookie_manager_set_persistent_storage):
1613 (webkit_cookie_manager_get_domains_with_cookies):
1614 (webkit_cookie_manager_delete_cookies_for_domain):
1615 (webkit_cookie_manager_delete_all_cookies):
1616 * UIProcess/Automation/WebAutomationSession.cpp:
1617 (WebKit::WebAutomationSession::addSingleCookie):
1618 (WebKit::WebAutomationSession::deleteAllCookies):
1619 * UIProcess/WebCookieManagerProxy.cpp:
1620 (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
1621 (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
1622 (WebKit::WebCookieManagerProxy::deleteAllCookies):
1623 (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
1624 (WebKit::WebCookieManagerProxy::addCookie):
1625 (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
1626 (WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
1627 (WebKit::WebCookieManagerProxy::cookiesDidChange):
1628 * UIProcess/WebCookieManagerProxy.h:
1629 * UIProcess/WebCookieManagerProxy.messages.in:
1630 * WebProcess/Cookies/WebCookieManager.cpp:
1631 (WebKit::WebCookieManager::WebCookieManager):
1632 (WebKit::WebCookieManager::getHostnamesWithCookies):
1633 (WebKit::WebCookieManager::deleteCookiesForHostname):
1634 (WebKit::WebCookieManager::deleteAllCookies):
1635 (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
1636 (WebKit::WebCookieManager::addCookie):
1637 (WebKit::WebCookieManager::startObservingCookieChanges):
1638 (WebKit::WebCookieManager::stopObservingCookieChanges):
1639 * WebProcess/Cookies/WebCookieManager.h:
1640 * WebProcess/Cookies/WebCookieManager.messages.in:
1642 2017-02-14 Tomas Popela <tpopela@redhat.com>
1644 Unreviewed, fix documentation typo
1646 * UIProcess/API/gtk/WebKitEditingCommands.h:
1648 2017-02-12 Brian Burg <bburg@apple.com>
1650 Web Inspector: expose system user interface layout direction through InspectorFrontendHost
1651 https://bugs.webkit.org/show_bug.cgi?id=168209
1652 <rdar://problem/11573736>
1654 Reviewed by Joseph Pecoraro.
1656 Forward the UserInterfaceLayoutDirection of the inspector page. If the WebKit client has
1657 properly set the UI directionality from system settings in PageClient, this will get inherited
1658 automatically by the Inspector's WebPage instance.
1660 * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
1661 (WebKit::RemoteWebInspectorUI::userInterfaceLayoutDirection):
1662 * WebProcess/WebPage/RemoteWebInspectorUI.h:
1663 * WebProcess/WebPage/WebInspectorUI.cpp:
1664 (WebKit::WebInspectorUI::userInterfaceLayoutDirection):
1665 * WebProcess/WebPage/WebInspectorUI.h:
1667 2017-02-13 Youenn Fablet <youennf@gmail.com>
1669 [WebRTC] Creating RTCPeerConnection with libwebrtc backend is crashing on rwt
1670 https://bugs.webkit.org/show_bug.cgi?id=168250
1672 Reviewed by Alex Christensen.
1674 * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
1675 (WebKit::LibWebRTCProvider::createPeerConnection):
1676 * WebProcess/Network/webrtc/LibWebRTCProvider.h:
1677 * WebProcess/Network/webrtc/LibWebRTCSocket.h:
1678 * WebProcess/Network/webrtc/WebRTCMonitor.cpp:
1679 (WebKit::WebRTCMonitor::StartUpdating):
1680 (WebKit::WebRTCMonitor::networksChanged):
1681 * WebProcess/Network/webrtc/WebRTCMonitor.h:
1682 * WebProcess/Network/webrtc/WebRTCResolver.cpp:
1683 (WebKit::WebRTCResolver::setResolvedAddress):
1684 (WebKit::WebRTCResolver::resolvedAddressError):
1685 * WebProcess/Network/webrtc/WebRTCSocket.cpp:
1686 (WebKit::WebRTCSocket::signalOnNetworkThread):
1688 2017-02-13 Megan Gardner <megan_gardner@apple.com>
1690 Implement Drag cancels
1691 https://bugs.webkit.org/show_bug.cgi?id=168266
1693 Reviewed by Wenson Hsieh.
1695 Adds support for the UI Process to cancel already started drag events.
1697 * UIProcess/WebPageProxy.cpp:
1698 (WebKit::WebPageProxy::cancelledDrag):
1699 * UIProcess/WebPageProxy.h:
1700 * WebProcess/WebPage/WebPage.h:
1701 (WebKit::WebPage::cancelledDrag):
1702 * WebProcess/WebPage/WebPage.messages.in:
1704 2017-02-13 Simon Fraser <simon.fraser@apple.com>
1706 Call WKDestroyRenderingResources() on iOS when tabs are backgrounded
1707 https://bugs.webkit.org/show_bug.cgi?id=168261
1708 rdar://problem/30481079
1710 Reviewed by Tim Horton.
1712 There's code to call CABackingStoreCollectBlocking() on a 10s timer that exists for Mac, but on iOS
1713 the web processes are suspended before this timer fires. So call CABackingStoreCollectBlocking()
1714 from WebProcess::actualPrepareToSuspend(), which is where we also trigger the markAllLayersVolatile()
1717 Also add CABackingStoreCollectBlocking() to QuartzCoreSPI.h so we can use it without using WKSI.
1719 Release-log how long this takes, in case we get reports of bad performance. In my testing it could be up to 10ms.
1721 * WebProcess/WebProcess.cpp:
1722 (WebKit::WebProcess::actualPrepareToSuspend):
1723 * WebProcess/cocoa/WebProcessCocoa.mm:
1724 (WebKit::WebProcess::destroyRenderingResources):
1726 2017-02-13 Brady Eidson <beidson@apple.com>
1728 Followup to: Replace all WebKit Library Version checks in WK2 with SDK version checks.
1729 https://bugs.webkit.org/show_bug.cgi?id=168124
1731 Reviewed by Geoffrey Garen.
1733 * UIProcess/Cocoa/VersionChecks.h:
1735 2017-02-13 Wenson Hsieh <wenson_hsieh@apple.com>
1737 [WK2] Add test infrastructure and unit tests for data interaction
1738 https://bugs.webkit.org/show_bug.cgi?id=168159
1739 <rdar://problem/30477634>
1741 Reviewed by Tim Horton.
1743 Adds support at the WebKit2 layer for testing data interaction. Introduces the _WKTestingDelegate, which a
1744 protocol which can specified for a WKWebView and used to install mock objects and simulate the state of the
1745 platform. By default, this delegate is nil, which results in normal behavior. For data interaction, we are able
1746 to specify a mock data interaction gesture recognizer for use by the WKContentView to simulate firing a long
1747 press and subsequent movement. This gesture recognizer is used in place of the regular data interaction gesture
1748 recognizer, and allows for TestWebKitAPI to drive interaction without actually sending events through the
1749 UIApplication. The _WKTestingDelegate also contains optional method hooks which are invoked at key points in
1750 time when performing a data interaction gesture.
1752 Since all methods of the testing delegate are optional, the testing delegate can be easily extended to support
1753 testing for other features -- the idea is that leaving all but the relevant methods in the protocol
1754 unimplemented will result in default behavior for everything other than those methods, so a client need only
1755 implement and add WebKit2 hooks for a few methods to support testing for a new feature.
1757 * UIProcess/API/Cocoa/WKWebView.mm:
1758 (-[WKWebView _testingDelegate]):
1759 (-[WKWebView _setTestingDelegate:]):
1761 Specify the testing delegate to use for this WKWebView (see above for more details).
1763 (-[WKWebView _simulateDataInteractionGestureRecognized]):
1764 (-[WKWebView _simulateDataInteractionEntered:]):
1765 (-[WKWebView _simulateDataInteractionUpdated:]):
1766 (-[WKWebView _simulateDataInteractionPerformOperation:]):
1767 (-[WKWebView _simulateDataInteractionEnded:]):
1768 (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]):
1769 (-[WKWebView _simulateFailedDataInteractionWithIndex:]):
1770 (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]):
1771 (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]):
1773 Used by TestWebKitAPI to drive data interaction tests. See DataInteractionTests.mm.
1775 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1776 * UIProcess/API/Cocoa/_WKTestingDelegate.h: Added.
1777 * UIProcess/ios/WKContentViewInteraction.h:
1778 * UIProcess/ios/WKContentViewInteraction.mm:
1779 (-[WKContentView setupInteraction]):
1780 (-[WKContentView _dataInteractionGestureRecognizer]):
1781 * WebKit2.xcodeproj/project.pbxproj:
1783 2017-02-13 Eric Carlson <eric.carlson@apple.com>
1785 [MediaStream Mac] Video capture needs access to /Library/CoreMediaIO/Plug-Ins/DAL/
1786 https://bugs.webkit.org/show_bug.cgi?id=168244
1787 <rdar://problem/30461158>
1789 Reviewed by Brady Eidson.
1791 * WebProcess/com.apple.WebProcess.sb.in: Grant read-access to the video capture
1792 plug-in directory when enabling video capture.
1794 2017-02-13 Antti Koivisto <antti@apple.com>
1796 Disable mmap'd cache files if container is class A
1797 https://bugs.webkit.org/show_bug.cgi?id=168241
1798 <rdar://problem/23676252>
1800 Reviewed by JF Bastien and Chris Dumez.
1802 If the mmap'd cache file gets evicted and the device is locked,
1803 then WebContent won't be able to bring the file back in under
1804 class A, causing SIGBUS.
1806 In those circumstances, don't use mmap'd files.
1808 * NetworkProcess/cache/NetworkCache.h:
1809 (WebKit::NetworkCache::Cache::canUseSharedMemoryForBodyData):
1810 * NetworkProcess/cache/NetworkCacheEntry.cpp:
1811 (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
1813 Don't initialize the shareable resource handle for the map if forbidden.
1815 * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
1816 (WebKit::NetworkCache::canUseSharedMemoryForPath):
1818 Query the system for the protection status of the cache path.
1820 * NetworkProcess/cache/NetworkCacheFileSystem.h:
1821 * NetworkProcess/cache/NetworkCacheStorage.cpp:
1822 (WebKit::NetworkCache::Storage::Storage):
1823 * NetworkProcess/cache/NetworkCacheStorage.h:
1824 (WebKit::NetworkCache::Storage::canUseSharedMemoryForBodyData):
1826 2017-02-13 Youenn Fablet <youennf@gmail.com>
1828 [WebRTC] libwebrtc socket factory is not assigning the right socket type
1829 https://bugs.webkit.org/show_bug.cgi?id=168233
1831 Reviewed by Brent Fulgham.
1833 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
1834 (WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
1835 (WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
1837 2017-02-13 Michael Catanzaro <mcatanzaro@igalia.com>
1839 [GTK] Unreviewed, add missing precondition check
1841 * WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp:
1842 (webkit_web_editor_get_page):
1844 2017-02-13 Michael Catanzaro <mcatanzaro@igalia.com>
1846 Unreviewed, fix another docs typo.
1848 * UIProcess/API/gtk/WebKitEditingCommands.h:
1850 2017-02-12 Michael Catanzaro <mcatanzaro@igalia.com>
1852 [GTK] Improve documentation of webkit_context_menu_set_user_data()
1853 https://bugs.webkit.org/show_bug.cgi?id=168214
1855 Reviewed by Carlos Garcia Campos.
1857 * UIProcess/API/gtk/WebKitContextMenu.cpp:
1859 2017-02-12 Dan Bernstein <mitz@apple.com>
1861 Tried to fix USE(APPLE_INTERNAL_SDK) builds after r212211.
1863 * UIProcess/mac/WebContextMenuProxyMac.mm:
1864 (WebKit::WebContextMenuProxyMac::createShareMenuItem): Use non-deprecated method.
1866 2017-02-12 Dan Bernstein <mitz@apple.com>
1868 [Cocoa] Some -respondsToSelector: checks are unnecessary
1869 https://bugs.webkit.org/show_bug.cgi?id=168183
1871 Reviewed by Tim Horton.
1873 * Platform/mac/LayerHostingContext.mm:
1874 (WebKit::LayerHostingContext::setColorMatchUntaggedContent): Removed unnecessary
1875 -respondsToSelector: check.
1876 (WebKit::LayerHostingContext::colorMatchUntaggedContent): Ditto.
1878 * Platform/mac/MenuUtilities.mm:
1879 (WebKit::menuItemTitleForTelephoneNumberGroup): Ditto.
1881 * Platform/spi/ios/UIKitSPI.h: Moved declaration of
1882 -[UIScrollView _isInterruptingDeceleration] from WKWebView.mm to the
1883 !USE(APPLE_INTERNAL_SDK) section here.
1885 * Shared/mac/ChildProcessMac.mm:
1886 (WebKit::ChildProcess::setSharedHTTPCookieStorage): Removed unnecessary -respondsToSelector:
1889 * Shared/mac/WebEventFactory.mm:
1890 (WebKit::typeForEvent): Ditto.
1892 * UIProcess/API/Cocoa/WKWebView.mm:
1893 (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Ditto.
1895 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1896 (WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup): Ditto.
1898 * UIProcess/Cocoa/WebViewImpl.mm:
1899 (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly): Ditto.
1901 * UIProcess/WKImagePreviewViewController.mm:
1902 (-[WKImagePreviewViewController previewActions]): Removed check whether _WKElementAction
1903 responds to -runActionWithElementInfo:.
1905 * UIProcess/ios/WKActionSheetAssistant.mm:
1906 (-[WKActionSheetAssistant showDataDetectorsSheet]): Ditto.
1908 * UIProcess/ios/WKContentViewInteraction.mm:
1909 (-[WKContentView _lookup:]): Ditto.
1910 (-[WKContentView _share:]): Ditto.
1911 (-[WKContentView _addShortcut:]): Ditto.
1912 (-[WKContentView _promptForReplace:]): Ditto.
1913 (-[WKContentView _transliterateChinese:]): Ditto.
1914 (-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Removed call to
1915 -[UIKeyboardImpl didHandleWebKeyEvent], which is a no-op.
1916 (-[WKContentView _interpretKeyEvent:isCharEvent:]): Removed unnecessary -respondsToSelector:
1918 (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Ditto.
1920 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1921 (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence): Ditto.
1923 * UIProcess/mac/WKImmediateActionController.mm:
1924 (-[WKImmediateActionController _animationControllerForDataDetectedText]): Ditto.
1926 * UIProcess/mac/WebContextMenuProxyMac.mm:
1927 (WebKit::WebContextMenuProxyMac::createShareMenuItem): Ditto.
1929 2017-02-12 Michael Catanzaro <mcatanzaro@igalia.com>
1931 [GTK] Unreviewed, minor documentation improvements
1933 * UIProcess/API/gtk/WebKitWebView.cpp:
1934 (webkit_web_view_class_init):
1935 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1936 (webkit_web_page_class_init):
1938 2017-02-12 Carlos Garcia Campos <cgarcia@igalia.com>
1940 [SOUP] Downloads fail when the given destination is not a URI
1941 https://bugs.webkit.org/show_bug.cgi?id=168187
1943 Reviewed by Michael Catanzaro.
1945 It always expects a uri, and fails if a local path is given.
1947 Fixes: http/tests/download/anchor-download-no-extension.html
1948 http/tests/download/area-download.html
1949 http/tests/security/anchor-download-allow-data.html
1950 http/tests/security/anchor-download-allow-sameorigin.html
1952 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1953 (WebKit::NetworkDataTaskSoup::download): Use g_file_new_for_path() if the pending destination is a path instead
1956 2017-02-12 Carlos Garcia Campos <cgarcia@igalia.com>
1958 [GTK] Handle caps lock indicator in event modifiers
1959 https://bugs.webkit.org/show_bug.cgi?id=168186
1961 Reviewed by Michael Catanzaro.
1963 Use PlatformKeyboardEvent::modifiersContainCapsLock() to check if modifiers contain the caps lock and add
1964 Modifiers::CapsLockKey in that case.
1966 * Shared/gtk/WebEventFactory.cpp:
1967 (WebKit::modifiersForEvent):
1968 * UIProcess/API/gtk/WebKitPrivate.cpp:
1969 (wkEventModifiersToGdkModifiers):
1972 2017-02-12 Andy Estes <aestes@apple.com>
1974 [iOS] PDF page number indicator can show "0 of n" on short pages
1975 https://bugs.webkit.org/show_bug.cgi?id=168185
1977 Reviewed by Tim Horton.
1979 When viewing a PDF with a last page that is shorter than the frame height, it's possible
1980 (thanks to rubber-banding) to scroll down until the page no longer intersects the rect we
1981 use to determine the center page. When this happens, the page number indicator displays
1984 Fix this by handling cases where the first page starts below the center page rect or the
1985 last page ends above it.
1987 * UIProcess/ios/WKPDFView.mm:
1988 (-[WKPDFView _revalidateViews]):
1990 2017-02-11 Alex Christensen <achristensen@webkit.org>
1992 Fix crashes after [NSURLSession invalidateAndCancel]
1993 https://bugs.webkit.org/show_bug.cgi?id=168181
1994 <rdar://problem/29813868>
1996 Reviewed by Brady Eidson.
1998 When we call NetworkSessionCocoa::invalidateAndCancel, we intend for the session to immediately
1999 become invalid and stop doing things. [NSURLSession invalidateAndCancel] asynchronously cancels
2000 everything and then calls the delegate's didBecomeInvalidWithError, so before this change there
2001 is a time when we have torn down the session with SessionTracker::destroySession but we can still
2002 get a delegate callback which assumes the session and its NetworkStorageSession exists. If we
2003 get any delegate callbacks after a NetworkSession has been invalidated, we will want to ignore them.
2005 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2006 (-[WKNetworkSessionDelegate sessionInvalidated]):
2007 (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]):
2008 (-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
2009 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
2010 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
2011 (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
2012 (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
2013 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
2014 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
2015 (-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
2016 (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
2017 (-[WKNetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]):
2018 (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
2019 The pointer to the NetworkSessionCocoa can now be null. We need to check it.
2020 (WebKit::NetworkSessionCocoa::invalidateAndCancel):
2021 Synchronously remove the connection between the delegates and the NetworkSessionCocoa.
2023 2017-02-10 John Wilander <wilander@apple.com>
2025 Updates to Resource Load Statistics: Get the right website data store and introduce timeout for user interaction
2026 https://bugs.webkit.org/show_bug.cgi?id=167474
2027 <rdar://problem/24681808>
2028 <rdar://problem/24703286>
2029 <rdar://problem/30290270>
2031 This patch does the following:
2032 1. Gets the right website data store. API::WebsiteDataStore::defaultDataStore()
2033 does not provide the right data store.
2034 2. Introduces timeout for user interaction. A domain needs interaction every 30
2035 days to stay in that category.
2036 3. Adds grandfathered to the statistics model in preparation for grandfathering of
2037 existing data records.
2038 4. Adds test infrastructure to allow testing of the various rules in place for
2039 data records removal.
2040 5. Fixes various smaller bugs that were found as part of setting up the tests.
2041 6. Regresses the data records removal counting. We need to come up with a thread
2042 safe way of gathering removal statistics from more than one data store now
2043 that we potentially interact with multiple stores.
2044 7. Adds a first set of layout tests for resource load statistics.
2046 Reviewed by Andy Estes.
2048 * PlatformEfl.cmake:
2049 Added UIProcess/WebResourceLoadStatisticsManager.cpp and
2050 UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
2051 * PlatformGTK.cmake:
2052 Added UIProcess/WebResourceLoadStatisticsManager.cpp and
2053 UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
2054 * PlatformMac.cmake:
2055 Added UIProcess/WebResourceLoadStatisticsManager.cpp and
2056 UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
2057 * Shared/API/APIObject.h:
2058 Adds WebResourceLoadStatisticsManager to the Type enum.
2059 * Shared/API/c/WKBase.h:
2060 Typedef of WKResourceLoadStatisticsManagerRef.
2061 * Shared/WebCoreArgumentCoders.cpp:
2062 (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
2063 (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
2064 Adds support for statistics mostRecentUserInteraction, grandfathered, and
2066 * UIProcess/API/C/WKAPICast.h:
2067 Adds API mapping between WKResourceLoadStatisticsManagerRef and
2068 WebResourceLoadStatisticsManager.
2069 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp: Added.
2070 (WKResourceLoadStatisticsManagerGetTypeID):
2071 (WKResourceLoadStatisticsManagerSetPrevalentResource):
2072 (WKResourceLoadStatisticsManagerIsPrevalentResource):
2073 (WKResourceLoadStatisticsManagerSetHasHadUserInteraction):
2074 (WKResourceLoadStatisticsManagerIsHasHadUserInteraction):
2075 (WKResourceLoadStatisticsManagerSetTimeToLiveUserInteraction):
2076 (WKResourceLoadStatisticsManagerFireDataModificationHandler):
2077 (WKResourceLoadStatisticsManagerSetNotifyPagesWhenDataRecordsWereScanned):
2078 (WKResourceLoadStatisticsManagerSetShouldClassifyResourcesBeforeDataRecordsRemoval):
2079 (WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
2080 (WKResourceLoadStatisticsManagerResetToConsistentState):
2081 API level bridge to WebResourceLoadStatisticsManager functions.
2082 * UIProcess/API/C/WKResourceLoadStatisticsManager.h: Added.
2083 * UIProcess/WebProcessProxy.cpp:
2084 (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyOwnedDomainsInAllPersistentDataStores):
2085 A way to delete website data in persistent store(s) configured by the
2086 embedding client. API::WebsiteDataStore::defaultDataStore() does not
2087 do this which caused us to skip session storage.
2088 * UIProcess/WebProcessProxy.h:
2089 * UIProcess/WebResourceLoadStatisticsManager.cpp: Added.
2090 (WebKit::WebResourceLoadStatisticsManager::setPrevalentResource):
2091 (WebKit::WebResourceLoadStatisticsManager::isPrevalentResource):
2092 (WebKit::WebResourceLoadStatisticsManager::setHasHadUserInteraction):
2093 (WebKit::WebResourceLoadStatisticsManager::hasHadUserInteraction):
2094 (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
2095 (WebKit::WebResourceLoadStatisticsManager::fireDataModificationHandler):
2096 (WebKit::WebResourceLoadStatisticsManager::setNotifyPagesWhenDataRecordsWereScanned):
2097 (WebKit::WebResourceLoadStatisticsManager::setShouldClassifyResourcesBeforeDataRecordsRemoval):
2098 (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
2099 (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
2100 Static functions to manage the state and behavior of the UI process'
2101 resource load statistics store.
2102 * UIProcess/WebResourceLoadStatisticsManager.h: Added.
2103 (WebKit::WebResourceLoadStatisticsManager::create):
2104 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2105 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
2106 An effect of a member variable rename. See header file comment below.
2107 (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned):
2108 (WebKit::WebResourceLoadStatisticsStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
2109 (WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval):
2110 Three static functions for controlling the behavior of the store.
2111 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
2113 1. Covers all data record types.
2114 2. Allows data removal when m_lastTimeDataRecordsWereRemoved is not set.
2115 3. Moves the heavy lifting to WebsiteDataStore (see below).
2116 4. No longer counts removed data regressions.
2117 (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
2119 (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
2120 WebResourceLoadStatisticsStore::processStatisticsAndDataRecords() is
2121 broken out of WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated
2122 to allow for statistics processing without prior classification.
2123 Tests need to set statistics and a run of the classifier may
2125 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
2126 Sets the notification callback which calls
2127 WebResourceLoadStatisticsStore::processStatisticsAndDataRecords().
2128 * UIProcess/WebResourceLoadStatisticsStore.h:
2129 (WebKit::WebResourceLoadStatisticsStore::coreStore):
2130 Renamed m_resourceStatisticsStore to m_resourceLoadStatisticsStore to
2131 harmonize with other naming.
2132 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2133 (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyOwnedDomains):
2134 This is now where matching is made between prevalent resources
2135 and data records. This function is used by
2136 WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains().
2137 (WebKit::WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains):
2138 The function WebResourceLoadStatisticsStore::removeDataRecords()
2139 calls to get data records removed in all persistent stores.
2140 * UIProcess/WebsiteData/WebsiteDataStore.h:
2141 * WebKit2.xcodeproj/project.pbxproj:
2142 * WebProcess/WebProcess.cpp:
2143 (WebKit::m_resourceLoadStatisticsStore):
2144 (WebKit::WebProcess::statisticsChangedTimerFired):
2145 (WebKit::m_resourceLoadStatisticsStorage): Deleted.
2146 Renamed m_resourceLoadStatisticsStorage to m_resourceLoadStatisticsStore
2147 to harmonize with other naming.
2148 * WebProcess/WebProcess.h:
2150 2017-02-10 Simon Fraser <simon.fraser@apple.com>
2152 Zero out some WKWebView state in the case of a web content crash
2153 https://bugs.webkit.org/show_bug.cgi?id=168157
2155 Reviewed by Tim Horton.
2157 Reset some bits of state in WKWebView when the web content process crashes, in
2158 to try to avoid states that might cause the web view to stay blank.
2160 * UIProcess/API/Cocoa/WKWebView.mm:
2161 (-[WKWebView _processDidExit]):
2163 2017-02-10 Daniel Bates <dabates@apple.com>
2165 Detach frame from document when entering page cache
2166 https://bugs.webkit.org/show_bug.cgi?id=166774
2167 <rdar://problem/29904368>
2169 Reviewed by Chris Dumez.
2171 * Shared/WebPreferencesDefinitions.h:
2172 * UIProcess/API/C/WKPreferences.cpp:
2173 (WKPreferencesSetAllowsPageCacheWithWindowOpener): Deleted.
2174 (WKPreferencesGetAllowsPageCacheWithWindowOpener): Deleted.
2175 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2176 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2177 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2178 * WebProcess/WebPage/WebPage.cpp:
2179 (WebKit::WebPage::updatePreferences):
2181 2017-02-10 Carlos Garcia Campos <cgarcia@igalia.com>
2183 WebInspector: refactor RemoteInspector to move cocoa specific code to their own files
2184 https://bugs.webkit.org/show_bug.cgi?id=166681
2186 Reviewed by Michael Catanzaro.
2188 * WebProcess/WebProcess.cpp:
2189 (WebKit::WebProcess::initializeWebProcess): Add PLATFORM(COCOA) to the ifdef.
2191 2017-02-10 Tim Horton <timothy_horton@apple.com>
2193 Infinite UI process hang under ensurePositionInformationIsUpToDate
2194 https://bugs.webkit.org/show_bug.cgi?id=168154
2195 <rdar://problem/30428673>
2197 Reviewed by Simon Fraser.
2199 * UIProcess/ios/WKContentViewInteraction.mm:
2200 (-[WKContentView cleanupInteraction]):
2201 If the web process crashes or we're being torn down for another reason,
2202 assume that we aren't ever going to receive any pending async interaction
2203 information update. Otherwise, ensurePositionInformationIsUpToDate can end
2204 up waiting for it forever.
2206 2017-02-10 Andrew Gold <agold@apple.com>
2208 Add mediaStreamEnabled property to WKPreferences for Cocoa.
2209 https://bugs.webkit.org/show_bug.cgi?id=168080
2211 Reviewed by Tim Horton.
2213 * UIProcess/API/Cocoa/WKWebView.mm:
2214 (-[WKWebView _initializeWithConfiguration:]): Sets the pageConfiguration's mediaStreamEnabled preference value.
2216 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2217 (-[WKWebViewConfiguration copyWithZone:]): Copies the mediaStreamEnabled property.
2218 (-[WKWebViewConfiguration _mediaStreamEnabled]): Gets the mediaStreamEnabled property.
2219 (-[WKWebViewConfiguration _setMediaStreamEnabled:]): Sets the mediaStreamEnabled property.
2220 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2222 2017-02-10 Olivier Blin <olivier.blin@softathome.com>
2224 WebProcess: remove unused m_inDidClose
2225 https://bugs.webkit.org/show_bug.cgi?id=168121
2227 Reviewed by Alex Christensen.
2229 * WebProcess/WebProcess.cpp:
2230 (WebKit::WebProcess::didClose):
2231 * WebProcess/WebProcess.h:
2232 m_inDidClose has been unused since r83774
2234 2017-02-10 Joseph Pecoraro <pecoraro@apple.com>
2236 [Resource Timing] Enable Resource Timing by default in Tests
2237 https://bugs.webkit.org/show_bug.cgi?id=168145
2239 Reviewed by Ryosuke Niwa.
2241 * Shared/WebPreferencesDefinitions.h:
2242 * UIProcess/API/C/WKPreferences.cpp:
2243 (WKPreferencesSetResourceTimingEnabled):
2244 (WKPreferencesGetResourceTimingEnabled):
2245 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2246 * WebProcess/WebPage/WebPage.cpp:
2247 (WebKit::WebPage::updatePreferences):
2249 2017-02-10 Dan Bernstein <mitz@apple.com>
2251 [Cocoa] Add shouldChangeSelectedRange to WKWebProcessPlugInEditingDelegate
2252 https://bugs.webkit.org/show_bug.cgi?id=168097
2254 Reviewed by Tim Horton.
2256 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
2257 Declared new delegate method.
2258 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2259 (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Dispatch new delegate
2262 * WebProcess/WebPage/ios/WebPageIOS.mm:
2263 (WebKit::WebPage::selectWithGesture): Pass UserTriggered whan calling
2264 WebCore::Frame::Selection::setSelectedRange, so that the delegate is consulted.
2265 (WebKit::WebPage::changeBlockSelection): Ditto.
2266 (WebKit::WebPage::updateSelectionWithTouches): Ditto.
2267 (WebKit::WebPage::selectWithTwoTouches): Ditto.
2268 (WebKit::WebPage::extendSelection): Ditto.
2269 (WebKit::WebPage::selectWordBackward): Ditto,
2270 (WebKit::WebPage::moveSelectionByOffset): Ditto.
2271 (WebKit::WebPage::selectPositionAtPoint): Ditto.
2272 (WebKit::WebPage::selectPositionAtBoundaryWithDirection): Ditto.
2273 (WebKit::WebPage::moveSelectionAtBoundaryWithDirection): Ditto.
2274 (WebKit::WebPage::selectTextWithGranularityAtPoint): Ditto.
2275 (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary): Ditto.
2276 (WebKit::WebPage::updateSelectionWithExtentPoint): Ditto.
2278 2017-02-10 Brady Eidson <beidson@apple.com>
2280 Replace all WebKit Library Version checks in WK2 with SDK version checks.
2281 https://bugs.webkit.org/show_bug.cgi?id=168124
2283 Reviewed by Geoffrey Garen.
2285 This change gets rid of WebKit Library Version checks and replaces them with SDK version checks.
2287 To allow our tools to still be able to test new behaviors even when built against older SDKs,
2288 it also opts them into an SPI default to have "linkedOnOrAfter()" always return true.
2290 * Shared/Cocoa/CompletionHandlerCallChecker.mm:
2291 (WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):
2293 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2294 (-[WKWebViewConfiguration init]):
2296 * UIProcess/Cocoa/VersionChecks.h:
2297 (WebKit::linkedOnOrAfter): Deleted.
2298 * UIProcess/Cocoa/VersionChecks.mm:
2299 (WebKit::linkedOnOrAfter):
2301 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2302 (WebKit::WebProcessPool::isNetworkCacheEnabled):
2304 2017-02-10 Brian Burg <bburg@apple.com>
2306 [Cocoa] Web Inspector: generate an NS_ENUM containing platforms supported by the protocol code generator
2307 https://bugs.webkit.org/show_bug.cgi?id=168019
2308 <rdar://problem/28718990>
2310 Reviewed by Joseph Pecoraro.
2312 * UIProcess/Automation/Automation.json: Fix the platform values to be lowercase.
2314 2017-02-10 Brian Burg <bburg@apple.com>
2316 Web Automation: fail gracefully when a screenshot cannot be encoded as base64
2317 https://bugs.webkit.org/show_bug.cgi?id=168095
2318 <rdar://problem/30297427>
2320 Reviewed by Joseph Pecoraro.
2322 Convert platformGetBase64EncodedPNGData to return a std::optional<String>.
2323 Return nullopt if we can't create a screenshot or convert it to base64.
2325 * UIProcess/Automation/WebAutomationSession.cpp:
2326 (WebKit::WebAutomationSession::didTakeScreenshot):
2327 (WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
2328 * UIProcess/Automation/WebAutomationSession.h:
2329 * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
2330 (WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
2332 2017-02-09 Carlos Garcia Campos <cgarcia@igalia.com>
2334 Unreviewed. Fix GTK+ build with threaded compositor disabled.
2336 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
2337 (WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):
2338 (WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeNow):
2340 2017-02-09 Alex Christensen <achristensen@webkit.org>
2342 Unreviewed, rolling out r212040.
2344 Broke build. I'm not surprised
2348 "[WebRTC][Mac] Activate libwebrtc"
2349 https://bugs.webkit.org/show_bug.cgi?id=167293
2350 http://trac.webkit.org/changeset/212040
2352 2017-02-09 Chris Dumez <cdumez@apple.com>
2354 [Mac][WK2] Use MIME type to add file extension to downloads' suggested filenames when missing
2355 https://bugs.webkit.org/show_bug.cgi?id=168077
2356 <rdar://problem/30412595>
2358 Reviewed by Alex Christensen.
2360 Use MIME type to add file extension to downloads' suggested filenames when missing:
2361 - https://html.spec.whatwg.org/#as-a-download (step 19)
2363 This new behavior matches Chrome.
2365 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
2366 (WebKit::BlobDownloadClient::didReceiveResponseAsync):
2367 * NetworkProcess/Downloads/Download.cpp:
2368 (WebKit::Download::didReceiveResponse):
2369 (WebKit::Download::decideDestinationWithSuggestedFilename):
2370 * NetworkProcess/Downloads/Download.h:
2371 * NetworkProcess/NetworkProcess.cpp:
2372 (WebKit::NetworkProcess::findPendingDownloadLocation):
2373 * UIProcess/Downloads/DownloadProxy.cpp:
2374 (WebKit::DownloadProxy::didStart):
2375 (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
2376 * UIProcess/Downloads/DownloadProxy.h:
2377 * UIProcess/Downloads/DownloadProxy.messages.in:
2379 2017-02-09 Youenn Fablet <youenn@apple.com>
2381 [WebRTC][Mac] Activate libwebrtc
2382 https://bugs.webkit.org/show_bug.cgi?id=167293
2384 Reviewed by Alex Christensen.
2386 * Shared/WebPreferencesDefinitions.h:
2388 2017-02-09 Alex Christensen <achristensen@webkit.org>
2390 Fix libwebrtc build on case-sensitive file systems.
2392 * WebProcess/Network/webrtc/WebRTCMonitor.cpp:
2394 2017-02-09 Alex Christensen <achristensen@webkit.org>
2398 * PlatformMac.cmake:
2400 2017-02-09 Brady Eidson <beidson@apple.com>
2402 Transition "WebKit Library Version" checks to SDK version checks.
2403 <rdar://problem/30313696> and https://bugs.webkit.org/show_bug.cgi?id=168056
2405 Reviewed by Geoffrey Garen.
2407 When doing linkedOnOrAfter checks, relying solely on the WebKit library version number is error prone,
2408 since apps may not link against WebKit directly and therefore the linked WebKit is unknown.
2410 We should first prefer a version check on the SDK that the app was built with.
2412 If that check fails, we can fallback to the linked WebKit library version number if it exists.
2414 * Shared/Cocoa/CompletionHandlerCallChecker.mm:
2415 (WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):
2417 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2418 (-[WKWebViewConfiguration init]):
2420 For each "linked-on-or-after" feature, include both the WebKit library version and SDK version:
2421 * UIProcess/Cocoa/VersionChecks.h:
2422 (WebKit::linkedOnOrAfter):
2423 * UIProcess/Cocoa/VersionChecks.mm:
2424 (WebKit::linkedOnOrAfter):
2425 (WebKit::linkTimeVersion): Deleted.
2427 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2428 (WebKit::WebProcessPool::isNetworkCacheEnabled):
2430 2017-02-09 Commit Queue <commit-queue@webkit.org>
2432 Unreviewed, rolling out r211980 and r211987.
2433 https://bugs.webkit.org/show_bug.cgi?id=168072
2435 Caused API test WebKit2.DuplicateCompletionHandlerCalls to
2436 fail (Requested by ryanhaddad on #webkit).
2438 Reverted changesets:
2440 "Transition "WebKit Library Version" checks to SDK version
2442 https://bugs.webkit.org/show_bug.cgi?id=168056
2443 http://trac.webkit.org/changeset/211980
2445 "Build fix for APPLE_INTERNAL_SDK builds after r211980."
2446 http://trac.webkit.org/changeset/211987
2448 2017-02-09 Brady Eidson <beidson@apple.com>
2450 Transition "WebKit Library Version" checks to SDK version checks.
2451 <rdar://problem/30313696> and https://bugs.webkit.org/show_bug.cgi?id=168056
2453 Reviewed by Geoffrey Garen.
2455 Library version linkedOnOrAfter checks are error prone since apps may not link directly to WebKit.
2457 We always know what version of the SDK an app was built with, so we should use SDK version checks
2460 * Shared/Cocoa/CompletionHandlerCallChecker.mm:
2461 (WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):
2463 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2464 (-[WKWebViewConfiguration init]):
2466 Add SDKVersion form of the linkedOnOrAfter check, and transition over the current Library Version checks:
2467 * UIProcess/Cocoa/VersionChecks.h:
2468 * UIProcess/Cocoa/VersionChecks.mm:
2469 (WebKit::linkedOnOrAfter):
2471 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2472 (WebKit::WebProcessPool::isNetworkCacheEnabled):
2474 2017-02-09 Antti Koivisto <antti@apple.com>
2476 Use all cacheable speculatively loaded responses
2477 https://bugs.webkit.org/show_bug.cgi?id=168052
2479 Reviewed by Andreas Kling.
2481 We currently only allow 200 responses. There is no reason not to use speculative responses
2482 that have other cacheable status codes. This is helpful for 204s and 404s.
2484 * NetworkProcess/cache/NetworkCache.cpp:
2485 (WebKit::NetworkCache::makeStoreDecision):
2486 (WebKit::NetworkCache::isStatusCodeCacheableByDefault): Deleted.
2487 (WebKit::NetworkCache::isStatusCodePotentiallyCacheable): Deleted.
2489 Move to CacheValidation.h/cpp
2491 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
2492 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
2494 Allow all cacheable-by-default responses.
2496 2017-02-09 Tomas Popela <tpopela@redhat.com>
2498 Unreviewed. Fix gtk-doc warning
2500 html/WebKitSettings.html:4435: warning: no link for: 'api-index-2.3' -> (2.3).
2502 * UIProcess/API/gtk/WebKitSettings.cpp:
2503 (webkit_settings_class_init):
2505 2017-02-09 Antti Koivisto <antti@apple.com>
2507 Remove most cases of #if ENABLE(CACHE_PARTITIONING)
2508 https://bugs.webkit.org/show_bug.cgi?id=167990
2510 Reviewed by Sam Weinig.
2512 * NetworkProcess/NetworkResourceLoader.cpp:
2513 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
2514 * NetworkProcess/cache/NetworkCache.cpp:
2515 (WebKit::NetworkCache::Cache::makeCacheKey):
2516 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2517 (WebKit::NetworkCache::constructRevalidationRequest):
2518 * Shared/WebCoreArgumentCoders.cpp:
2519 (IPC::ArgumentCoder<ResourceRequest>::encode):
2520 (IPC::ArgumentCoder<ResourceRequest>::decode):
2521 * Shared/WebProcessCreationParameters.cpp:
2522 (WebKit::WebProcessCreationParameters::encode):
2523 (WebKit::WebProcessCreationParameters::decode):
2524 * Shared/WebProcessCreationParameters.h:
2525 * UIProcess/API/C/WKContext.cpp:
2526 (WKContextRegisterURLSchemeAsCachePartitioned):
2527 * UIProcess/WebProcessPool.cpp:
2528 (WebKit::m_hiddenPageThrottlingTimer):
2529 (WebKit::WebProcessPool::createNewWebProcess):
2530 (WebKit::WebProcessPool::registerURLSchemeAsCachePartitioned):
2531 * UIProcess/WebProcessPool.h:
2532 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2533 (InitWebCoreSystemInterface):
2534 * WebProcess/WebProcess.cpp:
2535 (WebKit::WebProcess::initializeWebProcess):
2536 (WebKit::WebProcess::registerURLSchemeAsCachePartitioned):
2537 * WebProcess/WebProcess.h:
2538 * WebProcess/WebProcess.messages.in:
2540 2017-02-08 Simon Fraser <simon.fraser@apple.com>
2542 Put names on more UIViews for ease of debugging
2543 https://bugs.webkit.org/show_bug.cgi?id=168035
2545 Reviewed by Tim Horton.
2547 Put names on the various bare UIViews that we create.
2549 * UIProcess/API/Cocoa/WKWebView.mm:
2550 (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
2551 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2552 * UIProcess/ios/ViewGestureControllerIOS.mm:
2553 (WebKit::ViewGestureController::beginSwipeGesture):
2554 * UIProcess/ios/WKContentView.mm:
2555 (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
2556 * UIProcess/ios/WKContentViewInteraction.mm:
2557 (-[WKContentView setupInteraction]):
2558 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2559 (WebKit::WebInspectorClient::showPaintRect):
2560 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2561 (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2563 2017-02-08 Andy Estes <aestes@apple.com>
2565 Custom protocols should not continue loading after a network process crash
2566 https://bugs.webkit.org/show_bug.cgi?id=168028
2567 <rdar://problem/27607520>
2569 Reviewed by Brady Eidson.
2571 WKCustomProtocolLoaders are meant to be owned by CustomProtocolManagerProxy and have their
2572 loads cancelled when CustomProtocolManagerProxy is destroyed. However, WKCustomProtocolLoader
2573 creates a NSURLConnection for which it is the client, so NSURLConnection retains it for the
2574 duration of the load.
2576 These loaders should be explicitly cancelled when their CustomProtocolManagerProxy is destroyed.
2578 New API test: WebKit2CustomProtocolsTest.CloseDuringCustomProtocolLoad
2580 * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2581 (-[WKCustomProtocolLoader customProtocolManagerProxyDestroyed]): Added. Cancels the
2582 _urlConnection and sets _customProtocolManagerProxy to nullptr.
2583 (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
2584 Called -customProtocolManagerProxyDestroyed on every loader in m_loaderMap.
2586 2017-02-08 Dan Bernstein <mitz@apple.com>
2588 [Cocoa] WKRemoteObjectCoder doesn’t handle CGSize
2589 https://bugs.webkit.org/show_bug.cgi?id=168031
2591 Reviewed by Tim Horton.
2593 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2594 (encodeInvocationArguments): Encode CGSize by encoding two NSNumbers. Somewhat sadly,
2595 +[NSValue valueWithCGSize:] is not available in macOS.
2596 (decodeInvocationArguments): Decode wrapped numbers.
2598 2017-02-08 Dan Bernstein <mitz@apple.com>
2600 Tried to fix the build after r211897.
2602 * UIProcess/ios/WKContentViewInteraction.h:
2604 2017-02-08 Dan Bernstein <mitz@apple.com>
2606 [iOS] WKWebView doesn’t have implementations of UIResponderStandardEditActions that can be overridden
2607 https://bugs.webkit.org/show_bug.cgi?id=167974
2609 Reviewed by Tim Horton.
2611 * UIProcess/API/Cocoa/WKWebView.mm:
2612 Gave each of the actions in FOR_EACH_WKCONTENTVIEW_ACTION an implementation that sends it
2613 to the WKContentView if we’re using one.
2614 (-[WKWebView canPerformAction:withSender:]): Override and for each of the actions in
2615 FOR_EACH_WKCONTENTVIEW_ACTION, forward to
2616 -[WKContentView canPerformActionForWebView:withSender:] if we’re using a WKContentView,
2617 otherwise returning NO.
2619 * UIProcess/ios/WKContentViewInteraction.h: Declared -canPerformActionForWebView:withSender:
2620 and several internal methods we override.
2621 * UIProcess/ios/WKContentViewInteraction.mm:
2622 (-[WKContentView canPerformAction:withSender:]): Now returns NO so that the target for any
2623 action is the WKWebView.
2624 (-[WKContentView canPerformActionForWebView:withSender:]): Moved the logic previously in
2625 -canPerformAction:withSender: to here.
2627 2017-02-08 Antti Koivisto <antti@apple.com>
2629 Allow speculative redirects
2630 https://bugs.webkit.org/show_bug.cgi?id=167982
2632 Reviewed by Andreas Kling.
2634 If speculative loader hits a redirect it will drop it on the floor. We should use it instead.
2636 * NetworkProcess/NetworkResourceLoader.cpp:
2637 (WebKit::NetworkResourceLoader::continueWillSendRequest):
2638 (WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
2640 Reset m_isWaitingContinueWillSendRequestForCachedRedirect bit immediately.
2642 * NetworkProcess/cache/NetworkCache.cpp:
2643 (WebKit::NetworkCache::Cache::makeRedirectEntry):
2645 Factor to a function.
2647 (WebKit::NetworkCache::Cache::storeRedirect):
2648 * NetworkProcess/cache/NetworkCache.h:
2649 (WebKit::NetworkCache::Cache::speculativeLoadManager):
2650 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2651 (WebKit::NetworkCache::Entry::Entry):
2653 Use std::optional instead std::unique_ptr for the redirect request.
2655 (WebKit::NetworkCache::Entry::decodeStorageRecord):
2656 * NetworkProcess/cache/NetworkCacheEntry.h:
2657 (WebKit::NetworkCache::Entry::redirectRequest):
2658 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
2659 (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
2661 Make a cache entry for speculative redirect.
2662 Redirect is not actually performed, the target resource will have a separate
2665 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
2666 (WebKit::NetworkCache::SpeculativeLoad::didFailLoading):
2667 (WebKit::NetworkCache::SpeculativeLoad::didComplete):
2669 Protect against multiple completions.
2671 (WebKit::NetworkCache::SpeculativeLoad::abort): Deleted.
2672 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
2673 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2674 (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
2676 Make successful retrieves asynchronous to avoid re-entrancy problems.
2678 2017-02-08 Jer Noble <jer.noble@apple.com>
2680 Unreviewed build fix; FullscreenClient only avaialble on 32-bit builds.
2682 * UIProcess/Cocoa/WebViewImpl.mm:
2683 (WebKit::WebViewImpl::WebViewImpl):
2685 2017-02-08 Jer Noble <jer.noble@apple.com>
2687 Move FullscreenClient creation into WebViewImpl, for use in (deprecated) WKView.
2688 https://bugs.webkit.org/show_bug.cgi?id=168007
2690 Reviewed by Alex Christensen.
2692 * UIProcess/API/Cocoa/WKWebView.mm:
2693 (-[WKWebView _initializeWithConfiguration:]):
2694 * UIProcess/API/Cocoa/_WKFullscreenDelegate.h:
2695 * UIProcess/Cocoa/FullscreenClient.h:
2696 * UIProcess/Cocoa/FullscreenClient.mm:
2697 (WebKit::FullscreenClient::FullscreenClient):
2698 * UIProcess/Cocoa/WebViewImpl.mm:
2699 (WebKit::WebViewImpl::WebViewImpl):
2701 2017-02-08 Youenn Fablet <youenn@apple.com>
2703 GUM is crashing in Debug mode when access is granted/denied for a page that is gone
2704 https://bugs.webkit.org/show_bug.cgi?id=168003
2706 Reviewed by Eric Carlson.
2708 Removing the assertion since manager can be null and case is coevered by the if statement behind it.
2710 * UIProcess/UserMediaPermissionRequestProxy.cpp:
2711 (WebKit::UserMediaPermissionRequestProxy::deny):
2713 2017-02-08 Ryan Haddad <ryanhaddad@apple.com>
2715 Unreviewed, rolling out r211869.
2717 This change caused assertion failures on macOS WK2.
2721 "Allow speculative redirects"
2722 https://bugs.webkit.org/show_bug.cgi?id=167982
2723 http://trac.webkit.org/changeset/211869
2725 2017-02-08 Eric Carlson <eric.carlson@apple.com>
2727 Add WebRTC as an off-by-default experimental feature menu item.
2728 https://bugs.webkit.org/show_bug.cgi?id=167972
2729 <rdar://problem/30293429>
2731 Reviewed by Jon Lee.
2733 * Shared/WebPreferencesDefinitions.h:
2734 * UIProcess/WebPreferences.cpp:
2735 (WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): We need to enable/disable
2736 peer connection and media stream preferences at the same time, so special case them.
2737 (WebKit::WebPreferences::setEnabledForFeature):
2738 * UIProcess/WebPreferences.h:
2740 2017-02-08 Chris Dumez <cdumez@apple.com>
2742 Add support for enhanced privacy diagnostic logging
2743 https://bugs.webkit.org/show_bug.cgi?id=167948
2744 <rdar://problem/30385112>
2746 Reviewed by Antti Koivisto.
2748 Implement new DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy()
2749 virtual method on WebKit2 and expose it to the client via the WKPageDiagnosticLogging
2752 * UIProcess/API/APIDiagnosticLoggingClient.h:
2753 (API::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
2754 * UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
2755 * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
2756 * UIProcess/Cocoa/DiagnosticLoggingClient.h:
2757 * UIProcess/Cocoa/DiagnosticLoggingClient.mm:
2758 (WebKit::DiagnosticLoggingClient::setDelegate):
2759 (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
2760 * UIProcess/WebPageDiagnosticLoggingClient.cpp:
2761 (WebKit::WebPageDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
2762 * UIProcess/WebPageDiagnosticLoggingClient.h:
2763 * UIProcess/WebPageProxy.cpp:
2764 (WebKit::WebPageProxy::logDiagnosticMessageWithEnhancedPrivacy):
2765 * UIProcess/WebPageProxy.h:
2766 * UIProcess/WebPageProxy.messages.in:
2767 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2768 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
2769 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
2771 2017-02-08 Antti Koivisto <antti@apple.com>
2773 Allow speculative redirects
2774 https://bugs.webkit.org/show_bug.cgi?id=167982
2776 Reviewed by Andreas Kling.
2778 If speculative loader hits a redirect it will drop it on the floor. We should use it.
2780 * NetworkProcess/NetworkResourceLoader.cpp:
2781 (WebKit::NetworkResourceLoader::continueWillSendRequest):
2782 (WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
2784 Reset the m_isWaitingContinueWillSendRequestForCachedRedirect bit immediately.
2786 * NetworkProcess/cache/NetworkCache.cpp:
2787 (WebKit::NetworkCache::Cache::makeRedirectEntry):
2789 Factor to a function.
2791 (WebKit::NetworkCache::Cache::storeRedirect):
2792 * NetworkProcess/cache/NetworkCache.h:
2793 (WebKit::NetworkCache::Cache::speculativeLoadManager):
2794 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2795 (WebKit::NetworkCache::Entry::Entry):
2797 Use std::optional instead std::unique_ptr for the redirect request.
2799 (WebKit::NetworkCache::Entry::decodeStorageRecord):
2800 * NetworkProcess/cache/NetworkCacheEntry.h:
2801 (WebKit::NetworkCache::Entry::redirectRequest):
2802 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
2803 (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
2805 Make cache entry for speculative redirect.
2806 The redirect is not actually performed, the target resource will have separate
2807 a speculative entry.
2809 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
2810 (WebKit::NetworkCache::SpeculativeLoad::didFailLoading):
2811 (WebKit::NetworkCache::SpeculativeLoad::didComplete):
2813 Protect against multiple completions.
2815 (WebKit::NetworkCache::SpeculativeLoad::abort): Deleted.
2816 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
2817 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2818 (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
2820 Make successful retrieves asynchronous to avoid re-entrancy problems.
2822 2017-02-07 Brent Fulgham <bfulgham@apple.com>
2824 Correct initialization of Resource Load Statistics for use in WebKitTestRunner
2825 https://bugs.webkit.org/show_bug.cgi?id=167960
2827 Reviewed by Andy Estes.
2829 WebKit2 starts up with different process configuration settings depending on the type of
2830 WebView and client application. This led to two problems:
2831 1. Registering the shared resource load observer did not start at UIProcess launch. Instead, it
2832 was lazily initialized as messages from the various WebProcess started getting received. This
2833 is too slow for WebKitTestRunner, which needs this object to be initialized right at launch
2836 A new 'registerSharedResourceLoadObserver' method was needed, so that the WebProcess can ask
2837 the WebsiteDataStore to register a resource load observer during platform initialization.
2839 2. Some WebView uses do not enable WebsiteDataStore, and should not activate a resource load
2840 statistics observer.
2842 * UIProcess/API/APIWebsiteDataStore.cpp:
2843 (API::WebsiteDataStore::registerSharedResourceLoadObserver): Added.
2844 * UIProcess/API/APIWebsiteDataStore.h:
2845 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2846 (WebKit::WebProcessPool::platformInitialize): If the web process is using a WebsiteDataStore,
2847 register a resource load observer.
2848 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2849 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver): Added.
2850 * UIProcess/WebResourceLoadStatisticsStore.h:
2851 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2852 (WebKit::WebsiteDataStore::registerSharedResourceLoadObserver): Added.
2853 * UIProcess/WebsiteData/WebsiteDataStore.h:
2855 2017-02-07 Anders Carlsson <andersca@apple.com>
2857 REGRESSION (r211819): [ios-simulator] API tests Coding.WKWebView and Coding.WKWebView_SameConfiguration crashing
2858 https://bugs.webkit.org/show_bug.cgi?id=167947
2860 Reviewed by Tim Horton.
2862 * Platform/spi/ios/UIKitSPI.h:
2863 Add SPI declaration.
2865 * UIProcess/API/Cocoa/WKWebView.mm:
2866 (-[WKWebView _initializeWithConfiguration:]):
2867 Make sure to call setDrawsBackground here.
2869 (-[WKWebView _populateArchivedSubviews:]):
2870 We don't want to archive the scroll view and the fixed overlay view.
2872 (-[WKWebView setOpaque:]):
2873 Return early if this is called before we have a page (like from -[UIView initWithCoder:]).
2875 2017-02-07 Alex Christensen <achristensen@webkit.org>
2878 https://bugs.webkit.org/show_bug.cgi?id=167951
2880 Reviewed by Andreas Kling.
2882 CFURLConnectionInvalidateConnectionCache is not commonly called and is likely causing
2883 CFNetwork to be in a strange state when using NSURLSession and invalidating the connection
2884 cache during authentication, especially server trust evaluation. Right now we only call
2885 it when handling memory pressure, and it isn't worth getting into such a strange state
2886 in a poorly tested situation. See rdar://problem/27439617
2888 * NetworkProcess/NetworkProcess.cpp:
2889 (WebKit::NetworkProcess::lowMemoryHandler):
2890 (WebKit::NetworkProcess::initializeSandbox):
2891 (WebKit::NetworkProcess::platformLowMemoryHandler): Deleted.
2892 * NetworkProcess/NetworkProcess.h:
2893 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2894 (WebKit::NetworkProcess::platformLowMemoryHandler): Deleted.
2896 2017-02-07 Brian Burg <bburg@apple.com>
2898 [Mac] Web Automation: NSEventType not initialized in WebAutomationSession::platformSimulateMouseInteraction
2899 https://bugs.webkit.org/show_bug.cgi?id=167902
2901 Reviewed by Joseph Pecoraro.
2903 * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
2904 (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
2905 Initialize these to 0, which is not a valid NSEventType. Assert that
2906 each NSEventType has a valid value before attempting to use it.
2908 2017-02-07 Youenn Fablet <youennf@gmail.com>
2910 [WebRTC] LibWebRTC WK2 network stack is not providing correct ports for ICE candidates
2911 https://bugs.webkit.org/show_bug.cgi?id=167939
2913 Reviewed by Sam Weinig.
2915 AddressReady signalling was done by the WebProcess for UDP and ServerTCP as real async sockets in those case do
2916 not send it. But the WebProcess does not have information on the port, as it is assigned by the socket factory
2917 which is in the network process.
2919 Fixed that bug by signalling AddressReady in the network process for UDP, ServerTCP and ClientTCP.
2921 * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
2922 (WebKit::LibWebRTCSocketClient::LibWebRTCSocketClient):
2923 (WebKit::LibWebRTCSocketClient::signalAddressReady):
2924 * NetworkProcess/webrtc/LibWebRTCSocketClient.h:
2925 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
2926 (WebKit::NetworkRTCProvider::createUDPSocket):
2927 (WebKit::NetworkRTCProvider::createServerTCPSocket):
2928 (WebKit::NetworkRTCProvider::createClientTCPSocket):
2929 * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
2930 (WebKit::LibWebRTCSocket::LibWebRTCSocket):
2931 (WebKit::LibWebRTCSocket::signalAddressReady):
2933 2017-02-07 Sam Weinig <sam@webkit.org>
2935 Try to fix the EFL build.
2937 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2939 2017-02-07 Anders Carlsson <andersca@apple.com>
2941 -[WKWebView encodeWithCoder:] needs to call super
2942 https://bugs.webkit.org/show_bug.cgi?id=167945
2943 rdar://problem/29777668
2945 Reviewed by Geoffrey Garen.
2947 * UIProcess/API/Cocoa/WKWebView.mm:
2948 (-[WKWebView encodeWithCoder:]):
2951 2017-02-07 Carlos Garcia Campos <cgarcia@igalia.com>
2953 [Soup] WebKitSoupRequestInputStream can still leave requests unfinished after r211773
2954 https://bugs.webkit.org/show_bug.cgi?id=167929
2956 Reviewed by Michael Catanzaro.
2958 The while loop to process the pending data requests was not a good idea, because having a new pending request
2959 doesn't mean we have more data available, but that more data was requested.
2961 * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
2962 (webkitSoupRequestInputStreamPendingReadAsyncComplete): Process only one request if needed.
2964 2017-02-06 Carlos Garcia Campos <cgarcia@igalia.com>
2966 [Soup] Long resources loaded by custom protocols sometimes never finish loading
2967 https://bugs.webkit.org/show_bug.cgi?id=167890
2969 Reviewed by Michael Catanzaro.
2971 It's another bug that has appeared in WebKitSoupRequestInputStream after moving the custom protocols handling to
2972 the main thread. The problem is that webkitSoupRequestInputStreamPendingReadAsyncComplete invalidates
2973 pendingAsyncRead after calling webkitSoupRequestInputStreamReadAsyncResultComplete, but in some cases
2974 webkitSoupRequestInputStreamReadAsyncResultComplete completes the task in the same run loop iteration. In that
2975 case webkitSoupRequestInputStreamReadAsync is called again creating a new AsyncReadData that is destroyed right
2976 after webkitSoupRequestInputStreamReadAsyncResultComplete returns.
2978 * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
2979 (AsyncReadData::AsyncReadData): Use an rvalue reference for the task.
2980 (webkitSoupRequestInputStreamPendingReadAsyncComplete): Use WTFMove to ensure pendingAsyncRead is cleared before
2981 webkitSoupRequestInputStreamReadAsyncResultComplete is called, and continue processing pending requests if there
2982 are new ones after webkitSoupRequestInputStreamReadAsyncResultComplete.
2983 (webkitSoupRequestInputStreamReadAsync): Use WTFMove to transfer the task to AsyncReadData.
2984 (webkitSoupRequestInputStreamDidFailWithError): Use WTFMove to ensure pendingAsyncRead is cleared.
2986 2017-02-06 Dan Bernstein <mitz@apple.com>
2988 [iOS] -[WKWebView becomeFirstResponder] and -[WKWebView resignFirstResponder] don’t get called when non-programmatic first responder changes happen
2989 https://bugs.webkit.org/show_bug.cgi?id=167898
2991 Reviewed by Tim Horton.
2993 Made WKContentView’s -becomeFirstResponder and -resignFirstResponder forward to the
2994 WKWebView, giving subclasses an opportunity to override these methods. Changed the WKWebView
2995 implementations to call back into WKContentView methods that actually do the work.
2997 * UIProcess/API/Cocoa/WKWebView.mm:
2998 (-[WKWebView becomeFirstResponder]): If the current content view is a WKContentView, call
2999 -becomeFirstResponderForWebView. Added a check that the content view has a superview to
3000 get the right behavior when this is called during the transition from not having to having
3001 a custom content view.
3002 (-[WKWebView canBecomeFirstResponder]): If the current content view is a WKContentView, call
3003 -canBecomeFirstResponderForWebView.
3004 (-[WKWebView resignFirstResponder]): If the current content view is a WKContentView, call
3005 -resignFirstResponderForWebView.
3006 (-[WKWebView _setHasCustomContentView:loadedMIMEType:]): If the new content view is a
3007 WKContentView, use -canBecomeFirstResponderForWebView.
3009 * UIProcess/ios/WKContentViewInteraction.h: Added _becomingFirstResponder ivar.
3010 * UIProcess/ios/WKContentViewInteraction.mm:
3011 (-[WKContentView canBecomeFirstResponder]): Return _becomingFirstResponder. Normally this is
3012 NO, so code that hit-tests then walks up the view hierarchy to select a first responder
3013 will continue to the WKWebView. But we need to return YES around the call to super’s
3014 -becomeFirstResponder in -becomeFirstResponderForWebView.
3015 (-[WKContentView canBecomeFirstResponderForWebView]): Moved the old
3016 -becomeFirstResponderForWebView implementation here.
3017 (-[WKContentView becomeFirstResponder]): Forward to the WKWebView.
3018 (-[WKContentView becomeFirstResponderForWebView]): Moved the old -becomeFirstResponder
3019 implementation here, setting _becomingFirstResponder to YES around the call to super.
3020 (-[WKContentView resignFirstResponder]): Forward to the WKWebView.
3021 (-[WKContentView resignFirstResponderForWebView]): Moved the old -resignFirstResponder
3022 implementation here.
3024 2017-02-06 Simon Fraser <simon.fraser@apple.com>
3026 Remove assertion in WebViewImpl::performKeyEquivalent()
3028 Reviewed by Wenson Hsieh.
3030 The assertion ASSERT(event == [NSApp currentEvent]) fires when using certain key combinations
3031 in MiniBrowser's location field (e.g. Option-Shift-Arrow to select). The assertion is not correct,
3034 * UIProcess/Cocoa/WebViewImpl.mm:
3035 (WebKit::WebViewImpl::performKeyEquivalent):
3037 2017-02-06 Simon Fraser <simon.fraser@apple.com>
3039 [iOS WK2] Keep the tiled scrolling indicator on-screen when pinching
3040 https://bugs.webkit.org/show_bug.cgi?id=167915
3042 Reviewed by Tim Horton.
3044 Clamp the location to the larger of the location of .unobscuredContentRect() and 0,0.
3046 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3047 (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
3049 2017-02-06 Simon Fraser <simon.fraser@apple.com>
3051 Tiled scrolling indicator gets doubled up on navigation
3052 https://bugs.webkit.org/show_bug.cgi?id=167909
3054 Reviewed by Tim Horton.
3056 TiledCoreAnimationDrawingArea::updateDebugInfoLayer() would parent a new m_debugInfoLayer
3057 in m_hostingLayer without removing the old one, causing the old tiled scrolling indicator layer
3058 hierarchy to get left in the layer tree.
3060 Also a couple of nullptr/0 -> nil.
3062 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3063 (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
3064 (WebKit::TiledCoreAnimationDrawingArea::updateDebugInfoLayer):
3066 2017-02-06 Alex Christensen <achristensen@webkit.org>
3068 More build fixes after r211751
3069 https://bugs.webkit.org/show_bug.cgi?id=166998
3071 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3072 (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
3073 (WebKit::NetworkDataTaskSoup::authenticate):
3074 (WebKit::NetworkDataTaskSoup::continueAuthenticate):
3075 (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
3076 Use the correct partition for credentials.
3078 2017-02-06 Jer Noble <jer.noble@apple.com>
3080 Update sandbox to allow CoreMedia to perform custom media loading.
3081 https://bugs.webkit.org/show_bug.cgi?id=167700
3083 Reviewed by Alexey Proskuryakov.
3085 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3087 2017-02-06 Alex Christensen <achristensen@webkit.org>
3089 credentials should be partitioned by main document domain
3090 https://bugs.webkit.org/show_bug.cgi?id=166998
3091 rdar://problem/22901123
3093 Reviewed by Brady Eidson.
3095 * NetworkProcess/NetworkDataTask.cpp:
3096 (WebKit::NetworkDataTask::NetworkDataTask):
3097 * NetworkProcess/NetworkDataTask.h:
3098 (WebKit::NetworkDataTask::partition):
3099 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3100 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
3101 (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
3102 (WebKit::NetworkDataTaskCocoa::tryPasswordBasedAuthentication):
3103 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3104 (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
3105 * WebProcess/Network/WebSocketProvider.cpp:
3106 (WebKit::WebSocketProvider::createSocketStreamHandle):
3107 * WebProcess/Network/WebSocketProvider.h:
3108 * WebProcess/Plugins/PluginView.cpp:
3109 (WebKit::PluginView::getAuthenticationInfo):
3111 2017-02-06 Anders Carlsson <andersca@apple.com>
3113 Crash child processes if they receive an invalid message
3114 https://bugs.webkit.org/show_bug.cgi?id=167900
3116 Reviewed by Dan Bernstein.
3118 Previously, some processes would try to gracefully exit, others would just drop messages leading to weird bugs.
3119 Instead, set app-specific crash information to the message that failed to be decoded, and then crash.
3121 * DatabaseProcess/DatabaseProcess.cpp:
3122 (WebKit::DatabaseProcess::didReceiveInvalidMessage): Deleted.
3123 * DatabaseProcess/DatabaseProcess.h:
3124 * NetworkProcess/NetworkProcess.cpp:
3125 (WebKit::NetworkProcess::didReceiveInvalidMessage): Deleted.
3126 * NetworkProcess/NetworkProcess.h:
3127 * PluginProcess/PluginProcess.cpp:
3128 (WebKit::PluginProcess::didReceiveInvalidMessage): Deleted.
3129 * PluginProcess/PluginProcess.h:
3130 * Shared/ChildProcess.h:
3131 * Shared/Cocoa/ChildProcessCocoa.mm: Added.
3132 (WebKit::ChildProcess::didReceiveInvalidMessage):
3133 * WebKit2.xcodeproj/project.pbxproj:
3134 * WebProcess/WebProcess.cpp:
3135 (WebKit::WebProcess::didReceiveInvalidMessage): Deleted.
3136 * WebProcess/WebProcess.h:
3138 2017-02-06 Chris Dumez <cdumez@apple.com>
3140 [WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API
3141 https://bugs.webkit.org/show_bug.cgi?id=167883
3142 <rdar://problem/30376695>
3144 Reviewed by Sam Weinig.
3146 Drop legacy WKBundlePageDiagnosticLoggingClient API as I am not aware of any remaining client.
3147 All clients have now switched to the equivalent UIProcess-side API.
3149 * WebKit2.xcodeproj/project.pbxproj:
3150 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3151 (WKBundlePageSetDiagnosticLoggingClient): Deleted.
3152 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3153 * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h: Removed.
3154 * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Removed.
3155 * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Removed.
3156 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
3157 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
3158 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
3159 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
3160 * WebProcess/WebPage/WebPage.cpp:
3161 (WebKit::WebPage::close):
3162 (WebKit::WebPage::initializeInjectedBundleDiagnosticLoggingClient): Deleted.
3163 * WebProcess/WebPage/WebPage.h:
3164 (WebKit::WebPage::injectedBundleUIClient):
3165 (WebKit::WebPage::injectedBundleDiagnosticLoggingClient): Deleted.
3167 2017-02-06 Anders Carlsson <andersca@apple.com>
3169 Null check the WebKit::RemoteObjectProxy object before calling it
3170 https://bugs.webkit.org/show_bug.cgi?id=167891
3171 rdar://problem/30229358
3173 Reviewed by Tim Horton.
3175 If a _WKRemoteObjectRegistry invocation reply block outlives its underlying WebKit::RemoteObjectProxy object,
3176 we'll crash trying to send an unused reply to it. Work around this crash by adding a null check before calling
3179 While this fixes the crash it will lead to leaks in the process that holds on to the reply block. A more long term fix
3180 would be to manage the reply block checkers and call sendUnusedReply when invalidating the _WKRemoteObjectRegistry.
3182 * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
3183 (-[_WKRemoteObjectRegistry _invokeMethod:]):
3185 2017-02-06 Carlos Garcia Campos <cgarcia@igalia.com>
3187 [Soup] Deadlock in NetworkProcess
3188 https://bugs.webkit.org/show_bug.cgi?id=167876
3190 Reviewed by Michael Catanzaro.
3192 WebKitSoupRequestInputStream uses a read lock. What is happening is that webkitSoupRequestInputStreamAddData
3193 takes the lock, and it calls webkitSoupRequestInputStreamPendingReadAsyncComplete with the lock help. That
3194 causes webkitSoupRequestInputStreamReadAsync to be called again to read the next chunk, but in the same run loop
3195 operation. We don't really need the read lock because both webkitSoupRequestInputStreamAddData and
3196 webkitSoupRequestInputStreamReadAsync shoudl always be called from the main thread.
3198 * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
3199 (webkitSoupRequestInputStreamReadAsync): Remove the read lock and assert if called from a secondary thread.
3200 (webkitSoupRequestInputStreamAddData): Ditto.
3202 2017-02-03 Anders Carlsson <andersca@apple.com>
3204 Guard and unguard ports in a much less intrusive way
3205 https://bugs.webkit.org/show_bug.cgi?id=167813
3207 Reviewed by Sam Weinig.
3209 Instead of adopting mach_port_construct/mach_port_destruct, just guard and unguard the ports where appropriate.
3211 * Platform/IPC/mac/ConnectionMac.mm:
3212 (IPC::Connection::platformInitialize):
3213 (IPC::Connection::open):
3215 2017-02-06 Miguel Gomez <magomez@igalia.com>
3217 [GTK][EFL] Release unused UpdateAtlas when in memory pressure situation
3218 https://bugs.webkit.org/show_bug.cgi?id=167872
3220 Reviewed by Carlos Garcia Campos.
3222 In a memory pressure situation, release all the unused UpdateAtlas as soon as possible, instead
3223 of waiting 3 seconds before releasing them.
3225 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
3226 (WebKit::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
3227 (WebKit::CompositingCoordinator::releaseAtlases):
3228 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
3230 2017-02-05 Simon Fraser <simon.fraser@apple.com>
3232 Remove unparentsOffscreenTiles logic in TileController
3233 https://bugs.webkit.org/show_bug.cgi?id=167823
3235 Reviewed by Tim Horton.
3237 Drive-by fix: make sure we put the tiled scrolling indicator's layer back when switching tabs.
3239 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3240 (WebKit::TiledCoreAnimationDrawingArea::updateRootLayers):
3242 2017-02-04 Wenson Hsieh <wenson_hsieh@apple.com>
3244 Data interaction on an image should make it stand out when presenting the action sheet
3245 https://bugs.webkit.org/show_bug.cgi?id=167846
3246 <rdar://problem/30363014>
3248 Reviewed by Tim Horton.
3250 Adds infrastructure to improve the behavior of data interaction for images. We make two changes to accomplish
3251 this: first, add some plumbing to WebKit so the web process can tell the UI process when it is done handling a
3252 request to start data interaction, so that the UI process is able to clean up UI-side state in the event that
3253 the page prevented the default behavior.
3255 Secondly, this patch tweaks the heuristic used to present action sheets as popovers. For image elements, if
3256 there is sufficient space around the element, we will use the element rect as the target rect; otherwise, we
3257 fall back to presenting the popover at the touch location.
3259 * UIProcess/PageClient.h:
3260 * UIProcess/WebPageProxy.h:
3261 * UIProcess/WebPageProxy.messages.in:
3262 * UIProcess/ios/PageClientImplIOS.h:
3263 * UIProcess/ios/PageClientImplIOS.mm:
3264 (WebKit::PageClientImpl::didHandleStartDataInteractionRequest):
3265 * UIProcess/ios/WKActionSheet.h:
3266 * UIProcess/ios/WKActionSheet.mm:
3267 (-[WKActionSheet presentSheet:]):
3269 Added a presentation style parameter, used to specify whether or not WKActionSheet should present the popover
3270 using the element rect as the target rect, or the touch location.
3272 (-[WKActionSheet doneWithSheet]):
3273 (-[WKActionSheet updateSheetPosition]):
3274 (-[WKActionSheet presentSheet]): Deleted.
3275 * UIProcess/ios/WKActionSheetAssistant.mm:
3276 (-[WKActionSheetAssistant presentationRectForIndicatedElement]):
3278 Returns the (inflated) bounds of the element that is currently being indicated.
3280 (-[WKActionSheetAssistant showImageSheet]):
3281 (-[WKActionSheetAssistant _presentationStyleForImageAtElementRect:]):
3282 (-[WKActionSheetAssistant showLinkSheet]):
3283 (-[WKActionSheetAssistant showDataDetectorsSheet]):
3284 * UIProcess/ios/WKContentViewInteraction.h:
3285 * UIProcess/ios/WebPageProxyIOS.mm:
3286 (WebKit::WebPageProxy::didHandleStartDataInteractionRequest):
3287 * UIProcess/mac/PageClientImpl.h:
3288 * UIProcess/mac/PageClientImpl.mm:
3290 Remove unnecessary function declarations and implementations.
3292 (WebKit::PageClientImpl::didPerformDataInteractionControllerOperation): Deleted.
3293 (WebKit::PageClientImpl::startDataInteractionWithImage): Deleted.
3294 * WebProcess/WebPage/ios/WebPageIOS.mm:
3295 (WebKit::WebPage::requestStartDataInteraction):
3297 Notify the UI process that the web process is done handling a data interaction request, specifying whether or
3298 not the request was granted.
3300 2017-02-04 Carlos Garcia Campos <cgarcia@igalia.com>
3302 Unreviewed. Fix the key shortcut to enable resource usage overlay in GTK+.
3304 The condition to check for CTRL and Shift modifiers is wrong, causing the overlay to be shown on Shit+G and
3305 making it impossible to write a 'G'.
3307 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3308 (webkitWebViewBaseKeyPressEvent):
3310 2017-02-03 Joseph Pecoraro <pecoraro@apple.com>
3312 Unreviewed rollout of r211486, r211629.
3314 Original change is not ideal and is causing issues.
3316 * Shared/WebKit2Initialize.cpp:
3317 (WebKit::InitializeWebKit2):
3319 2017-02-03 Daniel Bates <dabates@apple.com>
3321 [Mac][WK2] Add SPI to override the Content Security Policy of a page
3322 https://bugs.webkit.org/show_bug.cgi?id=167810
3323 <rdar://problem/30102568>
3325 Reviewed by Anders Carlsson.
3327 Add SPI to WKWebViewConfiguration so that an embedding client can define a custom Content Security
3328 Policy that overrides the Content Security Policy of any page loaded in the web view.
3330 * Shared/WebPageCreationParameters.cpp:
3331 (WebKit::WebPageCreationParameters::encode): Encode instance variable overrideContentSecurityPolicy.
3332 (WebKit::WebPageCreationParameters::decode): Decode instance variable overrideContentSecurityPolicy.
3333 * Shared/WebPageCreationParameters.h:
3334 * UIProcess/API/APIPageConfiguration.cpp:
3335 (API::PageConfiguration::copy): Copy instance variable overrideContentSecurityPolicy.
3336 * UIProcess/API/APIPageConfiguration.h:
3337 (API::PageConfiguration::overrideContentSecurityPolicy): Added.
3338 (API::PageConfiguration::setOverrideContentSecurityPolicy): Added.
3339 * UIProcess/API/Cocoa/WKWebView.mm:
3340 (-[WKWebView _initializeWithConfiguration:]): Copy overrideContentSecurityPolicy set on the WKWebViewConfiguration
3341 object to the API::PageConfiguration object if non-nil.
3342 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3343 (-[WKWebViewConfiguration copyWithZone:]): Copy the instance variable overrideContentSecurityPolicy.
3344 (-[WKWebViewConfiguration _overrideContentSecurityPolicy]): Added.
3345 (-[WKWebViewConfiguration _setOverrideContentSecurityPolicy:]): Added.
3346 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Define SPI property _overrideContentSecurityPolicy.
3347 * UIProcess/WebPageProxy.cpp:
3348 (WebKit::WebPageProxy::WebPageProxy): Initialize m_overrideContentSecurityPolicy from the passed
3350 (WebKit::WebPageProxy::creationParameters): Set WebPageCreationParameters::overrideContentSecurityPolicy
3351 so that the WebPage object (in the WebProcess) will know the overridden Content Security Policy
3352 to apply to the document.
3353 * UIProcess/WebPageProxy.h:
3354 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3355 (WebKit::WebFrameLoaderClient::overrideContentSecurityPolicy): Added. Returns the custom Content
3356 Security Policy to apply to a new document.
3357 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3358 * WebProcess/WebPage/WebPage.cpp:
3359 * WebProcess/WebPage/WebPage.h:
3360 (WebKit::WebPage::overrideContentSecurityPolicy): Added.
3362 2017-02-03 Anders Carlsson <andersca@apple.com>
3364 Revert toString behavior to what we had in the last version we shipped
3365 https://bugs.webkit.org/show_bug.cgi?id=167814
3366 rdar://problem/30344753
3368 Reviewed by Tim Horton.
3370 This is a speculative fix for a crash that we've seen on recent builds. It simply reverts the toString call back to
3371 what we have in the last version of Safari we shipped.
3373 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3374 (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
3376 2017-02-03 Chris Dumez <cdumez@apple.com>
3378 Dismiss HTML form validation popover when pressing Escape key
3379 https://bugs.webkit.org/show_bug.cgi?id=167716
3380 <rdar://problem/29872943>
3382 Reviewed by Simon Fraser.
3384 Override ValidationMessageClient::hideAnyValidationMessage().
3386 * WebProcess/WebCoreSupport/WebValidationMessageClient.cpp:
3387 (WebKit::WebValidationMessageClient::hideAnyValidationMessage):
3388 * WebProcess/WebCoreSupport/WebValidationMessageClient.h:
3390 2017-02-03 Jeremy Jones <jeremyj@apple.com>
3392 Require keyboard focus for pointer lock.
3393 https://bugs.webkit.org/show_bug.cgi?id=167750
3395 Reviewed by Tim Horton.
3397 When keyboard focus leaves the page, end pointer lock
3398 Prevent pointer lock when the page doesn't have keyboard focus.
3400 * UIProcess/WebPageProxy.cpp:
3401 (WebKit::WebPageProxy::dispatchActivityStateChange):
3402 (WebKit::WebPageProxy::requestPointerLock):
3404 2017-02-03 Anders Carlsson <andersca@apple.com>
3406 Stash away the ports - they will be nulled out before the cancel handlers are called
3407 https://bugs.webkit.org/show_bug.cgi?id=167812
3409 Reviewed by Geoffrey Garen.
3411 * Platform/IPC/mac/ConnectionMac.mm:
3412 (IPC::Connection::open):
3414 2017-02-03 Anders Carlsson <andersca@apple.com>
3416 Inline createReceiveSource in its two call sites
3417 https://bugs.webkit.org/show_bug.cgi?id=167809
3419 Reviewed by Alex Christensen.
3421 * Platform/IPC/mac/ConnectionMac.mm:
3422 (IPC::Connection::open):
3423 (IPC::createReceiveSource): Deleted.
3425 2017-02-03 Wenson Hsieh <wenson_hsieh@apple.com>
3427 WKActionSheet should dismiss with animation when done with the sheet
3428 https://bugs.webkit.org/show_bug.cgi?id=167804
3429 <rdar://problem/30334861>
3431 Reviewed by Tim Horton.
3433 Currently, we do not dismiss the action menu when -doneWithSheet is invoked. While this is okay when the menu is
3434 dismissed via tap (since it will be dismissed as default behavior by the popover controller) we need to manually
3435 dismiss it if we are trying to programmatically dismiss the action sheet/menu.
3437 * UIProcess/ios/WKActionSheet.mm:
3438 (-[WKActionSheet presentSheetFromRect:]):
3439 (-[WKActionSheet doneWithSheet]):
3440 * UIProcess/ios/WKContentViewInteraction.mm:
3441 (-[WKContentView setupInteraction]):
3442 (-[WKContentView resignFirstResponder]):
3444 2017-02-03 Olivier Blin <olivier.blin@softathome.com>
3446 Doc generation failure in WebKitSecurityOrigin
3447 https://bugs.webkit.org/show_bug.cgi?id=167796
3449 Reviewed by Michael Catanzaro.
3451 * UIProcess/API/gtk/WebKitSecurityOrigin.cpp:
3452 warning: Free-form return value description in webkit_security_origin_get_protocol. Use `Returns:' to avoid ambiguities.
3454 2017-02-03 Carlos Garcia Campos <cgarcia@igalia.com>
3456 [GTK] Add initial implementation of resource usage overlay
3457 https://bugs.webkit.org/show_bug.cgi?id=167731
3459 Reviewed by Michael Catanzaro.
3461 Toggle the resource usage overlay visibility by pressing CTRL + Shift + G. Only available when building with
3462 developer mode enabled.
3464 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3465 (webkitWebViewBaseKeyPressEvent):
3467 2017-02-03 Carlos Garcia Campos <cgarcia@igalia.com>
3469 REGRESSION(r211486) [GTK] The MiniBrowser doesn't work anymore.
3470 https://bugs.webkit.org/show_bug.cgi?id=167776
3472 Reviewed by Yusuke Suzuki.
3474 Since r211486 JSC::initializeThreading() also initializes the main run loop. It would be possible that RunLoop
3475 need to know if it's the main one or not in its constructor, like the GLib impementation does, so we need to
3476 ensure that WTF threading and MainThread are initialized before creating the main RunLoop. This is a quick fix
3477 because the regression made impossible to load anything in a WebView, but I think we should review all the
3478 initialize methods, what they do and how they are called in all the code.
3480 * Shared/WebKit2Initialize.cpp:
3481 (WebKit::InitializeWebKit2): Call WTF::initializeThreading() and WTF::initializeMainThread() before
3482 JSC::initializeThreading() and do not call RunLoop::initializeMainRunLoop() because it's already called by JSC.
3484 2017-02-03 Csaba Osztrogonác <ossy@webkit.org>
3486 [Mac][cmake] One more unreviewed speculative buildfix after r211403.
3487 https://bugs.webkit.org/show_bug.cgi?id=165478
3489 * UIProcess/API/Cocoa/WKWebView.mm: WebSQLiteDatabaseTrackerClient.h is an iOS specific
3490 header in platform/ios directory which shouldn't and can't be included on non iOS build.
3492 2017-02-03 Csaba Osztrogonác <ossy@webkit.org>
3494 [Mac][cmake] Unreviewed speculative buildfix after r211403.
3495 https://bugs.webkit.org/show_bug.cgi?id=165478
3497 * UIProcess/API/Cocoa/WKWebView.mm: WebBackgroundTaskController.h is an iOS specific
3498 header in platform/ios directory which shouldn't and can't be included on non iOS build.
3501 2017-02-02 Andreas Kling <akling@apple.com>
3503 [Mac] In-process memory pressure monitor for WebContent processes AKA websam
3504 <https://webkit.org/b/167491>
3505 <rdar://problem/30116072>
3507 Reviewed by Antti Koivisto.
3509 Enable the in-process memory monitor for WebContent processes on macOS 10.12+
3511 * WebProcess/WebProcess.cpp:
3512 (WebKit::WebProcess::initializeWebProcess):
3514 2017-02-02 Commit Queue <commit-queue@webkit.org>
3516 Unreviewed, rolling out r211535, r211566, and r211568.
3517 https://bugs.webkit.org/show_bug.cgi?id=167765
3519 Causing timeouts? (Requested by andersca_ on #webkit).
3521 Reverted changesets:
3523 "IPC::Connection receive ports should be guarded"
3524 https://bugs.webkit.org/show_bug.cgi?id=167704
3525 http://trac.webkit.org/changeset/211535
3527 "<rdar://problem/30323148> Webkit Nightly on 10.10 broken"
3528 http://trac.webkit.org/changeset/211566
3530 "<rdar://problem/30323148> Webkit Nightly on 10.10 broken"
3531 http://trac.webkit.org/changeset/211568
3533 2017-02-02 Megan Gardner <megan_gardner@apple.com>
3535 Don't attempt wide gammut on older OSes
3536 https://bugs.webkit.org/show_bug.cgi?id=167754
3537 <rdar://problem/29931587>
3539 Reviewed by Tim Horton.
3541 We need to guard our extended color checks the same way throughout the code, or we will attempt to set up
3542 support for wide gamut partially, which causes crashes when using sharable bitmap.
3544 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3545 (WebKit::convertImageToBitmap):
3546 * WebProcess/WebPage/ios/WebPageIOS.mm:
3547 (WebKit::WebPage::getPositionInformation):
3549 2017-02-02 Enrica Casucci <enrica@apple.com>
3551 WK2: cannot tap on candidate view with hardware keyboard.
3552 https://bugs.webkit.org/show_bug.cgi?id=167761
3553 rdar://problem/28775395
3555 Reviewed by Tim Horton.
3557 The candidate view is a subview of the view returned by
3558 automaticallySelectedOverlay and it should be the unscaled view
3559 instead of the WKContentView.
3561 * UIProcess/ios/WKContentViewInteraction.mm:
3562 (-[WKContentView automaticallySelectedOverlay]):
3564 2017-02-02 Wenson Hsieh <wenson_hsieh@apple.com>
3566 Drag images should be anchored to the mouse location
3567 https://bugs.webkit.org/show_bug.cgi?id=167690
3568 <rdar://problem/30295261>
3570 Reviewed by Enrica Casucci.
3572 Adds some plumbing for the mouse anchor point in the UI process. Additionally, refactors some unrelated code
3573 for handling data interaction.
3575 * UIProcess/PageClient.h:
3576 * UIProcess/WebPageProxy.h:
3577 * UIProcess/WebPageProxy.messages.in:
3578 * UIProcess/ios/PageClientImplIOS.h:
3579 * UIProcess/ios/PageClientImplIOS.mm:
3580 (WebKit::PageClientImpl::startDataInteractionWithImage):
3581 * UIProcess/ios/WKContentViewInteraction.h:
3582 * UIProcess/mac/PageClientImpl.h:
3583 * UIProcess/mac/PageClientImpl.mm:
3584 (WebKit::PageClientImpl::startDataInteractionWithImage):
3585 * UIProcess/mac/WebPageProxyMac.mm:
3586 (WebKit::WebPageProxy::setDragImage):
3587 * WebProcess/WebCoreSupport/WebDragClient.cpp:
3588 (WebKit::WebDragClient::startDrag):
3589 * WebProcess/WebCoreSupport/WebDragClient.h:
3590 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3591 (WebKit::WebDragClient::startDrag):
3593 2017-02-02 Commit Queue <commit-queue@webkit.org>
3595 Unreviewed, rolling out r211571 and r211582.
3596 https://bugs.webkit.org/show_bug.cgi?id=167751
3598 This change caused API test WebKit1.MemoryPressureHandler to
3599 fail with an assertion. (Requested by ryanhaddad on #webkit).
3601 Reverted changesets:
3603 "[Mac] In-process memory pressure monitor for WebContent
3605 https://bugs.webkit.org/show_bug.cgi?id=167491
3606 http://trac.webkit.org/changeset/211571
3608 "Unreviewed attempt to fix the Windows build after r211571."
3609 http://trac.webkit.org/changeset/211582
3611 2017-02-02 Dan Bernstein <mitz@apple.com>
3613 The Make Frameworks Symbolic Link build phase can end up creating a symlink inside the Frameworks subdirectory
3614 https://bugs.webkit.org/show_bug.cgi?id=167745
3616 Reviewed by Tim Horton.
3618 * WebKit2.xcodeproj/project.pbxproj: Pass the -h option to ln(1) so that it will replace,
3619 rather than follow, an existing symlink.
3621 2017-02-02 Andreas Kling <akling@apple.com>
3623 [Mac] In-process memory pressure monitor for WebContent processes.
3624 <https://webkit.org/b/167491>
3625 <rdar://problem/30116072>
3627 Reviewed by Antti Koivisto.
3629 Enable the in-process memory monitor for WebContent processes on macOS 10.12+
3631 * WebProcess/WebProcess.cpp:
3632 (WebKit::WebProcess::initializeWebProcess):
3634 2017-02-02 Chris Dumez <cdumez@apple.com>
3636 [Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
3637 https://bugs.webkit.org/show_bug.cgi?id=167738
3638 <rdar://problem/30229990>
3640 Reviewed by Andreas Kling.
3642 The BackForwardClient no longer needs to worry about removing HistoryItems
3643 from the PageCache now that WebCore takes care of it.
3645 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3646 (WebKit::WebBackForwardListProxy::addItemFromUIProcess):
3647 (WebKit::WebBackForwardListProxy::addItem):
3648 (WebKit::WebBackForwardListProxy::close):
3649 * WebProcess/WebPage/WebBackForwardListProxy.h:
3651 2017-02-02 Anders Carlsson <andersca@apple.com>
3653 <rdar://problem/30323148> Webkit Nightly on 10.10 broken
3657 * Platform/IPC/mac/ConnectionMac.mm:
3658 (IPC::Connection::open):
3660 2017-02-02 Anders Carlsson <andersca@apple.com>
3662 <rdar://problem/30323148> Webkit Nightly on 10.10 broken
3664 Try to fix the 10.10 build.
3666 * Platform/IPC/mac/ConnectionMac.mm:
3667 (IPC::Connection::open):
3669 2017-02-01 Anders Carlsson <andersca@apple.com>
3671 Handle m_processLauncher being null in ChildProcessProxy::processIdentifier()
3672 https://bugs.webkit.org/show_bug.cgi?id=167713
3673 rdar://problem/28896113
3675 Reviewed by Dan Bernstein.
3677 This can happen if the process has been explicitly terminated.
3679 * UIProcess/ChildProcessProxy.h:
3680 (WebKit::ChildProcessProxy::processIdentifier):
3682 2017-02-02 Yongjun Zhang <yongjun_zhang@apple.com>
3684 In iOS, we should take background assertion when accessing localstorage databases.
3685 https://bugs.webkit.org/show_bug.cgi?id=165478
3687 Just like in WebKit1, when initializing a WKWebView, initialize the database transaction
3688 tracker client. Also, we should set up the start and end background task blocks here. In
3689 WebKit1, this is done inside UIKit.
3691 Reviewed by Brady Eidson.
3693 * UIProcess/API/Cocoa/WKWebView.mm:
3694 (-[WKWebView _initializeWithConfiguration:]):
3695 (-[WKWebView _setUpSQLiteDatabaseTrackerClient]): Set up the start/end background task blocks
3696 and database transaction tracker client.
3698 2017-02-01 Wenson Hsieh <wenson_hsieh@apple.com>
3700 Unreviewed, fix the nightly open source build.
3702 Adds more header checks when importing from WebKitAdditions.
3704 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
3705 * UIProcess/ios/WKContentViewInteraction.h:
3706 * UIProcess/ios/WKContentViewInteraction.mm:
3707 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3709 2017-02-01 Simon Fraser <simon.fraser@apple.com>
3711 [iOS WK2] With visual viewports, a fixed bottom bar can be clipped out when the keyboard is visible
3712 https://bugs.webkit.org/show_bug.cgi?id=167710
3713 rdar://problem/30100286
3715 Reviewed by Wenson Hsieh.
3717 The unobscuredRectInContentCoordinates passed to -didUpdateVisibleRect:... could project outside
3718 of the bounds of the document, which is OK when rubber-banding, but not when we're in a stable state,
3719 because that can cause fixed elements to get pushed outside the doc. This happened when the keyboard
3720 triggered bottom content insets on the scroll view.
3722 Fix by computing a rectangle which is the "allowed" bounds of fixed content, which is permitted
3723 to extend outside the document bounds only when rubber-banding, and intersect unobscuredRectInContentCoordinates
3724 with that rectangle.
3726 * UIProcess/API/Cocoa/WKWebView.mm:
3727 (-[WKWebView _contentBoundsExtendedForRubberbandingWithScale:]):
3728 (-[WKWebView _updateContentRectsWithState:]):
3730 2017-02-01 Enrica Casucci <enrica@apple.com>
3732 WebProcess crashes in int WTF::__throw_bad_variant_access<int> when expanding/shrinking a block selection.
3733 https://bugs.webkit.org/show_bug.cgi?id=167673
3734 rdar://problem/30229620
3736 Reviewed by Anders Carlsson
3738 This is a speculative fix for a bug that might have been introduced
3739 with http://trac.webkit.org/changeset/208479.
3740 The code in containsRange inline fuction in WebPageIOS.mm has not been
3741 updated when the return value of Range::compareBoundaryPoints was changed
3742 to ExceptionOr<short>.
3743 Since there is already a method containsRange in the Range class that
3744 does the right thing, expandedRangeFromHandle now uses that.
3746 * WebProcess/WebPage/ios/WebPageIOS.mm:
3747 (WebKit::WebPage::expandedRangeFromHandle):
3748 (WebKit::containsRange): Deleted.
3750 2017-02-01 Anders Carlsson <andersca@apple.com>
3752 IPC::Connection receive ports should be guarded
3753 https://bugs.webkit.org/show_bug.cgi?id=167704
3755 Reviewed by Tim Horton.
3757 Guarding receive rights will make sure that they won't be closed accidentally. They are created
3758 with a context pointer and can only be unguarded or destructed with the same context pointer.
3760 * Platform/IPC/mac/ConnectionMac.mm:
3761 (IPC::Connection::platformInvalidate):
3762 Use mach_port_destruct and pass the connection pointer as the context.
3764 (IPC::Connection::platformInitialize):
3765 Guard the server port with the connection pointer as the context.
3767 (IPC::Connection::open):
3768 Use mach_port_construct to create the port which lets us avoid a call to mach_port_set_attributes and setMachPortQueueLength.
3769 Make the port guarded and use the connection pointer as the context.
3771 (IPC::createReceiveSource):
3772 Get rid of this and just duplicate the five lines of code in two places. For the receive port we want to use mach_port_destruct
3773 in our cancel handler.
3775 2017-02-01 Andreas Kling <akling@apple.com>
3777 Implement the alwaysRunsAtBackgroundPriority WK2 setting using thread QoS.
3778 <https://webkit.org/b/167387>
3779 <rdar://problem/29711409>
3781 Reviewed by Antti Koivisto.
3783 Remove the old ProcessThrottlerClient implementation of alwaysRunsAtBackgroundPriority
3784 and replace it with WTF::setGlobalMaxQOSClass().
3786 If the setting is enabled, it's passed over to each WK2 child process along with its
3787 bootstrap parameter, and we notify WTF in XPCServiceInitializer(), before anything
3788 too threading related happens.
3790 * Platform/IPC/Connection.cpp:
3791 (IPC::Connection::processIncomingMessage):
3792 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
3793 (WebKit::XPCServiceInitializer):
3794 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
3795 (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
3796 * UIProcess/API/APIProcessPoolConfiguration.h:
3797 * UIProcess/ChildProcessProxy.cpp:
3798 (WebKit::ChildProcessProxy::ChildProcessProxy):
3799 (WebKit::ChildProcessProxy::getLaunchOptions):
3800 * UIProcess/ChildProcessProxy.h:
3801 * UIProcess/Databases/DatabaseProcessProxy.cpp:
3802 (WebKit::DatabaseProcessProxy::DatabaseProcessProxy):
3803 * UIProcess/Network/NetworkProcessProxy.cpp:
3804 (WebKit::NetworkProcessProxy::NetworkProcessProxy):
3805 (WebKit::NetworkProcessProxy::alwaysRunsAtBackgroundPriority): Deleted.
3806 * UIProcess/Network/NetworkProcessProxy.h:
3807 * UIProcess/ProcessThrottler.cpp:
3808 (WebKit::ProcessThrottler::assertionState):
3809 * UIProcess/ProcessThrottlerClient.h:
3810 * UIProcess/WebProcessProxy.cpp:
3811 (WebKit::WebProcessProxy::WebProcessProxy):
3812 (WebKit::WebProcessProxy::alwaysRunsAtBackgroundPriority): Deleted.
3813 * UIProcess/WebProcessProxy.h:
3815 2017-02-01 Tomas Popela <tpopela@redhat.com>
3817 [GTK] Add an API to add a custom tab into the print dialog
3818 https://bugs.webkit.org/show_bug.cgi?id=151998
3820 Reviewed by Carlos Garcia Campos.
3822 Add a new create-custom-widget signal to the WebKitPrintOperation. The
3823 signal is emitted before the dialog is displayed and it gives an
3824 opportunity to embed a custom widget in the dialog. You can do so by
3825 creating a new WebKitPrintCustomWidget and returning it from the
3826 create-custom-widget signal handler. The WebKitPrintCustomWidget is
3827 emitting two signals:
3828 - update - emitted when the currently selected printer is changed,
3829 to be able to actualize the custom widget based on the
3831 - apply - emitted when the dialog is closed, just before the
3832 printing will start, to be able e.g. to change content
3833 based on the custom widget state.
3835 * PlatformGTK.cmake:
3836 * UIProcess/API/gtk/WebKitAutocleanups.h:
3837 * UIProcess/API/gtk/WebKitPrintCustomWidget.cpp: Added.
3838 (webkitPrintCustomWidgetSetProperty):
3839 (webkit_print_custom_widget_class_init):
3840 (webkit_print_custom_widget_new):
3841 (webkit_print_custom_widget_get_widget):
3842 (webkit_print_custom_widget_get_title):
3843 (webkitPrintCustomWidgetEmitCustomWidgetApplySignal):
3844 (webkitPrintCustomWidgetEmitUpdateCustomWidgetSignal):
3845 * UIProcess/API/gtk/WebKitPrintCustomWidget.h: Added.
3846 * UIProcess/API/gtk/WebKitPrintCustomWidgetPrivate.h: Added.
3847 * UIProcess/API/gtk/WebKitPrintOperation.cpp:
3848 (webkitPrintOperationAccumulatorObjectHandled):
3849 (webkit_print_operation_class_init):
3850 (notifySelectedPrinterCallback):
3851 (webkitPrintOperationRunDialog):
3852 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
3853 * UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
3854 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
3855 * UIProcess/API/gtk/webkit2.h:
3857 2017-02-01 Antti Koivisto <antti@apple.com>
3859 Load resources speculatively
3860 https://bugs.webkit.org/show_bug.cgi?id=167660
3862 Reviewed by Andreas Kling.
3864 * NetworkProcess/cache/NetworkCache.cpp:
3865 (WebKit::NetworkCache::Cache::makeEntry):
3867 Factor to a function.
3869 (WebKit::NetworkCache::Cache::store):
3870 * NetworkProcess/cache/NetworkCache.h:
3871 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
3872 (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
3874 Support loads where we don't have existing cache entry to validate.
3876 (WebKit::NetworkCache::SpeculativeLoad::didReceiveBuffer):
3878 Synthesize a NetworkCache::Entry if we can't store it.
3880 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
3881 (WebKit::NetworkCache::SpeculativeLoad::didFailLoading):
3882 (WebKit::NetworkCache::SpeculativeLoad::abort):
3883 (WebKit::NetworkCache::SpeculativeLoad::didComplete):
3884 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
3885 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
3886 (WebKit::NetworkCache::constructRevalidationRequest):
3888 Make having existing cache entry optional.
3890 (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
3892 Allow validation without validation headers (that is, normal load).
3894 (WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource):
3896 Make having existing cache entry optional.
3898 (WebKit::NetworkCache::canRevalidate):
3900 Allow speculative loads without validation headers if we have high confidence that the
3901 page is going to request this resource again. This is based on the time span we have
3902 seen this resource being loaded on a given page and how much time has elapsed since we
3905 For example if we have seen the resource over the last 10 days we'll speculate that it will
3906 be required for the next 5 days.
3908 (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
3909 (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry): Deleted.
3910 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
3911 * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
3912 (WebKit::NetworkCache::SubresourceInfo::encode):
3913 (WebKit::NetworkCache::SubresourceInfo::decode):
3915 Encode the firstSeen and lastSeen time stamps.
3917 (WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
3918 (WebKit::NetworkCache::makeSubresourceInfoVector):
3919 (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
3920 (WebKit::NetworkCache::SubresourcesEntry::updateSubresourceLoads):
3921 * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
3922 (WebKit::NetworkCache::SubresourceInfo::lastSeen):
3923 (WebKit::NetworkCache::SubresourceInfo::firstSeen):
3924 (WebKit::NetworkCache::SubresourceInfo::setNonTransient):
3925 (WebKit::NetworkCache::SubresourceInfo::SubresourceInfo): Deleted.
3926 (WebKit::NetworkCache::SubresourceInfo::setTransient): Deleted.
3928 2017-02-01 Csaba Osztrogonác <ossy@webkit.org>
3930 [Mac][cmake] Unreviewed speculative buildfix after r211403.
3931 https://bugs.webkit.org/show_bug.cgi?id=167601
3933 * UIProcess/API/Cocoa/WKWebView.mm:
3935 2017-01-31 Antti Koivisto <antti@apple.com>
3937 Teach cache coders to encode time_points
3938 https://bugs.webkit.org/show_bug.cgi?id=167670
3940 Reviewed by Andreas Kling.
3942 Encode time_point instead of duration.
3944 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3945 (WebKit::NetworkCache::decodeRecordMetaData):
3946 (WebKit::NetworkCache::Storage::readRecord):
3947 (WebKit::NetworkCache::encodeRecordMetaData):
3948 (WebKit::NetworkCache::Storage::encodeRecord):
3949 (WebKit::NetworkCache::Storage::traverse):
3951 2017-01-31 Brent Fulgham <bfulgham@apple.com>
3953 [WebRTC][WebKit2] Support expanding the sandbox to allow microphone access at process launch
3954 https://bugs.webkit.org/show_bug.cgi?id=167669
3955 <rdar://problem/29974333>
3957 Reviewed by Alexey Proskuryakov.
3959 This change implements a temporary workaround to <rdar://problem/29448368> to allow us to do live
3960 testing of WebRTC microphone access. It should be removed when that underlying bug is fixed.
3962 This change adds a new process creation parameter that indicates whether we wish to expand the
3963 sandbox to allow microphone access.
3965 Tested by WebRTC suite (part of another set of bugs).
3967 * Shared/WebProcessCreationParameters.cpp:
3968 (WebKit::WebProcessCreationParameters::encode): Serialize the audio access entitlement handle.
3969 (WebKit::WebProcessCreationParameters::decode): Ditto.
3970 * Shared/WebProcessCreationParameters.h:
3971 * UIProcess/WebProcessPool.cpp:
3972 (WebKit::WebProcessPool::createNewWebProcess): Create an entitlement handle and pass along to
3974 * WebProcess/cocoa/WebProcessCocoa.mm:
3975 (WebKit::WebProcess::platformInitializeWebProcess): If an audio entitlement (for the microphone)
3976 was desired, expand the sandbox to include access.
3978 2017-01-31 Tim Horton <timothy_horton@apple.com>