1 2017-03-02 Brian Burg <bburg@apple.com>
3 Web Automation: _WKAutomationSessionDelegate should work with WKWebViews
4 https://bugs.webkit.org/show_bug.cgi?id=169091
5 <rdar://problem/30810538>
7 Reviewed by Tim Horton.
9 As a first step towards fixing the mistake of using WKPageRef in an Objective-C SPI,
10 add the correct delegate methods that take WKWebView so that Objective-C clients can
11 use this functionality.
13 In a future patch, we'll remove the WKPageRef delegate methods when they are no longer
14 being used by clients. Clients should switch to using WKWebView, or wait for a C SPI
15 with equivalent functionality (something like WKAutomationSessionClient) to be ported.
17 While I'm fixing this mess, make API::AutomationSessionClient use references instead
18 of pointers. We null-check all WebPageProxy parameters before calling its methods.
20 * UIProcess/API/APIAutomationSessionClient.h:
21 (API::AutomationSessionClient::didDisconnectFromRemote):
22 (API::AutomationSessionClient::didRequestNewWindow):
23 (API::AutomationSessionClient::isShowingJavaScriptDialogOnPage):
24 (API::AutomationSessionClient::dismissCurrentJavaScriptDialogOnPage):
25 (API::AutomationSessionClient::acceptCurrentJavaScriptDialogOnPage):
26 (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage):
27 (API::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage):
28 Change pointer to reference.
30 * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
31 Add duplicate delegate methods that take/return WKWebView instead of WKPageRef.
32 Adjust the delegate method names to reflect parameter type and avoid conflicts with the
33 WKPageRef-using methods that we need to remove eventually.
35 * UIProcess/Automation/WebAutomationSession.cpp:
36 (WebKit::WebAutomationSession::terminate):
37 (WebKit::WebAutomationSession::createBrowsingContext):
38 (WebKit::WebAutomationSession::isShowingJavaScriptDialog):
39 (WebKit::WebAutomationSession::dismissCurrentJavaScriptDialog):
40 (WebKit::WebAutomationSession::acceptCurrentJavaScriptDialog):
41 (WebKit::WebAutomationSession::messageOfCurrentJavaScriptDialog):
42 (WebKit::WebAutomationSession::setUserInputForCurrentJavaScriptPrompt):
43 Dereference `this` and `webPageProxy` when calling API::AutomationSessionClient methods.
45 * UIProcess/Cocoa/AutomationSessionClient.h:
46 * UIProcess/Cocoa/AutomationSessionClient.mm:
47 (WebKit::AutomationSessionClient::AutomationSessionClient):
48 (WebKit::AutomationSessionClient::didDisconnectFromRemote):
49 (WebKit::AutomationSessionClient::didRequestNewWindow):
50 (WebKit::AutomationSessionClient::isShowingJavaScriptDialogOnPage):
51 (WebKit::AutomationSessionClient::dismissCurrentJavaScriptDialogOnPage):
52 (WebKit::AutomationSessionClient::acceptCurrentJavaScriptDialogOnPage):
53 (WebKit::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage):
54 (WebKit::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage):
55 Now there are two possible delegate methods for most of these, so try to use the
56 WKWebView-based delegate method first and fall back to the WKPageRef delegate method.
58 2017-03-02 Alex Christensen <achristensen@webkit.org>
60 Continue enabling WebRTC
61 https://bugs.webkit.org/show_bug.cgi?id=169056
65 * Configurations/FeatureDefines.xcconfig:
67 2017-03-01 Megan Gardner <megan_gardner@apple.com>
69 Data interaction support for WK1
70 https://bugs.webkit.org/show_bug.cgi?id=169062
72 Reviewed by Wenson Hsieh.
74 Allow for separate additions files in WK1 and WK2
76 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
78 2017-03-02 Youenn Fablet <youenn@apple.com>
80 [WebRTC] Activate ICE candidate privacy policy
81 https://bugs.webkit.org/show_bug.cgi?id=168975
83 Reviewed by Alex Christensen.
85 Disabling network enumeration by default.
86 Enabling ICE candidate filtering by default.
87 Chaning ICE candidate filtering according userMediaAccess policy:
88 - If access is denied, filtering is on.
89 - If access is granted, filtering is off.
91 * Shared/WebPageCreationParameters.cpp:
92 (WebKit::WebPageCreationParameters::encode):
93 (WebKit::WebPageCreationParameters::decode):
94 * Shared/WebPageCreationParameters.h:
95 * Shared/WebPreferencesDefinitions.h:
96 * UIProcess/API/C/WKPreferences.cpp:
97 (WKPreferencesSetICECandidateFilteringEnabled):
98 (WKPreferencesGetICECandidateFilteringEnabled):
99 (WKPreferencesSetEnumeratingAllNetworkInterfacesEnabled):
100 (WKPreferencesGetEnumeratingAllNetworkInterfacesEnabled):
101 * UIProcess/API/C/WKPreferencesRefPrivate.h:
102 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
104 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
105 * UIProcess/UserMediaProcessManager.cpp:
106 (WebKit::UserMediaProcessManager::willCreateMediaStream):
107 (WebKit::UserMediaProcessManager::endedCaptureSession):
108 * UIProcess/WebPageProxy.cpp:
109 (WebKit::WebPageProxy::creationParameters):
110 * WebProcess/WebPage/WebPage.cpp:
112 2017-03-02 Tomas Popela <tpopela@redhat.com>
114 [WK2] Keyboard menu key should show context menu
115 https://bugs.webkit.org/show_bug.cgi?id=72099
117 Reviewed by Carlos Garcia Campos.
119 Show the context menu when the GtkWidget::popup-menu signal is
120 emitted. This signal is triggered by pressing a key (usually
121 the Menu key or the Shift + F10 shortcut) or it could be emitted on
124 * UIProcess/API/gtk/WebKitWebView.cpp:
125 (webkit_web_view_class_init):
126 (webkit_web_view_class_init): Update the documentation for the
128 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
129 (webkitWebViewBasePopupMenu): Connect to the popup-menu signal and
130 save the event that was used to trigger the signal. If there is no
131 such event create a new GdkEvent with GDK_NOTHING type.
132 (webkitWebViewBasePopupMenu):
133 (webkit_web_view_base_class_init):
134 * UIProcess/WebPageProxy.cpp:
135 (WebKit::WebPageProxy::handleContextMenuKeyEvent):
136 * UIProcess/WebPageProxy.h:
137 * WebProcess/WebPage/WebPage.cpp:
138 (WebKit::WebPage::contextMenuForKeyEvent):
139 * WebProcess/WebPage/WebPage.h:
140 * WebProcess/WebPage/WebPage.messages.in:
142 2017-03-01 Wenson Hsieh <wenson_hsieh@apple.com>
144 Replace -[WKWebView adjustedDataInteractionItemProviders:] with a UI delegate method
145 https://bugs.webkit.org/show_bug.cgi?id=169013
147 Reviewed by Dan Bernstein.
149 Rather than introduce new SPI on WKWebView directly, we should follow convention and add the hook to the private
150 version of the UI delegate.
152 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
153 * UIProcess/API/Cocoa/WKWebView.mm:
154 (-[WKWebView _adjustedDataInteractionItemProviders:]): Deleted.
155 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
157 2017-03-01 Alex Christensen <achristensen@webkit.org>
159 Unreviewed, rolling out r213259.
161 Broke an internal build
165 "Continue enabling WebRTC"
166 https://bugs.webkit.org/show_bug.cgi?id=169056
167 http://trac.webkit.org/changeset/213259
169 2017-03-01 Alex Christensen <achristensen@webkit.org>
171 Continue enabling WebRTC
172 https://bugs.webkit.org/show_bug.cgi?id=169056
176 * Configurations/FeatureDefines.xcconfig:
178 2017-03-01 Chris Dumez <cdumez@apple.com>
180 [WK2][!NETWORK_SESSION] Failure to download when using a download attribute with no value on an anchor
181 https://bugs.webkit.org/show_bug.cgi?id=169060
182 <rdar://problem/30773140>
184 Reviewed by Darin Adler.
186 In the !NETWORK_SESSION code path, we were failing to use the suggested filename coming from the
187 network layer in the case where the download attribute is present but has no value. We were ending
188 up passing an empty string as suggested filename to Safari which is not handled properly.
190 * UIProcess/Downloads/DownloadProxy.cpp:
191 (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
193 2017-02-28 Matt Rajca <mrajca@apple.com>
195 Media: notify clients when autoplayed media is muted
196 https://bugs.webkit.org/show_bug.cgi?id=168987
198 Reviewed by Alex Christensen.
200 * UIProcess/API/C/WKPageUIClient.h:
202 2017-03-01 Brady Eidson <beidson@apple.com>
204 Add SPI to create WebsiteDataStore objects pointing to custom paths.
205 https://bugs.webkit.org/show_bug.cgi?id=169044
207 Reviewed by Tim Horton.
209 * UIProcess/API/APIWebsiteDataStore.h:
211 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
212 (-[WKWebsiteDataStore _initWithConfiguration:]):
214 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
216 * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h.
217 * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h.
219 * UIProcess/WebsiteData/WebsiteDataStore.h:
221 * WebKit2.xcodeproj/project.pbxproj:
223 2017-03-01 Jon Lee <jonlee@apple.com>
225 Update peer connection preference
226 https://bugs.webkit.org/show_bug.cgi?id=169016
227 rdar://problem/30773889
229 Reviewed by Eric Carlson.
231 * Shared/WebPreferencesDefinitions.h:
232 * UIProcess/WebPreferences.cpp:
233 (WebKit::WebPreferences::setEnabledForFeature):
234 (WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): Deleted.
235 * UIProcess/WebPreferences.h:
237 2017-03-01 Tomas Popela <tpopela@redhat.com>
239 [GTK] Fix problems found by Coverity scan in WebPrintOperationGtk.cpp
240 https://bugs.webkit.org/show_bug.cgi?id=169027
242 Reviewed by Carlos Garcia Campos.
244 Initialize the lastPagePosition variable and remove an unused one
247 * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
248 (WebKit::PrintPagesData::PrintPagesData):
250 2017-03-01 Andreas Kling <akling@apple.com>
252 Move MemoryPressureHandler to WTF
253 <https://webkit.org/b/168908>
255 Reviewed by Sam Weinig.
257 * NetworkProcess/NetworkProcess.h:
258 * NetworkProcess/mac/NetworkProcessMac.mm:
259 * PluginProcess/PluginProcess.cpp:
260 * Shared/linux/WebMemorySamplerLinux.cpp:
261 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
262 * WebProcess/WebPage/ios/WebPageIOS.mm:
264 2017-03-01 Joseph Pecoraro <pecoraro@apple.com>
266 [WebRTC] Install libwebrtc.dylib inside of WebCore.framework
267 https://bugs.webkit.org/show_bug.cgi?id=168859
269 Reviewed by Dan Bernstein.
271 * Configurations/BaseTarget.xcconfig:
272 * Configurations/WebKit.xcconfig:
273 Set library search path to find the libwebrtc.dylib inside of WebCore's Frameworks
274 or in the WK_OVERRIDE_FRAMEWORKS_DIR.
276 2017-02-28 Carlos Garcia Campos <cgarcia@igalia.com>
278 NetworkProcess aborts in WebKit::NetworkLoad::didCompleteWithError at Source/WebKit2/NetworkProcess/NetworkLoad.cpp:423
279 https://bugs.webkit.org/show_bug.cgi?id=168963
281 Reviewed by Antti Koivisto.
283 This is trying to call SpeculativeLoad::didFailLoading() after SpeculativeLoad has already been
284 completed. SpeculativeLoad::didComplete() call its completion handler that removes the load from
285 m_pendingPreloads. When the completion handler returns the SpeculativeLoad is deleted. So, we should always
286 ensure that SpeculativeLoad is not used after didComplete() call. In SpeculativeLoad::willSendRedirectedRequest(),
287 the call to NetworkLoad::continueWillSendRequest() causes SpeculativeLoad::didFailLoading() to be called. We
288 don't really need to call continueWillSendRequest() though, since the network load is going to be deleted anyway
289 by didComplete(), and the willSendRequest completion handler does nothing when the request is null.
291 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
292 (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
294 2017-02-28 Alexey Proskuryakov <ap@apple.com>
296 https://bugs.webkit.org/show_bug.cgi?id=168899
297 Re-add deprecated functions to WKPageGroup.h
299 Reviewed by Tim Horton.
301 * Shared/API/c/WKDeprecatedFunctions.cpp:
302 (WKPageGroupRemoveUserContentFilter):
303 (WKPageGroupRemoveAllUserContentFilters): Deleted. Unlike the other three, this
304 function isn't used by any clients.
305 * UIProcess/API/C/WKPageGroup.h:
307 2017-02-28 Alexey Proskuryakov <ap@apple.com>
309 Expose _WKVisitedLinkProvider in a header
310 https://bugs.webkit.org/show_bug.cgi?id=168955
312 Reviewed by Tim Horton.
314 * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
315 * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
316 The class needs to be visible in a header, as it is exported SPI.
318 2017-02-28 Brady Eidson <beidson@apple.com>
320 Move resolving symlinks of some WebsiteDataStore paths from WebProcessPool to... WebsiteDataStore!.
321 https://bugs.webkit.org/show_bug.cgi?id=168696.
323 Reviewed by Alex Christensen.
325 * UIProcess/WebProcessPool.cpp:
326 (WebKit::WebProcessPool::createNewWebProcess):
328 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
329 (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
330 * UIProcess/WebsiteData/WebsiteDataStore.h:
331 (WebKit::WebsiteDataStore::resolvedApplicationCacheDirectory):
332 (WebKit::WebsiteDataStore::resolvedMediaCacheDirectory):
333 (WebKit::WebsiteDataStore::resolvedMediaKeysDirectory):
334 (WebKit::WebsiteDataStore::resolvedDatabaseDirectory):
336 2017-02-28 Alex Christensen <achristensen@webkit.org>
338 LibWebRTCProvider should check existence of libwebrtc.dylib
339 https://bugs.webkit.org/show_bug.cgi?id=168986
341 Reviewed by Youenn Fablet.
343 * Shared/WebPreferencesDefinitions.h:
344 * Shared/WebPreferencesStore.cpp:
345 * UIProcess/WebPreferences.cpp:
346 (WebKit::checkWebRTCAvailability): Deleted.
348 2017-02-28 Wenson Hsieh <wenson_hsieh@apple.com>
350 Unreviewed, build fix after r213176.
352 * Platform/spi/ios/UIKitSPI.h:
354 2017-02-28 Tim Horton <timothy_horton@apple.com>
356 [iOS] Getting QLPreviewProtocol slows down first navigation in Web process
357 https://bugs.webkit.org/show_bug.cgi?id=168940
358 <rdar://problem/29468999>
360 Reviewed by Simon Fraser.
362 * WebProcess/Network/WebLoaderStrategy.cpp:
363 (WebKit::WebLoaderStrategy::scheduleLoad):
364 Make use of isQuickLookPreviewURL.
366 2017-02-28 Brady Eidson <beidson@apple.com>
368 Fix API test regression(s):
369 REGRESSION (r213168): API test WKUserContentController.ScriptMessageHandlerMultipleHandlerRemoval crashing
370 https://bugs.webkit.org/show_bug.cgi?id=168991
374 * UIProcess/WebProcessPool.cpp:
375 (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
377 2017-02-28 Wenson Hsieh <wenson_hsieh@apple.com>
379 Data interaction should support attachment elements
380 https://bugs.webkit.org/show_bug.cgi?id=168916
381 <rdar://problem/30664519>
383 Reviewed by Ryosuke Niwa.
385 Teaches WKContentView to recognize attachment elements as data interactive content, and add an internal hook to
386 adjust the list of item providers before initiating data interaction.
388 * Platform/spi/ios/UIKitSPI.h:
389 * UIProcess/API/Cocoa/WKWebView.mm:
390 (-[WKWebView _adjustedDataInteractionItemProviders:]):
391 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
392 * UIProcess/ios/WKContentViewInteraction.mm:
393 (-[WKContentView pointIsInDataInteractionContent:]):
395 2017-02-28 Yongjun Zhang <yongjun_zhang@apple.com>
397 Add delegate method to handle images with alternate data.
398 https://bugs.webkit.org/show_bug.cgi?id=168785
399 <rdar://problem/28776219>
401 Add delegate methods to WKUIDelegatePrivate so that a WebKit client can provide alternate URL or data for an image
402 before long-press or preview. When an image has alternate URL or data, we can change the actions accordingly.
404 Reviewed by Enrica Casucci.
406 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add two delegate methods _webView:getAlternateURLFromImage:completionHandler:
407 and _webView:alternateURLFromImage:userInfo;
408 * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Add an readonly property userInfo so that alternate data can be
409 carried by _WKActivatedElementInfo and be processed by WebKit client.
410 * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
411 (-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:]):
412 (-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:userInfo:]): A new initializer that also takes userInfo.
413 (-[_WKActivatedElementInfo userInfo]):
414 * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: A new delegate method for WKActionSheetAssistantDelegate to fetch
415 alternate data before showing image sheet.
416 * UIProcess/ios/WKActionSheetAssistant.h:
417 * UIProcess/ios/WKActionSheetAssistant.mm:
418 (-[WKActionSheetAssistant showImageSheet]): Before showing the image sheet, if the image doesn't have linked URL (i.e. not a image
419 link), try to fetch its alternate URL and data.
420 (-[WKActionSheetAssistant defaultActionsForImageSheet:]): Drive-by fix. We always use positionInformation's URL to populate the
421 actions, however, we should use elementInfo's URL since the two URLs could mismatch.
422 * UIProcess/ios/WKContentViewInteraction.mm:
423 (-[WKContentView actionSheetAssistant:getAlternateURLForImage:completion:]):
424 (-[WKContentView _presentedViewControllerForPreviewItemController:]): Before previewing an image, synchronously get alternate
425 data for the image and update the actions accordingly.
427 2017-02-28 Brady Eidson <beidson@apple.com>
429 Refactor WebViewImpl creation in preparation for supporting multiple WebsiteDataStores.
430 https://bugs.webkit.org/show_bug.cgi?id=168676
432 Reviewed by Alex Christensen and Sam Weinig.
434 * UIProcess/WebProcessPool.cpp:
435 (WebKit::WebProcessPool::createNewWebProcess):
436 (WebKit::WebProcessPool::warmInitialProcess):
437 (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
438 (WebKit::WebProcessPool::createWebPage):
439 * UIProcess/WebProcessPool.h:
441 2017-02-28 Youenn Fablet <youenn@apple.com>
443 [WebRTC] Limit libwebrtc logging in Debug build
444 https://bugs.webkit.org/show_bug.cgi?id=168974
446 Reviewed by Alex Christensen.
448 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
449 (WebKit::NetworkRTCProvider::NetworkRTCProvider):
450 * Platform/Logging.h:
452 2017-02-28 Youenn Fablet <youenn@apple.com>
454 [WebRTC] NetworkRTCProvider should stop the network thread from the main thread
455 https://bugs.webkit.org/show_bug.cgi?id=168972
457 Reviewed by Alex Christensen.
459 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
460 (WebKit::NetworkRTCProvider::close): Ensuring to stop the network thread from the main thread when provider is
463 2017-02-24 Matt Rajca <mrajca@apple.com>
465 Media: notify clients when autoplayed media ends without being paused
466 https://bugs.webkit.org/show_bug.cgi?id=168852
468 Reviewed by Alex Christensen.
470 * UIProcess/API/C/WKPageUIClient.h:
472 2017-02-28 Csaba Osztrogonác <ossy@webkit.org>
474 Remove EFL leftover from WebPageProxy.messages.in
475 https://bugs.webkit.org/show_bug.cgi?id=168828
477 Reviewed by Gyuyoung Kim.
479 * UIProcess/WebPageProxy.messages.in:
481 2017-02-28 Alex Christensen <achristensen@webkit.org>
483 Main resource requests need cachePartition
484 https://bugs.webkit.org/show_bug.cgi?id=168806
486 Reviewed by Brady Eidson.
488 * NetworkProcess/NetworkResourceLoader.cpp:
489 (WebKit::NetworkResourceLoader::continueWillSendRequest):
491 2017-02-27 Alex Christensen <achristensen@webkit.org>
493 Begin enabling WebRTC on 64-bit
494 https://bugs.webkit.org/show_bug.cgi?id=168915
496 Reviewed by Eric Carlson.
498 * Configurations/FeatureDefines.xcconfig:
500 2017-02-27 Alexey Proskuryakov <ap@apple.com>
502 Remove _WKWebsiteDataRecord.h
503 https://bugs.webkit.org/show_bug.cgi?id=168954
505 Reviewed by Dan Bernstein.
507 This doesn't seem to have ever been used, so better to remove it than to add an
510 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h: Removed.
511 * WebKit2.xcodeproj/project.pbxproj:
513 2017-02-27 Alexey Proskuryakov <ap@apple.com>
515 WKPageIsPlayingVideoInEnhancedFullscreen availability mismatch
516 https://bugs.webkit.org/show_bug.cgi?id=168952
518 Reviewed by Dan Bernstein.
520 * UIProcess/API/C/mac/WKPagePrivateMac.h: TARGET_OS_MAC is not the right thing to
521 check, as it's true on both macOS and iOS.
523 2017-02-27 Alexey Proskuryakov <ap@apple.com>
525 Export WKPluginInformationBundleShortVersionKey
526 https://bugs.webkit.org/show_bug.cgi?id=168951
528 Reviewed by Dan Bernstein.
530 * Shared/API/c/WKPluginInformation.h: It was accidentally not exported when added.
532 2017-02-27 Youenn Fablet <youenn@apple.com>
534 [WebRTC] Add support for libwebrtc TCP incoming connections
535 https://bugs.webkit.org/show_bug.cgi?id=168748
537 Reviewed by Alex Christensen.
539 Covered by added layout tests.
541 When a libwebrtc server socket is signalling a new connnection through SignalNewConnection, we do:
542 - Wrap the incoming socket into a LibWebRTCSocketClient
543 - Store it into a pending socket map with an identifier
544 - Send a message to the web process of a new connection with the server socket identifier and new connection socket identifier.
545 The Web process then creates a WebRTCSocket wrapper around it by sendinig a WrapNewTCPConnection message.
546 It then propagates the SignalNewConnection to libwebrtc code path.
548 * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
549 (WebKit::LibWebRTCSocketClient::LibWebRTCSocketClient):
550 (WebKit::LibWebRTCSocketClient::signalReadPacket):
551 (WebKit::LibWebRTCSocketClient::signalSentPacket):
552 (WebKit::LibWebRTCSocketClient::signalNewConnection):
553 (WebKit::LibWebRTCSocketClient::signalAddressReady):
554 (WebKit::LibWebRTCSocketClient::signalConnect):
555 (WebKit::LibWebRTCSocketClient::signalClose):
556 * NetworkProcess/webrtc/LibWebRTCSocketClient.h:
557 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
558 (WebKit::NetworkRTCProvider::wrapNewTCPConnection):
559 (WebKit::NetworkRTCProvider::newConnection):
560 * NetworkProcess/webrtc/NetworkRTCProvider.h:
561 * NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
562 * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
563 (WebKit::LibWebRTCSocket::signalNewConnection):
564 * WebProcess/Network/webrtc/LibWebRTCSocket.h:
565 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
566 (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket):
567 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
568 * WebProcess/Network/webrtc/WebRTCSocket.cpp:
569 (WebKit::WebRTCSocket::signalNewConnection):
570 * WebProcess/Network/webrtc/WebRTCSocket.h:
571 * WebProcess/Network/webrtc/WebRTCSocket.messages.in:
573 2017-02-27 Brent Fulgham <bfulgham@apple.com>
575 [Mac] Don't use undefined sandbox rule on macOS 10.11 or earlier
576 https://bugs.webkit.org/show_bug.cgi?id=168942
577 <rdar://problem/30743376>
579 Reviewed by Ryosuke Niwa.
581 * WebProcess/com.apple.WebProcess.sb.in:
583 2017-02-27 Wenson Hsieh <wenson_hsieh@apple.com>
585 Unreviewed, roll out r213065.
587 * UIProcess/ios/WKContentViewInteraction.h:
589 2017-02-27 Alexey Proskuryakov <ap@apple.com>
591 Remove some deprecated WKPage plug-in information functions
592 https://bugs.webkit.org/show_bug.cgi?id=168897
594 Reviewed by Tim Horton.
596 * UIProcess/API/C/WKPage.cpp:
597 (WKPageGetProcessIdentifier):
598 (WKPageGetPluginInformationBundleIdentifierKey): Deleted.
599 (WKPageGetPluginInformationBundleVersionKey): Deleted.
600 (WKPageGetPluginInformationDisplayNameKey): Deleted.
601 (WKPageGetPluginInformationFrameURLKey): Deleted.
602 (WKPageGetPluginInformationMIMETypeKey): Deleted.
603 (WKPageGetPluginInformationPageURLKey): Deleted.
604 (WKPageGetPluginInformationPluginspageAttributeURLKey): Deleted.
605 (WKPageGetPluginInformationPluginURLKey): Deleted.
606 * UIProcess/API/C/WKPage.h:
608 2017-02-27 Alexey Proskuryakov <ap@apple.com>
610 Stop exporting C++ member variables from class extensions in WKDOMInternals.h
611 https://bugs.webkit.org/show_bug.cgi?id=168886
613 Reviewed by Tim Horton.
615 * WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: These are @package variables.
617 2017-02-27 Alex Christensen <achristensen@webkit.org>
619 Optimize checkWebRTCAvailability
620 https://bugs.webkit.org/show_bug.cgi?id=168913
622 Reviewed by Darin Adler.
624 We can optimize startup time by using RTLD_LAZY instead of RTLD_NOW because we don't need to load all the symbols.
625 We just need to check whether libwebrtc.dylib can be found and is a valid dylib for the current architecture.
626 Also, initialize a static bool so it only needs to be checked once. Right now it's only used when initializing settings,
627 but if we use it for other things in the future there will be no need to reopen the dylib.
629 * UIProcess/WebPreferences.cpp:
630 (WebKit::checkWebRTCAvailability):
632 2017-02-26 Wenson Hsieh <wenson_hsieh@apple.com>
634 Unreviewed, revert all temporary build fixes for data interaction
636 Rolls out r212990, r212988 and r212984.
638 * UIProcess/ios/WKContentViewInteraction.h:
640 2017-02-27 Carlos Garcia Campos <cgarcia@igalia.com>
642 [GTK] Rendering artifacts when resizing the window in X11 with AC mode enabled
643 https://bugs.webkit.org/show_bug.cgi?id=168728
645 Reviewed by Žan Doberšek.
647 This happens because the pixmap we create from the redirected window is uninitialized until the threaded
648 compositor renders into it. We should always initialize the pixmap right after it's created.
650 * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
651 (WebKit::defaultVisual): Helper static method to get the default GdkVisual.
652 (WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11): Use createPixmap().
653 (WebKit::AcceleratedSurfaceX11::createPixmap): Create and initialize the pixmap.
654 (WebKit::AcceleratedSurfaceX11::resize): Use createPixmap().
655 * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:
657 2017-02-27 Carlos Garcia Campos <cgarcia@igalia.com>
659 [GTK] Flickering when leaving accelerated compositing mode
660 https://bugs.webkit.org/show_bug.cgi?id=168911
662 Reviewed by Žan Doberšek.
664 It doesn't always happen, and it's too fast, more noticeable in websites with a dark background, because we are
665 drawing a single white frame. This happens when we leave AC mode during the layer flush that schedules an update
666 on the compositor, which at that point only clears the area and renders nothing. However,
667 CoordinatedGraphicsScene::paintToCurrentGLContext() always renders a white background when no web view color has
668 been set. And that's the white frame we get. We could prevent that last update from happening by checking if we
669 still have a graphics root layer after syncDisplayState() in the layer flush, the same way we check the layer
670 tree host is still valid.
672 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
673 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
674 (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
676 2017-02-27 Alex Christensen <achristensen@webkit.org>
678 [libwebrtc] Enable WebRTC in some Production Builds
679 https://bugs.webkit.org/show_bug.cgi?id=168858
681 * Configurations/FeatureDefines.xcconfig:
683 2017-02-27 Andy Estes <aestes@apple.com>
685 Links cannot be activated when running Mobile Safari with external SDK build of WebKit for iOS Simulator
686 https://bugs.webkit.org/show_bug.cgi?id=141906
688 Reviewed by Tim Horton.
690 Even if Touch Events are disabled, we still need to register a
691 UIWebTouchEventsGestureRecognizer to record the layer tree transaction ID when a touch
692 begins. Click events are only generated for touches that occur after the current frame's
693 load has committed, and we use the transaction ID from when the touch began to implement
696 * UIProcess/WebPageProxy.cpp:
697 (WebKit::WebPageProxy::handleTouchEventSynchronously):
698 (WebKit::WebPageProxy::resetState):
699 * UIProcess/WebPageProxy.h:
700 * UIProcess/ios/WKContentViewInteraction.h: Declared _layerTreeTransactionIdAtLastTouchStart.
701 * UIProcess/ios/WKContentViewInteraction.mm:
702 (-[WKContentView setupInteraction]): Register a UIWebTouchEventsGestureRecognizer even if
703 Touch Events are disabled.
704 (-[WKContentView cleanupInteraction]): Reset _layerTreeTransactionIdAtLastTouchStart to 0.
705 (-[WKContentView _webTouchEventsRecognized:]): Update _layerTreeTransactionIdAtLastTouchStart
706 when a touch begins, even if Touch Events are disabled.
707 (-[WKContentView _singleTapCommited:]): Passed _layerTreeTransactionIdAtLastTouchStart to
708 WebPageProxy::commitPotentialTap().
709 (-[WKContentView _attemptClickAtLocation:]): Ditto for WebPageProxy::handleTap().
710 * UIProcess/ios/WebPageProxyIOS.mm:
711 (WebKit::WebPageProxy::commitPotentialTap):
712 (WebKit::WebPageProxy::handleTap):
714 2017-02-26 Zan Dobersek <zdobersek@igalia.com>
716 [CoordinatedGraphics] Remove CoordinatedGraphicsScene::paintToGraphicsContext()
717 https://bugs.webkit.org/show_bug.cgi?id=168903
719 Reviewed by Carlos Garcia Campos.
721 Remove the CoordinatedGraphicsScene::paintToGraphicsContext() method as it
722 is not used anywhere. Also enables removing the GraphicsContext pointer
723 member from the TextureMapper class.
725 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
726 (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext): Deleted.
727 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
729 2017-02-26 Carlos Garcia Campos <cgarcia@igalia.com>
731 [GTK] Hangs when showing Google search results
732 https://bugs.webkit.org/show_bug.cgi?id=168699
734 Reviewed by Žan Doberšek.
736 Connection::sendOutgoingMessage() can poll forever if sendmsg fails with EAGAIN or EWOULDBLOCK. For example if
737 socket read buffers are full, poll will be blocked until we read the pending data, but we can't read because
738 the thread is blocked in the poll. In case of EAGAIN/EWOULDBLOCK we should poll using the run loop, to allow
739 reads to happen in thread while we wait for the socket to be writable again. In the GTK+ port we use
740 GSocketMonitor to poll socket file descriptor without blocking, using the run loop. This patch renames the
741 socket monitor as readSocketMonitor and adds another one for polling output. When sendmsg fails with
742 EAGAIN/EWOULDBLOCK, the pending message is saved and the write monitor starts polling. Once the socket is
743 writable again we send the pending message. Helper class MessageInfo and a new one UnixMessage have been moved
744 to its own header file to be able to use std::unique_ptr member to save the pending message.
746 * Platform/IPC/Connection.cpp: Include UnixMessage.h as required by std::unique_ptr.
747 * Platform/IPC/Connection.h: Add write socket monitor and also keep the GSocket as a member to reuse it.
748 * Platform/IPC/glib/GSocketMonitor.cpp: Use Function instead of std::function.
749 (IPC::GSocketMonitor::start):
750 * Platform/IPC/glib/GSocketMonitor.h:
751 * Platform/IPC/unix/ConnectionUnix.cpp:
752 (IPC::Connection::platformInitialize): Initialize the GSocket here since we rely on it to take the ownership of
753 the descriptor. We were leaking it if the connection was invalidated without being opened.
754 (IPC::Connection::platformInvalidate): Destroy the GSocket even when not connected. Also stop the write monitor.
755 (IPC::Connection::processMessage):
756 (IPC::Connection::open):
757 (IPC::Connection::platformCanSendOutgoingMessages): Return false if we have a pending message to ensure
758 Connection doesn't try to send more messages until the pending message is dispatched. We don't need to check
759 m_isConnected because the caller already checks that.
760 (IPC::Connection::sendOutgoingMessage): Split it in two. This creates and prepares a UnixMessage and then calls
761 sendOutputMessage() to do the rest.
762 (IPC::Connection::sendOutputMessage): Send the message, or save it if sendmsg fails with EAGAIN or EWOULDBLOCK
763 to be sent later when the socket is writable.
764 * Platform/IPC/unix/UnixMessage.h: Added.
765 (IPC::MessageInfo::MessageInfo):
766 (IPC::MessageInfo::setMessageBodyIsOutOfLine):
767 (IPC::MessageInfo::isMessageBodyIsOutOfLine):
768 (IPC::MessageInfo::bodySize):
769 (IPC::MessageInfo::attachmentCount):
770 (IPC::UnixMessage::UnixMessage):
771 (IPC::UnixMessage::~UnixMessage):
772 (IPC::UnixMessage::attachments):
773 (IPC::UnixMessage::messageInfo):
774 (IPC::UnixMessage::body):
775 (IPC::UnixMessage::bodySize):
776 (IPC::UnixMessage::appendAttachment):
779 2017-02-26 Devin Rousso <dcrousso+webkit@gmail.com>
781 Web Inspector: RTL: Docking Left doesn't constrain the page width
782 https://bugs.webkit.org/show_bug.cgi?id=168862
784 Reviewed by Brian Burg.
786 * UIProcess/mac/WebInspectorProxyMac.mm:
787 (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
788 Calculate the inspectedViewFrame to be the remaining space after WebInspector is opened
789 instead of using the original page size.
791 2017-02-26 Alexey Proskuryakov <ap@apple.com>
793 Stop exporting C++ member variables from WKDOMTextIterator
794 https://bugs.webkit.org/show_bug.cgi?id=168885
796 Reviewed by Dan Bernstein.
798 * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
800 2017-02-26 Alexey Proskuryakov <ap@apple.com>
802 Add preprocessor guards to Mac specific files that are exposed as private headers on iOS
803 https://bugs.webkit.org/show_bug.cgi?id=168878
805 Reviewed by Dan Bernstein.
807 * UIProcess/API/C/WKInspector.h:
808 * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h:
810 2017-02-26 Alexey Proskuryakov <ap@apple.com>
812 Remove spurious C++ include from _WKTestingDelegate.h
813 https://bugs.webkit.org/show_bug.cgi?id=168877
815 Reviewed by Dan Bernstein.
817 * UIProcess/API/Cocoa/_WKTestingDelegate.h:
819 2017-02-26 Alexey Proskuryakov <ap@apple.com>
821 Remove unimplemented WKResourceLoadStatisticsManagerSetReducedTimestampResolution
822 https://bugs.webkit.org/show_bug.cgi?id=168880
824 Reviewed by Dan Bernstein.
826 * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
828 2017-02-26 Alexey Proskuryakov <ap@apple.com>
830 Remove leftover WebKit2 C API function declarations
831 https://bugs.webkit.org/show_bug.cgi?id=168879
833 Reviewed by Tim Horton.
835 * UIProcess/API/C/WKPreferencesRefPrivate.h:
837 2017-02-26 Alexey Proskuryakov <ap@apple.com>
839 Remove some old WKSecurityOrigin binary compatibility stubs
840 https://bugs.webkit.org/show_bug.cgi?id=168881
842 Reviewed by Dan Bernstein.
844 * Shared/API/c/WKSecurityOriginRef.cpp:
845 (WKSecurityOriginGetHost): Deleted.
846 (WKSecurityOriginGetProtocol): Deleted.
848 2017-02-26 Wenson Hsieh <wenson_hsieh@apple.com>
850 REGRESSION (r211312): Double-clicking a word selects it along with the space that follows it
851 https://bugs.webkit.org/show_bug.cgi?id=168821
852 <rdar://problem/30690431>
854 Reviewed by Tim Horton.
856 Actually encode and decode smartInsertDeleteEnabled when sending WebPageCreationParameters over XPC.
858 * Shared/WebPageCreationParameters.cpp:
859 (WebKit::WebPageCreationParameters::encode):
860 (WebKit::WebPageCreationParameters::decode):
862 2017-02-26 Chris Dumez <cdumez@apple.com>
864 HitTestResult's linkSuggestedFilename should sanitize download attribute
865 https://bugs.webkit.org/show_bug.cgi?id=168856
866 <rdar://problem/30683109>
868 Reviewed by Antti Koivisto.
870 HitTestResult's linkSuggestedFilename should sanitize download attribute.
871 This is used by the context menu's "Download Linked File" & "Download Linked
874 * Shared/WebHitTestResultData.cpp:
875 (WebKit::WebHitTestResultData::WebHitTestResultData):
876 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
877 (WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):
879 2017-02-25 Michael Catanzaro <mcatanzaro@igalia.com>
881 [GTK] Unreviewed, document deficiency in webkit_website_data_manager_clear() API
883 Document that this function cannot currently delete cookie data for a particular period of
886 * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
888 2017-02-24 Joseph Pecoraro <pecoraro@apple.com>
890 [Resource Timing] Gather timing information with reliable responseEnd time
891 https://bugs.webkit.org/show_bug.cgi?id=168351
893 Reviewed by Alex Christensen.
895 Change from an unused `double finishTime` to a complete WebCore::NetworkLoadMetrics
896 object in the didFinishLoad ResourceLoader path. We may also extend this in the
897 didFail path later on. This allows the NetworkProcess to give complete timing
898 information, and more final metrics about the load, to WebCore.
900 * NetworkProcess/NetworkDataTask.h:
901 (WebKit::NetworkDataTaskClient::didCompleteWithError):
902 Give the NetworkDataTaskClient a basic didCompleteWithError for a completion
903 without metrics. For loads that complete with an error, or haven't populated
904 any metrics, this will pass empty metrics onward.
906 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
907 (WebKit::BlobDownloadClient::didFinishLoading):
908 * NetworkProcess/Downloads/BlobDownloadClient.h:
909 * NetworkProcess/Downloads/PendingDownload.h:
910 * NetworkProcess/PingLoad.h:
911 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
912 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
913 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
914 * NetworkProcess/NetworkDataTaskBlob.cpp:
915 (WebKit::NetworkDataTaskBlob::didFail):
916 * NetworkProcess/NetworkLoad.cpp:
917 (WebKit::NetworkLoad::continueWillSendRequest):
918 (WebKit::NetworkLoad::didCompleteWithError):
919 (WebKit::NetworkLoad::didFinishLoading):
920 * NetworkProcess/NetworkLoad.h:
921 * NetworkProcess/NetworkLoadClient.h:
922 * NetworkProcess/NetworkResourceLoader.cpp:
923 (WebKit::NetworkResourceLoader::didFinishLoading):
924 (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
925 * NetworkProcess/NetworkResourceLoader.h:
926 * WebProcess/Network/WebResourceLoader.cpp:
927 (WebKit::WebResourceLoader::didFinishResourceLoad):
928 (WebKit::WebResourceLoader::didReceiveResource):
929 * WebProcess/Network/WebResourceLoader.h:
930 * WebProcess/Network/WebResourceLoader.messages.in:
931 Change didFinishLoad paths to take a NetworkLoadMetrics object instead of finishTime.
932 Change didCompleteWithError pathes to include a NetworkLoadMetrics object instead of finishTime.
934 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
935 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
936 (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
937 Own a NetworkLoadTiming that will be populated with the load.
939 * NetworkProcess/cocoa/NetworkSessionCocoa.h:
940 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
941 (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
942 (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
943 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
944 Populate NetworkLoadMetrics in the didFinishCollectingMetrics NSURLSessionTaskDelegate method.
946 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
947 (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
948 (WebKit::NetworkDataTaskSoup::timeoutFired):
949 (WebKit::NetworkDataTaskSoup::didSendRequest):
950 (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
951 (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
952 (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
953 (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
954 (WebKit::NetworkDataTaskSoup::didFinishRead):
955 (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
956 (WebKit::NetworkDataTaskSoup::didFailDownload):
957 (WebKit::NetworkDataTaskSoup::didFail):
958 (WebKit::NetworkDataTaskSoup::networkEvent):
959 (WebKit::NetworkDataTaskSoup::didStartRequest):
960 (WebKit::NetworkDataTaskSoup::didRestart):
961 * NetworkProcess/soup/NetworkDataTaskSoup.h:
962 Instead of populating the NetworkLoadMetrics on the ResourceResponse, populate
963 a member variable during the entire load and dispatch didFinishCollectingMetrics
964 right before didCompleteLoadWithError.
966 2017-02-24 Chris Dumez <cdumez@apple.com>
968 Unreviewed, rolling out r212944.
970 Caused a lot of failures on the debug bots
974 "[Resource Timing] Gather timing information with reliable
976 https://bugs.webkit.org/show_bug.cgi?id=168351
977 http://trac.webkit.org/changeset/212944
979 2017-02-24 Wenson Hsieh <wenson_hsieh@apple.com>
981 Unreviewed, fix the internal build
983 * UIProcess/ios/WKContentViewInteraction.h:
985 2017-02-24 Matt Rajca <mrajca@apple.com>
987 Media: notify clients when autoplay is denied
988 https://bugs.webkit.org/show_bug.cgi?id=168840
990 Reviewed by Alex Christensen.
992 * UIProcess/API/APIUIClient.h:
993 (API::UIClient::handleAutoplayEvent):
994 (API::UIClient::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
995 * UIProcess/API/C/WKPage.cpp:
996 (WKPageSetPageUIClient):
997 * UIProcess/API/C/WKPageUIClient.h:
998 * UIProcess/WebPageProxy.cpp:
999 (WebKit::WebPageProxy::handleAutoplayEvent):
1000 (WebKit::WebPageProxy::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
1001 * UIProcess/WebPageProxy.h:
1002 * UIProcess/WebPageProxy.messages.in:
1003 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1004 (WebKit::WebChromeClient::handleAutoplayEvent):
1005 (WebKit::WebChromeClient::didPlayMediaPreventedFromPlayingWithoutUserGesture): Deleted.
1006 * WebProcess/WebCoreSupport/WebChromeClient.h:
1008 2017-02-20 Wenson Hsieh <wenson_hsieh@apple.com>
1010 Refactor data interaction to use new WKDataInteraction SPI
1011 https://bugs.webkit.org/show_bug.cgi?id=168602
1012 Work towards <rdar://problem/30313681>
1014 Reviewed by Tim Horton.
1016 Adjust testing SPI to match new data interaction interfaces.
1018 * Platform/spi/ios/UIKitSPI.h:
1019 * UIProcess/API/Cocoa/WKWebView.mm:
1020 (-[WKWebView _simulateDataInteractionEntered:]):
1021 (-[WKWebView _simulateDataInteractionUpdated:]):
1022 (-[WKWebView _simulateDataInteractionPerformOperation:]):
1023 (-[WKWebView _simulateDataInteractionEnded:]):
1024 (-[WKWebView _simulateDataInteractionSessionDidEnd:]):
1025 (-[WKWebView _simulateWillBeginDataInteractionWithSession:]):
1026 (-[WKWebView _simulatedItemsForSession:]):
1027 (-[WKWebView _simulatePrepareForDataInteractionSession:completion:]):
1028 (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]): Deleted.
1029 (-[WKWebView _simulateFailedDataInteractionWithIndex:]): Deleted.
1030 (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]): Deleted.
1031 (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]): Deleted.
1032 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1033 * UIProcess/ios/WKContentViewInteraction.h:
1034 * UIProcess/ios/WKContentViewInteraction.mm:
1035 (-[WKContentView _positionInformationDidChange:]):
1036 * UIProcess/ios/WKScrollView.h:
1037 * UIProcess/ios/WKScrollView.mm:
1039 2017-02-20 Wenson Hsieh <wenson_hsieh@apple.com>
1041 Remove the data interaction gesture recognizer
1042 https://bugs.webkit.org/show_bug.cgi?id=168600
1043 <rdar://problem/30313681>
1045 Reviewed by Anders Carlsson.
1047 The data interaction gesture recognizer will no longer be needed moving forward.
1049 * UIProcess/API/Cocoa/WKWebView.mm:
1050 (-[WKWebView _simulateDataInteractionGestureRecognized]): Deleted.
1051 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1052 * UIProcess/ios/WKContentViewInteraction.h:
1053 * UIProcess/ios/WKContentViewInteraction.mm:
1054 (-[WKContentView setupInteraction]):
1055 (-[WKContentView cleanupInteraction]):
1056 (-[WKContentView _removeDefaultGestureRecognizers]):
1057 (-[WKContentView _addDefaultGestureRecognizers]):
1058 (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
1059 (-[WKContentView gestureRecognizerShouldBegin:]):
1060 (-[WKContentView _dataInteractionGestureRecognizer]): Deleted.
1062 2017-02-24 Chris Dumez <cdumez@apple.com>
1064 [iOS][WK2] Disable network cache speculative revalidation / loading in low power mode
1065 https://bugs.webkit.org/show_bug.cgi?id=168832
1066 <rdar://problem/30697911>
1068 Reviewed by Antti Koivisto.
1070 Disable network cache speculative revalidation / loading in low power mode on iOS to
1073 * NetworkProcess/cache/NetworkCache.cpp:
1074 (WebKit::NetworkCache::Cache::initialize):
1075 * NetworkProcess/cache/NetworkCache.h:
1077 2017-02-24 John Wilander <wilander@apple.com>
1079 Resource Load Statistics: Add alternate classification method
1080 https://bugs.webkit.org/show_bug.cgi?id=168347
1081 <rdar://problem/30352793>
1082 <rdar://problem/30646710>
1083 <rdar://problem/30660708>
1085 Reviewed by Alex Christensen.
1087 This patch adds a CorePrediction-based classifier to the WebResourceLoadStatisticsStore.
1088 The CorePrediction framework is introduced as a dependency for macOS and iOS. The patch
1089 also adds functions to support layout tests of the feature.
1091 * Platform/Logging.h:
1092 Added channel ResourceLoadStatistics.
1093 * Platform/classifier/ResourceLoadStatisticsClassifier.h: Added.
1094 Pulls in the Cocoa-specific classifier for Cocoa-based platforms.
1095 (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
1096 * Platform/classifier/ResourceLoadStatisticsClassifierBase.cpp: Added.
1097 (WebKit::ResourceLoadStatisticsClassifierBase::hasPrevalentResourceCharacteristics):
1098 Shared classifier logic.
1099 (WebKit::ResourceLoadStatisticsClassifierBase::classifyWithVectorThreshold):
1100 Fallback classifier for when we don't have CorePrediction.
1101 * Platform/classifier/ResourceLoadStatisticsClassifierBase.h: Added.
1102 (WebKit::ResourceLoadStatisticsClassifierBase::ResourceLoadStatisticsClassifierBase):
1103 (WebKit::ResourceLoadStatisticsClassifierBase::~ResourceLoadStatisticsClassifierBase):
1104 * Platform/classifier/cocoa/CorePredictionSoftLink.h: Added.
1105 Soft links to CorePrediction and the two functions we use from it.
1106 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: Added.
1107 (WebKit::ResourceLoadStatisticsClassifier::classify):
1108 (WebKit::ResourceLoadStatisticsClassifier::storagePath):
1109 (WebKit::ResourceLoadStatisticsClassifier::shouldUseCorePredictionAndHaveModelLoaded):
1110 (WebKit::ResourceLoadStatisticsClassifier::singletonPredictionModel):
1111 The new classifier for Cocoa platforms.
1112 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h: Added.
1113 * PlatformGTK.cmake:
1114 Added Platform/classifier directory and ResourceLoadStatisticsClassifierBase.cpp.
1115 * PlatformMac.cmake:
1116 Added Platform/classifier and Platform/classifier/cocoa directories, and
1117 source files ResourceLoadStatisticsClassifierBase.cpp and
1118 ResourceLoadStatisticsClassifierCocoa.cpp
1119 * Resources/ResourceLoadStatistics/corePrediction_model: Added.
1120 Model file to load into CorePrediction.
1121 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
1122 (WKResourceLoadStatisticsManagerSetSubframeUnderTopFrameOrigin):
1123 (WKResourceLoadStatisticsManagerSetSubresourceUnderTopFrameOrigin):
1124 (WKResourceLoadStatisticsManagerSetSubresourceUniqueRedirectTo):
1125 Test infrastructure.
1126 * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
1127 * UIProcess/WebResourceLoadStatisticsManager.cpp:
1128 (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
1129 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
1130 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
1131 Test infrastructure.
1132 * UIProcess/WebResourceLoadStatisticsManager.h:
1133 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1134 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
1135 Renamed m_storagePath to m_statisticsStoragePath for clarity.
1136 (WebKit::WebResourceLoadStatisticsStore::classifyResource):
1137 Now calls the classifier through its ResourceLoadStatisticsClassifier
1139 (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
1140 Renamed m_storagePath to m_statisticsStoragePath for clarity.
1141 (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
1142 Renamed m_storagePath to m_statisticsStoragePath for clarity.
1143 (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics): Deleted.
1144 * UIProcess/WebResourceLoadStatisticsStore.h:
1145 * WebKit2.xcodeproj/project.pbxproj:
1146 Added the new classifier source files under Platform/classifier and the
1147 corePrediction_model file under Resources/ResourceLoadStatistics.
1149 2017-02-23 Joseph Pecoraro <pecoraro@apple.com>
1151 [Resource Timing] Add Experimental Feature Flag
1152 https://bugs.webkit.org/show_bug.cgi?id=167147
1154 Reviewed by Ryosuke Niwa.
1156 * Shared/WebPreferencesDefinitions.h:
1157 Move ResourceTiming to experimental section.
1158 Disable it for El Capitan due to known issues.
1160 2017-02-23 Joseph Pecoraro <pecoraro@apple.com>
1162 [Resource Timing] Gather timing information with reliable responseEnd time
1163 https://bugs.webkit.org/show_bug.cgi?id=168351
1165 Reviewed by Alex Christensen.
1167 Change from an unused `double finishTime` to a complete WebCore::NetworkLoadMetrics
1168 object in the didFinishLoad ResourceLoader path. We may also extend this in the
1169 didFail path later on. This allows the NetworkProcess to give complete timing
1170 information, and more final metrics about the load, to WebCore.
1172 * NetworkProcess/NetworkDataTask.h:
1173 (WebKit::NetworkDataTaskClient::didCompleteWithError):
1174 Give the NetworkDataTaskClient a basic didCompleteWithError for a completion
1175 without metrics. For loads that complete with an error, or haven't populated
1176 any metrics, this will pass empty metrics onward.
1178 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1179 (WebKit::BlobDownloadClient::didFinishLoading):
1180 * NetworkProcess/Downloads/BlobDownloadClient.h:
1181 * NetworkProcess/Downloads/PendingDownload.h:
1182 * NetworkProcess/PingLoad.h:
1183 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
1184 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
1185 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
1186 * NetworkProcess/NetworkDataTaskBlob.cpp:
1187 (WebKit::NetworkDataTaskBlob::didFail):
1188 * NetworkProcess/NetworkLoad.cpp:
1189 (WebKit::NetworkLoad::continueWillSendRequest):
1190 (WebKit::NetworkLoad::didCompleteWithError):
1191 (WebKit::NetworkLoad::didFinishLoading):
1192 * NetworkProcess/NetworkLoad.h:
1193 * NetworkProcess/NetworkLoadClient.h:
1194 * NetworkProcess/NetworkResourceLoader.cpp:
1195 (WebKit::NetworkResourceLoader::didFinishLoading):
1196 (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
1197 * NetworkProcess/NetworkResourceLoader.h:
1198 * WebProcess/Network/WebResourceLoader.cpp:
1199 (WebKit::WebResourceLoader::didFinishResourceLoad):
1200 (WebKit::WebResourceLoader::didReceiveResource):
1201 * WebProcess/Network/WebResourceLoader.h:
1202 * WebProcess/Network/WebResourceLoader.messages.in:
1203 Change didFinishLoad paths to take a NetworkLoadMetrics object instead of finishTime.
1204 Change didCompleteWithError pathes to include a NetworkLoadMetrics object instead of finishTime.
1206 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1207 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1208 (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
1209 Own a NetworkLoadTiming that will be populated with the load.
1211 * NetworkProcess/cocoa/NetworkSessionCocoa.h:
1212 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1213 (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
1214 (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
1215 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
1216 Populate NetworkLoadMetrics in the didFinishCollectingMetrics NSURLSessionTaskDelegate method.
1218 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1219 (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
1220 (WebKit::NetworkDataTaskSoup::timeoutFired):
1221 (WebKit::NetworkDataTaskSoup::didSendRequest):
1222 (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
1223 (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
1224 (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
1225 (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
1226 (WebKit::NetworkDataTaskSoup::didFinishRead):
1227 (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
1228 (WebKit::NetworkDataTaskSoup::didFailDownload):
1229 (WebKit::NetworkDataTaskSoup::didFail):
1230 (WebKit::NetworkDataTaskSoup::networkEvent):
1231 (WebKit::NetworkDataTaskSoup::didStartRequest):
1232 (WebKit::NetworkDataTaskSoup::didRestart):
1233 * NetworkProcess/soup/NetworkDataTaskSoup.h:
1234 Instead of populating the NetworkLoadMetrics on the ResourceResponse, populate
1235 a member variable during the entire load and dispatch didFinishCollectingMetrics
1236 right before didCompleteLoadWithError.
1238 2017-02-23 Beth Dakin <bdakin@apple.com> + Dan Saunders <dasau@microsoft.com>
1240 No reliable way to get a snapshot of WKWebView
1241 https://bugs.webkit.org/show_bug.cgi?id=161450
1243 <rdar://problem/23846039>
1245 Reviewed by Tim Horton.
1247 This patch adds a new API to WKWebView to snapshot a rect:
1248 takeSnapshotWithConfiguration:completionHandler:
1250 It also adds a new API object WKSnapshotConfiguration.
1252 * UIProcess/API/Cocoa/WKSnapshotConfiguration.h: Added.
1253 * UIProcess/API/Cocoa/WKSnapshotConfiguration.mm: Added.
1254 (-[WKSnapshotConfiguration copyWithZone:]):
1255 * UIProcess/API/Cocoa/WKWebView.h:
1256 * UIProcess/API/Cocoa/WKWebView.mm:
1257 (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
1258 * WebKit2.xcodeproj/project.pbxproj:
1260 2017-02-23 Jer Noble <jer.noble@apple.com>
1262 ASSERT in RTCNetwork::IPAddress::decode()
1263 https://bugs.webkit.org/show_bug.cgi?id=168792
1265 Reviewed by Tim Horton.
1267 An ASSERT added to RTCNetwork::IPAddress::decode in r212781 was hit due to a bad encode of SocketAddress; an
1268 extra boolean value was added to the encoder unnecessarily, leading to garbage data being decoded in the following
1271 Drive-by-fix: allow the IPAddress encoder/decoder to pass through a value of AF_UNSPEC for an IPAddress to support
1272 passing through an "empty" IPAddress value.
1274 * Shared/RTCNetwork.cpp:
1275 (WebKit::RTCNetwork::IPAddress::decode):
1276 (WebKit::RTCNetwork::IPAddress::encode):
1277 (WebKit::RTCNetwork::SocketAddress::encode):
1279 2017-02-23 Eric Carlson <eric.carlson@apple.com>
1281 [WebRTC][Mac][WebKit2] WebRTC requires media capture
1282 https://bugs.webkit.org/show_bug.cgi?id=168782
1283 <rdar://problem/30675242>
1285 Reviewed by Youenn Fablet.
1287 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1288 (WebKit::WebProcessPool::platformInitializeWebProcess): Extend the sanbox to allow microphone access
1289 if media stream OR WebRTC is enabled.
1291 2017-02-23 Brent Fulgham <bfulgham@apple.com>
1293 [Mac] Remove unneeded sandbox exceptions for media elements
1294 https://bugs.webkit.org/show_bug.cgi?id=168767
1296 Reviewed by Alex Christensen.
1298 Remove several sandbox exceptions that have not been needed for the past four
1299 or five macOS releases.
1301 * WebProcess/com.apple.WebProcess.sb.in:
1303 2017-02-23 Brent Fulgham <bfulgham@apple.com>
1305 [Mac] Remove com.apple.audio.VDCAssistant from sandboxes
1306 https://bugs.webkit.org/show_bug.cgi?id=168764
1307 <rdar://problem/16736919>
1309 Reviewed by Alex Christensen.
1311 Remove unneeded sandbox class.
1313 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1314 * WebProcess/com.apple.WebProcess.sb.in:
1316 2017-02-22 Wenson Hsieh <wenson_hsieh@apple.com>
1318 Data interaction causes selection to fall out of sync between web/UI processes
1319 https://bugs.webkit.org/show_bug.cgi?id=168735
1320 <rdar://problem/30657817>
1322 Reviewed by Tim Horton.
1324 Fixes a bug with data interaction causing selection state to fall out of sync between the UI and web processes,
1325 and also introduces testing infrastructure and tests for grabbing UI-side selection view rects in TestWebKitAPI.
1326 While performing a data interaction operation, we now lift restrictions for assisting the focused node.
1328 * UIProcess/ios/WKContentViewInteraction.h:
1329 * UIProcess/ios/WKContentViewInteraction.mm:
1330 (-[WKContentView cleanupInteraction]):
1331 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
1333 2017-02-23 Carlos Garcia Campos <cgarcia@igalia.com>
1335 [GTK] Crash attempting to load Flash plugin in Wayland
1336 https://bugs.webkit.org/show_bug.cgi?id=163159
1338 Reviewed by Michael Catanzaro.
1340 The problem is that we check if the current diplay is X11 or Wayland also in the plugin process, but with GTK2
1341 plugins the display is always X11. We should early reject plugins requiring GTK2 in the UI process when the
1342 current display is Wayland.
1344 * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
1345 (WebKit::PluginInfoStore::getPluginInfo):
1346 * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1347 (WebKit::PluginProcessProxy::scanPlugin):
1348 * UIProcess/gtk/WebPageProxyGtk.cpp:
1349 (WebKit::WebPageProxy::createPluginContainer): Add an assert to ensure this message is never received on a
1351 * WebProcess/Plugins/PluginView.cpp:
1352 (WebKit::PluginView::createPluginContainer): Never send CreatePluginContainer message to the UI process if the
1355 2017-02-23 Eric Carlson <eric.carlson@apple.com>
1357 [MediaStream iOS] Allow web process sandbox to be extended for media capture
1358 https://bugs.webkit.org/show_bug.cgi?id=168756
1360 Reviewed by Brent Fulgham.
1362 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add rules to dynamically
1363 extend the sandbox to allow access to the camera and/or microphone.
1365 2017-02-23 Tomas Popela <tpopela@redhat.com>
1367 [GTK] Drag and drop is always moving the content even if copy is requested
1368 https://bugs.webkit.org/show_bug.cgi?id=168424
1370 Reviewed by Carlos Garcia Campos.
1372 Drag and drop is always moving the content around even if the copy is
1373 requested (i.e. by pressing the Control key).
1375 * UIProcess/gtk/DragAndDropHandler.cpp:
1376 (WebKit::DragAndDropHandler::drop):
1378 2017-02-22 Carlos Garcia Campos <cgarcia@igalia.com>
1380 Better handle Thread and RunLoop initialization
1381 https://bugs.webkit.org/show_bug.cgi?id=167828
1383 Reviewed by Yusuke Suzuki.
1385 Remove unnecessary call to WTF::initializeMainThread().
1387 * Shared/WebKit2Initialize.cpp:
1388 (WebKit::InitializeWebKit2):
1390 2017-02-22 Chris Dumez <cdumez@apple.com>
1392 Unreviewed, drop console logging landed by mistake as part of r212832.
1394 * UIProcess/BackgroundProcessResponsivenessTimer.cpp:
1395 (WebKit::BackgroundProcessResponsivenessTimer::timerFired):
1397 2017-02-22 Brent Fulgham <bfulgham@apple.com>
1399 [Mac] Tighten sandbox to deny process-info* access
1400 https://bugs.webkit.org/show_bug.cgi?id=168704
1401 <rdar://problem/16371441>
1403 Reviewed by Alex Christensen.
1405 Tighten the various WebKit sandboxes by denying access to process-info.
1406 Add back specific features needed to run WebKit tests and to do browsing
1407 of websites (including plugins).
1409 * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
1410 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1411 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1412 * WebProcess/com.apple.WebProcess.sb.in:
1414 2017-02-22 Anders Carlsson <andersca@apple.com>
1416 Crash if there's a mismatch between the WebKit used by the UI process and child processes respectively
1417 https://bugs.webkit.org/show_bug.cgi?id=168739
1418 Part of rdar://problem/30631411.
1420 Reviewed by Geoffrey Garen.
1422 If the UI process and web process for some reason end up using different versions of the WebKit framework, weird things happen
1423 because the message format is different between versions. To avoid this, send along the WebKit bundle version from the UI process
1424 in the XPC bootstrap message, check that it matches inside the XPC main functions. If there's a mismatch, crash.
1426 * Shared/Cocoa/ChildProcessCocoa.mm:
1427 (WebKit::ChildProcess::didReceiveInvalidMessage):
1430 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1432 Check for the bundle version and crash if it's not what we expect.
1434 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1435 (WebKit::ProcessLauncher::launchProcess):
1436 Initialize the bundle version.
1438 * WebProcess/cocoa/WebProcessCocoa.mm:
1439 (WebKit::_WKSetCrashReportApplicationSpecificInformation):
1440 Export this so we can call it from the XPC services without having to link WKSI.
1442 2017-02-22 Chris Dumez <cdumez@apple.com>
1444 [WK2] Call processDidBecomeUnresponsive delegate when a background process is unresponsive
1445 https://bugs.webkit.org/show_bug.cgi?id=168683
1446 <rdar://problem/30558745>
1448 Reviewed by Dan Bernstein.
1450 Call processDidBecomeUnresponsive delegate when a background process is unresponsive
1451 instead of killing it on WebKit side. This gives the client the choice about what it
1452 wants to do about this process.
1454 * UIProcess/API/APIProcessPoolConfiguration.cpp:
1455 (API::ProcessPoolConfiguration::copy):
1456 * UIProcess/API/APIProcessPoolConfiguration.h:
1457 * UIProcess/API/C/WKContext.cpp:
1458 * UIProcess/API/C/WKContextPrivate.h:
1459 * UIProcess/BackgroundProcessResponsivenessTimer.cpp: Renamed from Source/WebKit2/UIProcess/UnresponsiveWebProcessTerminator.cpp.
1460 (WebKit::BackgroundProcessResponsivenessTimer::BackgroundProcessResponsivenessTimer):
1461 (WebKit::BackgroundProcessResponsivenessTimer::updateState):
1462 (WebKit::BackgroundProcessResponsivenessTimer::timerFired):
1463 * UIProcess/BackgroundProcessResponsivenessTimer.h: Renamed from Source/WebKit2/UIProcess/UnresponsiveWebProcessTerminator.h.
1464 * UIProcess/WebPageProxy.cpp:
1465 (WebKit::WebPageProxy::reattachToWebProcess):
1466 (WebKit::WebPageProxy::dispatchActivityStateChange):
1467 (WebKit::WebPageProxy::terminateProcess):
1468 * UIProcess/WebPageProxy.h:
1469 * UIProcess/WebProcessProxy.cpp:
1470 (WebKit::m_backgroundResponsivenessTimer):
1471 * UIProcess/WebProcessProxy.h:
1472 * WebKit2.xcodeproj/project.pbxproj:
1474 2017-02-22 Carlos Garcia Campos <cgarcia@igalia.com>
1476 NetworkProcess: Stop disabling buffering when NETWORK_CACHE is disabled in build
1477 https://bugs.webkit.org/show_bug.cgi?id=168637
1479 Reviewed by Alex Christensen.
1481 It was added in r193752 as part of bug #137692 to fix an infinite loop in network process that happened in EFL
1482 because they didn't enable the network cache at that time. I think that was actually a workaround, and it was
1483 added without any comment so it has stayed there even when EFL enabled disk cache, and now that is gone. Looking
1484 at current code I see no reason why buffering can't work with the disk cache disabled, so I think it's time to
1485 remove that workaround.
1487 * WebProcess/Network/WebLoaderStrategy.cpp:
1488 (WebKit::maximumBufferingTime):
1490 2017-02-21 Youenn Fablet <youenn@apple.com>
1492 [WebRTC][Mac] Activate libwebrtc
1493 https://bugs.webkit.org/show_bug.cgi?id=167293
1494 <rdar://problem/30401864>
1496 Reviewed by Alex Christensen.
1498 Activating PeerConnection runtime flag based on successful loading of libwebrtc.dylib.
1500 * Configurations/WebKit.xcconfig:
1501 * Configurations/FeatureDefines.xcconfig:
1502 * Shared/WebPreferencesDefinitions.h:
1503 * UIProcess/WebPreferences.cpp:
1504 (WebKit::checkWebRTCAvailability):
1506 2017-02-21 Commit Queue <commit-queue@webkit.org>
1508 Unreviewed, rolling out r212786.
1509 https://bugs.webkit.org/show_bug.cgi?id=168710
1511 It broke GTK+ port when using single shared process model
1512 (Requested by KaL on #webkit).
1516 "Refactor WebViewImpl creation in preparation for supporting
1517 multiple WebsiteDataStores."
1518 https://bugs.webkit.org/show_bug.cgi?id=168676
1519 http://trac.webkit.org/changeset/212786
1521 2017-02-21 Brady Eidson <beidson@apple.com>
1523 Refactor WebViewImpl creation in preparation for supporting multiple WebsiteDataStores.
1524 https://bugs.webkit.org/show_bug.cgi?id=168676
1526 Reviewed by Alex Christensen.
1528 * UIProcess/API/Cocoa/WKWebView.mm:
1529 (-[WKWebView _initializeWithConfiguration:]): Allow for WebViewImpl creation to fail.
1531 * UIProcess/API/mac/WKView.mm:
1532 (-[WKView initWithFrame:processPool:configuration:]): Ditto.
1534 * UIProcess/Cocoa/WebViewImpl.h:
1535 * UIProcess/Cocoa/WebViewImpl.mm:
1536 (WebKit::WebViewImpl::maybeCreate):
1537 (WebKit::WebViewImpl::WebViewImpl):
1539 * UIProcess/WebPageProxy.cpp:
1540 (WebKit::WebPageProxy::reattachToWebProcess): New WebProcess creation might fail. Handle it.
1541 * UIProcess/WebProcessPool.cpp:
1542 (WebKit::WebProcessPool::createNewWebProcess):
1543 (WebKit::WebProcessPool::warmInitialProcess):
1544 (WebKit::WebProcessPool::maybeCreateNewWebProcessRespectingProcessCountLimit): This can now fail
1545 if the process will have a non-default WebsiteDataStore but we've already reached the process cap.
1546 (WebKit::WebProcessPool::createWebPage):
1547 (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit): Deleted.
1548 * UIProcess/WebProcessPool.h:
1550 2017-02-21 Youenn Fablet <youenn@apple.com>
1552 [WebRTC] WebKit2 should assert that libwebrtc transmitted IP addresses family is IP4 or IP6
1553 https://bugs.webkit.org/show_bug.cgi?id=168691
1555 Reviewed by Alex Christensen.
1557 Adding some asserts that family is IPv4 or IPv6.
1559 * Shared/RTCNetwork.cpp:
1560 (WebKit::RTCNetwork::IPAddress::decode):
1561 (WebKit::RTCNetwork::IPAddress::encode):
1563 2017-02-20 Simon Fraser <simon.fraser@apple.com>
1565 Add support to PlatformCALayer/GraphicsLayerCA for subpixel-antialiased text, with a Setting and a MiniBrowser switch
1566 https://bugs.webkit.org/show_bug.cgi?id=168620
1567 <rdar://problem/30617772>
1569 Reviewed by Tim Horton.
1571 Add a Setting for subpixel-antialiased layer text. Plumb this through GraphicsLayerCA and
1572 PlatformCALayer, where it ultimately affects the layer contents format.
1574 This is not supported with UI-side compositing.
1576 * Shared/WebPreferencesDefinitions.h:
1577 * UIProcess/API/C/WKPreferences.cpp:
1578 (WKPreferencesSetSubpixelAntialiasedLayerTextEnabled):
1579 (WKPreferencesGetSubpixelAntialiasedLayerTextEnabled):
1580 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1581 * UIProcess/API/Cocoa/WKPreferences.mm:
1582 (-[WKPreferences _subpixelAntialiasedLayerTextEnabled]):
1583 (-[WKPreferences _setSubpixelAntialiasedLayerTextEnabled:]):
1584 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1585 * WebProcess/WebPage/WebPage.cpp:
1586 (WebKit::WebPage::updatePreferences):
1587 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1588 (WebKit::PlatformCALayerRemote::supportsSubpixelAntialiasedText):
1589 (WebKit::PlatformCALayerRemote::setSupportsSubpixelAntialiasedText):
1590 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1591 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
1592 (WebKit::PlatformCALayerRemoteTiledBacking::supportsSubpixelAntialiasedText):
1593 (WebKit::PlatformCALayerRemoteTiledBacking::setSupportsSubpixelAntialiasedText):
1594 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
1596 2017-02-21 John Wilander <wilander@apple.com>
1598 Resource Load Statistics: Only scan website data store once per session ID + reinstate removal counting
1599 https://bugs.webkit.org/show_bug.cgi?id=168541
1601 Reviewed by Alex Christensen.
1603 * UIProcess/WebProcessProxy.cpp:
1604 (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyOwnedDomainsInAllPersistentDataStores):
1605 The CallbackAggregator now merges a list of domains for which we
1606 have removed data records and eventually reports this back to the
1608 * UIProcess/WebProcessProxy.h:
1609 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1610 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
1611 Now reports back to its WebCore::ResourceLoadStatisticsStore
1612 which domains have had data records removed.
1613 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1614 (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyOwnedDomains):
1615 The completion handler now handles data record removal counting.
1616 (WebKit::WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains):
1617 The completion handler now handles data record removal counting.
1618 * UIProcess/WebsiteData/WebsiteDataStore.h:
1620 2017-02-21 Alex Christensen <achristensen@webkit.org>
1624 * PlatformMac.cmake:
1626 2017-02-21 Youenn Fablet <youenn@apple.com>
1628 [WebRTC][Mac] Network process sandbox does not allow WebRTC networking
1629 https://bugs.webkit.org/show_bug.cgi?id=168594
1631 Reviewed by Brent Fulgham.
1633 UIProcess was passing a boolean to know whether WebRTC networking is allowed or not to the network process.
1634 This boolean was known to late for the sandbox to be relaxed.
1635 A sandbox extension is now used instead to relax the sandbox.
1637 * NetworkProcess/NetworkProcess.h:
1638 * NetworkProcess/NetworkProcessCreationParameters.cpp:
1639 (WebKit::NetworkProcessCreationParameters::encode):
1640 (WebKit::NetworkProcessCreationParameters::decode):
1641 * NetworkProcess/NetworkProcessCreationParameters.h:
1642 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1643 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1644 * NetworkProcess/mac/NetworkProcessMac.mm:
1645 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1646 (WebKit::NetworkProcess::initializeSandbox):
1647 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1648 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1649 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1651 2017-02-21 Youenn Fablet <youenn@apple.com>
1653 [WebRTC] ICE candidates should be filtered according a policy
1654 https://bugs.webkit.org/show_bug.cgi?id=168348
1656 Reviewed by Alex Christensen.
1658 Adding the possibility for the UI process to control the ICE candidate filtering and whether libwebrtc can
1659 enumerate all interfaces or not.
1661 Disabling ICE candidate filtering for the moment.
1662 Enabling to enumerate all interfaces for the moment.
1664 In the future, ICE candidate filtering should be tied to getUserMedia.
1665 Interface enumeration should be disabled with the default configuration.
1666 We should do that once we have sufficient testing in various network infrastructures.
1668 * UIProcess/WebPageProxy.cpp:
1669 (WebKit::WebPageProxy::initializeWebPage):
1670 * WebKit2.xcodeproj/project.pbxproj:
1671 * WebProcess/WebPage/WebPage.h:
1672 (WebKit::WebPage::disableICECandidateFiltering):
1673 (WebKit::WebPage::enableICECandidateFiltering):
1674 (WebKit::WebPage::disableEnumeratingAllNetworkInterfaces):
1675 (WebKit::WebPage::enableEnumeratingAllNetworkInterfaces):
1676 * WebProcess/WebPage/WebPage.messages.in:
1678 2017-02-21 Youenn Fablet <youenn@apple.com>
1680 [WebRTC] NetworkRTCMonitor should ensure clearing its manager only once
1681 https://bugs.webkit.org/show_bug.cgi?id=168661
1683 Reviewed by Alex Christensen.
1685 Making sure NetworkRTCMonitor manager is cleared only once.
1686 ALso ensuring that manager does not get destroyed as part of NetworkRTCMonitor destructor.
1687 The manager needs to be destroyed in the RTC network thread.
1689 * NetworkProcess/webrtc/NetworkRTCMonitor.cpp:
1690 (WebKit::NetworkRTCMonitor::~NetworkRTCMonitor):
1691 (WebKit::NetworkRTCMonitor::stopUpdating):
1692 * NetworkProcess/webrtc/NetworkRTCMonitor.h:
1694 2017-02-21 Brent Fulgham <bfulgham@apple.com>
1696 [WebRTC][Mac][WebKit2] Revise sandbox to limit connections to UDP and TCP
1697 https://bugs.webkit.org/show_bug.cgi?id=168664
1698 <rdar://problem/30600587>
1700 Reviewed by Youenn Fablet.
1702 Add filters to the WebRTC rule to limit network traffic to UDP and TCP.
1704 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1706 2017-02-21 Maureen Daum <mdaum@apple.com>
1708 Check what LocalStorage data exists in deleteDatabasesModifiedSince() before attempting deletion.
1709 https://bugs.webkit.org/show_bug.cgi?id=168659
1710 rdar://problem/22781730
1712 Reviewed by Brady Eidson.
1714 Check what LocalStorage data exists in deleteDatabasesModifiedSince() before attempting deletion.
1715 It is possible that another process has caused information to be added to LocalStorage
1716 after we created this LocalStorageDatabaseTracker instance, so we should update our
1717 internal state by checking the contents of StorageTracker.db and the other local
1718 storage files so we know what databases actually exist. By calling importOriginIdentifiers()
1719 at the start of deleteDatabasesModifiedSince(), m_origins will now have the up-to-date
1720 list of origins LocalStorage contains data for.
1722 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1723 (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
1725 2017-02-21 Carlos Garcia Campos <cgarcia@igalia.com>
1727 Reduce platform ifdefs in WebKit2 custom protocols implementation
1728 https://bugs.webkit.org/show_bug.cgi?id=165028
1730 Reviewed by Darin Adler.
1732 Make mac implementation use the APICustomProtocolManagerClient to share more code with the soup based ports.
1734 * CMakeLists.txt: Add CustomProtocolManagerProxy.cpp.
1735 * PlatformEfl.cmake: Remove CustomProtocolManagerProxySoup.cpp.
1736 * PlatformGTK.cmake: Ditto.
1737 * PlatformMac.cmake: Remove CustomProtocolManagerProxyMac.mm.
1738 * UIProcess/API/APICustomProtocolManagerClient.h:
1739 (API::CustomProtocolManagerClient::startLoading): Make it void, since we were always returning true and the
1740 returned value was ignored.
1741 * UIProcess/API/efl/ewk_url_scheme_request.cpp:
1742 (EwkUrlSchemeRequest::finish): Update to new CustomProtocolManagerProxy API.
1743 * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
1744 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1745 (webkitURISchemeRequestReadCallback): Ditto.
1746 * UIProcess/Cocoa/CustomProtocolManagerClient.h: Added.
1747 * UIProcess/Cocoa/CustomProtocolManagerClient.mm: Added.
1748 (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:]):
1749 (-[WKCustomProtocolLoader dealloc]):
1750 (-[WKCustomProtocolLoader connection:didFailWithError:]):
1751 (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
1752 (-[WKCustomProtocolLoader connection:didReceiveData:]):
1753 (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
1754 (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
1755 (WebKit::CustomProtocolManagerClient::startLoading):
1756 (WebKit::CustomProtocolManagerClient::stopLoading):
1757 (WebKit::CustomProtocolManagerClient::invalidate):
1758 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1759 (WebKit::WebProcessPool::platformInitialize): Set the CustomProtocolManagerClient.
1760 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
1761 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Added.
1762 (WebKit::CustomProtocolManagerProxy::startLoading):
1763 (WebKit::CustomProtocolManagerProxy::processDidClose):
1764 (WebKit::CustomProtocolManagerProxy::wasRedirectedToRequest):
1765 (WebKit::CustomProtocolManagerProxy::didReceiveResponse):
1766 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1767 * UIProcess/WebProcessPool.cpp:
1768 (WebKit::globalURLSchemesWithCustomProtocolHandlers): Just moved here to use it from ensureNetworkProcess().
1769 (WebKit::WebProcessPool::WebProcessPool): Remove soup ifdefs.
1770 (WebKit::WebProcessPool::setCustomProtocolManagerClient): Moved from the soup implementation.
1771 (WebKit::WebProcessPool::ensureNetworkProcess): Initialize custom protocols parameters.
1772 (WebKit::WebProcessPool::registerSchemeForCustomProtocol): Register the protocol if not already registered globally.
1773 (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): Remove soup ifdefs.
1774 * UIProcess/WebProcessPool.h: Remove soup ifdefs.
1775 * UIProcess/efl/RequestManagerClientEfl.cpp:
1776 * UIProcess/soup/WebProcessPoolSoup.cpp:
1777 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
1778 * WebKit2.xcodeproj/project.pbxproj:
1780 2017-02-21 Daewoong Jang <daewoong.jang@navercorp.com>
1782 Remove unused files.
1783 https://bugs.webkit.org/show_bug.cgi?id=168656.
1785 Reviewed by Csaba Osztrogonác.
1787 Remove files which became unused after removal of EFL port.
1789 * UIProcess/CoordinatedGraphics/PageViewportController.cpp: Removed.
1790 * UIProcess/CoordinatedGraphics/PageViewportController.h: Removed.
1791 * UIProcess/PageViewportControllerClient.h: Removed.
1793 2017-02-21 Youenn Fablet <youenn@apple.com>
1795 [WebRTC] LibWebRTCSocket::SendTo message should have a correct SocketAddress
1796 https://bugs.webkit.org/show_bug.cgi?id=168636
1798 Reviewed by Eric Carlson.
1800 * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
1801 (WebKit::LibWebRTCSocket::SendTo): Ensuring address remains valid during SendTo message lifetime.
1803 2017-02-21 Alex Christensen <achristensen@webkit.org>
1805 Unreviewed, rolling out r212699.
1807 Internal build not ready
1811 "[WebRTC][Mac] Activate libwebrtc"
1812 https://bugs.webkit.org/show_bug.cgi?id=167293
1813 http://trac.webkit.org/changeset/212699
1815 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
1817 Remove ENABLE_THREADED_COMPOSITOR build option
1818 https://bugs.webkit.org/show_bug.cgi?id=168606
1820 Reviewed by Michael Catanzaro.
1822 Now that we have AC mode on demand with the threaded compositor there's no reason to keep the old AC code.
1824 * PlatformGTK.cmake:
1825 * WebProcess/WebPage/LayerTreeHost.cpp:
1826 (WebKit::LayerTreeHost::create):
1827 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: Removed.
1828 * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Removed.
1830 2017-02-20 Youenn Fablet <youenn@apple.com>
1832 [WebRTC][Mac] Activate libwebrtc
1833 https://bugs.webkit.org/show_bug.cgi?id=167293
1834 <rdar://problem/30401864>
1836 Reviewed by Alex Christensen.
1838 Activating PeerConnection runtime flag based on successful loading of libwebrtc.dylib.
1840 * Configurations/WebKit.xcconfig:
1841 * Shared/WebPreferencesDefinitions.h:
1842 * UIProcess/WebPreferences.cpp:
1843 (WebKit::checkWebRTCAvailability):
1845 2017-02-20 Ryan Haddad <ryanhaddad@apple.com>
1847 Unreviewed, rolling out r212685.
1849 This change broke the 32-bit Sierra build.
1853 "Resource Load Statistics: Add alternate classification
1855 https://bugs.webkit.org/show_bug.cgi?id=168347
1856 http://trac.webkit.org/changeset/212685
1858 2017-02-20 John Wilander <wilander@apple.com>
1860 Resource Load Statistics: Add alternate classification method
1861 https://bugs.webkit.org/show_bug.cgi?id=168347
1862 <rdar://problem/30352793>
1864 Reviewed by Alex Christensen.
1866 This patch adds a CorePrediction-based classifier to the WebResourceLoadStatisticsStore.
1867 The CorePrediction framework is introduced as a dependency for macOS and iOS. The patch
1868 also adds functions to support layout tests of the feature.
1870 * Configurations/BaseTarget.xcconfig:
1871 * Configurations/WebKit.xcconfig:
1872 Added dependency on CorePrediction.
1873 * Platform/classifier: Added.
1874 * Platform/classifier/ResourceLoadStatisticsClassifier.h: Added.
1875 Pulls in the Cocoa-specific classifier for Cocoa-based platforms.
1876 (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
1877 * Platform/classifier/ResourceLoadStatisticsClassifierBase.cpp: Added.
1878 (WebKit::ResourceLoadStatisticsClassifierBase::hasPrevalentResourceCharacteristics):
1879 Shared classifier logic.
1880 (WebKit::ResourceLoadStatisticsClassifierBase::classifyWithVectorThreshold):
1881 Fallback classifier for when we don't have CorePrediction.
1882 * Platform/classifier/ResourceLoadStatisticsClassifierBase.h: Added.
1883 (WebKit::ResourceLoadStatisticsClassifierBase::ResourceLoadStatisticsClassifierBase):
1884 (WebKit::ResourceLoadStatisticsClassifierBase::~ResourceLoadStatisticsClassifierBase):
1885 * Platform/classifier/cocoa: Added.
1886 * Platform/classifier/cocoa/CorePredictionSPI.h: Added.
1887 Includes CorePrediction if available, otherwise declares needed symbols.
1888 Always redeclares the functions so we'll get a build error if
1889 CorePrediction changes.
1890 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: Added.
1891 (WebKit::ResourceLoadStatisticsClassifier::classify):
1892 (WebKit::ResourceLoadStatisticsClassifier::storagePath):
1893 (WebKit::ResourceLoadStatisticsClassifier::shouldUseCorePrediction):
1894 The new classifier for Cocoa platforms.
1895 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h: Added.
1896 (WebKit::ResourceLoadStatisticsClassifier::ResourceLoadStatisticsClassifier):
1897 * PlatformGTK.cmake:
1898 Added Platform/classifier directory and ResourceLoadStatisticsClassifierBase.cpp.
1899 * PlatformMac.cmake:
1900 Added Platform/classifier and Platform/classifier/cocoa directories, and
1901 source files ResourceLoadStatisticsClassifierBase.cpp and
1902 ResourceLoadStatisticsClassifierCocoa.cpp
1903 * Resources/ResourceLoadStatistics: Added.
1904 * Resources/ResourceLoadStatistics/corePrediction_model: Added.
1905 Model file to load into CorePrediction.
1906 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
1907 (WKResourceLoadStatisticsManagerSetSubframeUnderTopFrameOrigin):
1908 (WKResourceLoadStatisticsManagerSetSubresourceUnderTopFrameOrigin):
1909 (WKResourceLoadStatisticsManagerSetSubresourceUniqueRedirectTo):
1910 Test infrastructure.
1911 * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
1912 * UIProcess/WebResourceLoadStatisticsManager.cpp:
1913 (WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
1914 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
1915 (WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
1916 Test infrastructure.
1917 * UIProcess/WebResourceLoadStatisticsManager.h:
1918 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1919 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
1920 Renamed m_storagePath to m_statisticsStoragePath for clarity.
1921 (WebKit::WebResourceLoadStatisticsStore::classifyResource):
1922 Now calls the classifier through its ResourceLoadStatisticsClassifier
1924 (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
1925 Renamed m_storagePath to m_statisticsStoragePath for clarity.
1926 (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
1927 Renamed m_storagePath to m_statisticsStoragePath for clarity.
1928 (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics): Deleted.
1929 * UIProcess/WebResourceLoadStatisticsStore.h:
1930 * WebKit2.xcodeproj/project.pbxproj:
1931 Added the new classifier source files under Platform/classifier and the
1932 corePrediction_model file under Resources/ResourceLoadStatistics.
1934 2017-02-20 Wenson Hsieh <wenson_hsieh@apple.com>
1936 Add plumbing to the UI process for TextIndicatorData when computing the drag image
1937 https://bugs.webkit.org/show_bug.cgi?id=168583
1938 Work towards <rdar://problem/30313681>
1940 Reviewed by Tim Horton.
1942 Changes the SetDragImage IPC message to send TextIndicatorData over to the UI process. Also changes the boolean
1943 isLink parameter to be a DragSourceAction instead, leaving it up to the receiving end (in the UI process) to
1946 Additionally, renames hasDataInteractionAtPosition to hasSelectionAtPosition to better reflect its purpose.
1948 These changes are only infrastructural should not alter any behaviors.
1950 * Shared/ios/InteractionInformationAtPosition.h:
1951 * Shared/ios/InteractionInformationAtPosition.mm:
1952 (WebKit::InteractionInformationAtPosition::encode):
1953 (WebKit::InteractionInformationAtPosition::decode):
1954 * UIProcess/API/Cocoa/WKWebView.mm:
1955 (-[WKWebView _simulateDataInteractionGestureRecognized]):
1956 (-[WKWebView _simulateDataInteractionEntered:]):
1957 (-[WKWebView _simulateDataInteractionUpdated:]):
1958 (-[WKWebView _simulateDataInteractionPerformOperation:]):
1959 (-[WKWebView _simulateDataInteractionEnded:]):
1960 (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]):
1961 (-[WKWebView _simulateFailedDataInteractionWithIndex:]):
1962 (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]):
1963 (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]):
1964 * UIProcess/API/Cocoa/_WKTestingDelegate.h:
1965 * UIProcess/PageClient.h:
1966 * UIProcess/WebPageProxy.h:
1967 * UIProcess/WebPageProxy.messages.in:
1968 * UIProcess/ios/PageClientImplIOS.h:
1969 * UIProcess/ios/PageClientImplIOS.mm:
1970 (WebKit::PageClientImpl::setDragImage):
1971 (WebKit::PageClientImpl::startDataInteractionWithImage):
1972 * UIProcess/ios/WKContentViewInteraction.h:
1973 * UIProcess/ios/WKContentViewInteraction.mm:
1974 (-[WKContentView hasSelectablePositionAtPoint:]):
1975 (-[WKContentView pointIsInDataInteractionContent:]):
1976 (-[WKContentView _dataInteractionGestureRecognizer]):
1977 (-[WKContentView pointIsInAssistedNode:]):
1978 * UIProcess/mac/PageClientImpl.h:
1979 * UIProcess/mac/PageClientImpl.mm:
1980 (WebKit::PageClientImpl::setDragImage):
1981 * UIProcess/mac/WebPageProxyMac.mm:
1982 (WebKit::WebPageProxy::setDragImage):
1983 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1984 (WebKit::WebDragClient::startDrag):
1985 * WebProcess/WebPage/ios/WebPageIOS.mm:
1986 (WebKit::WebPage::getPositionInformation):
1988 2017-02-20 David Quesada <david_quesada@apple.com>
1990 Don’t set NSURLSessionConfiguration’s _sourceApplicationAuditTokenData if _sourceApplicationBundleIdentifier is also set.
1991 https://bugs.webkit.org/show_bug.cgi?id=168607
1993 rdar://problem/30239618
1995 Reviewed by Geoffrey Garen.
1997 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1998 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1999 If the process pool configuration sets a source application bundle identifier, don't give the NSURLSession configuration
2000 the audit token from the UI process, as it may be associated with an application with a conflicting bundle identifier.
2002 2017-02-20 Ryan Haddad <ryanhaddad@apple.com>
2004 Unreviewed, rolling out r212632.
2006 This change appears to have caused API test failures.
2010 "Reduce platform ifdefs in WebKit2 custom protocols
2012 https://bugs.webkit.org/show_bug.cgi?id=165028
2013 http://trac.webkit.org/changeset/212632
2015 2017-02-20 Youenn Fablet <youenn@apple.com>
2017 [WebRTC] Fix some memory leaks in libwebrtc binding code
2018 https://bugs.webkit.org/show_bug.cgi?id=168596
2020 Reviewed by Eric Carlson.
2022 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
2023 (WebKit::NetworkRTCProvider::OnMessage):
2025 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
2027 Remove code under USE(GRAPHICS_SURFACE)
2028 https://bugs.webkit.org/show_bug.cgi?id=168592
2030 Reviewed by Michael Catanzaro.
2032 This was only used by EFL port.
2034 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2035 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
2036 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
2037 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
2038 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2039 (WebKit::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
2040 (WebKit::CoordinatedGraphicsScene::deleteLayer):
2041 (WebKit::CoordinatedGraphicsScene::assignImageBackingToLayer):
2042 (WebKit::CoordinatedGraphicsScene::purgeGLResources):
2043 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2044 * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
2045 (WebKit::WebCoordinatedSurface::Handle::encode):
2046 (WebKit::WebCoordinatedSurface::Handle::decode):
2047 (WebKit::WebCoordinatedSurface::create):
2048 (WebKit::WebCoordinatedSurface::createGraphicsContext):
2049 (WebKit::WebCoordinatedSurface::createHandle):
2050 (WebKit::WebCoordinatedSurface::copyToTexture):
2051 * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
2053 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
2055 Reduce platform ifdefs in WebKit2 custom protocols implementation
2056 https://bugs.webkit.org/show_bug.cgi?id=165028
2058 Reviewed by Darin Adler.
2060 Make mac implementation use the APICustomProtocolManagerClient to share more code with the soup based ports.
2062 * CMakeLists.txt: Add CustomProtocolManagerProxy.cpp.
2063 * PlatformEfl.cmake: Remove CustomProtocolManagerProxySoup.cpp.
2064 * PlatformGTK.cmake: Ditto.
2065 * PlatformMac.cmake: Remove CustomProtocolManagerProxyMac.mm.
2066 * UIProcess/API/APICustomProtocolManagerClient.h:
2067 (API::CustomProtocolManagerClient::startLoading): Make it void, since we were always returning true and the
2068 returned value was ignored.
2069 * UIProcess/API/efl/ewk_url_scheme_request.cpp:
2070 (EwkUrlSchemeRequest::finish): Update to new CustomProtocolManagerProxy API.
2071 * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
2072 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
2073 (webkitURISchemeRequestReadCallback): Ditto.
2074 * UIProcess/Cocoa/CustomProtocolManagerClient.h: Added.
2075 * UIProcess/Cocoa/CustomProtocolManagerClient.mm: Added.
2076 (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:]):
2077 (-[WKCustomProtocolLoader dealloc]):
2078 (-[WKCustomProtocolLoader connection:didFailWithError:]):
2079 (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
2080 (-[WKCustomProtocolLoader connection:didReceiveData:]):
2081 (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
2082 (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
2083 (WebKit::CustomProtocolManagerClient::startLoading):
2084 (WebKit::CustomProtocolManagerClient::stopLoading):
2085 (WebKit::CustomProtocolManagerClient::invalidate):
2086 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2087 (WebKit::WebProcessPool::platformInitialize): Set the CustomProtocolManagerClient.
2088 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
2089 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Added.
2090 (WebKit::CustomProtocolManagerProxy::startLoading):
2091 (WebKit::CustomProtocolManagerProxy::processDidClose):
2092 (WebKit::CustomProtocolManagerProxy::wasRedirectedToRequest):
2093 (WebKit::CustomProtocolManagerProxy::didReceiveResponse):
2094 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2095 * UIProcess/WebProcessPool.cpp:
2096 (WebKit::globalURLSchemesWithCustomProtocolHandlers): Just moved here to use it from ensureNetworkProcess().
2097 (WebKit::WebProcessPool::WebProcessPool): Remove soup ifdefs.
2098 (WebKit::WebProcessPool::setCustomProtocolManagerClient): Moved from the soup implementation.
2099 (WebKit::WebProcessPool::ensureNetworkProcess): Initialize custom protocols parameters.
2100 (WebKit::WebProcessPool::registerSchemeForCustomProtocol): Register the protocol if not already registered globally.
2101 (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): Remove soup ifdefs.
2102 * UIProcess/WebProcessPool.h: Remove soup ifdefs.
2103 * UIProcess/efl/RequestManagerClientEfl.cpp:
2104 * UIProcess/soup/WebProcessPoolSoup.cpp:
2105 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Remove code that is now shared.
2106 * WebKit2.xcodeproj/project.pbxproj:
2108 2017-02-20 Manuel Rego Casasnovas <rego@igalia.com>
2110 [css-grid] Remove compilation flag ENABLE_CSS_GRID_LAYOUT
2111 https://bugs.webkit.org/show_bug.cgi?id=167693
2113 Reviewed by Sergio Villar Senin.
2115 * Configurations/FeatureDefines.xcconfig:
2116 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2117 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2118 * WebProcess/WebPage/WebPage.cpp:
2119 (WebKit::WebPage::updatePreferences):
2121 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
2123 REGRESSION(r212345): [GTK] ASSERT(cookieChangeCallbackMap().contains(jar)) failed in WebCore::stopObservingCookieChanges:54
2124 https://bugs.webkit.org/show_bug.cgi?id=168375
2126 Reviewed by Alex Christensen.
2128 Simplify the cookies change notification. The current approach of the UI process telling the network process
2129 when to start and stop observing cookie changes is quite fragile and error prone. In the GTK+ port we always
2130 observe cookies, so our cookie manager always calls start in the constructor and stop in the destructor.
2131 Everything would be a lot simpler if the network process always monitored cookies.
2133 * NetworkProcess/soup/NetworkSessionSoup.cpp:
2134 (WebKit::NetworkSessionSoup::NetworkSessionSoup): Set cookies observer handler for the session.
2135 (WebKit::NetworkSessionSoup::~NetworkSessionSoup): Remove the cookies observer handler.
2136 * UIProcess/API/gtk/WebKitCookieManager.cpp:
2137 (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate): Remove the cookies observer callback.
2138 (webkit_cookie_manager_class_init): Remove dispose implementation that is no longer needed.
2139 (webkitCookieManagerCreate): Set the cookies observer callback.
2140 (webkit_cookie_manager_set_persistent_storage): Remove code to start/stop observing cookies when the jar
2141 changes, the network process deals with that now.
2142 (webkitCookieManagerDispose): Deleted.
2143 * UIProcess/WebCookieManagerProxy.cpp:
2144 (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Remove the optional callback method in favor of an
2145 explicit method to the set the callback that doesn't send the StartObservingCookieChanges message to the network
2147 (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Do not change the callback map here.
2148 (WebKit::WebCookieManagerProxy::setCookieObserverCallback): Add the callback to the map or remove the session if
2150 * UIProcess/WebCookieManagerProxy.h:
2151 * WebProcess/Cookies/WebCookieManager.cpp:
2152 (WebKit::WebCookieManager::notifyCookiesDidChange): Send CookiesDidChange message to the UI process.
2153 (WebKit::WebCookieManager::startObservingCookieChanges): Use notifyCookiesDidChange().
2154 * WebProcess/Cookies/WebCookieManager.h:
2155 * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
2156 (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Set the policy on all sessions. Code moved from
2157 WebFrameNetworkingContext since it doesn't belong there.
2158 (WebKit::WebCookieManager::setCookiePersistentStorage): Use new method to set the cookie storage in the
2159 NetworkStorageSession.
2160 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2161 (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Deleted.
2162 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
2164 2017-02-19 Chris Dumez <cdumez@apple.com>
2166 [WK2] Support termination of unresponsive WebContent processes that are in the background
2167 https://bugs.webkit.org/show_bug.cgi?id=168479
2168 <rdar://problem/30558745>
2170 Reviewed by Antti Koivisto.
2172 Support termination of unresponsive WebContent processes that are in the background.
2173 This protects us against cases where a background tab is unresponsive and has high CPU
2174 usage, thus draining the battery without the user knowing about it (e.g.
2175 <rdar://problem/29808005>).
2177 The feature works as follows:
2178 - If a WebProcessProxy has pages but none of them are visible, then it will check
2179 regularly if its associated WebContent process is still responsive.
2180 - Every time we find that the WebContent process is responsive, we exponentially
2181 back off the timer to avoid waking up the process too often. The timer initially
2182 uses a 20 seconds interval and can back off up to 8 hours.
2183 - If the WebContent process is unresponsive, then we terminate it. No notification
2184 is shown to the user and the termination is not immediately observable since the
2185 tab is not visible and its title remains. The tab is not immediately reloaded
2186 so as to avoid getting back into a bad state in the background (and have a
2188 - If the user switches to a tab that was previously killed for being unresponsive
2189 while in the background, we will then reload the tab in a fresh WebContent
2190 process. The crash banner will only be shown if the tab has ever been visible.
2191 If it wasn't ever visible (e.g. session restore case), then it will look as if
2192 the tab loads for the first time when the user switches to it.
2194 The functionality is disabled by default and can be enabled by the client via the new
2195 WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled() private API.
2198 * UIProcess/API/APIProcessPoolConfiguration.cpp:
2199 (API::ProcessPoolConfiguration::copy):
2200 * UIProcess/API/APIProcessPoolConfiguration.h:
2201 * UIProcess/API/C/WKContext.cpp:
2202 (WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled):
2203 * UIProcess/API/C/WKContextPrivate.h:
2204 * UIProcess/UnresponsiveWebProcessTerminator.cpp: Added.
2205 (WebKit::UnresponsiveWebProcessTerminator::UnresponsiveWebProcessTerminator):
2206 (WebKit::UnresponsiveWebProcessTerminator::updateState):
2207 (WebKit::pagesCopy):
2208 (WebKit::UnresponsiveWebProcessTerminator::timerFired):
2209 * UIProcess/UnresponsiveWebProcessTerminator.h: Added.
2210 (WebKit::UnresponsiveWebProcessTerminator::shouldBeActive):
2211 * UIProcess/WebPageProxy.cpp:
2212 (WebKit::WebPageProxy::reattachToWebProcess):
2213 (WebKit::WebPageProxy::reloadAfterBeingKilledInBackground):
2214 (WebKit::WebPageProxy::dispatchActivityStateChange):
2215 (WebKit::WebPageProxy::terminateProcess):
2216 (WebKit::WebPageProxy::resetStateAfterProcessExited):
2217 * UIProcess/WebPageProxy.h:
2218 * UIProcess/WebProcessProxy.cpp:
2219 (WebKit::WebProcessProxy::WebProcessProxy):
2220 (WebKit::m_backgroundResponsivenessTimer):
2221 (WebKit::WebProcessProxy::createWebPage):
2222 (WebKit::WebProcessProxy::addExistingWebPage):
2223 (WebKit::WebProcessProxy::removeWebPage):
2224 (WebKit::WebProcessProxy::updateBackgroundResponsivenessTimer):
2225 * UIProcess/WebProcessProxy.h:
2226 (WebKit::WebProcessProxy::visiblePageCount):
2227 * WebKit2.xcodeproj/project.pbxproj:
2229 2017-02-18 Michael Catanzaro <mcatanzaro@igalia.com>
2231 Remove COORDINATED_GRAPHICS_MULTIPROCESS
2232 https://bugs.webkit.org/show_bug.cgi?id=168514
2234 Reviewed by Darin Adler.
2236 * Shared/DrawingAreaInfo.h:
2237 * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
2238 (WKViewFindZoomableAreaForRect):
2239 * UIProcess/AcceleratedDrawingAreaProxy.cpp:
2240 (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
2241 * UIProcess/AcceleratedDrawingAreaProxy.h:
2242 (WebKit::AcceleratedDrawingAreaProxy::coordinatedLayerTreeHostProxy): Deleted.
2243 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: Removed.
2244 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: Removed.
2245 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: Removed.
2246 * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
2247 (WebKit::PageViewportController::pageTransitionViewportReady):
2248 * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp: Removed.
2249 * UIProcess/DrawingAreaProxy.h:
2250 * UIProcess/PageClient.h:
2251 * UIProcess/WebPageProxy.cpp:
2252 (WebKit::WebPageProxy::pageDidRequestScroll): Deleted.
2253 (WebKit::WebPageProxy::pageTransitionViewportReady): Deleted.
2254 (WebKit::WebPageProxy::didRenderFrame): Deleted.
2255 (WebKit::WebPageProxy::commitPageTransitionViewport): Deleted.
2256 * UIProcess/WebPageProxy.h:
2257 * UIProcess/WebPageProxy.messages.in:
2258 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
2259 (WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea):
2260 (WebKit::AcceleratedDrawingArea::updateBackingStoreState):
2261 (WebKit::AcceleratedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage): Deleted.
2262 * WebProcess/WebPage/AcceleratedDrawingArea.h:
2263 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2264 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2265 (WebKit::CoordinatedLayerTreeHost::commitSceneState):
2266 (WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
2267 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2268 * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Removed.
2269 * WebProcess/WebPage/DrawingArea.cpp:
2270 (WebKit::DrawingArea::create):
2271 * WebProcess/WebPage/DrawingArea.h:
2272 * WebProcess/WebPage/LayerTreeHost.cpp:
2273 (WebKit::LayerTreeHost::create):
2274 * WebProcess/WebPage/LayerTreeHost.h:
2275 * WebProcess/WebPage/WebPage.cpp:
2276 (WebKit::WebPage::~WebPage):
2277 (WebKit::WebPage::pageDidRequestScroll):
2278 (WebKit::WebPage::didCompletePageTransition):
2279 (WebKit::WebPage::didReceiveMessage):
2280 (WebKit::WebPage::commitPageTransitionViewport): Deleted.
2281 * WebProcess/WebPage/WebPage.h:
2282 * WebProcess/WebPage/WebPage.messages.in:
2284 2017-02-18 Michael Catanzaro <mcatanzaro@igalia.com>
2286 [GTK] Cannot paste primary selection into web view in Wayland
2287 https://bugs.webkit.org/show_bug.cgi?id=166949
2289 Reviewed by Carlos Garcia Campos.
2291 Once upon a time, primary selection (middle-click paste) was not supported in Wayland. At
2292 the time, I changed this function to report that primary selection was unsupported. But
2293 nowadays, primary selection works fine in all GTK+ applications except WebKit. All we have
2294 to do to make it work in WebKit is change this return value.
2296 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2297 (WebKit::WebEditorClient::supportsGlobalSelection):
2299 2017-02-17 Brian Burg <bburg@apple.com>
2301 Web Inspector: RTL: Inspector window should dock to the left when using RTL layout direction
2302 https://bugs.webkit.org/show_bug.cgi?id=168273
2303 <rdar://problem/29949325>
2305 Reviewed by Matt Baker.
2307 Add the ability to dock Web Inspector to the left of the inspected view.
2308 The frontend decides whether the Dock to Side button docks left or right
2309 based on the current layout direction.
2311 * UIProcess/WebInspectorProxy.cpp:
2312 (WebKit::WebInspectorProxy::attachLeft):
2313 (WebKit::WebInspectorProxy::attach):
2314 (WebKit::WebInspectorProxy::createInspectorPage):
2315 * UIProcess/WebInspectorProxy.h:
2316 * UIProcess/WebInspectorProxy.messages.in:
2317 Add plumbing for new dock configuration.
2319 * UIProcess/mac/WebInspectorProxyMac.mm:
2320 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2321 (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
2322 (WebKit::WebInspectorProxy::platformAttach):
2323 Adapt existing sizing logic to work for docking to left.
2325 * WebProcess/WebPage/WebInspectorUI.cpp:
2326 (WebKit::WebInspectorUI::requestSetDockSide):
2327 (WebKit::WebInspectorUI::setDockSide):
2328 * WebProcess/WebPage/WebInspectorUI.h:
2329 (WebKit::WebInspectorUI::attachedLeft):
2330 * WebProcess/WebPage/WebInspectorUI.messages.in:
2331 Add plumbing for new dock configuration.
2333 2017-02-16 Simon Fraser <simon.fraser@apple.com>
2335 Allow PlatformCALayers to specify that they want deep color backing store
2336 https://bugs.webkit.org/show_bug.cgi?id=168495
2338 Reviewed by Tim Horton.
2340 Currently capable iOS devices get deep color backing store by virtue of a supports
2341 check in PlatformCALayerCocoa::PlatformCALayerCocoa(), and LegacyTileGridTile.
2343 Future work will make layer contents format selection more complex, so express the need
2344 for deep color on PlatformCALayer, and have the creators of PlatformCALayer (mainly the
2345 flavors of GraphicsLayerCA) choose for them to support deep color. A bit of special-casing
2346 is needed to propagte the state to TileControllers.
2348 The deep-colorness now propagates from PlatformCALayerRemote to RemoteLayerBackingStore,
2349 instead of RemoteLayerBackingStore looking at the properties of the screen directly.
2351 Remove PlatformCALayer::LayerTypeWebTiledLayer which was only used for the old CATiledLayers
2352 that we no longer use.
2354 * Shared/mac/RemoteLayerBackingStore.h:
2355 * Shared/mac/RemoteLayerBackingStore.mm:
2356 (WebKit::RemoteLayerBackingStore::ensureBackingStore):
2357 (WebKit::RemoteLayerBackingStore::bytesPerPixel):
2358 (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
2359 (WebKit::RemoteLayerBackingStore::drawInContext):
2360 (WebKit::RemoteLayerBackingStore::surfaceBufferFormat):
2361 (WebKit::bufferFormat): Deleted.
2362 * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
2363 (WebKit::GraphicsLayerCARemote::createPlatformCALayer):
2364 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2365 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2366 (WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
2367 (WebKit::PlatformCALayerRemote::updateBackingStore):
2368 (WebKit::PlatformCALayerRemote::wantsDeepColorBackingStore):
2369 (WebKit::PlatformCALayerRemote::setWantsDeepColorBackingStore):
2370 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2371 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2372 (WebKit::PlatformCALayerRemoteTiledBacking::wantsDeepColorBackingStore):
2373 (WebKit::PlatformCALayerRemoteTiledBacking::setWantsDeepColorBackingStore):
2374 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2376 2017-02-17 Wenson Hsieh <wenson_hsieh@apple.com>
2378 [WK2] Action sheet should not dismiss when a DDAction with user interface is being presented
2379 https://bugs.webkit.org/show_bug.cgi?id=168528
2380 <rdar://problem/30515324>
2382 Reviewed by Beth Dakin.
2384 After r211643, -[WKActionSheet doneWithSheet] now dismisses the presenting view controller. This is called when
2385 interaction with the sheet is finished and is a reasonable thing to do in most cases. However, when using data
2386 detectors, we don't want to dismiss the presenting view controller, since DataDetector handles dismissing on its
2387 own and expects that its completion handler will be invoked.
2389 To fix this, we add a parameter to doneWithSheet: to indicate whether or not we should additionally dismiss the
2390 presenting view controller, and pass in NO in the case where we are handing control over to DataDetector.
2392 * UIProcess/ios/WKActionSheet.h:
2393 * UIProcess/ios/WKActionSheet.mm:
2394 (-[WKActionSheet doneWithSheet:]):
2395 (-[WKActionSheet doneWithSheet]): Deleted.
2396 * UIProcess/ios/WKActionSheetAssistant.mm:
2397 (-[WKActionSheetAssistant showDataDetectorsSheet]):
2398 (-[WKActionSheetAssistant cleanupSheet]):
2400 2017-02-17 Michael Catanzaro <mcatanzaro@igalia.com>
2402 Remove EFL from WebKit2
2403 https://bugs.webkit.org/show_bug.cgi?id=168511
2405 Reviewed by Alex Christensen.
2407 * Platform/IPC/unix/ConnectionUnix.cpp:
2408 (IPC::Connection::platformInvalidate):
2409 (IPC::Connection::open):
2410 * Platform/Module.h:
2411 * PlatformEfl.cmake: Removed.
2412 * PluginProcess/unix/PluginProcessMainUnix.cpp:
2413 * Shared/API/APIObject.h:
2414 * Shared/API/c/WKBase.h:
2415 * Shared/API/c/WKSharedAPICast.h:
2418 * Shared/NativeWebKeyboardEvent.h:
2419 (WebKit::NativeWebKeyboardEvent::isFakeEventForComposition):
2420 (WebKit::NativeWebKeyboardEvent::isFiltered): Deleted.
2421 * Shared/NativeWebMouseEvent.h:
2422 (WebKit::NativeWebMouseEvent::nativeEvent):
2423 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Deleted.
2424 * Shared/NativeWebTouchEvent.h:
2425 (WebKit::NativeWebTouchEvent::nativeEvent):
2426 * Shared/NativeWebWheelEvent.h:
2427 (WebKit::NativeWebWheelEvent::nativeEvent):
2428 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
2429 (WebKit::NetscapePluginModule::determineQuirks):
2430 * Shared/WebPreferencesDefinitions.h:
2431 * UIProcess/API/APIWebsiteDataStore.cpp:
2432 * UIProcess/API/C/WKAPICast.h:
2433 * UIProcess/API/C/WKTextChecker.cpp:
2434 * UIProcess/API/C/WKTextChecker.h:
2435 * UIProcess/ChildProcessProxy.cpp:
2436 (WebKit::ChildProcessProxy::getLaunchOptions):
2437 * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
2438 (WebKit::PageViewportController::pixelAlignedFloatPoint):
2439 * UIProcess/InspectorServer/WebInspectorServer.h:
2440 * UIProcess/Launcher/ProcessLauncher.h:
2441 * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
2442 * UIProcess/PageClient.h:
2443 * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
2444 (WebKit::PluginProcessProxy::scanPlugin):
2445 * UIProcess/WebInspectorProxy.h:
2446 * UIProcess/WebPageProxy.h:
2447 * WebKit2.xcodeproj/project.pbxproj:
2448 * WebProcess/InjectedBundle/InjectedBundle.h:
2449 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2450 (WebKit::getPluginDisplay):
2451 (WebKit::x11Screen):
2452 (WebKit::displayDepth):
2453 (WebKit::rootWindowID):
2454 (WebKit::NetscapePluginX11::paint):
2455 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2456 (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
2457 (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
2458 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2459 (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
2460 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2461 (WebKit::WebFrameLoaderClient::saveViewStateToItem):
2462 (WebKit::WebFrameLoaderClient::restoreViewState):
2463 (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
2464 * WebProcess/WebPage/WebPage.cpp:
2465 (WebKit::WebPage::WebPage):
2466 * WebProcess/WebPage/WebPage.h:
2467 * WebProcess/WebPage/WebPage.messages.in:
2470 2017-02-15 Brady Eidson <beidson@apple.com>
2472 Stop backing up localStorage databases to iCloud by default.
2473 <rdar://problem/29045531> and https://bugs.webkit.org/show_bug.cgi?id=168388
2475 Reviewed by Geoffrey Garen.
2477 * UIProcess/Cocoa/VersionChecks.h:
2479 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2480 (WebKit::LocalStorageDatabaseTracker::databasePath):
2481 * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2482 * UIProcess/Storage/ios/LocalStorageDatabaseTrackerIOS.mm: Copied from Source/WebKit2/UIProcess/Cocoa/VersionChecks.h.
2483 (WebKit::LocalStorageDatabaseTracker::platformExcludeFromBackup):
2485 * WebKit2.xcodeproj/project.pbxproj:
2487 2017-02-16 Aakash Jain <aakash_jain@apple.com>
2489 Remove unused methods WKPageGetDebugPaintFlags and WKPageSetDebugPaintFlags
2490 https://bugs.webkit.org/show_bug.cgi?id=168464
2492 Reviewed by Alexey Proskuryakov.
2494 * UIProcess/API/C/WKPagePrivate.h:
2496 2017-02-16 Youenn Fablet <youenn@apple.com>
2498 [WebRTC] libwebrtc socket addresses should not be passed as strings
2499 https://bugs.webkit.org/show_bug.cgi?id=168474
2501 Reviewed by Alex Christensen.
2503 Removing all seralization of socket addresses as strings.
2504 Instead, a dedicated serialization is provided.
2505 This allows proper handling of various cases like addresses with both hostnames and resolved IPs.
2507 * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
2508 (WebKit::LibWebRTCSocketClient::signalReadPacket):
2509 (WebKit::LibWebRTCSocketClient::signalSentPacket):
2510 (WebKit::LibWebRTCSocketClient::signalAddressReady):
2511 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
2512 (WebKit::NetworkRTCProvider::createUDPSocket):
2513 (WebKit::NetworkRTCProvider::createServerTCPSocket):
2514 (WebKit::NetworkRTCProvider::createClientTCPSocket):
2515 * NetworkProcess/webrtc/NetworkRTCProvider.h:
2516 * NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
2517 * NetworkProcess/webrtc/NetworkRTCSocket.cpp:
2518 (WebKit::NetworkRTCSocket::sendTo):
2519 * NetworkProcess/webrtc/NetworkRTCSocket.h:
2520 * NetworkProcess/webrtc/NetworkRTCSocket.messages.in:
2521 * Shared/RTCNetwork.cpp:
2522 (WebKit::RTCNetwork::SocketAddress::decode):
2523 (WebKit::RTCNetwork::SocketAddress::encode):
2524 * Shared/RTCNetwork.h:
2525 (WebKit::RTCNetwork::SocketAddress::SocketAddress):
2526 * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
2527 (WebKit::LibWebRTCSocket::signalAddressReady):
2528 (WebKit::LibWebRTCSocket::SendTo):
2529 * WebProcess/Network/webrtc/LibWebRTCSocket.h:
2530 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
2531 (WebKit::LibWebRTCSocketFactory::CreateServerTcpSocket):
2532 (WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
2533 (WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
2534 * WebProcess/Network/webrtc/WebRTCSocket.cpp:
2535 (WebKit::WebRTCSocket::signalAddressReady):
2536 * WebProcess/Network/webrtc/WebRTCSocket.h:
2537 * WebProcess/Network/webrtc/WebRTCSocket.messages.in:
2539 2017-02-16 Daniel Bates <dabates@apple.com>
2541 Remove Chromium-specific code to call FrameLoaderClient::redirectDataToPlugin(nullptr)
2542 https://bugs.webkit.org/show_bug.cgi?id=168417
2543 <rdar://problem/30541748>
2545 Reviewed by Brent Fulgham.
2547 Update override of FrameLoaderClient::redirectDataToPlugin() to take a Widget& instead of a
2548 Widget* as it is always called with a valid Widget.
2550 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2551 (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
2552 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2553 * mac/WebKit2.order: Remove symbol for WebFrameLoaderClient::redirectDataToPlugin() that took a Widget*
2554 as it no longer exists. I am unclear if this file is still meaningful as it was last modified in
2555 r180570 (2 years ago) though Xcode still references this ordering file (why?).
2557 2017-02-16 Alex Christensen <achristensen@webkit.org>
2559 Remove EFL-specific files in WebKit2.
2561 Rubber-stamped by Anders Carlsson
2563 * DatabaseProcess/efl: Removed.
2564 * DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Removed.
2565 * NetworkProcess/Downloads/efl: Removed.
2566 * NetworkProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp: Removed.
2567 * NetworkProcess/efl: Removed.
2568 * NetworkProcess/efl/NetworkProcessMainEfl.cpp: Removed.
2569 * Platform/efl: Removed.
2570 * Platform/efl/ModuleEfl.cpp: Removed.
2571 * Shared/API/c/efl: Removed.
2572 * Shared/API/c/efl/WKArrayEfl.cpp: Removed.
2573 * Shared/API/c/efl/WKArrayEfl.h: Removed.
2574 * Shared/API/c/efl/WKBaseEfl.h: Removed.
2575 * Shared/efl: Removed.
2576 * Shared/efl/NativeWebKeyboardEventEfl.cpp: Removed.
2577 * Shared/efl/NativeWebTouchEventEfl.cpp: Removed.
2578 * Shared/efl/NativeWebWheelEventEfl.cpp: Removed.
2579 * Shared/efl/ProcessExecutablePathEfl.cpp: Removed.
2580 * Shared/efl/WebEventFactory.cpp: Removed.
2581 * Shared/efl/WebEventFactory.h: Removed.
2582 * UIProcess/API/C/efl: Removed.
2583 * UIProcess/API/C/efl/WKAPICastEfl.h: Removed.
2584 * UIProcess/API/C/efl/WKColorPickerResultListener.cpp: Removed.
2585 * UIProcess/API/C/efl/WKColorPickerResultListener.h: Removed.
2586 * UIProcess/API/C/efl/WKEventEfl.cpp: Removed.
2587 * UIProcess/API/C/efl/WKEventEfl.h: Removed.
2588 * UIProcess/API/C/efl/WKViewEfl.cpp: Removed.
2589 * UIProcess/API/C/efl/WKViewEfl.h: Removed.
2590 * UIProcess/API/cpp/efl: Removed.
2591 * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: Removed.
2592 * UIProcess/API/cpp/efl/WKEinaSharedString.h: Removed.
2593 * UIProcess/API/efl: Removed.
2594 * UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp: Removed.
2595 * UIProcess/API/efl/EWebKit2.h.in: Removed.
2596 * UIProcess/API/efl/EwkView.cpp: Removed.
2597 * UIProcess/API/efl/EwkView.h: Removed.
2598 * UIProcess/API/efl/EwkViewCallbacks.h: Removed.
2599 * UIProcess/API/efl/GestureRecognizer.cpp: Removed.
2600 * UIProcess/API/efl/GestureRecognizer.h: Removed.
2601 * UIProcess/API/efl/SnapshotImageGL.cpp: Removed.
2602 * UIProcess/API/efl/SnapshotImageGL.h: Removed.
2603 * UIProcess/API/efl/WebAccessibility.cpp: Removed.
2604 * UIProcess/API/efl/WebAccessibility.h: Removed.
2605 * UIProcess/API/efl/ewk_application_cache_manager.cpp: Removed.
2606 * UIProcess/API/efl/ewk_application_cache_manager.h: Removed.
2607 * UIProcess/API/efl/ewk_application_cache_manager_private.h: Removed.
2608 * UIProcess/API/efl/ewk_auth_request.cpp: Removed.
2609 * UIProcess/API/efl/ewk_auth_request.h: Removed.
2610 * UIProcess/API/efl/ewk_auth_request_private.h: Removed.
2611 * UIProcess/API/efl/ewk_back_forward_list.cpp: Removed.
2612 * UIProcess/API/efl/ewk_back_forward_list.h: Removed.
2613 * UIProcess/API/efl/ewk_back_forward_list_item.cpp: Removed.
2614 * UIProcess/API/efl/ewk_back_forward_list_item.h: Removed.
2615 * UIProcess/API/efl/ewk_back_forward_list_item_private.h: Removed.
2616 * UIProcess/API/efl/ewk_back_forward_list_private.h: Removed.
2617 * UIProcess/API/efl/ewk_color_picker.cpp: Removed.
2618 * UIProcess/API/efl/ewk_color_picker.h: Removed.
2619 * UIProcess/API/efl/ewk_color_picker_private.h: Removed.
2620 * UIProcess/API/efl/ewk_context.cpp: Removed.
2621 * UIProcess/API/efl/ewk_context.h: Removed.
2622 * UIProcess/API/efl/ewk_context_menu.cpp: Removed.
2623 * UIProcess/API/efl/ewk_context_menu.h: Removed.
2624 * UIProcess/API/efl/ewk_context_menu_item.cpp: Removed.
2625 * UIProcess/API/efl/ewk_context_menu_item.h: Removed.
2626 * UIProcess/API/efl/ewk_context_menu_item_private.h: Removed.
2627 * UIProcess/API/efl/ewk_context_menu_private.h: Removed.
2628 * UIProcess/API/efl/ewk_context_private.h: Removed.
2629 * UIProcess/API/efl/ewk_cookie_manager.cpp: Removed.
2630 * UIProcess/API/efl/ewk_cookie_manager.h: Removed.
2631 * UIProcess/API/efl/ewk_cookie_manager_private.h: Removed.
2632 * UIProcess/API/efl/ewk_database_manager.cpp: Removed.
2633 * UIProcess/API/efl/ewk_database_manager.h: Removed.
2634 * UIProcess/API/efl/ewk_database_manager_private.h: Removed.
2635 * UIProcess/API/efl/ewk_download_job.cpp: Removed.
2636 * UIProcess/API/efl/ewk_download_job.h: Removed.
2637 * UIProcess/API/efl/ewk_download_job_private.h: Removed.
2638 * UIProcess/API/efl/ewk_error.cpp: Removed.
2639 * UIProcess/API/efl/ewk_error.h: Removed.
2640 * UIProcess/API/efl/ewk_error_private.h: Removed.
2641 * UIProcess/API/efl/ewk_favicon_database.cpp: Removed.
2642 * UIProcess/API/efl/ewk_favicon_database.h: Removed.
2643 * UIProcess/API/efl/ewk_favicon_database_private.h: Removed.
2644 * UIProcess/API/efl/ewk_file_chooser_request.cpp: Removed.
2645 * UIProcess/API/efl/ewk_file_chooser_request.h: Removed.
2646 * UIProcess/API/efl/ewk_file_chooser_request_private.h: Removed.
2647 * UIProcess/API/efl/ewk_form_submission_request.cpp: Removed.
2648 * UIProcess/API/efl/ewk_form_submission_request.h: Removed.
2649 * UIProcess/API/efl/ewk_form_submission_request_private.h: Removed.
2650 * UIProcess/API/efl/ewk_intro.h: Removed.
2651 * UIProcess/API/efl/ewk_main.cpp: Removed.
2652 * UIProcess/API/efl/ewk_main.h: Removed.
2653 * UIProcess/API/efl/ewk_main_private.h: Removed.
2654 * UIProcess/API/efl/ewk_navigation_data.cpp: Removed.
2655 * UIProcess/API/efl/ewk_navigation_data.h: Removed.
2656 * UIProcess/API/efl/ewk_navigation_data_private.h: Removed.
2657 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp: Removed.
2658 * UIProcess/API/efl/ewk_navigation_policy_decision.h: Removed.
2659 * UIProcess/API/efl/ewk_navigation_policy_decision_private.h: Removed.
2660 * UIProcess/API/efl/ewk_object.cpp: Removed.
2661 * UIProcess/API/efl/ewk_object.h: Removed.
2662 * UIProcess/API/efl/ewk_object_private.h: Removed.
2663 * UIProcess/API/efl/ewk_page_group.cpp: Removed.
2664 * UIProcess/API/efl/ewk_page_group.h: Removed.
2665 * UIProcess/API/efl/ewk_page_group_private.h: Removed.
2666 * UIProcess/API/efl/ewk_popup_menu.cpp: Removed.
2667 * UIProcess/API/efl/ewk_popup_menu.h: Removed.
2668 * UIProcess/API/efl/ewk_popup_menu_item.cpp: Removed.
2669 * UIProcess/API/efl/ewk_popup_menu_item.h: Removed.
2670 * UIProcess/API/efl/ewk_popup_menu_item_private.h: Removed.
2671 * UIProcess/API/efl/ewk_popup_menu_private.h: Removed.
2672 * UIProcess/API/efl/ewk_security_origin.cpp: Removed.
2673 * UIProcess/API/efl/ewk_security_origin.h: Removed.
2674 * UIProcess/API/efl/ewk_security_origin_private.h: Removed.
2675 * UIProcess/API/efl/ewk_settings.cpp: Removed.
2676 * UIProcess/API/efl/ewk_settings.h: Removed.
2677 * UIProcess/API/efl/ewk_settings_private.h: Removed.
2678 * UIProcess/API/efl/ewk_storage_manager.cpp: Removed.
2679 * UIProcess/API/efl/ewk_storage_manager.h: Removed.
2680 * UIProcess/API/efl/ewk_storage_manager_private.h: Removed.
2681 * UIProcess/API/efl/ewk_text_checker.cpp: Removed.
2682 * UIProcess/API/efl/ewk_text_checker.h: Removed.
2683 * UIProcess/API/efl/ewk_text_checker_private.h: Removed.
2684 * UIProcess/API/efl/ewk_touch.h: Removed.
2685 * UIProcess/API/efl/ewk_url_request.cpp: Removed.
2686 * UIProcess/API/efl/ewk_url_request.h: Removed.
2687 * UIProcess/API/efl/ewk_url_request_private.h: Removed.
2688 * UIProcess/API/efl/ewk_url_response.cpp: Removed.
2689 * UIProcess/API/efl/ewk_url_response.h: Removed.
2690 * UIProcess/API/efl/ewk_url_response_private.h: Removed.
2691 * UIProcess/API/efl/ewk_url_scheme_request.cpp: Removed.
2692 * UIProcess/API/efl/ewk_url_scheme_request.h: Removed.
2693 * UIProcess/API/efl/ewk_url_scheme_request_private.h: Removed.
2694 * UIProcess/API/efl/ewk_view.cpp: Removed.
2695 * UIProcess/API/efl/ewk_view.h: Removed.
2696 * UIProcess/API/efl/ewk_view_configuration.cpp: Removed.
2697 * UIProcess/API/efl/ewk_view_configuration.h: Removed.
2698 * UIProcess/API/efl/ewk_view_configuration_private.h: Removed.
2699 * UIProcess/API/efl/ewk_view_private.h: Removed.
2700 * UIProcess/API/efl/ewk_window_features.cpp: Removed.
2701 * UIProcess/API/efl/ewk_window_features.h: Removed.
2702 * UIProcess/API/efl/ewk_window_features_private.h: Removed.
2703 * UIProcess/API/efl/tests: Removed.
2704 * UIProcess/API/efl/tests/UnitTestUtils: Removed.
2705 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Removed.
2706 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: Removed.
2707 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: Removed.
2708 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h: Removed.
2709 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestMain.cpp: Removed.
2710 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp: Removed.
2711 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h: Removed.
2712 * UIProcess/API/efl/tests/extensions: Removed.
2713 * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Removed.
2714 * UIProcess/API/efl/tests/resources: Removed.
2715 * UIProcess/API/efl/tests/resources/Page1.html: Removed.
2716 * UIProcess/API/efl/tests/resources/Page2.html: Removed.
2717 * UIProcess/API/efl/tests/resources/Page3.html: Removed.
2718 * UIProcess/API/efl/tests/resources/blank.ico: Removed.
2719 * UIProcess/API/efl/tests/resources/default_test_page.html: Removed.
2720 * UIProcess/API/efl/tests/resources/empty_theme.edj: Removed.
2721 * UIProcess/API/efl/tests/resources/file_chooser.html: Removed.
2722 * UIProcess/API/efl/tests/resources/frame_flattening_test.html: Removed.
2723 * UIProcess/API/efl/tests/resources/frame_flattening_test_subframe.html: Removed.
2724 * UIProcess/API/efl/tests/resources/local_file_access.html: Removed.
2725 * UIProcess/API/efl/tests/resources/redirect_url_to_default.html: Removed.
2726 * UIProcess/API/efl/tests/resources/resultMHTML.mht: Removed.
2727 * UIProcess/API/efl/tests/resources/same_page_navigation.html: Removed.
2728 * UIProcess/API/efl/tests/resources/spelling_selection_tests.html: Removed.
2729 * UIProcess/API/efl/tests/resources/spelling_test.html: Removed.
2730 * UIProcess/API/efl/tests/resources/test.pdf: Removed.
2731 * UIProcess/API/efl/tests/resources/window_move_resize.html: Removed.
2732 * UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Removed.
2733 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp: Removed.
2734 * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp: Removed.
2735 * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp: Removed.
2736 * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp: Removed.
2737 * UIProcess/API/efl/tests/test_ewk2_context.cpp: Removed.
2738 * UIProcess/API/efl/tests/test_ewk2_context_history_callbacks.cpp: Removed.
2739 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: Removed.
2740 * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: Removed.
2741 * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp: Removed.
2742 * UIProcess/API/efl/tests/test_ewk2_download_job.cpp: Removed.
2743 * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: Removed.
2744 * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp: Removed.
2745 * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp: Removed.
2746 * UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Removed.
2747 * UIProcess/API/efl/tests/test_ewk2_object.cpp: Removed.
2748 * UIProcess/API/efl/tests/test_ewk2_page.cpp: Removed.
2749 * UIProcess/API/efl/tests/test_ewk2_page_group.cpp: Removed.
2750 * UIProcess/API/efl/tests/test_ewk2_popup_menu.cpp: Removed.
2751 * UIProcess/API/efl/tests/test_ewk2_settings.cpp: Removed.
2752 * UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Removed.
2753 * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp: Removed.
2754 * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: Removed.
2755 * UIProcess/API/efl/tests/test_ewk2_view.cpp: Removed.
2756 * UIProcess/API/efl/tests/test_ewk2_view_configuration.cpp: Removed.
2757 * UIProcess/API/efl/tests/test_ewk2_window_features.cpp: Removed.
2758 * UIProcess/InspectorServer/efl: Removed.
2759 * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp: Removed.
2760 * UIProcess/Launcher/efl: Removed.
2761 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: Removed.
2762 * UIProcess/efl: Removed.
2763 * UIProcess/efl/ContextHistoryClientEfl.cpp: Removed.
2764 * UIProcess/efl/ContextHistoryClientEfl.h: Removed.
2765 * UIProcess/efl/ContextMenuClientEfl.cpp: Removed.
2766 * UIProcess/efl/ContextMenuClientEfl.h: Removed.
2767 * UIProcess/efl/DownloadManagerEfl.cpp: Removed.
2768 * UIProcess/efl/DownloadManagerEfl.h: Removed.
2769 * UIProcess/efl/EasingCurves.cpp: Removed.
2770 * UIProcess/efl/EasingCurves.h: Removed.
2771 * UIProcess/efl/EwkDebug.h: Removed.
2772 * UIProcess/efl/EwkTouchEvent.cpp: Removed.
2773 * UIProcess/efl/EwkTouchEvent.h: Removed.
2774 * UIProcess/efl/EwkTouchPoint.cpp: Removed.
2775 * UIProcess/efl/EwkTouchPoint.h: Removed.
2776 * UIProcess/efl/FindClientEfl.cpp: Removed.
2777 * UIProcess/efl/FindClientEfl.h: Removed.
2778 * UIProcess/efl/FormClientEfl.cpp: Removed.
2779 * UIProcess/efl/FormClientEfl.h: Removed.
2780 * UIProcess/efl/InputMethodContextEfl.cpp: Removed.
2781 * UIProcess/efl/InputMethodContextEfl.h: Removed.
2782 * UIProcess/efl/PageLoadClientEfl.cpp: Removed.
2783 * UIProcess/efl/PageLoadClientEfl.h: Removed.
2784 * UIProcess/efl/PagePolicyClientEfl.cpp: Removed.
2785 * UIProcess/efl/PagePolicyClientEfl.h: Removed.
2786 * UIProcess/efl/PageUIClientEfl.cpp: Removed.
2787 * UIProcess/efl/PageUIClientEfl.h: Removed.
2788 * UIProcess/efl/PageViewportControllerClientEfl.cpp: Removed.
2789 * UIProcess/efl/PageViewportControllerClientEfl.h: Removed.
2790 * UIProcess/efl/RequestManagerClientEfl.cpp: Removed.
2791 * UIProcess/efl/RequestManagerClientEfl.h: Removed.
2792 * UIProcess/efl/TextCheckerClientEfl.cpp: Removed.
2793 * UIProcess/efl/TextCheckerClientEfl.h: Removed.
2794 * UIProcess/efl/TextCheckerEfl.cpp: Removed.
2795 * UIProcess/efl/VibrationClientEfl.cpp: Removed.
2796 * UIProcess/efl/VibrationClientEfl.h: Removed.
2797 * UIProcess/efl/ViewClientEfl.cpp: Removed.
2798 * UIProcess/efl/ViewClientEfl.h: Removed.
2799 * UIProcess/efl/WebColorPickerClient.cpp: Removed.
2800 * UIProcess/efl/WebColorPickerClient.h: Removed.
2801 * UIProcess/efl/WebColorPickerEfl.cpp: Removed.
2802 * UIProcess/efl/WebColorPickerEfl.h: Removed.
2803 * UIProcess/efl/WebColorPickerResultListenerProxy.cpp: Removed.
2804 * UIProcess/efl/WebColorPickerResultListenerProxy.h: Removed.
2805 * UIProcess/efl/WebContextMenuProxyEfl.cpp: Removed.
2806 * UIProcess/efl/WebContextMenuProxyEfl.h: Removed.
2807 * UIProcess/efl/WebInspectorProxyEfl.cpp: Removed.
2808 * UIProcess/efl/WebPageProxyEfl.cpp: Removed.
2809 * UIProcess/efl/WebPopupItemEfl.cpp: Removed.
2810 * UIProcess/efl/WebPopupItemEfl.h: Removed.
2811 * UIProcess/efl/WebPopupMenuProxyEfl.cpp: Removed.
2812 * UIProcess/efl/WebPopupMenuProxyEfl.h: Removed.
2813 * UIProcess/efl/WebPreferencesEfl.cpp: Removed.
2814 * UIProcess/efl/WebProcessPoolEfl.cpp: Removed.
2815 * UIProcess/efl/WebView.cpp: Removed.
2816 * UIProcess/efl/WebView.h: Removed.
2817 * UIProcess/efl/WebViewClient.cpp: Removed.
2818 * UIProcess/efl/WebViewClient.h: Removed.
2819 * WebProcess/InjectedBundle/API/efl: Removed.
2820 * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Removed.
2821 * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Removed.
2822 * WebProcess/InjectedBundle/API/efl/ewk_extension.h: Removed.
2823 * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Removed.
2824 * WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Removed.
2825 * WebProcess/InjectedBundle/API/efl/ewk_page.h: Removed.
2826 * WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Removed.
2827 * WebProcess/InjectedBundle/efl: Removed.
2828 * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp: Removed.
2829 * WebProcess/WebCoreSupport/efl: Removed.
2830 * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp: Removed.
2831 * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: Removed.
2832 * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: Removed.
2833 * WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp: Removed.
2834 * WebProcess/WebPage/efl: Removed.
2835 * WebProcess/WebPage/efl/WebInspectorUIEfl.cpp: Removed.
2836 * WebProcess/WebPage/efl/WebPageEfl.cpp: Removed.
2837 * WebProcess/efl: Removed.
2838 * WebProcess/efl/ExtensionManagerEfl.cpp: Removed.
2839 * WebProcess/efl/ExtensionManagerEfl.h: Removed.
2840 * WebProcess/efl/WebInjectedBundleMainEfl.cpp: Removed.
2841 * WebProcess/efl/WebProcessMainEfl.cpp: Removed.
2843 * efl/EWebKit2Config.cmake.in: Removed.
2844 * efl/EWebKit2ConfigVersion.cmake.in: Removed.
2845 * efl/ewebkit2-extension.pc.in: Removed.
2846 * efl/ewebkit2.pc.in: Removed.
2848 2017-02-16 Alex Christensen <achristensen@webkit.org>
2850 Remove old URL parser
2851 https://bugs.webkit.org/show_bug.cgi?id=168483
2853 Reviewed by Tim Horton.
2855 * NetworkProcess/NetworkProcess.cpp:
2856 (WebKit::NetworkProcess::initializeNetworkProcess):
2857 * NetworkProcess/NetworkProcessCreationParameters.cpp:
2858 (WebKit::NetworkProcessCreationParameters::encode):
2859 (WebKit::NetworkProcessCreationParameters::decode):
2860 * NetworkProcess/NetworkProcessCreationParameters.h:
2861 * PlatformEfl.cmake:
2862 * PlatformGTK.cmake:
2863 * PlatformMac.cmake:
2864 * Shared/Cocoa/WebKit2InitializeCocoa.mm: Removed.
2865 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
2866 (WebKit::XPCServiceInitializer):
2867 * Shared/WebKit2Initialize.cpp:
2868 (WebKit::InitializeWebKit2):
2869 * Shared/WebKit2Initialize.h:
2871 * Shared/WebProcessCreationParameters.cpp:
2872 (WebKit::WebProcessCreationParameters::encode):
2873 (WebKit::WebProcessCreationParameters::decode):
2874 * Shared/WebProcessCreationParameters.h:
2875 * Shared/efl/WebKit2InitializeEFL.cpp: Removed.
2876 * Shared/gtk/WebKit2InitializeGTK.cpp: Removed.
2877 * UIProcess/WebProcessPool.cpp:
2878 (WebKit::WebProcessPool::ensureNetworkProcess):
2879 (WebKit::WebProcessPool::createNewWebProcess):
2880 * WebKit2.xcodeproj/project.pbxproj:
2881 * WebProcess/WebProcess.cpp:
2882 (WebKit::WebProcess::initializeWebProcess):
2884 2017-02-16 Wenson Hsieh <wenson_hsieh@apple.com>
2886 [WK2] Add additional test infrastructure and unit tests for data interaction
2887 https://bugs.webkit.org/show_bug.cgi?id=168439
2888 <rdar://problem/30557942>
2890 Reviewed by Tim Horton.
2892 Adds two new _WKTestingDelegate protocol methods that are fired when a 'start data interaction' request has been
2893 sent to the web process, and when a response has been received. See Tools/ChangeLog for more details.
2895 * UIProcess/API/Cocoa/_WKTestingDelegate.h:
2897 2017-02-16 Aakash Jain <aakash_jain@apple.com>
2899 Remove unused method WKBundlePageCopyContextMenuItemTitle
2900 https://bugs.webkit.org/show_bug.cgi?id=168456
2902 Reviewed by Dan Bernstein.
2904 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Removed WKBundlePageCopyContextMenuItemTitle.
2906 2017-02-16 Aakash Jain <aakash_jain@apple.com>
2908 Remove unused WKContextGetProcessSuppressionEnabled and WKContextSetProcessSuppressionEnabled
2909 https://bugs.webkit.org/show_bug.cgi?id=168460
2911 Reviewed by Dan Bernstein.
2913 * UIProcess/API/C/mac/WKContextPrivateMac.h:
2915 2017-02-16 Aakash Jain <aakash_jain@apple.com>
2917 Removed unused method WKContextGetProcessModel
2918 https://bugs.webkit.org/show_bug.cgi?id=168457
2920 Reviewed by Dan Bernstein.
2922 * UIProcess/API/C/WKContext.h: Removed WKContextGetProcessModel.
2924 2017-02-16 Tim Horton <timothy_horton@apple.com>
2926 WKWebView inside a UICollectionView flashes when items are inserted above it
2927 https://bugs.webkit.org/show_bug.cgi?id=168376
2928 <rdar://problem/29322051>
2930 Reviewed by Simon Fraser.
2932 Previously, we would immediately send visible content rect updates
2933 whenever we scrolled, or our frame or bounds changed, or ... a whole
2934 bunch of other things. This message would be immediately sent to the
2935 Web Content process, and coalesced at the whims of the Web Content process
2936 main thread. However, if we received multiple such updates within the
2937 same runloop cycle in the UI process, the Web Content process could
2938 send back layer tree commits for intermediate states that would
2939 never make it to the screen.
2941 In the UICollectionView case, UIKit would first scroll to the new location
2942 (potentially putting the WKWebView totally off-screen), and then update
2943 our frame (back on screen), and we would get two layer tree commits;
2944 one, with less tile coverage than needed to cover the area, and another
2947 Instead, wait until just before we commit the UI-side layer tree (and
2948 thus everyone is done moving things around) to push the new visible
2949 rect info to the Web Content process.
2951 So far, I have not found a way to test that reliably fails before
2952 and reliably passes after without adding a ton of supporting code to WebKit.
2954 * UIProcess/API/Cocoa/WKWebView.mm:
2955 (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
2956 (-[WKWebView _didCommitLayerTree:]):
2957 (-[WKWebView _didFinishScrolling]):
2958 (-[WKWebView scrollViewDidScroll:]):
2959 (-[WKWebView scrollViewDidZoom:]):
2960 (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
2961 (-[WKWebView _scrollViewDidInterruptDecelerating:]):
2962 (-[WKWebView _didScroll]):
2963 (-[WKWebView _enclosingScrollerScrollingEnded:]):
2964 (-[WKWebView _frameOrBoundsChanged]):
2965 (-[WKWebView _scheduleVisibleContentRectUpdate]):
2966 (-[WKWebView _scrollViewIsInStableState:]):
2967 (-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):
2968 (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2969 (-[WKWebView _setObscuredInsets:]):
2970 (-[WKWebView _endInteractiveObscuredInsetsChange]):
2971 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2972 (-[WKWebView _endAnimatedResize]):
2973 (-[WKWebView _updateVisibleContentRects]): Deleted.
2974 (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Deleted.
2975 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2976 * UIProcess/ios/WKContentView.mm:
2977 (-[WKContentView _didCommitLayerTree:]):
2978 * UIProcess/ios/WKContentViewInteraction.mm:
2979 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
2980 (-[WKContentView _stopAssistingNode]):
2981 * UIProcess/ios/WKScrollView.mm:
2982 (-[WKScrollView setContentInset:]):
2983 Have existing callers of _updateVisibleContentRect* instead call
2984 _scheduleVisibleContentRectUpdate*.
2986 In _scheduleVisibleContentRectUpdate, schedule a pre-commit callback
2987 in which we will compute the new visible content rect information
2988 and send it to the Web Content process.
2990 Keep track of the stable state of the scroll view which most recently
2991 scheduled an update, and use that to inform _updateVisibleContentRects.
2992 This matches the previous behavior where the updates might get coalesced
2993 in the Web Content process, and the most recent update wins.
2995 Make a few callers of _updateVisibleContentRectAfterScrollInView
2996 that passed in our scroll view just use _scheduleVisibleContentRectUpdate instead.
2998 2017-02-16 Brent Fulgham <bfulgham@apple.com>
3000 [WebRTC][Mac] Conditionally add sandbox extensions to the Network Process
3001 https://bugs.webkit.org/show_bug.cgi?id=168010
3002 <rdar://problem/30245503>
3004 Reviewed by Youenn Fablet.
3006 Conditionally add sandbox extensions to the Network Process when the WebRTC/Media Capture
3007 features are enabled.
3009 * NetworkProcess/NetworkProcess.h:
3010 * NetworkProcess/NetworkProcessCreationParameters.cpp:
3011 (WebKit::NetworkProcessCreationParameters::encode): Serialize new process configuration flag.
3012 (WebKit::NetworkProcessCreationParameters::decode): Ditto.
3013 * NetworkProcess/NetworkProcessCreationParameters.h:
3014 * NetworkProcess/mac/NetworkProcessMac.mm:
3015 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Remember state of WebRTC for when the
3016 sandbox is established.
3017 (WebKit::NetworkProcess::initializeSandbox): Add ENABLE_WEB_RTC parameter to sandbox launch state.
3018 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Add conditional sandbox expansion to allow
3019 bidirectional network access when the ENABLE_LIBWEBRTC flag is present in the sandbox launch parameters.
3020 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3021 (WebKit::WebProcessPool::platformInitializeWebProcess): Use proper compile guards and check media stream
3022 preference, rather than the peer connection preference.
3023 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Notify NetworkProcess at launch time whether the
3024 user wants WebRTC support.
3026 2017-02-16 Brent Fulgham <bfulgham@apple.com>
3028 [WebRTC][Mac][WebKit2] Initial WebProcess does not support WebRTC
3029 https://bugs.webkit.org/show_bug.cgi?id=168438
3030 <rdar://problem/30401818>
3032 Reviewed by Youenn Fablet.
3034 The sandbox extension for microphone access does not take effect until the second WebProcess
3035 is created, causing the initial browser tab to lack microphone support.
3037 This patch checks the setting earlier in the boot process so that the initial WebProcess
3038 instance gets the correct setting.
3040 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3041 (WebKit::WebProcessPool::platformInitializeWebProcess): Move microphone sandbox extension here, so that the
3042 initial WebProcess has the correct microphone access.
3043 * UIProcess/WebProcessPool.cpp:
3044 (WebKit::WebProcessPool::createNewWebProcess): Move microphone sandbox extension from here to platform-specific file.
3045 (WebKit::WebProcessPool::createWebPage): Remove unneeded preference checks.
3047 2017-02-16 Eric Carlson <eric.carlson@apple.com>
3049 Add WebRTC as an off-by-default experimental feature menu item.
3050 https://bugs.webkit.org/show_bug.cgi?id=167972
3051 <rdar://problem/30293429>
3053 Reviewed by Alex Christensen.
3055 * Shared/WebPreferencesDefinitions.h:
3056 * UIProcess/WebPreferences.cpp:
3057 (WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): We need to enable/disable
3058 peer connection and media stream preferences at the same time, so special case them.
3059 (WebKit::WebPreferences::setEnabledForFeature):
3060 * UIProcess/WebPreferences.h:
3062 2017-02-15 Alex Christensen <achristensen@webkit.org>
3064 Unreviewed, rolling out r212394.
3066 Fixed iOS WebInspector
3070 "Unreviewed, rolling out r212169."
3071 https://bugs.webkit.org/show_bug.cgi?id=166681
3072 http://trac.webkit.org/changeset/212394
3074 2017-02-15 Eric Carlson <eric.carlson@apple.com>
3076 [MediaStream] delete CaptureDeviceInfo struct
3077 https://bugs.webkit.org/show_bug.cgi?id=168395
3079 Reviewed by Sam Weinig.
3081 * Shared/WebCoreArgumentCoders.cpp:
3082 (IPC::ArgumentCoder<CaptureDevice>::encode):
3083 (IPC::ArgumentCoder<CaptureDevice>::decode):
3085 2017-02-15 Anders Carlsson <andersca@apple.com>
3089 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
3090 (WebKit::WebDragClient::startDrag):
3092 2017-02-15 Anders Carlsson <andersca@apple.com>
3094 Attempt to fix the GTK+ build.
3096 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
3097 (WebKit::WebDragClient::startDrag):
3099 2017-02-15 Simon Fraser <simon.fraser@apple.com>
3101 Clean up WebProcessCreationParameters a little
3102 https://bugs.webkit.org/show_bug.cgi?id=168349
3104 Reviewed by Alex Christensen.
3106 Initialize the data members better, and rearrange to group the types in a slightly more space-efficient manner.
3108 * Shared/WebProcessCreationParameters.cpp:
3109 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
3110 * Shared/WebProcessCreationParameters.h:
3112 2017-02-15 Jer Noble <jer.noble@apple.com>
3114 REGRESSION(r183937): Fullscreen Exit animation missing mask
3115 https://bugs.webkit.org/show_bug.cgi?id=168360
3117 Reviewed by Eric Carlson.
3119 In r183937, the fullscreen window's clip layer has it's mask removed when the enter
3120 fullscreen animation completes, allowing low-power video playback mode to be entered. But
3121 this breaks the exit fullscreen animaiton, which assumes a mask is present. Abstract the
3122 mask creation code out into a static helper method, and use it at the beginning of the exit
3123 fullscreen animation to re-create the mask before adding animations to it.
3125 * UIProcess/mac/WKFullScreenWindowController.mm:
3127 (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
3128 (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
3130 2017-02-15 Alex Christensen <achristensen@webkit.org>
3132 Unreviewed, rolling out r212169.
3134 Broke iOS WebInspector
3138 "WebInspector: refactor RemoteInspector to move cocoa specific
3139 code to their own files"
3140 https://bugs.webkit.org/show_bug.cgi?id=166681
3141 http://trac.webkit.org/changeset/212169
3143 2017-02-15 Anders Carlsson <andersca@apple.com>
3145 Modernize DragClient::startDrag somewhat
3146 https://bugs.webkit.org/show_bug.cgi?id=168379
3148 Reviewed by Tim Horton.
3150 Update for WebCore changes.
3152 * WebProcess/WebCoreSupport/WebDragClient.cpp:
3153 (WebKit::WebDragClient::startDrag):
3154 * WebProcess/WebCoreSupport/WebDragClient.h:
3155 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3156 (WebKit::WebDragClient::startDrag):
3158 2017-02-15 Aakash Jain <aakash_jain@apple.com>
3160 Remove WebIOSEvent interface
3161 https://bugs.webkit.org/show_bug.cgi?id=168368
3163 Reviewed by Tim Horton.
3165 * Shared/NativeWebKeyboardEvent.h: Using WebEvent from WebCore instead of WebIOSEvent.
3166 * Shared/ios/NativeWebKeyboardEventIOS.mm: Ditto.
3167 * Shared/ios/WebIOSEventFactory.h: Ditto.
3168 * Shared/ios/WebIOSEventFactory.mm: Ditto.
3169 * UIProcess/ios/WKContentViewInteraction.h: Ditto.
3170 * UIProcess/ios/WKContentViewInteraction.mm: Ditto.
3171 * UIProcess/API/C/WKPage.cpp: Using WebEvent from WebKit.
3173 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3175 [GTK] Update cookie manager API to properly work with ephemeral sessions
3176 https://bugs.webkit.org/show_bug.cgi?id=168230
3178 Reviewed by Michael Catanzaro.
3180 WebKitCookieManager is associated to a particular WebKitWebContext and uses the default session ID
3181 unconditionally. It should be associated to a WebKitWebsiteDataManager instead and use its session ID. This
3182 patch also adds support for handling cookies with WebKitWebsiteDataManager and deprecates
3183 webkit_cookie_manager_get_domains_with_cookies(), webkit_cookie_manager_delete_cookies_for_domain() and
3184 webkit_cookie_manager_delete_all_cookies(). It also adds API to get the the WebKitWebsiteDataManager of a
3185 WebKitWebView, since it's the only way to get the WebKitCookieManager associated to an ephemeral web view.
3187 * UIProcess/API/gtk/WebKitCookieManager.cpp:
3188 (webkitCookieManagerDispose): Stop observing cookie changes.
3189 (webkit_cookie_manager_class_init): Add dispose implementation.
3190 (webkitCookieManagerCreate): Create the WebKitCookieManager with a WebKitWebsiteDataManager.
3191 (webkit_cookie_manager_set_persistent_storage): Work with all contexts having the session.
3192 (webkit_cookie_manager_set_accept_policy): Ditto.
3193 (webkit_cookie_manager_get_accept_policy): Use any context having the session.
3194 (webkit_cookie_manager_get_domains_with_cookies): Deprecate and implement using WebKitWebsiteDataManager.
3195 (webkit_cookie_manager_get_domains_with_cookies_finish): Ditto.
3196 (webkit_cookie_manager_delete_cookies_for_domain): Ditto.
3197 (webkit_cookie_manager_delete_all_cookies): Ditto.
3198 * UIProcess/API/gtk/WebKitCookieManager.h:
3199 * UIProcess/API/gtk/WebKitCookieManagerPrivate.h:
3200 * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp:
3201 (attachCustomProtocolManagerClientToContext):
3202 * UIProcess/API/gtk/WebKitDownloadClient.cpp:
3203 (attachDownloadClientToContext):
3204 * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
3205 (attachInjectedBundleClientToContext):
3206 * UIProcess/API/gtk/WebKitSecurityManager.cpp:
3207 (registerSecurityPolicyForURIScheme):
3208 * UIProcess/API/gtk/WebKitWebContext.cpp:
3209 (webkitWebContextConstructed): Call webkitWebsiteDataManagerAddProcessPool.
3210 (webkitWebContextDispose): Call webkitWebsiteDataManagerRemoveProcessPool.
3211 (webkit_web_context_get_cookie_manager): Return the WebKitCookieManager of the WebKitWebsiteDataManager.
3212 (webkitWebContextGetProcessPool): Make it return a reference.
3213 * UIProcess/API/gtk/WebKitWebContextPrivate.h:
3214 * UIProcess/API/gtk/WebKitWebView.cpp:
3215 (webkitWebViewConstructed): Call webkitWebsiteDataManagerAddProcessPool when creating a ephemeral web view.
3216 (webkitWebViewDispose): Call webkitWebsiteDataManagerRemoveProcessPool if needed.
3217 (webkit_web_view_get_website_data_manager): Return the WebKitWebsiteDataManager or the context one.
3218 * UIProcess/API/gtk/WebKitWebView.h:
3219 * UIProcess/API/gtk/WebKitWebsiteData.cpp: Add support for Cookies type.
3220 (recordContainsSupportedDataTypes):
3221 (toWebKitWebsiteDataTypes):
3222 * UIProcess/API/gtk/WebKitWebsiteData.h:
3223 * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
3224 (_WebKitWebsiteDataManagerPrivate::~_WebKitWebsiteDataManagerPrivate): Ensure all contexts were unregistered.
3225 (webkitWebsiteDataManagerAddProcessPool): Register the process pool in the session.
3226 (webkitWebsiteDataManagerRemoveProcessPool): Unregister the process poll from the session.
3227 (webkitWebsiteDataManagerGetProcessPools): Return the list of proces pools registered.
3228 (webkit_website_data_manager_get_cookie_manager): Return the WebKitCookieManager.
3229 (toWebsiteDataTypes): Add Cookies.
3230 * UIProcess/API/gtk/WebKitWebsiteDataManager.h:
3231 * UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h:
3232 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
3233 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
3234 (WebKit::WebsiteDataRecord::displayNameForCookieHostName): Handle localhost as a special case here for backwards
3237 2017-02-14 Wenson Hsieh <wenson_hsieh@apple.com>
3239 [WK2] Support data interaction on links
3240 https://bugs.webkit.org/show_bug.cgi?id=168331
3241 <rdar://problem/30200837>
3243 Reviewed by Tim Horton.
3245 Adds support for data interaction on links at the client layer for WebKit2. This involves several changes,
3246 detailed in the per-method changes below:
3248 * Shared/ios/InteractionInformationAtPosition.h:
3249 * Shared/ios/InteractionInformationAtPosition.mm:
3250 (WebKit::InteractionInformationAtPosition::encode):
3251 (WebKit::InteractionInformationAtPosition::decode):
3253 Add adjustedPointForNodeRespondingToClickEvents (the request point, adjusted to take nodeRespondingToClickEvents
3254 into account) to InteractionInformationAtPosition. The web process sends this adjusted point over to the UI
3255 process so that the UI process will be able to begin a data interaction at the adjusted point rather than the
3256 request point, which is necessary for small clickable (and data-interactive) elements such as links.
3258 * UIProcess/ios/WKActionSheet.h:
3259 * UIProcess/ios/WKActionSheet.mm:
3260 (-[WKActionSheet presentSheet:]):
3261 (-[WKActionSheet _presentationRectForStyle:]):
3262 (-[WKActionSheet updateSheetPosition]):
3263 * UIProcess/ios/WKActionSheetAssistant.h:
3264 * UIProcess/ios/WKActionSheetAssistant.mm:
3265 (-[WKActionSheetAssistant presentationRectForElementUsingClosestIndicatedRect]):
3266 (-[WKActionSheetAssistant presentationRectForIndicatedElement]):
3267 (-[WKActionSheetAssistant showImageSheet]):
3268 (-[WKActionSheetAssistant _shouldPresentAtTouchLocationForElementRect:]):
3269 (-[WKActionSheetAssistant needsLinkIndicator]):
3270 (-[WKActionSheetAssistant showLinkSheet]):
3271 (-[WKActionSheetAssistant cleanupSheet]):
3272 (-[WKActionSheetAssistant _presentationStyleForImageAtElementRect:]): Deleted.
3274 Add support for the WKActionSheetPresentAtClosestIndicatorRect style of presenting an action sheet. When
3275 showing the action sheet for a link and there is space along the margins to show a popover in the first place,
3276 we will now target the popover rect to the bounding rect of the set of adjacent (or nearly-adjacent) element
3277 rects closest to the user's touch location. This covers cases where the link is split into multiple rects due to
3278 a line break, when the link is on multiple lines with a jagged rect per line, and when both of the above are
3281 * UIProcess/ios/WKContentViewInteraction.mm:
3282 (-[WKContentView pointIsInDataInteractionContent:]):
3283 (-[WKContentView _positionInformationDidChange:]):
3284 (-[WKContentView positionInformationForActionSheetAssistant:]):
3285 (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
3287 Include link indicator data in the position information request if needed. As the FIXME suggests, this can be
3288 improved by asynchronously presenting the action sheet assistant after the request returns, and is something we
3289 should address in the future.
3291 * WebProcess/WebPage/ios/WebPageIOS.mm:
3292 (WebKit::WebPage::getPositionInformation):
3294 2017-02-14 Jason Rinn <jrinn@apple.com>
3296 Add new WKWebKit Cocoa API for getContentsAsString.
3297 https://bugs.webkit.org/show_bug.cgi?id=168147
3298 <rdar://problem/30502539>
3300 Reviewed by Tim Horton.
3302 * UIProcess/API/Cocoa/WKWebView.mm:
3303 (-[WKWebView _getContentsAsStringWithCompletionHandler:]): New API for getContentsAsString.
3304 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3306 2017-02-14 Chris Dumez <cdumez@apple.com>
3308 HTML Form Validation bubble should take minimum font size setting into consideration
3309 https://bugs.webkit.org/show_bug.cgi?id=168271
3310 <rdar://problem/29869869>
3312 Reviewed by Simon Fraser.
3314 * UIProcess/API/Cocoa/WKWebView.mm:
3315 (-[WKWebView _contentsOfUserInterfaceItem:]):
3316 Return font size used in the validation bubble.
3318 * UIProcess/PageClient.h:
3319 * UIProcess/ios/PageClientImplIOS.h:
3320 * UIProcess/ios/PageClientImplIOS.mm:
3321 (WebKit::PageClientImpl::createValidationBubble):
3322 * UIProcess/ios/WebPageProxyIOS.mm:
3323 (WebKit::WebPageProxy::showValidationMessage):
3324 * UIProcess/mac/PageClientImpl.h:
3325 * UIProcess/mac/PageClientImpl.mm:
3326 (WebKit::PageClientImpl::createValidationBubble):
3327 * UIProcess/mac/WebPageProxyMac.mm:
3328 (WebKit::WebPageProxy::showValidationMessage):
3329 Pass minimum font size setting when constructing the form validation bubble.
3331 2017-02-14 Commit Queue <commit-queue@webkit.org>
3333 Unreviewed, rolling out r211879.
3334 https://bugs.webkit.org/show_bug.cgi?id=168330
3336 Not ready for the menu yet (Requested by eric_car_ on
3341 "Add WebRTC as an off-by-default experimental feature menu
3343 https://bugs.webkit.org/show_bug.cgi?id=167972
3344 http://trac.webkit.org/changeset/211879
3346 2017-02-14 Simon Fraser <simon.fraser@apple.com>
3348 Add logging and defensive fixes to try to detect problems causing blank tabs
3349 https://bugs.webkit.org/show_bug.cgi?id=168270
3350 rdar://problem/30505482
3352 Reviewed by Jon Lee.
3354 Add release logging when -[WKWebView _beginAnimatedResizeWithUpdates:] and -[WKWebView _endAnimatedResize]
3355 are unbalanced across a commit, to detect cases where _endAnimatedResize wasn't called enough times.
3357 Also log when RemoteLayerTreeHost::updateLayerTree() fails to find a root layer, which should never happen.
3359 In WebPageProxy, clear m_firstLayerTreeTransactionIdAfterDidCommitLoad on a web process crash.
3361 * Platform/Logging.h:
3362 * UIProcess/API/Cocoa/WKWebView.mm:
3363 (-[WKWebView _didCommitLayerTree:]):
3364 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3365 (-[WKWebView _endAnimatedResize]):
3366 * UIProcess/WebPageProxy.cpp:
3367 (WebKit::WebPageProxy::resetState):
3368 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3369 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3370 (WebKit::RemoteLayerTreeDrawingAreaProxy::isAlwaysOnLoggingAllowed):
3371 * UIProcess/mac/RemoteLayerTreeHost.mm:
3372 (WebKit::RemoteLayerTreeHost::updateLayerTree):
3373 (WebKit::RemoteLayerTreeHost::clearLayers):
3374 * WebProcess/WebPage/WebFrame.cpp:
3375 (WebKit::WebFrame::WebFrame):
3376 * WebProcess/WebPage/WebFrame.h:
3378 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3380 Allow to use stored credentials also for downloads started by DownloadManager::startDownload
3381 https://bugs.webkit.org/show_bug.cgi?id=167584
3383 Reviewed by Michael Catanzaro.
3385 Cliking on a link that triggers a download works on an already HTTP authenticated site works, but right clicking
3386 and downloading from the context menu shows the HTTP auth dialog again. This is because PendingDownload uses
3387 DoNotAllowStoredCredentials unconditionally. We want to allow using cached credentials at least for
3388 non-ephemeral sessions.
3390 * NetworkProcess/Downloads/DownloadManager.cpp:
3391 (WebKit::DownloadManager::startDownload):
3393 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3395 [GTK] Make DragImageRef a RefPtr instead of a plain pointer
3396 https://bugs.webkit.org/show_bug.cgi?id=168296
3398 Reviewed by Sergio Villar Senin.
3400 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
3401 (WebKit::WebDragClient::startDrag):
3403 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3405 [SOUP] Ensure a response MIME type when Content-Type is missing and sniffing not allowed
3406 https://bugs.webkit.org/show_bug.cgi?id=168299
3408 Reviewed by Sergio Villar Senin.
3410 Sniffing is not allowed but we can try to guess the MIME using the response path, or at least fallback to
3411 default MIME type instead of leaving an empty string. This matches what mac port does.
3413 Fixes: http/tests/inspector/network/fetch-response-body.html
3414 http/tests/inspector/network/xhr-response-body.html
3416 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3417 (WebKit::NetworkDataTaskSoup::didSendRequest):
3419 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3421 CookieManager only works with the default session
3422 https://bugs.webkit.org/show_bug.cgi?id=168229
3424 Reviewed by Alex Christensen.
3426 Make CookieManager session aware by adding a SessionID parameter to all its functions, and update all the callers
3427 to pass the default session ID, preserving the current
3428 behavior. WebCookieManagerProxy::startObservingCookieChanges() now also receives an optional callback to be
3429 called on every change.
3431 * UIProcess/API/C/WKCookieManager.cpp:
3432 (WKCookieManagerGetHostnamesWithCookies):
3433 (WKCookieManagerDeleteCookiesForHostname):
3434 (WKCookieManagerDeleteAllCookies):
3435 (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
3436 (WKCookieManagerStartObservingCookieChanges):
3437 (WKCookieManagerStopObservingCookieChanges):
3438 * UIProcess/API/gtk/WebKitCookieManager.cpp:
3439 (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate):
3440 (webkitCookieManagerCreate):
3441 (webkit_cookie_manager_set_persistent_storage):
3442 (webkit_cookie_manager_get_domains_with_cookies):
3443 (webkit_cookie_manager_delete_cookies_for_domain):
3444 (webkit_cookie_manager_delete_all_cookies):
3445 * UIProcess/Automation/WebAutomationSession.cpp:
3446 (WebKit::WebAutomationSession::addSingleCookie):
3447 (WebKit::WebAutomationSession::deleteAllCookies):
3448 * UIProcess/WebCookieManagerProxy.cpp:
3449 (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
3450 (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
3451 (WebKit::WebCookieManagerProxy::deleteAllCookies):
3452 (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
3453 (WebKit::WebCookieManagerProxy::addCookie):
3454 (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
3455 (WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
3456 (WebKit::WebCookieManagerProxy::cookiesDidChange):
3457 * UIProcess/WebCookieManagerProxy.h:
3458 * UIProcess/WebCookieManagerProxy.messages.in:
3459 * WebProcess/Cookies/WebCookieManager.cpp:
3460 (WebKit::WebCookieManager::WebCookieManager):
3461 (WebKit::WebCookieManager::getHostnamesWithCookies):
3462 (WebKit::WebCookieManager::deleteCookiesForHostname):
3463 (WebKit::WebCookieManager::deleteAllCookies):
3464 (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
3465 (WebKit::WebCookieManager::addCookie):
3466 (WebKit::WebCookieManager::startObservingCookieChanges):
3467 (WebKit::WebCookieManager::stopObservingCookieChanges):
3468 * WebProcess/Cookies/WebCookieManager.h:
3469 * WebProcess/Cookies/WebCookieManager.messages.in:
3471 2017-02-14 Tomas Popela <tpopela@redhat.com>
3473 Unreviewed, fix documentation typo
3475 * UIProcess/API/gtk/WebKitEditingCommands.h:
3477 2017-02-12 Brian Burg <bburg@apple.com>
3479 Web Inspector: expose system user interface layout direction through InspectorFrontendHost
3480 https://bugs.webkit.org/show_bug.cgi?id=168209
3481 <rdar://problem/11573736>
3483 Reviewed by Joseph Pecoraro.
3485 Forward the UserInterfaceLayoutDirection of the inspector page. If the WebKit client has
3486 properly set the UI directionality from system settings in PageClient, this will get inherited
3487 automatically by the Inspector's WebPage instance.
3489 * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
3490 (WebKit::RemoteWebInspectorUI::userInterfaceLayoutDirection):
3491 * WebProcess/WebPage/RemoteWebInspectorUI.h:
3492 * WebProcess/WebPage/WebInspectorUI.cpp:
3493 (WebKit::WebInspectorUI::userInterfaceLayoutDirection):
3494 * WebProcess/WebPage/WebInspectorUI.h:
3496 2017-02-13 Youenn Fablet <youennf@gmail.com>
3498 [WebRTC] Creating RTCPeerConnection with libwebrtc backend is crashing on rwt
3499 https://bugs.webkit.org/show_bug.cgi?id=168250
3501 Reviewed by Alex Christensen.
3503 * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
3504 (WebKit::LibWebRTCProvider::createPeerConnection):
3505 * WebProcess/Network/webrtc/LibWebRTCProvider.h:
3506 * WebProcess/Network/webrtc/LibWebRTCSocket.h:
3507 * WebProcess/Network/webrtc/WebRTCMonitor.cpp:
3508 (WebKit::WebRTCMonitor::StartUpdating):
3509 (WebKit::WebRTCMonitor::networksChanged):
3510 * WebProcess/Network/webrtc/WebRTCMonitor.h:
3511 * WebProcess/Network/webrtc/WebRTCResolver.cpp:
3512 (WebKit::WebRTCResolver::setResolvedAddress):
3513 (WebKit::WebRTCResolver::resolvedAddressError):
3514 * WebProcess/Network/webrtc/WebRTCSocket.cpp:
3515 (WebKit::WebRTCSocket::signalOnNetworkThread):
3517 2017-02-13 Megan Gardner <megan_gardner@apple.com>
3519 Implement Drag cancels
3520 https://bugs.webkit.org/show_bug.cgi?id=168266
3522 Reviewed by Wenson Hsieh.
3524 Adds support for the UI Process to cancel already started drag events.
3526 * UIProcess/WebPageProxy.cpp:
3527 (WebKit::WebPageProxy::cancelledDrag):
3528 * UIProcess/WebPageProxy.h:
3529 * WebProcess/WebPage/WebPage.h:
3530 (WebKit::WebPage::cancelledDrag):
3531 * WebProcess/WebPage/WebPage.messages.in:
3533 2017-02-13 Simon Fraser <simon.fraser@apple.com>
3535 Call WKDestroyRenderingResources() on iOS when tabs are backgrounded
3536 https://bugs.webkit.org/show_bug.cgi?id=168261
3537 rdar://problem/30481079
3539 Reviewed by Tim Horton.
3541 There's code to call CABackingStoreCollectBlocking() on a 10s timer that exists for Mac, but on iOS
3542 the web processes are suspended before this timer fires. So call CABackingStoreCollectBlocking()
3543 from WebProcess::actualPrepareToSuspend(), which is where we also trigger the markAllLayersVolatile()
3546 Also add CABackingStoreCollectBlocking() to QuartzCoreSPI.h so we can use it without using WKSI.
3548 Release-log how long this takes, in case we get reports of bad performance. In my testing it could be up to 10ms.
3550 * WebProcess/WebProcess.cpp:
3551 (WebKit::WebProcess::actualPrepareToSuspend):
3552 * WebProcess/cocoa/WebProcessCocoa.mm:
3553 (WebKit::WebProcess::destroyRenderingResources):
3555 2017-02-13 Brady Eidson <beidson@apple.com>
3557 Followup to: Replace all WebKit Library Version checks in WK2 with SDK version checks.
3558 https://bugs.webkit.org/show_bug.cgi?id=168124
3560 Reviewed by Geoffrey Garen.
3562 * UIProcess/Cocoa/VersionChecks.h:
3564 2017-02-13 Wenson Hsieh <wenson_hsieh@apple.com>
3566 [WK2] Add test infrastructure and unit tests for data interaction
3567 https://bugs.webkit.org/show_bug.cgi?id=168159
3568 <rdar://problem/30477634>
3570 Reviewed by Tim Horton.
3572 Adds support at the WebKit2 layer for testing data interaction. Introduces the _WKTestingDelegate, which a
3573 protocol which can specified for a WKWebView and used to install mock objects and simulate the state of the
3574 platform. By default, this delegate is nil, which results in normal behavior. For data interaction, we are able
3575 to specify a mock data interaction gesture recognizer for use by the WKContentView to simulate firing a long
3576 press and subsequent movement. This gesture recognizer is used in place of the regular data interaction gesture
3577 recognizer, and allows for TestWebKitAPI to drive interaction without actually sending events through the
3578 UIApplication. The _WKTestingDelegate also contains optional method hooks which are invoked at key points in
3579 time when performing a data interaction gesture.
3581 Since all methods of the testing delegate are optional, the testing delegate can be easily extended to support
3582 testing for other features -- the idea is that leaving all but the relevant methods in the protocol
3583 unimplemented will result in default behavior for everything other than those methods, so a client need only
3584 implement and add WebKit2 hooks for a few methods to support testing for a new feature.
3586 * UIProcess/API/Cocoa/WKWebView.mm:
3587 (-[WKWebView _testingDelegate]):
3588 (-[WKWebView _setTestingDelegate:]):
3590 Specify the testing delegate to use for this WKWebView (see above for more details).
3592 (-[WKWebView _simulateDataInteractionGestureRecognized]):
3593 (-[WKWebView _simulateDataInteractionEntered:]):
3594 (-[WKWebView _simulateDataInteractionUpdated:]):
3595 (-[WKWebView _simulateDataInteractionPerformOperation:]):
3596 (-[WKWebView _simulateDataInteractionEnded:]):
3597 (-[WKWebView _simulateDataInteractionSessionDidEnd:withOperation:]):
3598 (-[WKWebView _simulateFailedDataInteractionWithIndex:]):
3599 (-[WKWebView _simulateWillBeginDataInteractionWithIndex:withSession:]):
3600 (-[WKWebView _simulatedItemsForDataInteractionWithIndex:]):
3602 Used by TestWebKitAPI to drive data interaction tests. See DataInteractionTests.mm.
3604 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3605 * UIProcess/API/Cocoa/_WKTestingDelegate.h: Added.
3606 * UIProcess/ios/WKContentViewInteraction.h:
3607 * UIProcess/ios/WKContentViewInteraction.mm:
3608 (-[WKContentView setupInteraction]):
3609 (-[WKContentView _dataInteractionGestureRecognizer]):
3610 * WebKit2.xcodeproj/project.pbxproj:
3612 2017-02-13 Eric Carlson <eric.carlson@apple.com>
3614 [MediaStream Mac] Video capture needs access to /Library/CoreMediaIO/Plug-Ins/DAL/
3615 https://bugs.webkit.org/show_bug.cgi?id=168244
3616 <rdar://problem/30461158>
3618 Reviewed by Brady Eidson.
3620 * WebProcess/com.apple.WebProcess.sb.in: Grant read-access to the video capture
3621 plug-in directory when enabling video capture.
3623 2017-02-13 Antti Koivisto <antti@apple.com>
3625 Disable mmap'd cache files if container is class A
3626 https://bugs.webkit.org/show_bug.cgi?id=168241
3627 <rdar://problem/23676252>
3629 Reviewed by JF Bastien and Chris Dumez.
3631 If the mmap'd cache file gets evicted and the device is locked,
3632 then WebContent won't be able to bring the file back in under
3633 class A, causing SIGBUS.
3635 In those circumstances, don't use mmap'd files.
3637 * NetworkProcess/cache/NetworkCache.h:
3638 (WebKit::NetworkCache::Cache::canUseSharedMemoryForBodyData):
3639 * NetworkProcess/cache/NetworkCacheEntry.cpp:
3640 (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
3642 Don't initialize the shareable resource handle for the map if forbidden.
3644 * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
3645 (WebKit::NetworkCache::canUseSharedMemoryForPath):
3647 Query the system for the protection status of the cache path.
3649 * NetworkProcess/cache/NetworkCacheFileSystem.h:
3650 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3651 (WebKit::NetworkCache::Storage::Storage):
3652 * NetworkProcess/cache/NetworkCacheStorage.h:
3653 (WebKit::NetworkCache::Storage::canUseSharedMemoryForBodyData):
3655 2017-02-13 Youenn Fablet <youennf@gmail.com>
3657 [WebRTC] libwebrtc socket factory is not assigning the right socket type
3658 https://bugs.webkit.org/show_bug.cgi?id=168233
3660 Reviewed by Brent Fulgham.
3662 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
3663 (WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
3664 (WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
3666 2017-02-13 Michael Catanzaro <mcatanzaro@igalia.com>
3668 [GTK] Unreviewed, add missing precondition check
3670 * WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp:
3671 (webkit_web_editor_get_page):
3673 2017-02-13 Michael Catanzaro <mcatanzaro@igalia.com>
3675 Unreviewed, fix another docs typo.
3677 * UIProcess/API/gtk/WebKitEditingCommands.h:
3679 2017-02-12 Michael Catanzaro <mcatanzaro@igalia.com>
3681 [GTK] Improve documentation of webkit_context_menu_set_user_data()
3682 https://bugs.webkit.org/show_bug.cgi?id=168214
3684 Reviewed by Carlos Garcia Campos.
3686 * UIProcess/API/gtk/WebKitContextMenu.cpp:
3688 2017-02-12 Dan Bernstein <mitz@apple.com>
3690 Tried to fix USE(APPLE_INTERNAL_SDK) builds after r212211.
3692 * UIProcess/mac/WebContextMenuProxyMac.mm:
3693 (WebKit::WebContextMenuProxyMac::createShareMenuItem): Use non-deprecated method.
3695 2017-02-12 Dan Bernstein <mitz@apple.com>
3697 [Cocoa] Some -respondsToSelector: checks are unnecessary
3698 https://bugs.webkit.org/show_bug.cgi?id=168183
3700 Reviewed by Tim Horton.
3702 * Platform/mac/LayerHostingContext.mm:
3703 (WebKit::LayerHostingContext::setColorMatchUntaggedContent): Removed unnecessary
3704 -respondsToSelector: check.
3705 (WebKit::LayerHostingContext::colorMatchUntaggedContent): Ditto.
3707 * Platform/mac/MenuUtilities.mm:
3708 (WebKit::menuItemTitleForTelephoneNumberGroup): Ditto.
3710 * Platform/spi/ios/UIKitSPI.h: Moved declaration of
3711 -[UIScrollView _isInterruptingDeceleration] from WKWebView.mm to the
3712 !USE(APPLE_INTERNAL_SDK) section here.
3714 * Shared/mac/ChildProcessMac.mm:
3715 (WebKit::ChildProcess::setSharedHTTPCookieStorage): Removed unnecessary -respondsToSelector:
3718 * Shared/mac/WebEventFactory.mm:
3719 (WebKit::typeForEvent): Ditto.
3721 * UIProcess/API/Cocoa/WKWebView.mm:
3722 (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Ditto.
3724 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
3725 (WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup): Ditto.
3727 * UIProcess/Cocoa/WebViewImpl.mm:
3728 (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly): Ditto.
3730 * UIProcess/WKImagePreviewViewController.mm:
3731 (-[WKImagePreviewViewController previewActions]): Removed check whether _WKElementAction
3732 responds to -runActionWithElementInfo:.
3734 * UIProcess/ios/WKActionSheetAssistant.mm:
3735 (-[WKActionSheetAssistant showDataDetectorsSheet]): Ditto.
3737 * UIProcess/ios/WKContentViewInteraction.mm:
3738 (-[WKContentView _lookup:]): Ditto.
3739 (-[WKContentView _share:]): Ditto.
3740 (-[WKContentView _addShortcut:]): Ditto.
3741 (-[WKContentView _promptForReplace:]): Ditto.
3742 (-[WKContentView _transliterateChinese:]): Ditto.
3743 (-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Removed call to
3744 -[UIKeyboardImpl didHandleWebKeyEvent], which is a no-op.
3745 (-[WKContentView _interpretKeyEvent:isCharEvent:]): Removed unnecessary -respondsToSelector:
3747 (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Ditto.
3749 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
3750 (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence): Ditto.
3752 * UIProcess/mac/WKImmediateActionController.mm:
3753 (-[WKImmediateActionController _animationControllerForDataDetectedText]): Ditto.
3755 * UIProcess/mac/WebContextMenuProxyMac.mm:
3756 (WebKit::WebContextMenuProxyMac::createShareMenuItem): Ditto.
3758 2017-02-12 Michael Catanzaro <mcatanzaro@igalia.com>
3760 [GTK] Unreviewed, minor documentation improvements
3762 * UIProcess/API/gtk/WebKitWebView.cpp:
3763 (webkit_web_view_class_init):
3764 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3765 (webkit_web_page_class_init):
3767 2017-02-12 Carlos Garcia Campos <cgarcia@igalia.com>
3769 [SOUP] Downloads fail when the given destination is not a URI
3770 https://bugs.webkit.org/show_bug.cgi?id=168187
3772 Reviewed by Michael Catanzaro.
3774 It always expects a uri, and fails if a local path is given.
3776 Fixes: http/tests/download/anchor-download-no-extension.html
3777 http/tests/download/area-download.html
3778 http/tests/security/anchor-download-allow-data.html
3779 http/tests/security/anchor-download-allow-sameorigin.html
3781 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3782 (WebKit::NetworkDataTaskSoup::download): Use g_file_new_for_path() if the pending destination is a path instead
3785 2017-02-12 Carlos Garcia Campos <cgarcia@igalia.com>
3787 [GTK] Handle caps lock indicator in event modifiers
3788 https://bugs.webkit.org/show_bug.cgi?id=168186
3790 Reviewed by Michael Catanzaro.
3792 Use PlatformKeyboardEvent::modifiersContainCapsLock() to check if modifiers contain the caps lock and add
3793 Modifiers::CapsLockKey in that case.
3795 * Shared/gtk/WebEventFactory.cpp:
3796 (WebKit::modifiersForEvent):
3797 * UIProcess/API/gtk/WebKitPrivate.cpp:
3798 (wkEventModifiersToGdkModifiers):
3801 2017-02-12 Andy Estes <aestes@apple.com>
3803 [iOS] PDF page number indicator can show "0 of n" on short pages
3804 https://bugs.webkit.org/show_bug.cgi?id=168185
3806 Reviewed by Tim Horton.
3808 When viewing a PDF with a last page that is shorter than the frame height, it's possible
3809 (thanks to rubber-banding) to scroll down until the page no longer intersects the rect we
3810 use to determine the center page. When this happens, the page number indicator displays
3813 Fix this by handling cases where the first page starts below the center page rect or the
3814 last page ends above it.
3816 * UIProcess/ios/WKPDFView.mm:
3817 (-[WKPDFView _revalidateViews]):
3819 2017-02-11 Alex Christensen <achristensen@webkit.org>
3821 Fix crashes after [NSURLSession invalidateAndCancel]
3822 https://bugs.webkit.org/show_bug.cgi?id=168181
3823 <rdar://problem/29813868>
3825 Reviewed by Brady Eidson.
3827 When we call NetworkSessionCocoa::invalidateAndCancel, we intend for the session to immediately
3828 become invalid and stop doing things. [NSURLSession invalidateAndCancel] asynchronously cancels
3829 everything and then calls the delegate's didBecomeInvalidWithError, so before this change there
3830 is a time when we have torn down the session with SessionTracker::destroySession but we can still
3831 get a delegate callback which assumes the session and its NetworkStorageSession exists. If we
3832 get any delegate callbacks after a NetworkSession has been invalidated, we will want to ignore them.
3834 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3835 (-[WKNetworkSessionDelegate sessionInvalidated]):
3836 (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]):
3837 (-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
3838 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
3839 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
3840 (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
3841 (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
3842 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
3843 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
3844 (-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
3845 (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
3846 (-[WKNetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]):
3847 (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
3848 The pointer to the NetworkSessionCocoa can now be null. We need to check it.
3849 (WebKit::NetworkSessionCocoa::invalidateAndCancel):
3850 Synchronously remove the connection between the delegates and the NetworkSessionCocoa.
3852 2017-02-10 John Wilander <wilander@apple.com>
3854 Updates to Resource Load Statistics: Get the right website data store and introduce timeout for user interaction
3855 https://bugs.webkit.org/show_bug.cgi?id=167474
3856 <rdar://problem/24681808>
3857 <rdar://problem/24703286>
3858 <rdar://problem/30290270>
3860 This patch does the following:
3861 1. Gets the right website data store. API::WebsiteDataStore::defaultDataStore()
3862 does not provide the right data store.
3863 2. Introduces timeout for user interaction. A domain needs interaction every 30
3864 days to stay in that category.
3865 3. Adds grandfathered to the statistics model in preparation for grandfathering of
3866 existing data records.
3867 4. Adds test infrastructure to allow testing of the various rules in place for
3868 data records removal.
3869 5. Fixes various smaller bugs that were found as part of setting up the tests.
3870 6. Regresses the data records removal counting. We need to come up with a thread
3871 safe way of gathering removal statistics from more than one data store now
3872 that we potentially interact with multiple stores.
3873 7. Adds a first set of layout tests for resource load statistics.
3875 Reviewed by Andy Estes.
3877 * PlatformEfl.cmake:
3878 Added UIProcess/WebResourceLoadStatisticsManager.cpp and
3879 UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
3880 * PlatformGTK.cmake:
3881 Added UIProcess/WebResourceLoadStatisticsManager.cpp and
3882 UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
3883 * PlatformMac.cmake:
3884 Added UIProcess/WebResourceLoadStatisticsManager.cpp and
3885 UIProcess/API/C/WKResourceLoadStatisticsManager.cpp.
3886 * Shared/API/APIObject.h:
3887 Adds WebResourceLoadStatisticsManager to the Type enum.
3888 * Shared/API/c/WKBase.h:
3889 Typedef of WKResourceLoadStatisticsManagerRef.
3890 * Shared/WebCoreArgumentCoders.cpp:
3891 (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
3892 (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
3893 Adds support for statistics mostRecentUserInteraction, grandfathered, and
3895 * UIProcess/API/C/WKAPICast.h:
3896 Adds API mapping between WKResourceLoadStatisticsManagerRef and
3897 WebResourceLoadStatisticsManager.
3898 * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp: Added.
3899 (WKResourceLoadStatisticsManagerGetTypeID):
3900 (WKResourceLoadStatisticsManagerSetPrevalentResource):
3901 (WKResourceLoadStatisticsManagerIsPrevalentResource):
3902 (WKResourceLoadStatisticsManagerSetHasHadUserInteraction):
3903 (WKResourceLoadStatisticsManagerIsHasHadUserInteraction):
3904 (WKResourceLoadStatisticsManagerSetTimeToLiveUserInteraction):
3905 (WKResourceLoadStatisticsManagerFireDataModificationHandler):
3906 (WKResourceLoadStatisticsManagerSetNotifyPagesWhenDataRecordsWereScanned):
3907 (WKResourceLoadStatisticsManagerSetShouldClassifyResourcesBeforeDataRecordsRemoval):
3908 (WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
3909 (WKResourceLoadStatisticsManagerResetToConsistentState):
3910 API level bridge to WebResourceLoadStatisticsManager functions.
3911 * UIProcess/API/C/WKResourceLoadStatisticsManager.h: Added.
3912 * UIProcess/WebProcessProxy.cpp:
3913 (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyOwnedDomainsInAllPersistentDataStores):
3914 A way to delete website data in persistent store(s) configured by the
3915 embedding client. API::WebsiteDataStore::defaultDataStore() does not
3916 do this which caused us to skip session storage.
3917 * UIProcess/WebProcessProxy.h:
3918 * UIProcess/WebResourceLoadStatisticsManager.cpp: Added.
3919 (WebKit::WebResourceLoadStatisticsManager::setPrevalentResource):
3920 (WebKit::WebResourceLoadStatisticsManager::isPrevalentResource):
3921 (WebKit::WebResourceLoadStatisticsManager::setHasHadUserInteraction):
3922 (WebKit::WebResourceLoadStatisticsManager::hasHadUserInteraction):
3923 (WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
3924 (WebKit::WebResourceLoadStatisticsManager::fireDataModificationHandler):
3925 (WebKit::WebResourceLoadStatisticsManager::setNotifyPagesWhenDataRecordsWereScanned):
3926 (WebKit::WebResourceLoadStatisticsManager::setShouldClassifyResourcesBeforeDataRecordsRemoval):
3927 (WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
3928 (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
3929 Static functions to manage the state and behavior of the UI process'
3930 resource load statistics store.
3931 * UIProcess/WebResourceLoadStatisticsManager.h: Added.
3932 (WebKit::WebResourceLoadStatisticsManager::create):
3933 * UIProcess/WebResourceLoadStatisticsStore.cpp:
3934 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
3935 An effect of a member variable rename. See header file comment below.
3936 (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned):
3937 (WebKit::WebResourceLoadStatisticsStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
3938 (WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval):
3939 Three static functions for controlling the behavior of the store.
3940 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
3942 1. Covers all data record types.
3943 2. Allows data removal when m_lastTimeDataRecordsWereRemoved is not set.
3944 3. Moves the heavy lifting to WebsiteDataStore (see below).
3945 4. No longer counts removed data regressions.
3946 (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
3948 (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
3949 WebResourceLoadStatisticsStore::processStatisticsAndDataRecords() is
3950 broken out of WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated
3951 to allow for statistics processing without prior classification.
3952 Tests need to set statistics and a run of the classifier may
3954 (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
3955 Sets the notification callback which calls
3956 WebResourceLoadStatisticsStore::processStatisticsAndDataRecords().
3957 * UIProcess/WebResourceLoadStatisticsStore.h:
3958 (WebKit::WebResourceLoadStatisticsStore::coreStore):
3959 Renamed m_resourceStatisticsStore to m_resourceLoadStatisticsStore to
3960 harmonize with other naming.
3961 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3962 (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyOwnedDomains):
3963 This is now where matching is made between prevalent resources
3964 and data records. This function is used by
3965 WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains().
3966 (WebKit::WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains):
3967 The function WebResourceLoadStatisticsStore::removeDataRecords()
3968 calls to get data records removed in all persistent stores.
3969 * UIProcess/WebsiteData/WebsiteDataStore.h:
3970 * WebKit2.xcodeproj/project.pbxproj:
3971 * WebProcess/WebProcess.cpp:
3972 (WebKit::m_resourceLoadStatisticsStore):
3973 (WebKit::WebProcess::statisticsChangedTimerFired):
3974 (WebKit::m_resourceLoadStatisticsStorage): Deleted.
3975 Renamed m_resourceLoadStatisticsStorage to m_resourceLoadStatisticsStore
3976 to harmonize with other naming.
3977 * WebProcess/WebProcess.h:
3979 2017-02-10 Simon Fraser <simon.fraser@apple.com>
3981 Zero out some WKWebView state in the case of a web content crash
3982 https://bugs.webkit.org/show_bug.cgi?id=168157
3984 Reviewed by Tim Horton.
3986 Reset some bits of state in WKWebView when the web content process crashes, in
3987 to try to avoid states that might cause the web view to stay blank.
3989 * UIProcess/API/Cocoa/WKWebView.mm:
3990 (-[WKWebView _processDidExit]):
3992 2017-02-10 Daniel Bates <dabates@apple.com>
3994 Detach frame from document when entering page cache
3995 https://bugs.webkit.org/show_bug.cgi?id=166774
3996 <rdar://problem/29904368>
3998 Reviewed by Chris Dumez.
4000 * Shared/WebPreferencesDefinitions.h:
4001 * UIProcess/API/C/WKPreferences.cpp:
4002 (WKPreferencesSetAllowsPageCacheWithWindowOpener): Deleted.
4003 (WKPreferencesGetAllowsPageCacheWithWindowOpener): Deleted.
4004 * UIProcess/API/C/WKPreferencesRefPrivate.h:
4005 * WebProcess/InjectedBundle/InjectedBundle.cpp:
4006 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
4007 * WebProcess/WebPage/WebPage.cpp:
4008 (WebKit::WebPage::updatePreferences):
4010 2017-02-10 Carlos Garcia Campos <cgarcia@igalia.com>
4012 WebInspector: refactor RemoteInspector to move cocoa specific code to their own files
4013 https://bugs.webkit.org/show_bug.cgi?id=166681
4015 Reviewed by Michael Catanzaro.
4017 * WebProcess/WebProcess.cpp:
4018 (WebKit::WebProcess::initializeWebProcess): Add PLATFORM(COCOA) to the ifdef.
4020 2017-02-10 Tim Horton <timothy_horton@apple.com>
4022 Infinite UI process hang under ensurePositionInformationIsUpToDate
4023 https://bugs.webkit.org/show_bug.cgi?id=168154
4024 <rdar://problem/30428673>
4026 Reviewed by Simon Fraser.
4028 * UIProcess/ios/WKContentViewInteraction.mm:
4029 (-[WKContentView cleanupInteraction]):
4030 If the web process crashes or we're being torn down for another reason,
4031 assume that we aren't ever going to receive any pending async interaction
4032 information update. Otherwise, ensurePositionInformationIsUpToDate can end
4033 up waiting for it forever.
4035 2017-02-10 Andrew Gold <agold@apple.com>
4037 Add mediaStreamEnabled property to WKPreferences for Cocoa.
4038 https://bugs.webkit.org/show_bug.cgi?id=168080
4040 Reviewed by Tim Horton.
4042 * UIProcess/API/Cocoa/WKWebView.mm:
4043 (-[WKWebView _initializeWithConfiguration:]): Sets the pageConfiguration's mediaStreamEnabled preference value.