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