1 2017-04-06 Youenn Fablet <youenn@apple.com>
4 https://bugs.webkit.org/show_bug.cgi?id=170508
6 Reviewed by Eric Carlson.
8 * Configurations/FeatureDefines.xcconfig:
10 2017-04-06 Antti Koivisto <antti@apple.com>
12 Implement testing mode for disk cache
13 https://bugs.webkit.org/show_bug.cgi?id=170547
15 Reviewed by Andreas Kling.
17 Disable read timeouts and cache shrinking in TestRunner to eliminate potential sources of randomness.
19 Cache directories are deleted by TestRunner so lack of shrinking does not consume the disk.
21 This is enabled by the existing WKContextUseTestingNetworkSession SPI.
23 * NetworkProcess/cache/NetworkCache.cpp:
24 (WebKit::NetworkCache::Cache::initialize):
25 * NetworkProcess/cache/NetworkCache.h:
26 * NetworkProcess/cache/NetworkCacheStorage.cpp:
27 (WebKit::NetworkCache::Storage::open):
28 (WebKit::NetworkCache::Storage::Storage):
29 (WebKit::NetworkCache::Storage::dispatchReadOperation):
30 (WebKit::NetworkCache::Storage::shrinkIfNeeded):
31 * NetworkProcess/cache/NetworkCacheStorage.h:
32 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
33 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
35 2017-04-06 Chris Dumez <cdumez@apple.com>
37 [WK2] Add C private API to toggle invisibleAutoplayNotPermitted setting
38 https://bugs.webkit.org/show_bug.cgi?id=170524
39 <rdar://problem/31461472>
41 Reviewed by Eric Carlson.
43 Add C private API to toggle invisibleAutoplayNotPermitted setting.
45 * UIProcess/API/C/WKPreferences.cpp:
46 (WKPreferencesSetInvisibleMediaAutoplayPermitted):
47 (WKPreferencesGetInvisibleMediaAutoplayPermitted):
48 * UIProcess/API/C/WKPreferencesRefPrivate.h:
50 2017-04-06 Adrian Perez de Castro <aperez@igalia.com>
52 [GTK] Fix build with MEDIA_CAPTURE enabled
53 https://bugs.webkit.org/show_bug.cgi?id=170539
55 Reviewed by Carlos Garcia Campos.
57 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
58 (webkit_dom_html_input_element_get_capture): Add missing namespace in usage of WebCore::MediaCaptureTypeNone.
60 2017-04-05 Brent Fulgham <bfulgham@apple.com>
62 [WK2][iOS] Remove access to features not present on iOS
63 https://bugs.webkit.org/show_bug.cgi?id=170531
64 <rdar://problem/31352258>
66 Reviewed by Alexey Proskuryakov.
68 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
70 2017-04-05 Eric Carlson <eric.carlson@apple.com>
72 [MediaStream] Host application should be able to mute and unmute media streams
73 https://bugs.webkit.org/show_bug.cgi?id=170519
74 <rdar://problem/31174326>
76 Reviewed by Youenn Fablet.
78 * UIProcess/API/C/WKPage.cpp:
79 (WKPageGetMediaState): Support new media stream state flags.
80 * UIProcess/API/C/WKPagePrivate.h:
81 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Ditto.
82 * UIProcess/Cocoa/UIDelegate.mm: Ditto.
84 2017-04-05 Brady Eidson <beidson@apple.com>
86 Refactor so WebsiteDataStores always have a StorageManager.
87 https://bugs.webkit.org/show_bug.cgi?id=170521
89 Reviewed by Geoff Garen.
91 This basically involves teaching StorageManager how to work without a LocalStorageDatabaseTracker,
92 since there will never be ephemeral bits on disk to track.
94 * UIProcess/Storage/StorageManager.cpp:
95 (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
96 (WebKit::StorageManager::createEphemeral):
97 (WebKit::StorageManager::StorageManager):
98 (WebKit::StorageManager::getLocalStorageOrigins):
99 (WebKit::StorageManager::getLocalStorageOriginDetails):
100 (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
101 (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
102 (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
103 * UIProcess/Storage/StorageManager.h:
105 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
106 (WebKit::WebsiteDataStore::WebsiteDataStore):
108 2017-04-05 Brent Fulgham <bfulgham@apple.com>
110 [WK2][iOS] Add entitlements to enable audio/video capture in WebProcess
111 https://bugs.webkit.org/show_bug.cgi?id=170507
112 <rdar://problem/31121248>
114 Reviewed by Youenn Fablet.
116 Add two entitlements that are required to access audio/video capture on iOS.
118 * Configurations/WebContent-iOS.entitlements:
120 2017-04-05 Carlos Garcia Campos <cgarcia@igalia.com>
122 Show a log message when an invalid message is received in non cocoa ports
123 https://bugs.webkit.org/show_bug.cgi?id=170506
125 Reviewed by Michael Catanzaro.
127 We just crash, but without knowing the details about the message it's impossible to debug.
129 * Shared/ChildProcess.cpp:
130 (WebKit::ChildProcess::didReceiveInvalidMessage):
132 2017-04-04 Carlos Garcia Campos <cgarcia@igalia.com>
134 Move WebErrors from WebProcess to Shared and get rid of ErrorsGtk in WebCore
135 https://bugs.webkit.org/show_bug.cgi?id=156974
137 Reviewed by Sam Weinig.
139 WebErrors are not only used by the frame loader client in the web process, but also by the network process. So,
140 move them to Shared make most of the implementation cross-platform.
142 * CMakeLists.txt: Add new files to compilation.
143 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
144 (WebKit::NetworkDataTaskSoup::download): Use WebErrors directly instead of platform methods that are no longer needed.
145 (WebKit::NetworkDataTaskSoup::writeDownloadCallback): Ditto.
146 (WebKit::NetworkDataTaskSoup::didFinishDownload): Ditto.
147 (WebKit::NetworkDataTaskSoup::didFail): Ditto.
148 * PlatformGTK.cmake: Add new files to compilation and remove DownloadSoupErrorsGtk.cpp
150 * Shared/API/APIError.cpp: Add error domains used by glib based ports.
151 (API::Error::webKitNetworkErrorDomain):
152 (API::Error::webKitPolicyErrorDomain):
153 (API::Error::webKitPluginErrorDomain):
154 (API::Error::webKitDownloadErrorDomain):
155 (API::Error::webKitPrintErrorDomain):
156 * Shared/API/APIError.h:
157 * Shared/Cocoa/WebErrorsCocoa.mm: Copied from Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h.
158 (WebKit::createNSError):
159 (WebKit::cancelledError):
160 (WebKit::fileDoesNotExistError):
161 * Shared/WebErrors.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp.
162 (WebKit::blockedError):
163 (WebKit::blockedByContentBlockerError):
164 (WebKit::cannotShowURLError):
165 (WebKit::interruptedForPolicyChangeError):
166 (WebKit::blockedByContentFilterError):
167 (WebKit::cannotShowMIMETypeError):
168 (WebKit::pluginWillHandleLoadError):
169 (WebKit::internalError):
170 * Shared/WebErrors.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h.
171 * Shared/glib/WebErrorsGlib.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp.
172 (WebKit::cancelledError):
173 (WebKit::fileDoesNotExistError):
174 * Shared/gtk/WebErrorsGtk.cpp: Copied from Source/WebKit2/NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp.
175 (WebKit::printError):
176 (WebKit::printerNotFoundError):
177 (WebKit::invalidPageRangeToPrint):
178 * Shared/soup/WebErrorsSoup.cpp: Renamed from Source/WebKit2/NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp.
179 (WebKit::downloadNetworkError):
180 (WebKit::downloadCancelledByUserError):
181 (WebKit::downloadDestinationError):
182 * UIProcess/API/gtk/WebKitDownload.cpp:
183 * UIProcess/API/gtk/WebKitError.cpp:
184 (webkit_network_error_quark):
185 (webkit_policy_error_quark):
186 (webkit_plugin_error_quark):
187 (webkit_download_error_quark):
188 (webkit_print_error_quark):
189 * UIProcess/API/gtk/WebKitPrivate.cpp:
192 * WebKit2.xcodeproj/project.pbxproj:
193 * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: Removed.
194 * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
196 2017-04-04 Youenn Fablet <youenn@apple.com>
198 [Mac] Add back web audio support for getUserMedia MediaStreamTrack
199 https://bugs.webkit.org/show_bug.cgi?id=170482
201 Reviewed by Eric Carlson.
203 * WebProcess/cocoa/UserMediaCaptureManager.cpp:
204 (WebKit::UserMediaCaptureManager::Source::setStorage):
206 2017-04-04 Tim Horton <timothy_horton@apple.com>
208 [Mac] -[WKWebView findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:] invokes the resultCollector with didWrap = NO even when it wraps
209 https://bugs.webkit.org/show_bug.cgi?id=165801
210 <rdar://problem/29649535>
212 Reviewed by Wenson Hsieh.
214 Previously, when doing an incremental find that wrapped, we would
215 say that it did not, leading NSTextFinder to not provide its usual
216 wrapping UI, and other clients of the NSTextFinderClient protocol to
217 get confused by the lack of wrapping.
219 * UIProcess/WebPageProxy.cpp:
220 (WebKit::WebPageProxy::didFindString):
221 * UIProcess/WebPageProxy.h:
222 * UIProcess/WebPageProxy.messages.in:
223 * UIProcess/API/APIFindClient.h:
224 (API::FindClient::didFindString):
225 * UIProcess/API/C/WKPage.cpp:
226 (WKPageSetPageFindClient):
227 * UIProcess/Cocoa/FindClient.h:
228 * UIProcess/Cocoa/FindClient.mm:
229 (WebKit::FindClient::didFindString):
230 * WebProcess/WebPage/FindController.cpp:
231 (WebKit::FindController::updateFindUIAfterPageScroll):
232 (WebKit::FindController::findString):
233 * WebProcess/WebPage/FindController.h:
234 Plumb DidWrap from FindController's call to findString back through
235 the DidFindString message.
237 * UIProcess/mac/WKTextFinderClient.mm:
238 (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]):
239 (-[WKTextFinderClient didFindStringMatchesWithRects:]): Deleted.
240 Make use of the new DidWrap information to stop lying to NSTextFinder
241 about whether a wrap actually occurred.
243 2017-04-03 Wenson Hsieh <wenson_hsieh@apple.com>
245 Data interaction should register type identifiers in order of priority
246 https://bugs.webkit.org/show_bug.cgi?id=170428
247 <rdar://problem/30633296>
249 Reviewed by Tim Horton.
251 Serialize PasteboardWebContent.dataInAttributedStringFormat when sending over IPC. Refer to WebCore ChangeLog
254 * Shared/WebCoreArgumentCoders.cpp:
255 (IPC::ArgumentCoder<PasteboardWebContent>::encode):
256 (IPC::ArgumentCoder<PasteboardWebContent>::decode):
257 * UIProcess/API/Cocoa/WKWebView.mm:
259 2017-04-03 Joseph Pecoraro <pecoraro@apple.com>
261 Remove no longer needed forward declarations
262 https://bugs.webkit.org/show_bug.cgi?id=170415
264 Reviewed by Dan Bernstein.
266 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
268 2017-04-03 Anders Carlsson <andersca@apple.com>
270 Tweak ApplePaySession API
271 https://bugs.webkit.org/show_bug.cgi?id=170409
272 rdar://problem/31405459
274 Reviewed by Tim Horton.
276 Update for WebCore changes.
278 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
281 2017-04-03 Carlos Garcia Campos <cgarcia@igalia.com>
283 [SOUP] URI Fragment is lost after redirect
284 https://bugs.webkit.org/show_bug.cgi?id=170058
286 Reviewed by Michael Catanzaro.
288 In case of redirection check if the current request has a fragment identifier and apply it to the redirection
289 only when it doesn't have a fragment identifier yet.
291 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
292 (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
293 (WebKit::NetworkDataTaskSoup::createRequest):
294 (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
295 * NetworkProcess/soup/NetworkDataTaskSoup.h:
297 2017-04-03 Antti Koivisto <antti@apple.com>
299 Mutex may be freed too late in NetworkCache::Storage::traverse
300 https://bugs.webkit.org/show_bug.cgi?id=170400
301 <rdar://problem/30515865>
303 Reviewed by Carlos Garcia Campos and Andreas Kling.
307 * NetworkProcess/cache/NetworkCacheStorage.cpp:
308 (WebKit::NetworkCache::Storage::traverse):
310 Ensure the mutex is not accessed after we dispatch to the main thread.
311 The main thread call deletes the owning TraverseOperation.
313 2017-04-01 Dan Bernstein <mitz@apple.com>
315 [iOS] <input type=file> label should be specified using plural rules
316 https://bugs.webkit.org/show_bug.cgi?id=170388
318 Reviewed by Alexey Proskuryakov.
320 * UIProcess/ios/forms/WKFileUploadPanel.mm:
321 (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
322 Instead of calling -_displayStringForPhotos:videos:, use
323 +[NSString localizedStringWithFormat:] with the new format string "%lu photo(s) and
324 %lu video(s)" for which there are plural rules.
325 (-[WKFileUploadPanel _displayStringForPhotos:videos:]): Deleted.
327 2017-04-01 Dan Bernstein <mitz@apple.com>
329 [Xcode] In engineering builds, linker warns about libwebrtc.dylib’s install name being invalid
330 https://bugs.webkit.org/show_bug.cgi?id=170385
332 Reviewed by Tim Horton.
334 * Configurations/WebKit.xcconfig: When WebKit is relocatable, tell the linker that it’s
335 not going to be in the shared cache, even if its install name implies that it might be.
337 2017-03-31 Simon Fraser <simon.fraser@apple.com>
339 Remove a logging statement left in by mistake.
341 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
342 (WebKit::WebFrameLoaderClient::restoreViewState):
344 2017-03-31 Wenson Hsieh <wenson_hsieh@apple.com>
346 Address post-review feedback after r214692
347 https://bugs.webkit.org/show_bug.cgi?id=170328
349 Reviewed by Dan Bernstein.
351 Clearing the selection when UIKit calls into WKContentView to set its selected text range to nil is a rule
352 that should be applied when using a text interaction assistant, not just when using character granularity
355 * UIProcess/ios/WKContentViewInteraction.mm:
356 (-[WKContentView setSelectedTextRange:]):
358 2017-03-31 Wenson Hsieh <wenson_hsieh@apple.com>
360 [WK2] Tapping away to dismiss the selection does not update the selected DOM range using character granularity
361 https://bugs.webkit.org/show_bug.cgi?id=170328
362 <rdar://problem/30904558>
364 Reviewed by Tim Horton.
366 When UIKit clears the selection while in text interaction mode, it notifies its document view (i.e., the
367 WKContentView) by setting its selected text range to nil. When character granularity selection is enabled, use
368 this as a cue to notify the web process that the selection is being cleared out.
370 -setSelectedTextRange: is a noop in the general case because the web process acts as the source of truth for what
371 the selection currently consists of, and notifies the UI process and UIKit via WKTextPosition and WKTextRange.
372 However, in the case of character granularity selections, tapping away to clear the selection is handled by
373 UIKit's text gesture recognizer cluster, which then informs the document (via -setSelectedTextRange:) that the
374 selection should be cleared out.
376 Adds a new Layout test: editing/selection/character-granularity-selected-range-after-dismissing-selection.html.
378 * UIProcess/ios/WKContentViewInteraction.mm:
379 (-[WKContentView setSelectedTextRange:]):
381 2017-03-31 Wenson Hsieh <wenson_hsieh@apple.com>
383 [WK2] Tapping editable text inside of a range selection no longer changes the selection to a caret
384 https://bugs.webkit.org/show_bug.cgi?id=170327
385 <rdar://problem/31363816>
387 Reviewed by Tim Horton.
389 Currently, we're forcing all text interaction gestures to duck in lieu of data interaction gestures
390 when we should only be doing so for gestures that begin a loupe. This prevents other gestures, such as
391 single taps, from changing the selection when they should be allowed to.
393 Hooks into new UIKit SPI to make this tweak.
394 Introduces a new LayoutTest: editing/selection/caret-after-tap-in-editable-selection.html.
396 * UIProcess/ios/WKContentViewInteraction.mm:
397 (-[WKContentView pointIsInAssistedNode:]):
398 (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
400 2017-03-31 Tim Horton <timothy_horton@apple.com>
402 Mail can get stuck underneath FindController::findStringMatches after searching in a long message
403 https://bugs.webkit.org/show_bug.cgi?id=170326
404 <rdar://problem/30330395>
406 Reviewed by Simon Fraser.
408 * UIProcess/mac/WKTextFinderClient.mm:
409 (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
410 Cap the number of find matches at 1000, the same maximum that Safari uses.
412 2017-03-31 Brady Eidson <beidson@apple.com>
414 Clean up the "StorageType" enum.
415 https://bugs.webkit.org/show_bug.cgi?id=170349
417 Reviewed by Tim Horton.
419 * WebProcess/Storage/StorageAreaMap.cpp:
420 (WebKit::StorageAreaMap::StorageAreaMap):
421 (WebKit::StorageAreaMap::dispatchStorageEvent):
422 (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
423 (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
425 * WebProcess/Storage/StorageNamespaceImpl.cpp:
426 (WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
427 (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
428 (WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
430 2017-03-31 Tim Horton <timothy_horton@apple.com>
432 Remove bundle checks for attachmentElementEnabled
433 https://bugs.webkit.org/show_bug.cgi?id=170329
434 <rdar://problem/25135244>
436 Reviewed by Simon Fraser.
438 * UIProcess/API/Cocoa/WKWebView.mm:
439 (-[WKWebView _initializeWithConfiguration:]):
440 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
441 (-[WKWebViewConfiguration init]):
442 Remove bundle checks.
444 2017-03-29 Anders Carlsson <andersca@apple.com>
446 Adopt PKCanMakePaymentsWithMerchantIdentifierAndDomainAndSourceApplication
447 https://bugs.webkit.org/show_bug.cgi?id=170257
448 rdar://problem/31289764
450 Reviewed by Beth Dakin.
452 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
453 (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
455 2017-03-31 Csaba Osztrogonác <ossy@webkit.org>
457 Mac cmake buildfix after r214403
458 https://bugs.webkit.org/show_bug.cgi?id=170346
460 Unreviewed speculative buildfix.
462 * UIProcess/API/Cocoa/WKWebView.mm:
464 2017-03-31 Brady Eidson <beidson@apple.com>
466 Remove erroneously committed changes from r214078
470 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
471 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Whoops!
473 2017-03-31 Carlos Garcia Campos <cgarcia@igalia.com>
475 Modern media controls should never be enabled in non cocoa ports
476 https://bugs.webkit.org/show_bug.cgi?id=170338
478 Reviewed by Michael Catanzaro.
480 It's currently enabled, because it uses the default value for all other runtime features, but modern media
481 controls are not a cross-platform feature. I think this is why media/video-click-dblckick-standalone.html
482 started to fail in GTK+ port after r214426. I can't reprouduce the failure locally, so I can't confirm it,
485 * Shared/WebPreferencesDefinitions.h:
487 2017-03-30 Zan Dobersek <zdobersek@igalia.com>
489 Unreviewed GTK+ build fix. List WebCore before JavaScriptCore as the
490 two WebKit2 dependency libraries to avoid WTF directiories being
491 listed for inclusion before WebCore directories at compile-time.
495 2017-03-30 Megan Gardner <megan_gardner@apple.com>
497 Allow for extended color in snapshots
498 https://bugs.webkit.org/show_bug.cgi?id=170314
499 <rdar://problem/28676092> WKImageCreateCGImage should support WideGamut in WebKit2 on macOS
501 Reviewed by Simon Fraser.
503 Piping options through snapshots to allow for wide gamut support.
505 * Shared/API/c/WKImage.h:
506 * Shared/API/c/WKSharedAPICast.h:
507 (WebKit::snapshotOptionsFromImageOptions):
508 * Shared/ImageOptions.h:
509 (WebKit::snapshotOptionsToImageOptions):
510 * Shared/WebImage.cpp:
511 (WebKit::WebImage::create):
513 2017-03-30 Sam Weinig <sam@webkit.org>
515 Expose the WKView SPI, _prepareForMoveToWindow:withCompletionHandler as WKWebView SPI
516 <rdar://problem/31350588>
517 https://bugs.webkit.org/show_bug.cgi?id=170315
519 Reviewed by Simon Fraser.
521 * UIProcess/API/Cocoa/WKWebView.mm:
522 (-[WKWebView _prepareForMoveToWindow:completionHandler:]):
523 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
524 Copy SPI to WKWebView. Remove 'with' prefix to match conventions.
526 2017-03-30 Wenson Hsieh <wenson_hsieh@apple.com>
528 [WK2] Touches should not cancel when showing a custom action sheet while data interaction is active
529 https://bugs.webkit.org/show_bug.cgi?id=170291
530 <rdar://problem/31301388>
532 Reviewed by Tim Horton.
534 Currently, when presenting a custom popover, we will cancel all touches in the application. This makes data
535 interaction when a custom popover is shown impossible -- to address this, we should only cancel touches when
536 the view is not an active data interaction source.
538 New API test: DataInteractionTests.CustomActionSheetPopover.
540 * UIProcess/ios/WKContentViewInteraction.mm:
541 (-[WKContentView actionSheetAssistant:showCustomSheetForElement:]):
543 2017-03-30 Youenn Fablet <youenn@apple.com>
545 NetworkConnectionToWebProcess should stop web sockets when being destroyed
546 https://bugs.webkit.org/show_bug.cgi?id=170286
548 Reviewed by Brady Eidson.
550 * NetworkProcess/NetworkSocketStream.cpp:
551 (WebKit::NetworkSocketStream::~NetworkSocketStream): Stopping the socket handle if not done already.
552 * NetworkProcess/NetworkSocketStream.h:
554 2017-03-29 Tim Horton <timothy_horton@apple.com>
556 Remove unused PageClient::removeNavigationGestureSnapshot
557 https://bugs.webkit.org/show_bug.cgi?id=170249
559 Reviewed by Beth Dakin.
561 * UIProcess/PageClient.h:
562 * UIProcess/WebPageProxy.cpp:
563 (WebKit::WebPageProxy::removeNavigationGestureSnapshot): Deleted.
564 * UIProcess/WebPageProxy.h:
565 * UIProcess/mac/PageClientImpl.h:
566 * UIProcess/mac/PageClientImpl.mm:
567 (WebKit::PageClientImpl::removeNavigationGestureSnapshot): Deleted.
569 2017-03-29 Antti Koivisto <antti@apple.com>
571 Increment the last stable network cache version on Mac
572 https://bugs.webkit.org/show_bug.cgi?id=170248
573 <rdar://problem/31326040>
575 Reviewed by Chris Dumez.
577 Bump to the latest release.
579 * NetworkProcess/cache/NetworkCacheStorage.h:
581 2017-03-28 Timothy Horton <timothy_horton@apple.com>
583 Stop overriding scroll view inset defaults
584 https://bugs.webkit.org/show_bug.cgi?id=170221
585 <rdar://problem/31260325>
587 Reviewed by Simon Fraser.
589 * Platform/spi/ios/UIKitSPI.h:
590 * UIProcess/API/Cocoa/WKWebView.mm:
591 (-[WKWebView _initializeWithConfiguration:]):
592 The default behavior is sufficient for us.
594 2017-03-28 Timothy Horton <timothy_horton@apple.com>
596 Safari crashes when attempting to close tab that is displaying PDF
597 https://bugs.webkit.org/show_bug.cgi?id=170201
598 <rdar://problem/31242019>
600 Reviewed by Wenson Hsieh.
602 * UIProcess/API/Cocoa/WKWebView.mm:
603 (-[WKWebView _doAfterNextStablePresentationUpdate:]):
604 Adopt BlockPtr to fix a leak.
606 (-[WKWebView _firePresentationUpdateForPendingStableStatePresentationCallbacks]):
607 dispatch_async in the doAfterNextPresentationUpdate callback; since this
608 recursively calls itself, in cases where doAfterNextPresentationUpdate
609 returns synchronously (e.g. if the Web Process is missing), we would
612 2017-03-27 Youenn Fablet <youenn@apple.com>
614 Remove WebPage::m_shouldDoICECandidateFiltering
615 https://bugs.webkit.org/show_bug.cgi?id=170150
617 Reviewed by Sam Weinig.
619 It is redundant with RTCController::m_shouldFilterICECandidates.
620 Manually tested on webrtc test samples.
621 This code path is currently untested by rwt as we hook it to getUserMedia which is mocked in rwt.
622 Additional testing will be added as a follow-up patch.
624 * WebProcess/WebPage/WebPage.cpp:
625 (WebKit::WebPage::disableICECandidateFiltering):
626 (WebKit::WebPage::enableICECandidateFiltering):
627 * WebProcess/WebPage/WebPage.h:
629 2017-03-27 Wenson Hsieh <wenson_hsieh@apple.com>
631 [WK2] UIKit assertion when rotating device after dismissing popover
632 https://bugs.webkit.org/show_bug.cgi?id=170159
633 <rdar://problem/31283829>
635 Reviewed by Tim Horton.
637 Ensure that when we are finished presenting a WKActionSheet, we unregister with the shared notifications center.
639 * UIProcess/ios/WKActionSheet.mm:
640 (-[WKActionSheet dealloc]):
641 (-[WKActionSheet _cleanup]):
642 (-[WKActionSheet doneWithSheet:]):
644 2017-03-27 Andy Estes <aestes@apple.com>
646 [iOS] Suppress page count recalc when setting a snapshot paper rect
647 https://bugs.webkit.org/show_bug.cgi?id=170156
648 <rdar://problem/30787872>
650 Reviewed by Tim Horton.
652 When _WKWebViewPrintFormatter computes a page count for snapshotting, it updates the paper
653 rect, which triggers UIKit to ask for the page count again while we're in the middle of
654 printing, putting us in a bad state.
656 Suppress page count recalc while setting the new paper rect, since we know this will not
659 * UIProcess/_WKWebViewPrintFormatter.mm:
660 (-[_WKWebViewPrintFormatter _setSnapshotPaperRect:]): Temporarily set
661 _suppressPageCountRecalc to YES before updating the paper rect.
662 (-[_WKWebViewPrintFormatter _setNeedsRecalc]): Only call [super _setNeedsRecalc] if
663 _suppressPageCountRecalc is NO.
664 * UIProcess/_WKWebViewPrintFormatterInternal.h: Declared -_setNeedsRecalc.
666 2017-03-26 Wenson Hsieh <wenson_hsieh@apple.com>
668 [WK2] Callout Bar should be dismissed during data interaction
669 https://bugs.webkit.org/show_bug.cgi?id=170109
670 <rdar://problem/31171570>
672 Reviewed by Tim Horton.
674 Minor tweak to get the callout bar to duck during data interaction. Import a new UIKit SPI header in WebKit2.
676 * Platform/spi/ios/UIKitSPI.h:
678 2017-03-27 Keith Rollin <krollin@apple.com>
680 Update NetworkResourceLoader logging statement
681 https://bugs.webkit.org/show_bug.cgi?id=170126
683 Reviewed by Alex Christensen.
685 NetworkResourceLoader contains a logging statement that prints, in
686 part: "start: Retrieving resource from cache". This is misleading,
687 since it's not necessarily the case that the resource will be loaded
688 from the cache. What is actually happening at the point where that is
689 logged is that the cache is being checked for the resource. It still
690 remains to be seen if the resource will be found in it. To address
691 this, change the logging to say "start: Checking cache for resource".
693 * NetworkProcess/NetworkResourceLoader.cpp:
694 (WebKit::NetworkResourceLoader::start):
696 2017-03-27 Joseph Pecoraro <pecoraro@apple.com>
698 Web Inspector: Saving files should not suggest the top level directory
699 https://bugs.webkit.org/show_bug.cgi?id=170085
700 <rdar://problem/30197794>
702 Reviewed by Matt Baker.
704 * UIProcess/mac/RemoteWebInspectorProxyMac.mm:
705 (WebKit::RemoteWebInspectorProxy::platformSave):
706 * UIProcess/mac/WebInspectorProxyMac.mm:
707 (WebKit::WebInspectorProxy::platformSave):
708 Don't set panel.directoryURL unless we have a good suggestion.
710 2017-03-27 Yongjun Zhang <yongjun_zhang@apple.com>
712 Add delegate method to let an WebKit client provide a custom image preview controller.
713 https://bugs.webkit.org/show_bug.cgi?id=170076
714 rdar://problem/31153051
716 Add a new delegate method (_webView:previewViewControllerForImage:alternateURL:defaultActions:elementInfo:) to
717 WKUIDelegatePrivate, an client can use this method to provide a custom image preview view controller if the image
718 has alternated URL or custom image info.
720 Reviewed by Beth Dakin.
722 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add delegate method _webView:previewViewControllerForImage:alternateURL:defaultActions:elementInfo:.
723 * UIProcess/ios/WKContentViewInteraction.mm:
724 (-[WKContentView _presentedViewControllerForPreviewItemController:]): If the image has alternated URL or custom info, try to use the client-provided
725 preview view controller. Otherwise, use the default WKImagePreviewViewController.
727 2017-03-27 Anders Carlsson <andersca@apple.com>
729 Fix uses of deprecated API
730 https://bugs.webkit.org/show_bug.cgi?id=170138
731 rdar://problem/28882449
733 Reviewed by Tim Horton.
735 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
736 (WebKit::toPKContactFields):
737 (WebKit::toPKAddressField):
738 (WebKit::toPKPaymentRequest):
739 Don't use deprecated APIs.
742 Don't try to insert nil in a dictionary.
744 2017-03-27 Alex Christensen <achristensen@webkit.org>
746 Make WebSockets work in network process
747 https://bugs.webkit.org/show_bug.cgi?id=169930
749 Reviewed by Youenn Fablet.
751 This adds WebSocketStream, which is a SocketStreamHandle that sends asynchronous
752 messages to a NetworkSocketStream in the NetworkProcess. WebKit1 uses a SocketStreamHandleImpl
753 still, but WebKit2 now has a SocketStreamHandleImpl in the NetworkProcess owned by the
754 NetworkSocketStream, which is a SocketStreamHandleClient that sends asynchronous messages back
755 to the WebProcess. WebSocketStream's implementation of SocketStreamHandle::platformSend is special
756 because it stores the completion handler in a map and asynchronously reports to the caller whether
757 it succeeded or not. If the network processes crashes before the completion handlers are called,
758 then they are called indicating failure and an error is reported, but that never happens, right?
761 * DerivedSources.make:
762 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
763 (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
764 (WebKit::NetworkConnectionToWebProcess::createSocketStream):
765 (WebKit::NetworkConnectionToWebProcess::destroySocketStream):
766 * NetworkProcess/NetworkConnectionToWebProcess.h:
767 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
768 * NetworkProcess/NetworkProcess.cpp:
769 (WebKit::NetworkProcess::setAllowsAnySSLCertificateForWebSocket):
770 * NetworkProcess/NetworkProcess.h:
771 * NetworkProcess/NetworkProcess.messages.in:
772 * NetworkProcess/NetworkSocketStream.cpp: Added.
773 (WebKit::NetworkSocketStream::create):
774 (WebKit::NetworkSocketStream::NetworkSocketStream):
775 (WebKit::NetworkSocketStream::sendData):
776 (WebKit::NetworkSocketStream::close):
777 (WebKit::NetworkSocketStream::didOpenSocketStream):
778 (WebKit::NetworkSocketStream::didCloseSocketStream):
779 (WebKit::NetworkSocketStream::didReceiveSocketStreamData):
780 (WebKit::NetworkSocketStream::didFailToReceiveSocketStreamData):
781 (WebKit::NetworkSocketStream::didUpdateBufferedAmount):
782 (WebKit::NetworkSocketStream::didFailSocketStream):
783 (WebKit::NetworkSocketStream::messageSenderConnection):
784 (WebKit::NetworkSocketStream::messageSenderDestinationID):
785 * NetworkProcess/NetworkSocketStream.h: Added.
786 * NetworkProcess/NetworkSocketStream.messages.in: Added.
787 * UIProcess/API/C/WKContext.cpp:
788 (WKContextSetAllowsAnySSLCertificateForWebSocketTesting):
789 (WKContextTerminateNetworkProcess):
790 * UIProcess/API/C/WKContextPrivate.h:
791 * UIProcess/WebProcessPool.cpp:
792 (WebKit::WebProcessPool::sendSyncToNetworkingProcess):
793 (WebKit::WebProcessPool::setAllowsAnySSLCertificateForWebSocket):
794 (WebKit::WebProcessPool::terminateNetworkProcess):
795 * UIProcess/WebProcessPool.h:
796 * WebKit2.xcodeproj/project.pbxproj:
797 * WebProcess/Network/NetworkProcessConnection.cpp:
798 (WebKit::NetworkProcessConnection::didReceiveMessage):
799 * WebProcess/Network/WebSocketProvider.cpp:
800 (WebKit::WebSocketProvider::createSocketStreamHandle):
801 * WebProcess/Network/WebSocketStream.cpp: Added.
802 (WebKit::globalWebSocketStreamMap):
803 (WebKit::WebSocketStream::streamWithIdentifier):
804 (WebKit::WebSocketStream::networkProcessCrashed):
805 (WebKit::WebSocketStream::create):
806 (WebKit::WebSocketStream::WebSocketStream):
807 (WebKit::WebSocketStream::~WebSocketStream):
808 (WebKit::WebSocketStream::messageSenderConnection):
809 (WebKit::WebSocketStream::messageSenderDestinationID):
810 (WebKit::WebSocketStream::platformSend):
811 (WebKit::WebSocketStream::didSendData):
812 (WebKit::WebSocketStream::platformClose):
813 (WebKit::WebSocketStream::bufferedAmount):
814 (WebKit::WebSocketStream::didOpenSocketStream):
815 (WebKit::WebSocketStream::didCloseSocketStream):
816 (WebKit::WebSocketStream::didReceiveSocketStreamData):
817 (WebKit::WebSocketStream::didFailToReceiveSocketStreamData):
818 (WebKit::WebSocketStream::didUpdateBufferedAmount):
819 (WebKit::WebSocketStream::didFailSocketStream):
820 * WebProcess/Network/WebSocketStream.h: Added.
821 * WebProcess/Network/WebSocketStream.messages.in: Added.
822 * WebProcess/WebProcess.cpp:
823 (WebKit::WebProcess::networkProcessConnectionClosed):
825 2017-03-27 Adrian Perez de Castro <aperez@igalia.com>
827 [GTK] NetscapePluginX11::m_windowID is unused/unneeded
828 https://bugs.webkit.org/show_bug.cgi?id=170115
830 Reviewed by Michael Catanzaro.
832 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
833 (WebKit::NetscapePluginX11::NetscapePluginX11):
834 Remove the unneeded NetscapePluginX11::m_windowID member.
835 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.h:
836 Remove the unneeded NetscapePluginX11::m_windowID member.
838 2017-03-25 Andy Estes <aestes@apple.com>
840 [iOS] Use snapshotting instead of printing to draw single-page PDFs
841 https://bugs.webkit.org/show_bug.cgi?id=170103
842 <rdar://problem/30542960>
844 Reviewed by Tim Horton.
846 * WebProcess/WebPage/WebPage.cpp:
847 (WebKit::paintSnapshotAtSize): Moved the painting logic from WebPage::snapshotAtSize() to here.
848 (WebKit::WebPage::snapshotAtSize): Changed to call paintSnapshotAtSize() with the
849 WebImage's graphics context.
850 (WebKit::WebPage::pdfSnapshotAtSize): Created a CGPDFGraphicsContext, passed it to
851 paintSnapshotAtSize(), and returned the context's data.
852 * WebProcess/WebPage/WebPage.h: Made snapshotAtSize() and snapshotNode() private, changed
853 their return values from PassRefPtr to RefPtr, and declared pdfSnapshotAtSize().
854 * WebProcess/WebPage/ios/WebPageIOS.mm:
855 (WebKit::WebPage::computePagesForPrintingAndDrawToPDF): If snapshotting the first page,
856 returned a page count of 1 and created a PDF using pdfSnapshotAtSize().
858 2017-03-25 John Wilander <wilander@apple.com>
860 Re-enable the web process' keychain access to fix client certificate authentication
861 https://bugs.webkit.org/show_bug.cgi?id=170074
862 <rdar://problem/31095987>
864 Reviewed by Brent Fulgham.
866 This is a follow-up patch to
867 https://trac.webkit.org/changeset/214389/webkit
868 since according to Alexey Proskuryakov, resource
869 loading has always required identical sandbox
870 rules in WebContent and Networking processes.
872 * WebProcess/com.apple.WebProcess.sb.in:
873 Reverted remaining change from
874 https://trac.webkit.org/changeset/208702/webkit and
875 https://trac.webkit.org/changeset/208707/webkit.
877 2017-03-24 Wenson Hsieh <wenson_hsieh@apple.com>
879 [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
880 https://bugs.webkit.org/show_bug.cgi?id=169168
881 <rdar://problem/30688374>
883 Reviewed by Tim Horton.
885 Support customizing the set of allowed actions on drop in WebKit2 by introducing a new method to WKUIDelegatePrivate
886 that returns a WKDragDestinationAction given platform dragging info. These flags are then used to initialize the
887 DragData sent over to the web process, where they update DragController's view of the allowed destination actions.
889 Moving forward, the default action mask for WKWebViews will include everything except WKDragDestinationActionLoad,
890 though for applciations linked on or before 10.12, we will still default to WKDragDestinationActionAny to mitigate
891 any compatibility risk.
893 * Shared/API/Cocoa/WKDragDestinationAction.h:
895 Introduce WK2 client-facing versions of WebCore::DragDestinationAction flags.
897 * Shared/WebCoreArgumentCoders.cpp:
898 (IPC::ArgumentCoder<DragData>::encode):
899 (IPC::ArgumentCoder<DragData>::decode):
901 Serialize DragData's destination actions when sending DragData over IPC.
903 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
904 * UIProcess/API/Cocoa/WKWebView.mm:
905 (-[WKWebView _web_dragDestinationActionForDraggingInfo:]):
907 For WKWebView, allow all drag destination actions except for loading (i.e. drop-to-navigate).
909 * UIProcess/API/mac/WKView.mm:
910 (-[WKView _web_dragDestinationActionForDraggingInfo:]):
912 For WKView, allow all types of drag destination actions.
914 * UIProcess/Cocoa/VersionChecks.h:
915 * UIProcess/Cocoa/WebViewImpl.h:
916 * UIProcess/Cocoa/WebViewImpl.mm:
917 (WebKit::WebViewImpl::draggingEntered):
918 (WebKit::WebViewImpl::draggingUpdated):
919 * WebKit2.xcodeproj/project.pbxproj:
920 * WebProcess/WebCoreSupport/WebDragClient.cpp:
921 (WebKit::WebDragClient::actionMaskForDrag):
922 * WebProcess/WebCoreSupport/WebDragClient.h:
924 2017-03-24 Simon Fraser <simon.fraser@apple.com>
926 [iOS WK2] Move from a pre-commit handler to dispatch_async for visible content rect updates
927 https://bugs.webkit.org/show_bug.cgi?id=170091
928 rdar://problem/30682584
930 Reviewed by Tim Horton.
932 [CATransaction addCommitHandler:forPhase:] is sometimes not called when running inside another
933 commit callback (rdar://problem/31253952), and we don't yet have a reliable way to detect this.
935 So dispatch_async() to postpone the call to [CATransaction addCommitHandler:forPhase:] to a known-
938 * UIProcess/API/Cocoa/WKWebView.mm:
939 (-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):
941 2017-03-24 John Wilander <wilander@apple.com>
943 Re-enable the network process' keychain access to fix client certificate authentication
944 https://bugs.webkit.org/show_bug.cgi?id=170074
945 <rdar://problem/31095987>
947 Reviewed by Brent Fulgham.
949 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
950 Reverted remaining change from
951 https://trac.webkit.org/changeset/208702/webkit and
952 https://trac.webkit.org/changeset/208707/webkit.
954 2017-03-24 Eric Carlson <eric.carlson@apple.com>
956 [MediaStream] "ideal" constraints passed to getUserMedia should affect fitness score
957 https://bugs.webkit.org/show_bug.cgi?id=170056
959 Reviewed by Youenn Fablet.
961 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
962 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): When
963 short-circuiting the user prompt because the page is already authorized, return the first
964 audio and/or video device because so the page gets the one with the best fitness distance.
966 2017-03-24 Simon Fraser <simon.fraser@apple.com>
968 Make UI-side compositing on macOS a bit more usable
969 https://bugs.webkit.org/show_bug.cgi?id=170073
971 Reviewed by Tim Horton.
973 Mach port as layer contents doesn't work on macOS, so don't use it there.
975 Also remove two assertions that hit with UI-side compositing in MiniBrowser.
977 * UIProcess/DrawingAreaProxy.cpp:
978 (WebKit::DrawingAreaProxy::createFence):
979 * UIProcess/mac/PageClientImpl.mm:
980 (WebKit::PageClientImpl::requestScroll):
981 * UIProcess/mac/RemoteLayerTreeHost.mm:
982 (WebKit::RemoteLayerTreeHost::updateLayerTree):
984 2017-03-24 Alex Christensen <achristensen@webkit.org>
986 Fix assertions after r214358.
987 https://bugs.webkit.org/show_bug.cgi?id=169167
989 * UIProcess/API/APIContentExtensionStore.cpp:
990 (API::ContentExtensionStore::compileContentExtension):
991 AtomicString::init must be called for the first time from the main thread.
992 We were calling it for the first time from a non-main thread sometimes.
993 Call it from the main thread before initiating compiling on another thread.
995 == Rolled over to ChangeLog-2017-03-23 ==