ff77473b427aa70e8364984aaf9d7686b7461513
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-12-14  Anders Carlsson  <andersca@apple.com>
2
3         Add WKContextRefreshPlugIns
4         https://bugs.webkit.org/show_bug.cgi?id=165879
5         rdar://problem/29602414
6
7         Reviewed by Tim Horton.
8
9         * UIProcess/API/C/WKContext.cpp:
10         (WKContextRefreshPlugIns):
11         * UIProcess/API/C/WKContext.h:
12         * UIProcess/WebProcessPool.cpp:
13         (WebKit::WebProcessPool::refreshPlugins):
14         * UIProcess/WebProcessPool.h:
15         * WebProcess/Plugins/WebPluginInfoProvider.h:
16         * WebProcess/WebProcess.cpp:
17         (WebKit::WebProcess::refreshPlugins):
18         * WebProcess/WebProcess.h:
19         * WebProcess/WebProcess.messages.in:
20
21 2016-12-14  Tim Horton  <timothy_horton@apple.com>
22
23         API Test Fullscreen.TopContentInset is asserting on Yosemite
24         https://bugs.webkit.org/show_bug.cgi?id=165877
25
26         Reviewed by Brady Eidson.
27
28         * UIProcess/WebPageProxy.cpp:
29         (WebKit::WebPageProxy::setTopContentInset):
30         * WebProcess/WebPage/WebPage.cpp:
31         * WebProcess/WebPage/WebPage.h:
32         * WebProcess/WebPage/WebPage.messages.in:
33         We don't use fences on Yosemite, but this codepath still tried to.
34         Instead of guarding with PLATFORM(COCOA), make use of the more accurate
35         HAVE(COREANIMATION_FENCES) guard.
36
37 2016-12-14  Anders Carlsson  <andersca@apple.com>
38
39         Add some instrumentation to try to detect a crash on the bots
40         https://bugs.webkit.org/show_bug.cgi?id=165866
41
42         Reviewed by Sam Weinig.
43
44         * Platform/IPC/mac/ConnectionMac.mm:
45         (IPC::Connection::sendMessage):
46
47 2016-12-14  Dave Hyatt  <hyatt@apple.com>
48
49         [CSS Parser] Implement deferred parsing of properties, @media, @supports and @keyframes
50         https://bugs.webkit.org/show_bug.cgi?id=165743
51
52         Reviewed by Dean Jackson.
53
54         Repurpose the newCSSParserEnabled preference for deferred parsing. Just change the name
55         from "new" to "deferred."
56
57         * Shared/WebPreferencesDefinitions.h:
58         * UIProcess/API/C/WKPreferences.cpp:
59         (WKPreferencesSetDeferredCSSParserEnabled):
60         (WKPreferencesGetDeferredCSSParserEnabled):
61         (WKPreferencesSetNewCSSParserEnabled): Deleted.
62         (WKPreferencesGetNewCSSParserEnabled): Deleted.
63         * UIProcess/API/C/WKPreferencesRefPrivate.h:
64         * WebProcess/WebPage/WebPage.cpp:
65         (WebKit::WebPage::updatePreferences):
66
67 2016-12-14  Brent Fulgham  <bfulgham@apple.com>
68
69         Unreviewed test fix after r209806.
70
71         Plugin-common doesn't define 'home-subpath'. Instead it has 'home-library-subpath'. Switch to the correct
72         function. Also, 'home-library-subpath' adds '/Library' to the path, so revise the arguments so that we
73         do not generate paths like '/home/username/Library/Library/Keychains'.
74
75         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
76
77 2016-12-14  Brent Fulgham  <bfulgham@apple.com>
78
79         Unreviewed test fix after r209779.
80
81         The 'Keygen' element requires the ability to create new keys in '$HOME/Library/Keychains'. Remove the
82         WebProcess and Plugin sandbox restrictions on per-user Keychain creation to support this use.
83
84         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
85         * WebProcess/com.apple.WebProcess.sb.in:
86
87 2016-12-13  Yusuke Suzuki  <utatane.tea@gmail.com>
88
89         Use JSValue::toWTFString instead of calling toString(exec) and value(exec)
90         https://bugs.webkit.org/show_bug.cgi?id=165795
91
92         Reviewed by Saam Barati.
93
94         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
95         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
96
97 2016-12-14  Enrique Ocaña González  <eocanha@igalia.com>
98
99         REGRESSION(r207879-207891): [GStreamer] Introduced many layout test failures and crashes, bots exiting early
100         https://bugs.webkit.org/show_bug.cgi?id=164022
101
102         Reviewed by Xabier Rodriguez-Calvar.
103
104         * Shared/WebPreferencesDefinitions.h:
105         New GStreamerEnabled preference, defaults to true.
106         * WebProcess/WebPage/WebPage.cpp: Ditto.
107         (WebKit::WebPage::updatePreferences):
108
109 2016-12-13  Commit Queue  <commit-queue@webkit.org>
110
111         Unreviewed, rolling out r209792.
112         https://bugs.webkit.org/show_bug.cgi?id=165841
113
114         Cause build failures (Requested by yusukesuzuki on #webkit).
115
116         Reverted changeset:
117
118         "Use JSValue::toWTFString instead of calling toString(exec)
119         and value(exec)"
120         https://bugs.webkit.org/show_bug.cgi?id=165795
121         http://trac.webkit.org/changeset/209792
122
123 2016-12-13  Yusuke Suzuki  <utatane.tea@gmail.com>
124
125         Use JSValue::toWTFString instead of calling toString(exec) and value(exec)
126         https://bugs.webkit.org/show_bug.cgi?id=165795
127
128         Reviewed by Saam Barati.
129
130         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
131         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
132
133 2016-12-13  Alex Christensen  <achristensen@webkit.org>
134
135         Fix CMake build.
136
137         * PlatformMac.cmake:
138
139 2016-12-13  Jer Noble  <jer.noble@apple.com>
140
141         Fullscreen in WebKit2 does not restore topContentInset upon exiting; leaves top of page not visible
142         https://bugs.webkit.org/show_bug.cgi?id=165697
143
144         Delegate the values of topContentInset() from WebViewImpl (used by WKWebView and WKView) to the
145         WebPageProxy, so that setting the topContentInset() on WebPageProxy is reflected in the getters
146         for the two view classes.
147
148         Reviewed by Tim Horton.
149
150         * UIProcess/Cocoa/WebViewImpl.h:
151         (WebKit::WebViewImpl::topContentInset): Deleted.
152         * UIProcess/Cocoa/WebViewImpl.mm:
153         (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
154         (WebKit::WebViewImpl::topContentInset):
155         (WebKit::WebViewImpl::setTopContentInset):
156         (WebKit::WebViewImpl::dispatchSetTopContentInset):
157         * UIProcess/mac/WKFullScreenWindowController.mm:
158         (-[WKFullScreenWindowController enterFullScreen:]):
159         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
160         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
161         (-[WKFullScreenWindowController _saveTopContentInset]): Deleted.
162         (-[WKFullScreenWindowController _restoreTopContentInset]): Deleted.
163
164 2016-12-13  Brent Fulgham  <bfulgham@apple.com>
165
166         [Mac][WK2] Tighten Keychain directory access
167         https://bugs.webkit.org/show_bug.cgi?id=165818
168         <rdar://problem/16863857>
169
170         Reviewed by Anders Carlsson.
171
172         Lock down Keychain directory access to just the file-read-data, file-read-metadata, and
173         file-write-data operations we actually need.
174
175         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
176         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
177         * WebProcess/com.apple.WebProcess.sb.in:
178
179 2016-12-13  Andy Estes  <aestes@apple.com>
180
181         [Cocoa] Implement -shouldInsertText: on WKWebProcessPlugInEditingDelegate
182         https://bugs.webkit.org/show_bug.cgi?id=165785
183         <rdar://problem/26929398>
184
185         Reviewed by Darin Adler.
186
187         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h: Defined
188         WKEditorInsertAction and declared
189         -_webProcessPlugInBrowserContextController:shouldInsertText:replacingRange:givenAction:.
190         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
191         (toWK): Added. Mapped a WebCore::EditorInsertAction to a WKEditorInsertAction.
192         (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Implemented
193         EditorClient::shouldInsertText() by calling
194         -_webProcessPlugInBrowserContextController:shouldInsertText:replacingRange:givenAction: with
195         the text, wrapped range handle, and action. Added shouldInsertText to DelegateMethods and
196         initialized it according to whether the delegate responds to shouldInsertText:.
197
198 2016-12-13  Joseph Pecoraro  <pecoraro@apple.com>
199
200         NSArray leaks seen in Safari, allocated under WKIconDatabaseTryCopyCGImageArrayForURL
201         https://bugs.webkit.org/show_bug.cgi?id=165809
202
203         Reviewed by Dan Bernstein.
204
205         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
206         (WKIconDatabaseTryCopyCGImageArrayForURL):
207         Avoid an extra retain on already newly created array.
208
209 2016-12-13  Eric Carlson  <eric.carlson@apple.com>
210
211         Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
212         https://bugs.webkit.org/show_bug.cgi?id=165251
213
214         Reviewed by Youenn Fablet.
215
216         * WebProcess/WebPage/WebPage.cpp:
217         (WebKit::WebPage::updatePreferences): Update the media stream and peer connection runtime
218         feature instead of the setting.
219
220 2016-12-13  Sergio Villar Senin  <svillar@igalia.com>
221
222         Fix GTK build after r209733
223         https://bugs.webkit.org/show_bug.cgi?id=165794
224
225         Document::visibilityState() now returns an IDL string enumeration.
226
227         Reviewed by Žan Doberšek.
228
229         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
230         (webkit_dom_document_get_visibility_state):
231
232 2016-12-12  Dean Jackson  <dino@apple.com>
233
234         [iOS] MediaDocument "Done" button should navigate the page back
235         https://bugs.webkit.org/show_bug.cgi?id=165779
236
237         Reviewed by Sam Weinig.
238
239         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
240         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
241         (WebKit::WebVideoFullscreenModelContext::requestFullscreenMode):
242         (WebKit::WebVideoFullscreenManagerProxy::requestFullscreenMode):
243         * WebProcess/cocoa/WebVideoFullscreenManager.h:
244         * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
245         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
246         (WebKit::WebVideoFullscreenManager::requestFullscreenMode):
247
248 2016-12-12  Tim Horton  <timothy_horton@apple.com>
249
250         Provide SPI to avoid blocking on painting when coming into view
251         https://bugs.webkit.org/show_bug.cgi?id=165780
252         <rdar://problem/29009559>
253
254         Reviewed by Simon Fraser.
255
256         By default, when parenting a WKWebView which was previously in-window,
257         we block on painting to ensure that we don't flash stale content.
258         We added SPI to disable this behavior to WKWebViewConfiguration, but
259         some clients might want the behavior most of the time, but sometimes
260         instead want to not block the UI process main thread, but instead do
261         their own work (e.g. removing a snapshot) when painting eventually occurs.
262
263         * UIProcess/API/Cocoa/WKWebView.mm:
264         (-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForPainting:]):
265         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
266         Tell WebPageProxy not to block on painting next time we are parented,
267         and use doAfterNextPresentationUpdate to call the block when the painting
268         does eventually happen. This SPI must be called before - but in the same
269         runloop cycle - the WKWebView is brought back in-window to work correctly.
270         
271         * UIProcess/WebPageProxy.cpp:
272         (WebKit::WebPageProxy::dispatchActivityStateChange):
273         * UIProcess/WebPageProxy.h:
274         (WebKit::WebPageProxy::skipWaitingForPaintAfterNextViewDidMoveToWindow):
275         If we would block because we're coming in-window, but the bit to skip
276         blocking the next time we get brought in-window is set, reset the bit, 
277         and avoid blocking.
278
279 2016-12-12  Chris Dumez  <cdumez@apple.com>
280
281         Document.visibilityState should use an IDL string enumeration
282         https://bugs.webkit.org/show_bug.cgi?id=165774
283
284         Reviewed by Daniel Bates.
285
286         * Shared/API/c/WKSharedAPICast.h:
287         (WebKit::toPageVisibilityState):
288
289 2016-12-11  Konstantin Tokarev  <annulen@yandex.ru>
290
291         Unreviewed attempt to fix EFL and Mac/cmake builds after r209665.
292         https://bugs.webkit.org/show_bug.cgi?id=165686
293
294         * PlatformEfl.cmake: WebKit2 should precede other target so that right
295         config.h comes first in include path.
296
297 2016-12-11  Tim Horton  <timothy_horton@apple.com>
298
299         Quarter-second stalls scrolling images that are links because of sync getPositionInformation
300         https://bugs.webkit.org/show_bug.cgi?id=165707
301
302         Reviewed by Simon Fraser.
303
304         * UIProcess/ios/WKContentViewInteraction.mm:
305         (-[WKContentView positionInformationForActionSheetAssistant:]):
306         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
307         For now, synchronously block when presenting the action sheet if we
308         don't have a snapshot ready.
309
310         * WebProcess/WebPage/ios/WebPageIOS.mm:
311         (WebKit::WebPage::getPositionInformation):
312         Respect includeSnapshot in another place in getPositionInformation,
313         so that many getPositionInformations don't have to do extra snapshotting work.
314
315 2016-12-10  Filip Pizlo  <fpizlo@apple.com>
316
317         The DOM should have an advancing wavefront opaque root barrier
318         https://bugs.webkit.org/show_bug.cgi?id=165712
319
320         Reviewed by Yusuke Suzuki.
321         
322         Propagate the JSDOMWindowBase::commonVM() -> commonVM() change.
323
324         * Shared/linux/WebMemorySamplerLinux.cpp:
325         (WebKit::WebMemorySampler::sampleWebKit):
326         * Shared/mac/WebMemorySampler.mac.mm:
327         (WebKit::WebMemorySampler::sampleWebKit):
328         * WebProcess/InjectedBundle/InjectedBundle.cpp:
329         (WebKit::InjectedBundle::javaScriptObjectsCount):
330         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
331         (WebKit::JSNPObject::callMethod):
332         (WebKit::JSNPObject::callObject):
333         (WebKit::JSNPObject::callConstructor):
334         (WebKit::JSNPObject::put):
335         (WebKit::JSNPObject::deleteProperty):
336         (WebKit::JSNPObject::getOwnPropertyNames):
337         (WebKit::JSNPObject::propertyGetter):
338         * WebProcess/WebPage/WebPage.cpp:
339         (WebKit::WebPage::runJavaScriptInMainFrame):
340         (WebKit::WebPage::getBytecodeProfile):
341         (WebKit::WebPage::getSamplingProfilerOutput):
342         * WebProcess/WebProcess.cpp:
343         (WebKit::WebProcess::getWebCoreStatistics):
344
345 2016-12-11  Konstantin Tokarev  <annulen@yandex.ru>
346
347         Unreviewed build fix for EFL after r209665
348
349         * UIProcess/efl/TextCheckerClientEfl.h:
350
351 2016-12-10  Konstantin Tokarev  <annulen@yandex.ru>
352
353         [cmake] Include WTF, JSC, and WebCore headers automatically to targers using them
354         https://bugs.webkit.org/show_bug.cgi?id=165686
355
356         Reviewed by Michael Catanzaro.
357
358         This change reduces duplication of include path lists between modules,
359         and reduces future need for fixes like r209605 (broken build because of
360         WebCore header suddenly becoming used in WebKit2).
361
362         * CMakeLists.txt:
363         * PlatformEfl.cmake:
364         * PlatformGTK.cmake:
365         * PlatformMac.cmake:
366
367 2016-12-10  Antti Koivisto  <antti@apple.com>
368
369         CrashTracer: com.apple.WebKit.Networking at WTF::ThreadSafeRefCounted<WebKit::NetworkCache::IOChannel>::deref
370         https://bugs.webkit.org/show_bug.cgi?id=165659
371         <rdar://problem/27077977>
372
373         Reviewed by Darin Adler.
374
375         * NetworkProcess/cache/NetworkCacheIOChannel.h:
376         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
377         (WebKit::NetworkCache::IOChannel::~IOChannel):
378
379             Add non-inlined destructor and release assert against double deletion to narrow down this crash.
380
381 2016-12-09  Brent Fulgham  <bfulgham@apple.com>
382
383         WebCore::Timer is not compatible with UIProcess
384         https://bugs.webkit.org/show_bug.cgi?id=165706
385         <rdar://problem/29360564>
386
387         Reviewed by Andy Estes.
388
389         Anders has explained to me (at least twice) that WebCore::Timer must not
390         be used in UIProcess code. A recent bug fix introduced a WebCore::Timer,
391         which led to another crash.
392         
393         This patch switches from WebCore::Timer to WTF::RunLoop::Timer to avoid
394         the problem.
395
396         * UIProcess/Cocoa/NavigationState.h:
397         * UIProcess/Cocoa/NavigationState.mm:
398         (WebKit::NavigationState::NavigationState):
399
400 2016-12-09  Eric Carlson  <eric.carlson@apple.com>
401
402         Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
403         https://bugs.webkit.org/show_bug.cgi?id=165251
404
405         Reviewed by Dean Jackson.
406
407         Based on a patch by Dr Alex Gouaillard <agouaillard@gmail.com>
408
409         * Shared/WebPreferencesDefinitions.h: Add peerConnectionEnabled.
410
411         * UIProcess/API/C/WKPreferences.cpp:
412         (WKPreferencesSetPeerConnectionEnabled): Added.
413         (WKPreferencesGetPeerConnectionEnabled): Added.
414         * UIProcess/API/C/WKPreferencesRef.h:
415
416         * WebProcess/InjectedBundle/InjectedBundle.cpp:
417         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Add WebKitMediaStreamEnabled
418           and WebKitPeerConnectionEnabled.
419
420         * WebProcess/WebPage/WebPage.cpp:
421         (WebKit::WebPage::updatePreferences): Initialize the peerConnection preference.
422
423 2016-12-09  Brady Eidson  <beidson@apple.com>
424
425         Re-landing:
426         Add _WKIconLoadingDelegate SPI.
427         https://bugs.webkit.org/show_bug.cgi?id=164894
428
429         Reviewed by Alex Christensen.
430
431         With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.
432
433         WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.
434
435         For icons the app decides to load, WebKit will pass the data to the app without storing locally.
436
437         * UIProcess/API/APIIconLoadingClient.h: Copied from Source/WebCore/html/LinkIconCollector.h.
438         (API::IconLoadingClient::~IconLoadingClient):
439         (API::IconLoadingClient::getLoadDecisionForIcon):
440
441         * UIProcess/API/Cocoa/WKWebView.mm:
442         (-[WKWebView _initializeWithConfiguration:]):
443         (-[WKWebView _iconLoadingDelegate]):
444         (-[WKWebView _setIconLoadingDelegate:]):
445         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
446
447         * UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
448
449         * UIProcess/API/Cocoa/_WKLinkIconParameters.h: Copied from Source/WebCore/html/LinkIconCollector.h.
450         * UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Copied from Source/WebCore/html/LinkIconCollector.h.
451         (-[_WKLinkIconParameters _initWithLinkIcon:]):
452         (-[_WKLinkIconParameters url]):
453         (-[_WKLinkIconParameters mimeType]):
454         (-[_WKLinkIconParameters size]):
455         (-[_WKLinkIconParameters iconType]):
456         * UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Copied from Source/WebCore/html/LinkIconCollector.h.
457
458         * UIProcess/Cocoa/IconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
459         * UIProcess/Cocoa/IconLoadingDelegate.mm: Added.
460         (WebKit::IconLoadingDelegate::IconLoadingDelegate):
461         (WebKit::IconLoadingDelegate::~IconLoadingDelegate):
462         (WebKit::IconLoadingDelegate::createIconLoadingClient):
463         (WebKit::IconLoadingDelegate::delegate):
464         (WebKit::IconLoadingDelegate::setDelegate):
465         (WebKit::IconLoadingDelegate::IconLoadingClient::IconLoadingClient):
466         (WebKit::IconLoadingDelegate::IconLoadingClient::~IconLoadingClient):
467         (WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):
468
469         * UIProcess/WebPageProxy.cpp:
470         (WebKit::WebPageProxy::setIconLoadingClient):
471         (WebKit::WebPageProxy::getLoadDecisionForIcon):
472         (WebKit::WebPageProxy::finishedLoadingIcon):
473         * UIProcess/WebPageProxy.h:
474         (WebKit::WebPageProxy::iconLoadingClient):
475         * UIProcess/WebPageProxy.messages.in:
476
477         * WebKit2.xcodeproj/project.pbxproj:
478
479         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
480         (WebKit::WebFrameLoaderClient::useIconLoadingClient):
481         (WebKit::WebFrameLoaderClient::getLoadDecisionForIcon):
482         (WebKit::WebFrameLoaderClient::finishedLoadingIcon):
483         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
484         (WebKit::WebFrameLoaderClient::setUseIconLoadingClient):
485
486         * WebProcess/WebPage/WebPage.cpp:
487         (WebKit::WebPage::didGetLoadDecisionForIcon):
488         (WebKit::WebPage::setUseIconLoadingClient):
489         * WebProcess/WebPage/WebPage.h:
490         * WebProcess/WebPage/WebPage.messages.in:
491
492 2016-12-09  Simon Fraser  <simon.fraser@apple.com>
493
494         Fix initialization of contentUpdateFrequency
495         https://bugs.webkit.org/show_bug.cgi?id=165705
496         rdar://problem/29602039
497
498         Reviewed by Tim Horton.
499
500         The value that controls web content update frequency was not being initialized.
501
502         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
503         (-[WKWebViewConfiguration init]):
504
505 2016-12-09  Anders Carlsson  <andersca@apple.com>
506
507         Once we can send Mach messages again, make sure to send any pending outgoing messages
508         https://bugs.webkit.org/show_bug.cgi?id=165693
509
510         Reviewed by Brady Eidson.
511
512         * Platform/IPC/mac/ConnectionMac.mm:
513         (IPC::Connection::initializeSendSource):
514
515 2016-12-09  Beth Dakin  <bdakin@apple.com>
516
517         Password fields should not show the emoji button in TouchBar
518         https://bugs.webkit.org/show_bug.cgi?id=165673
519         -and corresponding-
520         rdar://problem/29235739
521
522         Reviewed by Wenson Hsieh.
523
524         This patch adds a new member variable for the password touch bar and password 
525         candidateListTouchBarItem. Since this TouchBar will actually have a different set 
526         of identifiers than the plain text TouchBar, it should just have its own variable.
527         * UIProcess/Cocoa/WebViewImpl.h:
528         * UIProcess/Cocoa/WebViewImpl.mm:
529
530         Return m_passwordTextCandidateListTouchBarItem when appropriate.
531         (WebKit::WebViewImpl::candidateListTouchBarItem):
532
533         The candidate list should be the only item for passwords.
534         (WebKit::passwordTextTouchBarDefaultItemIdentifiers):
535
536         Account for m_passwordTextTouchBar.
537         (WebKit::WebViewImpl::updateTouchBarAndRefreshTextBarIdentifiers):
538         (WebKit::WebViewImpl::setUpTextTouchBar):
539         (WebKit::WebViewImpl::textTouchBar):
540
541         The empty candidates array is not needed. We can just set @[ ] as the candidates 
542         for the m_passwordTextCandidateListTouchBarItem. Safe guards already exist in the 
543         other parts of the code to prevent us from requesting or setting other candidates 
544         when in a password field. 
545         (WebKit::WebViewImpl::updateTextTouchBar):
546
547 2016-12-09  Keith Rollin  <krollin@apple.com>
548
549         Fix string specification in print format
550         https://bugs.webkit.org/show_bug.cgi?id=165650
551
552         Reviewed by Alex Christensen.
553
554         Change "%{public}s" string specifier to something that can be changed
555         to "%s" at compile time when the build environment doesn't support the
556         former.
557
558         * NetworkProcess/capture/NetworkCaptureLogging.h:
559         * NetworkProcess/capture/NetworkCaptureManager.cpp:
560         (WebKit::NetworkCapture::Manager::initialize):
561         (WebKit::NetworkCapture::Manager::findMatch):
562         (WebKit::NetworkCapture::Manager::findExactMatch):
563         (WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
564         (WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
565         (WebKit::NetworkCapture::Manager::logPlayedBackResource):
566         (WebKit::NetworkCapture::Manager::openCacheFile):
567         (WebKit::NetworkCapture::Manager::getLine):
568         * NetworkProcess/capture/NetworkCaptureRecorder.cpp:
569         (WebKit::NetworkCapture::Recorder::recordRequestSent):
570         (WebKit::NetworkCapture::Recorder::recordResponseReceived):
571         (WebKit::NetworkCapture::Recorder::recordRedirectReceived):
572         (WebKit::NetworkCapture::Recorder::recordRedirectSent):
573         (WebKit::NetworkCapture::Recorder::writeEvents):
574         * NetworkProcess/capture/NetworkCaptureResource.cpp:
575         (WebKit::NetworkCapture::Resource::url):
576         (WebKit::NetworkCapture::Resource::EventStream::nextEvent):
577         * NetworkProcess/capture/NetworkDataTaskReplay.cpp:
578         (WebKit::NetworkCapture::NetworkDataTaskReplay::NetworkDataTaskReplay):
579         (WebKit::NetworkCapture::NetworkDataTaskReplay::~NetworkDataTaskReplay):
580         (WebKit::NetworkCapture::NetworkDataTaskReplay::resume):
581         (WebKit::NetworkCapture::NetworkDataTaskReplay::suspend):
582         (WebKit::NetworkCapture::NetworkDataTaskReplay::complete):
583         (WebKit::NetworkCapture::NetworkDataTaskReplay::invalidateAndCancel):
584         (WebKit::NetworkCapture::NetworkDataTaskReplay::enqueueEventHandler):
585         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRequestSent):
586         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayResponseReceived):
587         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectReceived):
588         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectSent):
589         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayDataReceived):
590         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayFinished):
591         (WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):
592
593 2016-12-09  Jeremy Jones  <jeremyj@apple.com>
594
595         WebView doesn't become first responder in element fullscreen.
596         https://bugs.webkit.org/show_bug.cgi?id=165664
597         rdar://problem/28927252
598
599         Reviewed by Tim Horton.
600
601         WebView was being set as the first responder while the contentView was still hidden.
602         A view can not become first responder while it or its ancestor is hidden.
603
604         This change waits until after the contentView is visible to make the web view the first responder.
605
606         * UIProcess/mac/WKFullScreenWindowController.mm:
607         (-[WKFullScreenWindowController enterFullScreen:]):
608         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
609
610 2016-12-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
611
612         Unreviewed build fix. Thanks to Konstantin Tokarev and Csaba Osztrogonác
613         for pointing out the fix.
614
615         * CMakeLists.txt: add WebCore/html/canvas to include paths.
616
617 2016-12-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
618
619         [GTK] Fix build after r209558
620         https://bugs.webkit.org/show_bug.cgi?id=165653
621
622         Unreviewed build fix.
623
624         * UIProcess/API/APIPolicyClient.h: include WebsitePolicies.h.
625         * UIProcess/API/gtk/WebKitPolicyClient.cpp: ditto.
626         * UIProcess/API/gtk/WebKitPolicyDecision.cpp:
627         (webkit_policy_decision_use):  pass empty structure to new required argument.
628
629 2016-12-09  Gavin Barraclough  <barraclough@apple.com>
630
631         Revert - Add _WKIconLoadingDelegate SPI
632         https://bugs.webkit.org/show_bug.cgi?id=164894
633
634         Unreviewed rollout due to performance regression.
635
636         * PlatformMac.cmake:
637         * UIProcess/API/APIIconLoadingClient.h: Removed.
638         * UIProcess/API/Cocoa/WKWebView.mm:
639         (-[WKWebView _initializeWithConfiguration:]):
640         (-[WKWebView _iconLoadingDelegate]): Deleted.
641         (-[WKWebView _setIconLoadingDelegate:]): Deleted.
642         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
643         * UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Removed.
644         * UIProcess/API/Cocoa/_WKLinkIconParameters.h: Removed.
645         * UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Removed.
646         * UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Removed.
647         * UIProcess/Cocoa/IconLoadingDelegate.h: Removed.
648         * UIProcess/Cocoa/IconLoadingDelegate.mm: Removed.
649         * UIProcess/WebPageProxy.cpp:
650         (WebKit::WebPageProxy::setIconLoadingClient): Deleted.
651         (WebKit::WebPageProxy::getLoadDecisionForIcon): Deleted.
652         (WebKit::WebPageProxy::finishedLoadingIcon): Deleted.
653         * UIProcess/WebPageProxy.h:
654         (WebKit::WebPageProxy::iconLoadingClient): Deleted.
655         * UIProcess/WebPageProxy.messages.in:
656         * WebKit2.xcodeproj/project.pbxproj:
657         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
658         (WebKit::WebFrameLoaderClient::useIconLoadingClient): Deleted.
659         (WebKit::WebFrameLoaderClient::getLoadDecisionForIcon): Deleted.
660         (WebKit::WebFrameLoaderClient::finishedLoadingIcon): Deleted.
661         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
662         (WebKit::WebFrameLoaderClient::setUseIconLoadingClient): Deleted.
663         (): Deleted.
664         * WebProcess/WebPage/WebPage.cpp:
665         (WebKit::WebPage::didGetLoadDecisionForIcon): Deleted.
666         (WebKit::WebPage::setUseIconLoadingClient): Deleted.
667         * WebProcess/WebPage/WebPage.h:
668         * WebProcess/WebPage/WebPage.messages.in:
669
670 2016-12-08  Keith Rollin  <krollin@apple.com>
671
672         Move FileHandle to WebCore FileHandle.h
673         https://bugs.webkit.org/show_bug.cgi?id=165562
674
675         Reviewed by Alex Christensen.
676
677         Move FileHandle from NetworkCaptureTypes.h (which can now be deleted)
678         to WebCore. Update client code to use the new version.
679
680         * NetworkProcess/capture/NetworkCaptureEvent.cpp:
681         * NetworkProcess/capture/NetworkCaptureEvent.h:
682         * NetworkProcess/capture/NetworkCaptureManager.cpp:
683         (WebKit::NetworkCapture::Manager::initialize):
684         (WebKit::NetworkCapture::Manager::terminate):
685         (WebKit::NetworkCapture::Manager::logRecordedResource):
686         (WebKit::NetworkCapture::Manager::logLoadedResource):
687         (WebKit::NetworkCapture::Manager::logPlayedBackResource):
688         (WebKit::NetworkCapture::Manager::openCacheFile):
689         (WebKit::NetworkCapture::Manager::ensureFileHandle): Deleted.
690         (WebKit::NetworkCapture::Manager::printToFile): Deleted.
691         * NetworkProcess/capture/NetworkCaptureManager.h:
692         * NetworkProcess/capture/NetworkCaptureRecorder.cpp:
693         (WebKit::NetworkCapture::Recorder::writeEvents):
694         * NetworkProcess/capture/NetworkCaptureTypes.h: Removed.
695         * WebKit2.xcodeproj/project.pbxproj:
696
697 2016-12-08  Anders Carlsson  <andersca@apple.com>
698
699         Attempt to fix the iOS build.
700
701         * Platform/IPC/mac/MachMessage.cpp:
702
703 2016-12-08  Anders Carlsson  <andersca@apple.com>
704
705         Defer sending Mach messages if the queue is full
706         https://bugs.webkit.org/show_bug.cgi?id=165622
707         rdar://problem/29518036
708
709         Reviewed by Brady Eidson.
710
711         * Platform/IPC/Connection.cpp:
712         Include MachMessage.h so the Connection destructor can do its thing.
713
714         * Platform/IPC/Connection.h:
715         Add new members.
716
717         * Platform/IPC/mac/ConnectionMac.mm:
718         (IPC::Connection::platformInvalidate):
719         Null out the pending outgoing mach message.
720
721         (IPC::Connection::sendMessage):
722         New helper that will send a Mach message. If we time out, store the message in m_pendingOutgoingMachMessage.
723         When our send source will be triggered we'll try to send the message again.
724
725         (IPC::Connection::platformCanSendOutgoingMessages):
726         We can only send messages if we don't have a pending outgoing message.
727
728         (IPC::Connection::sendOutgoingMessage):
729         Call the newly added sendMessage function.
730
731         (IPC::Connection::initializeSendSource):
732         Add the DISPATCH_MACH_SEND_POSSIBLE mask (and DISPATCH_MACH_SEND_DEAD which was previously implicit).
733         In our event handler, check for DISPATCH_MACH_SEND_POSSIBLE and try to send the pending outgoing message again.
734
735         * Platform/IPC/mac/MachMessage.cpp:
736         (IPC::MachMessage::create):
737         Rename length to size.
738
739         (IPC::MachMessage::MachMessage):
740         Initialize m_shouldFreeDescriptors.
741
742         (IPC::MachMessage::~MachMessage):
743         Call mach_msg_destroy, which will free the descriptors.
744
745         (IPC::MachMessage::leakDescriptors):
746         Set m_shouldFreeDescriptors to false.
747
748         * Platform/IPC/mac/MachMessage.h:
749         (IPC::MachMessage::size):
750         (IPC::MachMessage::length): Deleted.
751
752 2016-12-08  Chelsea Pugh  <cpugh@apple.com>
753
754         [iOS] WKWebView should not allow app links to be opened on back or forward navigation
755         https://bugs.webkit.org/show_bug.cgi?id=165502
756
757         Reviewed by Dan Bernstein.
758
759         * UIProcess/WebPageProxy.cpp:
760         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Add a condition to shouldOpenAppLinks
761         (which we use when creating a NavigationAction) that the navigationActionData is not a navigation
762         of type BackForward. This way, we don't open app links when a navigation is done via back or
763         forward.
764
765 2016-12-08  Filip Pizlo  <fpizlo@apple.com>
766
767         Enable SharedArrayBuffer, remove the flag
768         https://bugs.webkit.org/show_bug.cgi?id=165614
769
770         Rubber stamped by Geoffrey Garen.
771
772         * UIProcess/API/C/WKPreferencesRefPrivate.h:
773         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
774
775 2016-12-08  Alex Christensen  <achristensen@webkit.org>
776
777         Add SPI for sending WebsiteSettings to WebProcess during navigation
778         https://bugs.webkit.org/show_bug.cgi?id=165517
779         <rdar://29341068>
780
781         We add the ability for the navigation client to send settings to the WebProcess 
782         based on the URL of the document being navigated to. This approach adds no new IPC 
783         messages and allows the application to decide what settings to use during navigation 
784         instead of declaratively before navigation. Right now there is only one setting, 
785         whether to disable content blockers, but this infrastructure can be used for more settings.
786
787         Reviewed by Anders Carlsson.
788
789         * CMakeLists.txt:
790         * PlatformMac.cmake:
791         * Shared/API/APIObject.h:
792         * Shared/API/c/WKBase.h:
793         * Shared/WebsitePolicies.h: Added.
794         (WebKit::WebsitePolicies::encode):
795         (WebKit::WebsitePolicies::decode):
796         * UIProcess/API/APINavigationClient.h:
797         (API::NavigationClient::decidePolicyForNavigationAction):
798         (API::NavigationClient::decidePolicyForNavigationResponse):
799         * UIProcess/API/APIPolicyClient.h:
800         (API::PolicyClient::decidePolicyForNavigationAction):
801         (API::PolicyClient::decidePolicyForNewWindowAction):
802         (API::PolicyClient::decidePolicyForResponse):
803         * UIProcess/API/APIWebsitePolicies.cpp: Added.
804         (API::WebsitePolicies::create):
805         * UIProcess/API/APIWebsitePolicies.h: Added.
806         * UIProcess/API/C/WKAPICast.h:
807         * UIProcess/API/C/WKFramePolicyListener.cpp:
808         (WKFramePolicyListenerUse):
809         (WKFramePolicyListenerUseWithPolicies):
810         * UIProcess/API/C/WKFramePolicyListener.h:
811         * UIProcess/API/C/WKPage.cpp:
812         (WKPageSetPagePolicyClient):
813         * UIProcess/API/C/WKWebsitePolicies.cpp: Added.
814         (WKWebsitePoliciesGetTypeID):
815         (WKWebsitePoliciesCreate):
816         (WKWebsitePoliciesSetContentBlockersEnabled):
817         (WKWebsitePoliciesGetContentBlockersEnabled):
818         * UIProcess/API/C/WKWebsitePolicies.h: Added.
819         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
820         * UIProcess/API/Cocoa/_WKWebsitePolicies.h: Added.
821         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm: Added.
822         (-[_WKWebsitePolicies dealloc]):
823         (-[_WKWebsitePolicies init]):
824         (-[_WKWebsitePolicies setContentBlockersEnabled:]):
825         (-[_WKWebsitePolicies contentBlockersEnabled]):
826         (-[_WKWebsitePolicies description]):
827         (-[_WKWebsitePolicies _apiObject]):
828         * UIProcess/API/Cocoa/_WKWebsitePoliciesInternal.h: Added.
829         (WebKit::wrapper):
830         * UIProcess/Automation/WebAutomationSession.cpp:
831         (WebKit::WebAutomationSession::reloadBrowsingContext):
832         * UIProcess/Cocoa/NavigationState.h:
833         * UIProcess/Cocoa/NavigationState.mm:
834         (WebKit::NavigationState::setNavigationDelegate):
835         (WebKit::tryAppLink):
836         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
837         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
838         * UIProcess/WebFormSubmissionListenerProxy.cpp:
839         (WebKit::WebFormSubmissionListenerProxy::continueSubmission):
840         * UIProcess/WebFrameListenerProxy.cpp:
841         (WebKit::WebFrameListenerProxy::receivedPolicyDecision):
842         * UIProcess/WebFrameListenerProxy.h:
843         * UIProcess/WebFramePolicyListenerProxy.cpp:
844         (WebKit::WebFramePolicyListenerProxy::use):
845         (WebKit::WebFramePolicyListenerProxy::download):
846         (WebKit::WebFramePolicyListenerProxy::ignore):
847         * UIProcess/WebFramePolicyListenerProxy.h:
848         (WebKit::WebFramePolicyListenerProxy::create):
849         * UIProcess/WebFrameProxy.cpp:
850         (WebKit::WebFrameProxy::receivedPolicyDecision):
851         * UIProcess/WebFrameProxy.h:
852         * UIProcess/WebInspectorProxy.cpp:
853         (WebKit::decidePolicyForNavigationAction):
854         * UIProcess/WebPageProxy.cpp:
855         (WebKit::WebPageProxy::receivedPolicyDecision):
856         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
857         * UIProcess/WebPageProxy.h:
858         * UIProcess/WebPageProxy.messages.in:
859         * WebKit2.xcodeproj/project.pbxproj:
860         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
861         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
862
863 2016-12-08  Antti Koivisto  <antti@apple.com>
864
865         Salt network cache hashes
866         https://bugs.webkit.org/show_bug.cgi?id=164924
867
868         Reviewed by Alex Christensen.
869
870         To enhance privacy make cache content unidentifiable from file names alone.
871         This is done by generating a unique persistent salt for each cache instance.
872         It is used when computing hashes used in file names.
873
874         The patch also replaces plain text partition directory names with salted hashes.
875
876         * NetworkProcess/cache/NetworkCache.cpp:
877         (WebKit::NetworkCache::Cache::makeCacheKey):
878         (WebKit::NetworkCache::makeCacheKey): Deleted.
879         * NetworkProcess/cache/NetworkCache.h:
880
881             Increment cache version.
882
883         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
884         (WebKit::NetworkCache::BlobStorage::BlobStorage):
885         (WebKit::NetworkCache::BlobStorage::add):
886         (WebKit::NetworkCache::BlobStorage::get):
887
888             Use salt for blob content hash.
889
890         * NetworkProcess/cache/NetworkCacheBlobStorage.h:
891         * NetworkProcess/cache/NetworkCacheData.cpp:
892         (WebKit::NetworkCache::computeSHA1):
893
894             For simplicity all SHA1s are now salted.
895
896         (WebKit::NetworkCache::makeSalt):
897         (WebKit::NetworkCache::readOrMakeSalt):
898
899             Read salt if it exists, generate and persist it otherwise.
900
901         * NetworkProcess/cache/NetworkCacheData.h:
902         * NetworkProcess/cache/NetworkCacheKey.cpp:
903         (WebKit::NetworkCache::Key::Key):
904
905             Remove the "No partition" string and just empty.
906             That was only needed to have a directory name of some sort.
907
908         (WebKit::NetworkCache::Key::computeHash):
909
910             Use salt for key hash.
911
912         (WebKit::NetworkCache::Key::computePartitionHash):
913
914             Separate hash for partition.
915
916         * NetworkProcess/cache/NetworkCacheKey.h:
917         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
918         (WebKit::NetworkCache::makeSubresourcesKey):
919         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
920         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
921         * NetworkProcess/cache/NetworkCacheStorage.cpp:
922         (WebKit::NetworkCache::makeSaltFilePath):
923         (WebKit::NetworkCache::Storage::open):
924
925             Cache can't be opened if we can't read or persist a salt.
926
927         (WebKit::NetworkCache::traverseRecordsFiles):
928         (WebKit::NetworkCache::Storage::Storage):
929         (WebKit::NetworkCache::Storage::synchronize):
930         (WebKit::NetworkCache::Storage::recordDirectoryPathForKey):
931
932             Use the partition hash in the directory name instead of a plain text name.
933
934         (WebKit::NetworkCache::decodeRecordHeader):
935         (WebKit::NetworkCache::Storage::readRecord):
936         (WebKit::NetworkCache::Storage::encodeRecord):
937         (WebKit::NetworkCache::Storage::traverse):
938         (WebKit::NetworkCache::Storage::clear):
939         * NetworkProcess/cache/NetworkCacheStorage.h:
940         (WebKit::NetworkCache::Storage::salt):
941
942 2016-12-08  Eric Carlson  <eric.carlson@apple.com>
943
944         Fix the EFL build.
945
946         * UIProcess/WebPageProxy.cpp:
947         (WebKit::WebPageProxy::isPlayingMediaDidChange): Add another ENABLE(MEDIA_STREAM) guard.
948
949 2016-12-08  Tomas Popela  <tpopela@redhat.com>
950
951         [GTK] Process accelerated compositing env variables only if they are really enabled
952         https://bugs.webkit.org/show_bug.cgi?id=165300
953
954         Don't process the WEBKIT_FORCE_COMPOSITING_MODE and
955         WEBKIT_DISABLE_COMPOSITING_MODE env variables if they are disabled
956         (eg. WEBKIT_DISABLE_COMPOSITING_MODE=0).
957
958         Reviewed by Michael Catanzaro.
959
960         * UIProcess/gtk/WebPreferencesGtk.cpp:
961         (WebKit::WebPreferences::platformInitializeStore):
962
963 2016-12-08  Alex Christensen  <achristensen@webkit.org>
964
965         Fix CMake build.
966
967         * CMakeLists.txt:
968         Add the new NetworkProcess/capture include directory to find new headers from r209498.
969         * NetworkProcess/capture/NetworkCaptureEvent.cpp:
970         (WebKit::NetworkCapture::Response::Response):
971         (WebKit::NetworkCapture::Error::Error):
972         The String constructor was ambiguous after r209498 because URL has an operator NSString* and String has an NSString constructor.
973         We should get rid of operator NSString* and operator String on URL.
974         * UIProcess/WebPageProxy.cpp:
975         * UIProcess/WebPageProxy.h:
976         Add some ENABLE(MEDIA_STREAM) macros to fix the build without it enabled after r209512.
977
978 2016-12-08  Alex Christensen  <achristensen@webkit.org>
979
980         Fix iOS debug build after r209498
981         https://bugs.webkit.org/show_bug.cgi?id=164527
982
983         * NetworkProcess/capture/NetworkCaptureLogging.h:
984         Logs were causing compile warnings/errors.  Disable logs for now.
985
986 2016-12-07  Dean Jackson  <dino@apple.com>
987
988         Remove runtime toggle for pointer-lock
989         https://bugs.webkit.org/show_bug.cgi?id=165577
990         <rdar://problems/29566996>
991
992         Reviewed by Jon Lee.
993
994         Remove any runtime calls to check if pointer-lock is enabled. It's
995         either compiled in or out.
996
997         * Shared/WebPreferencesDefinitions.h:
998         * UIProcess/API/C/WKPreferences.cpp:
999         (WKPreferencesSetPointerLockEnabled): Deleted.
1000         (WKPreferencesGetPointerLockEnabled): Deleted.
1001         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1002         * WebProcess/WebPage/WebPage.cpp:
1003         (WebKit::WebPage::updatePreferences):
1004
1005 2016-12-07  Eric Carlson  <eric.carlson@apple.com>
1006
1007         [MediaStream][Mac] Revoke sandbox extensions when capture ends
1008         https://bugs.webkit.org/show_bug.cgi?id=165476
1009
1010         Reviewed by Brady Eidson.
1011
1012         Track media capture by process so it is possible to revoke the sandbox extensions issued to
1013         a web process when capture stops. Allocate WK2 user media permission manager lazily rather
1014         than every time a page is created as most pages won't need one.
1015
1016         * CMakeLists.txt: Add new files.
1017
1018         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1019         (WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy): Register
1020           with process manager.
1021         (WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
1022         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Move sandbox 
1023           extension code to the process manager.
1024         (WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
1025         (WebKit::UserMediaPermissionRequestManagerProxy::startedCaptureSession): New, report state
1026           change to the process manager.
1027         (WebKit::UserMediaPermissionRequestManagerProxy::endedCaptureSession): Ditto.
1028         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1029
1030         * UIProcess/UserMediaProcessManager.cpp: Added.
1031         (WebKit::ProcessState::ProcessState):
1032         (WebKit::ProcessState::managers):
1033         (WebKit::ProcessState::sandboxExtensionsGranted):
1034         (WebKit::ProcessState::setSandboxExtensionsGranted):
1035         (WebKit::stateMap):
1036         (WebKit::processState):
1037         (WebKit::ProcessState::addRequestManager):
1038         (WebKit::ProcessState::removeRequestManager):
1039         (WebKit::UserMediaProcessManager::singleton):
1040         (WebKit::UserMediaProcessManager::addUserMediaPermissionRequestManagerProxy):
1041         (WebKit::UserMediaProcessManager::removeUserMediaPermissionRequestManagerProxy):
1042         (WebKit::UserMediaProcessManager::willCreateMediaStream):
1043         (WebKit::UserMediaProcessManager::startedCaptureSession):
1044         (WebKit::UserMediaProcessManager::endedCaptureSession):
1045         * UIProcess/UserMediaProcessManager.h: Added.
1046
1047         * UIProcess/WebPageProxy.cpp:
1048         (WebKit::WebPageProxy::WebPageProxy): Don't allocate m_userMediaPermissionRequestManager.
1049         (WebKit::WebPageProxy::resetState): Set m_userMediaPermissionRequestManager to null.
1050         (WebKit::WebPageProxy::userMediaPermissionRequestManager): Allocate m_userMediaPermissionRequestManager
1051           lazily as most pages don't need it.
1052         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Call userMediaPermissionRequestManager().
1053         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame): Ditto.
1054         (WebKit::WebPageProxy::clearUserMediaState): Ditto.
1055         (WebKit::WebPageProxy::isPlayingMediaDidChange): Report capture state changes to the request
1056           manager proxy.
1057         * UIProcess/WebPageProxy.h:
1058
1059         * WebKit2.xcodeproj/project.pbxproj: Add new files.
1060
1061         * WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp: Added.
1062         (WebKit::MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions):
1063         (WebKit::MediaDeviceSandboxExtensions::encode):
1064         (WebKit::MediaDeviceSandboxExtensions::decode):
1065         (WebKit::MediaDeviceSandboxExtensions::operator[]):
1066         (WebKit::MediaDeviceSandboxExtensions::size):
1067         * WebProcess/MediaStream/MediaDeviceSandboxExtensions.h: Added.
1068
1069         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1070         (WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Sandbox extension
1071           is now in a HashMap, not a Vector.
1072         (WebKit::UserMediaPermissionRequestManager::grantUserMediaDeviceSandboxExtensions): Record
1073           IDs with extensions so they can be revoked later.
1074         (WebKit::UserMediaPermissionRequestManager::revokeUserMediaDeviceSandboxExtensions): New.
1075         (WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Deleted.
1076         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
1077
1078         * WebProcess/WebPage/WebPage.cpp:
1079         (WebKit::WebPage::grantUserMediaDeviceSandboxExtensions):
1080         (WebKit::WebPage::revokeUserMediaDeviceSandboxExtensions):
1081         (WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Deleted.
1082         * WebProcess/WebPage/WebPage.h:
1083         * WebProcess/WebPage/WebPage.messages.in:
1084
1085 2016-12-07  Jeremy Jones  <jeremyj@apple.com>
1086
1087         One esc to exit fullscreen and pointer lock
1088         https://bugs.webkit.org/show_bug.cgi?id=165416
1089         rdar://problem/29430711
1090
1091         Reviewed by Jer Noble.
1092
1093         Fix a crash when didLosePointerLock is not specified.
1094
1095         * UIProcess/API/C/WKPage.cpp:
1096         (WKPageSetPageUIClient):
1097
1098 2016-12-07  Keith Rollin  <krollin@apple.com>
1099
1100         Network event record/replay
1101         https://bugs.webkit.org/show_bug.cgi?id=164527
1102         <rdar://problem/29168157>
1103
1104         Reviewed by Alex Christensen.
1105
1106         Add WebKit2/NetworkProcess/capture/* for recording the network events
1107         that occur when loading a page and for replaying them later. Update
1108         NetworkLoad to invoke capture facilities. Add preferences for enabling
1109         record or replay.
1110
1111         * CMakeLists.txt:
1112         * NetworkProcess/NetworkLoad.cpp:
1113         (WebKit::NetworkLoad::NetworkLoad):
1114         (WebKit::NetworkLoad::initializeForRecord):
1115         (WebKit::NetworkLoad::initializeForReplay):
1116         (WebKit::NetworkLoad::initialize):
1117         (WebKit::NetworkLoad::setDefersLoading):
1118         (WebKit::NetworkLoad::continueWillSendRequest):
1119         (WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
1120         (WebKit::NetworkLoad::notifyDidReceiveResponse):
1121         (WebKit::NetworkLoad::didReceiveData):
1122         (WebKit::NetworkLoad::didCompleteWithError):
1123         * NetworkProcess/NetworkLoad.h:
1124         * NetworkProcess/NetworkProcess.cpp:
1125         (WebKit::NetworkProcess::initializeNetworkProcess):
1126         (WebKit::NetworkProcess::terminate):
1127         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1128         (WebKit::NetworkProcessCreationParameters::encode):
1129         (WebKit::NetworkProcessCreationParameters::decode):
1130         * NetworkProcess/NetworkProcessCreationParameters.h:
1131         * NetworkProcess/capture/NetworkCaptureEvent.cpp: Added.
1132         (WebKit::NetworkCapture::copyHeaders):
1133         (WebKit::NetworkCapture::KeyValuePair::KeyValuePair):
1134         (WebKit::NetworkCapture::ResourceRequest::ResourceRequest):
1135         (WebKit::NetworkCapture::ResourceRequest::operator WebCore::ResourceRequest):
1136         (WebKit::NetworkCapture::ResourceResponse::ResourceResponse):
1137         (WebKit::NetworkCapture::ResourceResponse::operator WebCore::ResourceResponse):
1138         (WebKit::NetworkCapture::ResourceError::ResourceError):
1139         (WebKit::NetworkCapture::ResourceError::operator WebCore::ResourceError):
1140         (WebKit::NetworkCapture::JSONCoder::encode):
1141         (WebKit::NetworkCapture::JSONCoder::decode):
1142         (WebKit::NetworkCapture::JSONCoder<String>::encode):
1143         (WebKit::NetworkCapture::JSONCoder<String>::decode):
1144         (WebKit::NetworkCapture::JSONCoder<CaptureTimeType>::encode):
1145         (WebKit::NetworkCapture::JSONCoder<CaptureTimeType>::decode):
1146         (WebKit::NetworkCapture::JSONCoder<KeyValuePair>::encode):
1147         (WebKit::NetworkCapture::JSONCoder<KeyValuePair>::decode):
1148         (WebKit::NetworkCapture::JSONCoder<Vector<T>>::encode):
1149         (WebKit::NetworkCapture::JSONCoder<Vector<T>>::decode):
1150         (WebKit::NetworkCapture::JSONCoder<ResourceRequest>::encode):
1151         (WebKit::NetworkCapture::JSONCoder<ResourceRequest>::decode):
1152         (WebKit::NetworkCapture::JSONCoder<ResourceResponse>::encode):
1153         (WebKit::NetworkCapture::JSONCoder<ResourceResponse>::decode):
1154         (WebKit::NetworkCapture::JSONCoder<ResourceError>::encode):
1155         (WebKit::NetworkCapture::JSONCoder<ResourceError>::decode):
1156         (WebKit::NetworkCapture::JSONCoder<WebCore::SharedBuffer>::encode):
1157         (WebKit::NetworkCapture::JSONCoder<WebCore::SharedBuffer>::decode):
1158         (WebKit::NetworkCapture::JSONCoder<RequestSentEvent>::encode):
1159         (WebKit::NetworkCapture::JSONCoder<RequestSentEvent>::decode):
1160         (WebKit::NetworkCapture::JSONCoder<ResponseReceivedEvent>::encode):
1161         (WebKit::NetworkCapture::JSONCoder<ResponseReceivedEvent>::decode):
1162         (WebKit::NetworkCapture::JSONCoder<RedirectReceivedEvent>::encode):
1163         (WebKit::NetworkCapture::JSONCoder<RedirectReceivedEvent>::decode):
1164         (WebKit::NetworkCapture::JSONCoder<RedirectSentEvent>::encode):
1165         (WebKit::NetworkCapture::JSONCoder<RedirectSentEvent>::decode):
1166         (WebKit::NetworkCapture::JSONCoder<DataReceivedEvent>::encode):
1167         (WebKit::NetworkCapture::JSONCoder<DataReceivedEvent>::decode):
1168         (WebKit::NetworkCapture::JSONCoder<FinishedEvent>::encode):
1169         (WebKit::NetworkCapture::JSONCoder<FinishedEvent>::decode):
1170         (WebKit::NetworkCapture::eventToString):
1171         (WebKit::NetworkCapture::stringToEvent):
1172         * NetworkProcess/capture/NetworkCaptureEvent.h: Added.
1173         (WebKit::NetworkCapture::TimedEvent::TimedEvent):
1174         * NetworkProcess/capture/NetworkCaptureLogging.h: Added.
1175         * NetworkProcess/capture/NetworkCaptureManager.cpp: Added.
1176         (WebKit::NetworkCapture::Manager::singleton):
1177         (WebKit::NetworkCapture::Manager::initialize):
1178         (WebKit::NetworkCapture::Manager::terminate):
1179         (WebKit::NetworkCapture::Manager::findMatch):
1180         (WebKit::NetworkCapture::Manager::findExactMatch):
1181         (WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
1182         (WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
1183         (WebKit::NetworkCapture::Manager::loadResources):
1184         (WebKit::NetworkCapture::Manager::reportLoadPath):
1185         (WebKit::NetworkCapture::Manager::reportRecordPath):
1186         (WebKit::NetworkCapture::Manager::reportReplayPath):
1187         (WebKit::NetworkCapture::Manager::requestToPath):
1188         (WebKit::NetworkCapture::Manager::stringToHash):
1189         (WebKit::NetworkCapture::Manager::hashToPath):
1190         (WebKit::NetworkCapture::Manager::logRecordedResource):
1191         (WebKit::NetworkCapture::Manager::logLoadedResource):
1192         (WebKit::NetworkCapture::Manager::logPlayedBackResource):
1193         (WebKit::NetworkCapture::Manager::ensureFileHandle):
1194         (WebKit::NetworkCapture::Manager::openCacheFile):
1195         (WebKit::NetworkCapture::Manager::readFile):
1196         (WebKit::NetworkCapture::Manager::getLine):
1197         (WebKit::NetworkCapture::Manager::getWord):
1198         (WebKit::NetworkCapture::Manager::printToFile):
1199         * NetworkProcess/capture/NetworkCaptureManager.h: Added.
1200         (WebKit::NetworkCapture::Manager::isRecording):
1201         (WebKit::NetworkCapture::Manager::isReplaying):
1202         (WebKit::NetworkCapture::Manager::mode):
1203         * NetworkProcess/capture/NetworkCaptureRecorder.cpp: Added.
1204         (WebKit::NetworkCapture::Recorder::recordRequestSent):
1205         (WebKit::NetworkCapture::Recorder::recordResponseReceived):
1206         (WebKit::NetworkCapture::Recorder::recordRedirectReceived):
1207         (WebKit::NetworkCapture::Recorder::recordRedirectSent):
1208         (WebKit::NetworkCapture::Recorder::recordDataReceived):
1209         (WebKit::NetworkCapture::Recorder::recordFinish):
1210         (WebKit::NetworkCapture::Recorder::writeEvents):
1211         * NetworkProcess/capture/NetworkCaptureRecorder.h: Added.
1212         (WebKit::NetworkCapture::Recorder::recordEvent):
1213         * NetworkProcess/capture/NetworkCaptureReplayer.cpp: Added.
1214         (WebKit::NetworkCapture::Replayer::replayResource):
1215         * NetworkProcess/capture/NetworkCaptureReplayer.h: Added.
1216         * NetworkProcess/capture/NetworkCaptureResource.cpp: Added.
1217         (WebKit::NetworkCapture::Resource::Resource):
1218         (WebKit::NetworkCapture::Resource::url):
1219         (WebKit::NetworkCapture::Resource::baseURL):
1220         (WebKit::NetworkCapture::Resource::queryParameters):
1221         (WebKit::NetworkCapture::Resource::eventStream):
1222         (WebKit::NetworkCapture::Resource::EventStream::EventStream):
1223         (WebKit::NetworkCapture::Resource::EventStream::nextEvent):
1224         * NetworkProcess/capture/NetworkCaptureResource.h: Added.
1225         * NetworkProcess/capture/NetworkCaptureTypes.h: Added.
1226         (WebKit::NetworkCapture::TypeHolder::forEachTypeImpl):
1227         (WebKit::NetworkCapture::TypeHolder::forEachType):
1228         * NetworkProcess/capture/NetworkDataTaskReplay.cpp: Added.
1229         (WebKit::NetworkCapture::NetworkDataTaskReplay::NetworkDataTaskReplay):
1230         (WebKit::NetworkCapture::NetworkDataTaskReplay::~NetworkDataTaskReplay):
1231         (WebKit::NetworkCapture::NetworkDataTaskReplay::resume):
1232         (WebKit::NetworkCapture::NetworkDataTaskReplay::suspend):
1233         (WebKit::NetworkCapture::NetworkDataTaskReplay::cancel):
1234         (WebKit::NetworkCapture::NetworkDataTaskReplay::complete):
1235         (WebKit::NetworkCapture::NetworkDataTaskReplay::invalidateAndCancel):
1236         (WebKit::NetworkCapture::NetworkDataTaskReplay::enqueueEventHandler):
1237         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRequestSent):
1238         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayResponseReceived):
1239         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectReceived):
1240         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectSent):
1241         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayDataReceived):
1242         (WebKit::NetworkCapture::NetworkDataTaskReplay::replayFinished):
1243         (WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):
1244         (WebKit::NetworkCapture::NetworkDataTaskReplay::didFinish):
1245         * NetworkProcess/capture/NetworkDataTaskReplay.h: Added.
1246         (WebKit::NetworkCapture::NetworkDataTaskReplay::create):
1247         * NetworkProcess/capture/json.hpp: Added.
1248         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1249         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1250         * WebKit2.xcodeproj/project.pbxproj:
1251         * config.h:
1252
1253 2016-12-07  Anders Carlsson  <andersca@apple.com>
1254
1255         Fix build.
1256
1257         * Platform/IPC/mac/ConnectionMac.mm:
1258         (IPC::Connection::open):
1259
1260 2016-12-07  Anders Carlsson  <andersca@apple.com>
1261
1262         Rename the connection sources to better indicate what data direction they are used for
1263         https://bugs.webkit.org/show_bug.cgi?id=165548
1264
1265         Reviewed by Tim Horton.
1266
1267         * Platform/IPC/Connection.h:
1268         * Platform/IPC/mac/ConnectionMac.mm:
1269         (IPC::Connection::platformInvalidate):
1270         (IPC::Connection::platformInitialize):
1271         (IPC::createReceiveSource):
1272         (IPC::Connection::initializeSendSource):
1273         (IPC::Connection::receiveSourceEventHandler):
1274         (IPC::createDataAvailableSource): Deleted.
1275         (IPC::Connection::initializeDeadNameSource): Deleted.
1276         Rename m_deadNameSource to m_sendSource, and m_receivePortDataAvailableSource to m_receiveSource.
1277
1278         (IPC::Connection::open):
1279         Initialize the send source before we attempt to send a first message.
1280
1281 2016-12-07  Simon Fraser  <simon.fraser@apple.com>
1282
1283         Fix use of enum in a WK2 C SPI header.
1284         rdar://problem/28725583
1285
1286         Followup to correctly prefix the enum values.
1287
1288         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1289         (WKBundlePageSetEventThrottlingBehaviorOverride):
1290         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1291
1292 2016-12-07  Simon Fraser  <simon.fraser@apple.com>
1293
1294         Fix use of enum in a WK2 C SPI header.
1295         rdar://problem/28725583
1296
1297         Reviewed by Dan Bernstein.
1298
1299         Use correct enum style for a C SPI header and fix the callers.
1300
1301         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1302         (WKBundlePageSetEventThrottlingBehaviorOverride):
1303         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1304
1305 2016-12-07  Beth Dakin  <bdakin@apple.com>
1306
1307         Remove iCloud Pages and Keynote site-specific hacks
1308         https://bugs.webkit.org/show_bug.cgi?id=165544
1309         -and corresponding-
1310         rdar://problem/29082536
1311
1312         Reviewed by Wenson Hsieh.
1313
1314         * WebProcess/WebPage/WebPage.cpp:
1315         (WebKit::needsHiddenContentEditableQuirk):
1316         (WebKit::needsPlainTextQuirk):
1317
1318 2016-12-05  Ada Chan  <adachan@apple.com>
1319
1320         Add a getter for serverTrust in _WKObservablePageState
1321         https://bugs.webkit.org/show_bug.cgi?id=165433
1322
1323         Reviewed by Anders Carlsson.
1324
1325         * UIProcess/API/C/mac/WKPagePrivateMac.h:
1326         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1327         (-[WKObservablePageState serverTrust]):
1328
1329 2016-12-07  Jer Noble  <jer.noble@apple.com>
1330
1331         Exiting Element Fullscreen mode loses focus on WKWebView.
1332         https://bugs.webkit.org/show_bug.cgi?id=165512
1333
1334         Reviewed by Eric Carlson.
1335
1336         Setting 'window.contentView.hidden = YES' will reset the first-responder (whereas
1337         previously setting 'window.contentView.layer.hidden = YES' did not). Grab the first-
1338         responder before doing so, so that it can be reset correctly when moving the WKWebView
1339         back to it's original window.
1340
1341         * UIProcess/mac/WKFullScreenWindowController.mm:
1342         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
1343
1344 2016-12-07  Alex Christensen  <achristensen@webkit.org>
1345
1346         Fix CMake build after r209418.
1347         https://bugs.webkit.org/show_bug.cgi?id=165484
1348
1349         * PlatformMac.cmake:
1350
1351 2016-12-07  Philippe Normand  <pnormand@igalia.com>
1352
1353         Unreviewed, GTK build fix after r209407.
1354
1355         * Platform/IPC/unix/ConnectionUnix.cpp:
1356         (IPC::Connection::processMessage):
1357         * UIProcess/LegacySessionStateCodingNone.cpp:
1358         (WebKit::decodeLegacySessionState):
1359
1360 2016-12-06  Ryan Haddad  <ryanhaddad@apple.com>
1361
1362         Unreviewed, rolling out r209422.
1363
1364         This change caused assertion failures during API tests.
1365
1366         Reverted changeset:
1367
1368         "[MediaStream][Mac] Revoke sandbox extensions when capture
1369         ends"
1370         https://bugs.webkit.org/show_bug.cgi?id=165476
1371         http://trac.webkit.org/changeset/209422
1372
1373 2016-12-06  Dean Jackson  <dino@apple.com>
1374
1375         Include default value in Experimental Feature information
1376         https://bugs.webkit.org/show_bug.cgi?id=165509
1377         <rdar://problems/29547177>
1378
1379         Reviewed by Tim Horton.
1380
1381         Add a defaultValue member variable to experimental
1382         features, both the C++ and ObjC interfaces.
1383
1384         * UIProcess/API/APIExperimentalFeature.cpp:
1385         (API::ExperimentalFeature::create):
1386         (API::ExperimentalFeature::ExperimentalFeature):
1387         * UIProcess/API/APIExperimentalFeature.h:
1388         * UIProcess/API/Cocoa/_WKExperimentalFeature.h:
1389         * UIProcess/API/Cocoa/_WKExperimentalFeature.mm:
1390         (-[_WKExperimentalFeature description]):
1391         (-[_WKExperimentalFeature defaultValue]):
1392         * UIProcess/WebPreferences.cpp:
1393         (WebKit::createExperimentalFeaturesVector):
1394
1395 2016-12-06  Commit Queue  <commit-queue@webkit.org>
1396
1397         Unreviewed, rolling out r209391.
1398         https://bugs.webkit.org/show_bug.cgi?id=165501
1399
1400         requires explicit nullptr checks so missing env vars don't
1401         flip AC mode (Requested by mcatanzaro on #webkit).
1402
1403         Reverted changeset:
1404
1405         "[GTK] Process accelerated compositing env variables only if
1406         they are really enabled"
1407         https://bugs.webkit.org/show_bug.cgi?id=165300
1408         http://trac.webkit.org/changeset/209391
1409
1410 2016-12-06  Alexey Proskuryakov  <ap@apple.com>
1411
1412         Correct SDKROOT values in xcconfig files
1413         https://bugs.webkit.org/show_bug.cgi?id=165487
1414         rdar://problem/29539209
1415
1416         Reviewed by Dan Bernstein.
1417
1418         Fix suggested by Dan Bernstein.
1419
1420         * Configurations/DebugRelease.xcconfig:
1421
1422 2016-12-06  Andreas Kling  <akling@apple.com>
1423
1424         [Cocoa] Add some memory usage related information to sysdiagnose state dumps
1425         <https://webkit.org/b/165375>
1426         <rdar://problem/29057243>
1427
1428         Reviewed by Darin Adler.
1429
1430         Follow-up to address two more review comments.
1431
1432         * WebProcess/cocoa/WebProcessCocoa.mm:
1433         (WebKit::WebProcess::registerWithStateDumper): Use adoptNS() instead of autorelease for NSStrings.
1434
1435 2016-12-06  Eric Carlson  <eric.carlson@apple.com>
1436
1437         [MediaStream][Mac] Revoke sandbox extensions when capture ends
1438         https://bugs.webkit.org/show_bug.cgi?id=165476
1439
1440         Reviewed by Brady Eidson.
1441         
1442         Track media capture by process so it is possible to revoke the sandbox extensions issued to
1443         a web process when capture stops.
1444
1445         * CMakeLists.txt: Add new files.
1446
1447         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1448         (WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy): Register
1449           with process manager.
1450         (WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
1451         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Move sandbox 
1452           extension code to the process manager.
1453         (WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
1454         (WebKit::UserMediaPermissionRequestManagerProxy::startedCaptureSession): New, report state
1455           change to the process manager.
1456         (WebKit::UserMediaPermissionRequestManagerProxy::endedCaptureSession): Ditto.
1457         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1458
1459         * UIProcess/UserMediaProcessManager.cpp: Added.
1460         (WebKit::ProcessState::ProcessState):
1461         (WebKit::ProcessState::managers):
1462         (WebKit::ProcessState::sandboxExtensionsGranted):
1463         (WebKit::ProcessState::setSandboxExtensionsGranted):
1464         (WebKit::stateMap):
1465         (WebKit::processState):
1466         (WebKit::ProcessState::addRequestManager):
1467         (WebKit::ProcessState::removeRequestManager):
1468         (WebKit::UserMediaProcessManager::singleton):
1469         (WebKit::UserMediaProcessManager::addUserMediaPermissionRequestManagerProxy):
1470         (WebKit::UserMediaProcessManager::removeUserMediaPermissionRequestManagerProxy):
1471         (WebKit::UserMediaProcessManager::willCreateMediaStream):
1472         (WebKit::UserMediaProcessManager::startedCaptureSession):
1473         (WebKit::UserMediaProcessManager::endedCaptureSession):
1474         * UIProcess/UserMediaProcessManager.h: Added.
1475
1476         * UIProcess/WebPageProxy.cpp:
1477         (WebKit::WebPageProxy::isPlayingMediaDidChange): Report capture state changes to the request
1478           manager proxy.
1479         * UIProcess/WebPageProxy.h:
1480
1481         * WebKit2.xcodeproj/project.pbxproj: Add new files.
1482
1483         * WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp: Added.
1484         (WebKit::MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions):
1485         (WebKit::MediaDeviceSandboxExtensions::encode):
1486         (WebKit::MediaDeviceSandboxExtensions::decode):
1487         (WebKit::MediaDeviceSandboxExtensions::operator[]):
1488         (WebKit::MediaDeviceSandboxExtensions::size):
1489         * WebProcess/MediaStream/MediaDeviceSandboxExtensions.h: Added.
1490
1491         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1492         (WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Sandbox extension
1493           is now in a HashMap, not a Vector.
1494         (WebKit::UserMediaPermissionRequestManager::grantUserMediaDeviceSandboxExtensions): Record
1495           IDs with extensions so they can be revoked later.
1496         (WebKit::UserMediaPermissionRequestManager::revokeUserMediaDeviceSandboxExtensions): New.
1497         (WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Deleted.
1498         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
1499
1500         * WebProcess/WebPage/WebPage.cpp:
1501         (WebKit::WebPage::grantUserMediaDeviceSandboxExtensions):
1502         (WebKit::WebPage::revokeUserMediaDeviceSandboxExtensions):
1503         (WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Deleted.
1504         * WebProcess/WebPage/WebPage.h:
1505         * WebProcess/WebPage/WebPage.messages.in:
1506
1507 2016-12-06  Anders Carlsson  <andersca@apple.com>
1508
1509         Add a new MachMessage class and use it for sending outgoing messages
1510         https://bugs.webkit.org/show_bug.cgi?id=165484
1511
1512         Reviewed by Sam Weinig.
1513
1514         * Platform/IPC/mac/ConnectionMac.mm:
1515         (IPC::Connection::sendOutgoingMessage):
1516         Instead of trying to randomly use memory from the stack as well as using mmap for the message data for out of line messages
1517         (which makes no sense at all, since the body data is already mmapped), just always create a MachMessage object and use it.
1518         
1519         (IPC::machMessageSize): Deleted.
1520         This has been moved to MachMessage::messageSize().
1521         
1522         * Platform/IPC/mac/MachMessage.cpp: Added.
1523         (IPC::MachMessage::create):
1524         Allocate extra memory to store the actual buffer.
1525
1526         (IPC::MachMessage::MachMessage):
1527         Initialize variables. m_size isn't really used right now, but will be in a subsequent patch.
1528
1529         (IPC::MachMessage::header):
1530         Return the header.
1531         
1532         * Platform/IPC/mac/MachMessage.h: Added.
1533         (IPC::MachMessage::length):
1534
1535         * WebKit2.xcodeproj/project.pbxproj:
1536         Add new files.
1537
1538 2016-12-06  Simon Fraser  <simon.fraser@apple.com>
1539
1540         Enable visual viewports by default on Mac, and iOS Wk2
1541         https://bugs.webkit.org/show_bug.cgi?id=165452
1542
1543         Reviewed by Zalan Bujtas.
1544
1545         Turn visual viewports on by default for WK2.
1546
1547         * Shared/WebPreferencesDefinitions.h:
1548
1549 2016-12-06  Daniel Bates  <dabates@apple.com>
1550
1551         WebKitTestRunner: Plugins are disabled in new windows
1552         https://bugs.webkit.org/show_bug.cgi?id=165410
1553
1554         Reviewed by Alex Christensen.
1555
1556         Remove SPI exposed to explicitly toggle plugins from WebKitTestRunner.
1557         Instead we will update WebKitTestRunner to make use of the SPI
1558         WKBundleOverrideBoolPreferenceForTestRunner() to toggle plugins in
1559         all windows.
1560
1561         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1562         (WKBundleSetPluginsEnabled): Deleted.
1563         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1564         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1565         (WebKit::InjectedBundle::setPluginsEnabled): Deleted.
1566
1567 2016-12-05  Anders Carlsson  <andersca@apple.com>
1568
1569         Don't memcpy out of line data
1570         https://bugs.webkit.org/show_bug.cgi?id=165434
1571
1572         Reviewed by Sam Weinig.
1573
1574         Change the Decoder constructor to take a buffer deallocator parameter. If the buffer deallocator is null, the
1575         data will be copied as before. Otherwise, the memory will be adopted by the Decoder object, and will be deallocated
1576         by invoking the data deallocator.
1577
1578         * Platform/IPC/Decoder.cpp:
1579         (IPC::copyBuffer):
1580         Add a new helper.
1581
1582         (IPC::Decoder::Decoder):
1583         Copy the buffer if the deallocator is null.
1584
1585         (IPC::Decoder::~Decoder):
1586         Invoke the deallocator or call fastFree if it is null.
1587
1588         (IPC::Decoder::unwrapForTesting):
1589         Update constructor.
1590         
1591         (IPC::roundUpToAlignment):
1592         (IPC::Decoder::alignBufferPosition):
1593         (IPC::Decoder::decodeVariableLengthByteArray):
1594         (IPC::decodeValueFromBuffer):
1595         Change all these to deal with const pointers.
1596
1597         * Platform/IPC/Decoder.h:
1598         Add new members.
1599
1600         * Platform/IPC/mac/ConnectionMac.mm:
1601         (IPC::createMessageDecoder):
1602         When we have out of line data, pass a deallocator that calls vm_deallocate, instead of copying the data
1603         and then immediately throwing the original away.
1604
1605 2016-12-06  Tim Horton  <timothy_horton@apple.com>
1606
1607         Almost half-second stall scrolling apple.com because of synchronous getPositionInformation
1608         https://bugs.webkit.org/show_bug.cgi?id=165403
1609         <rdar://problem/29493285>
1610
1611         Reviewed by Enrica Casucci.
1612
1613         When retrieving interaction information, we don't always need to do
1614         snapshots for 3D Touch or the action sheet, especially if we're
1615         synchronously blocking the UI process main thread waiting for the reply.
1616
1617         Add a new InteractionInformationRequest, which allows callers of
1618         getPositionInformation and requestPositionInformation to specify which
1619         optional pieces of information they would like to compute.
1620
1621         * Shared/AssistedNodeInformation.h:
1622         Fix a incorrect comment.
1623
1624         * Shared/ios/InteractionInformationRequest.cpp: Added.
1625         (WebKit::InteractionInformationRequest::encode):
1626         (WebKit::InteractionInformationRequest::decode):
1627         (WebKit::InteractionInformationRequest::isValidForRequest):
1628         * Shared/ios/InteractionInformationRequest.h: Added.
1629         (WebKit::InteractionInformationRequest::InteractionInformationRequest):
1630         * WebKit2.xcodeproj/project.pbxproj:
1631         Add InteractionInformationRequest, which encapsulates all of the
1632         parameters required to generate an InteractionInformationAtPosition.
1633         Previously, that was just a point, but now we have two new parameters:
1634         whether we should generate a snapshot of the element, and whether
1635         we should generate a TextIndicator if the element is a link.
1636
1637         * Shared/ios/InteractionInformationAtPosition.h:
1638         * Shared/ios/InteractionInformationAtPosition.mm:
1639         (WebKit::InteractionInformationAtPosition::encode):
1640         (WebKit::InteractionInformationAtPosition::decode):
1641         (WebKit::InteractionInformationAtPosition::mergeCompatibleOptionalInformation):
1642         Adopt InteractionInformationRequest.
1643
1644         * UIProcess/WebPageProxy.h:
1645         * UIProcess/ios/WebPageProxyIOS.mm:
1646         (WebKit::WebPageProxy::getPositionInformation):
1647         (WebKit::WebPageProxy::requestPositionInformation):
1648         * UIProcess/ios/WKActionSheetAssistant.mm:
1649         (-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
1650         (-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
1651         (-[WKActionSheetAssistant showImageSheet]):
1652         (-[WKActionSheetAssistant showLinkSheet]):
1653         * UIProcess/ios/WKPDFView.mm:
1654         (-[WKPDFView annotation:isBeingPressedAtPoint:controller:]):
1655         * WebProcess/WebPage/WebPage.h:
1656         * WebProcess/WebPage/WebPage.messages.in:
1657         Adopt InteractionInformationRequest.
1658         
1659         * UIProcess/ios/WKContentViewInteraction.h:
1660         * UIProcess/ios/WKContentViewInteraction.mm:
1661         (-[WKContentView _showAttachmentSheet]):
1662         (-[WKContentView ensurePositionInformationIsUpToDate:]):
1663         If we have a outstanding asynchronous position information request
1664         for the current point, instead of sending a second separate request,
1665         just wait for the async one to come in.
1666
1667         (-[WKContentView requestAsynchronousPositionInformationUpdate:]):
1668         If asked to do an asynchronous request with more optional bits than
1669         the current otherwise-valid response's request, update the position information.
1670
1671         (-[WKContentView gestureRecognizerShouldBegin:]):
1672         The design of this mechanism is that during the highlight long press,
1673         we do an async position information update, and then when we actually
1674         begin a 3D Touch gesture, we hope to already have the requisite snapshots
1675         ready (so that we can avoid synchronously blocking for them, there).
1676         So, in the highlight long-press async request, ask for all the goodies.
1677
1678         (-[WKContentView hasSelectablePositionAtPoint:]):
1679         (-[WKContentView pointIsNearMarkedText:]):
1680         (-[WKContentView pointIsInAssistedNode:]):
1681         (-[WKContentView _didNotHandleTapAsClick:]):
1682         (-[WKContentView _positionInformationDidChange:]):
1683         If we get a position information update for the same point, but with less
1684         goodies attached (the snapshot/link indicator), copy them over from the old
1685         position information, so that we never accidentally "downgrade" our info.
1686
1687         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
1688         (-[WKContentView actionSheetAssistant:willStartInteractionWithElement:]):
1689         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
1690         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
1691         (-[WKContentView _presentedViewControllerForPreviewItemController:]):        
1692         More adoption.
1693         
1694         * WebProcess/WebPage/ios/WebPageIOS.mm:
1695         (WebKit::WebPage::handleTap):
1696         (WebKit::WebPage::handleTwoFingerTapAtPoint):
1697         (WebKit::WebPage::commitPotentialTap):
1698         Adopt InteractionInformationRequest.
1699
1700         (WebKit::WebPage::getPositionInformation):
1701         (WebKit::WebPage::requestPositionInformation):
1702         Copy the request into the response.
1703         Only snapshot if the request wants a snapshot.
1704         Only make a link indicator if the request wants one.
1705
1706 2016-12-06  Daniel Bates  <dabates@apple.com>
1707
1708         Cleanup: Rename some HTTP 0.9-specific functions to conform to WebKit Code Style Guidelines
1709         https://bugs.webkit.org/show_bug.cgi?id=165451
1710
1711         Reviewed by Alex Christensen.
1712
1713         * NetworkProcess/NetworkDataTask.cpp:
1714         (WebKit::NetworkDataTask::didReceiveResponse):
1715
1716 2016-12-06  Daniel Bates  <dabates@apple.com>
1717
1718         Remove unused InjectedBundle::overrideXSSAuditorEnabledForTestRunner()
1719         https://bugs.webkit.org/show_bug.cgi?id=165408
1720
1721         Reviewed by Alex Christensen.
1722
1723         InjectedBundle::overrideXSSAuditorEnabledForTestRunner() is unused. This function was only
1724         called by WKBundleOverrideXSSAuditorEnabledForTestRunner(), which was removed in r106005.
1725
1726         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1727         (WebKit::InjectedBundle::overrideXSSAuditorEnabledForTestRunner): Deleted.
1728         * WebProcess/InjectedBundle/InjectedBundle.h:
1729
1730 2016-12-04  Darin Adler  <darin@apple.com>
1731
1732         Use ASCIICType more, and improve it a little bit
1733         https://bugs.webkit.org/show_bug.cgi?id=165360
1734
1735         Reviewed by Sam Weinig.
1736
1737         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1738         (WebKit::capitalizeRFC822HeaderFieldName): Removed unneeded checks to simplify code.
1739
1740 2016-12-06  Dave Hyatt  <hyatt@apple.com>
1741
1742         [CSS Parser] Turn on the new CSS parser
1743         https://bugs.webkit.org/show_bug.cgi?id=165213
1744
1745         Reviewed by Zalan Bujtas.
1746
1747         * Shared/WebPreferencesDefinitions.h:
1748
1749 2016-12-06  Tomas Popela  <tpopela@redhat.com>
1750
1751         [GTK] Process accelerated compositing env variables only if they are really enabled
1752         https://bugs.webkit.org/show_bug.cgi?id=165300
1753
1754         Don't process the WEBKIT_FORCE_COMPOSITING_MODE and
1755         WEBKIT_DISABLE_COMPOSITING_MODE env variables if they are disabled
1756         (eg. WEBKIT_DISABLE_COMPOSITING_MODE=0).
1757
1758         Reviewed by Michael Catanzaro.
1759
1760         * UIProcess/gtk/WebPreferencesGtk.cpp:
1761         (WebKit::WebPreferences::platformInitializeStore):
1762
1763 2016-12-06  Sam Weinig  <sam@webkit.org>
1764
1765         [WebIDL] Add support for converting dictionaries to JS
1766         https://bugs.webkit.org/show_bug.cgi?id=165367
1767
1768         Reviewed by Darin Adler and Alex Christensen.
1769
1770         * CMakeLists.txt:
1771         Add missing directories to look in for headers.
1772
1773 2016-12-05  Tim Horton  <timothy_horton@apple.com>
1774
1775         Try to fix the iOS Simulator build.
1776
1777         * UIProcess/mac/RemoteLayerTreeHost.mm:
1778         (WebKit::RemoteLayerTreeHost::mapAllIOSurfaceBackingStore):
1779
1780 2016-12-03  Simon Fraser  <simon.fraser@apple.com>
1781
1782         Minor reformat and renames in -didUpdateVisibleRect:
1783         https://bugs.webkit.org/show_bug.cgi?id=165365
1784
1785         Reviewed by Dave Hyatt.
1786         
1787         didUpdateVisibleRect:... has lots of parameters. Put one on each line.
1788
1789         Rename the rects to make it clear they are "content" rects (i.e. in document coordinates).
1790
1791         * UIProcess/ios/WKContentView.h:
1792         * UIProcess/ios/WKContentView.mm:
1793         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
1794
1795 2016-12-05  Tim Horton  <timothy_horton@apple.com>
1796
1797         Adopt CAMachPort-as-layer-contents
1798         https://bugs.webkit.org/show_bug.cgi?id=141687
1799         <rdar://problem/19393233>
1800
1801         Reviewed by Darin Adler.
1802
1803         * Shared/mac/RemoteLayerBackingStore.h:
1804         * Shared/mac/RemoteLayerBackingStore.mm:
1805         (WebKit::RemoteLayerBackingStore::decode):
1806         On the UI process side, instead of actually looking up the surface,
1807         just keep the MachSendRight around, to later be turned into a CAMachPort.
1808
1809         (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
1810         Make a CAMachPort and leak our send right into it. CAMachPort
1811         will adopt the port and destroy it when needed.
1812
1813         (WebKit::RemoteLayerBackingStore::setBufferVolatility):
1814         Tiny style fix.
1815
1816         * Shared/mac/RemoteLayerTreePropertyApplier.h:
1817         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1818         (WebKit::applyPropertiesToLayer):
1819         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
1820         * UIProcess/DrawingAreaProxy.h:
1821         (WebKit::DrawingAreaProxy::prepareForAppSuspension):
1822         * UIProcess/ios/WebPageProxyIOS.mm:
1823         (WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground):
1824         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1825         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1826         (WebKit::RemoteLayerTreeDrawingAreaProxy::prepareForAppSuspension):
1827         * UIProcess/mac/RemoteLayerTreeHost.h:
1828         * UIProcess/mac/RemoteLayerTreeHost.mm:
1829         (WebKit::RemoteLayerTreeHost::updateLayerTree):
1830         (WebKit::RemoteLayerTreeHost::mapAllIOSurfaceBackingStore):
1831         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1832         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
1833         Two supporting changes in order to fix the two regressions that this
1834         caused when we tried to land it two years ago:
1835
1836         When an app is being suspended, resolve all CAMachPort backing store
1837         into actual IOSurfaces. Otherwise, any live CAMachPorts will keep a
1838         +1 on their respective IOSurface's use count, causing us to fail to
1839         mark them volatile, keeping the app alive for more time (re-trying the
1840         volatility change), and increasing the likelihood of background jetsam.
1841
1842         If the debugging tile map is enabled, do not use CAMachPort, because
1843         we don't have a great way to plumb the same CAMachPort to two layers
1844         (and it doesn't seem to work even if you do). Instead, just map the
1845         IOSurface into the UI process like we used to.
1846
1847 2016-12-05  Dean Jackson  <dino@apple.com>
1848
1849         pointer lock needs to be feature detectable
1850         https://bugs.webkit.org/show_bug.cgi?id=165426
1851         <rdar://problem/29486715>
1852
1853         Reviewed by Antoine Quint.
1854
1855         Set the RuntimeEnabledFeature as preferences
1856         change.
1857
1858         * UIProcess/API/C/WKPreferences.cpp:
1859         (WKPreferencesSetPointerLockEnabled):
1860         (WKPreferencesGetPointerLockEnabled):
1861         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1862         * WebProcess/WebPage/WebPage.cpp:
1863         (WebKit::WebPage::updatePreferences):
1864
1865 2016-12-05  Andreas Kling  <akling@apple.com>
1866
1867         [Cocoa] Add some memory usage related information to sysdiagnose state dumps
1868         <https://webkit.org/b/165375>
1869         <rdar://problem/29057243>
1870
1871         Reviewed by Darin Adler.
1872
1873         Add two new entries to the sysdiagnose state dumps for WebContent processes:
1874         "Memory Usage Stats" and "JavaScript Object Counts".
1875
1876         The first category contains all the interesting stuff from task_info()
1877         along with some WebCore and JavaScriptCore object/memory counters.
1878
1879         The second category contains a list of all the JS object types currently live
1880         on the heap, along with a count.
1881
1882         * WebProcess/cocoa/WebProcessCocoa.mm:
1883         (WebKit::WebProcess::registerWithStateDumper): Add two new entries to the
1884         state dictionary: "Memory Usage Stats" and "JavaScript Object Counts".
1885
1886 2016-12-05  Csaba Osztrogonác  <ossy@webkit.org>
1887
1888         Unreviewed cmake buildfix after r209307.
1889
1890         * PlatformMac.cmake:
1891
1892 2016-12-03  Dan Bernstein  <mitz@apple.com>
1893
1894         [Cocoa] Expose InjectedBundlePageEditorClient via the Objective-C bundle SPI
1895         https://bugs.webkit.org/show_bug.cgi?id=165276
1896         <rdar://problem/29467040>
1897
1898         Reviewed by Darin Adler.
1899
1900         Test: TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm
1901
1902         * Shared/Cocoa/APIObject.mm:
1903         (API::Object::newObject): Wrap InjectedBundleRangeHandle in WKWebProcessPlugInRangeHandle.
1904
1905         * WebKit2.xcodeproj/project.pbxproj: Added references to new files, making
1906           WKWebProcessPlugInEditingDelegate.h and WKWebProcessPlugInRangeHandle.h private headers.
1907
1908         * WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h: Added. An base class
1909           based on InjectedBundlePageEditorClient.
1910         (API::InjectedBundle::EditorClient::~EditorClient):
1911         (API::InjectedBundle::EditorClient::shouldBeginEditing):
1912         (API::InjectedBundle::EditorClient::shouldEndEditing):
1913         (API::InjectedBundle::EditorClient::shouldInsertNode):
1914         (API::InjectedBundle::EditorClient::shouldInsertText):
1915         (API::InjectedBundle::EditorClient::shouldDeleteRange):
1916         (API::InjectedBundle::EditorClient::shouldChangeSelectedRange):
1917         (API::InjectedBundle::EditorClient::shouldApplyStyle):
1918         (API::InjectedBundle::EditorClient::didBeginEditing):
1919         (API::InjectedBundle::EditorClient::didEndEditing):
1920         (API::InjectedBundle::EditorClient::didChange):
1921         (API::InjectedBundle::EditorClient::didChangeSelection):
1922         (API::InjectedBundle::EditorClient::willWriteToPasteboard):
1923         (API::InjectedBundle::EditorClient::getPasteboardDataForRange):
1924         (API::InjectedBundle::EditorClient::didWriteToPasteboard):
1925
1926         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h: Added. Declares
1927           the new delegate protocol, currently comprising three methods corresponding to
1928           willWriteToPasteboard, getPasteboardDataForRange, and didWriteToPasteboard.
1929
1930         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
1931         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1932         (-[WKWebProcessPlugInFrame jsRangeForRangeHandle:inWorld:]): Added. Gets the JS wrapper for
1933           the specified range handle.
1934
1935         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h: Added.
1936         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm: Added.
1937         (-[WKWebProcessPlugInRangeHandle dealloc]): Call the InjectedBundleRangeHandle destructor.
1938         (+[WKWebProcessPlugInRangeHandle rangeHandleWithJSValue:inContext:]): Get or create an
1939           InjectedBundleRangeHandle for the specified object.
1940         (-[WKWebProcessPlugInRangeHandle frame]): Return the range’s owner document’s frame.
1941         (-[WKWebProcessPlugInRangeHandle _rangeHandle]): Return the InjectedBundleRangeHandle.
1942         (-[WKWebProcessPlugInRangeHandle _apiObject]): Ditto.
1943
1944         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandleInternal.h: Added.
1945         (WebKit::wrapper):
1946
1947         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1948         (WKBundlePageSetEditorClient): Updated for WebPage change.
1949
1950         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1951         (-[WKWebProcessPlugInBrowserContextController _editingDelegate]): Added. Returns the
1952           delegate.
1953         (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Added. Defines a
1954           Client class, which derives from API::InjectedBundle::EditorClient, and invokes the
1955           delegate methods. Instantiates a Client and sets it on the WebPage.
1956
1957         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
1958           Declared new _editingDelegate property.
1959
1960         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1961         (WebKit::InjectedBundleRangeHandle::document): Added. Returns an InjectedBundleNodeHandle
1962           for the range’s owner document.
1963         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
1964
1965         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
1966         (WebKit::InjectedBundlePageEditorClient::InjectedBundlePageEditorClient): Added. Calls
1967           initialize().
1968         (WebKit::InjectedBundlePageEditorClient::shouldBeginEditing): Updated for type change.
1969         (WebKit::InjectedBundlePageEditorClient::shouldEndEditing): Ditto.
1970         (WebKit::InjectedBundlePageEditorClient::shouldInsertNode): Ditto.
1971         (WebKit::InjectedBundlePageEditorClient::shouldInsertText): Ditto.
1972         (WebKit::InjectedBundlePageEditorClient::shouldDeleteRange): Ditto.
1973         (WebKit::InjectedBundlePageEditorClient::shouldChangeSelectedRange): Ditto.
1974         (WebKit::InjectedBundlePageEditorClient::shouldApplyStyle): Ditto.
1975         (WebKit::InjectedBundlePageEditorClient::didBeginEditing): Ditto.
1976         (WebKit::InjectedBundlePageEditorClient::didEndEditing): Ditto.
1977         (WebKit::InjectedBundlePageEditorClient::didChange): Ditto.
1978         (WebKit::InjectedBundlePageEditorClient::didChangeSelection): Ditto.
1979         (WebKit::InjectedBundlePageEditorClient::willWriteToPasteboard): Ditto.
1980         (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange): Ditto.
1981         (WebKit::InjectedBundlePageEditorClient::didWriteToPasteboard): Ditto.
1982         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: Now derives from
1983           API::InjectedBundle::EditorClient.
1984
1985         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1986         (WebKit::WebEditorClient::shouldDeleteRange): Ditto.
1987         (WebKit::WebEditorClient::shouldBeginEditing): Ditto.
1988         (WebKit::WebEditorClient::shouldEndEditing): Ditto.
1989         (WebKit::WebEditorClient::shouldInsertNode): Ditto.
1990         (WebKit::WebEditorClient::shouldInsertText): Ditto.
1991         (WebKit::WebEditorClient::shouldChangeSelectedRange): Ditto.
1992         (WebKit::WebEditorClient::shouldApplyStyle): Ditto.
1993         (WebKit::WebEditorClient::didBeginEditing): Ditto.
1994         (WebKit::WebEditorClient::respondToChangedContents): Ditto.
1995         (WebKit::WebEditorClient::respondToChangedSelection): Ditto.
1996         (WebKit::WebEditorClient::didEndEditing): Ditto.
1997         (WebKit::WebEditorClient::didWriteSelectionToPasteboard): Ditto.
1998         (WebKit::WebEditorClient::willWriteSelectionToPasteboard): Ditto.
1999         (WebKit::WebEditorClient::getClientPasteboardDataForRange): Ditto.
2000
2001         * WebProcess/WebPage/WebPage.cpp:
2002         (WebKit::WebPage::WebPage): Initialize m_editorClient.
2003         (WebKit::WebPage::setInjectedBundleEditorClient): Replaces
2004           initializeInjectedBundleEditorClient and just sets m_editorClient.
2005         (WebKit::WebPage::close): Resets m_editorClient.
2006
2007         * WebProcess/WebPage/WebPage.h: Changed m_editorClient to a unique_ptr.
2008
2009 2016-12-02  Said Abou-Hallawa  <sabouhallawa@apple.com>
2010
2011         [iOS] Add a WebView private configuration for changing the WebContent update frequency
2012         https://bugs.webkit.org/show_bug.cgi?id=165289
2013         <rdar://problem/29472577>
2014
2015         Reviewed by Tim Horton.
2016         
2017         Expose a preference which allows us to control the fps of web content updates.
2018
2019         * UIProcess/API/APIPageConfiguration.h:
2020         (API::PageConfiguration::contentUpdateFrequency):
2021         (API::PageConfiguration::setContentUpdateFrequency):
2022         * UIProcess/API/Cocoa/WKWebView.mm:
2023         (-[WKWebView _initializeWithConfiguration:]):
2024         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2025         (-[WKWebViewConfiguration copyWithZone:]):
2026         (-[WKWebViewConfiguration _contentUpdateFrequency]):
2027         (-[WKWebViewConfiguration _setContentUpdateFrequency:]):
2028         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2029         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2030         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2031         (-[WKOneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
2032         (WebKit::RemoteLayerTreeDrawingAreaProxy::contentUpdateFrequency):
2033
2034 2016-12-02  Andy Estes  <aestes@apple.com>
2035
2036         [Cocoa] Adopt the PRODUCT_BUNDLE_IDENTIFIER build setting
2037         https://bugs.webkit.org/show_bug.cgi?id=164492
2038
2039         Reviewed by Dan Bernstein.
2040
2041         * Configurations/DatabaseService.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
2042         $(PRODUCT_NAME).
2043         * Configurations/NetworkService.xcconfig: Ditto.
2044         * Configurations/PluginService.32.xcconfig: Ditto.
2045         * Configurations/PluginService.64.xcconfig: Ditto.
2046         * Configurations/WebContentService.xcconfig: Ditto.
2047         * Configurations/WebKit.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
2048         com.apple.$(PRODUCT_NAME:rfc1034identifier).
2049         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist: Changed
2050         CFBundleIdentifier's value from ${PRODUCT_NAME} to ${PRODUCT_BUNDLE_IDENTIFIER}.
2051         * Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to
2052         ${PRODUCT_BUNDLE_IDENTIFIER}.
2053         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Changed
2054         CFBundleIdentifier's value from ${PRODUCT_NAME} to ${PRODUCT_BUNDLE_IDENTIFIER}.
2055         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist: Ditto.
2056         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist: Ditto.
2057         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Ditto.
2058         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: Ditto.
2059         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Ditto.
2060         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist: Ditto.
2061         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: Ditto.
2062
2063 2016-12-02  Brent Fulgham  <bfulgham@apple.com>
2064
2065         [Mac] Update sandbox profiles to use modern syntax and avoid duplication
2066         https://bugs.webkit.org/show_bug.cgi?id=165332
2067         <rdar://problem/26898991>
2068
2069         Reviewed by Anders Carlsson.
2070
2071         Update the Mac sandbox profiles to reflect that modern Cocoa applications
2072         communicate with cfprefsd, rather than plists on disk (and have done so
2073         for the past several releases).
2074
2075         Get rid of some duplicated rules, as well as old compatibility rules that
2076         are never triggered under supported operating systems.
2077
2078         * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
2079         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2080         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2081         * WebProcess/com.apple.WebProcess.sb.in:
2082
2083 2016-12-02  Gustavo Sverzut Barbieri  <barbieri@profusion.mobi>
2084
2085         Fix build break when disabling some features.
2086         https://bugs.webkit.org/show_bug.cgi?id=165254
2087
2088         The EFL port was broken if SPELLCHECK was disabled or
2089         PLUGIN_ARCHITECTURE is not x11.
2090
2091         Reviewed by Michael Catanzaro.
2092
2093         * UIProcess/efl/TextCheckerEfl.cpp:
2094         (WebKit::TextChecker::checkTextOfParagraph):
2095         (WebKit::TextChecker::checkSpellingOfString):
2096         Fix UNUSED_PARAM() usage if SPELLCHECK is disabled.
2097         * UIProcess/efl/WebPageProxyEfl.cpp:
2098         Isolate methods within #if PLUGIN_ARCHITECTURE(X11).
2099
2100 2016-12-01  Jiewen Tan  <jiewen_tan@apple.com>
2101
2102         Add a runtime flag for SubtleCrypto
2103         https://bugs.webkit.org/show_bug.cgi?id=164982
2104
2105         Reviewed by Brent Fulgham.
2106
2107         * Shared/WebPreferencesDefinitions.h:
2108         * UIProcess/API/C/WKPreferences.cpp:
2109         (WKPreferencesSetSubtleCryptoEnabled):
2110         (WKPreferencesGetSubtleCryptoEnabled):
2111         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2112         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2113         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2114         * WebProcess/WebPage/WebPage.cpp:
2115         (WebKit::WebPage::updatePreferences):
2116
2117 2016-12-01  Saam Barati  <sbarati@apple.com>
2118
2119         Rename CallFrame::callee() to CallFrame::jsCallee()
2120         https://bugs.webkit.org/show_bug.cgi?id=165293
2121
2122         Reviewed by Keith Miller.
2123
2124         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2125         (WebKit::callMethod):
2126         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2127         (WebKit::callNPJSObject):
2128         (WebKit::constructWithConstructor):
2129
2130 2016-12-01  Chris Dumez  <cdumez@apple.com>
2131
2132         [iOS][WK2] Tapping an element generates a 'click' event that has 0 as timeStamp
2133         https://bugs.webkit.org/show_bug.cgi?id=165270
2134         <rdar://problem/29224355>
2135
2136         Reviewed by Simon Fraser.
2137
2138         Tapping an element generates a 'click' event that has 0 as timeStamp
2139         instead of having a proper timeStamp value. This is breaking some
2140         sites.
2141
2142         * WebProcess/WebPage/ios/WebPageIOS.mm:
2143         (WebKit::WebPage::handleSyntheticClick):
2144         (WebKit::WebPage::completeSyntheticClick):
2145
2146 2016-12-01  Tim Horton  <timothy_horton@apple.com>
2147
2148         Try to fix the EFL/Gtk build
2149
2150         * UIProcess/efl/WebProcessPoolEfl.cpp:
2151         (WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
2152         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2153         (WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
2154
2155 2016-12-01  Tim Horton  <timothy_horton@apple.com>
2156
2157         Every WKWebView initialization spends a few milliseconds hitting the disk
2158         https://bugs.webkit.org/show_bug.cgi?id=165268
2159         <rdar://problem/29010113>
2160
2161         Reviewed by Brady Eidson.
2162
2163         Every WKWebView init currently involves doing directory creation and
2164         symlink resolution for a number of paths (to create sandbox extensions
2165         for all of our storage directories), which means touching the disk a
2166         lot during init. All of these paths are immutable per-WebProcessPool,
2167         so, instead, cache them on WebProcessPool and create sandbox extensions
2168         from the already-resolved paths. This is a sizable (~4x) speedup when
2169         initializing subsequent web views.
2170
2171         * Shared/SandboxExtension.h:
2172         (WebKit::SandboxExtension::createHandleWithoutResolvingPath):
2173         Add createHandleWithoutResolvingPath, which makes a sandbox extension
2174         handle without doing symlink resolution.
2175
2176         (WebKit::resolvePathForSandboxExtension):
2177         (WebKit::resolveAndCreateReadWriteDirectoryForSandboxExtension):
2178         Add two functions that do the same resolution that SandboxExtension::createHandle
2179         and ::createHandleForReadWriteDirectory do, but just return the paths,
2180         for later use with createHandleWithoutResolvingPath.
2181
2182         * Shared/mac/SandboxExtensionMac.mm:
2183         (WebKit::resolveAndCreateReadWriteDirectoryForSandboxExtension):
2184         (WebKit::resolvePathForSandboxExtension):
2185         (WebKit::SandboxExtension::createHandleWithoutResolvingPath):
2186         (WebKit::SandboxExtension::createHandle):
2187         (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
2188         Implement the aforementioned functions, and reimplement the existing
2189         createHandle{ForReadWriteDirectory} functions in terms of them.
2190
2191         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2192         (WebKit::WebProcessPool::platformDefaultIconDatabasePath):
2193         Stop wasting time generating and resolving a platform default icon
2194         database path, since we don't actually use it for anything anymore except
2195         to determine whether the icon database is enabled, and we only want to
2196         enable it if the client has provided a path.
2197
2198         (WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
2199         (WebKit::WebProcessPool::platformInitializeWebProcess):
2200         * UIProcess/WebProcessPool.cpp:
2201         (WebKit::m_hiddenPageThrottlingTimer):
2202         (WebKit::WebProcessPool::resolvePathsForSandboxExtensions):
2203         (WebKit::WebProcessPool::createNewWebProcess):
2204         * UIProcess/WebProcessPool.h:
2205         Resolve paths in resolvePathsForSandboxExtensions, and use the resolved
2206         paths along with createHandleWithoutResolvingPath in order to effectively
2207         cache the resolution operation.
2208
2209 2016-12-01  Antti Koivisto  <antti@apple.com>
2210
2211         Revert r208931
2212         https://bugs.webkit.org/show_bug.cgi?id=164924
2213
2214         PLT regression.
2215
2216         * NetworkProcess/cache/NetworkCache.cpp:
2217         (WebKit::NetworkCache::makeCacheKey):
2218         (WebKit::NetworkCache::Cache::makeCacheKey): Deleted.
2219         * NetworkProcess/cache/NetworkCache.h:
2220         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
2221         (WebKit::NetworkCache::BlobStorage::BlobStorage):
2222         (WebKit::NetworkCache::BlobStorage::add):
2223         (WebKit::NetworkCache::BlobStorage::get):
2224         * NetworkProcess/cache/NetworkCacheBlobStorage.h:
2225         * NetworkProcess/cache/NetworkCacheData.cpp:
2226         (WebKit::NetworkCache::computeSHA1):
2227         (WebKit::NetworkCache::makeSalt): Deleted.
2228         (WebKit::NetworkCache::readOrMakeSalt): Deleted.
2229         * NetworkProcess/cache/NetworkCacheData.h:
2230         * NetworkProcess/cache/NetworkCacheKey.cpp:
2231         (WebKit::NetworkCache::noPartitionString):
2232         (WebKit::NetworkCache::Key::Key):
2233         (WebKit::NetworkCache::Key::hasPartition):
2234         (WebKit::NetworkCache::Key::computeHash):
2235         (WebKit::NetworkCache::Key::hashAsString):
2236         (WebKit::NetworkCache::Key::computePartitionHash): Deleted.
2237         * NetworkProcess/cache/NetworkCacheKey.h:
2238         (WebKit::NetworkCache::Key::hash):
2239         (WebKit::NetworkCache::Key::partitionHash): Deleted.
2240         (WebKit::NetworkCache::Key::hashAsString): Deleted.
2241         (WebKit::NetworkCache::Key::partitionHashAsString): Deleted.
2242         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2243         (WebKit::NetworkCache::makeSubresourcesKey):
2244         (WebKit::NetworkCache::constructRevalidationRequest):
2245         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
2246         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
2247         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2248         (WebKit::NetworkCache::Storage::open):
2249         (WebKit::NetworkCache::traverseRecordsFiles):
2250         (WebKit::NetworkCache::Storage::Storage):
2251         (WebKit::NetworkCache::Storage::recordDirectoryPathForKey):
2252         (WebKit::NetworkCache::decodeRecordHeader):
2253         (WebKit::NetworkCache::Storage::readRecord):
2254         (WebKit::NetworkCache::Storage::encodeRecord):
2255         (WebKit::NetworkCache::Storage::traverse):
2256         (WebKit::NetworkCache::makeSaltFilePath): Deleted.
2257         * NetworkProcess/cache/NetworkCacheStorage.h:
2258         (WebKit::NetworkCache::Storage::salt): Deleted.
2259
2260 2016-11-30  Sam Weinig  <sam@webkit.org>
2261
2262         [WebIDL] Remove custom bindings for File and Blob constructors
2263         https://bugs.webkit.org/show_bug.cgi?id=165218
2264
2265         Reviewed by Darin Adler.
2266
2267         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2268         (WebKit::NetworkBlobRegistry::registerBlobURL):
2269         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
2270         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2271         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
2272         * NetworkProcess/NetworkConnectionToWebProcess.h:
2273         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
2274         (WebKit::BlobRegistryProxy::registerBlobURL):
2275         * WebProcess/FileAPI/BlobRegistryProxy.h:
2276         Avoid copies of the BlobPart Vector.
2277
2278 2016-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2279
2280         [GTK] UI process crash in WebKit::WaylandCompositor::Surface::prepareTextureForPainting
2281         https://bugs.webkit.org/show_bug.cgi?id=164911
2282
2283         Reviewed by Michael Catanzaro.
2284
2285         The problem is that m_buffer is nullptr in Surface::prepareTextureForPainting() even though we have already an
2286         image. We only use the buffer to get the image size, so we could save the image size when the image is created,
2287         and then we don't need to care about the buffer anymore.
2288
2289         * UIProcess/gtk/WaylandCompositor.cpp:
2290         (WebKit::WaylandCompositor::Surface::prepareTextureForPainting):
2291         (WebKit::WaylandCompositor::Surface::commit):
2292         * UIProcess/gtk/WaylandCompositor.h:
2293
2294 2016-11-30  Antoine Quint  <graouts@apple.com>
2295
2296         [Modern Media Controls] Add an HTML comment flag to turn the feature on
2297         https://bugs.webkit.org/show_bug.cgi?id=165226
2298
2299         Reviewed by Dean Jackson.
2300
2301         Add new methods to set the Modern Media Controls preference.
2302
2303         * UIProcess/API/C/WKPreferences.cpp:
2304         (WKPreferencesSetModernMediaControlsEnabled):
2305         (WKPreferencesGetModernMediaControlsEnabled):
2306         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2307
2308 2016-11-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
2309
2310         Add separate settings and preferences to enable/disable async decoding for large images and animated images
2311         https://bugs.webkit.org/show_bug.cgi?id=165177
2312
2313         Reviewed by Simon Fraser.
2314         
2315         Hook up the async image decoding settings for WebKit2.
2316
2317         * Shared/WebPreferencesDefinitions.h:
2318         * UIProcess/API/Cocoa/WKPreferences.mm:
2319         (-[WKPreferences _largeImageAsyncDecodingEnabled]):
2320         (-[WKPreferences _setLargeImageAsyncDecodingEnabled:]):
2321         (-[WKPreferences _animatedImageAsyncDecodingEnabled]):
2322         (-[WKPreferences _setAnimatedImageAsyncDecodingEnabled:]):
2323         (-[WKPreferences _asyncImageDecodingEnabled]): Deleted.
2324         (-[WKPreferences _setAsyncImageDecodingEnabled:]): Deleted.
2325         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2326         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2327         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2328         * WebProcess/WebPage/WebPage.cpp:
2329         (WebKit::WebPage::updatePreferences):
2330
2331 2016-11-30  Chris Dumez  <cdumez@apple.com>
2332
2333         [iOS][WK2] Turn on HTML interactive form validation feature
2334         https://bugs.webkit.org/show_bug.cgi?id=165212
2335         <rdar://problem/29444356>
2336
2337         Reviewed by Simon Fraser.
2338
2339         Turn on HTML interactive form validation feature on iOS WK2
2340         now that we have a native UI.
2341
2342         * Shared/WebPreferencesDefinitions.h:
2343
2344 2016-11-30  Brent Fulgham  <bfulgham@apple.com>
2345
2346         Correct plugin sandbox after r208611
2347         https://bugs.webkit.org/show_bug.cgi?id=165187
2348         <rdar://problem/29431165>
2349
2350         Reviewed by Alex Christensen.
2351
2352         In r208611 I removed the 'else' clause of a Scheme conditional
2353         that was needed to properly run plugins (such as Flash Player).
2354
2355         This change retains the relevant current sandbox content, while
2356         still stripping out the old code that is no longer needed.
2357
2358         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2359
2360 2016-11-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2361
2362         [GTK] Database process should not initialize gtk
2363         https://bugs.webkit.org/show_bug.cgi?id=165138
2364
2365         Reviewed by Sergio Villar Senin.
2366
2367         It doesn't use GTK+ at all.
2368
2369         * DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp:
2370         (WebKit::DatabaseProcessMainUnix):
2371         (): Deleted.
2372
2373 2016-11-29  Gavin Barraclough  <barraclough@apple.com>
2374
2375         Remove WebPage::SetPageSuppressed
2376         https://bugs.webkit.org/show_bug.cgi?id=165158
2377
2378         Unreviewed revert accidental change.
2379
2380         * WebProcess/WebPage/WebPage.cpp:
2381         (WebKit::WebPage::setActivityState):
2382
2383 2016-11-29  Gavin Barraclough  <barraclough@apple.com>
2384
2385         Remove WebPage::SetPageSuppressed
2386         https://bugs.webkit.org/show_bug.cgi?id=165158
2387
2388         Reviewed by Tim Horton.
2389
2390         This was scaffolding. We've now refactored to the point that the information driving throttling originates
2391         from the UI process (so UI and web processes can have a consistent view of what should throttle), but we
2392         don't need a separate message to handle this - necessary state to determine is provided in ActivityState.
2393
2394         * UIProcess/WebPageProxy.cpp:
2395         (WebKit::WebPageProxy::updateThrottleState):
2396             - used to send SetPageSuppressed; no longer does.
2397         * UIProcess/WebPageProxy.h:
2398             - removed m_pageSuppressed (was used to avoid duplicated messages).
2399         * WebProcess/WebPage/WebPage.cpp:
2400         (WebKit::WebPage::updateThrottleState):
2401             - compute throttle state based on m_activityState.
2402         (WebKit::WebPage::setActivityState):
2403             - update throttle state whenever activity state changes.
2404         (WebKit::WebPage::updatePreferences):
2405             - update throttle state whenever preferences change (throttling can be disabled via preference).
2406         (WebKit::WebPage::setPageSuppressed): Deleted.
2407             - Removed WebPage::SetPageSuppressed.
2408         * WebProcess/WebPage/WebPage.h:
2409             - Removed WebPage::SetPageSuppressed.
2410             - Added m_processSuppressionEnabled, to cache preference state.
2411         * WebProcess/WebPage/WebPage.messages.in:
2412             - Removed WebPage::SetPageSuppressed.
2413
2414 2016-11-29  Andy Estes  <aestes@apple.com>
2415
2416         [Cocoa] Enable two clang warnings recommended by Xcode
2417         https://bugs.webkit.org/show_bug.cgi?id=164498
2418
2419         Reviewed by Mark Lam.
2420
2421         * Configurations/Base.xcconfig: Enabled CLANG_WARN_INFINITE_RECURSION and CLANG_WARN_SUSPICIOUS_MOVE.
2422
2423 2016-11-29  Eric Carlson  <eric.carlson@apple.com>
2424
2425         [MediaStream] Don't request user permission for a device if it has already been granted in the current browsing context
2426         https://bugs.webkit.org/show_bug.cgi?id=164760
2427         <rdar://problem/29261266>
2428
2429         Reviewed by Youenn Fablet.
2430
2431         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2432         (WebKit::FrameAuthorizationState::FrameAuthorizationState):
2433         (WebKit::FrameAuthorizationState::hasPermissionToUseCaptureDevice):
2434         (WebKit::FrameAuthorizationState::setHasPermissionToUseCaptureDevice):
2435         (WebKit::FrameAuthorizationState::reset):
2436         (WebKit::FrameAuthorizationState::securityOriginsAreEqual):
2437         (WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest):
2438         (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests):
2439         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
2440         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
2441         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
2442         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2443         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2444         (WebKit::FrameAuthorizationState::~FrameAuthorizationState):
2445         (WebKit::FrameAuthorizationState::frameID):
2446         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2447         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
2448         * UIProcess/UserMediaPermissionRequestProxy.h:
2449         (WebKit::UserMediaPermissionRequestProxy::create):
2450         (WebKit::UserMediaPermissionRequestProxy::frameID):
2451         (WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin):
2452         (WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin):
2453         * UIProcess/WebPageProxy.cpp:
2454         (WebKit::WebPageProxy::didCommitLoadForFrame):
2455         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2456         (WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps):
2457
2458 2016-11-29  Wenson Hsieh  <wenson_hsieh@apple.com>
2459
2460         Scroll snapping on Mac should use AppKit animations
2461         https://bugs.webkit.org/show_bug.cgi?id=147261
2462         <rdar://problem/29395293>
2463
2464         Reviewed by Brent Fulgham.
2465
2466         Add some logic to plumb filtered wheel velocity over to WebCore in the case of mainframe scrolling. See
2467         WebCore/ChangeLog for more details.
2468
2469         * WebProcess/WebPage/EventDispatcher.cpp:
2470         (WebKit::EventDispatcher::wheelEvent):
2471
2472 2016-11-21  Brian Burg  <bburg@apple.com>
2473
2474         Web Automation: add ObjC SPI to set whether a page is controlled by automation
2475         https://bugs.webkit.org/show_bug.cgi?id=165001
2476         <rdar://problem/29350432>
2477
2478         Reviewed by Dan Bernstein.
2479
2480         Add SPI property to WKWebViewConfiguration and plumb it through to
2481         initialize WebPageProxy::m_controlledByAutomation. This is propagated
2482         to the WebProcess on creation via WebPageCreationParameters.
2483
2484         * UIProcess/API/APIPageConfiguration.cpp:
2485         (API::PageConfiguration::copy):
2486         * UIProcess/API/APIPageConfiguration.h:
2487         (API::PageConfiguration::isControlledByAutomation):
2488         (API::PageConfiguration::setControlledByAutomation):
2489         * UIProcess/API/Cocoa/WKWebView.mm:
2490         (-[WKWebView _initializeWithConfiguration:]):
2491         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2492         (-[WKWebViewConfiguration init]):
2493         (-[WKWebViewConfiguration copyWithZone:]):
2494         (-[WKWebViewConfiguration _isControlledByAutomation]):
2495         (-[WKWebViewConfiguration _setControlledByAutomation:]):
2496         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2497         * UIProcess/WebPageProxy.cpp:
2498         (WebKit::WebPageProxy::WebPageProxy):
2499
2500 2016-11-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2501
2502         [GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
2503         https://bugs.webkit.org/show_bug.cgi?id=164303
2504
2505         Reviewed by Michael Catanzaro.
2506
2507         Trap also BadDrawable and BadDamage X errors when creating the surface and damage.
2508
2509         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
2510         (WebKit::AcceleratedBackingStoreX11::update):
2511
2512 2016-11-28  Chris Dumez  <cdumez@apple.com>
2513
2514         [Mac][WK2] Enable HTML interactive form validation
2515         https://bugs.webkit.org/show_bug.cgi?id=165123
2516         <rdar://problem/28944652>
2517
2518         Reviewed by Simon Fraser.
2519
2520         Enable HTML interactive form validation now that we have a native UI
2521         for it.
2522
2523         * Shared/WebPreferencesDefinitions.h:
2524
2525 2016-11-28  Brent Fulgham  <bfulgham@apple.com>
2526
2527         Generated sandbox profile is not being put in the correct Resources directory
2528         https://bugs.webkit.org/show_bug.cgi?id=165126
2529
2530         Reviewed by Tim Horton.
2531
2532         * WebKit2.xcodeproj/project.pbxproj: Copy the generated file to the 'PlugInSandboxProfiles'
2533         sub-directory.
2534
2535 2016-11-28  Ryan Haddad  <ryanhaddad@apple.com>
2536
2537         Unreviewed, rolling out r209008.
2538
2539         This change appears to have caused two fast/mediastrem
2540         LayoutTests to fail.
2541
2542         Reverted changeset:
2543
2544         "[MediaStream] Don't request user permission for a device if
2545         it has already been granted in the current browsing context"
2546         https://bugs.webkit.org/show_bug.cgi?id=164760
2547         http://trac.webkit.org/changeset/209008
2548
2549 2016-11-28  Andrew Gold  <agold@apple.com>
2550
2551         Support for HTML Media Capture API
2552         https://bugs.webkit.org/show_bug.cgi?id=43239
2553
2554         Reviewed by Tim Horton.
2555
2556         In order to enable media capture on iOS, we must first use the AVFoundation API to 
2557         check/request capture permission from the user for Safari. Then, Safari must request
2558         permission on behalf of the webpage to use the capture devices. Additionally, Safari
2559         must present UI when the capture is taking place, so WebKit needs to notify the client
2560         of a capture session beginning and ending. To do this, we added four methods to 
2561         WKUIDelegatePrivate to request permission from the user, check for permissions, notify
2562         that a capture session has begun, and notify that a capture session has ended. Additionally,
2563         we added a private method to WKWebView that allows the client to stop a capture session.
2564
2565         * UIProcess/API/APIUIClient.h:
2566         (API::UIClient::didBeginCaptureSession): Notifies the client of a capture session beginning.
2567         (API::UIClient::didEndCaptureSession): Notifies the client of a capture session ending.
2568
2569         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added new delegate methods to request permission,
2570         check for permission, notify of a capture session beginning, and notify of a capture session
2571         ending.
2572
2573         * UIProcess/API/Cocoa/WKWebView.mm:
2574         (-[WKWebView _stopMediaCapture]): Cancels a media capture session.
2575         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2576
2577         * UIProcess/Cocoa/UIDelegate.h:
2578         * UIProcess/Cocoa/UIDelegate.mm:
2579         (WebKit::UIDelegate::setDelegate): Added the new delegate methods.
2580         (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
2581         First checks if the user has authorized the client application access capture devices,
2582         then uses the WKUIDelegate to request permission for a site from the user.
2583         (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin): Checks the client
2584         for permission to access capture devices.
2585         (WebKit::UIDelegate::UIClient::didBeginCaptureSession): Notifies the client of a capture
2586         session beginning.
2587         (WebKit::UIDelegate::UIClient::didEndCaptureSession): Notifies the client of a capture
2588         session ending.
2589
2590         * UIProcess/WebPageProxy.cpp:
2591         (WebKit::WebPageProxy::isPlayingMediaDidChange): Calls UIDelegate method to notify the
2592         client of a capture session beginning/ending.
2593
2594 2016-11-28  Eric Carlson  <eric.carlson@apple.com>
2595
2596         [MediaStream] Don't request user permission for a device if it has already been granted in the current browsing context
2597         https://bugs.webkit.org/show_bug.cgi?id=164760
2598         <rdar://problem/29261266>
2599
2600         Reviewed by Youenn Fablet.
2601
2602         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2603         (WebKit::FrameAuthorizationState::FrameAuthorizationState):
2604         (WebKit::FrameAuthorizationState::hasPermissionToUseCaptureDevice):
2605         (WebKit::FrameAuthorizationState::setHasPermissionToUseCaptureDevice):
2606         (WebKit::FrameAuthorizationState::reset):
2607         (WebKit::FrameAuthorizationState::securityOriginsAreEqual):
2608         (WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest):
2609         (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests):
2610         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
2611         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
2612         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
2613         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2614         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2615         (WebKit::FrameAuthorizationState::~FrameAuthorizationState):
2616         (WebKit::FrameAuthorizationState::frameID):
2617         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2618         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
2619         * UIProcess/UserMediaPermissionRequestProxy.h:
2620         (WebKit::UserMediaPermissionRequestProxy::create):
2621         (WebKit::UserMediaPermissionRequestProxy::frameID):
2622         (WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin):
2623         (WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin):
2624         * UIProcess/WebPageProxy.cpp:
2625         (WebKit::WebPageProxy::didCommitLoadForFrame):
2626         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2627         (WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps):
2628
2629 2016-11-27  Dean Jackson  <dino@apple.com>
2630
2631         Removed a WTFLogAlways I left in with a recent commit.
2632
2633         * UIProcess/Cocoa/WebViewImpl.mm:
2634         (-[WKAccessibilitySettingsObserver _settingsDidChange:]):
2635
2636 2016-11-27  Csaba Osztrogonác  <ossy@webkit.org>
2637
2638         Fix unused-private-field build warning in WebKit2/Platform/SharedMemory.h
2639         https://bugs.webkit.org/show_bug.cgi?id=165069
2640
2641         Reviewed by Darin Adler.
2642
2643         * Platform/SharedMemory.h:
2644
2645 2016-11-26  Simon Fraser  <simon.fraser@apple.com>
2646
2647         Fix the iOS build.
2648
2649         * WebProcess/WebPage/ios/WebPageIOS.mm:
2650         (WebKit::WebPage::eventThrottlingDelay):
2651
2652 2016-11-26  Yusuke Suzuki  <utatane.tea@gmail.com>
2653
2654         [WTF] Import std::optional reference implementation as WTF::Optional
2655         https://bugs.webkit.org/show_bug.cgi?id=164199
2656
2657         Reviewed by Saam Barati and Sam Weinig.
2658
2659         * NetworkProcess/NetworkDataTask.cpp:
2660         (WebKit::NetworkDataTask::didReceiveResponse):
2661         * NetworkProcess/NetworkLoad.h:
2662         * NetworkProcess/cache/NetworkCache.cpp:
2663         (WebKit::NetworkCache::responseHasExpired):
2664         * NetworkProcess/cache/NetworkCacheCoders.h:
2665         (WebKit::NetworkCache::Coder<std::optional<T>>::encode):
2666         (WebKit::NetworkCache::Coder<std::optional<T>>::decode):
2667         (WebKit::NetworkCache::Coder<Optional<T>>::encode): Deleted.
2668         (WebKit::NetworkCache::Coder<Optional<T>>::decode): Deleted.
2669         * NetworkProcess/cache/NetworkCacheData.cpp:
2670         (WebKit::NetworkCache::readOrMakeSalt):
2671         * NetworkProcess/cache/NetworkCacheData.h:
2672         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2673         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
2674         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::revalidationRequest):
2675         (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
2676         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
2677         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2678         (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
2679         (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
2680         (WebKit::NetworkCache::Statistics::queryWasEverRequested):
2681         * NetworkProcess/cache/NetworkCacheStatistics.h:
2682         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2683         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2684         (WebKit::NetworkCache::Storage::encodeRecord):
2685         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2686         * NetworkProcess/cache/NetworkCacheStorage.h:
2687         * Platform/IPC/ArgumentCoders.h:
2688         (IPC::ArgumentCoder<std::optional<T>>::encode):
2689         (IPC::ArgumentCoder<std::optional<T>>::decode):
2690         (IPC::ArgumentCoder<WTF::Optional<T>>::encode): Deleted.
2691         (IPC::ArgumentCoder<WTF::Optional<T>>::decode): Deleted.
2692         * Platform/IPC/Connection.h:
2693         (IPC::Connection::sendWithReply):
2694         * Platform/SharedMemory.h:
2695         * Platform/unix/SharedMemoryUnix.cpp:
2696         (WebKit::SharedMemory::map):
2697         * Scripts/webkit/messages.py:
2698         (class_template_headers):
2699         * Shared/API/APISecurityOrigin.h:
2700         (API::SecurityOrigin::create):
2701         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
2702         * Shared/API/c/WKSecurityOriginRef.cpp:
2703         (WKSecurityOriginGetPort):
2704         * Shared/SessionState.h:
2705         * Shared/WebPageCreationParameters.h:
2706         * Shared/mac/ObjCObjectGraph.mm:
2707         (WebKit::typeFromObject):
2708         * Shared/mac/SecItemShim.cpp:
2709         (WebKit::sendSecItemRequest):
2710         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
2711         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
2712         * UIProcess/API/Cocoa/WKSecurityOrigin.mm:
2713         (-[WKSecurityOrigin port]):
2714         * UIProcess/API/Cocoa/WKWebView.mm:
2715         (-[WKWebView _didCommitLayerTree:]):
2716         (-[WKWebView _navigationGestureDidEnd]):
2717         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2718         (WebKit::toWebsiteDataType):
2719         * UIProcess/API/efl/EwkView.cpp:
2720         (EwkView::setCursor):
2721         * UIProcess/API/mac/WKView.mm:
2722         (toCoreScrollbarStyle):
2723         (toAPIScrollbarStyle):
2724         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
2725         (WebKit::WebPaymentCoordinatorProxy::completeShippingMethodSelection):
2726         (WebKit::WebPaymentCoordinatorProxy::completeShippingContactSelection):
2727         (WebKit::WebPaymentCoordinatorProxy::completePaymentMethodSelection):
2728         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
2729         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
2730         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2731         (WebKit::toPKPaymentSummaryItem):
2732         (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection):
2733         (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
2734         (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):
2735         * UIProcess/Automation/WebAutomationSession.cpp:
2736         (WebKit::WebAutomationSession::webFrameIDForHandle):
2737         (WebKit::WebAutomationSession::switchToBrowsingContext):
2738         (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
2739         (WebKit::WebAutomationSession::resolveChildFrameHandle):
2740         (WebKit::WebAutomationSession::resolveParentFrameHandle):
2741         (WebKit::WebAutomationSession::computeElementLayout):
2742         * UIProcess/Automation/WebAutomationSession.h:
2743         * UIProcess/Cocoa/WebViewImpl.h:
2744         * UIProcess/Cocoa/WebViewImpl.mm:
2745         (WebKit::WebViewImpl::updateViewExposedRect):
2746         (WebKit::WebViewImpl::setOverlayScrollbarStyle):
2747         (WebKit::WebViewImpl::overlayScrollbarStyle):
2748         * UIProcess/DrawingAreaProxy.cpp:
2749         (WebKit::DrawingAreaProxy::setViewExposedRect):
2750         * UIProcess/DrawingAreaProxy.h:
2751         (WebKit::DrawingAreaProxy::viewExposedRect):
2752         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
2753         (WebKit::WebSocketServerConnection::didReceiveSocketStreamData):
2754         * UIProcess/InspectorServer/WebSocketServerConnection.h:
2755         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2756         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
2757         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2758         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2759         (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
2760         * UIProcess/Scrolling/RemoteScrollingTree.h:
2761         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2762         (WebKit::fileCreationTime):
2763         (WebKit::fileModificationTime):
2764         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2765         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2766         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
2767         * UIProcess/WebBackForwardList.cpp:
2768         (WebKit::WebBackForwardList::backForwardListState):
2769         (WebKit::WebBackForwardList::restoreFromState):
2770         * UIProcess/WebPageProxy.cpp:
2771         (WebKit::WebPageProxy::didCommitLoadForFrame):
2772         (WebKit::WebPageProxy::creationParameters):
2773         (WebKit::WebPageProxy::setOverlayScrollbarStyle):
2774         * UIProcess/WebPageProxy.h:
2775         (WebKit::WebPageProxy::overlayScrollbarStyle):
2776         * UIProcess/WebPageProxy.messages.in:
2777         * UIProcess/WebsiteData/WebsiteDataRecord.h:
2778         * UIProcess/efl/WebView.cpp:
2779         (WebKit::WebView::transformFromScene):
2780         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
2781         * UIProcess/gtk/WebPreferencesGtk.cpp:
2782         (WebKit::WebPreferences::platformInitializeStore):
2783         * UIProcess/ios/WKContentViewInteraction.mm:
2784         (-[WKContentView _scrollOffsetForEvent:]):
2785         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
2786         * UIProcess/mac/LegacySessionStateCoding.cpp:
2787         (WebKit::encodeFormDataElement):
2788         (WebKit::decodeFormDataElement):
2789         (WebKit::decodeV1SessionHistory):
2790         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2791         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2792         (WebKit::RemoteLayerTreeDrawingAreaProxy::setViewExposedRect):
2793         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
2794         (WebKit::WebPaymentCoordinator::completeShippingMethodSelection):
2795         (WebKit::WebPaymentCoordinator::completeShippingContactSelection):
2796         (WebKit::WebPaymentCoordinator::completePaymentMethodSelection):
2797         * WebProcess/ApplePay/WebPaymentCoordinator.h:
2798         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2799         (WKBundlePageSetEventThrottlingBehaviorOverride):
2800         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
2801         (WebKit::PDFPlugin::convertFromPDFViewToRootView):
2802         (WebKit::PDFPlugin::convertFromPDFViewToScreen):
2803         (WebKit::PDFPlugin::boundsOnScreen):
2804         (WebKit::PDFPlugin::geometryDidChange):
2805         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2806         (WebKit::PDFPlugin::geometryDidChange):
2807         * WebProcess/Plugins/PluginView.cpp:
2808         (WebKit::PluginView::performFrameLoadURLRequest):
2809         (WebKit::PluginView::evaluate):
2810         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
2811         (WebKit::WebPluginInfoProvider::pluginLoadClientPolicyForHost):
2812         * WebProcess/Plugins/WebPluginInfoProvider.h:
2813         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
2814         (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
2815         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2816         (WebKit::toFormData):
2817         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2818         (WebKit::WebChromeClient::preferredScrollbarOverlayStyle):
2819         * WebProcess/WebCoreSupport/WebChromeClient.h:
2820         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2821         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2822         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2823         * WebProcess/WebPage/DrawingArea.h:
2824         * WebProcess/WebPage/DrawingArea.messages.in:
2825         * WebProcess/WebPage/WebFrame.cpp:
2826         (WebKit::WebFrame::certificateInfo):
2827         * WebProcess/WebPage/WebPage.cpp:
2828         (WebKit::m_userInterfaceLayoutDirection):
2829         (WebKit::WebPage::setScrollbarOverlayStyle):
2830         * WebProcess/WebPage/WebPage.h:
2831         (WebKit::WebPage::scrollbarOverlayStyle):
2832         * WebProcess/WebPage/WebPage.messages.in:
2833         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2834         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2835         (WebKit::RemoteLayerTreeDrawingArea::setViewExposedRect):
2836         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2837         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2838         (WebKit::TiledCoreAnimationDrawingArea::setViewExposedRect):
2839
2840 2016-11-26  Sam Weinig  <sam@webkit.org>
2841
2842         Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
2843         https://bugs.webkit.org/show_bug.cgi?id=164965
2844
2845         Reviewed by Simon Fraser.
2846
2847         * Shared/WebPreferencesDefinitions.h:
2848         * UIProcess/API/C/WKPreferences.cpp:
2849         (WKPreferencesSetIntersectionObserverEnabled):
2850         (WKPreferencesGetIntersectionObserverEnabled):
2851         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2852         * WebProcess/WebPage/WebPage.cpp:
2853         (WebKit::WebPage::updatePreferences):
2854         Add a preference, defaulting to off, for enabling IntersectionObserver.
2855
2856 2016-11-26  Simon Fraser  <simon.fraser@apple.com>
2857
2858         Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime
2859         https://bugs.webkit.org/show_bug.cgi?id=164992
2860
2861         Reviewed by Darin Adler.
2862         
2863         No more ugly conversion from seconds to milliseconds.
2864
2865         * WebProcess/WebPage/WebPage.cpp:
2866         (WebKit::WebPage::updatePreferences):
2867         * WebProcess/WebPage/ios/WebPageIOS.mm:
2868         (WebKit::WebPage::eventThrottlingDelay):
2869
2870 2016-11-25  Michael Catanzaro  <mcatanzaro@igalia.com>
2871
2872         [GTK] Follow-up fixes to r208974
2873         https://bugs.webkit.org/show_bug.cgi?id=164771
2874
2875         Unreviewed, implement Carlos's review feedback.
2876
2877         * UIProcess/API/gtk/WebKitNotification.cpp:
2878         (webkit_notification_get_tag):
2879         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
2880         (WebKitNotificationProvider::withdrawAnyPreviousNotificationMatchingTag):
2881         (WebKitNotificationProvider::show):
2882         * UIProcess/API/gtk/WebKitNotificationProvider.h:
2883
2884 2016-11-24  Michael Catanzaro  <mcatanzaro@igalia.com>
2885
2886         [GTK] Notifications API does not expose or respect the "tag" attribute
2887         https://bugs.webkit.org/show_bug.cgi?id=164771
2888
2889         Reviewed by Gustavo Noronha Silva.
2890
2891         Expose a tag property on WebKitNotification. Ensure that any previous notification with the
2892         same tag is closed when showing a new notification with that tag.
2893
2894         * UIProcess/API/gtk/WebKitNotification.cpp:
2895         (webkit_notification_class_init):
2896         (webkitNotificationCreate):
2897         (webkit_notification_get_tag):
2898         * UIProcess/API/gtk/WebKitNotification.h:
2899         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
2900         (WebKitNotificationProvider::withdrawAnyPreviousNotificationMatchingTag):
2901         (WebKitNotificationProvider::show):
2902         * UIProcess/API/gtk/WebKitNotificationProvider.h:
2903         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2904
2905 2016-11-22  Sergio Villar Senin  <svillar@igalia.com>
2906
2907         [GTK] Fix introspection warning
2908         https://bugs.webkit.org/show_bug.cgi?id=165026
2909
2910         Reviewed by Michael Catanzaro.
2911
2912         This fixes an introspection annotation for a new API added in r208532.
2913
2914         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2915         (webkit_web_page_class_init):
2916
2917 2016-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2918
2919         [SOUP] Simplify custom protocols handler implementation
2920         https://bugs.webkit.org/show_bug.cgi?id=164922
2921
2922         Reviewed by Michael Catanzaro.
2923
2924         We are using too many classes for this and also the C API that is not needed, because both GTK+ and EFL have
2925         their own APIs and this is not used by WTR at all.
2926
2927         * PlatformEfl.cmake: Remove files from compilation.
2928         * PlatformGTK.cmake: Ditto.
2929         * Shared/API/c/WKBase.h:
2930         * Shared/API/c/soup/WKBaseSoup.h: Removed.
2931         * UIProcess/API/APICustomProtocolManagerClient.h: Added.
2932         (API::CustomProtocolManagerClient::~CustomProtocolManagerClient):
2933         (API::CustomProtocolManagerClient::startLoading):
2934         (API::CustomProtocolManagerClient::stopLoading):
2935         (API::CustomProtocolManagerClient::invalidate):
2936         * UIProcess/API/C/WKAPICast.h:
2937         * UIProcess/API/C/soup/WKAPICastSoup.h: Removed.
2938         * UIProcess/API/C/soup/WKContextSoup.h: Removed.
2939         * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp: Removed.
2940         * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: Removed.
2941         * UIProcess/API/C/soup/WKSoupRequestManager.h: Removed.
2942         * UIProcess/API/efl/ewk_context.cpp: Remove unneeded include.
2943         * UIProcess/API/efl/ewk_url_scheme_request.cpp: Use CustomProtocolManagerProxy instead of WKSoupCustomProtocolRequestManagerRef.
2944         (EwkUrlSchemeRequest::EwkUrlSchemeRequest):
2945         (EwkUrlSchemeRequest::finish):
2946         (EwkUrlSchemeRequest::invalidate):
2947         * UIProcess/API/efl/ewk_url_scheme_request_private.h:
2948         (EwkUrlSchemeRequest::create):
2949         (EwkUrlSchemeRequest::manager):
2950         * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp: Added.
2951         (attachCustomProtocolManagerClientToContext):
2952         * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h.
2953         * UIProcess/API/gtk/WebKitPrivate.h:
2954         * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Removed.
2955         * UIProcess/API/gtk/WebKitRequestManagerClient.h: Removed.
2956         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Use CustomProtocolManagerProxy instead of WebSoupCustomProtocolRequestManager.
2957         (webkitURISchemeRequestCreate):
2958         (webkitURISchemeRequestCancel):
2959         (webkitURISchemeRequestGetManager):
2960         (webkitURISchemeRequestInvalidate):
2961         (webkitURISchemeRequestReadCallback):
2962         (webkit_uri_scheme_request_finish_error):
2963         * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
2964         * UIProcess/API/gtk/WebKitWebContext.cpp:
2965         (webkitWebContextConstructed):
2966         (webkitWebContextDispose):
2967         (webkit_web_context_register_uri_scheme):
2968         (webkitWebContextStartLoadingCustomProtocol):
2969         (webkitWebContextInvalidateCustomProtocolRequests):
2970         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
2971         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2972         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2973         (WebKit::CustomProtocolManagerProxy::processDidClose):
2974         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
2975         (WebKit::CustomProtocolManagerProxy::processDidClose): Invalidate the client.
2976         (WebKit::CustomProtocolManagerProxy::startLoading): Notify the client.
2977         (WebKit::CustomProtocolManagerProxy::stopLoading): Ditto.
2978         (WebKit::CustomProtocolManagerProxy::didReceiveResponse): Notify the network process.
2979         (WebKit::CustomProtocolManagerProxy::didLoadData): Ditto.
2980         (WebKit::CustomProtocolManagerProxy::didFailWithError): Ditto.
2981         (WebKit::CustomProtocolManagerProxy::didFinishLoading): Ditto.
2982         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp: Removed.
2983         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h: Removed.
2984         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp: Removed.
2985         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h: Removed.
2986         * UIProcess/Network/NetworkProcessProxy.cpp:
2987         (WebKit::NetworkProcessProxy::didClose): Notify the CustomProtocolManagerProxy.
2988         * UIProcess/WebProcessPool.cpp:
2989         (WebKit::WebProcessPool::WebProcessPool): Initialize the CustomProtocolManagerClient and remove the all supplement.
2990         (WebKit::WebProcessPool::setCustomProtocolManagerClient):
2991         (WebKit::WebProcessPool::registerSchemeForCustomProtocol): In case of soup cache the given protocol.
2992         (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): In case of soup delete the given protocol from the cache.
2993         * UIProcess/WebProcessPool.h:
2994         * UIProcess/efl/RequestManagerClientEfl.cpp: Do not use the C API, but API::CustomProtocolManagerClient.
2995         (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
2996         (WebKit::RequestManagerClientEfl::registerURLSchemeHandler):
2997         * UIProcess/efl/RequestManagerClientEfl.h:
2998         * UIProcess/efl/WebProcessPoolEfl.cpp:
2999         * UIProcess/gtk/WebProcessPoolGtk.cpp:
3000         * UIProcess/soup/WebProcessPoolSoup.cpp:
3001         (WebKit::WebProcessPool::platformInitializeNetworkProcess): Use m_urlSchemesRegisteredForCustomProtocols to
3002         build the list of custom protocols to send to the network process.
3003
3004 2016-11-21  Alex Christensen  <achristensen@webkit.org>
3005
3006         Fix Sierra CMake build after r208452
3007         https://bugs.webkit.org/show_bug.cgi?id=164437
3008
3009         * UIProcess/Cocoa/WebViewImpl.mm:
3010         (WebKit::WebViewImpl::updateMediaTouchBar):
3011         I haven't enabled VIDEO_PRESENTATION_MODE in the CMake build yet.
3012         It's needed for WebPlaybackSessionInterfaceMac to exist.
3013
3014 2016-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3015
3016         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.2 release.
3017
3018         * gtk/NEWS: Add release notes for 2.15.2.
3019
3020 2016-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3021
3022         Remove m_customProtocolManagerProxy from WebProcessProxy
3023         https://bugs.webkit.org/show_bug.cgi?id=164908
3024
3025         Reviewed by Andreas Kling.
3026
3027         Since the network process is mandatory, the custom protocol manager proxy of WebProcessProxy is unused and can
3028         be removed.
3029
3030         * UIProcess/WebProcessProxy.cpp:
3031         (WebKit::WebProcessProxy::WebProcessProxy):
3032         * UIProcess/WebProcessProxy.h:
3033
3034 2016-11-20  Zan Dobersek  <zdobersek@igalia.com>
3035
3036         [EncryptedMedia] Make EME API runtime-enabled
3037         https://bugs.webkit.org/show_bug.cgi?id=164927
3038
3039         Reviewed by Jer Noble.
3040
3041         Add the new EncryptedMediaAPI preference. Set the same feature
3042         flag on the shared RuntimeEnabledFeatures object to the
3043         corresponding value that's stored in the WebPreferencesStore.
3044
3045         InjectedBundle::overrideBoolPreferenceForTestRunner() does the
3046         same when the 'WebKitEncryptedMediaAPIEnabled' preference is
3047         overridden in WKTR for testing purposes.
3048
3049         * Shared/WebPreferencesDefinitions.h:
3050         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3051         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3052         * WebProcess/WebPage/WebPage.cpp:
3053         (WebKit::WebPage::updatePreferences):
3054
3055 2016-11-19  Antti Koivisto  <antti@apple.com>
3056
3057         Salt network cache hashes
3058         https://bugs.webkit.org/show_bug.cgi?id=164924
3059
3060         Reviewed by Alex Christensen.
3061
3062         To enhance privacy make cache content unidentifiable from file names alone.
3063         This is done by generating a unique persistent salt for each cache instance.
3064         It is used when computing hashes used in file names.
3065
3066         The patch also replaces plain text partition directory names with salted hashes.
3067
3068         * NetworkProcess/cache/NetworkCache.cpp:
3069         (WebKit::NetworkCache::Cache::makeCacheKey):
3070         (WebKit::NetworkCache::makeCacheKey): Deleted.
3071         * NetworkProcess/cache/NetworkCache.h:
3072
3073             Increment cache version.
3074
3075         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
3076         (WebKit::NetworkCache::BlobStorage::BlobStorage):
3077         (WebKit::NetworkCache::BlobStorage::add):
3078         (WebKit::NetworkCache::BlobStorage::get):
3079
3080             Use salt for blob content hash.
3081
3082         * NetworkProcess/cache/NetworkCacheBlobStorage.h:
3083         * NetworkProcess/cache/NetworkCacheData.cpp:
3084         (WebKit::NetworkCache::computeSHA1):
3085
3086             For simplicity all SHA1s are now salted.
3087
3088         (WebKit::NetworkCache::makeSalt):
3089         (WebKit::NetworkCache::readOrMakeSalt):
3090
3091             Read salt if it exists, generate and persist it otherwise.
3092
3093         * NetworkProcess/cache/NetworkCacheData.h:
3094         * NetworkProcess/cache/NetworkCacheKey.cpp:
3095         (WebKit::NetworkCache::Key::Key):
3096
3097             Remove the "No partition" string and just empty.
3098             That was only needed to have a directory name of some sort.
3099
3100         (WebKit::NetworkCache::Key::computeHash):
3101
3102             Use salt for key hash.
3103
3104         (WebKit::NetworkCache::Key::computePartitionHash):
3105
3106             Separate hash for partition.
3107
3108         * NetworkProcess/cache/NetworkCacheKey.h:
3109         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
3110         (WebKit::NetworkCache::makeSubresourcesKey):
3111         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
3112         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
3113         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3114         (WebKit::NetworkCache::makeSaltFilePath):
3115         (WebKit::NetworkCache::Storage::open):
3116
3117             Cache can't be opened if we can't read or persist a salt.
3118
3119         (WebKit::NetworkCache::traverseRecordsFiles):
3120         (WebKit::NetworkCache::Storage::Storage):
3121         (WebKit::NetworkCache::Storage::synchronize):
3122         (WebKit::NetworkCache::Storage::recordDirectoryPathForKey):
3123
3124             Use the partition hash in the directory name instead of a plain text name.
3125
3126         (WebKit::NetworkCache::decodeRecordHeader):
3127         (WebKit::NetworkCache::Storage::readRecord):
3128         (WebKit::NetworkCache::Storage::encodeRecord):
3129         (WebKit::NetworkCache::Storage::traverse):
3130         (WebKit::NetworkCache::Storage::clear):
3131         * NetworkProcess/cache/NetworkCacheStorage.h:
3132         (WebKit::NetworkCache::Storage::salt):
3133
3134 2016-11-19  Simon Fraser  <simon.fraser@apple.com>
3135
3136         [iOS WK2] When zoomed in and panning on pages with fixed bars, parts of the bars are sometimes missing
3137         https://bugs.webkit.org/show_bug.cgi?id=164855
3138
3139         Reviewed by Sam Weinig.
3140
3141         During UI-process panning and zooming, we send visible rect updates to the web process
3142         with inStableState=false, and don't update GraphicsLayers until we get into a stable state.
3143
3144         This causes a problem where the web process has a stale notion of where the GraphicsLayers
3145         for position:fixed elements are, but is then told to update tiling coverage with an up-to-date
3146         visible rect. The existing "sync layer positions" path isn't useful to fix this, because it
3147         breaks the relationship between the GraphicsLayer positions and their FixedPositionViewportConstraints
3148         in the scrolling tree.
3149
3150         To address this, add the notion of an Optional<> approximatePosition on GraphicsLayers. This is used
3151         only by the coverageRect computation code path, and is cleared by a setPosition(). ApproximatePositions
3152         are pushed onto GraphicsLayers via the syncViewportConstrainedLayerPositions() code path (renamed to
3153         reconcileViewportConstrainedLayerPositions).
3154
3155         Tested by scrollingcoordinator/ios/non-stable-viewport-scroll.html
3156
3157         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
3158         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
3159         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
3160         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
3161         (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
3162         * UIProcess/Scrolling/RemoteScrollingTree.h:
3163         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
3164         (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
3165         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
3166         (WebKit::CompositingCoordinator::flushPendingLayerChanges):
3167         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3168         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
3169         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3170         (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
3171         * WebProcess/WebPage/ios/WebPageIOS.mm:
3172         (WebKit::WebPage::updateVisibleContentRects): Always push the custom fixed position rect down, but send
3173         ScrollingLayerPositionAction::SetApproximate if the state is not stable.
3174         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3175         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3176         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3177         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3178
3179 2016-11-18  Simon Fraser  <simon.fraser@apple.com>
3180
3181         Make it possible to test non-stable-state scrolling on iOS
3182         https://bugs.webkit.org/show_bug.cgi?id=164905
3183
3184         Reviewed by Dan Bernstein.
3185
3186         Make it possible for an iOS layout test to force every visible rect update
3187         from the UI process to the web process to be in a non-stable state. This emulates
3188         what happens during panning and zooming interactions, and allows us to test the
3189         scrolling and layer trees in these transient states.
3190
3191         This is done by adding a testing property on WKWebView, _stableStateOverride, whose
3192         getters and setters are overridden in TestRunnerWKWebView. When non-nil, we _updateVisibleContentRectAfterScrollInView
3193         consults the NSNumber's boolValue and uses it to override the stable state.
3194
3195         To facilitate this kind of testing, also add immediateScrollToOffset() and
3196         immediateZoomToScale() to UIScriptController. Finally, add doAfterPresentationUpdate()
3197         which provides a callback that fires after one trip to the web process and back.
3198
3199         * UIProcess/API/Cocoa/WKWebView.mm:
3200         (-[WKWebView _updateVisibleContentRectAfterScrollInView:]):
3201         (-[WKWebView _stableStateOverride]):
3202         (-[WKWebView _setStableStateOverride:]):
3203         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3204
3205 2016-11-18  Simon Fraser  <simon.fraser@apple.com>
3206
3207         [iOS WK2] Eliminate a source of flakiness in layout tests by forcing WebPage into "responsive" mode for all tests, with an internals override
3208         https://bugs.webkit.org/show_bug.cgi?id=164980
3209
3210         Reviewed by Chris Dumez.
3211
3212         WebPage::eventThrottlingDelay() uses a latency estimate based on the round-trip time from the UI process
3213         to affect behavior, including whether scroll events are fired. This also affects the FrameView "scrolledByUser"
3214         flag that impacts tile coverage.
3215
3216         During testing, latency falling above or below the 16ms threshold could affect behavior. Fix by forcing
3217         WebPage into "responsive" mode while running tests, via InjectedBundlePage::prepare().
3218
3219         Add a nullable internals property so that a test can specify responsive, unresponsive or default behavior.
3220
3221         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3222         (WKBundlePageSetEventThrottlingBehaviorOverride):
3223         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
3224         * WebProcess/WebPage/ios/WebPageIOS.mm:
3225         (WebKit::WebPage::eventThrottlingDelay):
3226
3227 2016-11-18  Simon Fraser  <simon.fraser@apple.com>
3228
3229         Remove use of std::chrono in WebPage and entrained code
3230         https://bugs.webkit.org/show_bug.cgi?id=164967
3231
3232         Reviewed by Tim Horton.
3233
3234         Replace std::chrono with Seconds and Monotonic Time.
3235
3236         Use more C++11 initialization for WebPage data members.
3237
3238         * Shared/VisibleContentRectUpdateInfo.cpp:
3239         (WebKit::operator<<):
3240         * Shared/VisibleContentRectUpdateInfo.h:
3241         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
3242         (WebKit::VisibleContentRectUpdateInfo::timestamp):
3243         * Shared/WebCoreArgumentCoders.cpp:
3244         (IPC::ArgumentCoder<MonotonicTime>::encode):
3245         (IPC::ArgumentCoder<MonotonicTime>::decode):
3246         (IPC::ArgumentCoder<Seconds>::encode):
3247         (IPC::ArgumentCoder<Seconds>::decode):
3248         * Shared/WebCoreArgumentCoders.h:
3249         * UIProcess/ios/WKContentView.mm:
3250         (WebKit::HistoricalVelocityData::HistoricalVelocityData):
3251         (WebKit::HistoricalVelocityData::velocityForNewData):
3252         (WebKit::HistoricalVelocityData::append):
3253         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
3254         * WebProcess/WebCoreSupport/WebChromeClient.h:
3255         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
3256         (WebKit::WebChromeClient::eventThrottlingDelay):
3257         * WebProcess/WebPage/ViewUpdateDispatcher.h:
3258         * WebProcess/WebPage/WebPage.cpp:
3259         (WebKit::WebPage::WebPage):
3260         (WebKit::m_userActivityHysteresis):
3261         (WebKit::WebPage::didFlushLayerTreeAtTime):
3262         (WebKit::WebPage::didCommitLoad):
3263         * WebProcess/WebPage/WebPage.h:
3264         * WebProcess/WebPage/ios/WebPageIOS.mm:
3265         (WebKit::WebPage::eventThrottlingDelay):
3266         (WebKit::WebPage::updateVisibleContentRects):
3267         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3268         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3269
3270 2016-11-18  Dean Jackson  <dino@apple.com>
3271
3272         AX: "(inverted-colors)" media query only matches on page reload; should match on change
3273         https://bugs.webkit.org/show_bug.cgi?id=163564
3274         <rdar://problem/28807350>
3275
3276         Reviewed by Simon Fraser.
3277
3278         Listen for the appropriate notifications that accessibility settings
3279         have changed. This is a single notification on macOS, which uses WebViewImpl,
3280         and more fine-grained notifications on iOS, using WKWebView.
3281
3282         When we see the notification, send a message to the WebProcess which will
3283         then tell the WebCore::Page.
3284
3285         * UIProcess/API/Cocoa/WKWebView.mm:
3286         (-[WKWebView _initializeWithConfiguration:]):
3287         (-[WKWebView _accessibilitySettingsDidChange:]):
3288         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3289         * UIProcess/Cocoa/WebViewImpl.h:
3290         * UIProcess/Cocoa/WebViewImpl.mm:
3291         (-[WKAccessibilitySettingsObserver initWithImpl:]):
3292         (-[WKAccessibilitySettingsObserver dealloc]):
3293         (-[WKAccessibilitySettingsObserver _settingsDidChange:]):
3294         (WebKit::WebViewImpl::WebViewImpl):
3295         (WebKit::WebViewImpl::accessibilitySettingsDidChange):
3296         * UIProcess/WebPageProxy.cpp:
3297         (WebKit::WebPageProxy::accessibilitySettingsDidChange):
3298         * UIProcess/WebPageProxy.h:
3299         * WebProcess/WebPage/WebPage.cpp:
3300         (WebKit::WebPage::accessibilitySettingsDidChange):
3301         * WebProcess/WebPage/WebPage.h:
3302         * WebProcess/WebPage/WebPage.messages.in:
3303
3304 2016-11-18  Jeremy Jones  <jeremyj@apple.com>
3305
3306         USE WK_MAC_TBA for version number in _webViewRequestPointerLock:(WKWebView *)webView WK_API_AVAILABLE(macosx(10.12))
3307         https://bugs.webkit.org/show_bug.cgi?id=164962
3308
3309         Reviewed by Dean Jackson.
3310
3311         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3312
3313 2016-11-18  Enrica Casucci  <enrica@apple.com>
3314
3315         Refactor drag and drop for WebKit2 to encode DragData message exchange.
3316         https://bugs.webkit.org/show_bug.cgi?id=164945
3317
3318         Reviewed by Tim Horton.
3319
3320         * Shared/WebCoreArgumentCoders.cpp:
3321         (IPC::ArgumentCoder<DragData>::encode):
3322         (IPC::ArgumentCoder<DragData>::decode):
3323         * Shared/WebCoreArgumentCoders.h:
3324         * UIProcess/WebPageProxy.cpp:
3325         (WebKit::WebPageProxy::performDragControllerAction):
3326         * WebProcess/WebCoreSupport/WebDragClient.cpp:
3327         (WebKit::WebDragClient::willPerformDragDestinationAction):
3328         (WebKit::WebDragClient::actionMaskForDrag):
3329         * WebProcess/WebCoreSupport/WebDragClient.h:
3330         * WebProcess/WebPage/WebPage.cpp:
3331         (WebKit::WebPage::performDragControllerAction):
3332         * WebProcess/WebPage/WebPage.h:
3333         * WebProcess/WebPage/WebPage.messages.in:
3334
3335 2016-11-18  Jeremy Jones  <jeremyj@apple.com>
3336
3337         Add runtime flag to enable pointer lock. Enable pointer lock feature for mac.
3338         https://bugs.webkit.org/show_bug.cgi?id=163801
3339
3340         Reviewed by Simon Fraser.
3341
3342         Add SPI to notify client of pointer lock and for client to allow or deny.
3343         Unlock pointer when view is not longer active.
3344
3345         * Configurations/FeatureDefines.xcconfig:
3346         * Shared/WebPreferencesDefinitions.h:
3347         * UIProcess/API/APIUIClient.h:
3348         (API::UIClient::requestPointerLock):
3349         (API::UIClient::didLosePointerLock):
3350         * UIProcess/API/C/WKPage.cpp:
3351         (WKPageSetPageUIClient):
3352         (WKPageDidAllowPointerLock):
3353         (WKPageDidDenyPointerLock):
3354         * UIProcess/API/C/WKPagePrivate.h:
3355         * UIProcess/API/C/WKPageUIClient.h:
3356         * UIProcess/API/C/WKPreferences.cpp:
3357         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3358         * UIProcess/Cocoa/UIDelegate.h:
3359         * UIProcess/Cocoa/UIDelegate.mm:
3360         (WebKit::UIDelegate::setDelegate):
3361         (WebKit::UIDelegate::UIClient::requestPointerLock):
3362         (WebKit::UIDelegate::UIClient::didLosePointerLock):
3363         * UIProcess/WebPageProxy.cpp:
3364         (WebKit::WebPageProxy::dispatchActivityStateChange):
3365         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3366         (WebKit::WebPageProxy::requestPointerLock):
3367         (WebKit::WebPageProxy::didAllowPointerLock):
3368         (WebKit::WebPageProxy::didDenyPointerLock):
3369         (WebKit::WebPageProxy::requestPointerUnlock):
3370         * UIProcess/WebPageProxy.h:
3371         * WebProcess/WebPage/WebPage.cpp:
3372         (WebKit::WebPage::updatePreferences):
3373
3374 2016-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3375
3376         Downloads started by context menu actions should also have a web view associated
3377         https://bugs.webkit.org/show_bug.cgi?id=164364
3378
3379         Reviewed by Michael Catanzaro.
3380
3381         When a request is converted to a download WebPageProxy calls handleDownloadRequest() and clients handle that to
3382         associate the web view to the download. When a download is started by a context menu action, WebPageProxy calls
3383         WebProcessPool::download() with this as initiatingPage parameter, but clients are not notified in this case.
3384
3385         * UIProcess/API/gtk/WebKitDownload.cpp:
3386         (webkitDownloadCreateForRequest): Deleted.
3387         * UIProcess/API/gtk/WebKitDownloadPrivate.h:
3388         * UIProcess/API/gtk/WebKitWebContext.cpp:
3389         (webkitWebContextStartDownload): Use webkitWebContextGetOrCreateDownload() after WebProcessPool::download()
3390         because the WebKitDownload could have already been created by the web view download handler at this point.
3391         * UIProcess/API/gtk/WebKitWebView.cpp:
3392         (webkit_web_view_download_uri): We no longer need to associate the web view to the download here.
3393         * UIProcess/WebProcessPool.cpp:
3394         (WebKit::WebProcessPool::download): If an initiatingPage has been passed, call handleDownloadRequest() to notify
3395         the page client.
3396
3397 2016-11-17  Alex Christensen  <achristensen@webkit.org>
3398
3399         REGRESSION: API test _WKDownload.ConvertResponseToDownload is a flaky timeout
3400         https://bugs.webkit.org/show_bug.cgi?id=164631
3401
3402         Reviewed by Carlos Garcia Campos.
3403
3404         * NetworkProcess/NetworkResourceLoader.cpp:
3405         (WebKit::NetworkResourceLoader::convertToDownload):
3406         I could reproduce the flaky failure 100% of the time when not using NETWORK_SESSION
3407         by adding a usleep(1000000) in NetworkResourceLoader::convertToDownload.  m_networkLoad
3408         was not being set to nullptr before it was being checked in NetworkResourceLoader::abort
3409
3410 2016-11-17  Alex Christensen  <achristensen@webkit.org>
3411
3412         Fix CMake build after r208865
3413         https://bugs.webkit.org/show_bug.cgi?id=164894
3414
3415         * PlatformMac.cmake:
3416         Add new files.
3417
3418 2016-11-17  Ryosuke Niwa  <rniwa@webkit.org>
3419
3420         WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled should keep text replacement enabled
3421         https://bugs.webkit.org/show_bug.cgi?id=164857
3422         <rdar://problem/27721742>
3423
3424         Reviewed by Wenson Hsieh.
3425
3426         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3427         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementSpellcheckEnabled):
3428
3429 2016-11-17  John Wilander  <wilander@apple.com>
3430
3431         Resource load statistics: Cover further data records, count removed data records, and only fire handler when needed
3432         https://bugs.webkit.org/show_bug.cgi?id=164659
3433
3434         Reviewed by Andy Estes.
3435
3436         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3437         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
3438             Consistent naming with 'remove' rather than 'delete'.
3439             Now removes localStorage, IndexDB, disk cache, and memory cache too.
3440             Updates statistics with number of times it has removed data records.
3441         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
3442             No longer checks whether it has enough data since the classification rules
3443             are absolute, not relative.
3444         (WebKit::WebResourceLoadStatisticsStore::clearDataRecords): Deleted.
3445         * UIProcess/WebResourceLoadStatisticsStore.h:
3446             Consistent naming with 'remove' rather than 'delete'.
3447
3448 2016-11-17  Brady Eidson  <beidson@apple.com>
3449
3450         Add _WKIconLoadingDelegate SPI.
3451         https://bugs.webkit.org/show_bug.cgi?id=164894
3452
3453         Reviewed by Alex Christensen.
3454
3455         With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.
3456
3457         WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.
3458
3459         For icons the app decides to load, WebKit will pass the data to the app without storing locally.
3460
3461         * UIProcess/API/APIIconLoadingClient.h: Copied from Source/WebCore/html/LinkIconCollector.h.
3462         (API::IconLoadingClient::~IconLoadingClient):
3463         (API::IconLoadingClient::getLoadDecisionForIcon):
3464
3465         * UIProcess/API/Cocoa/WKWebView.mm:
3466         (-[WKWebView _initializeWithConfiguration:]):
3467         (-[WKWebView _iconLoadingDelegate]):
3468         (-[WKWebView _setIconLoadingDelegate:]):
3469         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3470
3471         * UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
3472
3473         * UIProcess/API/Cocoa/_WKLinkIconParameters.h: Copied from Source/WebCore/html/LinkIconCollector.h.
3474         * UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Copied from Source/WebCore/html/LinkIconCollector.h.
3475         (-[_WKLinkIconParameters _initWithLinkIcon:]):
3476         (-[_WKLinkIconParameters url]):
3477         (-[_WKLinkIconParameters mimeType]):
3478         (-[_WKLinkIconParameters size]):
3479         (-[_WKLinkIconParameters iconType]):
3480         * UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Copied from Source/WebCore/html/LinkIconCollector.h.
3481
3482         * UIProcess/Cocoa/IconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
3483         * UIProcess/Cocoa/IconLoadingDelegate.mm: Added.
3484         (WebKit::IconLoadingDelegate::IconLoadingDelegate):
3485         (WebKit::IconLoadingDelegate::~IconLoadingDelegate):
3486         (WebKit::IconLoadingDelegate::createIconLoadingClient):
3487         (WebKit::IconLoadingDelegate::delegate):
3488         (WebKit::IconLoadingDelegate::setDelegate):
3489         (WebKit::IconLoadingDelegate::IconLoadingClient::IconLoadingClient):
3490         (WebKit::IconLoadingDelegate::IconLoadingClient::~IconLoadingClient):
3491         (WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):
3492
3493         * UIProcess/WebPageProxy.cpp:
3494         (WebKit::WebPageProxy::setIconLoadingClient):
3495         (WebKit::WebPageProxy::getLoadDecisionForIcon):
3496         (WebKit::WebPageProxy::finishedLoadingIcon):
3497         * UIProcess/WebPageProxy.h:
3498         (WebKit::WebPageProxy::iconLoadingClient):
3499         * UIProcess/WebPageProxy.messages.in:
3500
3501         * WebKit2.xcodeproj/project.pbxproj:
3502
3503         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3504         (WebKit::WebFrameLoaderClient::useIconLoadingClient):
3505         (WebKit::WebFrameLoaderClient::getLoadDecisionForIcon):
3506         (WebKit::WebFrameLoaderClient::finishedLoadingIcon):
3507         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3508         (WebKit::WebFrameLoaderClient::setUseIconLoadingClient):
3509
3510         * WebProcess/WebPage/WebPage.cpp:
3511         (WebKit::WebPage::didGetLoadDecisionForIcon):
3512         (WebKit::WebPage::setUseIconLoadingClient):
3513         * WebProcess/WebPage/WebPage.h:
3514         * WebProcess/WebPage/WebPage.messages.in:
3515
3516 2016-11-17  Saam Barati  <sbarati@apple.com>
3517
3518         Remove async/await compile time flag and enable tests
3519         https://bugs.webkit.org/show_bug.cgi?id=164828
3520         <rdar://problem/28639334>
3521
3522         Reviewed by Yusuke Suzuki.
3523
3524         * Configurations/FeatureDefines.xcconfig:
3525
3526 2016-11-17  Yusuke Suzuki  <utatane.tea@gmail.com>
3527
3528         [JSC] WTF::TemporaryChange with WTF::SetForScope
3529         https://bugs.webkit.org/show_bug.cgi?id=164761
3530
3531         Reviewed by Saam Barati.
3532
3533         * PluginProcess/PluginControllerProxy.cpp:
3534         (WebKit::PluginControllerProxy::initialize):
3535         * PluginProcess/WebProcessConnection.cpp:
3536         (WebKit::WebProcessConnection::didReceiveMessage):
3537         (WebKit::WebProcessConnection::didReceiveSyncMessage):
3538         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3539         (createEncodedObject):
3540         (decodeObject):
3541         * UIProcess/API/Cocoa/WKWebView.mm:
3542         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
3543         * UIProcess/Cocoa/WebViewImpl.mm:
3544         (WebKit::WebViewImpl::updateTextTouchBar):
3545         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
3546         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
3547         * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
3548         (WebKit::WebPasteboardProxy::writeToClipboard):
3549         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
3550         (WebKit::CompositingCoordinator::flushPendingLayerChanges):
3551         (WebKit::CompositingCoordinator::purgeBackingStores):
3552         * WebProcess/WebPage/WebPage.cpp:
3553         (WebKit::WebPage::mouseEvent):
3554         (WebKit::WebPage::keyEvent):
3555         (WebKit::WebPage::dispatchTouchEvent):
3556         (WebKit::WebPage::setInitialFocus):
3557         (WebKit::WebPage::insertTextAsync):
3558         * WebProcess/WebPage/ios/WebPageIOS.mm:
3559         (WebKit::WebPage::dynamicViewportSizeUpdate):
3560         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
3561         * WebProcess/WebPage/mac/WebPageMac.mm:
3562
3563 2016-11-16  Brent Fulgham  <bfulgham@apple.com>
3564
3565         Unreviewed build fix after r208589
3566
3567         The generated com.apple.WebKit.plugin-common.sb file was not getting copied into
3568         the Resources folder, so was not deployed with WebKit. We need to treat it like
3569         com.apple.WebProcess.sb and the other generated files.
3570
3571         * WebKit2.xcodeproj/project.pbxproj: Tell Xcode to include the generated file in
3572         the framework Resources.
3573
3574 2016-11-16  Yusuke Suzuki  <utatane.tea@gmail.com>
3575
3576         [ES6][WebCore] Change ES6_MODULES compile time flag to runtime flag
3577         https://bugs.webkit.org/show_bug.cgi?id=164827
3578
3579         Reviewed by Ryosuke Niwa.
3580
3581         * Configurations/FeatureDefines.xcconfig:
3582         * Shared/WebPreferencesDefinitions.h:
3583         Annotated ES6 Modules option with DEFAULT_EXPERIMENTAL_FEATURES_ENABLED.
3584         * UIProcess/API/C/WKPreferences.cpp:
3585         (WKPreferencesSetES6ModulesEnabled):
3586         (WKPreferencesGetES6ModulesEnabled):
3587         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3588         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3589         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3590         * WebProcess/WebPage/WebPage.cpp:
3591         (WebKit::WebPage::updatePreferences):
3592
3593 2016-11-16  Simon Fraser  <simon.fraser@apple.com>
3594
3595         Add logging support to VisibleContentRectUpdateInfo
3596         https://bugs.webkit.org/show_bug.cgi?id=164825
3597
3598         Reviewed by Zalan Bujtas.
3599
3600         Add TextStream output to VisibleContentRectUpdateInfo. Just piping it into a logging
3601         stream does single-line output, so also make a convenience dump() function that will
3602         product multiline output. Result look like:
3603
3604             (VisibleContentRectUpdateInfo
3605               (lastLayerTreeTransactionID 54)
3606               (exposedContentRect (523.44,1258.63) width=676.20 height=901.60)
3607               (unobscuredContentRect (523.44,1293.41) width=676.20 height=866.82)
3608               (unobscuredRectInScrollViewCoordinates (0,39.50) width=768 height=984.50)
3609               (customFixedPositionRect (219.64,935) width=980 height=1225)
3610               (obscuredInset width=0 height=39.50)
3611               (scale 1.14)
3612               (inStableState 0)
3613               (timestamp 736446.61)
3614               (verticalVelocity -11.36))
3615
3616         * Shared/VisibleContentRectUpdateInfo.cpp:
3617         (WebKit::VisibleContentRectUpdateInfo::dump):
3618         (WebKit::operator<<):
3619         * Shared/VisibleContentRectUpdateInfo.h:
3620         * UIProcess/ios/WKContentView.mm:
3621         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
3622
3623 2016-11-15  Simon Fraser  <simon.fraser@apple.com>
3624
3625         [iOS WK2] Scroll view scrolling and zooming animations can keep running across page loads
3626         https://bugs.webkit.org/show_bug.cgi?id=164810
3627
3628         Reviewed by Tim Horton.
3629         
3630         Scrolling and zooming animations can leak across page loads, which makes tests flakey,
3631         and is unexpected by users.
3632
3633         Tested by scrollingcoordinator/ios/sync-layer-positions-after-scroll.html followed by
3634         scrollingcoordinator/ios/ui-scrolling-tree.html
3635
3636         * UIProcess/API/Cocoa/WKWebView.mm:
3637         (-[WKWebView _didCommitLoadForMainFrame]):
3638
3639 2016-11-15  Jon Lee  <jonlee@apple.com>
3640
3641         Report active video and audio capture devices separately
3642         https://bugs.webkit.org/show_bug.cgi?id=164769
3643
3644         Reviewed by Eric Carlson.
3645
3646         Replace kWKMediaHasActiveCaptureDevice with kWKMediaHasActiveAudioCaptureDevice and
3647         kWKMediaHasActiveVideoCaptureDevice
3648
3649         * UIProcess/API/C/WKPage.cpp:
3650         (WKPageGetMediaState):
3651         * UIProcess/API/C/WKPagePrivate.h:
3652         * UIProcess/WebPageProxy.cpp:
3653         (WebKit::WebPageProxy::isPlayingMediaDidChange): Update the mask to include the two
3654         bits.
3655
3656 2016-11-14  Simon Fraser  <simon.fraser@apple.com>
3657
3658         [iOS WK2] Implement support for visual viewports
3659         https://bugs.webkit.org/show_bug.cgi?id=164765
3660
3661         Reviewed by Tim Horton.
3662
3663         Adopt the visual viewport scrolling model in iOS WK2.
3664
3665         Pass the parameters used for computing the layout viewport up to WK2 via RemoteLayerTreeTransaction.
3666         These are stored on WebPageProxy. When they change, _didCommitLayerTree triggers a -_updateVisibleContentRects.
3667         
3668         WebPageProxy::computeCustomFixedPositionRect() is the function that computes the "override" layout viewport.
3669         It starts with the baseLayoutViewportSize from the web process (which is based on the initial containing block
3670         size), then ensures that it's no smaller than the unobscured content rect, since it makes no sense for the
3671         layout viewport to be smaller than the visual viewport. The static FrameView::computeLayoutViewportOrigin()
3672         is then use to "push" the layout viewport around as the visual viewport changes.
3673
3674         * Shared/VisibleContentRectUpdateInfo.h:
3675         * Shared/WebCoreArgumentCoders.cpp: Encode LayoutSize and LayoutPoint.
3676         (IPC::ArgumentCoder<LayoutSize>::encode):
3677         (IPC::ArgumentCoder<LayoutSize>::decode):
3678         (IPC::ArgumentCoder<LayoutPoint>::encode):
3679         (IPC::ArgumentCoder<LayoutPoint>::decode):
3680         * Shared/WebCoreArgumentCoders.h:
3681         * Shared/mac/RemoteLayerTreeTransaction.h:
3682         (WebKit::RemoteLayerTreeTransaction::baseLayoutViewportSize):
3683         (WebKit::RemoteLayerTreeTransaction::setBaseLayoutViewportSize):
3684         (WebKit::RemoteLayerTreeTransaction::minStableLayoutViewportOrigin):
3685         (WebKit::RemoteLayerTreeTransaction::setMinStableLayoutViewportOrigin):
3686         (WebKit::RemoteLayerTreeTransaction::maxStableLayoutViewportOrigin):
3687         (WebKit::RemoteLayerTreeTransaction::setMaxStableLayoutViewportOrigin):
3688         * Shared/mac/RemoteLayerTreeTransaction.mm:
3689         (WebKit::RemoteLayerTreeTransaction::encode):
3690         (WebKit::RemoteLayerTreeTransaction::decode):
3691         (WebKit::RemoteLayerTreeTransaction::description):
3692         * UIProcess/API/Cocoa/WKWebView.mm:
3693         (-[WKWebView _didCommitLayerTree:]):
3694         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
3695         (WebKit::RemoteScrollingCoordinatorProxy::visualViewportEnabled): Accessor.
3696         * UIProcess/WebPageProxy.h:
3697         (WebKit::WebPageProxy::customFixedPositionRect):
3698         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
3699         (WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):
3700         * UIProcess/ios/WKContentView.mm:
3701         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
3702         (-[WKContentView _didCommitLayerTree:]):
3703         * UIProcess/ios/WebPageProxyIOS.mm:
3704         (WebKit::WebPageProxy::computeCustomFixedPositionRect): When visual viewports are enabled, compute
3705         the layout viewport rect, taking the baseLayoutViewportSize and the current unobscured rect into account.
3706         (WebKit::WebPageProxy::updateLayoutViewportParameters):
3707         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3708         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3709         * WebProcess/WebPage/WebPage.cpp: Encode in the transaction the layout viewport parameters (with minor refactor).
3710         (WebKit::WebPage::willCommitLayerTree):
3711         * WebProcess/WebPage/ios/WebPageIOS.mm:
3712         (WebKit::WebPage::updateVisibleContentRects): This is where the web process receives the new override layout viewport
3713         from the web process (with some logging).
3714
3715 2016-11-15  Jon Lee  <jonlee@apple.com>
3716
3717         Remove HasMediaCaptureDevice
3718         https://bugs.webkit.org/show_bug.cgi?id=164767
3719         <rdar://problem/29263696>
3720
3721         Reviewed by Eric Carlson.
3722
3723         * UIProcess/API/C/WKPage.cpp: Remove kWKMediaHasCaptureDevice.
3724         (WKPageGetMediaState):
3725         * UIProcess/API/C/WKPagePrivate.h:
3726
3727 2016-11-15  Daniel Bates  <dabates@apple.com>
3728
3729         Disallow loads using HTTP 0.9 at the ResourceHandle/NetworkDataTask level
3730         https://bugs.webkit.org/show_bug.cgi?id=164662
3731         <rdar://problem/29268514>
3732
3733         Reviewed by Alex Christensen and Brady Eidson.
3734
3735         Make changes to NetworkDataTask similar to the changes made to ResourceHandle so as to
3736         disallow non-default port HTTP 0.9 loads when using the ENABLE(NETWORK_SESSION) networking
3737         code path in WebKit2.
3738
3739         * NetworkProcess/NetworkDataTask.cpp:
3740         (WebKit::NetworkDataTask::didReceiveResponse): Added. Fail the load if it is using HTTP 0.9.
3741         Otherwise notify the client that we received a response.
3742         * NetworkProcess/NetworkDataTask.h:
3743         * NetworkProcess/NetworkDataTaskBlob.cpp:
3744         (WebKit::NetworkDataTaskBlob::resume): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
3745         as the latter has been renamed to the former.
3746         (WebKit::NetworkDataTaskBlob::getSizeForNext): Ditto.
3747         (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse): Renamed from didReceiveResponse().
3748         * NetworkProcess/NetworkDataTaskBlob.h:
3749         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
3750         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3751         (WebKit::NetworkDataTaskCocoa::didReceiveResponse): Deleted.
3752         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3753         (WebKit::NetworkDataTaskSoup::didSendRequest): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
3754         as the latter has been renamed to the former.
3755         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse): Renamed from didReceiveResponse(). Also
3756         remove the local variable response and inline its value into the call to ResourceHandle::didReceiveResponse()
3757         as this variable is used exactly once in this function and its name does not describe its purpose any more
3758         than its value.
3759         (WebKit::NetworkDataTaskSoup::didRequestNextPart): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
3760         as the latter has been renamed to the former.
3761         * NetworkProcess/soup/NetworkDataTaskSoup.h:
3762
3763 2016-11-14  Alex Christensen  <achristensen@webkit.org>
3764
3765         Move SecurityOrigin::createFromDatabaseIdentifier to SecurityOriginData
3766         https://bugs.webkit.org/show_bug.cgi?id=164720
3767
3768         Reviewed by Brady Eidson.
3769
3770         * DatabaseProcess/DatabaseProcess.cpp:
3771         (WebKit::DatabaseProcess::indexedDatabaseOrigins):
3772         * DatabaseProcess/DatabaseProcess.h:
3773         * NetworkProcess/NetworkProcess.cpp:
3774         (WebKit::fetchDiskCacheEntries):
3775         * Shared/API/c/WKSecurityOriginRef.cpp:
3776         (WKSecurityOriginCreateFromDatabaseIdentifier):
3777         * Shared/WebsiteData/WebsiteData.cpp:
3778         (WebKit::WebsiteData::Entry::encode):
3779         (WebKit::WebsiteData::Entry::decode):
3780         * Shared/WebsiteData/WebsiteData.h:
3781         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
3782         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
3783         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
3784         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
3785         (WebKit::LocalStorageDatabaseTracker::origins):
3786         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3787         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
3788         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
3789         * UIProcess/WebPageProxy.cpp:
3790         (WebKit::WebPageProxy::exceededDatabaseQuota):
3791         (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
3792         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
3793         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3794         (WebKit::WebsiteDataStore::fetchData):
3795         (WebKit::WebsiteDataStore::removeData):
3796         (WebKit::WebsiteDataStore::mediaKeyOrigins):
3797         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3798         (WKBundleSetDatabaseQuota):
3799         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
3800         (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
3801         * WebProcess/Storage/StorageAreaImpl.cpp:
3802         (WebKit::StorageAreaImpl::create):
3803         (WebKit::StorageAreaImpl::StorageAreaImpl):
3804         (WebKit::StorageAreaImpl::securityOrigin):
3805         * WebProcess/Storage/StorageAreaImpl.h:
3806         * WebProcess/Storage/StorageAreaMap.cpp:
3807         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
3808         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
3809         * WebProcess/Storage/StorageAreaMap.h:
3810         (WebKit::StorageAreaMap::securityOrigin):
3811         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3812         (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
3813         (WebKit::StorageNamespaceImpl::storageArea):
3814         * WebProcess/Storage/StorageNamespaceImpl.h:
3815         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3816         (WebKit::WebChromeClient::exceededDatabaseQuota):
3817         * WebProcess/WebProcess.cpp:
3818         (WebKit::WebProcess::fetchWebsiteData):
3819
3820 2016-11-14  Brent Fulgham  <bfulgham@apple.com>
3821
3822         [Mac][iOS][WK2] Tighten permissions to change CapsLock delay
3823         https://bugs.webkit.org/show_bug.cgi?id=164725
3824         <rdar://problem/28970910>
3825
3826         Reviewed by Alexey Proskuryakov.
3827
3828         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: Limit access
3829         to the IOKit connection that actually needs it.
3830
3831 2016-11-14  Brent Fulgham  <bfulgham@apple.com>
3832
3833         Unreviewed sandbox fix after r208702
3834
3835         Correct version check to avoid breaking users in Safari Technology Preview
3836         or WebKit nightlies.
3837
3838         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
3839         * WebProcess/com.apple.WebProcess.sb.in:
3840
3841 2016-11-14  Pranjal Jumde  <pjumde@apple.com>
3842
3843         Keychain access in WebKit should be limited to a single process. Earlier this was blocked on the networking framework requiring direct access to keychain, this will be resolved in the upcoming version of macOS.
3844         https://bugs.webkit.org/show_bug.cgi?id=163710
3845         <rdar://problem/24357468>
3846
3847         Reviewed by Darin Adler.
3848
3849         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
3850         * WebProcess/com.apple.WebProcess.sb.in:
3851
3852 2016-11-13  Darin Adler  <darin@apple.com>
3853
3854         Remove many includes of ExceptionCode.h
3855         https://bugs.webkit.org/show_bug.cgi?id=164706
3856
3857         Reviewed by Alex Christensen.
3858
3859         * WebProcess/Storage/StorageAreaImpl.cpp: Removed include of ExceptionCode.h.
3860
3861 2016-11-13  Darin Adler  <darin@apple.com>
3862
3863         Fix exception handling in SQL database code, streamline and update code
3864         https://bugs.webkit.org/show_bug.cgi?id=164685
3865
3866         Reviewed by Sam Weinig.
3867
3868         * UIProcess/API/efl/ewk_database_manager.cpp:
3869         (EwkDatabaseManager::getDatabaseOrigins): Update for change to the
3870         DatabaseTracker::origins function.
3871         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3872         (WebKit::WebsiteDataStore::fetchData): Use DatabaseTracker.
3873         (WebKit::WebsiteDataStore::removeData): Ditto.
3874         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3875         (WKBundleSetDatabaseQuota): Ditto.
3876         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3877         (WebKit::WebChromeClient::exceededDatabaseQuota): Ditto.
3878         * WebProcess/WebProcess.cpp:
3879         (WebKit::WebProcess::processWillSuspendImminently): Ditto.
3880
3881 2016-11-12  Simon Fraser  <simon.fraser@apple.com>
3882
3883         Add a way to get the UI-side scrolling tree as text via UIScriptController
3884         https://bugs.webkit.org/show_bug.cgi?id=164697
3885
3886         Reviewed by Zalan Bujtas.
3887
3888         Add a property to WKWebView to retrieve the scrolling tree as text, for testing.
3889         Expose it via the RemoteScrollingCoordinatorProxy.
3890
3891         * UIProcess/API/Cocoa/WKWebView.mm:
3892         (-[WKWebView _scrollingTreeAsText]):
3893         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3894         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
3895         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeAsText):
3896         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
3897
3898 2016-11-12  Daniel Bates  <dabates@apple.com>
3899
3900         Incorrect release log message emitted when waiting/not waiting for the WebProcess continue a load
3901         https://bugs.webkit.org/show_bug.cgi?id=164605
3902
3903         Reviewed by Darin Adler.
3904
3905         Currently we emit a release log message of the form "didReceiveResponse: Should wait for
3906         message from WebContent process ..." when we are not waiting for the WebProcess and emit
3907         a message of the form "didReceiveResponse: Should not wait for message from WebContent
3908         process" when we are waiting on the WebProcess. Invert these messages to reflect whether
3909         we are waiting for the WebProcess to send message NetworkResourceLoader::ContinueDidReceiveResponsewhether.
3910
3911         For the main resource NetworkResourceLoader::didReceiveResponse() returns ShouldContinueDidReceiveResponse::No
3912         because we are waiting for the WebProcess to send message NetworkResourceLoader::ContinueDidReceiveResponse
3913         to continue the load. For a subresource we do not need to wait for the WebProcess to allow the load to continue
3914         and hence NetworkResourceLoader::didReceiveResponse() returns ShouldContinueDidReceiveResponse::Yes.
3915
3916         * NetworkProcess/NetworkResourceLoader.cpp:
3917
3918 2016-11-12  Simon Fraser  <simon.fraser@apple.com>
3919
3920         [iOS WK2] Share some code with Mac for post-async-scroll state reconciliation
3921         https://bugs.webkit.org/show_bug.cgi?id=164694
3922
3923         Reviewed by Zalan Bujtas.
3924
3925         Rather than calling FrameView directly, call reconcileScrollingState() on the scrolling
3926         coordinator.
3927
3928         * WebProcess/WebPage/ios/WebPageIOS.mm:
3929         (WebKit::WebPage::updateVisibleContentRects):
3930
3931 2016-11-12  Brian Burg  <bburg@apple.com>
3932
3933         Web Automation: terminate the automation session if the web process crashes
3934         https://bugs.webkit.org/show_bug.cgi?id=164671
3935         <rdar://problem/29028964>
3936
3937         Reviewed by Joseph Pecoraro.
3938
3939         * UIProcess/Automation/WebAutomationSession.h:
3940         * UIProcess/Automation/WebAutomationSession.cpp:
3941         (WebKit::WebAutomationSession::disconnect):
3942         (WebKit::WebAutomationSession::terminate):
3943         Factor out code that disconnects the remote, unpairs, and notifies the client.
3944         Then, expose terminate() which can be called without a FrontendChannel.
3945         Calling this causes the _WKAutomationDelegate to clear the local-side session in the
3946         browser, and disconnecting from the remote will hang up the remote-side session.
3947
3948         * UIProcess/WebPageProxy.cpp:
3949         (WebKit::WebPageProxy::processDidCrash):
3950         Terminate the session.
3951
3952 2016-11-11  Alex Christensen  <achristensen@webkit.org>
3953
3954         Use SecurityOriginData as keys in StorageManager
3955         https://bugs.webkit.org/show_bug.cgi?id=159834
3956         <rdar://problem/27346948>
3957
3958         Reviewed by Brady Eidson.
3959
3960         * Platform/IPC/HandleMessage.h:
3961         (IPC::callMemberFunctionImpl):
3962         Add a missing std::forward so we can use this callMemberFunctionImpl with rvalues.
3963         * UIProcess/API/C/WKApplicationCacheManager.cpp:
3964         (WKApplicationCacheManagerGetApplicationCacheOrigins):
3965         (WKApplicationCacheManagerDeleteEntriesForOrigin):
3966         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
3967         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
3968         (WKKeyValueStorageManagerDeleteEntriesForOrigin):
3969         * UIProcess/API/C/WKResourceCacheManager.cpp:
3970         (WKResourceCacheManagerGetCacheOrigins):
3971         (WKResourceCacheManagerClearCacheForOrigin):
3972         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3973         (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]):
3974         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3975         (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
3976         * UIProcess/Databases/DatabaseProcessProxy.h:
3977         * UIProcess/Network/NetworkProcessProxy.cpp:
3978         (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
3979         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
3980         * UIProcess/Network/NetworkProcessProxy.h:
3981         * UIProcess/Storage/LocalStorageDatabase.cpp:
3982         (WebKit::LocalStorageDatabase::create):
3983         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
3984         (WebKit::LocalStorageDatabase::openDatabase):
3985         (WebKit::LocalStorageDatabase::close):
3986         * UIProcess/Storage/LocalStorageDatabase.h:
3987         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
3988         (WebKit::LocalStorageDatabaseTracker::databasePath):
3989         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
3990         (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
3991         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
3992         (WebKit::LocalStorageDatabaseTracker::origins):
3993         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
3994         * UIProcess/Storage/StorageManager.cpp:
3995         (WebKit::StorageManager::StorageArea::securityOrigin):
3996         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
3997         (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
3998         (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
3999         (WebKit::StorageManager::StorageArea::StorageArea):
4000         (WebKit::StorageManager::StorageArea::clone):
4001         (WebKit::StorageManager::StorageArea::items):
4002         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
4003         (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
4004         (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
4005         (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
4006         (WebKit::StorageManager::SessionStorageNamespace::origins):
4007         (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
4008         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
4009         (WebKit::StorageManager::getSessionStorageOrigins):
4010         (WebKit::StorageManager::deleteSessionStorageOrigins):
4011         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
4012         (WebKit::StorageManager::getLocalStorageOrigins):
4013         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
4014         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
4015         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
4016         (WebKit::StorageManager::createLocalStorageMap):
4017         (WebKit::StorageManager::createTransientLocalStorageMap):
4018         (WebKit::StorageManager::createSessionStorageMap):
4019         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
4020         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
4021         (WebKit::StorageManager::StorageArea::create): Deleted.
4022         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea): Deleted.
4023         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): Deleted.
4024         * UIProcess/Storage/StorageManager.h:
4025         * UIProcess/WebProcessProxy.cpp:
4026         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
4027         * UIProcess/WebProcessProxy.h:
4028         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
4029         (WebKit::WebsiteDataRecord::displayNameForOrigin):
4030         (WebKit::WebsiteDataRecord::add):
4031         * UIProcess/WebsiteData/WebsiteDataRecord.h:
4032         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
4033         (WebKit::WebsiteDataStore::fetchData):
4034         (WebKit::WebsiteDataStore::removeData):
4035         (WebKit::WebsiteDataStore::mediaKeyOrigins):
4036         (WebKit::WebsiteDataStore::removeMediaKeys):
4037         * UIProcess/WebsiteData/WebsiteDataStore.h: