1 2017-02-28 Tim Horton <timothy_horton@apple.com>
3 [iOS] Getting QLPreviewProtocol slows down first navigation in Web process
4 https://bugs.webkit.org/show_bug.cgi?id=168940
5 <rdar://problem/29468999>
7 Reviewed by Simon Fraser.
9 * WebProcess/Network/WebLoaderStrategy.cpp:
10 (WebKit::WebLoaderStrategy::scheduleLoad):
11 Make use of isQuickLookPreviewURL.
13 2017-02-28 Brady Eidson <beidson@apple.com>
15 Fix API test regression(s):
16 REGRESSION (r213168): API test WKUserContentController.ScriptMessageHandlerMultipleHandlerRemoval crashing
17 https://bugs.webkit.org/show_bug.cgi?id=168991
21 * UIProcess/WebProcessPool.cpp:
22 (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
24 2017-02-28 Wenson Hsieh <wenson_hsieh@apple.com>
26 Data interaction should support attachment elements
27 https://bugs.webkit.org/show_bug.cgi?id=168916
28 <rdar://problem/30664519>
30 Reviewed by Ryosuke Niwa.
32 Teaches WKContentView to recognize attachment elements as data interactive content, and add an internal hook to
33 adjust the list of item providers before initiating data interaction.
35 * Platform/spi/ios/UIKitSPI.h:
36 * UIProcess/API/Cocoa/WKWebView.mm:
37 (-[WKWebView _adjustedDataInteractionItemProviders:]):
38 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
39 * UIProcess/ios/WKContentViewInteraction.mm:
40 (-[WKContentView pointIsInDataInteractionContent:]):
42 2017-02-28 Yongjun Zhang <yongjun_zhang@apple.com>
44 Add delegate method to handle images with alternate data.
45 https://bugs.webkit.org/show_bug.cgi?id=168785
46 <rdar://problem/28776219>
48 Add delegate methods to WKUIDelegatePrivate so that a WebKit client can provide alternate URL or data for an image
49 before long-press or preview. When an image has alternate URL or data, we can change the actions accordingly.
51 Reviewed by Enrica Casucci.
53 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add two delegate methods _webView:getAlternateURLFromImage:completionHandler:
54 and _webView:alternateURLFromImage:userInfo;
55 * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Add an readonly property userInfo so that alternate data can be
56 carried by _WKActivatedElementInfo and be processed by WebKit client.
57 * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
58 (-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:]):
59 (-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:userInfo:]): A new initializer that also takes userInfo.
60 (-[_WKActivatedElementInfo userInfo]):
61 * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: A new delegate method for WKActionSheetAssistantDelegate to fetch
62 alternate data before showing image sheet.
63 * UIProcess/ios/WKActionSheetAssistant.h:
64 * UIProcess/ios/WKActionSheetAssistant.mm:
65 (-[WKActionSheetAssistant showImageSheet]): Before showing the image sheet, if the image doesn't have linked URL (i.e. not a image
66 link), try to fetch its alternate URL and data.
67 (-[WKActionSheetAssistant defaultActionsForImageSheet:]): Drive-by fix. We always use positionInformation's URL to populate the
68 actions, however, we should use elementInfo's URL since the two URLs could mismatch.
69 * UIProcess/ios/WKContentViewInteraction.mm:
70 (-[WKContentView actionSheetAssistant:getAlternateURLForImage:completion:]):
71 (-[WKContentView _presentedViewControllerForPreviewItemController:]): Before previewing an image, synchronously get alternate
72 data for the image and update the actions accordingly.
74 2017-02-28 Brady Eidson <beidson@apple.com>
76 Refactor WebViewImpl creation in preparation for supporting multiple WebsiteDataStores.
77 https://bugs.webkit.org/show_bug.cgi?id=168676
79 Reviewed by Alex Christensen and Sam Weinig.
81 * UIProcess/WebProcessPool.cpp:
82 (WebKit::WebProcessPool::createNewWebProcess):
83 (WebKit::WebProcessPool::warmInitialProcess):
84 (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
85 (WebKit::WebProcessPool::createWebPage):
86 * UIProcess/WebProcessPool.h:
88 2017-02-28 Youenn Fablet <youenn@apple.com>
90 [WebRTC] Limit libwebrtc logging in Debug build
91 https://bugs.webkit.org/show_bug.cgi?id=168974
93 Reviewed by Alex Christensen.
95 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
96 (WebKit::NetworkRTCProvider::NetworkRTCProvider):
99 2017-02-28 Youenn Fablet <youenn@apple.com>
101 [WebRTC] NetworkRTCProvider should stop the network thread from the main thread
102 https://bugs.webkit.org/show_bug.cgi?id=168972
104 Reviewed by Alex Christensen.
106 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
107 (WebKit::NetworkRTCProvider::close): Ensuring to stop the network thread from the main thread when provider is
110 2017-02-24 Matt Rajca <mrajca@apple.com>
112 Media: notify clients when autoplayed media ends without being paused
113 https://bugs.webkit.org/show_bug.cgi?id=168852
115 Reviewed by Alex Christensen.
117 * UIProcess/API/C/WKPageUIClient.h:
119 2017-02-28 Csaba Osztrogonác <ossy@webkit.org>
121 Remove EFL leftover from WebPageProxy.messages.in
122 https://bugs.webkit.org/show_bug.cgi?id=168828
124 Reviewed by Gyuyoung Kim.
126 * UIProcess/WebPageProxy.messages.in:
128 2017-02-28 Alex Christensen <achristensen@webkit.org>
130 Main resource requests need cachePartition
131 https://bugs.webkit.org/show_bug.cgi?id=168806
133 Reviewed by Brady Eidson.
135 * NetworkProcess/NetworkResourceLoader.cpp:
136 (WebKit::NetworkResourceLoader::continueWillSendRequest):
138 2017-02-27 Alex Christensen <achristensen@webkit.org>
140 Begin enabling WebRTC on 64-bit
141 https://bugs.webkit.org/show_bug.cgi?id=168915
143 Reviewed by Eric Carlson.
145 * Configurations/FeatureDefines.xcconfig:
147 2017-02-27 Alexey Proskuryakov <ap@apple.com>
149 Remove _WKWebsiteDataRecord.h
150 https://bugs.webkit.org/show_bug.cgi?id=168954
152 Reviewed by Dan Bernstein.
154 This doesn't seem to have ever been used, so better to remove it than to add an
157 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h: Removed.
158 * WebKit2.xcodeproj/project.pbxproj:
160 2017-02-27 Alexey Proskuryakov <ap@apple.com>
162 WKPageIsPlayingVideoInEnhancedFullscreen availability mismatch
163 https://bugs.webkit.org/show_bug.cgi?id=168952
165 Reviewed by Dan Bernstein.
167 * UIProcess/API/C/mac/WKPagePrivateMac.h: TARGET_OS_MAC is not the right thing to
168 check, as it's true on both macOS and iOS.
170 2017-02-27 Alexey Proskuryakov <ap@apple.com>
172 Export WKPluginInformationBundleShortVersionKey
173 https://bugs.webkit.org/show_bug.cgi?id=168951
175 Reviewed by Dan Bernstein.
177 * Shared/API/c/WKPluginInformation.h: It was accidentally not exported when added.
179 2017-02-27 Youenn Fablet <youenn@apple.com>
181 [WebRTC] Add support for libwebrtc TCP incoming connections
182 https://bugs.webkit.org/show_bug.cgi?id=168748
184 Reviewed by Alex Christensen.
186 Covered by added layout tests.
188 When a libwebrtc server socket is signalling a new connnection through SignalNewConnection, we do:
189 - Wrap the incoming socket into a LibWebRTCSocketClient
190 - Store it into a pending socket map with an identifier
191 - Send a message to the web process of a new connection with the server socket identifier and new connection socket identifier.
192 The Web process then creates a WebRTCSocket wrapper around it by sendinig a WrapNewTCPConnection message.
193 It then propagates the SignalNewConnection to libwebrtc code path.
195 * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
196 (WebKit::LibWebRTCSocketClient::LibWebRTCSocketClient):
197 (WebKit::LibWebRTCSocketClient::signalReadPacket):
198 (WebKit::LibWebRTCSocketClient::signalSentPacket):
199 (WebKit::LibWebRTCSocketClient::signalNewConnection):
200 (WebKit::LibWebRTCSocketClient::signalAddressReady):
201 (WebKit::LibWebRTCSocketClient::signalConnect):
202 (WebKit::LibWebRTCSocketClient::signalClose):
203 * NetworkProcess/webrtc/LibWebRTCSocketClient.h:
204 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
205 (WebKit::NetworkRTCProvider::wrapNewTCPConnection):
206 (WebKit::NetworkRTCProvider::newConnection):
207 * NetworkProcess/webrtc/NetworkRTCProvider.h:
208 * NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
209 * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
210 (WebKit::LibWebRTCSocket::signalNewConnection):
211 * WebProcess/Network/webrtc/LibWebRTCSocket.h:
212 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
213 (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket):
214 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
215 * WebProcess/Network/webrtc/WebRTCSocket.cpp:
216 (WebKit::WebRTCSocket::signalNewConnection):
217 * WebProcess/Network/webrtc/WebRTCSocket.h:
218 * WebProcess/Network/webrtc/WebRTCSocket.messages.in:
220 2017-02-27 Brent Fulgham <bfulgham@apple.com>
222 [Mac] Don't use undefined sandbox rule on macOS 10.11 or earlier
223 https://bugs.webkit.org/show_bug.cgi?id=168942
224 <rdar://problem/30743376>
226 Reviewed by Ryosuke Niwa.
228 * WebProcess/com.apple.WebProcess.sb.in:
230 2017-02-27 Wenson Hsieh <wenson_hsieh@apple.com>
232 Unreviewed, roll out r213065.
234 * UIProcess/ios/WKContentViewInteraction.h:
236 2017-02-27 Alexey Proskuryakov <ap@apple.com>
238 Remove some deprecated WKPage plug-in information functions
239 https://bugs.webkit.org/show_bug.cgi?id=168897
241 Reviewed by Tim Horton.
243 * UIProcess/API/C/WKPage.cpp:
244 (WKPageGetProcessIdentifier):
245 (WKPageGetPluginInformationBundleIdentifierKey): Deleted.
246 (WKPageGetPluginInformationBundleVersionKey): Deleted.
247 (WKPageGetPluginInformationDisplayNameKey): Deleted.
248 (WKPageGetPluginInformationFrameURLKey): Deleted.
249 (WKPageGetPluginInformationMIMETypeKey): Deleted.
250 (WKPageGetPluginInformationPageURLKey): Deleted.
251 (WKPageGetPluginInformationPluginspageAttributeURLKey): Deleted.
252 (WKPageGetPluginInformationPluginURLKey): Deleted.
253 * UIProcess/API/C/WKPage.h:
255 2017-02-27 Alexey Proskuryakov <ap@apple.com>
257 Stop exporting C++ member variables from class extensions in WKDOMInternals.h
258 https://bugs.webkit.org/show_bug.cgi?id=168886
260 Reviewed by Tim Horton.
262 * WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: These are @package variables.
264 2017-02-27 Alex Christensen <achristensen@webkit.org>
266 Optimize checkWebRTCAvailability
267 https://bugs.webkit.org/show_bug.cgi?id=168913
269 Reviewed by Darin Adler.
271 We can optimize startup time by using RTLD_LAZY instead of RTLD_NOW because we don't need to load all the symbols.
272 We just need to check whether libwebrtc.dylib can be found and is a valid dylib for the current architecture.
273 Also, initialize a static bool so it only needs to be checked once. Right now it's only used when initializing settings,
274 but if we use it for other things in the future there will be no need to reopen the dylib.
276 * UIProcess/WebPreferences.cpp:
277 (WebKit::checkWebRTCAvailability):
279 2017-02-26 Wenson Hsieh <wenson_hsieh@apple.com>
281 Unreviewed, revert all temporary build fixes for data interaction
283 Rolls out r212990, r212988 and r212984.
285 * UIProcess/ios/WKContentViewInteraction.h:
287 2017-02-27 Carlos Garcia Campos <cgarcia@igalia.com>
289 [GTK] Rendering artifacts when resizing the window in X11 with AC mode enabled
290 https://bugs.webkit.org/show_bug.cgi?id=168728
292 Reviewed by Žan Doberšek.
294 This happens because the pixmap we create from the redirected window is uninitialized until the threaded
295 compositor renders into it. We should always initialize the pixmap right after it's created.
297 * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
298 (WebKit::defaultVisual): Helper static method to get the default GdkVisual.
299 (WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11): Use createPixmap().
300 (WebKit::AcceleratedSurfaceX11::createPixmap): Create and initialize the pixmap.
301 (WebKit::AcceleratedSurfaceX11::resize): Use createPixmap().
302 * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:
304 2017-02-27 Carlos Garcia Campos <cgarcia@igalia.com>
306 [GTK] Flickering when leaving accelerated compositing mode
307 https://bugs.webkit.org/show_bug.cgi?id=168911
309 Reviewed by Žan Doberšek.
311 It doesn't always happen, and it's too fast, more noticeable in websites with a dark background, because we are
312 drawing a single white frame. This happens when we leave AC mode during the layer flush that schedules an update
313 on the compositor, which at that point only clears the area and renders nothing. However,
314 CoordinatedGraphicsScene::paintToCurrentGLContext() always renders a white background when no web view color has
315 been set. And that's the white frame we get. We could prevent that last update from happening by checking if we
316 still have a graphics root layer after syncDisplayState() in the layer flush, the same way we check the layer
317 tree host is still valid.
319 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
320 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
321 (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
323 2017-02-27 Alex Christensen <achristensen@webkit.org>
325 [libwebrtc] Enable WebRTC in some Production Builds
326 https://bugs.webkit.org/show_bug.cgi?id=168858
328 * Configurations/FeatureDefines.xcconfig:
330 2017-02-27 Andy Estes <aestes@apple.com>
332 Links cannot be activated when running Mobile Safari with external SDK build of WebKit for iOS Simulator
333 https://bugs.webkit.org/show_bug.cgi?id=141906
335 Reviewed by Tim Horton.
337 Even if Touch Events are disabled, we still need to register a
338 UIWebTouchEventsGestureRecognizer to record the layer tree transaction ID when a touch
339 begins. Click events are only generated for touches that occur after the current frame's
340 load has committed, and we use the transaction ID from when the touch began to implement
343 * UIProcess/WebPageProxy.cpp:
344 (WebKit::WebPageProxy::handleTouchEventSynchronously):
345 (WebKit::WebPageProxy::resetState):
346 * UIProcess/WebPageProxy.h:
347 * UIProcess/ios/WKContentViewInteraction.h: Declared _layerTreeTransactionIdAtLastTouchStart.
348 * UIProcess/ios/WKContentViewInteraction.mm:
349 (-[WKContentView setupInteraction]): Register a UIWebTouchEventsGestureRecognizer even if
350 Touch Events are disabled.
351 (-[WKContentView cleanupInteraction]): Reset _layerTreeTransactionIdAtLastTouchStart to 0.
352 (-[WKContentView _webTouchEventsRecognized:]): Update _layerTreeTransactionIdAtLastTouchStart
353 when a touch begins, even if Touch Events are disabled.
354 (-[WKContentView _singleTapCommited:]): Passed _layerTreeTransactionIdAtLastTouchStart to
355 WebPageProxy::commitPotentialTap().
356 (-[WKContentView _attemptClickAtLocation:]): Ditto for WebPageProxy::handleTap().
357 * UIProcess/ios/WebPageProxyIOS.mm:
358 (WebKit::WebPageProxy::commitPotentialTap):
359 (WebKit::WebPageProxy::handleTap):
361 2017-02-26 Zan Dobersek <zdobersek@igalia.com>
363 [CoordinatedGraphics] Remove CoordinatedGraphicsScene::paintToGraphicsContext()
364 https://bugs.webkit.org/show_bug.cgi?id=168903
366 Reviewed by Carlos Garcia Campos.
368 Remove the CoordinatedGraphicsScene::paintToGraphicsContext() method as it
369 is not used anywhere. Also enables removing the GraphicsContext pointer
370 member from the TextureMapper class.
372 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
373 (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext): Deleted.
374 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
376 2017-02-26 Carlos Garcia Campos <cgarcia@igalia.com>
378 [GTK] Hangs when showing Google search results
379 https://bugs.webkit.org/show_bug.cgi?id=168699
381 Reviewed by Žan Doberšek.
383 Connection::sendOutgoingMessage() can poll forever if sendmsg fails with EAGAIN or EWOULDBLOCK. For example if
384 socket read buffers are full, poll will be blocked until we read the pending data, but we can't read because
385 the thread is blocked in the poll. In case of EAGAIN/EWOULDBLOCK we should poll using the run loop, to allow
386 reads to happen in thread while we wait for the socket to be writable again. In the GTK+ port we use
387 GSocketMonitor to poll socket file descriptor without blocking, using the run loop. This patch renames the
388 socket monitor as readSocketMonitor and adds another one for polling output. When sendmsg fails with
389 EAGAIN/EWOULDBLOCK, the pending message is saved and the write monitor starts polling. Once the socket is
390 writable again we send the pending message. Helper class MessageInfo and a new one UnixMessage have been moved
391 to its own header file to be able to use std::unique_ptr member to save the pending message.
393 * Platform/IPC/Connection.cpp: Include UnixMessage.h as required by std::unique_ptr.
394 * Platform/IPC/Connection.h: Add write socket monitor and also keep the GSocket as a member to reuse it.
395 * Platform/IPC/glib/GSocketMonitor.cpp: Use Function instead of std::function.
396 (IPC::GSocketMonitor::start):
397 * Platform/IPC/glib/GSocketMonitor.h:
398 * Platform/IPC/unix/ConnectionUnix.cpp:
399 (IPC::Connection::platformInitialize): Initialize the GSocket here since we rely on it to take the ownership of
400 the descriptor. We were leaking it if the connection was invalidated without being opened.
401 (IPC::Connection::platformInvalidate): Destroy the GSocket even when not connected. Also stop the write monitor.
402 (IPC::Connection::processMessage):
403 (IPC::Connection::open):
404 (IPC::Connection::platformCanSendOutgoingMessages): Return false if we have a pending message to ensure
405 Connection doesn't try to send more messages until the pending message is dispatched. We don't need to check
406 m_isConnected because the caller already checks that.
407 (IPC::Connection::sendOutgoingMessage): Split it in two. This creates and prepares a UnixMessage and then calls
408 sendOutputMessage() to do the rest.
409 (IPC::Connection::sendOutputMessage): Send the message, or save it if sendmsg fails with EAGAIN or EWOULDBLOCK
410 to be sent later when the socket is writable.
411 * Platform/IPC/unix/UnixMessage.h: Added.
412 (IPC::MessageInfo::MessageInfo):
413 (IPC::MessageInfo::setMessageBodyIsOutOfLine):
414 (IPC::MessageInfo::isMessageBodyIsOutOfLine):
415 (IPC::MessageInfo::bodySize):
416 (IPC::MessageInfo::attachmentCount):
417 (IPC::UnixMessage::UnixMessage):
418 (IPC::UnixMessage::~UnixMessage):
419 (IPC::UnixMessage::attachments):
420 (IPC::UnixMessage::messageInfo):
421 (IPC::UnixMessage::body):
422 (IPC::UnixMessage::bodySize):
423 (IPC::UnixMessage::appendAttachment):
426 2017-02-26 Devin Rousso <dcrousso+webkit@gmail.com>
428 Web Inspector: RTL: Docking Left doesn't constrain the page width
429 https://bugs.webkit.org/show_bug.cgi?id=168862
431 Reviewed by Brian Burg.
433 * UIProcess/mac/WebInspectorProxyMac.mm:
434 (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
435 Calculate the inspectedViewFrame to be the remaining space after WebInspector is opened
436 instead of using the original page size.
438 2017-02-26 Alexey Proskuryakov <ap@apple.com>
440 Stop exporting C++ member variables from WKDOMTextIterator
441 https://bugs.webkit.org/show_bug.cgi?id=168885
443 Reviewed by Dan Bernstein.
445 * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
447 2017-02-26 Alexey Proskuryakov <ap@apple.com>
449 Add preprocessor guards to Mac specific files that are exposed as private headers on iOS
450 https://bugs.webkit.org/show_bug.cgi?id=168878
452 Reviewed by Dan Bernstein.
454 * UIProcess/API/C/WKInspector.h:
455 * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h:
457 2017-02-26 Alexey Proskuryakov <ap@apple.com>
459 Remove spurious C++ include from _WKTestingDelegate.h
460 https://bugs.webkit.org/show_bug.cgi?id=168877
462 Reviewed by Dan Bernstein.
464 * UIProcess/API/Cocoa/_WKTestingDelegate.h:
466 2017-02-26 Alexey Proskuryakov <ap@apple.com>
468 Remove unimplemented WKResourceLoadStatisticsManagerSetReducedTimestampResolution
469 https://bugs.webkit.org/show_bug.cgi?id=168880
471 Reviewed by Dan Bernstein.
473 * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
475 2017-02-26 Alexey Proskuryakov <ap@apple.com>
477 Remove leftover WebKit2 C API function declarations
478 https://bugs.webkit.org/show_bug.cgi?id=168879
480 Reviewed by Tim Horton.
482 * UIProcess/API/C/WKPreferencesRefPrivate.h:
484 2017-02-26 Alexey Proskuryakov <ap@apple.com>
486 Remove some old WKSecurityOrigin binary compatibility stubs
487 https://bugs.webkit.org/show_bug.cgi?id=168881
489 Reviewed by Dan Bernstein.
491 * Shared/API/c/WKSecurityOriginRef.cpp:
492 (WKSecurityOriginGetHost): Deleted.
493 (WKSecurityOriginGetProtocol): Deleted.
495 2017-02-26 Wenson Hsieh <wenson_hsieh@apple.com>
497 REGRESSION (r211312): Double-clicking a word selects it along with the space that follows it
498 https://bugs.webkit.org/show_bug.cgi?id=168821
499 <rdar://problem/30690431>
501 Reviewed by Tim Horton.
503 Actually encode and decode smartInsertDeleteEnabled when sending WebPageCreationParameters over XPC.
505 * Shared/WebPageCreationParameters.cpp:
506 (WebKit::WebPageCreationParameters::encode):
507 (WebKit::WebPageCreationParameters::decode):
509 2017-02-26 Chris Dumez <cdumez@apple.com>
511 HitTestResult's linkSuggestedFilename should sanitize download attribute
512 https://bugs.webkit.org/show_bug.cgi?id=168856
513 <rdar://problem/30683109>
515 Reviewed by Antti Koivisto.
517 HitTestResult's linkSuggestedFilename should sanitize download attribute.
518 This is used by the context menu's "Download Linked File" & "Download Linked
521 * Shared/WebHitTestResultData.cpp:
522 (WebKit::WebHitTestResultData::WebHitTestResultData):
523 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
524 (WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):
526 2017-02-25 Michael Catanzaro <mcatanzaro@igalia.com>
528 [GTK] Unreviewed, document deficiency in webkit_website_data_manager_clear() API
530 Document that this function cannot currently delete cookie data for a particular period of
533 * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
535 2017-02-24 Joseph Pecoraro <pecoraro@apple.com>
537 [Resource Timing] Gather timing information with reliable responseEnd time
538 https://bugs.webkit.org/show_bug.cgi?id=168351
540 Reviewed by Alex Christensen.
542 Change from an unused `double finishTime` to a complete WebCore::NetworkLoadMetrics
543 object in the didFinishLoad ResourceLoader path. We may also extend this in the
544 didFail path later on. This allows the NetworkProcess to give complete timing
545 information, and more final metrics about the load, to WebCore.
547 * NetworkProcess/NetworkDataTask.h:
548 (WebKit::NetworkDataTaskClient::didCompleteWithError):
549 Give the NetworkDataTaskClient a basic didCompleteWithError for a completion
550 without metrics. For loads that complete with an error, or haven't populated
551 any metrics, this will pass empty metrics onward.
553 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
554 (WebKit::BlobDownloadClient::didFinishLoading):
555 * NetworkProcess/Downloads/BlobDownloadClient.h:
556 * NetworkProcess/Downloads/PendingDownload.h:
557 * NetworkProcess/PingLoad.h:
558 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
559 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
560 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
561 * NetworkProcess/NetworkDataTaskBlob.cpp:
562 (WebKit::NetworkDataTaskBlob::didFail):
563 * NetworkProcess/NetworkLoad.cpp:
564 (WebKit::NetworkLoad::continueWillSendRequest):
565 (WebKit::NetworkLoad::didCompleteWithError):
566 (WebKit::NetworkLoad::didFinishLoading):
567 * NetworkProcess/NetworkLoad.h:
568 * NetworkProcess/NetworkLoadClient.h:
569 * NetworkProcess/NetworkResourceLoader.cpp:
570 (WebKit::NetworkResourceLoader::didFinishLoading):
571 (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
572 * NetworkProcess/NetworkResourceLoader.h:
573 * WebProcess/Network/WebResourceLoader.cpp:
574 (WebKit::WebResourceLoader::didFinishResourceLoad):
575 (WebKit::WebResourceLoader::didReceiveResource):
576 * WebProcess/Network/WebResourceLoader.h:
577 * WebProcess/Network/WebResourceLoader.messages.in:
578 Change didFinishLoad paths to take a NetworkLoadMetrics object instead of finishTime.
579 Change didCompleteWithError pathes to include a NetworkLoadMetrics object instead of finishTime.
581 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
582 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
583 (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
584 Own a NetworkLoadTiming that will be populated with the load.
586 * NetworkProcess/cocoa/NetworkSessionCocoa.h:
587 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
588 (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
589 (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
590 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
591 Populate NetworkLoadMetrics in the didFinishCollectingMetrics NSURLSessionTaskDelegate method.
593 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
594 (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
595 (WebKit::NetworkDataTaskSoup::timeoutFired):
596 (WebKit::NetworkDataTaskSoup::didSendRequest):
597 (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
598 (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
599 (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
600 (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
601 (WebKit::NetworkDataTaskSoup::didFinishRead):
602 (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
603 (WebKit::NetworkDataTaskSoup::didFailDownload):
604 (WebKit::NetworkDataTaskSoup::didFail):
605 (WebKit::NetworkDataTaskSoup::networkEvent):
606 (WebKit::NetworkDataTaskSoup::didStartRequest):
607 (WebKit::NetworkDataTaskSoup::didRestart):
608 * NetworkProcess/soup/NetworkDataTaskSoup.h:
609 Instead of populating the NetworkLoadMetrics on the ResourceResponse, populate
610 a member variable during the entire load and dispatch didFinishCollectingMetrics
611 right before didCompleteLoadWithError.
613 2017-02-24 Chris Dumez <cdumez@apple.com>
615 Unreviewed, rolling out r212944.
617 Caused a lot of failures on the debug bots
621 "[Resource Timing] Gather timing information with reliable
623 https://bugs.webkit.org/show_bug.cgi?id=168351
624 http://trac.webkit.org/changeset/212944
626 2017-02-24 Wenson Hsieh <wenson_hsieh@apple.com>
628 Unreviewed, fix the internal build
630 * UIProcess/ios/WKContentViewInteraction.h:
632 2017-02-24 Matt Rajca <mrajca@apple.com>
634 Media: notify clients when autoplay is denied
635 https://bugs.webkit.org/show_bug.cgi?id=168840
637 Reviewed by Alex Christensen.
639 * UIProcess/API/APIUIClient.h:
640 (API::UIClient::handleAutoplayEvent):
641 (API::UIClient::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
642 * UIProcess/API/C/WKPage.cpp:
643 (WKPageSetPageUIClient):
644 * UIProcess/API/C/WKPageUIClient.h:
645 * UIProcess/WebPageProxy.cpp:
646 (WebKit::WebPageProxy::handleAutoplayEvent):
647 (WebKit::WebPageProxy::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
648 * UIProcess/WebPageProxy.h:
649 * UIProcess/WebPageProxy.messages.in:
650 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
651 (WebKit::WebChromeClient::handleAutoplayEvent):
652 (WebKit::WebChromeClient::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
653 * WebProcess/WebCoreSupport/WebChromeClient.h:
655 2017-02-20 Wenson Hsieh <wenson_hsieh@apple.com>
657 Refactor data interaction to use new WKDataInteraction SPI
658 https://bugs.webkit.org/show_bug.cgi?id=168602
659 Work towards <rdar://problem/30313681>
661 Reviewed by Tim Horton.
663 Adjust testing SPI to match new data interaction interfaces.
665 * Platform/spi/ios/UIKitSPI.h:
666 * UIProcess/API/Cocoa/WKWebView.mm:
667 (-[WKWebView _simulateDataInteractionEntered:]):
668 (-[WKWebView _simulateDataInteractionUpdated:]):
669 (-[WKWebView _simulateDataInteractionPerformOperation:]):
670 (-[WKWebView _simulateDataInteractionEnded:]):
671 (-[WKWebView _simulateDataInteractionSessionDidEnd:]):
672 (-[WKWebView _simulateWillBeginDataInteractionWithSession:]):
673 (-[WKWebView _simulatedItemsForSession:]):
674 (-[WKWebView _simulatePrepareForDataInteractionSession:completion:]):
675 (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]): Deleted.
676 (-[WKWebView _simulateFailedDataInteractionWithIndex:]): Deleted.
677 (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]): Deleted.
678 (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]): Deleted.
679 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
680 * UIProcess/ios/WKContentViewInteraction.h:
681 * UIProcess/ios/WKContentViewInteraction.mm:
682 (-[WKContentView _positionInformationDidChange:]):
683 * UIProcess/ios/WKScrollView.h:
684 * UIProcess/ios/WKScrollView.mm:
686 2017-02-20 Wenson Hsieh <wenson_hsieh@apple.com>
688 Remove the data interaction gesture recognizer
689 https://bugs.webkit.org/show_bug.cgi?id=168600
690 <rdar://problem/30313681>
692 Reviewed by Anders Carlsson.
694 The data interaction gesture recognizer will no longer be needed moving forward.
696 * UIProcess/API/Cocoa/WKWebView.mm:
697 (-[WKWebView _simulateDataInteractionGestureRecognized]): Deleted.
698 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
699 * UIProcess/ios/WKContentViewInteraction.h:
700 * UIProcess/ios/WKContentViewInteraction.mm:
701 (-[WKContentView setupInteraction]):
702 (-[WKContentView cleanupInteraction]):
703 (-[WKContentView _removeDefaultGestureRecognizers]):
704 (-[WKContentView _addDefaultGestureRecognizers]):
705 (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
706 (-[WKContentView gestureRecognizerShouldBegin:]):
707 (-[WKContentView _dataInteractionGestureRecognizer]): Deleted.
709 2017-02-24 Chris Dumez <cdumez@apple.com>
711 [iOS][WK2] Disable network cache speculative revalidation / loading in low power mode
712 https://bugs.webkit.org/show_bug.cgi?id=168832
713 <rdar://problem/30697911>
715 Reviewed by Antti Koivisto.
717 Disable network cache speculative revalidation / loading in low power mode on iOS to
720 * NetworkProcess/cache/NetworkCache.cpp:
721 (WebKit::NetworkCache::Cache::initialize):
722 * NetworkProcess/cache/NetworkCache.h:
724 2017-02-24 John Wilander <wilander@apple.com>
726 Resource Load Statistics: Add alternate classification method
727 https://bugs.webkit.org/show_bug.cgi?id=168347
728 <rdar://problem/30352793>
729 <rdar://problem/30646710>
730 <rdar://problem/30660708>
732 Reviewed by Alex Christensen.
734 This patch adds a CorePrediction-based classifier to the WebResourceLoadStatisticsStore.
735 The CorePrediction framework is introduced as a dependency for macOS and iOS. The patch
736 also adds functions to support layout tests of the feature.
738 * Platform/Logging.h:
739 Added channel ResourceLoadStatistics.
740 * Platform/classifier/ResourceLoadStatisticsClassifier.h: Added.
741 Pulls in the Cocoa-specific classifier for Cocoa-based platforms.
742 (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
743 * Platform/classifier/ResourceLoadStatisticsClassifierBase.cpp: Added.
744 (WebKit::ResourceLoadStatisticsClassifierBase::hasPrevalentResourceCharacteristics):
745 Shared classifier logic.
746 (WebKit::ResourceLoadStatisticsClassifierBase::classifyWithVectorThreshold):
747 Fallback classifier for when we don't have CorePrediction.
748 * Platform/classifier/ResourceLoadStatisticsClassifierBase.h: Added.
749 (WebKit::ResourceLoadStatisticsClassifierBase::ResourceLoadStatisticsClassifierBase):
750 (WebKit::ResourceLoadStatisticsClassifierBase::~ResourceLoadStatisticsClassifierBase):
751 * Platform/classifier/cocoa/CorePredictionSoftLink.h: Added.
752 Soft links to CorePrediction and the two functions we use from it.
753 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: Added.
754 (WebKit::ResourceLoadStatisticsClassifier::classify):
755 (WebKit::ResourceLoadStatisticsClassifier::storagePath):
756 (WebKit::ResourceLoadStatisticsClassifier::shouldUseCorePredictionAndHaveModelLoaded):
757 (WebKit::ResourceLoadStatisticsClassifier::singletonPredictionModel):
758 The new classifier for Cocoa platforms.
759 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h: Added.
761 Added Platform/classifier directory and ResourceLoadStatisticsClassifierBase.cpp.
763 Added Platform/classifier and Platform/classifier/cocoa directories, and
764 source files ResourceLoadStatisticsClassifierBase.cpp and
765 ResourceLoadStatisticsClassifierCocoa.cpp
766 * Resources/ResourceLoadStatistics/corePrediction_model: Added.
767 Model file to load into CorePrediction.
768 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
769 (WKResourceLoadStatisticsManagerSetSubframeUnderTopFrameOrigin):
770 (WKResourceLoadStatisticsManagerSetSubresourceUnderTopFrameOrigin):
771 (WKResourceLoadStatisticsManagerSetSubresourceUniqueRedirectTo):
773 * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
774 * UIProcess/WebResourceLoadStatisticsManager.cpp:
775 (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
776 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
777 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
779 * UIProcess/WebResourceLoadStatisticsManager.h:
780 * UIProcess/WebResourceLoadStatisticsStore.cpp:
781 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
782 Renamed m_storagePath to m_statisticsStoragePath for clarity.
783 (WebKit::WebResourceLoadStatisticsStore::classifyResource):
784 Now calls the classifier through its ResourceLoadStatisticsClassifier
786 (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
787 Renamed m_storagePath to m_statisticsStoragePath for clarity.
788 (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
789 Renamed m_storagePath to m_statisticsStoragePath for clarity.
790 (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics): Deleted.
791 * UIProcess/WebResourceLoadStatisticsStore.h:
792 * WebKit2.xcodeproj/project.pbxproj:
793 Added the new classifier source files under Platform/classifier and the
794 corePrediction_model file under Resources/ResourceLoadStatistics.
796 2017-02-23 Joseph Pecoraro <pecoraro@apple.com>
798 [Resource Timing] Add Experimental Feature Flag
799 https://bugs.webkit.org/show_bug.cgi?id=167147
801 Reviewed by Ryosuke Niwa.
803 * Shared/WebPreferencesDefinitions.h:
804 Move ResourceTiming to experimental section.
805 Disable it for El Capitan due to known issues.
807 2017-02-23 Joseph Pecoraro <pecoraro@apple.com>
809 [Resource Timing] Gather timing information with reliable responseEnd time
810 https://bugs.webkit.org/show_bug.cgi?id=168351
812 Reviewed by Alex Christensen.
814 Change from an unused `double finishTime` to a complete WebCore::NetworkLoadMetrics
815 object in the didFinishLoad ResourceLoader path. We may also extend this in the
816 didFail path later on. This allows the NetworkProcess to give complete timing
817 information, and more final metrics about the load, to WebCore.
819 * NetworkProcess/NetworkDataTask.h:
820 (WebKit::NetworkDataTaskClient::didCompleteWithError):
821 Give the NetworkDataTaskClient a basic didCompleteWithError for a completion
822 without metrics. For loads that complete with an error, or haven't populated
823 any metrics, this will pass empty metrics onward.
825 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
826 (WebKit::BlobDownloadClient::didFinishLoading):
827 * NetworkProcess/Downloads/BlobDownloadClient.h:
828 * NetworkProcess/Downloads/PendingDownload.h:
829 * NetworkProcess/PingLoad.h:
830 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
831 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
832 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
833 * NetworkProcess/NetworkDataTaskBlob.cpp:
834 (WebKit::NetworkDataTaskBlob::didFail):
835 * NetworkProcess/NetworkLoad.cpp:
836 (WebKit::NetworkLoad::continueWillSendRequest):
837 (WebKit::NetworkLoad::didCompleteWithError):
838 (WebKit::NetworkLoad::didFinishLoading):
839 * NetworkProcess/NetworkLoad.h:
840 * NetworkProcess/NetworkLoadClient.h:
841 * NetworkProcess/NetworkResourceLoader.cpp:
842 (WebKit::NetworkResourceLoader::didFinishLoading):
843 (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
844 * NetworkProcess/NetworkResourceLoader.h:
845 * WebProcess/Network/WebResourceLoader.cpp:
846 (WebKit::WebResourceLoader::didFinishResourceLoad):
847 (WebKit::WebResourceLoader::didReceiveResource):
848 * WebProcess/Network/WebResourceLoader.h:
849 * WebProcess/Network/WebResourceLoader.messages.in:
850 Change didFinishLoad paths to take a NetworkLoadMetrics object instead of finishTime.
851 Change didCompleteWithError pathes to include a NetworkLoadMetrics object instead of finishTime.
853 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
854 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
855 (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
856 Own a NetworkLoadTiming that will be populated with the load.
858 * NetworkProcess/cocoa/NetworkSessionCocoa.h:
859 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
860 (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
861 (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
862 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
863 Populate NetworkLoadMetrics in the didFinishCollectingMetrics NSURLSessionTaskDelegate method.
865 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
866 (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
867 (WebKit::NetworkDataTaskSoup::timeoutFired):
868 (WebKit::NetworkDataTaskSoup::didSendRequest):
869 (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
870 (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
871 (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
872 (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
873 (WebKit::NetworkDataTaskSoup::didFinishRead):
874 (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
875 (WebKit::NetworkDataTaskSoup::didFailDownload):
876 (WebKit::NetworkDataTaskSoup::didFail):
877 (WebKit::NetworkDataTaskSoup::networkEvent):
878 (WebKit::NetworkDataTaskSoup::didStartRequest):
879 (WebKit::NetworkDataTaskSoup::didRestart):
880 * NetworkProcess/soup/NetworkDataTaskSoup.h:
881 Instead of populating the NetworkLoadMetrics on the ResourceResponse, populate
882 a member variable during the entire load and dispatch didFinishCollectingMetrics
883 right before didCompleteLoadWithError.
885 2017-02-23 Beth Dakin <bdakin@apple.com> + Dan Saunders <dasau@microsoft.com>
887 No reliable way to get a snapshot of WKWebView
888 https://bugs.webkit.org/show_bug.cgi?id=161450
890 <rdar://problem/23846039>
892 Reviewed by Tim Horton.
894 This patch adds a new API to WKWebView to snapshot a rect:
895 takeSnapshotWithConfiguration:completionHandler:
897 It also adds a new API object WKSnapshotConfiguration.
899 * UIProcess/API/Cocoa/WKSnapshotConfiguration.h: Added.
900 * UIProcess/API/Cocoa/WKSnapshotConfiguration.mm: Added.
901 (-[WKSnapshotConfiguration copyWithZone:]):
902 * UIProcess/API/Cocoa/WKWebView.h:
903 * UIProcess/API/Cocoa/WKWebView.mm:
904 (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
905 * WebKit2.xcodeproj/project.pbxproj:
907 2017-02-23 Jer Noble <jer.noble@apple.com>
909 ASSERT in RTCNetwork::IPAddress::decode()
910 https://bugs.webkit.org/show_bug.cgi?id=168792
912 Reviewed by Tim Horton.
914 An ASSERT added to RTCNetwork::IPAddress::decode in r212781 was hit due to a bad encode of SocketAddress; an
915 extra boolean value was added to the encoder unnecessarily, leading to garbage data being decoded in the following
918 Drive-by-fix: allow the IPAddress encoder/decoder to pass through a value of AF_UNSPEC for an IPAddress to support
919 passing through an "empty" IPAddress value.
921 * Shared/RTCNetwork.cpp:
922 (WebKit::RTCNetwork::IPAddress::decode):
923 (WebKit::RTCNetwork::IPAddress::encode):
924 (WebKit::RTCNetwork::SocketAddress::encode):
926 2017-02-23 Eric Carlson <eric.carlson@apple.com>
928 [WebRTC][Mac][WebKit2] WebRTC requires media capture
929 https://bugs.webkit.org/show_bug.cgi?id=168782
930 <rdar://problem/30675242>
932 Reviewed by Youenn Fablet.
934 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
935 (WebKit::WebProcessPool::platformInitializeWebProcess): Extend the sanbox to allow microphone access
936 if media stream OR WebRTC is enabled.
938 2017-02-23 Brent Fulgham <bfulgham@apple.com>
940 [Mac] Remove unneeded sandbox exceptions for media elements
941 https://bugs.webkit.org/show_bug.cgi?id=168767
943 Reviewed by Alex Christensen.
945 Remove several sandbox exceptions that have not been needed for the past four
946 or five macOS releases.
948 * WebProcess/com.apple.WebProcess.sb.in:
950 2017-02-23 Brent Fulgham <bfulgham@apple.com>
952 [Mac] Remove com.apple.audio.VDCAssistant from sandboxes
953 https://bugs.webkit.org/show_bug.cgi?id=168764
954 <rdar://problem/16736919>
956 Reviewed by Alex Christensen.
958 Remove unneeded sandbox class.
960 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
961 * WebProcess/com.apple.WebProcess.sb.in:
963 2017-02-22 Wenson Hsieh <wenson_hsieh@apple.com>
965 Data interaction causes selection to fall out of sync between web/UI processes
966 https://bugs.webkit.org/show_bug.cgi?id=168735
967 <rdar://problem/30657817>
969 Reviewed by Tim Horton.
971 Fixes a bug with data interaction causing selection state to fall out of sync between the UI and web processes,
972 and also introduces testing infrastructure and tests for grabbing UI-side selection view rects in TestWebKitAPI.
973 While performing a data interaction operation, we now lift restrictions for assisting the focused node.
975 * UIProcess/ios/WKContentViewInteraction.h:
976 * UIProcess/ios/WKContentViewInteraction.mm:
977 (-[WKContentView cleanupInteraction]):
978 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
980 2017-02-23 Carlos Garcia Campos <cgarcia@igalia.com>
982 [GTK] Crash attempting to load Flash plugin in Wayland
983 https://bugs.webkit.org/show_bug.cgi?id=163159
985 Reviewed by Michael Catanzaro.
987 The problem is that we check if the current diplay is X11 or Wayland also in the plugin process, but with GTK2
988 plugins the display is always X11. We should early reject plugins requiring GTK2 in the UI process when the
989 current display is Wayland.
991 * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
992 (WebKit::PluginInfoStore::getPluginInfo):
993 * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
994 (WebKit::PluginProcessProxy::scanPlugin):
995 * UIProcess/gtk/WebPageProxyGtk.cpp:
996 (WebKit::WebPageProxy::createPluginContainer): Add an assert to ensure this message is never received on a
998 * WebProcess/Plugins/PluginView.cpp:
999 (WebKit::PluginView::createPluginContainer): Never send CreatePluginContainer message to the UI process if the
1002 2017-02-23 Eric Carlson <eric.carlson@apple.com>
1004 [MediaStream iOS] Allow web process sandbox to be extended for media capture
1005 https://bugs.webkit.org/show_bug.cgi?id=168756
1007 Reviewed by Brent Fulgham.
1009 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add rules to dynamically
1010 extend the sandbox to allow access to the camera and/or microphone.
1012 2017-02-23 Tomas Popela <tpopela@redhat.com>
1014 [GTK] Drag and drop is always moving the content even if copy is requested
1015 https://bugs.webkit.org/show_bug.cgi?id=168424
1017 Reviewed by Carlos Garcia Campos.
1019 Drag and drop is always moving the content around even if the copy is
1020 requested (i.e. by pressing the Control key).
1022 * UIProcess/gtk/DragAndDropHandler.cpp:
1023 (WebKit::DragAndDropHandler::drop):
1025 2017-02-22 Carlos Garcia Campos <cgarcia@igalia.com>
1027 Better handle Thread and RunLoop initialization
1028 https://bugs.webkit.org/show_bug.cgi?id=167828
1030 Reviewed by Yusuke Suzuki.
1032 Remove unnecessary call to WTF::initializeMainThread().
1034 * Shared/WebKit2Initialize.cpp:
1035 (WebKit::InitializeWebKit2):
1037 2017-02-22 Chris Dumez <cdumez@apple.com>
1039 Unreviewed, drop console logging landed by mistake as part of r212832.
1041 * UIProcess/BackgroundProcessResponsivenessTimer.cpp:
1042 (WebKit::BackgroundProcessResponsivenessTimer::timerFired):
1044 2017-02-22 Brent Fulgham <bfulgham@apple.com>
1046 [Mac] Tighten sandbox to deny process-info* access
1047 https://bugs.webkit.org/show_bug.cgi?id=168704
1048 <rdar://problem/16371441>
1050 Reviewed by Alex Christensen.
1052 Tighten the various WebKit sandboxes by denying access to process-info.
1053 Add back specific features needed to run WebKit tests and to do browsing
1054 of websites (including plugins).
1056 * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
1057 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1058 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1059 * WebProcess/com.apple.WebProcess.sb.in:
1061 2017-02-22 Anders Carlsson <andersca@apple.com>
1063 Crash if there's a mismatch between the WebKit used by the UI process and child processes respectively
1064 https://bugs.webkit.org/show_bug.cgi?id=168739
1065 Part of rdar://problem/30631411.
1067 Reviewed by Geoffrey Garen.
1069 If the UI process and web process for some reason end up using different versions of the WebKit framework, weird things happen
1070 because the message format is different between versions. To avoid this, send along the WebKit bundle version from the UI process
1071 in the XPC bootstrap message, check that it matches inside the XPC main functions. If there's a mismatch, crash.
1073 * Shared/Cocoa/ChildProcessCocoa.mm:
1074 (WebKit::ChildProcess::didReceiveInvalidMessage):
1077 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1079 Check for the bundle version and crash if it's not what we expect.
1081 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1082 (WebKit::ProcessLauncher::launchProcess):
1083 Initialize the bundle version.
1085 * WebProcess/cocoa/WebProcessCocoa.mm:
1086 (WebKit::_WKSetCrashReportApplicationSpecificInformation):
1087 Export this so we can call it from the XPC services without having to link WKSI.
1089 2017-02-22 Chris Dumez <cdumez@apple.com>
1091 [WK2] Call processDidBecomeUnresponsive delegate when a background process is unresponsive
1092 https://bugs.webkit.org/show_bug.cgi?id=168683
1093 <rdar://problem/30558745>
1095 Reviewed by Dan Bernstein.
1097 Call processDidBecomeUnresponsive delegate when a background process is unresponsive
1098 instead of killing it on WebKit side. This gives the client the choice about what it
1099 wants to do about this process.
1101 * UIProcess/API/APIProcessPoolConfiguration.cpp:
1102 (API::ProcessPoolConfiguration::copy):
1103 * UIProcess/API/APIProcessPoolConfiguration.h:
1104 * UIProcess/API/C/WKContext.cpp:
1105 * UIProcess/API/C/WKContextPrivate.h:
1106 * UIProcess/BackgroundProcessResponsivenessTimer.cpp: Renamed from Source/WebKit2/UIProcess/UnresponsiveWebProcessTerminator.cpp.
1107 (WebKit::BackgroundProcessResponsivenessTimer::BackgroundProcessResponsivenessTimer):
1108 (WebKit::BackgroundProcessResponsivenessTimer::updateState):
1109 (WebKit::BackgroundProcessResponsivenessTimer::timerFired):
1110 * UIProcess/BackgroundProcessResponsivenessTimer.h: Renamed from Source/WebKit2/UIProcess/UnresponsiveWebProcessTerminator.h.
1111 * UIProcess/WebPageProxy.cpp:
1112 (WebKit::WebPageProxy::reattachToWebProcess):
1113 (WebKit::WebPageProxy::dispatchActivityStateChange):
1114 (WebKit::WebPageProxy::terminateProcess):
1115 * UIProcess/WebPageProxy.h:
1116 * UIProcess/WebProcessProxy.cpp:
1117 (WebKit::m_backgroundResponsivenessTimer):
1118 * UIProcess/WebProcessProxy.h:
1119 * WebKit2.xcodeproj/project.pbxproj:
1121 2017-02-22 Carlos Garcia Campos <cgarcia@igalia.com>
1123 NetworkProcess: Stop disabling buffering when NETWORK_CACHE is disabled in build
1124 https://bugs.webkit.org/show_bug.cgi?id=168637
1126 Reviewed by Alex Christensen.
1128 It was added in r193752 as part of bug #137692 to fix an infinite loop in network process that happened in EFL
1129 because they didn't enable the network cache at that time. I think that was actually a workaround, and it was
1130 added without any comment so it has stayed there even when EFL enabled disk cache, and now that is gone. Looking
1131 at current code I see no reason why buffering can't work with the disk cache disabled, so I think it's time to
1132 remove that workaround.
1134 * WebProcess/Network/WebLoaderStrategy.cpp:
1135 (WebKit::maximumBufferingTime):
1137 2017-02-21 Youenn Fablet <youenn@apple.com>
1139 [WebRTC][Mac] Activate libwebrtc
1140 https://bugs.webkit.org/show_bug.cgi?id=167293
1141 <rdar://problem/30401864>
1143 Reviewed by Alex Christensen.
1145 Activating PeerConnection runtime flag based on successful loading of libwebrtc.dylib.
1147 * Configurations/WebKit.xcconfig:
1148 * Configurations/FeatureDefines.xcconfig:
1149 * Shared/WebPreferencesDefinitions.h:
1150 * UIProcess/WebPreferences.cpp:
1151 (WebKit::checkWebRTCAvailability):
1153 2017-02-21 Commit Queue <commit-queue@webkit.org>
1155 Unreviewed, rolling out r212786.
1156 https://bugs.webkit.org/show_bug.cgi?id=168710
1158 It broke GTK+ port when using single shared process model
1159 (Requested by KaL on #webkit).
1163 "Refactor WebViewImpl creation in preparation for supporting
1164 multiple WebsiteDataStores."
1165 https://bugs.webkit.org/show_bug.cgi?id=168676
1166 http://trac.webkit.org/changeset/212786
1168 2017-02-21 Brady Eidson <beidson@apple.com>
1170 Refactor WebViewImpl creation in preparation for supporting multiple WebsiteDataStores.
1171 https://bugs.webkit.org/show_bug.cgi?id=168676
1173 Reviewed by Alex Christensen.
1175 * UIProcess/API/Cocoa/WKWebView.mm:
1176 (-[WKWebView _initializeWithConfiguration:]): Allow for WebViewImpl creation to fail.
1178 * UIProcess/API/mac/WKView.mm:
1179 (-[WKView initWithFrame:processPool:configuration:]): Ditto.
1181 * UIProcess/Cocoa/WebViewImpl.h:
1182 * UIProcess/Cocoa/WebViewImpl.mm:
1183 (WebKit::WebViewImpl::maybeCreate):
1184 (WebKit::WebViewImpl::WebViewImpl):
1186 * UIProcess/WebPageProxy.cpp:
1187 (WebKit::WebPageProxy::reattachToWebProcess): New WebProcess creation might fail. Handle it.
1188 * UIProcess/WebProcessPool.cpp:
1189 (WebKit::WebProcessPool::createNewWebProcess):
1190 (WebKit::WebProcessPool::warmInitialProcess):
1191 (WebKit::WebProcessPool::maybeCreateNewWebProcessRespectingProcessCountLimit): This can now fail
1192 if the process will have a non-default WebsiteDataStore but we've already reached the process cap.
1193 (WebKit::WebProcessPool::createWebPage):
1194 (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit): Deleted.
1195 * UIProcess/WebProcessPool.h:
1197 2017-02-21 Youenn Fablet <youenn@apple.com>
1199 [WebRTC] WebKit2 should assert that libwebrtc transmitted IP addresses family is IP4 or IP6
1200 https://bugs.webkit.org/show_bug.cgi?id=168691
1202 Reviewed by Alex Christensen.
1204 Adding some asserts that family is IPv4 or IPv6.
1206 * Shared/RTCNetwork.cpp:
1207 (WebKit::RTCNetwork::IPAddress::decode):
1208 (WebKit::RTCNetwork::IPAddress::encode):
1210 2017-02-20 Simon Fraser <simon.fraser@apple.com>
1212 Add support to PlatformCALayer/GraphicsLayerCA for subpixel-antialiased text, with a Setting and a MiniBrowser switch
1213 https://bugs.webkit.org/show_bug.cgi?id=168620
1214 <rdar://problem/30617772>
1216 Reviewed by Tim Horton.
1218 Add a Setting for subpixel-antialiased layer text. Plumb this through GraphicsLayerCA and
1219 PlatformCALayer, where it ultimately affects the layer contents format.
1221 This is not supported with UI-side compositing.
1223 * Shared/WebPreferencesDefinitions.h:
1224 * UIProcess/API/C/WKPreferences.cpp:
1225 (WKPreferencesSetSubpixelAntialiasedLayerTextEnabled):
1226 (WKPreferencesGetSubpixelAntialiasedLayerTextEnabled):
1227 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1228 * UIProcess/API/Cocoa/WKPreferences.mm:
1229 (-[WKPreferences _subpixelAntialiasedLayerTextEnabled]):
1230 (-[WKPreferences _setSubpixelAntialiasedLayerTextEnabled:]):
1231 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1232 * WebProcess/WebPage/WebPage.cpp:
1233 (WebKit::WebPage::updatePreferences):
1234 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1235 (WebKit::PlatformCALayerRemote::supportsSubpixelAntialiasedText):
1236 (WebKit::PlatformCALayerRemote::setSupportsSubpixelAntialiasedText):
1237 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1238 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
1239 (WebKit::PlatformCALayerRemoteTiledBacking::supportsSubpixelAntialiasedText):
1240 (WebKit::PlatformCALayerRemoteTiledBacking::setSupportsSubpixelAntialiasedText):
1241 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
1243 2017-02-21 John Wilander <wilander@apple.com>
1245 Resource Load Statistics: Only scan website data store once per session ID + reinstate removal counting
1246 https://bugs.webkit.org/show_bug.cgi?id=168541
1248 Reviewed by Alex Christensen.
1250 * UIProcess/WebProcessProxy.cpp:
1251 (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyOwnedDomainsInAllPersistentDataStores):
1252 The CallbackAggregator now merges a list of domains for which we
1253 have removed data records and eventually reports this back to the
1255 * UIProcess/WebProcessProxy.h:
1256 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1257 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
1258 Now reports back to its WebCore::ResourceLoadStatisticsStore
1259 which domains have had data records removed.
1260 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1261 (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyOwnedDomains):
1262 The completion handler now handles data record removal counting.
1263 (WebKit::WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains):
1264 The completion handler now handles data record removal counting.
1265 * UIProcess/WebsiteData/WebsiteDataStore.h:
1267 2017-02-21 Alex Christensen <achristensen@webkit.org>
1271 * PlatformMac.cmake:
1273 2017-02-21 Youenn Fablet <youenn@apple.com>
1275 [WebRTC][Mac] Network process sandbox does not allow WebRTC networking
1276 https://bugs.webkit.org/show_bug.cgi?id=168594
1278 Reviewed by Brent Fulgham.
1280 UIProcess was passing a boolean to know whether WebRTC networking is allowed or not to the network process.
1281 This boolean was known to late for the sandbox to be relaxed.
1282 A sandbox extension is now used instead to relax the sandbox.
1284 * NetworkProcess/NetworkProcess.h:
1285 * NetworkProcess/NetworkProcessCreationParameters.cpp:
1286 (WebKit::NetworkProcessCreationParameters::encode):
1287 (WebKit::NetworkProcessCreationParameters::decode):
1288 * NetworkProcess/NetworkProcessCreationParameters.h:
1289 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1290 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1291 * NetworkProcess/mac/NetworkProcessMac.mm:
1292 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1293 (WebKit::NetworkProcess::initializeSandbox):
1294 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1295 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1296 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1298 2017-02-21 Youenn Fablet <youenn@apple.com>
1300 [WebRTC] ICE candidates should be filtered according a policy
1301 https://bugs.webkit.org/show_bug.cgi?id=168348
1303 Reviewed by Alex Christensen.
1305 Adding the possibility for the UI process to control the ICE candidate filtering and whether libwebrtc can
1306 enumerate all interfaces or not.
1308 Disabling ICE candidate filtering for the moment.
1309 Enabling to enumerate all interfaces for the moment.
1311 In the future, ICE candidate filtering should be tied to getUserMedia.
1312 Interface enumeration should be disabled with the default configuration.
1313 We should do that once we have sufficient testing in various network infrastructures.
1315 * UIProcess/WebPageProxy.cpp:
1316 (WebKit::WebPageProxy::initializeWebPage):
1317 * WebKit2.xcodeproj/project.pbxproj:
1318 * WebProcess/WebPage/WebPage.h:
1319 (WebKit::WebPage::disableICECandidateFiltering):
1320 (WebKit::WebPage::enableICECandidateFiltering):
1321 (WebKit::WebPage::disableEnumeratingAllNetworkInterfaces):
1322 (WebKit::WebPage::enableEnumeratingAllNetworkInterfaces):
1323 * WebProcess/WebPage/WebPage.messages.in:
1325 2017-02-21 Youenn Fablet <youenn@apple.com>
1327 [WebRTC] NetworkRTCMonitor should ensure clearing its manager only once
1328 https://bugs.webkit.org/show_bug.cgi?id=168661
1330 Reviewed by Alex Christensen.
1332 Making sure NetworkRTCMonitor manager is cleared only once.
1333 ALso ensuring that manager does not get destroyed as part of NetworkRTCMonitor destructor.
1334 The manager needs to be destroyed in the RTC network thread.
1336 * NetworkProcess/webrtc/NetworkRTCMonitor.cpp:
1337 (WebKit::NetworkRTCMonitor::~NetworkRTCMonitor):
1338 (WebKit::NetworkRTCMonitor::stopUpdating):
1339 * NetworkProcess/webrtc/NetworkRTCMonitor.h:
1341 2017-02-21 Brent Fulgham <bfulgham@apple.com>
1343 [WebRTC][Mac][WebKit2] Revise sandbox to limit connections to UDP and TCP
1344 https://bugs.webkit.org/show_bug.cgi?id=168664
1345 <rdar://problem/30600587>
1347 Reviewed by Youenn Fablet.
1349 Add filters to the WebRTC rule to limit network traffic to UDP and TCP.
1351 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1353 2017-02-21 Maureen Daum <mdaum@apple.com>
1355 Check what LocalStorage data exists in deleteDatabasesModifiedSince() before attempting deletion.
1356 https://bugs.webkit.org/show_bug.cgi?id=168659
1357 rdar://problem/22781730
1359 Reviewed by Brady Eidson.
1361 Check what LocalStorage data exists in deleteDatabasesModifiedSince() before attempting deletion.
1362 It is possible that another process has caused information to be added to LocalStorage
1363 after we created this LocalStorageDatabaseTracker instance, so we should update our
1364 internal state by checking the contents of StorageTracker.db and the other local
1365 storage files so we know what databases actually exist. By calling importOriginIdentifiers()
1366 at the start of deleteDatabasesModifiedSince(), m_origins will now have the up-to-date
1367 list of origins LocalStorage contains data for.
1369 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1370 (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
1372 2017-02-21 Carlos Garcia Campos <cgarcia@igalia.com>
1374 Reduce platform ifdefs in WebKit2 custom protocols implementation
1375 https://bugs.webkit.org/show_bug.cgi?id=165028
1377 Reviewed by Darin Adler.
1379 Make mac implementation use the APICustomProtocolManagerClient to share more code with the soup based ports.
1381 * CMakeLists.txt: Add CustomProtocolManagerProxy.cpp.
1382 * PlatformEfl.cmake: Remove CustomProtocolManagerProxySoup.cpp.
1383 * PlatformGTK.cmake: Ditto.
1384 * PlatformMac.cmake: Remove CustomProtocolManagerProxyMac.mm.
1385 * UIProcess/API/APICustomProtocolManagerClient.h:
1386 (API::CustomProtocolManagerClient::startLoading): Make it void, since we were always returning true and the
1387 returned value was ignored.
1388 * UIProcess/API/efl/ewk_url_scheme_request.cpp:
1389 (EwkUrlSchemeRequest::finish): Update to new CustomProtocolManagerProxy API.
1390 * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
1391 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1392 (webkitURISchemeRequestReadCallback): Ditto.
1393 * UIProcess/Cocoa/CustomProtocolManagerClient.h: Added.
1394 * UIProcess/Cocoa/CustomProtocolManagerClient.mm: Added.
1395 (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:]):
1396 (-[WKCustomProtocolLoader dealloc]):
1397 (-[WKCustomProtocolLoader connection:didFailWithError:]):
1398 (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
1399 (-[WKCustomProtocolLoader connection:didReceiveData:]):
1400 (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
1401 (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
1402 (WebKit::CustomProtocolManagerClient::startLoading):
1403 (WebKit::CustomProtocolManagerClient::stopLoading):
1404 (WebKit::CustomProtocolManagerClient::invalidate):
1405 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1406 (WebKit::WebProcessPool::platformInitialize): Set the CustomProtocolManagerClient.
1407 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
1408 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Added.
1409 (WebKit::CustomProtocolManagerProxy::startLoading):
1410 (WebKit::CustomProtocolManagerProxy::processDidClose):
1411 (WebKit::CustomProtocolManagerProxy::wasRedirectedToRequest):
1412 (WebKit::CustomProtocolManagerProxy::didReceiveResponse):
1413 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1414 * UIProcess/WebProcessPool.cpp:
1415 (WebKit::globalURLSchemesWithCustomProtocolHandlers): Just moved here to use it from ensureNetworkProcess().
1416 (WebKit::WebProcessPool::WebProcessPool): Remove soup ifdefs.
1417 (WebKit::WebProcessPool::setCustomProtocolManagerClient): Moved from the soup implementation.
1418 (WebKit::WebProcessPool::ensureNetworkProcess): Initialize custom protocols parameters.
1419 (WebKit::WebProcessPool::registerSchemeForCustomProtocol): Register the protocol if not already registered globally.
1420 (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): Remove soup ifdefs.
1421 * UIProcess/WebProcessPool.h: Remove soup ifdefs.
1422 * UIProcess/efl/RequestManagerClientEfl.cpp:
1423 * UIProcess/soup/WebProcessPoolSoup.cpp:
1424 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
1425 * WebKit2.xcodeproj/project.pbxproj:
1427 2017-02-21 Daewoong Jang <daewoong.jang@navercorp.com>
1429 Remove unused files.
1430 https://bugs.webkit.org/show_bug.cgi?id=168656.
1432 Reviewed by Csaba Osztrogonác.
1434 Remove files which became unused after removal of EFL port.
1436 * UIProcess/CoordinatedGraphics/PageViewportController.cpp: Removed.
1437 * UIProcess/CoordinatedGraphics/PageViewportController.h: Removed.
1438 * UIProcess/PageViewportControllerClient.h: Removed.
1440 2017-02-21 Youenn Fablet <youenn@apple.com>
1442 [WebRTC] LibWebRTCSocket::SendTo message should have a correct SocketAddress
1443 https://bugs.webkit.org/show_bug.cgi?id=168636
1445 Reviewed by Eric Carlson.
1447 * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
1448 (WebKit::LibWebRTCSocket::SendTo): Ensuring address remains valid during SendTo message lifetime.
1450 2017-02-21 Alex Christensen <achristensen@webkit.org>
1452 Unreviewed, rolling out r212699.
1454 Internal build not ready
1458 "[WebRTC][Mac] Activate libwebrtc"
1459 https://bugs.webkit.org/show_bug.cgi?id=167293
1460 http://trac.webkit.org/changeset/212699
1462 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
1464 Remove ENABLE_THREADED_COMPOSITOR build option
1465 https://bugs.webkit.org/show_bug.cgi?id=168606
1467 Reviewed by Michael Catanzaro.
1469 Now that we have AC mode on demand with the threaded compositor there's no reason to keep the old AC code.
1471 * PlatformGTK.cmake:
1472 * WebProcess/WebPage/LayerTreeHost.cpp:
1473 (WebKit::LayerTreeHost::create):
1474 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: Removed.
1475 * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Removed.
1477 2017-02-20 Youenn Fablet <youenn@apple.com>
1479 [WebRTC][Mac] Activate libwebrtc
1480 https://bugs.webkit.org/show_bug.cgi?id=167293
1481 <rdar://problem/30401864>
1483 Reviewed by Alex Christensen.
1485 Activating PeerConnection runtime flag based on successful loading of libwebrtc.dylib.
1487 * Configurations/WebKit.xcconfig:
1488 * Shared/WebPreferencesDefinitions.h:
1489 * UIProcess/WebPreferences.cpp:
1490 (WebKit::checkWebRTCAvailability):
1492 2017-02-20 Ryan Haddad <ryanhaddad@apple.com>
1494 Unreviewed, rolling out r212685.
1496 This change broke the 32-bit Sierra build.
1500 "Resource Load Statistics: Add alternate classification
1502 https://bugs.webkit.org/show_bug.cgi?id=168347
1503 http://trac.webkit.org/changeset/212685
1505 2017-02-20 John Wilander <wilander@apple.com>
1507 Resource Load Statistics: Add alternate classification method
1508 https://bugs.webkit.org/show_bug.cgi?id=168347
1509 <rdar://problem/30352793>
1511 Reviewed by Alex Christensen.
1513 This patch adds a CorePrediction-based classifier to the WebResourceLoadStatisticsStore.
1514 The CorePrediction framework is introduced as a dependency for macOS and iOS. The patch
1515 also adds functions to support layout tests of the feature.
1517 * Configurations/BaseTarget.xcconfig:
1518 * Configurations/WebKit.xcconfig:
1519 Added dependency on CorePrediction.
1520 * Platform/classifier: Added.
1521 * Platform/classifier/ResourceLoadStatisticsClassifier.h: Added.
1522 Pulls in the Cocoa-specific classifier for Cocoa-based platforms.
1523 (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
1524 * Platform/classifier/ResourceLoadStatisticsClassifierBase.cpp: Added.
1525 (WebKit::ResourceLoadStatisticsClassifierBase::hasPrevalentResourceCharacteristics):
1526 Shared classifier logic.
1527 (WebKit::ResourceLoadStatisticsClassifierBase::classifyWithVectorThreshold):
1528 Fallback classifier for when we don't have CorePrediction.
1529 * Platform/classifier/ResourceLoadStatisticsClassifierBase.h: Added.
1530 (WebKit::ResourceLoadStatisticsClassifierBase::ResourceLoadStatisticsClassifierBase):
1531 (WebKit::ResourceLoadStatisticsClassifierBase::~ResourceLoadStatisticsClassifierBase):
1532 * Platform/classifier/cocoa: Added.
1533 * Platform/classifier/cocoa/CorePredictionSPI.h: Added.
1534 Includes CorePrediction if available, otherwise declares needed symbols.
1535 Always redeclares the functions so we'll get a build error if
1536 CorePrediction changes.
1537 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: Added.
1538 (WebKit::ResourceLoadStatisticsClassifier::classify):
1539 (WebKit::ResourceLoadStatisticsClassifier::storagePath):
1540 (WebKit::ResourceLoadStatisticsClassifier::shouldUseCorePrediction):
1541 The new classifier for Cocoa platforms.
1542 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h: Added.
1543 (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
1544 * PlatformGTK.cmake:
1545 Added Platform/classifier directory and ResourceLoadStatisticsClassifierBase.cpp.
1546 * PlatformMac.cmake:
1547 Added Platform/classifier and Platform/classifier/cocoa directories, and
1548 source files ResourceLoadStatisticsClassifierBase.cpp and
1549 ResourceLoadStatisticsClassifierCocoa.cpp
1550 * Resources/ResourceLoadStatistics: Added.
1551 * Resources/ResourceLoadStatistics/corePrediction_model: Added.
1552 Model file to load into CorePrediction.
1553 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
1554 (WKResourceLoadStatisticsManagerSetSubframeUnderTopFrameOrigin):
1555 (WKResourceLoadStatisticsManagerSetSubresourceUnderTopFrameOrigin):
1556 (WKResourceLoadStatisticsManagerSetSubresourceUniqueRedirectTo):
1557 Test infrastructure.
1558 * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
1559 * UIProcess/WebResourceLoadStatisticsManager.cpp:
1560 (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
1561 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
1562 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
1563 Test infrastructure.
1564 * UIProcess/WebResourceLoadStatisticsManager.h:
1565 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1566 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
1567 Renamed m_storagePath to m_statisticsStoragePath for clarity.
1568 (WebKit::WebResourceLoadStatisticsStore::classifyResource):
1569 Now calls the classifier through its ResourceLoadStatisticsClassifier
1571 (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
1572 Renamed m_storagePath to m_statisticsStoragePath for clarity.
1573 (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
1574 Renamed m_storagePath to m_statisticsStoragePath for clarity.
1575 (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics): Deleted.
1576 * UIProcess/WebResourceLoadStatisticsStore.h:
1577 * WebKit2.xcodeproj/project.pbxproj:
1578 Added the new classifier source files under Platform/classifier and the
1579 corePrediction_model file under Resources/ResourceLoadStatistics.
1581 2017-02-20 Wenson Hsieh <wenson_hsieh@apple.com>
1583 Add plumbing to the UI process for TextIndicatorData when computing the drag image
1584 https://bugs.webkit.org/show_bug.cgi?id=168583
1585 Work towards <rdar://problem/30313681>
1587 Reviewed by Tim Horton.
1589 Changes the SetDragImage IPC message to send TextIndicatorData over to the UI process. Also changes the boolean
1590 isLink parameter to be a DragSourceAction instead, leaving it up to the receiving end (in the UI process) to
1593 Additionally, renames hasDataInteractionAtPosition to hasSelectionAtPosition to better reflect its purpose.
1595 These changes are only infrastructural should not alter any behaviors.
1597 * Shared/ios/InteractionInformationAtPosition.h:
1598 * Shared/ios/InteractionInformationAtPosition.mm:
1599 (WebKit::InteractionInformationAtPosition::encode):
1600 (WebKit::InteractionInformationAtPosition::decode):
1601 * UIProcess/API/Cocoa/WKWebView.mm:
1602 (-[WKWebView _simulateDataInteractionGestureRecognized]):
1603 (-[WKWebView _simulateDataInteractionEntered:]):
1604 (-[WKWebView _simulateDataInteractionUpdated:]):
1605 (-[WKWebView _simulateDataInteractionPerformOperation:]):
1606 (-[WKWebView _simulateDataInteractionEnded:]):
1607 (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]):
1608 (-[WKWebView _simulateFailedDataInteractionWithIndex:]):
1609 (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]):
1610 (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]):
1611 * UIProcess/API/Cocoa/_WKTestingDelegate.h:
1612 * UIProcess/PageClient.h:
1613 * UIProcess/WebPageProxy.h:
1614 * UIProcess/WebPageProxy.messages.in:
1615 * UIProcess/ios/PageClientImplIOS.h:
1616 * UIProcess/ios/PageClientImplIOS.mm:
1617 (WebKit::PageClientImpl::setDragImage):
1618 (WebKit::PageClientImpl::startDataInteractionWithImage):
1619 * UIProcess/ios/WKContentViewInteraction.h:
1620 * UIProcess/ios/WKContentViewInteraction.mm:
1621 (-[WKContentView hasSelectablePositionAtPoint:]):
1622 (-[WKContentView pointIsInDataInteractionContent:]):
1623 (-[WKContentView _dataInteractionGestureRecognizer]):
1624 (-[WKContentView pointIsInAssistedNode:]):
1625 * UIProcess/mac/PageClientImpl.h:
1626 * UIProcess/mac/PageClientImpl.mm:
1627 (WebKit::PageClientImpl::setDragImage):
1628 * UIProcess/mac/WebPageProxyMac.mm:
1629 (WebKit::WebPageProxy::setDragImage):
1630 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1631 (WebKit::WebDragClient::startDrag):
1632 * WebProcess/WebPage/ios/WebPageIOS.mm:
1633 (WebKit::WebPage::getPositionInformation):
1635 2017-02-20 David Quesada <david_quesada@apple.com>
1637 Don’t set NSURLSessionConfiguration’s _sourceApplicationAuditTokenData if _sourceApplicationBundleIdentifier is also set.
1638 https://bugs.webkit.org/show_bug.cgi?id=168607
1640 rdar://problem/30239618
1642 Reviewed by Geoffrey Garen.
1644 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1645 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1646 If the process pool configuration sets a source application bundle identifier, don't give the NSURLSession configuration
1647 the audit token from the UI process, as it may be associated with an application with a conflicting bundle identifier.
1649 2017-02-20 Ryan Haddad <ryanhaddad@apple.com>
1651 Unreviewed, rolling out r212632.
1653 This change appears to have caused API test failures.
1657 "Reduce platform ifdefs in WebKit2 custom protocols
1659 https://bugs.webkit.org/show_bug.cgi?id=165028
1660 http://trac.webkit.org/changeset/212632
1662 2017-02-20 Youenn Fablet <youenn@apple.com>
1664 [WebRTC] Fix some memory leaks in libwebrtc binding code
1665 https://bugs.webkit.org/show_bug.cgi?id=168596
1667 Reviewed by Eric Carlson.
1669 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
1670 (WebKit::NetworkRTCProvider::OnMessage):
1672 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
1674 Remove code under USE(GRAPHICS_SURFACE)
1675 https://bugs.webkit.org/show_bug.cgi?id=168592
1677 Reviewed by Michael Catanzaro.
1679 This was only used by EFL port.
1681 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1682 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
1683 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
1684 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
1685 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1686 (WebKit::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
1687 (WebKit::CoordinatedGraphicsScene::deleteLayer):
1688 (WebKit::CoordinatedGraphicsScene::assignImageBackingToLayer):
1689 (WebKit::CoordinatedGraphicsScene::purgeGLResources):
1690 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
1691 * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
1692 (WebKit::WebCoordinatedSurface::Handle::encode):
1693 (WebKit::WebCoordinatedSurface::Handle::decode):
1694 (WebKit::WebCoordinatedSurface::create):
1695 (WebKit::WebCoordinatedSurface::createGraphicsContext):
1696 (WebKit::WebCoordinatedSurface::createHandle):
1697 (WebKit::WebCoordinatedSurface::copyToTexture):
1698 * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
1700 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
1702 Reduce platform ifdefs in WebKit2 custom protocols implementation
1703 https://bugs.webkit.org/show_bug.cgi?id=165028
1705 Reviewed by Darin Adler.
1707 Make mac implementation use the APICustomProtocolManagerClient to share more code with the soup based ports.
1709 * CMakeLists.txt: Add CustomProtocolManagerProxy.cpp.
1710 * PlatformEfl.cmake: Remove CustomProtocolManagerProxySoup.cpp.
1711 * PlatformGTK.cmake: Ditto.
1712 * PlatformMac.cmake: Remove CustomProtocolManagerProxyMac.mm.
1713 * UIProcess/API/APICustomProtocolManagerClient.h:
1714 (API::CustomProtocolManagerClient::startLoading): Make it void, since we were always returning true and the
1715 returned value was ignored.
1716 * UIProcess/API/efl/ewk_url_scheme_request.cpp:
1717 (EwkUrlSchemeRequest::finish): Update to new CustomProtocolManagerProxy API.
1718 * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
1719 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1720 (webkitURISchemeRequestReadCallback): Ditto.
1721 * UIProcess/Cocoa/CustomProtocolManagerClient.h: Added.
1722 * UIProcess/Cocoa/CustomProtocolManagerClient.mm: Added.
1723 (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:]):
1724 (-[WKCustomProtocolLoader dealloc]):
1725 (-[WKCustomProtocolLoader connection:didFailWithError:]):
1726 (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
1727 (-[WKCustomProtocolLoader connection:didReceiveData:]):
1728 (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
1729 (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
1730 (WebKit::CustomProtocolManagerClient::startLoading):
1731 (WebKit::CustomProtocolManagerClient::stopLoading):
1732 (WebKit::CustomProtocolManagerClient::invalidate):
1733 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1734 (WebKit::WebProcessPool::platformInitialize): Set the CustomProtocolManagerClient.
1735 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
1736 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Added.
1737 (WebKit::CustomProtocolManagerProxy::startLoading):
1738 (WebKit::CustomProtocolManagerProxy::processDidClose):
1739 (WebKit::CustomProtocolManagerProxy::wasRedirectedToRequest):
1740 (WebKit::CustomProtocolManagerProxy::didReceiveResponse):
1741 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1742 * UIProcess/WebProcessPool.cpp:
1743 (WebKit::globalURLSchemesWithCustomProtocolHandlers): Just moved here to use it from ensureNetworkProcess().
1744 (WebKit::WebProcessPool::WebProcessPool): Remove soup ifdefs.
1745 (WebKit::WebProcessPool::setCustomProtocolManagerClient): Moved from the soup implementation.
1746 (WebKit::WebProcessPool::ensureNetworkProcess): Initialize custom protocols parameters.
1747 (WebKit::WebProcessPool::registerSchemeForCustomProtocol): Register the protocol if not already registered globally.
1748 (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): Remove soup ifdefs.
1749 * UIProcess/WebProcessPool.h: Remove soup ifdefs.
1750 * UIProcess/efl/RequestManagerClientEfl.cpp:
1751 * UIProcess/soup/WebProcessPoolSoup.cpp:
1752 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
1753 * WebKit2.xcodeproj/project.pbxproj:
1755 2017-02-20 Manuel Rego Casasnovas <rego@igalia.com>
1757 [css-grid] Remove compilation flag ENABLE_CSS_GRID_LAYOUT
1758 https://bugs.webkit.org/show_bug.cgi?id=167693
1760 Reviewed by Sergio Villar Senin.
1762 * Configurations/FeatureDefines.xcconfig:
1763 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1764 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1765 * WebProcess/WebPage/WebPage.cpp:
1766 (WebKit::WebPage::updatePreferences):
1768 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
1770 REGRESSION(r212345): [GTK] ASSERT(cookieChangeCallbackMap().contains(jar)) failed in WebCore::stopObservingCookieChanges:54
1771 https://bugs.webkit.org/show_bug.cgi?id=168375
1773 Reviewed by Alex Christensen.
1775 Simplify the cookies change notification. The current approach of the UI process telling the network process
1776 when to start and stop observing cookie changes is quite fragile and error prone. In the GTK+ port we always
1777 observe cookies, so our cookie manager always calls start in the constructor and stop in the destructor.
1778 Everything would be a lot simpler if the network process always monitored cookies.
1780 * NetworkProcess/soup/NetworkSessionSoup.cpp:
1781 (WebKit::NetworkSessionSoup::NetworkSessionSoup): Set cookies observer handler for the session.
1782 (WebKit::NetworkSessionSoup::~NetworkSessionSoup): Remove the cookies observer handler.
1783 * UIProcess/API/gtk/WebKitCookieManager.cpp:
1784 (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate): Remove the cookies observer callback.
1785 (webkit_cookie_manager_class_init): Remove dispose implementation that is no longer needed.
1786 (webkitCookieManagerCreate): Set the cookies observer callback.
1787 (webkit_cookie_manager_set_persistent_storage): Remove code to start/stop observing cookies when the jar
1788 changes, the network process deals with that now.
1789 (webkitCookieManagerDispose): Deleted.
1790 * UIProcess/WebCookieManagerProxy.cpp:
1791 (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Remove the optional callback method in favor of an
1792 explicit method to the set the callback that doesn't send the StartObservingCookieChanges message to the network
1794 (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Do not change the callback map here.
1795 (WebKit::WebCookieManagerProxy::setCookieObserverCallback): Add the callback to the map or remove the session if
1797 * UIProcess/WebCookieManagerProxy.h:
1798 * WebProcess/Cookies/WebCookieManager.cpp:
1799 (WebKit::WebCookieManager::notifyCookiesDidChange): Send CookiesDidChange message to the UI process.
1800 (WebKit::WebCookieManager::startObservingCookieChanges): Use notifyCookiesDidChange().
1801 * WebProcess/Cookies/WebCookieManager.h:
1802 * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
1803 (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Set the policy on all sessions. Code moved from
1804 WebFrameNetworkingContext since it doesn't belong there.
1805 (WebKit::WebCookieManager::setCookiePersistentStorage): Use new method to set the cookie storage in the
1806 NetworkStorageSession.
1807 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
1808 (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Deleted.
1809 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
1811 2017-02-19 Chris Dumez <cdumez@apple.com>
1813 [WK2] Support termination of unresponsive WebContent processes that are in the background
1814 https://bugs.webkit.org/show_bug.cgi?id=168479
1815 <rdar://problem/30558745>
1817 Reviewed by Antti Koivisto.
1819 Support termination of unresponsive WebContent processes that are in the background.
1820 This protects us against cases where a background tab is unresponsive and has high CPU
1821 usage, thus draining the battery without the user knowing about it (e.g.
1822 <rdar://problem/29808005>).
1824 The feature works as follows:
1825 - If a WebProcessProxy has pages but none of them are visible, then it will check
1826 regularly if its associated WebContent process is still responsive.
1827 - Every time we find that the WebContent process is responsive, we exponentially
1828 back off the timer to avoid waking up the process too often. The timer initially
1829 uses a 20 seconds interval and can back off up to 8 hours.
1830 - If the WebContent process is unresponsive, then we terminate it. No notification
1831 is shown to the user and the termination is not immediately observable since the
1832 tab is not visible and its title remains. The tab is not immediately reloaded
1833 so as to avoid getting back into a bad state in the background (and have a
1835 - If the user switches to a tab that was previously killed for being unresponsive
1836 while in the background, we will then reload the tab in a fresh WebContent
1837 process. The crash banner will only be shown if the tab has ever been visible.
1838 If it wasn't ever visible (e.g. session restore case), then it will look as if
1839 the tab loads for the first time when the user switches to it.
1841 The functionality is disabled by default and can be enabled by the client via the new
1842 WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled() private API.
1845 * UIProcess/API/APIProcessPoolConfiguration.cpp:
1846 (API::ProcessPoolConfiguration::copy):
1847 * UIProcess/API/APIProcessPoolConfiguration.h:
1848 * UIProcess/API/C/WKContext.cpp:
1849 (WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled):
1850 * UIProcess/API/C/WKContextPrivate.h:
1851 * UIProcess/UnresponsiveWebProcessTerminator.cpp: Added.
1852 (WebKit::UnresponsiveWebProcessTerminator::UnresponsiveWebProcessTerminator):
1853 (WebKit::UnresponsiveWebProcessTerminator::updateState):
1854 (WebKit::pagesCopy):
1855 (WebKit::UnresponsiveWebProcessTerminator::timerFired):
1856 * UIProcess/UnresponsiveWebProcessTerminator.h: Added.
1857 (WebKit::UnresponsiveWebProcessTerminator::shouldBeActive):
1858 * UIProcess/WebPageProxy.cpp:
1859 (WebKit::WebPageProxy::reattachToWebProcess):
1860 (WebKit::WebPageProxy::reloadAfterBeingKilledInBackground):
1861 (WebKit::WebPageProxy::dispatchActivityStateChange):
1862 (WebKit::WebPageProxy::terminateProcess):
1863 (WebKit::WebPageProxy::resetStateAfterProcessExited):
1864 * UIProcess/WebPageProxy.h:
1865 * UIProcess/WebProcessProxy.cpp:
1866 (WebKit::WebProcessProxy::WebProcessProxy):
1867 (WebKit::m_backgroundResponsivenessTimer):
1868 (WebKit::WebProcessProxy::createWebPage):
1869 (WebKit::WebProcessProxy::addExistingWebPage):
1870 (WebKit::WebProcessProxy::removeWebPage):
1871 (WebKit::WebProcessProxy::updateBackgroundResponsivenessTimer):
1872 * UIProcess/WebProcessProxy.h:
1873 (WebKit::WebProcessProxy::visiblePageCount):
1874 * WebKit2.xcodeproj/project.pbxproj:
1876 2017-02-18 Michael Catanzaro <mcatanzaro@igalia.com>
1878 Remove COORDINATED_GRAPHICS_MULTIPROCESS
1879 https://bugs.webkit.org/show_bug.cgi?id=168514
1881 Reviewed by Darin Adler.
1883 * Shared/DrawingAreaInfo.h:
1884 * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1885 (WKViewFindZoomableAreaForRect):
1886 * UIProcess/AcceleratedDrawingAreaProxy.cpp:
1887 (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
1888 * UIProcess/AcceleratedDrawingAreaProxy.h:
1889 (WebKit::AcceleratedDrawingAreaProxy::coordinatedLayerTreeHostProxy): Deleted.
1890 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: Removed.
1891 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: Removed.
1892 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: Removed.
1893 * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
1894 (WebKit::PageViewportController::pageTransitionViewportReady):
1895 * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp: Removed.
1896 * UIProcess/DrawingAreaProxy.h:
1897 * UIProcess/PageClient.h:
1898 * UIProcess/WebPageProxy.cpp:
1899 (WebKit::WebPageProxy::pageDidRequestScroll): Deleted.
1900 (WebKit::WebPageProxy::pageTransitionViewportReady): Deleted.
1901 (WebKit::WebPageProxy::didRenderFrame): Deleted.
1902 (WebKit::WebPageProxy::commitPageTransitionViewport): Deleted.
1903 * UIProcess/WebPageProxy.h:
1904 * UIProcess/WebPageProxy.messages.in:
1905 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1906 (WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea):
1907 (WebKit::AcceleratedDrawingArea::updateBackingStoreState):
1908 (WebKit::AcceleratedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage): Deleted.
1909 * WebProcess/WebPage/AcceleratedDrawingArea.h:
1910 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1911 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1912 (WebKit::CoordinatedLayerTreeHost::commitSceneState):
1913 (WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
1914 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1915 * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Removed.
1916 * WebProcess/WebPage/DrawingArea.cpp:
1917 (WebKit::DrawingArea::create):
1918 * WebProcess/WebPage/DrawingArea.h:
1919 * WebProcess/WebPage/LayerTreeHost.cpp:
1920 (WebKit::LayerTreeHost::create):
1921 * WebProcess/WebPage/LayerTreeHost.h:
1922 * WebProcess/WebPage/WebPage.cpp:
1923 (WebKit::WebPage::~WebPage):
1924 (WebKit::WebPage::pageDidRequestScroll):
1925 (WebKit::WebPage::didCompletePageTransition):
1926 (WebKit::WebPage::didReceiveMessage):
1927 (WebKit::WebPage::commitPageTransitionViewport): Deleted.
1928 * WebProcess/WebPage/WebPage.h:
1929 * WebProcess/WebPage/WebPage.messages.in:
1931 2017-02-18 Michael Catanzaro <mcatanzaro@igalia.com>
1933 [GTK] Cannot paste primary selection into web view in Wayland
1934 https://bugs.webkit.org/show_bug.cgi?id=166949
1936 Reviewed by Carlos Garcia Campos.
1938 Once upon a time, primary selection (middle-click paste) was not supported in Wayland. At
1939 the time, I changed this function to report that primary selection was unsupported. But
1940 nowadays, primary selection works fine in all GTK+ applications except WebKit. All we have
1941 to do to make it work in WebKit is change this return value.
1943 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1944 (WebKit::WebEditorClient::supportsGlobalSelection):
1946 2017-02-17 Brian Burg <bburg@apple.com>
1948 Web Inspector: RTL: Inspector window should dock to the left when using RTL layout direction
1949 https://bugs.webkit.org/show_bug.cgi?id=168273
1950 <rdar://problem/29949325>
1952 Reviewed by Matt Baker.
1954 Add the ability to dock Web Inspector to the left of the inspected view.
1955 The frontend decides whether the Dock to Side button docks left or right
1956 based on the current layout direction.
1958 * UIProcess/WebInspectorProxy.cpp:
1959 (WebKit::WebInspectorProxy::attachLeft):
1960 (WebKit::WebInspectorProxy::attach):
1961 (WebKit::WebInspectorProxy::createInspectorPage):
1962 * UIProcess/WebInspectorProxy.h:
1963 * UIProcess/WebInspectorProxy.messages.in:
1964 Add plumbing for new dock configuration.
1966 * UIProcess/mac/WebInspectorProxyMac.mm:
1967 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1968 (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1969 (WebKit::WebInspectorProxy::platformAttach):
1970 Adapt existing sizing logic to work for docking to left.
1972 * WebProcess/WebPage/WebInspectorUI.cpp:
1973 (WebKit::WebInspectorUI::requestSetDockSide):
1974 (WebKit::WebInspectorUI::setDockSide):
1975 * WebProcess/WebPage/WebInspectorUI.h:
1976 (WebKit::WebInspectorUI::attachedLeft):
1977 * WebProcess/WebPage/WebInspectorUI.messages.in:
1978 Add plumbing for new dock configuration.
1980 2017-02-16 Simon Fraser <simon.fraser@apple.com>
1982 Allow PlatformCALayers to specify that they want deep color backing store
1983 https://bugs.webkit.org/show_bug.cgi?id=168495
1985 Reviewed by Tim Horton.
1987 Currently capable iOS devices get deep color backing store by virtue of a supports
1988 check in PlatformCALayerCocoa::PlatformCALayerCocoa(), and LegacyTileGridTile.
1990 Future work will make layer contents format selection more complex, so express the need
1991 for deep color on PlatformCALayer, and have the creators of PlatformCALayer (mainly the
1992 flavors of GraphicsLayerCA) choose for them to support deep color. A bit of special-casing
1993 is needed to propagte the state to TileControllers.
1995 The deep-colorness now propagates from PlatformCALayerRemote to RemoteLayerBackingStore,
1996 instead of RemoteLayerBackingStore looking at the properties of the screen directly.
1998 Remove PlatformCALayer::LayerTypeWebTiledLayer which was only used for the old CATiledLayers
1999 that we no longer use.
2001 * Shared/mac/RemoteLayerBackingStore.h:
2002 * Shared/mac/RemoteLayerBackingStore.mm:
2003 (WebKit::RemoteLayerBackingStore::ensureBackingStore):
2004 (WebKit::RemoteLayerBackingStore::bytesPerPixel):
2005 (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
2006 (WebKit::RemoteLayerBackingStore::drawInContext):
2007 (WebKit::RemoteLayerBackingStore::surfaceBufferFormat):
2008 (WebKit::bufferFormat): Deleted.
2009 * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
2010 (WebKit::GraphicsLayerCARemote::createPlatformCALayer):
2011 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2012 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2013 (WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
2014 (WebKit::PlatformCALayerRemote::updateBackingStore):
2015 (WebKit::PlatformCALayerRemote::wantsDeepColorBackingStore):
2016 (WebKit::PlatformCALayerRemote::setWantsDeepColorBackingStore):
2017 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2018 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2019 (WebKit::PlatformCALayerRemoteTiledBacking::wantsDeepColorBackingStore):
2020 (WebKit::PlatformCALayerRemoteTiledBacking::setWantsDeepColorBackingStore):
2021 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2023 2017-02-17 Wenson Hsieh <wenson_hsieh@apple.com>
2025 [WK2] Action sheet should not dismiss when a DDAction with user interface is being presented
2026 https://bugs.webkit.org/show_bug.cgi?id=168528
2027 <rdar://problem/30515324>
2029 Reviewed by Beth Dakin.
2031 After r211643, -[WKActionSheet doneWithSheet] now dismisses the presenting view controller. This is called when
2032 interaction with the sheet is finished and is a reasonable thing to do in most cases. However, when using data
2033 detectors, we don't want to dismiss the presenting view controller, since DataDetector handles dismissing on its
2034 own and expects that its completion handler will be invoked.
2036 To fix this, we add a parameter to doneWithSheet: to indicate whether or not we should additionally dismiss the
2037 presenting view controller, and pass in NO in the case where we are handing control over to DataDetector.
2039 * UIProcess/ios/WKActionSheet.h:
2040 * UIProcess/ios/WKActionSheet.mm:
2041 (-[WKActionSheet doneWithSheet:]):
2042 (-[WKActionSheet doneWithSheet]): Deleted.
2043 * UIProcess/ios/WKActionSheetAssistant.mm:
2044 (-[WKActionSheetAssistant showDataDetectorsSheet]):
2045 (-[WKActionSheetAssistant cleanupSheet]):
2047 2017-02-17 Michael Catanzaro <mcatanzaro@igalia.com>
2049 Remove EFL from WebKit2
2050 https://bugs.webkit.org/show_bug.cgi?id=168511
2052 Reviewed by Alex Christensen.
2054 * Platform/IPC/unix/ConnectionUnix.cpp:
2055 (IPC::Connection::platformInvalidate):
2056 (IPC::Connection::open):
2057 * Platform/Module.h:
2058 * PlatformEfl.cmake: Removed.
2059 * PluginProcess/unix/PluginProcessMainUnix.cpp:
2060 * Shared/API/APIObject.h:
2061 * Shared/API/c/WKBase.h:
2062 * Shared/API/c/WKSharedAPICast.h:
2065 * Shared/NativeWebKeyboardEvent.h:
2066 (WebKit::NativeWebKeyboardEvent::isFakeEventForComposition):
2067 (WebKit::NativeWebKeyboardEvent::isFiltered): Deleted.
2068 * Shared/NativeWebMouseEvent.h:
2069 (WebKit::NativeWebMouseEvent::nativeEvent):
2070 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Deleted.
2071 * Shared/NativeWebTouchEvent.h:
2072 (WebKit::NativeWebTouchEvent::nativeEvent):
2073 * Shared/NativeWebWheelEvent.h:
2074 (WebKit::NativeWebWheelEvent::nativeEvent):
2075 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
2076 (WebKit::NetscapePluginModule::determineQuirks):
2077 * Shared/WebPreferencesDefinitions.h:
2078 * UIProcess/API/APIWebsiteDataStore.cpp:
2079 * UIProcess/API/C/WKAPICast.h:
2080 * UIProcess/API/C/WKTextChecker.cpp:
2081 * UIProcess/API/C/WKTextChecker.h:
2082 * UIProcess/ChildProcessProxy.cpp:
2083 (WebKit::ChildProcessProxy::getLaunchOptions):
2084 * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
2085 (WebKit::PageViewportController::pixelAlignedFloatPoint):
2086 * UIProcess/InspectorServer/WebInspectorServer.h:
2087 * UIProcess/Launcher/ProcessLauncher.h:
2088 * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
2089 * UIProcess/PageClient.h:
2090 * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
2091 (WebKit::PluginProcessProxy::scanPlugin):
2092 * UIProcess/WebInspectorProxy.h:
2093 * UIProcess/WebPageProxy.h:
2094 * WebKit2.xcodeproj/project.pbxproj:
2095 * WebProcess/InjectedBundle/InjectedBundle.h:
2096 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2097 (WebKit::getPluginDisplay):
2098 (WebKit::x11Screen):
2099 (WebKit::displayDepth):
2100 (WebKit::rootWindowID):
2101 (WebKit::NetscapePluginX11::paint):
2102 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2103 (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
2104 (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
2105 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2106 (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
2107 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2108 (WebKit::WebFrameLoaderClient::saveViewStateToItem):
2109 (WebKit::WebFrameLoaderClient::restoreViewState):
2110 (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
2111 * WebProcess/WebPage/WebPage.cpp:
2112 (WebKit::WebPage::WebPage):
2113 * WebProcess/WebPage/WebPage.h:
2114 * WebProcess/WebPage/WebPage.messages.in:
2117 2017-02-15 Brady Eidson <beidson@apple.com>
2119 Stop backing up localStorage databases to iCloud by default.
2120 <rdar://problem/29045531> and https://bugs.webkit.org/show_bug.cgi?id=168388
2122 Reviewed by Geoffrey Garen.
2124 * UIProcess/Cocoa/VersionChecks.h:
2126 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2127 (WebKit::LocalStorageDatabaseTracker::databasePath):
2128 * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2129 * UIProcess/Storage/ios/LocalStorageDatabaseTrackerIOS.mm: Copied from Source/WebKit2/UIProcess/Cocoa/VersionChecks.h.
2130 (WebKit::LocalStorageDatabaseTracker::platformExcludeFromBackup):
2132 * WebKit2.xcodeproj/project.pbxproj:
2134 2017-02-16 Aakash Jain <aakash_jain@apple.com>
2136 Remove unused methods WKPageGetDebugPaintFlags and WKPageSetDebugPaintFlags
2137 https://bugs.webkit.org/show_bug.cgi?id=168464
2139 Reviewed by Alexey Proskuryakov.
2141 * UIProcess/API/C/WKPagePrivate.h:
2143 2017-02-16 Youenn Fablet <youenn@apple.com>
2145 [WebRTC] libwebrtc socket addresses should not be passed as strings
2146 https://bugs.webkit.org/show_bug.cgi?id=168474
2148 Reviewed by Alex Christensen.
2150 Removing all seralization of socket addresses as strings.
2151 Instead, a dedicated serialization is provided.
2152 This allows proper handling of various cases like addresses with both hostnames and resolved IPs.
2154 * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
2155 (WebKit::LibWebRTCSocketClient::signalReadPacket):
2156 (WebKit::LibWebRTCSocketClient::signalSentPacket):
2157 (WebKit::LibWebRTCSocketClient::signalAddressReady):
2158 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
2159 (WebKit::NetworkRTCProvider::createUDPSocket):
2160 (WebKit::NetworkRTCProvider::createServerTCPSocket):
2161 (WebKit::NetworkRTCProvider::createClientTCPSocket):
2162 * NetworkProcess/webrtc/NetworkRTCProvider.h:
2163 * NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
2164 * NetworkProcess/webrtc/NetworkRTCSocket.cpp:
2165 (WebKit::NetworkRTCSocket::sendTo):
2166 * NetworkProcess/webrtc/NetworkRTCSocket.h:
2167 * NetworkProcess/webrtc/NetworkRTCSocket.messages.in:
2168 * Shared/RTCNetwork.cpp:
2169 (WebKit::RTCNetwork::SocketAddress::decode):
2170 (WebKit::RTCNetwork::SocketAddress::encode):
2171 * Shared/RTCNetwork.h:
2172 (WebKit::RTCNetwork::SocketAddress::SocketAddress):
2173 * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
2174 (WebKit::LibWebRTCSocket::signalAddressReady):
2175 (WebKit::LibWebRTCSocket::SendTo):
2176 * WebProcess/Network/webrtc/LibWebRTCSocket.h:
2177 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
2178 (WebKit::LibWebRTCSocketFactory::CreateServerTcpSocket):
2179 (WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
2180 (WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
2181 * WebProcess/Network/webrtc/WebRTCSocket.cpp:
2182 (WebKit::WebRTCSocket::signalAddressReady):
2183 * WebProcess/Network/webrtc/WebRTCSocket.h:
2184 * WebProcess/Network/webrtc/WebRTCSocket.messages.in:
2186 2017-02-16 Daniel Bates <dabates@apple.com>
2188 Remove Chromium-specific code to call FrameLoaderClient::redirectDataToPlugin(nullptr)
2189 https://bugs.webkit.org/show_bug.cgi?id=168417
2190 <rdar://problem/30541748>
2192 Reviewed by Brent Fulgham.
2194 Update override of FrameLoaderClient::redirectDataToPlugin() to take a Widget& instead of a
2195 Widget* as it is always called with a valid Widget.
2197 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2198 (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
2199 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2200 * mac/WebKit2.order: Remove symbol for WebFrameLoaderClient::redirectDataToPlugin() that took a Widget*
2201 as it no longer exists. I am unclear if this file is still meaningful as it was last modified in
2202 r180570 (2 years ago) though Xcode still references this ordering file (why?).
2204 2017-02-16 Alex Christensen <achristensen@webkit.org>
2206 Remove EFL-specific files in WebKit2.
2208 Rubber-stamped by Anders Carlsson
2210 * DatabaseProcess/efl: Removed.
2211 * DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Removed.
2212 * NetworkProcess/Downloads/efl: Removed.
2213 * NetworkProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp: Removed.
2214 * NetworkProcess/efl: Removed.
2215 * NetworkProcess/efl/NetworkProcessMainEfl.cpp: Removed.
2216 * Platform/efl: Removed.
2217 * Platform/efl/ModuleEfl.cpp: Removed.
2218 * Shared/API/c/efl: Removed.
2219 * Shared/API/c/efl/WKArrayEfl.cpp: Removed.
2220 * Shared/API/c/efl/WKArrayEfl.h: Removed.
2221 * Shared/API/c/efl/WKBaseEfl.h: Removed.
2222 * Shared/efl: Removed.
2223 * Shared/efl/NativeWebKeyboardEventEfl.cpp: Removed.
2224 * Shared/efl/NativeWebTouchEventEfl.cpp: Removed.
2225 * Shared/efl/NativeWebWheelEventEfl.cpp: Removed.
2226 * Shared/efl/ProcessExecutablePathEfl.cpp: Removed.
2227 * Shared/efl/WebEventFactory.cpp: Removed.
2228 * Shared/efl/WebEventFactory.h: Removed.
2229 * UIProcess/API/C/efl: Removed.
2230 * UIProcess/API/C/efl/WKAPICastEfl.h: Removed.
2231 * UIProcess/API/C/efl/WKColorPickerResultListener.cpp: Removed.
2232 * UIProcess/API/C/efl/WKColorPickerResultListener.h: Removed.
2233 * UIProcess/API/C/efl/WKEventEfl.cpp: Removed.
2234 * UIProcess/API/C/efl/WKEventEfl.h: Removed.
2235 * UIProcess/API/C/efl/WKViewEfl.cpp: Removed.
2236 * UIProcess/API/C/efl/WKViewEfl.h: Removed.
2237 * UIProcess/API/cpp/efl: Removed.
2238 * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: Removed.
2239 * UIProcess/API/cpp/efl/WKEinaSharedString.h: Removed.
2240 * UIProcess/API/efl: Removed.
2241 * UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp: Removed.
2242 * UIProcess/API/efl/EWebKit2.h.in: Removed.
2243 * UIProcess/API/efl/EwkView.cpp: Removed.
2244 * UIProcess/API/efl/EwkView.h: Removed.
2245 * UIProcess/API/efl/EwkViewCallbacks.h: Removed.
2246 * UIProcess/API/efl/GestureRecognizer.cpp: Removed.
2247 * UIProcess/API/efl/GestureRecognizer.h: Removed.
2248 * UIProcess/API/efl/SnapshotImageGL.cpp: Removed.
2249 * UIProcess/API/efl/SnapshotImageGL.h: Removed.
2250 * UIProcess/API/efl/WebAccessibility.cpp: Removed.
2251 * UIProcess/API/efl/WebAccessibility.h: Removed.
2252 * UIProcess/API/efl/ewk_application_cache_manager.cpp: Removed.
2253 * UIProcess/API/efl/ewk_application_cache_manager.h: Removed.
2254 * UIProcess/API/efl/ewk_application_cache_manager_private.h: Removed.
2255 * UIProcess/API/efl/ewk_auth_request.cpp: Removed.
2256 * UIProcess/API/efl/ewk_auth_request.h: Removed.
2257 * UIProcess/API/efl/ewk_auth_request_private.h: Removed.
2258 * UIProcess/API/efl/ewk_back_forward_list.cpp: Removed.
2259 * UIProcess/API/efl/ewk_back_forward_list.h: Removed.
2260 * UIProcess/API/efl/ewk_back_forward_list_item.cpp: Removed.
2261 * UIProcess/API/efl/ewk_back_forward_list_item.h: Removed.
2262 * UIProcess/API/efl/ewk_back_forward_list_item_private.h: Removed.
2263 * UIProcess/API/efl/ewk_back_forward_list_private.h: Removed.
2264 * UIProcess/API/efl/ewk_color_picker.cpp: Removed.
2265 * UIProcess/API/efl/ewk_color_picker.h: Removed.
2266 * UIProcess/API/efl/ewk_color_picker_private.h: Removed.
2267 * UIProcess/API/efl/ewk_context.cpp: Removed.
2268 * UIProcess/API/efl/ewk_context.h: Removed.
2269 * UIProcess/API/efl/ewk_context_menu.cpp: Removed.
2270 * UIProcess/API/efl/ewk_context_menu.h: Removed.
2271 * UIProcess/API/efl/ewk_context_menu_item.cpp: Removed.
2272 * UIProcess/API/efl/ewk_context_menu_item.h: Removed.
2273 * UIProcess/API/efl/ewk_context_menu_item_private.h: Removed.
2274 * UIProcess/API/efl/ewk_context_menu_private.h: Removed.
2275 * UIProcess/API/efl/ewk_context_private.h: Removed.
2276 * UIProcess/API/efl/ewk_cookie_manager.cpp: Removed.
2277 * UIProcess/API/efl/ewk_cookie_manager.h: Removed.
2278 * UIProcess/API/efl/ewk_cookie_manager_private.h: Removed.
2279 * UIProcess/API/efl/ewk_database_manager.cpp: Removed.
2280 * UIProcess/API/efl/ewk_database_manager.h: Removed.
2281 * UIProcess/API/efl/ewk_database_manager_private.h: Removed.
2282 * UIProcess/API/efl/ewk_download_job.cpp: Removed.
2283 * UIProcess/API/efl/ewk_download_job.h: Removed.
2284 * UIProcess/API/efl/ewk_download_job_private.h: Removed.
2285 * UIProcess/API/efl/ewk_error.cpp: Removed.
2286 * UIProcess/API/efl/ewk_error.h: Removed.
2287 * UIProcess/API/efl/ewk_error_private.h: Removed.
2288 * UIProcess/API/efl/ewk_favicon_database.cpp: Removed.
2289 * UIProcess/API/efl/ewk_favicon_database.h: Removed.
2290 * UIProcess/API/efl/ewk_favicon_database_private.h: Removed.
2291 * UIProcess/API/efl/ewk_file_chooser_request.cpp: Removed.
2292 * UIProcess/API/efl/ewk_file_chooser_request.h: Removed.
2293 * UIProcess/API/efl/ewk_file_chooser_request_private.h: Removed.
2294 * UIProcess/API/efl/ewk_form_submission_request.cpp: Removed.
2295 * UIProcess/API/efl/ewk_form_submission_request.h: Removed.
2296 * UIProcess/API/efl/ewk_form_submission_request_private.h: Removed.
2297 * UIProcess/API/efl/ewk_intro.h: Removed.
2298 * UIProcess/API/efl/ewk_main.cpp: Removed.
2299 * UIProcess/API/efl/ewk_main.h: Removed.
2300 * UIProcess/API/efl/ewk_main_private.h: Removed.
2301 * UIProcess/API/efl/ewk_navigation_data.cpp: Removed.
2302 * UIProcess/API/efl/ewk_navigation_data.h: Removed.
2303 * UIProcess/API/efl/ewk_navigation_data_private.h: Removed.
2304 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp: Removed.
2305 * UIProcess/API/efl/ewk_navigation_policy_decision.h: Removed.
2306 * UIProcess/API/efl/ewk_navigation_policy_decision_private.h: Removed.
2307 * UIProcess/API/efl/ewk_object.cpp: Removed.
2308 * UIProcess/API/efl/ewk_object.h: Removed.
2309 * UIProcess/API/efl/ewk_object_private.h: Removed.
2310 * UIProcess/API/efl/ewk_page_group.cpp: Removed.
2311 * UIProcess/API/efl/ewk_page_group.h: Removed.
2312 * UIProcess/API/efl/ewk_page_group_private.h: Removed.
2313 * UIProcess/API/efl/ewk_popup_menu.cpp: Removed.
2314 * UIProcess/API/efl/ewk_popup_menu.h: Removed.
2315 * UIProcess/API/efl/ewk_popup_menu_item.cpp: Removed.
2316 * UIProcess/API/efl/ewk_popup_menu_item.h: Removed.
2317 * UIProcess/API/efl/ewk_popup_menu_item_private.h: Removed.
2318 * UIProcess/API/efl/ewk_popup_menu_private.h: Removed.
2319 * UIProcess/API/efl/ewk_security_origin.cpp: Removed.
2320 * UIProcess/API/efl/ewk_security_origin.h: Removed.
2321 * UIProcess/API/efl/ewk_security_origin_private.h: Removed.
2322 * UIProcess/API/efl/ewk_settings.cpp: Removed.
2323 * UIProcess/API/efl/ewk_settings.h: Removed.
2324 * UIProcess/API/efl/ewk_settings_private.h: Removed.
2325 * UIProcess/API/efl/ewk_storage_manager.cpp: Removed.
2326 * UIProcess/API/efl/ewk_storage_manager.h: Removed.
2327 * UIProcess/API/efl/ewk_storage_manager_private.h: Removed.
2328 * UIProcess/API/efl/ewk_text_checker.cpp: Removed.
2329 * UIProcess/API/efl/ewk_text_checker.h: Removed.
2330 * UIProcess/API/efl/ewk_text_checker_private.h: Removed.
2331 * UIProcess/API/efl/ewk_touch.h: Removed.
2332 * UIProcess/API/efl/ewk_url_request.cpp: Removed.
2333 * UIProcess/API/efl/ewk_url_request.h: Removed.
2334 * UIProcess/API/efl/ewk_url_request_private.h: Removed.
2335 * UIProcess/API/efl/ewk_url_response.cpp: Removed.
2336 * UIProcess/API/efl/ewk_url_response.h: Removed.
2337 * UIProcess/API/efl/ewk_url_response_private.h: Removed.
2338 * UIProcess/API/efl/ewk_url_scheme_request.cpp: Removed.
2339 * UIProcess/API/efl/ewk_url_scheme_request.h: Removed.
2340 * UIProcess/API/efl/ewk_url_scheme_request_private.h: Removed.
2341 * UIProcess/API/efl/ewk_view.cpp: Removed.
2342 * UIProcess/API/efl/ewk_view.h: Removed.
2343 * UIProcess/API/efl/ewk_view_configuration.cpp: Removed.
2344 * UIProcess/API/efl/ewk_view_configuration.h: Removed.
2345 * UIProcess/API/efl/ewk_view_configuration_private.h: Removed.
2346 * UIProcess/API/efl/ewk_view_private.h: Removed.
2347 * UIProcess/API/efl/ewk_window_features.cpp: Removed.
2348 * UIProcess/API/efl/ewk_window_features.h: Removed.
2349 * UIProcess/API/efl/ewk_window_features_private.h: Removed.
2350 * UIProcess/API/efl/tests: Removed.
2351 * UIProcess/API/efl/tests/UnitTestUtils: Removed.
2352 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Removed.
2353 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: Removed.
2354 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: Removed.
2355 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h: Removed.
2356 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestMain.cpp: Removed.
2357 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp: Removed.
2358 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h: Removed.
2359 * UIProcess/API/efl/tests/extensions: Removed.
2360 * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Removed.
2361 * UIProcess/API/efl/tests/resources: Removed.
2362 * UIProcess/API/efl/tests/resources/Page1.html: Removed.
2363 * UIProcess/API/efl/tests/resources/Page2.html: Removed.
2364 * UIProcess/API/efl/tests/resources/Page3.html: Removed.
2365 * UIProcess/API/efl/tests/resources/blank.ico: Removed.
2366 * UIProcess/API/efl/tests/resources/default_test_page.html: Removed.
2367 * UIProcess/API/efl/tests/resources/empty_theme.edj: Removed.
2368 * UIProcess/API/efl/tests/resources/file_chooser.html: Removed.
2369 * UIProcess/API/efl/tests/resources/frame_flattening_test.html: Removed.
2370 * UIProcess/API/efl/tests/resources/frame_flattening_test_subframe.html: Removed.
2371 * UIProcess/API/efl/tests/resources/local_file_access.html: Removed.
2372 * UIProcess/API/efl/tests/resources/redirect_url_to_default.html: Removed.
2373 * UIProcess/API/efl/tests/resources/resultMHTML.mht: Removed.
2374 * UIProcess/API/efl/tests/resources/same_page_navigation.html: Removed.
2375 * UIProcess/API/efl/tests/resources/spelling_selection_tests.html: Removed.
2376 * UIProcess/API/efl/tests/resources/spelling_test.html: Removed.
2377 * UIProcess/API/efl/tests/resources/test.pdf: Removed.
2378 * UIProcess/API/efl/tests/resources/window_move_resize.html: Removed.
2379 * UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Removed.
2380 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp: Removed.
2381 * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp: Removed.
2382 * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp: Removed.
2383 * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp: Removed.
2384 * UIProcess/API/efl/tests/test_ewk2_context.cpp: Removed.
2385 * UIProcess/API/efl/tests/test_ewk2_context_history_callbacks.cpp: Removed.
2386 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: Removed.
2387 * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: Removed.
2388 * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp: Removed.
2389 * UIProcess/API/efl/tests/test_ewk2_download_job.cpp: Removed.
2390 * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: Removed.
2391 * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp: Removed.
2392 * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp: Removed.
2393 * UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Removed.
2394 * UIProcess/API/efl/tests/test_ewk2_object.cpp: Removed.
2395 * UIProcess/API/efl/tests/test_ewk2_page.cpp: Removed.
2396 * UIProcess/API/efl/tests/test_ewk2_page_group.cpp: Removed.
2397 * UIProcess/API/efl/tests/test_ewk2_popup_menu.cpp: Removed.
2398 * UIProcess/API/efl/tests/test_ewk2_settings.cpp: Removed.
2399 * UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Removed.
2400 * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp: Removed.
2401 * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: Removed.
2402 * UIProcess/API/efl/tests/test_ewk2_view.cpp: Removed.
2403 * UIProcess/API/efl/tests/test_ewk2_view_configuration.cpp: Removed.
2404 * UIProcess/API/efl/tests/test_ewk2_window_features.cpp: Removed.
2405 * UIProcess/InspectorServer/efl: Removed.
2406 * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp: Removed.
2407 * UIProcess/Launcher/efl: Removed.
2408 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: Removed.
2409 * UIProcess/efl: Removed.
2410 * UIProcess/efl/ContextHistoryClientEfl.cpp: Removed.
2411 * UIProcess/efl/ContextHistoryClientEfl.h: Removed.
2412 * UIProcess/efl/ContextMenuClientEfl.cpp: Removed.
2413 * UIProcess/efl/ContextMenuClientEfl.h: Removed.
2414 * UIProcess/efl/DownloadManagerEfl.cpp: Removed.
2415 * UIProcess/efl/DownloadManagerEfl.h: Removed.
2416 * UIProcess/efl/EasingCurves.cpp: Removed.
2417 * UIProcess/efl/EasingCurves.h: Removed.
2418 * UIProcess/efl/EwkDebug.h: Removed.
2419 * UIProcess/efl/EwkTouchEvent.cpp: Removed.
2420 * UIProcess/efl/EwkTouchEvent.h: Removed.
2421 * UIProcess/efl/EwkTouchPoint.cpp: Removed.
2422 * UIProcess/efl/EwkTouchPoint.h: Removed.
2423 * UIProcess/efl/FindClientEfl.cpp: Removed.
2424 * UIProcess/efl/FindClientEfl.h: Removed.
2425 * UIProcess/efl/FormClientEfl.cpp: Removed.
2426 * UIProcess/efl/FormClientEfl.h: Removed.
2427 * UIProcess/efl/InputMethodContextEfl.cpp: Removed.
2428 * UIProcess/efl/InputMethodContextEfl.h: Removed.
2429 * UIProcess/efl/PageLoadClientEfl.cpp: Removed.
2430 * UIProcess/efl/PageLoadClientEfl.h: Removed.
2431 * UIProcess/efl/PagePolicyClientEfl.cpp: Removed.
2432 * UIProcess/efl/PagePolicyClientEfl.h: Removed.
2433 * UIProcess/efl/PageUIClientEfl.cpp: Removed.
2434 * UIProcess/efl/PageUIClientEfl.h: Removed.
2435 * UIProcess/efl/PageViewportControllerClientEfl.cpp: Removed.
2436 * UIProcess/efl/PageViewportControllerClientEfl.h: Removed.
2437 * UIProcess/efl/RequestManagerClientEfl.cpp: Removed.
2438 * UIProcess/efl/RequestManagerClientEfl.h: Removed.
2439 * UIProcess/efl/TextCheckerClientEfl.cpp: Removed.
2440 * UIProcess/efl/TextCheckerClientEfl.h: Removed.
2441 * UIProcess/efl/TextCheckerEfl.cpp: Removed.
2442 * UIProcess/efl/VibrationClientEfl.cpp: Removed.
2443 * UIProcess/efl/VibrationClientEfl.h: Removed.
2444 * UIProcess/efl/ViewClientEfl.cpp: Removed.
2445 * UIProcess/efl/ViewClientEfl.h: Removed.
2446 * UIProcess/efl/WebColorPickerClient.cpp: Removed.
2447 * UIProcess/efl/WebColorPickerClient.h: Removed.
2448 * UIProcess/efl/WebColorPickerEfl.cpp: Removed.
2449 * UIProcess/efl/WebColorPickerEfl.h: Removed.
2450 * UIProcess/efl/WebColorPickerResultListenerProxy.cpp: Removed.
2451 * UIProcess/efl/WebColorPickerResultListenerProxy.h: Removed.
2452 * UIProcess/efl/WebContextMenuProxyEfl.cpp: Removed.
2453 * UIProcess/efl/WebContextMenuProxyEfl.h: Removed.
2454 * UIProcess/efl/WebInspectorProxyEfl.cpp: Removed.
2455 * UIProcess/efl/WebPageProxyEfl.cpp: Removed.
2456 * UIProcess/efl/WebPopupItemEfl.cpp: Removed.
2457 * UIProcess/efl/WebPopupItemEfl.h: Removed.
2458 * UIProcess/efl/WebPopupMenuProxyEfl.cpp: Removed.
2459 * UIProcess/efl/WebPopupMenuProxyEfl.h: Removed.
2460 * UIProcess/efl/WebPreferencesEfl.cpp: Removed.
2461 * UIProcess/efl/WebProcessPoolEfl.cpp: Removed.
2462 * UIProcess/efl/WebView.cpp: Removed.
2463 * UIProcess/efl/WebView.h: Removed.
2464 * UIProcess/efl/WebViewClient.cpp: Removed.
2465 * UIProcess/efl/WebViewClient.h: Removed.
2466 * WebProcess/InjectedBundle/API/efl: Removed.
2467 * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Removed.
2468 * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Removed.
2469 * WebProcess/InjectedBundle/API/efl/ewk_extension.h: Removed.
2470 * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Removed.
2471 * WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Removed.
2472 * WebProcess/InjectedBundle/API/efl/ewk_page.h: Removed.
2473 * WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Removed.
2474 * WebProcess/InjectedBundle/efl: Removed.
2475 * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp: Removed.
2476 * WebProcess/WebCoreSupport/efl: Removed.
2477 * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp: Removed.
2478 * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: Removed.
2479 * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: Removed.
2480 * WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp: Removed.
2481 * WebProcess/WebPage/efl: Removed.
2482 * WebProcess/WebPage/efl/WebInspectorUIEfl.cpp: Removed.
2483 * WebProcess/WebPage/efl/WebPageEfl.cpp: Removed.
2484 * WebProcess/efl: Removed.
2485 * WebProcess/efl/ExtensionManagerEfl.cpp: Removed.
2486 * WebProcess/efl/ExtensionManagerEfl.h: Removed.
2487 * WebProcess/efl/WebInjectedBundleMainEfl.cpp: Removed.
2488 * WebProcess/efl/WebProcessMainEfl.cpp: Removed.
2490 * efl/EWebKit2Config.cmake.in: Removed.
2491 * efl/EWebKit2ConfigVersion.cmake.in: Removed.
2492 * efl/ewebkit2-extension.pc.in: Removed.
2493 * efl/ewebkit2.pc.in: Removed.
2495 2017-02-16 Alex Christensen <achristensen@webkit.org>
2497 Remove old URL parser
2498 https://bugs.webkit.org/show_bug.cgi?id=168483
2500 Reviewed by Tim Horton.
2502 * NetworkProcess/NetworkProcess.cpp:
2503 (WebKit::NetworkProcess::initializeNetworkProcess):
2504 * NetworkProcess/NetworkProcessCreationParameters.cpp:
2505 (WebKit::NetworkProcessCreationParameters::encode):
2506 (WebKit::NetworkProcessCreationParameters::decode):
2507 * NetworkProcess/NetworkProcessCreationParameters.h:
2508 * PlatformEfl.cmake:
2509 * PlatformGTK.cmake:
2510 * PlatformMac.cmake:
2511 * Shared/Cocoa/WebKit2InitializeCocoa.mm: Removed.
2512 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
2513 (WebKit::XPCServiceInitializer):
2514 * Shared/WebKit2Initialize.cpp:
2515 (WebKit::InitializeWebKit2):
2516 * Shared/WebKit2Initialize.h:
2518 * Shared/WebProcessCreationParameters.cpp:
2519 (WebKit::WebProcessCreationParameters::encode):
2520 (WebKit::WebProcessCreationParameters::decode):
2521 * Shared/WebProcessCreationParameters.h:
2522 * Shared/efl/WebKit2InitializeEFL.cpp: Removed.
2523 * Shared/gtk/WebKit2InitializeGTK.cpp: Removed.
2524 * UIProcess/WebProcessPool.cpp:
2525 (WebKit::WebProcessPool::ensureNetworkProcess):
2526 (WebKit::WebProcessPool::createNewWebProcess):
2527 * WebKit2.xcodeproj/project.pbxproj:
2528 * WebProcess/WebProcess.cpp:
2529 (WebKit::WebProcess::initializeWebProcess):
2531 2017-02-16 Wenson Hsieh <wenson_hsieh@apple.com>
2533 [WK2] Add additional test infrastructure and unit tests for data interaction
2534 https://bugs.webkit.org/show_bug.cgi?id=168439
2535 <rdar://problem/30557942>
2537 Reviewed by Tim Horton.
2539 Adds two new _WKTestingDelegate protocol methods that are fired when a 'start data interaction' request has been
2540 sent to the web process, and when a response has been received. See Tools/ChangeLog for more details.
2542 * UIProcess/API/Cocoa/_WKTestingDelegate.h:
2544 2017-02-16 Aakash Jain <aakash_jain@apple.com>
2546 Remove unused method WKBundlePageCopyContextMenuItemTitle
2547 https://bugs.webkit.org/show_bug.cgi?id=168456
2549 Reviewed by Dan Bernstein.
2551 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Removed WKBundlePageCopyContextMenuItemTitle.
2553 2017-02-16 Aakash Jain <aakash_jain@apple.com>
2555 Remove unused WKContextGetProcessSuppressionEnabled and WKContextSetProcessSuppressionEnabled
2556 https://bugs.webkit.org/show_bug.cgi?id=168460
2558 Reviewed by Dan Bernstein.
2560 * UIProcess/API/C/mac/WKContextPrivateMac.h:
2562 2017-02-16 Aakash Jain <aakash_jain@apple.com>
2564 Removed unused method WKContextGetProcessModel
2565 https://bugs.webkit.org/show_bug.cgi?id=168457
2567 Reviewed by Dan Bernstein.
2569 * UIProcess/API/C/WKContext.h: Removed WKContextGetProcessModel.
2571 2017-02-16 Tim Horton <timothy_horton@apple.com>
2573 WKWebView inside a UICollectionView flashes when items are inserted above it
2574 https://bugs.webkit.org/show_bug.cgi?id=168376
2575 <rdar://problem/29322051>
2577 Reviewed by Simon Fraser.
2579 Previously, we would immediately send visible content rect updates
2580 whenever we scrolled, or our frame or bounds changed, or ... a whole
2581 bunch of other things. This message would be immediately sent to the
2582 Web Content process, and coalesced at the whims of the Web Content process
2583 main thread. However, if we received multiple such updates within the
2584 same runloop cycle in the UI process, the Web Content process could
2585 send back layer tree commits for intermediate states that would
2586 never make it to the screen.
2588 In the UICollectionView case, UIKit would first scroll to the new location
2589 (potentially putting the WKWebView totally off-screen), and then update
2590 our frame (back on screen), and we would get two layer tree commits;
2591 one, with less tile coverage than needed to cover the area, and another
2594 Instead, wait until just before we commit the UI-side layer tree (and
2595 thus everyone is done moving things around) to push the new visible
2596 rect info to the Web Content process.
2598 So far, I have not found a way to test that reliably fails before
2599 and reliably passes after without adding a ton of supporting code to WebKit.
2601 * UIProcess/API/Cocoa/WKWebView.mm:
2602 (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
2603 (-[WKWebView _didCommitLayerTree:]):
2604 (-[WKWebView _didFinishScrolling]):
2605 (-[WKWebView scrollViewDidScroll:]):
2606 (-[WKWebView scrollViewDidZoom:]):
2607 (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
2608 (-[WKWebView _scrollViewDidInterruptDecelerating:]):
2609 (-[WKWebView _didScroll]):
2610 (-[WKWebView _enclosingScrollerScrollingEnded:]):
2611 (-[WKWebView _frameOrBoundsChanged]):
2612 (-[WKWebView _scheduleVisibleContentRectUpdate]):
2613 (-[WKWebView _scrollViewIsInStableState:]):
2614 (-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):
2615 (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2616 (-[WKWebView _setObscuredInsets:]):
2617 (-[WKWebView _endInteractiveObscuredInsetsChange]):
2618 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2619 (-[WKWebView _endAnimatedResize]):
2620 (-[WKWebView _updateVisibleContentRects]): Deleted.
2621 (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Deleted.
2622 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2623 * UIProcess/ios/WKContentView.mm:
2624 (-[WKContentView _didCommitLayerTree:]):
2625 * UIProcess/ios/WKContentViewInteraction.mm:
2626 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
2627 (-[WKContentView _stopAssistingNode]):
2628 * UIProcess/ios/WKScrollView.mm:
2629 (-[WKScrollView setContentInset:]):
2630 Have existing callers of _updateVisibleContentRect* instead call
2631 _scheduleVisibleContentRectUpdate*.
2633 In _scheduleVisibleContentRectUpdate, schedule a pre-commit callback
2634 in which we will compute the new visible content rect information
2635 and send it to the Web Content process.
2637 Keep track of the stable state of the scroll view which most recently
2638 scheduled an update, and use that to inform _updateVisibleContentRects.
2639 This matches the previous behavior where the updates might get coalesced
2640 in the Web Content process, and the most recent update wins.
2642 Make a few callers of _updateVisibleContentRectAfterScrollInView
2643 that passed in our scroll view just use _scheduleVisibleContentRectUpdate instead.
2645 2017-02-16 Brent Fulgham <bfulgham@apple.com>
2647 [WebRTC][Mac] Conditionally add sandbox extensions to the Network Process
2648 https://bugs.webkit.org/show_bug.cgi?id=168010
2649 <rdar://problem/30245503>
2651 Reviewed by Youenn Fablet.
2653 Conditionally add sandbox extensions to the Network Process when the WebRTC/Media Capture
2654 features are enabled.
2656 * NetworkProcess/NetworkProcess.h:
2657 * NetworkProcess/NetworkProcessCreationParameters.cpp:
2658 (WebKit::NetworkProcessCreationParameters::encode): Serialize new process configuration flag.
2659 (WebKit::NetworkProcessCreationParameters::decode): Ditto.
2660 * NetworkProcess/NetworkProcessCreationParameters.h:
2661 * NetworkProcess/mac/NetworkProcessMac.mm:
2662 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Remember state of WebRTC for when the
2663 sandbox is established.
2664 (WebKit::NetworkProcess::initializeSandbox): Add ENABLE_WEB_RTC parameter to sandbox launch state.
2665 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Add conditional sandbox expansion to allow
2666 bidirectional network access when the ENABLE_LIBWEBRTC flag is present in the sandbox launch parameters.
2667 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2668 (WebKit::WebProcessPool::platformInitializeWebProcess): Use proper compile guards and check media stream
2669 preference, rather than the peer connection preference.
2670 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Notify NetworkProcess at launch time whether the
2671 user wants WebRTC support.
2673 2017-02-16 Brent Fulgham <bfulgham@apple.com>
2675 [WebRTC][Mac][WebKit2] Initial WebProcess does not support WebRTC
2676 https://bugs.webkit.org/show_bug.cgi?id=168438
2677 <rdar://problem/30401818>
2679 Reviewed by Youenn Fablet.
2681 The sandbox extension for microphone access does not take effect until the second WebProcess
2682 is created, causing the initial browser tab to lack microphone support.
2684 This patch checks the setting earlier in the boot process so that the initial WebProcess
2685 instance gets the correct setting.
2687 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2688 (WebKit::WebProcessPool::platformInitializeWebProcess): Move microphone sandbox extension here, so that the
2689 initial WebProcess has the correct microphone access.
2690 * UIProcess/WebProcessPool.cpp:
2691 (WebKit::WebProcessPool::createNewWebProcess): Move microphone sandbox extension from here to platform-specific file.
2692 (WebKit::WebProcessPool::createWebPage): Remove unneeded preference checks.
2694 2017-02-16 Eric Carlson <eric.carlson@apple.com>
2696 Add WebRTC as an off-by-default experimental feature menu item.
2697 https://bugs.webkit.org/show_bug.cgi?id=167972
2698 <rdar://problem/30293429>
2700 Reviewed by Alex Christensen.
2702 * Shared/WebPreferencesDefinitions.h:
2703 * UIProcess/WebPreferences.cpp:
2704 (WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): We need to enable/disable
2705 peer connection and media stream preferences at the same time, so special case them.
2706 (WebKit::WebPreferences::setEnabledForFeature):
2707 * UIProcess/WebPreferences.h:
2709 2017-02-15 Alex Christensen <achristensen@webkit.org>
2711 Unreviewed, rolling out r212394.
2713 Fixed iOS WebInspector
2717 "Unreviewed, rolling out r212169."
2718 https://bugs.webkit.org/show_bug.cgi?id=166681
2719 http://trac.webkit.org/changeset/212394
2721 2017-02-15 Eric Carlson <eric.carlson@apple.com>
2723 [MediaStream] delete CaptureDeviceInfo struct
2724 https://bugs.webkit.org/show_bug.cgi?id=168395
2726 Reviewed by Sam Weinig.
2728 * Shared/WebCoreArgumentCoders.cpp:
2729 (IPC::ArgumentCoder<CaptureDevice>::encode):
2730 (IPC::ArgumentCoder<CaptureDevice>::decode):
2732 2017-02-15 Anders Carlsson <andersca@apple.com>
2736 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
2737 (WebKit::WebDragClient::startDrag):
2739 2017-02-15 Anders Carlsson <andersca@apple.com>
2741 Attempt to fix the GTK+ build.
2743 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
2744 (WebKit::WebDragClient::startDrag):
2746 2017-02-15 Simon Fraser <simon.fraser@apple.com>
2748 Clean up WebProcessCreationParameters a little
2749 https://bugs.webkit.org/show_bug.cgi?id=168349
2751 Reviewed by Alex Christensen.
2753 Initialize the data members better, and rearrange to group the types in a slightly more space-efficient manner.
2755 * Shared/WebProcessCreationParameters.cpp:
2756 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2757 * Shared/WebProcessCreationParameters.h:
2759 2017-02-15 Jer Noble <jer.noble@apple.com>
2761 REGRESSION(r183937): Fullscreen Exit animation missing mask
2762 https://bugs.webkit.org/show_bug.cgi?id=168360
2764 Reviewed by Eric Carlson.
2766 In r183937, the fullscreen window's clip layer has it's mask removed when the enter
2767 fullscreen animation completes, allowing low-power video playback mode to be entered. But
2768 this breaks the exit fullscreen animaiton, which assumes a mask is present. Abstract the
2769 mask creation code out into a static helper method, and use it at the beginning of the exit
2770 fullscreen animation to re-create the mask before adding animations to it.
2772 * UIProcess/mac/WKFullScreenWindowController.mm:
2774 (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
2775 (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2777 2017-02-15 Alex Christensen <achristensen@webkit.org>
2779 Unreviewed, rolling out r212169.
2781 Broke iOS WebInspector
2785 "WebInspector: refactor RemoteInspector to move cocoa specific
2786 code to their own files"
2787 https://bugs.webkit.org/show_bug.cgi?id=166681
2788 http://trac.webkit.org/changeset/212169
2790 2017-02-15 Anders Carlsson <andersca@apple.com>
2792 Modernize DragClient::startDrag somewhat
2793 https://bugs.webkit.org/show_bug.cgi?id=168379
2795 Reviewed by Tim Horton.
2797 Update for WebCore changes.
2799 * WebProcess/WebCoreSupport/WebDragClient.cpp:
2800 (WebKit::WebDragClient::startDrag):
2801 * WebProcess/WebCoreSupport/WebDragClient.h:
2802 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2803 (WebKit::WebDragClient::startDrag):
2805 2017-02-15 Aakash Jain <aakash_jain@apple.com>
2807 Remove WebIOSEvent interface
2808 https://bugs.webkit.org/show_bug.cgi?id=168368
2810 Reviewed by Tim Horton.
2812 * Shared/NativeWebKeyboardEvent.h: Using WebEvent from WebCore instead of WebIOSEvent.
2813 * Shared/ios/NativeWebKeyboardEventIOS.mm: Ditto.
2814 * Shared/ios/WebIOSEventFactory.h: Ditto.
2815 * Shared/ios/WebIOSEventFactory.mm: Ditto.
2816 * UIProcess/ios/WKContentViewInteraction.h: Ditto.
2817 * UIProcess/ios/WKContentViewInteraction.mm: Ditto.
2818 * UIProcess/API/C/WKPage.cpp: Using WebEvent from WebKit.
2820 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
2822 [GTK] Update cookie manager API to properly work with ephemeral sessions
2823 https://bugs.webkit.org/show_bug.cgi?id=168230
2825 Reviewed by Michael Catanzaro.
2827 WebKitCookieManager is associated to a particular WebKitWebContext and uses the default session ID
2828 unconditionally. It should be associated to a WebKitWebsiteDataManager instead and use its session ID. This
2829 patch also adds support for handling cookies with WebKitWebsiteDataManager and deprecates
2830 webkit_cookie_manager_get_domains_with_cookies(), webkit_cookie_manager_delete_cookies_for_domain() and
2831 webkit_cookie_manager_delete_all_cookies(). It also adds API to get the the WebKitWebsiteDataManager of a
2832 WebKitWebView, since it's the only way to get the WebKitCookieManager associated to an ephemeral web view.
2834 * UIProcess/API/gtk/WebKitCookieManager.cpp:
2835 (webkitCookieManagerDispose): Stop observing cookie changes.
2836 (webkit_cookie_manager_class_init): Add dispose implementation.
2837 (webkitCookieManagerCreate): Create the WebKitCookieManager with a WebKitWebsiteDataManager.
2838 (webkit_cookie_manager_set_persistent_storage): Work with all contexts having the session.
2839 (webkit_cookie_manager_set_accept_policy): Ditto.
2840 (webkit_cookie_manager_get_accept_policy): Use any context having the session.
2841 (webkit_cookie_manager_get_domains_with_cookies): Deprecate and implement using WebKitWebsiteDataManager.
2842 (webkit_cookie_manager_get_domains_with_cookies_finish): Ditto.
2843 (webkit_cookie_manager_delete_cookies_for_domain): Ditto.
2844 (webkit_cookie_manager_delete_all_cookies): Ditto.
2845 * UIProcess/API/gtk/WebKitCookieManager.h:
2846 * UIProcess/API/gtk/WebKitCookieManagerPrivate.h:
2847 * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
2848 (attachCustomProtocolManagerClientToContext):
2849 * UIProcess/API/gtk/WebKitDownloadClient.cpp:
2850 (attachDownloadClientToContext):
2851 * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
2852 (attachInjectedBundleClientToContext):
2853 * UIProcess/API/gtk/WebKitSecurityManager.cpp:
2854 (registerSecurityPolicyForURIScheme):
2855 * UIProcess/API/gtk/WebKitWebContext.cpp:
2856 (webkitWebContextConstructed): Call webkitWebsiteDataManagerAddProcessPool.
2857 (webkitWebContextDispose): Call webkitWebsiteDataManagerRemoveProcessPool.
2858 (webkit_web_context_get_cookie_manager): Return the WebKitCookieManager of the WebKitWebsiteDataManager.
2859 (webkitWebContextGetProcessPool): Make it return a reference.
2860 * UIProcess/API/gtk/WebKitWebContextPrivate.h:
2861 * UIProcess/API/gtk/WebKitWebView.cpp:
2862 (webkitWebViewConstructed): Call webkitWebsiteDataManagerAddProcessPool when creating a ephemeral web view.
2863 (webkitWebViewDispose): Call webkitWebsiteDataManagerRemoveProcessPool if needed.
2864 (webkit_web_view_get_website_data_manager): Return the WebKitWebsiteDataManager or the context one.
2865 * UIProcess/API/gtk/WebKitWebView.h:
2866 * UIProcess/API/gtk/WebKitWebsiteData.cpp: Add support for Cookies type.
2867 (recordContainsSupportedDataTypes):
2868 (toWebKitWebsiteDataTypes):
2869 * UIProcess/API/gtk/WebKitWebsiteData.h:
2870 * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
2871 (_WebKitWebsiteDataManagerPrivate::~_WebKitWebsiteDataManagerPrivate): Ensure all contexts were unregistered.
2872 (webkitWebsiteDataManagerAddProcessPool): Register the process pool in the session.
2873 (webkitWebsiteDataManagerRemoveProcessPool): Unregister the process poll from the session.
2874 (webkitWebsiteDataManagerGetProcessPools): Return the list of proces pools registered.
2875 (webkit_website_data_manager_get_cookie_manager): Return the WebKitCookieManager.
2876 (toWebsiteDataTypes): Add Cookies.
2877 * UIProcess/API/gtk/WebKitWebsiteDataManager.h:
2878 * UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h:
2879 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
2880 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
2881 (WebKit::WebsiteDataRecord::displayNameForCookieHostName): Handle localhost as a special case here for backwards
2884 2017-02-14 Wenson Hsieh <wenson_hsieh@apple.com>
2886 [WK2] Support data interaction on links
2887 https://bugs.webkit.org/show_bug.cgi?id=168331
2888 <rdar://problem/30200837>
2890 Reviewed by Tim Horton.
2892 Adds support for data interaction on links at the client layer for WebKit2. This involves several changes,
2893 detailed in the per-method changes below:
2895 * Shared/ios/InteractionInformationAtPosition.h:
2896 * Shared/ios/InteractionInformationAtPosition.mm:
2897 (WebKit::InteractionInformationAtPosition::encode):
2898 (WebKit::InteractionInformationAtPosition::decode):
2900 Add adjustedPointForNodeRespondingToClickEvents (the request point, adjusted to take nodeRespondingToClickEvents
2901 into account) to InteractionInformationAtPosition. The web process sends this adjusted point over to the UI
2902 process so that the UI process will be able to begin a data interaction at the adjusted point rather than the
2903 request point, which is necessary for small clickable (and data-interactive) elements such as links.
2905 * UIProcess/ios/WKActionSheet.h:
2906 * UIProcess/ios/WKActionSheet.mm:
2907 (-[WKActionSheet presentSheet:]):
2908 (-[WKActionSheet _presentationRectForStyle:]):
2909 (-[WKActionSheet updateSheetPosition]):
2910 * UIProcess/ios/WKActionSheetAssistant.h:
2911 * UIProcess/ios/WKActionSheetAssistant.mm:
2912 (-[WKActionSheetAssistant presentationRectForElementUsingClosestIndicatedRect]):
2913 (-[WKActionSheetAssistant presentationRectForIndicatedElement]):
2914 (-[WKActionSheetAssistant showImageSheet]):
2915 (-[WKActionSheetAssistant _shouldPresentAtTouchLocationForElementRect:]):
2916 (-[WKActionSheetAssistant needsLinkIndicator]):
2917 (-[WKActionSheetAssistant showLinkSheet]):
2918 (-[WKActionSheetAssistant cleanupSheet]):
2919 (-[WKActionSheetAssistant _presentationStyleForImageAtElementRect:]): Deleted.
2921 Add support for the WKActionSheetPresentAtClosestIndicatorRect style of presenting an action sheet. When
2922 showing the action sheet for a link and there is space along the margins to show a popover in the first place,
2923 we will now target the popover rect to the bounding rect of the set of adjacent (or nearly-adjacent) element
2924 rects closest to the user's touch location. This covers cases where the link is split into multiple rects due to
2925 a line break, when the link is on multiple lines with a jagged rect per line, and when both of the above are
2928 * UIProcess/ios/WKContentViewInteraction.mm:
2929 (-[WKContentView pointIsInDataInteractionContent:]):
2930 (-[WKContentView _positionInformationDidChange:]):
2931 (-[WKContentView positionInformationForActionSheetAssistant:]):
2932 (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
2934 Include link indicator data in the position information request if needed. As the FIXME suggests, this can be
2935 improved by asynchronously presenting the action sheet assistant after the request returns, and is something we
2936 should address in the future.
2938 * WebProcess/WebPage/ios/WebPageIOS.mm:
2939 (WebKit::WebPage::getPositionInformation):
2941 2017-02-14 Jason Rinn <jrinn@apple.com>
2943 Add new WKWebKit Cocoa API for getContentsAsString.
2944 https://bugs.webkit.org/show_bug.cgi?id=168147
2945 <rdar://problem/30502539>
2947 Reviewed by Tim Horton.
2949 * UIProcess/API/Cocoa/WKWebView.mm:
2950 (-[WKWebView _getContentsAsStringWithCompletionHandler:]): New API for getContentsAsString.
2951 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2953 2017-02-14 Chris Dumez <cdumez@apple.com>
2955 HTML Form Validation bubble should take minimum font size setting into consideration
2956 https://bugs.webkit.org/show_bug.cgi?id=168271
2957 <rdar://problem/29869869>
2959 Reviewed by Simon Fraser.
2961 * UIProcess/API/Cocoa/WKWebView.mm:
2962 (-[WKWebView _contentsOfUserInterfaceItem:]):
2963 Return font size used in the validation bubble.
2965 * UIProcess/PageClient.h:
2966 * UIProcess/ios/PageClientImplIOS.h:
2967 * UIProcess/ios/PageClientImplIOS.mm:
2968 (WebKit::PageClientImpl::createValidationBubble):
2969 * UIProcess/ios/WebPageProxyIOS.mm:
2970 (WebKit::WebPageProxy::showValidationMessage):
2971 * UIProcess/mac/PageClientImpl.h:
2972 * UIProcess/mac/PageClientImpl.mm:
2973 (WebKit::PageClientImpl::createValidationBubble):
2974 * UIProcess/mac/WebPageProxyMac.mm:
2975 (WebKit::WebPageProxy::showValidationMessage):
2976 Pass minimum font size setting when constructing the form validation bubble.
2978 2017-02-14 Commit Queue <commit-queue@webkit.org>
2980 Unreviewed, rolling out r211879.
2981 https://bugs.webkit.org/show_bug.cgi?id=168330
2983 Not ready for the menu yet (Requested by eric_car_ on
2988 "Add WebRTC as an off-by-default experimental feature menu
2990 https://bugs.webkit.org/show_bug.cgi?id=167972
2991 http://trac.webkit.org/changeset/211879
2993 2017-02-14 Simon Fraser <simon.fraser@apple.com>
2995 Add logging and defensive fixes to try to detect problems causing blank tabs
2996 https://bugs.webkit.org/show_bug.cgi?id=168270
2997 rdar://problem/30505482
2999 Reviewed by Jon Lee.
3001 Add release logging when -[WKWebView _beginAnimatedResizeWithUpdates:] and -[WKWebView _endAnimatedResize]
3002 are unbalanced across a commit, to detect cases where _endAnimatedResize wasn't called enough times.
3004 Also log when RemoteLayerTreeHost::updateLayerTree() fails to find a root layer, which should never happen.
3006 In WebPageProxy, clear m_firstLayerTreeTransactionIdAfterDidCommitLoad on a web process crash.
3008 * Platform/Logging.h:
3009 * UIProcess/API/Cocoa/WKWebView.mm:
3010 (-[WKWebView _didCommitLayerTree:]):
3011 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3012 (-[WKWebView _endAnimatedResize]):
3013 * UIProcess/WebPageProxy.cpp:
3014 (WebKit::WebPageProxy::resetState):
3015 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3016 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3017 (WebKit::RemoteLayerTreeDrawingAreaProxy::isAlwaysOnLoggingAllowed):
3018 * UIProcess/mac/RemoteLayerTreeHost.mm:
3019 (WebKit::RemoteLayerTreeHost::updateLayerTree):
3020 (WebKit::RemoteLayerTreeHost::clearLayers):
3021 * WebProcess/WebPage/WebFrame.cpp:
3022 (WebKit::WebFrame::WebFrame):
3023 * WebProcess/WebPage/WebFrame.h:
3025 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3027 Allow to use stored credentials also for downloads started by DownloadManager::startDownload
3028 https://bugs.webkit.org/show_bug.cgi?id=167584
3030 Reviewed by Michael Catanzaro.
3032 Cliking on a link that triggers a download works on an already HTTP authenticated site works, but right clicking
3033 and downloading from the context menu shows the HTTP auth dialog again. This is because PendingDownload uses
3034 DoNotAllowStoredCredentials unconditionally. We want to allow using cached credentials at least for
3035 non-ephemeral sessions.
3037 * NetworkProcess/Downloads/DownloadManager.cpp:
3038 (WebKit::DownloadManager::startDownload):
3040 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3042 [GTK] Make DragImageRef a RefPtr instead of a plain pointer
3043 https://bugs.webkit.org/show_bug.cgi?id=168296
3045 Reviewed by Sergio Villar Senin.
3047 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
3048 (WebKit::WebDragClient::startDrag):
3050 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3052 [SOUP] Ensure a response MIME type when Content-Type is missing and sniffing not allowed
3053 https://bugs.webkit.org/show_bug.cgi?id=168299
3055 Reviewed by Sergio Villar Senin.
3057 Sniffing is not allowed but we can try to guess the MIME using the response path, or at least fallback to
3058 default MIME type instead of leaving an empty string. This matches what mac port does.
3060 Fixes: http/tests/inspector/network/fetch-response-body.html
3061 http/tests/inspector/network/xhr-response-body.html
3063 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3064 (WebKit::NetworkDataTaskSoup::didSendRequest):
3066 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3068 CookieManager only works with the default session
3069 https://bugs.webkit.org/show_bug.cgi?id=168229
3071 Reviewed by Alex Christensen.
3073 Make CookieManager session aware by adding a SessionID parameter to all its functions, and update all the callers
3074 to pass the default session ID, preserving the current
3075 behavior. WebCookieManagerProxy::startObservingCookieChanges() now also receives an optional callback to be
3076 called on every change.
3078 * UIProcess/API/C/WKCookieManager.cpp:
3079 (WKCookieManagerGetHostnamesWithCookies):
3080 (WKCookieManagerDeleteCookiesForHostname):
3081 (WKCookieManagerDeleteAllCookies):
3082 (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
3083 (WKCookieManagerStartObservingCookieChanges):
3084 (WKCookieManagerStopObservingCookieChanges):
3085 * UIProcess/API/gtk/WebKitCookieManager.cpp:
3086 (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate):
3087 (webkitCookieManagerCreate):
3088 (webkit_cookie_manager_set_persistent_storage):
3089 (webkit_cookie_manager_get_domains_with_cookies):
3090 (webkit_cookie_manager_delete_cookies_for_domain):
3091 (webkit_cookie_manager_delete_all_cookies):
3092 * UIProcess/Automation/WebAutomationSession.cpp:
3093 (WebKit::WebAutomationSession::addSingleCookie):
3094 (WebKit::WebAutomationSession::deleteAllCookies):
3095 * UIProcess/WebCookieManagerProxy.cpp:
3096 (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
3097 (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
3098 (WebKit::WebCookieManagerProxy::deleteAllCookies):
3099 (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
3100 (WebKit::WebCookieManagerProxy::addCookie):
3101 (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
3102 (WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
3103 (WebKit::WebCookieManagerProxy::cookiesDidChange):
3104 * UIProcess/WebCookieManagerProxy.h:
3105 * UIProcess/WebCookieManagerProxy.messages.in:
3106 * WebProcess/Cookies/WebCookieManager.cpp:
3107 (WebKit::WebCookieManager::WebCookieManager):
3108 (WebKit::WebCookieManager::getHostnamesWithCookies):
3109 (WebKit::WebCookieManager::deleteCookiesForHostname):
3110 (WebKit::WebCookieManager::deleteAllCookies):
3111 (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
3112 (WebKit::WebCookieManager::addCookie):
3113 (WebKit::WebCookieManager::startObservingCookieChanges):
3114 (WebKit::WebCookieManager::stopObservingCookieChanges):
3115 * WebProcess/Cookies/WebCookieManager.h:
3116 * WebProcess/Cookies/WebCookieManager.messages.in:
3118 2017-02-14 Tomas Popela <tpopela@redhat.com>
3120 Unreviewed, fix documentation typo
3122 * UIProcess/API/gtk/WebKitEditingCommands.h:
3124 2017-02-12 Brian Burg <bburg@apple.com>
3126 Web Inspector: expose system user interface layout direction through InspectorFrontendHost
3127 https://bugs.webkit.org/show_bug.cgi?id=168209
3128 <rdar://problem/11573736>
3130 Reviewed by Joseph Pecoraro.
3132 Forward the UserInterfaceLayoutDirection of the inspector page. If the WebKit client has
3133 properly set the UI directionality from system settings in PageClient, this will get inherited
3134 automatically by the Inspector's WebPage instance.
3136 * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
3137 (WebKit::RemoteWebInspectorUI::userInterfaceLayoutDirection):
3138 * WebProcess/WebPage/RemoteWebInspectorUI.h:
3139 * WebProcess/WebPage/WebInspectorUI.cpp:
3140 (WebKit::WebInspectorUI::userInterfaceLayoutDirection):
3141 * WebProcess/WebPage/WebInspectorUI.h:
3143 2017-02-13 Youenn Fablet <youennf@gmail.com>
3145 [WebRTC] Creating RTCPeerConnection with libwebrtc backend is crashing on rwt
3146 https://bugs.webkit.org/show_bug.cgi?id=168250
3148 Reviewed by Alex Christensen.
3150 * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
3151 (WebKit::LibWebRTCProvider::createPeerConnection):
3152 * WebProcess/Network/webrtc/LibWebRTCProvider.h:
3153 * WebProcess/Network/webrtc/LibWebRTCSocket.h:
3154 * WebProcess/Network/webrtc/WebRTCMonitor.cpp:
3155 (WebKit::WebRTCMonitor::StartUpdating):
3156 (WebKit::WebRTCMonitor::networksChanged):
3157 * WebProcess/Network/webrtc/WebRTCMonitor.h:
3158 * WebProcess/Network/webrtc/WebRTCResolver.cpp:
3159 (WebKit::WebRTCResolver::setResolvedAddress):
3160 (WebKit::WebRTCResolver::resolvedAddressError):
3161 * WebProcess/Network/webrtc/WebRTCSocket.cpp:
3162 (WebKit::WebRTCSocket::signalOnNetworkThread):
3164 2017-02-13 Megan Gardner <megan_gardner@apple.com>
3166 Implement Drag cancels
3167 https://bugs.webkit.org/show_bug.cgi?id=168266
3169 Reviewed by Wenson Hsieh.
3171 Adds support for the UI Process to cancel already started drag events.
3173 * UIProcess/WebPageProxy.cpp:
3174 (WebKit::WebPageProxy::cancelledDrag):
3175 * UIProcess/WebPageProxy.h:
3176 * WebProcess/WebPage/WebPage.h:
3177 (WebKit::WebPage::cancelledDrag):
3178 * WebProcess/WebPage/WebPage.messages.in:
3180 2017-02-13 Simon Fraser <simon.fraser@apple.com>
3182 Call WKDestroyRenderingResources() on iOS when tabs are backgrounded
3183 https://bugs.webkit.org/show_bug.cgi?id=168261
3184 rdar://problem/30481079
3186 Reviewed by Tim Horton.
3188 There's code to call CABackingStoreCollectBlocking() on a 10s timer that exists for Mac, but on iOS
3189 the web processes are suspended before this timer fires. So call CABackingStoreCollectBlocking()
3190 from WebProcess::actualPrepareToSuspend(), which is where we also trigger the markAllLayersVolatile()
3193 Also add CABackingStoreCollectBlocking() to QuartzCoreSPI.h so we can use it without using WKSI.
3195 Release-log how long this takes, in case we get reports of bad performance. In my testing it could be up to 10ms.
3197 * WebProcess/WebProcess.cpp:
3198 (WebKit::WebProcess::actualPrepareToSuspend):
3199 * WebProcess/cocoa/WebProcessCocoa.mm:
3200 (WebKit::WebProcess::destroyRenderingResources):
3202 2017-02-13 Brady Eidson <beidson@apple.com>
3204 Followup to: Replace all WebKit Library Version checks in WK2 with SDK version checks.
3205 https://bugs.webkit.org/show_bug.cgi?id=168124
3207 Reviewed by Geoffrey Garen.
3209 * UIProcess/Cocoa/VersionChecks.h:
3211 2017-02-13 Wenson Hsieh <wenson_hsieh@apple.com>
3213 [WK2] Add test infrastructure and unit tests for data interaction
3214 https://bugs.webkit.org/show_bug.cgi?id=168159
3215 <rdar://problem/30477634>
3217 Reviewed by Tim Horton.
3219 Adds support at the WebKit2 layer for testing data interaction. Introduces the _WKTestingDelegate, which a
3220 protocol which can specified for a WKWebView and used to install mock objects and simulate the state of the
3221 platform. By default, this delegate is nil, which results in normal behavior. For data interaction, we are able
3222 to specify a mock data interaction gesture recognizer for use by the WKContentView to simulate firing a long
3223 press and subsequent movement. This gesture recognizer is used in place of the regular data interaction gesture
3224 recognizer, and allows for TestWebKitAPI to drive interaction without actually sending events through the
3225 UIApplication. The _WKTestingDelegate also contains optional method hooks which are invoked at key points in
3226 time when performing a data interaction gesture.
3228 Since all methods of the testing delegate are optional, the testing delegate can be easily extended to support
3229 testing for other features -- the idea is that leaving all but the relevant methods in the protocol
3230 unimplemented will result in default behavior for everything other than those methods, so a client need only
3231 implement and add WebKit2 hooks for a few methods to support testing for a new feature.
3233 * UIProcess/API/Cocoa/WKWebView.mm:
3234 (-[WKWebView _testingDelegate]):
3235 (-[WKWebView _setTestingDelegate:]):
3237 Specify the testing delegate to use for this WKWebView (see above for more details).
3239 (-[WKWebView _simulateDataInteractionGestureRecognized]):
3240 (-[WKWebView _simulateDataInteractionEntered:]):
3241 (-[WKWebView _simulateDataInteractionUpdated:]):
3242 (-[WKWebView _simulateDataInteractionPerformOperation:]):
3243 (-[WKWebView _simulateDataInteractionEnded:]):
3244 (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]):
3245 (-[WKWebView _simulateFailedDataInteractionWithIndex:]):
3246 (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]):
3247 (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]):
3249 Used by TestWebKitAPI to drive data interaction tests. See DataInteractionTests.mm.
3251 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3252 * UIProcess/API/Cocoa/_WKTestingDelegate.h: Added.
3253 * UIProcess/ios/WKContentViewInteraction.h:
3254 * UIProcess/ios/WKContentViewInteraction.mm:
3255 (-[WKContentView setupInteraction]):
3256 (-[WKContentView _dataInteractionGestureRecognizer]):
3257 * WebKit2.xcodeproj/project.pbxproj:
3259 2017-02-13 Eric Carlson <eric.carlson@apple.com>
3261 [MediaStream Mac] Video capture needs access to /Library/CoreMediaIO/Plug-Ins/DAL/
3262 https://bugs.webkit.org/show_bug.cgi?id=168244
3263 <rdar://problem/30461158>
3265 Reviewed by Brady Eidson.
3267 * WebProcess/com.apple.WebProcess.sb.in: Grant read-access to the video capture
3268 plug-in directory when enabling video capture.
3270 2017-02-13 Antti Koivisto <antti@apple.com>
3272 Disable mmap'd cache files if container is class A
3273 https://bugs.webkit.org/show_bug.cgi?id=168241
3274 <rdar://problem/23676252>
3276 Reviewed by JF Bastien and Chris Dumez.
3278 If the mmap'd cache file gets evicted and the device is locked,
3279 then WebContent won't be able to bring the file back in under
3280 class A, causing SIGBUS.
3282 In those circumstances, don't use mmap'd files.
3284 * NetworkProcess/cache/NetworkCache.h:
3285 (WebKit::NetworkCache::Cache::canUseSharedMemoryForBodyData):
3286 * NetworkProcess/cache/NetworkCacheEntry.cpp:
3287 (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
3289 Don't initialize the shareable resource handle for the map if forbidden.
3291 * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
3292 (WebKit::NetworkCache::canUseSharedMemoryForPath):
3294 Query the system for the protection status of the cache path.
3296 * NetworkProcess/cache/NetworkCacheFileSystem.h:
3297 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3298 (WebKit::NetworkCache::Storage::Storage):
3299 * NetworkProcess/cache/NetworkCacheStorage.h:
3300 (WebKit::NetworkCache::Storage::canUseSharedMemoryForBodyData):
3302 2017-02-13 Youenn Fablet <youennf@gmail.com>
3304 [WebRTC] libwebrtc socket factory is not assigning the right socket type
3305 https://bugs.webkit.org/show_bug.cgi?id=168233
3307 Reviewed by Brent Fulgham.
3309 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
3310 (WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
3311 (WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
3313 2017-02-13 Michael Catanzaro <mcatanzaro@igalia.com>
3315 [GTK] Unreviewed, add missing precondition check
3317 * WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp:
3318 (webkit_web_editor_get_page):
3320 2017-02-13 Michael Catanzaro <mcatanzaro@igalia.com>
3322 Unreviewed, fix another docs typo.
3324 * UIProcess/API/gtk/WebKitEditingCommands.h:
3326 2017-02-12 Michael Catanzaro <mcatanzaro@igalia.com>
3328 [GTK] Improve documentation of webkit_context_menu_set_user_data()
3329 https://bugs.webkit.org/show_bug.cgi?id=168214
3331 Reviewed by Carlos Garcia Campos.
3333 * UIProcess/API/gtk/WebKitContextMenu.cpp:
3335 2017-02-12 Dan Bernstein <mitz@apple.com>
3337 Tried to fix USE(APPLE_INTERNAL_SDK) builds after r212211.
3339 * UIProcess/mac/WebContextMenuProxyMac.mm:
3340 (WebKit::WebContextMenuProxyMac::createShareMenuItem): Use non-deprecated method.
3342 2017-02-12 Dan Bernstein <mitz@apple.com>
3344 [Cocoa] Some -respondsToSelector: checks are unnecessary
3345 https://bugs.webkit.org/show_bug.cgi?id=168183
3347 Reviewed by Tim Horton.
3349 * Platform/mac/LayerHostingContext.mm:
3350 (WebKit::LayerHostingContext::setColorMatchUntaggedContent): Removed unnecessary
3351 -respondsToSelector: check.
3352 (WebKit::LayerHostingContext::colorMatchUntaggedContent): Ditto.
3354 * Platform/mac/MenuUtilities.mm:
3355 (WebKit::menuItemTitleForTelephoneNumberGroup): Ditto.
3357 * Platform/spi/ios/UIKitSPI.h: Moved declaration of
3358 -[UIScrollView _isInterruptingDeceleration] from WKWebView.mm to the
3359 !USE(APPLE_INTERNAL_SDK) section here.
3361 * Shared/mac/ChildProcessMac.mm:
3362 (WebKit::ChildProcess::setSharedHTTPCookieStorage): Removed unnecessary -respondsToSelector:
3365 * Shared/mac/WebEventFactory.mm:
3366 (WebKit::typeForEvent): Ditto.
3368 * UIProcess/API/Cocoa/WKWebView.mm:
3369 (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Ditto.
3371 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
3372 (WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup): Ditto.
3374 * UIProcess/Cocoa/WebViewImpl.mm:
3375 (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly): Ditto.
3377 * UIProcess/WKImagePreviewViewController.mm:
3378 (-[WKImagePreviewViewController previewActions]): Removed check whether _WKElementAction
3379 responds to -runActionWithElementInfo:.
3381 * UIProcess/ios/WKActionSheetAssistant.mm:
3382 (-[WKActionSheetAssistant showDataDetectorsSheet]): Ditto.
3384 * UIProcess/ios/WKContentViewInteraction.mm:
3385 (-[WKContentView _lookup:]): Ditto.
3386 (-[WKContentView _share:]): Ditto.
3387 (-[WKContentView _addShortcut:]): Ditto.
3388 (-[WKContentView _promptForReplace:]): Ditto.
3389 (-[WKContentView _transliterateChinese:]): Ditto.
3390 (-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Removed call to
3391 -[UIKeyboardImpl didHandleWebKeyEvent], which is a no-op.
3392 (-[WKContentView _interpretKeyEvent:isCharEvent:]): Removed unnecessary -respondsToSelector:
3394 (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Ditto.
3396 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
3397 (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence): Ditto.
3399 * UIProcess/mac/WKImmediateActionController.mm:
3400 (-[WKImmediateActionController _animationControllerForDataDetectedText]): Ditto.
3402 * UIProcess/mac/WebContextMenuProxyMac.mm:
3403 (WebKit::WebContextMenuProxyMac::createShareMenuItem): Ditto.
3405 2017-02-12 Michael Catanzaro <mcatanzaro@igalia.com>
3407 [GTK] Unreviewed, minor documentation improvements
3409 * UIProcess/API/gtk/WebKitWebView.cpp:
3410 (webkit_web_view_class_init):
3411 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3412 (webkit_web_page_class_init):
3414 2017-02-12 Carlos Garcia Campos <cgarcia@igalia.com>
3416 [SOUP] Downloads fail when the given destination is not a URI
3417 https://bugs.webkit.org/show_bug.cgi?id=168187
3419 Reviewed by Michael Catanzaro.
3421 It always expects a uri, and fails if a local path is given.
3423 Fixes: http/tests/download/anchor-download-no-extension.html
3424 http/tests/download/area-download.html
3425 http/tests/security/anchor-download-allow-data.html
3426 http/tests/security/anchor-download-allow-sameorigin.html
3428 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3429 (WebKit::NetworkDataTaskSoup::download): Use g_file_new_for_path() if the pending destination is a path instead
3432 2017-02-12 Carlos Garcia Campos <cgarcia@igalia.com>
3434 [GTK] Handle caps lock indicator in event modifiers
3435 https://bugs.webkit.org/show_bug.cgi?id=168186
3437 Reviewed by Michael Catanzaro.
3439 Use PlatformKeyboardEvent::modifiersContainCapsLock() to check if modifiers contain the caps lock and add
3440 Modifiers::CapsLockKey in that case.
3442 * Shared/gtk/WebEventFactory.cpp:
3443 (WebKit::modifiersForEvent):
3444 * UIProcess/API/gtk/WebKitPrivate.cpp:
3445 (wkEventModifiersToGdkModifiers):
3448 2017-02-12 Andy Estes <aestes@apple.com>
3450 [iOS] PDF page number indicator can show "0 of n" on short pages
3451 https://bugs.webkit.org/show_bug.cgi?id=168185
3453 Reviewed by Tim Horton.
3455 When viewing a PDF with a last page that is shorter than the frame height, it's possible
3456 (thanks to rubber-banding) to scroll down until the page no longer intersects the rect we
3457 use to determine the center page. When this happens, the page number indicator displays
3460 Fix this by handling cases where the first page starts below the center page rect or the
3461 last page ends above it.
3463 * UIProcess/ios/WKPDFView.mm:
3464 (-[WKPDFView _revalidateViews]):
3466 2017-02-11 Alex Christensen <achristensen@webkit.org>
3468 Fix crashes after [NSURLSession invalidateAndCancel]
3469 https://bugs.webkit.org/show_bug.cgi?id=168181
3470 <rdar://problem/29813868>
3472 Reviewed by Brady Eidson.
3474 When we call NetworkSessionCocoa::invalidateAndCancel, we intend for the session to immediately
3475 become invalid and stop doing things. [NSURLSession invalidateAndCancel] asynchronously cancels
3476 everything and then calls the delegate's didBecomeInvalidWithError, so before this change there
3477 is a time when we have torn down the session with SessionTracker::destroySession but we can still
3478 get a delegate callback which assumes the session and its NetworkStorageSession exists. If we
3479 get any delegate callbacks after a NetworkSession has been invalidated, we will want to ignore them.
3481 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3482 (-[WKNetworkSessionDelegate sessionInvalidated]):
3483 (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]):
3484 (-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
3485 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
3486 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
3487 (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
3488 (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
3489 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
3490 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
3491 (-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
3492 (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
3493 (-[WKNetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]):
3494 (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
3495 The pointer to the NetworkSessionCocoa can now be null. We need to check it.
3496 (WebKit::NetworkSessionCocoa::invalidateAndCancel):
3497 Synchronously remove the connection between the delegates and the NetworkSessionCocoa.
3499 2017-02-10 John Wilander <wilander@apple.com>
3501 Updates to Resource Load Statistics: Get the right website data store and introduce timeout for user interaction
3502 https://bugs.webkit.org/show_bug.cgi?id=167474
3503 <rdar://problem/24681808>
3504 <rdar://problem/24703286>
3505 <rdar://problem/30290270>
3507 This patch does the following:
3508 1. Gets the right website data store. API::WebsiteDataStore::defaultDataStore()
3509 does not provide the right data store.
3510 2. Introduces timeout for user interaction. A domain needs interaction every 30
3511 days to stay in that category.
3512 3. Adds grandfathered to the statistics model in preparation for grandfathering of
3513 existing data records.
3514 4. Adds test infrastructure to allow testing of the various rules in place for
3515 data records removal.
3516 5. Fixes various smaller bugs that were found as part of setting up the tests.
3517 6. Regresses the data records removal counting. We need to come up with a thread
3518 safe way of gathering removal statistics from more than one data store now
3519 that we potentially interact with multiple stores.
3520 7. Adds a first set of layout tests for resource load statistics.
3522 Reviewed by Andy Estes.
3524 * PlatformEfl.cmake:
3525 Added UIProcess/WebResourceLoadStatisticsManager.cpp and
3526 UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
3527 * PlatformGTK.cmake:
3528 Added UIProcess/WebResourceLoadStatisticsManager.cpp and
3529 UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
3530 * PlatformMac.cmake:
3531 Added UIProcess/WebResourceLoadStatisticsManager.cpp and
3532 UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
3533 * Shared/API/APIObject.h:
3534 Adds WebResourceLoadStatisticsManager to the Type enum.
3535 * Shared/API/c/WKBase.h:
3536 Typedef of WKResourceLoadStatisticsManagerRef.
3537 * Shared/WebCoreArgumentCoders.cpp:
3538 (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
3539 (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
3540 Adds support for statistics mostRecentUserInteraction, grandfathered, and
3542 * UIProcess/API/C/WKAPICast.h:
3543 Adds API mapping between WKResourceLoadStatisticsManagerRef and
3544 WebResourceLoadStatisticsManager.
3545 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp: Added.
3546 (WKResourceLoadStatisticsManagerGetTypeID):
3547 (WKResourceLoadStatisticsManagerSetPrevalentResource):
3548 (WKResourceLoadStatisticsManagerIsPrevalentResource):
3549 (WKResourceLoadStatisticsManagerSetHasHadUserInteraction):
3550 (WKResourceLoadStatisticsManagerIsHasHadUserInteraction):
3551 (WKResourceLoadStatisticsManagerSetTimeToLiveUserInteraction):
3552 (WKResourceLoadStatisticsManagerFireDataModificationHandler):
3553 (WKResourceLoadStatisticsManagerSetNotifyPagesWhenDataRecordsWereScanned):
3554 (WKResourceLoadStatisticsManagerSetShouldClassifyResourcesBeforeDataRecordsRemoval):
3555 (WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
3556 (WKResourceLoadStatisticsManagerResetToConsistentState):
3557 API level bridge to WebResourceLoadStatisticsManager functions.
3558 * UIProcess/API/C/WKResourceLoadStatisticsManager.h: Added.
3559 * UIProcess/WebProcessProxy.cpp:
3560 (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyOwnedDomainsInAllPersistentDataStores):
3561 A way to delete website data in persistent store(s) configured by the
3562 embedding client. API::WebsiteDataStore::defaultDataStore() does not
3563 do this which caused us to skip session storage.
3564 * UIProcess/WebProcessProxy.h:
3565 * UIProcess/WebResourceLoadStatisticsManager.cpp: Added.
3566 (WebKit::WebResourceLoadStatisticsManager::setPrevalentResource):
3567 (WebKit::WebResourceLoadStatisticsManager::isPrevalentResource):
3568 (WebKit::WebResourceLoadStatisticsManager::setHasHadUserInteraction):
3569 (WebKit::WebResourceLoadStatisticsManager::hasHadUserInteraction):
3570 (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
3571 (WebKit::WebResourceLoadStatisticsManager::fireDataModificationHandler):
3572 (WebKit::WebResourceLoadStatisticsManager::setNotifyPagesWhenDataRecordsWereScanned):
3573 (WebKit::WebResourceLoadStatisticsManager::setShouldClassifyResourcesBeforeDataRecordsRemoval):
3574 (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
3575 (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
3576 Static functions to manage the state and behavior of the UI process'
3577 resource load statistics store.
3578 * UIProcess/WebResourceLoadStatisticsManager.h: Added.
3579 (WebKit::WebResourceLoadStatisticsManager::create):
3580 * UIProcess/WebResourceLoadStatisticsStore.cpp:
3581 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
3582 An effect of a member variable rename. See header file comment below.
3583 (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned):
3584 (WebKit::WebResourceLoadStatisticsStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
3585 (WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval):
3586 Three static functions for controlling the behavior of the store.
3587 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
3589 1. Covers all data record types.
3590 2. Allows data removal when m_lastTimeDataRecordsWereRemoved is not set.
3591 3. Moves the heavy lifting to WebsiteDataStore (see below).
3592 4. No longer counts removed data regressions.
3593 (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
3595 (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
3596 WebResourceLoadStatisticsStore::processStatisticsAndDataRecords() is
3597 broken out of WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated
3598 to allow for statistics processing without prior classification.
3599 Tests need to set statistics and a run of the classifier may
3601 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
3602 Sets the notification callback which calls
3603 WebResourceLoadStatisticsStore::processStatisticsAndDataRecords().
3604 * UIProcess/WebResourceLoadStatisticsStore.h:
3605 (WebKit::WebResourceLoadStatisticsStore::coreStore):
3606 Renamed m_resourceStatisticsStore to m_resourceLoadStatisticsStore to
3607 harmonize with other naming.
3608 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3609 (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyOwnedDomains):
3610 This is now where matching is made between prevalent resources
3611 and data records. This function is used by
3612 WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains().
3613 (WebKit::WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains):
3614 The function WebResourceLoadStatisticsStore::removeDataRecords()
3615 calls to get data records removed in all persistent stores.
3616 * UIProcess/WebsiteData/WebsiteDataStore.h:
3617 * WebKit2.xcodeproj/project.pbxproj:
3618 * WebProcess/WebProcess.cpp:
3619 (WebKit::m_resourceLoadStatisticsStore):
3620 (WebKit::WebProcess::statisticsChangedTimerFired):
3621 (WebKit::m_resourceLoadStatisticsStorage): Deleted.
3622 Renamed m_resourceLoadStatisticsStorage to m_resourceLoadStatisticsStore
3623 to harmonize with other naming.
3624 * WebProcess/WebProcess.h:
3626 2017-02-10 Simon Fraser <simon.fraser@apple.com>
3628 Zero out some WKWebView state in the case of a web content crash
3629 https://bugs.webkit.org/show_bug.cgi?id=168157
3631 Reviewed by Tim Horton.
3633 Reset some bits of state in WKWebView when the web content process crashes, in
3634 to try to avoid states that might cause the web view to stay blank.
3636 * UIProcess/API/Cocoa/WKWebView.mm:
3637 (-[WKWebView _processDidExit]):
3639 2017-02-10 Daniel Bates <dabates@apple.com>
3641 Detach frame from document when entering page cache
3642 https://bugs.webkit.org/show_bug.cgi?id=166774
3643 <rdar://problem/29904368>
3645 Reviewed by Chris Dumez.
3647 * Shared/WebPreferencesDefinitions.h:
3648 * UIProcess/API/C/WKPreferences.cpp:
3649 (WKPreferencesSetAllowsPageCacheWithWindowOpener): Deleted.
3650 (WKPreferencesGetAllowsPageCacheWithWindowOpener): Deleted.
3651 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3652 * WebProcess/InjectedBundle/InjectedBundle.cpp:
3653 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3654 * WebProcess/WebPage/WebPage.cpp:
3655 (WebKit::WebPage::updatePreferences):
3657 2017-02-10 Carlos Garcia Campos <cgarcia@igalia.com>
3659 WebInspector: refactor RemoteInspector to move cocoa specific code to their own files
3660 https://bugs.webkit.org/show_bug.cgi?id=166681
3662 Reviewed by Michael Catanzaro.
3664 * WebProcess/WebProcess.cpp:
3665 (WebKit::WebProcess::initializeWebProcess): Add PLATFORM(COCOA) to the ifdef.
3667 2017-02-10 Tim Horton <timothy_horton@apple.com>
3669 Infinite UI process hang under ensurePositionInformationIsUpToDate
3670 https://bugs.webkit.org/show_bug.cgi?id=168154
3671 <rdar://problem/30428673>
3673 Reviewed by Simon Fraser.
3675 * UIProcess/ios/WKContentViewInteraction.mm:
3676 (-[WKContentView cleanupInteraction]):
3677 If the web process crashes or we're being torn down for another reason,
3678 assume that we aren't ever going to receive any pending async interaction
3679 information update. Otherwise, ensurePositionInformationIsUpToDate can end
3680 up waiting for it forever.
3682 2017-02-10 Andrew Gold <agold@apple.com>
3684 Add mediaStreamEnabled property to WKPreferences for Cocoa.
3685 https://bugs.webkit.org/show_bug.cgi?id=168080
3687 Reviewed by Tim Horton.
3689 * UIProcess/API/Cocoa/WKWebView.mm:
3690 (-[WKWebView _initializeWithConfiguration:]): Sets the pageConfiguration's mediaStreamEnabled preference value.
3692 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3693 (-[WKWebViewConfiguration copyWithZone:]): Copies the mediaStreamEnabled property.
3694 (-[WKWebViewConfiguration _mediaStreamEnabled]): Gets the mediaStreamEnabled property.
3695 (-[WKWebViewConfiguration _setMediaStreamEnabled:]): Sets the mediaStreamEnabled property.
3696 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3698 2017-02-10 Olivier Blin <olivier.blin@softathome.com>
3700 WebProcess: remove unused m_inDidClose
3701 https://bugs.webkit.org/show_bug.cgi?id=168121
3703 Reviewed by Alex Christensen.
3705 * WebProcess/WebProcess.cpp:
3706 (WebKit::WebProcess::didClose):
3707 * WebProcess/WebProcess.h:
3708 m_inDidClose has been unused since r83774
3710 2017-02-10 Joseph Pecoraro <pecoraro@apple.com>
3712 [Resource Timing] Enable Resource Timing by default in Tests
3713 https://bugs.webkit.org/show_bug.cgi?id=168145
3715 Reviewed by Ryosuke Niwa.
3717 * Shared/WebPreferencesDefinitions.h:
3718 * UIProcess/API/C/WKPreferences.cpp:
3719 (WKPreferencesSetResourceTimingEnabled):
3720 (WKPreferencesGetResourceTimingEnabled):
3721 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3722 * WebProcess/WebPage/WebPage.cpp:
3723 (WebKit::WebPage::updatePreferences):
3725 2017-02-10 Dan Bernstein <mitz@apple.com>
3727 [Cocoa] Add shouldChangeSelectedRange to WKWebProcessPlugInEditingDelegate
3728 https://bugs.webkit.org/show_bug.cgi?id=168097
3730 Reviewed by Tim Horton.
3732 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
3733 Declared new delegate method.
3734 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3735 (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Dispatch new delegate
3738 * WebProcess/WebPage/ios/WebPageIOS.mm:
3739 (WebKit::WebPage::selectWithGesture): Pass UserTriggered whan calling
3740 WebCore::Frame::Selection::setSelectedRange, so that the delegate is consulted.
3741 (WebKit::WebPage::changeBlockSelection): Ditto.
3742 (WebKit::WebPage::updateSelectionWithTouches): Ditto.
3743 (WebKit::WebPage::selectWithTwoTouches): Ditto.
3744 (WebKit::WebPage::extendSelection): Ditto.
3745 (WebKit::WebPage::selectWordBackward): Ditto,
3746 (WebKit::WebPage::moveSelectionByOffset): Ditto.
3747 (WebKit::WebPage::selectPositionAtPoint): Ditto.
3748 (WebKit::WebPage::selectPositionAtBoundaryWithDirection): Ditto.
3749 (WebKit::WebPage::moveSelectionAtBoundaryWithDirection): Ditto.
3750 (WebKit::WebPage::selectTextWithGranularityAtPoint): Ditto.
3751 (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary): Ditto.
3752 (WebKit::WebPage::updateSelectionWithExtentPoint): Ditto.
3754 2017-02-10 Brady Eidson <beidson@apple.com>
3756 Replace all WebKit Library Version checks in WK2 with SDK version checks.
3757 https://bugs.webkit.org/show_bug.cgi?id=168124
3759 Reviewed by Geoffrey Garen.
3761 This change gets rid of WebKit Library Version checks and replaces them with SDK version checks.
3763 To allow our tools to still be able to test new behaviors even when built against older SDKs,
3764 it also opts them into an SPI default to have "linkedOnOrAfter()" always return true.
3766 * Shared/Cocoa/CompletionHandlerCallChecker.mm:
3767 (WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):
3769 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3770 (-[WKWebViewConfiguration init]):
3772 * UIProcess/Cocoa/VersionChecks.h:
3773 (WebKit::linkedOnOrAfter): Deleted.
3774 * UIProcess/Cocoa/VersionChecks.mm:
3775 (WebKit::linkedOnOrAfter):
3777 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3778 (WebKit::WebProcessPool::isNetworkCacheEnabled):
3780 2017-02-10 Brian Burg <bburg@apple.com>
3782 [Cocoa] Web Inspector: generate an NS_ENUM containing platforms supported by the protocol code generator
3783 https://bugs.webkit.org/show_bug.cgi?id=168019
3784 <rdar://problem/28718990>
3786 Reviewed by Joseph Pecoraro.
3788 * UIProcess/Automation/Automation.json: Fix the platform values to be lowercase.
3790 2017-02-10 Brian Burg <bburg@apple.com>
3792 Web Automation: fail gracefully when a screenshot cannot be encoded as base64
3793 https://bugs.webkit.org/show_bug.cgi?id=168095
3794 <rdar://problem/30297427>
3796 Reviewed by Joseph Pecoraro.
3798 Convert platformGetBase64EncodedPNGData to return a std::optional<String>.
3799 Return nullopt if we can't create a screenshot or convert it to base64.
3801 * UIProcess/Automation/WebAutomationSession.cpp:
3802 (WebKit::WebAutomationSession::didTakeScreenshot):
3803 (WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
3804 * UIProcess/Automation/WebAutomationSession.h:
3805 * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
3806 (WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
3808 2017-02-09 Carlos Garcia Campos <cgarcia@igalia.com>
3810 Unreviewed. Fix GTK+ build with threaded compositor disabled.
3812 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
3813 (WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):
3814 (WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeNow):
3816 2017-02-09 Alex Christensen <achristensen@webkit.org>
3818 Unreviewed, rolling out r212040.
3820 Broke build. I'm not surprised
3824 "[WebRTC][Mac] Activate libwebrtc"
3825 https://bugs.webkit.org/show_bug.cgi?id=167293
3826 http://trac.webkit.org/changeset/212040
3828 2017-02-09 Chris Dumez <cdumez@apple.com>
3830 [Mac][WK2] Use MIME type to add file extension to downloads' suggested filenames when missing
3831 https://bugs.webkit.org/show_bug.cgi?id=168077
3832 <rdar://problem/30412595>
3834 Reviewed by Alex Christensen.
3836 Use MIME type to add file extension to downloads' suggested filenames when missing:
3837 - https://html.spec.whatwg.org/#as-a-download (step 19)
3839 This new behavior matches Chrome.
3841 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
3842 (WebKit::BlobDownloadClient::didReceiveResponseAsync):
3843 * NetworkProcess/Downloads/Download.cpp:
3844 (WebKit::Download::didReceiveResponse):
3845 (WebKit::Download::decideDestinationWithSuggestedFilename):
3846 * NetworkProcess/Downloads/Download.h:
3847 * NetworkProcess/NetworkProcess.cpp:
3848 (WebKit::NetworkProcess::findPendingDownloadLocation):
3849 * UIProcess/Downloads/DownloadProxy.cpp:
3850 (WebKit::DownloadProxy::didStart):
3851 (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
3852 * UIProcess/Downloads/DownloadProxy.h:
3853 * UIProcess/Downloads/DownloadProxy.messages.in:
3855 2017-02-09 Youenn Fablet <youenn@apple.com>
3857 [WebRTC][Mac] Activate libwebrtc
3858 https://bugs.webkit.org/show_bug.cgi?id=167293
3860 Reviewed by Alex Christensen.
3862 * Shared/WebPreferencesDefinitions.h:
3864 2017-02-09 Alex Christensen <achristensen@webkit.org>
3866 Fix libwebrtc build on case-sensitive file systems.
3868 * WebProcess/Network/webrtc/WebRTCMonitor.cpp:
3870 2017-02-09 Alex Christensen <achristensen@webkit.org>
3874 * PlatformMac.cmake:
3876 2017-02-09 Brady Eidson <beidson@apple.com>
3878 Transition "WebKit Library Version" checks to SDK version checks.
3879 <rdar://problem/30313696> and https://bugs.webkit.org/show_bug.cgi?id=168056
3881 Reviewed by Geoffrey Garen.
3883 When doing linkedOnOrAfter checks, relying solely on the WebKit library version number is error prone,
3884 since apps may not link against WebKit directly and therefore the linked WebKit is unknown.
3886 We should first prefer a version check on the SDK that the app was built with.
3888 If that check fails, we can fallback to the linked WebKit library version number if it exists.
3890 * Shared/Cocoa/CompletionHandlerCallChecker.mm:
3891 (WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):
3893 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3894 (-[WKWebViewConfiguration init]):
3896 For each "linked-on-or-after" feature, include both the WebKit library version and SDK version:
3897 * UIProcess/Cocoa/VersionChecks.h:
3898 (WebKit::linkedOnOrAfter):
3899 * UIProcess/Cocoa/VersionChecks.mm:
3900 (WebKit::linkedOnOrAfter):
3901 (WebKit::linkTimeVersion): Deleted.
3903 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3904 (WebKit::WebProcessPool::isNetworkCacheEnabled):
3906 2017-02-09 Commit Queue <commit-queue@webkit.org>
3908 Unreviewed, rolling out r211980 and r211987.
3909 https://bugs.webkit.org/show_bug.cgi?id=168072
3911 Caused API test WebKit2.DuplicateCompletionHandlerCalls to
3912 fail (Requested by ryanhaddad on #webkit).
3914 Reverted changesets:
3916 "Transition "WebKit Library Version" checks to SDK version
3918 https://bugs.webkit.org/show_bug.cgi?id=168056
3919 http://trac.webkit.org/changeset/211980
3921 "Build fix for APPLE_INTERNAL_SDK builds after r211980."
3922 http://trac.webkit.org/changeset/211987
3924 2017-02-09 Brady Eidson <beidson@apple.com>
3926 Transition "WebKit Library Version" checks to SDK version checks.
3927 <rdar://problem/30313696> and https://bugs.webkit.org/show_bug.cgi?id=168056
3929 Reviewed by Geoffrey Garen.
3931 Library version linkedOnOrAfter checks are error prone since apps may not link directly to WebKit.
3933 We always know what version of the SDK an app was built with, so we should use SDK version checks
3936 * Shared/Cocoa/CompletionHandlerCallChecker.mm:
3937 (WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):
3939 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3940 (-[WKWebViewConfiguration init]):
3942 Add SDKVersion form of the linkedOnOrAfter check, and transition over the current Library Version checks:
3943 * UIProcess/Cocoa/VersionChecks.h:
3944 * UIProcess/Cocoa/VersionChecks.mm:
3945 (WebKit::linkedOnOrAfter):
3947 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3948 (WebKit::WebProcessPool::isNetworkCacheEnabled):
3950 2017-02-09 Antti Koivisto <antti@apple.com>
3952 Use all cacheable speculatively loaded responses
3953 https://bugs.webkit.org/show_bug.cgi?id=168052
3955 Reviewed by Andreas Kling.
3957 We currently only allow 200 responses. There is no reason not to use speculative responses
3958 that have other cacheable status codes. This is helpful for 204s and 404s.
3960 * NetworkProcess/cache/NetworkCache.cpp:
3961 (WebKit::NetworkCache::makeStoreDecision):
3962 (WebKit::NetworkCache::isStatusCodeCacheableByDefault): Deleted.
3963 (WebKit::NetworkCache::isStatusCodePotentiallyCacheable): Deleted.
3965 Move to CacheValidation.h/cpp
3967 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
3968 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
3970 Allow all cacheable-by-default responses.
3972 2017-02-09 Tomas Popela <tpopela@redhat.com>
3974 Unreviewed. Fix gtk-doc warning
3976 html/WebKitSettings.html:4435: warning: no link for: 'api-index-2.3' -> (2.3).
3978 * UIProcess/API/gtk/WebKitSettings.cpp:
3979 (webkit_settings_class_init):
3981 2017-02-09 Antti Koivisto <antti@apple.com>
3983 Remove most cases of #if ENABLE(CACHE_PARTITIONING)
3984 https://bugs.webkit.org/show_bug.cgi?id=167990
3986 Reviewed by Sam Weinig.
3988 * NetworkProcess/NetworkResourceLoader.cpp:
3989 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
3990 * NetworkProcess/cache/NetworkCache.cpp:
3991 (WebKit::NetworkCache::Cache::makeCacheKey):
3992 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
3993 (WebKit::NetworkCache::constructRevalidationRequest):
3994 * Shared/WebCoreArgumentCoders.cpp:
3995 (IPC::ArgumentCoder<ResourceRequest>::encode):
3996 (IPC::ArgumentCoder<ResourceRequest>::decode):
3997 * Shared/WebProcessCreationParameters.cpp:
3998 (WebKit::WebProcessCreationParameters::encode):
3999 (WebKit::WebProcessCreationParameters::decode):
4000 * Shared/WebProcessCreationParameters.h:
4001 * UIProcess/API/C/WKContext.cpp:
4002 (WKContextRegisterURLSchemeAsCachePartitioned):
4003 * UIProcess/WebProcessPool.cpp:
4004 (WebKit::m_hiddenPageThrottlingTimer):
4005 (WebKit::WebProcessPool::createNewWebProcess):
4006 (WebKit::WebProcessPool::registerURLSchemeAsCachePartitioned):
4007 * UIProcess/WebProcessPool.h:
4008 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
4009 (InitWebCoreSystemInterface):
4010 * WebProcess/WebProcess.cpp:
4011 (WebKit::WebProcess::initializeWebProcess):
4012 (WebKit::WebProcess::registerURLSchemeAsCachePartitioned):
4013 * WebProcess/WebProcess.h:
4014 * WebProcess/WebProcess.messages.in:
4016 2017-02-08 Simon Fraser <simon.fraser@apple.com>
4018 Put names on more UIViews for ease of debugging
4019 https://bugs.webkit.org/show_bug.cgi?id=168035
4021 Reviewed by Tim Horton.
4023 Put names on the various bare UIViews that we create.
4025 * UIProcess/API/Cocoa/WKWebView.mm:
4026 (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
4027 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
4028 * UIProcess/ios/ViewGestureControllerIOS.mm:
4029 (WebKit::ViewGestureController::beginSwipeGesture):
4030 * UIProcess/ios/WKContentView.mm:
4031 (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
4032 * UIProcess/ios/WKContentViewInteraction.mm:
4033 (-[WKContentView setupInteraction]):
4034 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
4035 (WebKit::WebInspectorClient::showPaintRect):
4036 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
4037 (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
4039 2017-02-08 Andy Estes <aestes@apple.com>
4041 Custom protocols should not continue loading after a network process crash
4042 https://bugs.webkit.org/show_bug.cgi?id=168028
4043 <rdar://problem/27607520>
4045 Reviewed by Brady Eidson.