1 2016-12-13 Alex Christensen <achristensen@webkit.org>
7 2016-12-13 Jer Noble <jer.noble@apple.com>
9 Fullscreen in WebKit2 does not restore topContentInset upon exiting; leaves top of page not visible
10 https://bugs.webkit.org/show_bug.cgi?id=165697
12 Delegate the values of topContentInset() from WebViewImpl (used by WKWebView and WKView) to the
13 WebPageProxy, so that setting the topContentInset() on WebPageProxy is reflected in the getters
14 for the two view classes.
16 Reviewed by Tim Horton.
18 * UIProcess/Cocoa/WebViewImpl.h:
19 (WebKit::WebViewImpl::topContentInset): Deleted.
20 * UIProcess/Cocoa/WebViewImpl.mm:
21 (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
22 (WebKit::WebViewImpl::topContentInset):
23 (WebKit::WebViewImpl::setTopContentInset):
24 (WebKit::WebViewImpl::dispatchSetTopContentInset):
25 * UIProcess/mac/WKFullScreenWindowController.mm:
26 (-[WKFullScreenWindowController enterFullScreen:]):
27 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
28 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
29 (-[WKFullScreenWindowController _saveTopContentInset]): Deleted.
30 (-[WKFullScreenWindowController _restoreTopContentInset]): Deleted.
32 2016-12-13 Brent Fulgham <bfulgham@apple.com>
34 [Mac][WK2] Tighten Keychain directory access
35 https://bugs.webkit.org/show_bug.cgi?id=165818
36 <rdar://problem/16863857>
38 Reviewed by Anders Carlsson.
40 Lock down Keychain directory access to just the file-read-data, file-read-metadata, and
41 file-write-data operations we actually need.
43 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
44 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
45 * WebProcess/com.apple.WebProcess.sb.in:
47 2016-12-13 Andy Estes <aestes@apple.com>
49 [Cocoa] Implement -shouldInsertText: on WKWebProcessPlugInEditingDelegate
50 https://bugs.webkit.org/show_bug.cgi?id=165785
51 <rdar://problem/26929398>
53 Reviewed by Darin Adler.
55 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h: Defined
56 WKEditorInsertAction and declared
57 -_webProcessPlugInBrowserContextController:shouldInsertText:replacingRange:givenAction:.
58 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
59 (toWK): Added. Mapped a WebCore::EditorInsertAction to a WKEditorInsertAction.
60 (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Implemented
61 EditorClient::shouldInsertText() by calling
62 -_webProcessPlugInBrowserContextController:shouldInsertText:replacingRange:givenAction: with
63 the text, wrapped range handle, and action. Added shouldInsertText to DelegateMethods and
64 initialized it according to whether the delegate responds to shouldInsertText:.
66 2016-12-13 Joseph Pecoraro <pecoraro@apple.com>
68 NSArray leaks seen in Safari, allocated under WKIconDatabaseTryCopyCGImageArrayForURL
69 https://bugs.webkit.org/show_bug.cgi?id=165809
71 Reviewed by Dan Bernstein.
73 * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
74 (WKIconDatabaseTryCopyCGImageArrayForURL):
75 Avoid an extra retain on already newly created array.
77 2016-12-13 Eric Carlson <eric.carlson@apple.com>
79 Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
80 https://bugs.webkit.org/show_bug.cgi?id=165251
82 Reviewed by Youenn Fablet.
84 * WebProcess/WebPage/WebPage.cpp:
85 (WebKit::WebPage::updatePreferences): Update the media stream and peer connection runtime
86 feature instead of the setting.
88 2016-12-13 Sergio Villar Senin <svillar@igalia.com>
90 Fix GTK build after r209733
91 https://bugs.webkit.org/show_bug.cgi?id=165794
93 Document::visibilityState() now returns an IDL string enumeration.
95 Reviewed by Žan Doberšek.
97 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
98 (webkit_dom_document_get_visibility_state):
100 2016-12-12 Dean Jackson <dino@apple.com>
102 [iOS] MediaDocument "Done" button should navigate the page back
103 https://bugs.webkit.org/show_bug.cgi?id=165779
105 Reviewed by Sam Weinig.
107 * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
108 * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
109 (WebKit::WebVideoFullscreenModelContext::requestFullscreenMode):
110 (WebKit::WebVideoFullscreenManagerProxy::requestFullscreenMode):
111 * WebProcess/cocoa/WebVideoFullscreenManager.h:
112 * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
113 * WebProcess/cocoa/WebVideoFullscreenManager.mm:
114 (WebKit::WebVideoFullscreenManager::requestFullscreenMode):
116 2016-12-12 Tim Horton <timothy_horton@apple.com>
118 Provide SPI to avoid blocking on painting when coming into view
119 https://bugs.webkit.org/show_bug.cgi?id=165780
120 <rdar://problem/29009559>
122 Reviewed by Simon Fraser.
124 By default, when parenting a WKWebView which was previously in-window,
125 we block on painting to ensure that we don't flash stale content.
126 We added SPI to disable this behavior to WKWebViewConfiguration, but
127 some clients might want the behavior most of the time, but sometimes
128 instead want to not block the UI process main thread, but instead do
129 their own work (e.g. removing a snapshot) when painting eventually occurs.
131 * UIProcess/API/Cocoa/WKWebView.mm:
132 (-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForPainting:]):
133 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
134 Tell WebPageProxy not to block on painting next time we are parented,
135 and use doAfterNextPresentationUpdate to call the block when the painting
136 does eventually happen. This SPI must be called before - but in the same
137 runloop cycle - the WKWebView is brought back in-window to work correctly.
139 * UIProcess/WebPageProxy.cpp:
140 (WebKit::WebPageProxy::dispatchActivityStateChange):
141 * UIProcess/WebPageProxy.h:
142 (WebKit::WebPageProxy::skipWaitingForPaintAfterNextViewDidMoveToWindow):
143 If we would block because we're coming in-window, but the bit to skip
144 blocking the next time we get brought in-window is set, reset the bit,
147 2016-12-12 Chris Dumez <cdumez@apple.com>
149 Document.visibilityState should use an IDL string enumeration
150 https://bugs.webkit.org/show_bug.cgi?id=165774
152 Reviewed by Daniel Bates.
154 * Shared/API/c/WKSharedAPICast.h:
155 (WebKit::toPageVisibilityState):
157 2016-12-11 Konstantin Tokarev <annulen@yandex.ru>
159 Unreviewed attempt to fix EFL and Mac/cmake builds after r209665.
160 https://bugs.webkit.org/show_bug.cgi?id=165686
162 * PlatformEfl.cmake: WebKit2 should precede other target so that right
163 config.h comes first in include path.
165 2016-12-11 Tim Horton <timothy_horton@apple.com>
167 Quarter-second stalls scrolling images that are links because of sync getPositionInformation
168 https://bugs.webkit.org/show_bug.cgi?id=165707
170 Reviewed by Simon Fraser.
172 * UIProcess/ios/WKContentViewInteraction.mm:
173 (-[WKContentView positionInformationForActionSheetAssistant:]):
174 (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
175 For now, synchronously block when presenting the action sheet if we
176 don't have a snapshot ready.
178 * WebProcess/WebPage/ios/WebPageIOS.mm:
179 (WebKit::WebPage::getPositionInformation):
180 Respect includeSnapshot in another place in getPositionInformation,
181 so that many getPositionInformations don't have to do extra snapshotting work.
183 2016-12-10 Filip Pizlo <fpizlo@apple.com>
185 The DOM should have an advancing wavefront opaque root barrier
186 https://bugs.webkit.org/show_bug.cgi?id=165712
188 Reviewed by Yusuke Suzuki.
190 Propagate the JSDOMWindowBase::commonVM() -> commonVM() change.
192 * Shared/linux/WebMemorySamplerLinux.cpp:
193 (WebKit::WebMemorySampler::sampleWebKit):
194 * Shared/mac/WebMemorySampler.mac.mm:
195 (WebKit::WebMemorySampler::sampleWebKit):
196 * WebProcess/InjectedBundle/InjectedBundle.cpp:
197 (WebKit::InjectedBundle::javaScriptObjectsCount):
198 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
199 (WebKit::JSNPObject::callMethod):
200 (WebKit::JSNPObject::callObject):
201 (WebKit::JSNPObject::callConstructor):
202 (WebKit::JSNPObject::put):
203 (WebKit::JSNPObject::deleteProperty):
204 (WebKit::JSNPObject::getOwnPropertyNames):
205 (WebKit::JSNPObject::propertyGetter):
206 * WebProcess/WebPage/WebPage.cpp:
207 (WebKit::WebPage::runJavaScriptInMainFrame):
208 (WebKit::WebPage::getBytecodeProfile):
209 (WebKit::WebPage::getSamplingProfilerOutput):
210 * WebProcess/WebProcess.cpp:
211 (WebKit::WebProcess::getWebCoreStatistics):
213 2016-12-11 Konstantin Tokarev <annulen@yandex.ru>
215 Unreviewed build fix for EFL after r209665
217 * UIProcess/efl/TextCheckerClientEfl.h:
219 2016-12-10 Konstantin Tokarev <annulen@yandex.ru>
221 [cmake] Include WTF, JSC, and WebCore headers automatically to targers using them
222 https://bugs.webkit.org/show_bug.cgi?id=165686
224 Reviewed by Michael Catanzaro.
226 This change reduces duplication of include path lists between modules,
227 and reduces future need for fixes like r209605 (broken build because of
228 WebCore header suddenly becoming used in WebKit2).
235 2016-12-10 Antti Koivisto <antti@apple.com>
237 CrashTracer: com.apple.WebKit.Networking at WTF::ThreadSafeRefCounted<WebKit::NetworkCache::IOChannel>::deref
238 https://bugs.webkit.org/show_bug.cgi?id=165659
239 <rdar://problem/27077977>
241 Reviewed by Darin Adler.
243 * NetworkProcess/cache/NetworkCacheIOChannel.h:
244 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
245 (WebKit::NetworkCache::IOChannel::~IOChannel):
247 Add non-inlined destructor and release assert against double deletion to narrow down this crash.
249 2016-12-09 Brent Fulgham <bfulgham@apple.com>
251 WebCore::Timer is not compatible with UIProcess
252 https://bugs.webkit.org/show_bug.cgi?id=165706
253 <rdar://problem/29360564>
255 Reviewed by Andy Estes.
257 Anders has explained to me (at least twice) that WebCore::Timer must not
258 be used in UIProcess code. A recent bug fix introduced a WebCore::Timer,
259 which led to another crash.
261 This patch switches from WebCore::Timer to WTF::RunLoop::Timer to avoid
264 * UIProcess/Cocoa/NavigationState.h:
265 * UIProcess/Cocoa/NavigationState.mm:
266 (WebKit::NavigationState::NavigationState):
268 2016-12-09 Eric Carlson <eric.carlson@apple.com>
270 Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
271 https://bugs.webkit.org/show_bug.cgi?id=165251
273 Reviewed by Dean Jackson.
275 Based on a patch by Dr Alex Gouaillard <agouaillard@gmail.com>
277 * Shared/WebPreferencesDefinitions.h: Add peerConnectionEnabled.
279 * UIProcess/API/C/WKPreferences.cpp:
280 (WKPreferencesSetPeerConnectionEnabled): Added.
281 (WKPreferencesGetPeerConnectionEnabled): Added.
282 * UIProcess/API/C/WKPreferencesRef.h:
284 * WebProcess/InjectedBundle/InjectedBundle.cpp:
285 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Add WebKitMediaStreamEnabled
286 and WebKitPeerConnectionEnabled.
288 * WebProcess/WebPage/WebPage.cpp:
289 (WebKit::WebPage::updatePreferences): Initialize the peerConnection preference.
291 2016-12-09 Brady Eidson <beidson@apple.com>
294 Add _WKIconLoadingDelegate SPI.
295 https://bugs.webkit.org/show_bug.cgi?id=164894
297 Reviewed by Alex Christensen.
299 With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.
301 WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.
303 For icons the app decides to load, WebKit will pass the data to the app without storing locally.
305 * UIProcess/API/APIIconLoadingClient.h: Copied from Source/WebCore/html/LinkIconCollector.h.
306 (API::IconLoadingClient::~IconLoadingClient):
307 (API::IconLoadingClient::getLoadDecisionForIcon):
309 * UIProcess/API/Cocoa/WKWebView.mm:
310 (-[WKWebView _initializeWithConfiguration:]):
311 (-[WKWebView _iconLoadingDelegate]):
312 (-[WKWebView _setIconLoadingDelegate:]):
313 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
315 * UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
317 * UIProcess/API/Cocoa/_WKLinkIconParameters.h: Copied from Source/WebCore/html/LinkIconCollector.h.
318 * UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Copied from Source/WebCore/html/LinkIconCollector.h.
319 (-[_WKLinkIconParameters _initWithLinkIcon:]):
320 (-[_WKLinkIconParameters url]):
321 (-[_WKLinkIconParameters mimeType]):
322 (-[_WKLinkIconParameters size]):
323 (-[_WKLinkIconParameters iconType]):
324 * UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Copied from Source/WebCore/html/LinkIconCollector.h.
326 * UIProcess/Cocoa/IconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
327 * UIProcess/Cocoa/IconLoadingDelegate.mm: Added.
328 (WebKit::IconLoadingDelegate::IconLoadingDelegate):
329 (WebKit::IconLoadingDelegate::~IconLoadingDelegate):
330 (WebKit::IconLoadingDelegate::createIconLoadingClient):
331 (WebKit::IconLoadingDelegate::delegate):
332 (WebKit::IconLoadingDelegate::setDelegate):
333 (WebKit::IconLoadingDelegate::IconLoadingClient::IconLoadingClient):
334 (WebKit::IconLoadingDelegate::IconLoadingClient::~IconLoadingClient):
335 (WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):
337 * UIProcess/WebPageProxy.cpp:
338 (WebKit::WebPageProxy::setIconLoadingClient):
339 (WebKit::WebPageProxy::getLoadDecisionForIcon):
340 (WebKit::WebPageProxy::finishedLoadingIcon):
341 * UIProcess/WebPageProxy.h:
342 (WebKit::WebPageProxy::iconLoadingClient):
343 * UIProcess/WebPageProxy.messages.in:
345 * WebKit2.xcodeproj/project.pbxproj:
347 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
348 (WebKit::WebFrameLoaderClient::useIconLoadingClient):
349 (WebKit::WebFrameLoaderClient::getLoadDecisionForIcon):
350 (WebKit::WebFrameLoaderClient::finishedLoadingIcon):
351 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
352 (WebKit::WebFrameLoaderClient::setUseIconLoadingClient):
354 * WebProcess/WebPage/WebPage.cpp:
355 (WebKit::WebPage::didGetLoadDecisionForIcon):
356 (WebKit::WebPage::setUseIconLoadingClient):
357 * WebProcess/WebPage/WebPage.h:
358 * WebProcess/WebPage/WebPage.messages.in:
360 2016-12-09 Simon Fraser <simon.fraser@apple.com>
362 Fix initialization of contentUpdateFrequency
363 https://bugs.webkit.org/show_bug.cgi?id=165705
364 rdar://problem/29602039
366 Reviewed by Tim Horton.
368 The value that controls web content update frequency was not being initialized.
370 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
371 (-[WKWebViewConfiguration init]):
373 2016-12-09 Anders Carlsson <andersca@apple.com>
375 Once we can send Mach messages again, make sure to send any pending outgoing messages
376 https://bugs.webkit.org/show_bug.cgi?id=165693
378 Reviewed by Brady Eidson.
380 * Platform/IPC/mac/ConnectionMac.mm:
381 (IPC::Connection::initializeSendSource):
383 2016-12-09 Beth Dakin <bdakin@apple.com>
385 Password fields should not show the emoji button in TouchBar
386 https://bugs.webkit.org/show_bug.cgi?id=165673
388 rdar://problem/29235739
390 Reviewed by Wenson Hsieh.
392 This patch adds a new member variable for the password touch bar and password
393 candidateListTouchBarItem. Since this TouchBar will actually have a different set
394 of identifiers than the plain text TouchBar, it should just have its own variable.
395 * UIProcess/Cocoa/WebViewImpl.h:
396 * UIProcess/Cocoa/WebViewImpl.mm:
398 Return m_passwordTextCandidateListTouchBarItem when appropriate.
399 (WebKit::WebViewImpl::candidateListTouchBarItem):
401 The candidate list should be the only item for passwords.
402 (WebKit::passwordTextTouchBarDefaultItemIdentifiers):
404 Account for m_passwordTextTouchBar.
405 (WebKit::WebViewImpl::updateTouchBarAndRefreshTextBarIdentifiers):
406 (WebKit::WebViewImpl::setUpTextTouchBar):
407 (WebKit::WebViewImpl::textTouchBar):
409 The empty candidates array is not needed. We can just set @[ ] as the candidates
410 for the m_passwordTextCandidateListTouchBarItem. Safe guards already exist in the
411 other parts of the code to prevent us from requesting or setting other candidates
412 when in a password field.
413 (WebKit::WebViewImpl::updateTextTouchBar):
415 2016-12-09 Keith Rollin <krollin@apple.com>
417 Fix string specification in print format
418 https://bugs.webkit.org/show_bug.cgi?id=165650
420 Reviewed by Alex Christensen.
422 Change "%{public}s" string specifier to something that can be changed
423 to "%s" at compile time when the build environment doesn't support the
426 * NetworkProcess/capture/NetworkCaptureLogging.h:
427 * NetworkProcess/capture/NetworkCaptureManager.cpp:
428 (WebKit::NetworkCapture::Manager::initialize):
429 (WebKit::NetworkCapture::Manager::findMatch):
430 (WebKit::NetworkCapture::Manager::findExactMatch):
431 (WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
432 (WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
433 (WebKit::NetworkCapture::Manager::logPlayedBackResource):
434 (WebKit::NetworkCapture::Manager::openCacheFile):
435 (WebKit::NetworkCapture::Manager::getLine):
436 * NetworkProcess/capture/NetworkCaptureRecorder.cpp:
437 (WebKit::NetworkCapture::Recorder::recordRequestSent):
438 (WebKit::NetworkCapture::Recorder::recordResponseReceived):
439 (WebKit::NetworkCapture::Recorder::recordRedirectReceived):
440 (WebKit::NetworkCapture::Recorder::recordRedirectSent):
441 (WebKit::NetworkCapture::Recorder::writeEvents):
442 * NetworkProcess/capture/NetworkCaptureResource.cpp:
443 (WebKit::NetworkCapture::Resource::url):
444 (WebKit::NetworkCapture::Resource::EventStream::nextEvent):
445 * NetworkProcess/capture/NetworkDataTaskReplay.cpp:
446 (WebKit::NetworkCapture::NetworkDataTaskReplay::NetworkDataTaskReplay):
447 (WebKit::NetworkCapture::NetworkDataTaskReplay::~NetworkDataTaskReplay):
448 (WebKit::NetworkCapture::NetworkDataTaskReplay::resume):
449 (WebKit::NetworkCapture::NetworkDataTaskReplay::suspend):
450 (WebKit::NetworkCapture::NetworkDataTaskReplay::complete):
451 (WebKit::NetworkCapture::NetworkDataTaskReplay::invalidateAndCancel):
452 (WebKit::NetworkCapture::NetworkDataTaskReplay::enqueueEventHandler):
453 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRequestSent):
454 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayResponseReceived):
455 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectReceived):
456 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectSent):
457 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayDataReceived):
458 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayFinished):
459 (WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):
461 2016-12-09 Jeremy Jones <jeremyj@apple.com>
463 WebView doesn't become first responder in element fullscreen.
464 https://bugs.webkit.org/show_bug.cgi?id=165664
465 rdar://problem/28927252
467 Reviewed by Tim Horton.
469 WebView was being set as the first responder while the contentView was still hidden.
470 A view can not become first responder while it or its ancestor is hidden.
472 This change waits until after the contentView is visible to make the web view the first responder.
474 * UIProcess/mac/WKFullScreenWindowController.mm:
475 (-[WKFullScreenWindowController enterFullScreen:]):
476 (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
478 2016-12-09 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
480 Unreviewed build fix. Thanks to Konstantin Tokarev and Csaba Osztrogonác
481 for pointing out the fix.
483 * CMakeLists.txt: add WebCore/html/canvas to include paths.
485 2016-12-09 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
487 [GTK] Fix build after r209558
488 https://bugs.webkit.org/show_bug.cgi?id=165653
490 Unreviewed build fix.
492 * UIProcess/API/APIPolicyClient.h: include WebsitePolicies.h.
493 * UIProcess/API/gtk/WebKitPolicyClient.cpp: ditto.
494 * UIProcess/API/gtk/WebKitPolicyDecision.cpp:
495 (webkit_policy_decision_use): pass empty structure to new required argument.
497 2016-12-09 Gavin Barraclough <barraclough@apple.com>
499 Revert - Add _WKIconLoadingDelegate SPI
500 https://bugs.webkit.org/show_bug.cgi?id=164894
502 Unreviewed rollout due to performance regression.
505 * UIProcess/API/APIIconLoadingClient.h: Removed.
506 * UIProcess/API/Cocoa/WKWebView.mm:
507 (-[WKWebView _initializeWithConfiguration:]):
508 (-[WKWebView _iconLoadingDelegate]): Deleted.
509 (-[WKWebView _setIconLoadingDelegate:]): Deleted.
510 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
511 * UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Removed.
512 * UIProcess/API/Cocoa/_WKLinkIconParameters.h: Removed.
513 * UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Removed.
514 * UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Removed.
515 * UIProcess/Cocoa/IconLoadingDelegate.h: Removed.
516 * UIProcess/Cocoa/IconLoadingDelegate.mm: Removed.
517 * UIProcess/WebPageProxy.cpp:
518 (WebKit::WebPageProxy::setIconLoadingClient): Deleted.
519 (WebKit::WebPageProxy::getLoadDecisionForIcon): Deleted.
520 (WebKit::WebPageProxy::finishedLoadingIcon): Deleted.
521 * UIProcess/WebPageProxy.h:
522 (WebKit::WebPageProxy::iconLoadingClient): Deleted.
523 * UIProcess/WebPageProxy.messages.in:
524 * WebKit2.xcodeproj/project.pbxproj:
525 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
526 (WebKit::WebFrameLoaderClient::useIconLoadingClient): Deleted.
527 (WebKit::WebFrameLoaderClient::getLoadDecisionForIcon): Deleted.
528 (WebKit::WebFrameLoaderClient::finishedLoadingIcon): Deleted.
529 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
530 (WebKit::WebFrameLoaderClient::setUseIconLoadingClient): Deleted.
532 * WebProcess/WebPage/WebPage.cpp:
533 (WebKit::WebPage::didGetLoadDecisionForIcon): Deleted.
534 (WebKit::WebPage::setUseIconLoadingClient): Deleted.
535 * WebProcess/WebPage/WebPage.h:
536 * WebProcess/WebPage/WebPage.messages.in:
538 2016-12-08 Keith Rollin <krollin@apple.com>
540 Move FileHandle to WebCore FileHandle.h
541 https://bugs.webkit.org/show_bug.cgi?id=165562
543 Reviewed by Alex Christensen.
545 Move FileHandle from NetworkCaptureTypes.h (which can now be deleted)
546 to WebCore. Update client code to use the new version.
548 * NetworkProcess/capture/NetworkCaptureEvent.cpp:
549 * NetworkProcess/capture/NetworkCaptureEvent.h:
550 * NetworkProcess/capture/NetworkCaptureManager.cpp:
551 (WebKit::NetworkCapture::Manager::initialize):
552 (WebKit::NetworkCapture::Manager::terminate):
553 (WebKit::NetworkCapture::Manager::logRecordedResource):
554 (WebKit::NetworkCapture::Manager::logLoadedResource):
555 (WebKit::NetworkCapture::Manager::logPlayedBackResource):
556 (WebKit::NetworkCapture::Manager::openCacheFile):
557 (WebKit::NetworkCapture::Manager::ensureFileHandle): Deleted.
558 (WebKit::NetworkCapture::Manager::printToFile): Deleted.
559 * NetworkProcess/capture/NetworkCaptureManager.h:
560 * NetworkProcess/capture/NetworkCaptureRecorder.cpp:
561 (WebKit::NetworkCapture::Recorder::writeEvents):
562 * NetworkProcess/capture/NetworkCaptureTypes.h: Removed.
563 * WebKit2.xcodeproj/project.pbxproj:
565 2016-12-08 Anders Carlsson <andersca@apple.com>
567 Attempt to fix the iOS build.
569 * Platform/IPC/mac/MachMessage.cpp:
571 2016-12-08 Anders Carlsson <andersca@apple.com>
573 Defer sending Mach messages if the queue is full
574 https://bugs.webkit.org/show_bug.cgi?id=165622
575 rdar://problem/29518036
577 Reviewed by Brady Eidson.
579 * Platform/IPC/Connection.cpp:
580 Include MachMessage.h so the Connection destructor can do its thing.
582 * Platform/IPC/Connection.h:
585 * Platform/IPC/mac/ConnectionMac.mm:
586 (IPC::Connection::platformInvalidate):
587 Null out the pending outgoing mach message.
589 (IPC::Connection::sendMessage):
590 New helper that will send a Mach message. If we time out, store the message in m_pendingOutgoingMachMessage.
591 When our send source will be triggered we'll try to send the message again.
593 (IPC::Connection::platformCanSendOutgoingMessages):
594 We can only send messages if we don't have a pending outgoing message.
596 (IPC::Connection::sendOutgoingMessage):
597 Call the newly added sendMessage function.
599 (IPC::Connection::initializeSendSource):
600 Add the DISPATCH_MACH_SEND_POSSIBLE mask (and DISPATCH_MACH_SEND_DEAD which was previously implicit).
601 In our event handler, check for DISPATCH_MACH_SEND_POSSIBLE and try to send the pending outgoing message again.
603 * Platform/IPC/mac/MachMessage.cpp:
604 (IPC::MachMessage::create):
605 Rename length to size.
607 (IPC::MachMessage::MachMessage):
608 Initialize m_shouldFreeDescriptors.
610 (IPC::MachMessage::~MachMessage):
611 Call mach_msg_destroy, which will free the descriptors.
613 (IPC::MachMessage::leakDescriptors):
614 Set m_shouldFreeDescriptors to false.
616 * Platform/IPC/mac/MachMessage.h:
617 (IPC::MachMessage::size):
618 (IPC::MachMessage::length): Deleted.
620 2016-12-08 Chelsea Pugh <cpugh@apple.com>
622 [iOS] WKWebView should not allow app links to be opened on back or forward navigation
623 https://bugs.webkit.org/show_bug.cgi?id=165502
625 Reviewed by Dan Bernstein.
627 * UIProcess/WebPageProxy.cpp:
628 (WebKit::WebPageProxy::decidePolicyForNavigationAction): Add a condition to shouldOpenAppLinks
629 (which we use when creating a NavigationAction) that the navigationActionData is not a navigation
630 of type BackForward. This way, we don't open app links when a navigation is done via back or
633 2016-12-08 Filip Pizlo <fpizlo@apple.com>
635 Enable SharedArrayBuffer, remove the flag
636 https://bugs.webkit.org/show_bug.cgi?id=165614
638 Rubber stamped by Geoffrey Garen.
640 * UIProcess/API/C/WKPreferencesRefPrivate.h:
641 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
643 2016-12-08 Alex Christensen <achristensen@webkit.org>
645 Add SPI for sending WebsiteSettings to WebProcess during navigation
646 https://bugs.webkit.org/show_bug.cgi?id=165517
649 We add the ability for the navigation client to send settings to the WebProcess
650 based on the URL of the document being navigated to. This approach adds no new IPC
651 messages and allows the application to decide what settings to use during navigation
652 instead of declaratively before navigation. Right now there is only one setting,
653 whether to disable content blockers, but this infrastructure can be used for more settings.
655 Reviewed by Anders Carlsson.
659 * Shared/API/APIObject.h:
660 * Shared/API/c/WKBase.h:
661 * Shared/WebsitePolicies.h: Added.
662 (WebKit::WebsitePolicies::encode):
663 (WebKit::WebsitePolicies::decode):
664 * UIProcess/API/APINavigationClient.h:
665 (API::NavigationClient::decidePolicyForNavigationAction):
666 (API::NavigationClient::decidePolicyForNavigationResponse):
667 * UIProcess/API/APIPolicyClient.h:
668 (API::PolicyClient::decidePolicyForNavigationAction):
669 (API::PolicyClient::decidePolicyForNewWindowAction):
670 (API::PolicyClient::decidePolicyForResponse):
671 * UIProcess/API/APIWebsitePolicies.cpp: Added.
672 (API::WebsitePolicies::create):
673 * UIProcess/API/APIWebsitePolicies.h: Added.
674 * UIProcess/API/C/WKAPICast.h:
675 * UIProcess/API/C/WKFramePolicyListener.cpp:
676 (WKFramePolicyListenerUse):
677 (WKFramePolicyListenerUseWithPolicies):
678 * UIProcess/API/C/WKFramePolicyListener.h:
679 * UIProcess/API/C/WKPage.cpp:
680 (WKPageSetPagePolicyClient):
681 * UIProcess/API/C/WKWebsitePolicies.cpp: Added.
682 (WKWebsitePoliciesGetTypeID):
683 (WKWebsitePoliciesCreate):
684 (WKWebsitePoliciesSetContentBlockersEnabled):
685 (WKWebsitePoliciesGetContentBlockersEnabled):
686 * UIProcess/API/C/WKWebsitePolicies.h: Added.
687 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
688 * UIProcess/API/Cocoa/_WKWebsitePolicies.h: Added.
689 * UIProcess/API/Cocoa/_WKWebsitePolicies.mm: Added.
690 (-[_WKWebsitePolicies dealloc]):
691 (-[_WKWebsitePolicies init]):
692 (-[_WKWebsitePolicies setContentBlockersEnabled:]):
693 (-[_WKWebsitePolicies contentBlockersEnabled]):
694 (-[_WKWebsitePolicies description]):
695 (-[_WKWebsitePolicies _apiObject]):
696 * UIProcess/API/Cocoa/_WKWebsitePoliciesInternal.h: Added.
698 * UIProcess/Automation/WebAutomationSession.cpp:
699 (WebKit::WebAutomationSession::reloadBrowsingContext):
700 * UIProcess/Cocoa/NavigationState.h:
701 * UIProcess/Cocoa/NavigationState.mm:
702 (WebKit::NavigationState::setNavigationDelegate):
703 (WebKit::tryAppLink):
704 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
705 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
706 * UIProcess/WebFormSubmissionListenerProxy.cpp:
707 (WebKit::WebFormSubmissionListenerProxy::continueSubmission):
708 * UIProcess/WebFrameListenerProxy.cpp:
709 (WebKit::WebFrameListenerProxy::receivedPolicyDecision):
710 * UIProcess/WebFrameListenerProxy.h:
711 * UIProcess/WebFramePolicyListenerProxy.cpp:
712 (WebKit::WebFramePolicyListenerProxy::use):
713 (WebKit::WebFramePolicyListenerProxy::download):
714 (WebKit::WebFramePolicyListenerProxy::ignore):
715 * UIProcess/WebFramePolicyListenerProxy.h:
716 (WebKit::WebFramePolicyListenerProxy::create):
717 * UIProcess/WebFrameProxy.cpp:
718 (WebKit::WebFrameProxy::receivedPolicyDecision):
719 * UIProcess/WebFrameProxy.h:
720 * UIProcess/WebInspectorProxy.cpp:
721 (WebKit::decidePolicyForNavigationAction):
722 * UIProcess/WebPageProxy.cpp:
723 (WebKit::WebPageProxy::receivedPolicyDecision):
724 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
725 * UIProcess/WebPageProxy.h:
726 * UIProcess/WebPageProxy.messages.in:
727 * WebKit2.xcodeproj/project.pbxproj:
728 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
729 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
731 2016-12-08 Antti Koivisto <antti@apple.com>
733 Salt network cache hashes
734 https://bugs.webkit.org/show_bug.cgi?id=164924
736 Reviewed by Alex Christensen.
738 To enhance privacy make cache content unidentifiable from file names alone.
739 This is done by generating a unique persistent salt for each cache instance.
740 It is used when computing hashes used in file names.
742 The patch also replaces plain text partition directory names with salted hashes.
744 * NetworkProcess/cache/NetworkCache.cpp:
745 (WebKit::NetworkCache::Cache::makeCacheKey):
746 (WebKit::NetworkCache::makeCacheKey): Deleted.
747 * NetworkProcess/cache/NetworkCache.h:
749 Increment cache version.
751 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
752 (WebKit::NetworkCache::BlobStorage::BlobStorage):
753 (WebKit::NetworkCache::BlobStorage::add):
754 (WebKit::NetworkCache::BlobStorage::get):
756 Use salt for blob content hash.
758 * NetworkProcess/cache/NetworkCacheBlobStorage.h:
759 * NetworkProcess/cache/NetworkCacheData.cpp:
760 (WebKit::NetworkCache::computeSHA1):
762 For simplicity all SHA1s are now salted.
764 (WebKit::NetworkCache::makeSalt):
765 (WebKit::NetworkCache::readOrMakeSalt):
767 Read salt if it exists, generate and persist it otherwise.
769 * NetworkProcess/cache/NetworkCacheData.h:
770 * NetworkProcess/cache/NetworkCacheKey.cpp:
771 (WebKit::NetworkCache::Key::Key):
773 Remove the "No partition" string and just empty.
774 That was only needed to have a directory name of some sort.
776 (WebKit::NetworkCache::Key::computeHash):
778 Use salt for key hash.
780 (WebKit::NetworkCache::Key::computePartitionHash):
782 Separate hash for partition.
784 * NetworkProcess/cache/NetworkCacheKey.h:
785 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
786 (WebKit::NetworkCache::makeSubresourcesKey):
787 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
788 (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
789 * NetworkProcess/cache/NetworkCacheStorage.cpp:
790 (WebKit::NetworkCache::makeSaltFilePath):
791 (WebKit::NetworkCache::Storage::open):
793 Cache can't be opened if we can't read or persist a salt.
795 (WebKit::NetworkCache::traverseRecordsFiles):
796 (WebKit::NetworkCache::Storage::Storage):
797 (WebKit::NetworkCache::Storage::synchronize):
798 (WebKit::NetworkCache::Storage::recordDirectoryPathForKey):
800 Use the partition hash in the directory name instead of a plain text name.
802 (WebKit::NetworkCache::decodeRecordHeader):
803 (WebKit::NetworkCache::Storage::readRecord):
804 (WebKit::NetworkCache::Storage::encodeRecord):
805 (WebKit::NetworkCache::Storage::traverse):
806 (WebKit::NetworkCache::Storage::clear):
807 * NetworkProcess/cache/NetworkCacheStorage.h:
808 (WebKit::NetworkCache::Storage::salt):
810 2016-12-08 Eric Carlson <eric.carlson@apple.com>
814 * UIProcess/WebPageProxy.cpp:
815 (WebKit::WebPageProxy::isPlayingMediaDidChange): Add another ENABLE(MEDIA_STREAM) guard.
817 2016-12-08 Tomas Popela <tpopela@redhat.com>
819 [GTK] Process accelerated compositing env variables only if they are really enabled
820 https://bugs.webkit.org/show_bug.cgi?id=165300
822 Don't process the WEBKIT_FORCE_COMPOSITING_MODE and
823 WEBKIT_DISABLE_COMPOSITING_MODE env variables if they are disabled
824 (eg. WEBKIT_DISABLE_COMPOSITING_MODE=0).
826 Reviewed by Michael Catanzaro.
828 * UIProcess/gtk/WebPreferencesGtk.cpp:
829 (WebKit::WebPreferences::platformInitializeStore):
831 2016-12-08 Alex Christensen <achristensen@webkit.org>
836 Add the new NetworkProcess/capture include directory to find new headers from r209498.
837 * NetworkProcess/capture/NetworkCaptureEvent.cpp:
838 (WebKit::NetworkCapture::Response::Response):
839 (WebKit::NetworkCapture::Error::Error):
840 The String constructor was ambiguous after r209498 because URL has an operator NSString* and String has an NSString constructor.
841 We should get rid of operator NSString* and operator String on URL.
842 * UIProcess/WebPageProxy.cpp:
843 * UIProcess/WebPageProxy.h:
844 Add some ENABLE(MEDIA_STREAM) macros to fix the build without it enabled after r209512.
846 2016-12-08 Alex Christensen <achristensen@webkit.org>
848 Fix iOS debug build after r209498
849 https://bugs.webkit.org/show_bug.cgi?id=164527
851 * NetworkProcess/capture/NetworkCaptureLogging.h:
852 Logs were causing compile warnings/errors. Disable logs for now.
854 2016-12-07 Dean Jackson <dino@apple.com>
856 Remove runtime toggle for pointer-lock
857 https://bugs.webkit.org/show_bug.cgi?id=165577
858 <rdar://problems/29566996>
862 Remove any runtime calls to check if pointer-lock is enabled. It's
863 either compiled in or out.
865 * Shared/WebPreferencesDefinitions.h:
866 * UIProcess/API/C/WKPreferences.cpp:
867 (WKPreferencesSetPointerLockEnabled): Deleted.
868 (WKPreferencesGetPointerLockEnabled): Deleted.
869 * UIProcess/API/C/WKPreferencesRefPrivate.h:
870 * WebProcess/WebPage/WebPage.cpp:
871 (WebKit::WebPage::updatePreferences):
873 2016-12-07 Eric Carlson <eric.carlson@apple.com>
875 [MediaStream][Mac] Revoke sandbox extensions when capture ends
876 https://bugs.webkit.org/show_bug.cgi?id=165476
878 Reviewed by Brady Eidson.
880 Track media capture by process so it is possible to revoke the sandbox extensions issued to
881 a web process when capture stops. Allocate WK2 user media permission manager lazily rather
882 than every time a page is created as most pages won't need one.
884 * CMakeLists.txt: Add new files.
886 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
887 (WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy): Register
888 with process manager.
889 (WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
890 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Move sandbox
891 extension code to the process manager.
892 (WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
893 (WebKit::UserMediaPermissionRequestManagerProxy::startedCaptureSession): New, report state
894 change to the process manager.
895 (WebKit::UserMediaPermissionRequestManagerProxy::endedCaptureSession): Ditto.
896 * UIProcess/UserMediaPermissionRequestManagerProxy.h:
898 * UIProcess/UserMediaProcessManager.cpp: Added.
899 (WebKit::ProcessState::ProcessState):
900 (WebKit::ProcessState::managers):
901 (WebKit::ProcessState::sandboxExtensionsGranted):
902 (WebKit::ProcessState::setSandboxExtensionsGranted):
904 (WebKit::processState):
905 (WebKit::ProcessState::addRequestManager):
906 (WebKit::ProcessState::removeRequestManager):
907 (WebKit::UserMediaProcessManager::singleton):
908 (WebKit::UserMediaProcessManager::addUserMediaPermissionRequestManagerProxy):
909 (WebKit::UserMediaProcessManager::removeUserMediaPermissionRequestManagerProxy):
910 (WebKit::UserMediaProcessManager::willCreateMediaStream):
911 (WebKit::UserMediaProcessManager::startedCaptureSession):
912 (WebKit::UserMediaProcessManager::endedCaptureSession):
913 * UIProcess/UserMediaProcessManager.h: Added.
915 * UIProcess/WebPageProxy.cpp:
916 (WebKit::WebPageProxy::WebPageProxy): Don't allocate m_userMediaPermissionRequestManager.
917 (WebKit::WebPageProxy::resetState): Set m_userMediaPermissionRequestManager to null.
918 (WebKit::WebPageProxy::userMediaPermissionRequestManager): Allocate m_userMediaPermissionRequestManager
919 lazily as most pages don't need it.
920 (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Call userMediaPermissionRequestManager().
921 (WebKit::WebPageProxy::enumerateMediaDevicesForFrame): Ditto.
922 (WebKit::WebPageProxy::clearUserMediaState): Ditto.
923 (WebKit::WebPageProxy::isPlayingMediaDidChange): Report capture state changes to the request
925 * UIProcess/WebPageProxy.h:
927 * WebKit2.xcodeproj/project.pbxproj: Add new files.
929 * WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp: Added.
930 (WebKit::MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions):
931 (WebKit::MediaDeviceSandboxExtensions::encode):
932 (WebKit::MediaDeviceSandboxExtensions::decode):
933 (WebKit::MediaDeviceSandboxExtensions::operator[]):
934 (WebKit::MediaDeviceSandboxExtensions::size):
935 * WebProcess/MediaStream/MediaDeviceSandboxExtensions.h: Added.
937 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
938 (WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Sandbox extension
939 is now in a HashMap, not a Vector.
940 (WebKit::UserMediaPermissionRequestManager::grantUserMediaDeviceSandboxExtensions): Record
941 IDs with extensions so they can be revoked later.
942 (WebKit::UserMediaPermissionRequestManager::revokeUserMediaDeviceSandboxExtensions): New.
943 (WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Deleted.
944 * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
946 * WebProcess/WebPage/WebPage.cpp:
947 (WebKit::WebPage::grantUserMediaDeviceSandboxExtensions):
948 (WebKit::WebPage::revokeUserMediaDeviceSandboxExtensions):
949 (WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Deleted.
950 * WebProcess/WebPage/WebPage.h:
951 * WebProcess/WebPage/WebPage.messages.in:
953 2016-12-07 Jeremy Jones <jeremyj@apple.com>
955 One esc to exit fullscreen and pointer lock
956 https://bugs.webkit.org/show_bug.cgi?id=165416
957 rdar://problem/29430711
959 Reviewed by Jer Noble.
961 Fix a crash when didLosePointerLock is not specified.
963 * UIProcess/API/C/WKPage.cpp:
964 (WKPageSetPageUIClient):
966 2016-12-07 Keith Rollin <krollin@apple.com>
968 Network event record/replay
969 https://bugs.webkit.org/show_bug.cgi?id=164527
970 <rdar://problem/29168157>
972 Reviewed by Alex Christensen.
974 Add WebKit2/NetworkProcess/capture/* for recording the network events
975 that occur when loading a page and for replaying them later. Update
976 NetworkLoad to invoke capture facilities. Add preferences for enabling
980 * NetworkProcess/NetworkLoad.cpp:
981 (WebKit::NetworkLoad::NetworkLoad):
982 (WebKit::NetworkLoad::initializeForRecord):
983 (WebKit::NetworkLoad::initializeForReplay):
984 (WebKit::NetworkLoad::initialize):
985 (WebKit::NetworkLoad::setDefersLoading):
986 (WebKit::NetworkLoad::continueWillSendRequest):
987 (WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
988 (WebKit::NetworkLoad::notifyDidReceiveResponse):
989 (WebKit::NetworkLoad::didReceiveData):
990 (WebKit::NetworkLoad::didCompleteWithError):
991 * NetworkProcess/NetworkLoad.h:
992 * NetworkProcess/NetworkProcess.cpp:
993 (WebKit::NetworkProcess::initializeNetworkProcess):
994 (WebKit::NetworkProcess::terminate):
995 * NetworkProcess/NetworkProcessCreationParameters.cpp:
996 (WebKit::NetworkProcessCreationParameters::encode):
997 (WebKit::NetworkProcessCreationParameters::decode):
998 * NetworkProcess/NetworkProcessCreationParameters.h:
999 * NetworkProcess/capture/NetworkCaptureEvent.cpp: Added.
1000 (WebKit::NetworkCapture::copyHeaders):
1001 (WebKit::NetworkCapture::KeyValuePair::KeyValuePair):
1002 (WebKit::NetworkCapture::ResourceRequest::ResourceRequest):
1003 (WebKit::NetworkCapture::ResourceRequest::operator WebCore::ResourceRequest):
1004 (WebKit::NetworkCapture::ResourceResponse::ResourceResponse):
1005 (WebKit::NetworkCapture::ResourceResponse::operator WebCore::ResourceResponse):
1006 (WebKit::NetworkCapture::ResourceError::ResourceError):
1007 (WebKit::NetworkCapture::ResourceError::operator WebCore::ResourceError):
1008 (WebKit::NetworkCapture::JSONCoder::encode):
1009 (WebKit::NetworkCapture::JSONCoder::decode):
1010 (WebKit::NetworkCapture::JSONCoder<String>::encode):
1011 (WebKit::NetworkCapture::JSONCoder<String>::decode):
1012 (WebKit::NetworkCapture::JSONCoder<CaptureTimeType>::encode):
1013 (WebKit::NetworkCapture::JSONCoder<CaptureTimeType>::decode):
1014 (WebKit::NetworkCapture::JSONCoder<KeyValuePair>::encode):
1015 (WebKit::NetworkCapture::JSONCoder<KeyValuePair>::decode):
1016 (WebKit::NetworkCapture::JSONCoder<Vector<T>>::encode):
1017 (WebKit::NetworkCapture::JSONCoder<Vector<T>>::decode):
1018 (WebKit::NetworkCapture::JSONCoder<ResourceRequest>::encode):
1019 (WebKit::NetworkCapture::JSONCoder<ResourceRequest>::decode):
1020 (WebKit::NetworkCapture::JSONCoder<ResourceResponse>::encode):
1021 (WebKit::NetworkCapture::JSONCoder<ResourceResponse>::decode):
1022 (WebKit::NetworkCapture::JSONCoder<ResourceError>::encode):
1023 (WebKit::NetworkCapture::JSONCoder<ResourceError>::decode):
1024 (WebKit::NetworkCapture::JSONCoder<WebCore::SharedBuffer>::encode):
1025 (WebKit::NetworkCapture::JSONCoder<WebCore::SharedBuffer>::decode):
1026 (WebKit::NetworkCapture::JSONCoder<RequestSentEvent>::encode):
1027 (WebKit::NetworkCapture::JSONCoder<RequestSentEvent>::decode):
1028 (WebKit::NetworkCapture::JSONCoder<ResponseReceivedEvent>::encode):
1029 (WebKit::NetworkCapture::JSONCoder<ResponseReceivedEvent>::decode):
1030 (WebKit::NetworkCapture::JSONCoder<RedirectReceivedEvent>::encode):
1031 (WebKit::NetworkCapture::JSONCoder<RedirectReceivedEvent>::decode):
1032 (WebKit::NetworkCapture::JSONCoder<RedirectSentEvent>::encode):
1033 (WebKit::NetworkCapture::JSONCoder<RedirectSentEvent>::decode):
1034 (WebKit::NetworkCapture::JSONCoder<DataReceivedEvent>::encode):
1035 (WebKit::NetworkCapture::JSONCoder<DataReceivedEvent>::decode):
1036 (WebKit::NetworkCapture::JSONCoder<FinishedEvent>::encode):
1037 (WebKit::NetworkCapture::JSONCoder<FinishedEvent>::decode):
1038 (WebKit::NetworkCapture::eventToString):
1039 (WebKit::NetworkCapture::stringToEvent):
1040 * NetworkProcess/capture/NetworkCaptureEvent.h: Added.
1041 (WebKit::NetworkCapture::TimedEvent::TimedEvent):
1042 * NetworkProcess/capture/NetworkCaptureLogging.h: Added.
1043 * NetworkProcess/capture/NetworkCaptureManager.cpp: Added.
1044 (WebKit::NetworkCapture::Manager::singleton):
1045 (WebKit::NetworkCapture::Manager::initialize):
1046 (WebKit::NetworkCapture::Manager::terminate):
1047 (WebKit::NetworkCapture::Manager::findMatch):
1048 (WebKit::NetworkCapture::Manager::findExactMatch):
1049 (WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
1050 (WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
1051 (WebKit::NetworkCapture::Manager::loadResources):
1052 (WebKit::NetworkCapture::Manager::reportLoadPath):
1053 (WebKit::NetworkCapture::Manager::reportRecordPath):
1054 (WebKit::NetworkCapture::Manager::reportReplayPath):
1055 (WebKit::NetworkCapture::Manager::requestToPath):
1056 (WebKit::NetworkCapture::Manager::stringToHash):
1057 (WebKit::NetworkCapture::Manager::hashToPath):
1058 (WebKit::NetworkCapture::Manager::logRecordedResource):
1059 (WebKit::NetworkCapture::Manager::logLoadedResource):
1060 (WebKit::NetworkCapture::Manager::logPlayedBackResource):
1061 (WebKit::NetworkCapture::Manager::ensureFileHandle):
1062 (WebKit::NetworkCapture::Manager::openCacheFile):
1063 (WebKit::NetworkCapture::Manager::readFile):
1064 (WebKit::NetworkCapture::Manager::getLine):
1065 (WebKit::NetworkCapture::Manager::getWord):
1066 (WebKit::NetworkCapture::Manager::printToFile):
1067 * NetworkProcess/capture/NetworkCaptureManager.h: Added.
1068 (WebKit::NetworkCapture::Manager::isRecording):
1069 (WebKit::NetworkCapture::Manager::isReplaying):
1070 (WebKit::NetworkCapture::Manager::mode):
1071 * NetworkProcess/capture/NetworkCaptureRecorder.cpp: Added.
1072 (WebKit::NetworkCapture::Recorder::recordRequestSent):
1073 (WebKit::NetworkCapture::Recorder::recordResponseReceived):
1074 (WebKit::NetworkCapture::Recorder::recordRedirectReceived):
1075 (WebKit::NetworkCapture::Recorder::recordRedirectSent):
1076 (WebKit::NetworkCapture::Recorder::recordDataReceived):
1077 (WebKit::NetworkCapture::Recorder::recordFinish):
1078 (WebKit::NetworkCapture::Recorder::writeEvents):
1079 * NetworkProcess/capture/NetworkCaptureRecorder.h: Added.
1080 (WebKit::NetworkCapture::Recorder::recordEvent):
1081 * NetworkProcess/capture/NetworkCaptureReplayer.cpp: Added.
1082 (WebKit::NetworkCapture::Replayer::replayResource):
1083 * NetworkProcess/capture/NetworkCaptureReplayer.h: Added.
1084 * NetworkProcess/capture/NetworkCaptureResource.cpp: Added.
1085 (WebKit::NetworkCapture::Resource::Resource):
1086 (WebKit::NetworkCapture::Resource::url):
1087 (WebKit::NetworkCapture::Resource::baseURL):
1088 (WebKit::NetworkCapture::Resource::queryParameters):
1089 (WebKit::NetworkCapture::Resource::eventStream):
1090 (WebKit::NetworkCapture::Resource::EventStream::EventStream):
1091 (WebKit::NetworkCapture::Resource::EventStream::nextEvent):
1092 * NetworkProcess/capture/NetworkCaptureResource.h: Added.
1093 * NetworkProcess/capture/NetworkCaptureTypes.h: Added.
1094 (WebKit::NetworkCapture::TypeHolder::forEachTypeImpl):
1095 (WebKit::NetworkCapture::TypeHolder::forEachType):
1096 * NetworkProcess/capture/NetworkDataTaskReplay.cpp: Added.
1097 (WebKit::NetworkCapture::NetworkDataTaskReplay::NetworkDataTaskReplay):
1098 (WebKit::NetworkCapture::NetworkDataTaskReplay::~NetworkDataTaskReplay):
1099 (WebKit::NetworkCapture::NetworkDataTaskReplay::resume):
1100 (WebKit::NetworkCapture::NetworkDataTaskReplay::suspend):
1101 (WebKit::NetworkCapture::NetworkDataTaskReplay::cancel):
1102 (WebKit::NetworkCapture::NetworkDataTaskReplay::complete):
1103 (WebKit::NetworkCapture::NetworkDataTaskReplay::invalidateAndCancel):
1104 (WebKit::NetworkCapture::NetworkDataTaskReplay::enqueueEventHandler):
1105 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRequestSent):
1106 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayResponseReceived):
1107 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectReceived):
1108 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectSent):
1109 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayDataReceived):
1110 (WebKit::NetworkCapture::NetworkDataTaskReplay::replayFinished):
1111 (WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):
1112 (WebKit::NetworkCapture::NetworkDataTaskReplay::didFinish):
1113 * NetworkProcess/capture/NetworkDataTaskReplay.h: Added.
1114 (WebKit::NetworkCapture::NetworkDataTaskReplay::create):
1115 * NetworkProcess/capture/json.hpp: Added.
1116 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1117 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1118 * WebKit2.xcodeproj/project.pbxproj:
1121 2016-12-07 Anders Carlsson <andersca@apple.com>
1125 * Platform/IPC/mac/ConnectionMac.mm:
1126 (IPC::Connection::open):
1128 2016-12-07 Anders Carlsson <andersca@apple.com>
1130 Rename the connection sources to better indicate what data direction they are used for
1131 https://bugs.webkit.org/show_bug.cgi?id=165548
1133 Reviewed by Tim Horton.
1135 * Platform/IPC/Connection.h:
1136 * Platform/IPC/mac/ConnectionMac.mm:
1137 (IPC::Connection::platformInvalidate):
1138 (IPC::Connection::platformInitialize):
1139 (IPC::createReceiveSource):
1140 (IPC::Connection::initializeSendSource):
1141 (IPC::Connection::receiveSourceEventHandler):
1142 (IPC::createDataAvailableSource): Deleted.
1143 (IPC::Connection::initializeDeadNameSource): Deleted.
1144 Rename m_deadNameSource to m_sendSource, and m_receivePortDataAvailableSource to m_receiveSource.
1146 (IPC::Connection::open):
1147 Initialize the send source before we attempt to send a first message.
1149 2016-12-07 Simon Fraser <simon.fraser@apple.com>
1151 Fix use of enum in a WK2 C SPI header.
1152 rdar://problem/28725583
1154 Followup to correctly prefix the enum values.
1156 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1157 (WKBundlePageSetEventThrottlingBehaviorOverride):
1158 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1160 2016-12-07 Simon Fraser <simon.fraser@apple.com>
1162 Fix use of enum in a WK2 C SPI header.
1163 rdar://problem/28725583
1165 Reviewed by Dan Bernstein.
1167 Use correct enum style for a C SPI header and fix the callers.
1169 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1170 (WKBundlePageSetEventThrottlingBehaviorOverride):
1171 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1173 2016-12-07 Beth Dakin <bdakin@apple.com>
1175 Remove iCloud Pages and Keynote site-specific hacks
1176 https://bugs.webkit.org/show_bug.cgi?id=165544
1178 rdar://problem/29082536
1180 Reviewed by Wenson Hsieh.
1182 * WebProcess/WebPage/WebPage.cpp:
1183 (WebKit::needsHiddenContentEditableQuirk):
1184 (WebKit::needsPlainTextQuirk):
1186 2016-12-05 Ada Chan <adachan@apple.com>
1188 Add a getter for serverTrust in _WKObservablePageState
1189 https://bugs.webkit.org/show_bug.cgi?id=165433
1191 Reviewed by Anders Carlsson.
1193 * UIProcess/API/C/mac/WKPagePrivateMac.h:
1194 * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1195 (-[WKObservablePageState serverTrust]):
1197 2016-12-07 Jer Noble <jer.noble@apple.com>
1199 Exiting Element Fullscreen mode loses focus on WKWebView.
1200 https://bugs.webkit.org/show_bug.cgi?id=165512
1202 Reviewed by Eric Carlson.
1204 Setting 'window.contentView.hidden = YES' will reset the first-responder (whereas
1205 previously setting 'window.contentView.layer.hidden = YES' did not). Grab the first-
1206 responder before doing so, so that it can be reset correctly when moving the WKWebView
1207 back to it's original window.
1209 * UIProcess/mac/WKFullScreenWindowController.mm:
1210 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
1212 2016-12-07 Alex Christensen <achristensen@webkit.org>
1214 Fix CMake build after r209418.
1215 https://bugs.webkit.org/show_bug.cgi?id=165484
1217 * PlatformMac.cmake:
1219 2016-12-07 Philippe Normand <pnormand@igalia.com>
1221 Unreviewed, GTK build fix after r209407.
1223 * Platform/IPC/unix/ConnectionUnix.cpp:
1224 (IPC::Connection::processMessage):
1225 * UIProcess/LegacySessionStateCodingNone.cpp:
1226 (WebKit::decodeLegacySessionState):
1228 2016-12-06 Ryan Haddad <ryanhaddad@apple.com>
1230 Unreviewed, rolling out r209422.
1232 This change caused assertion failures during API tests.
1236 "[MediaStream][Mac] Revoke sandbox extensions when capture
1238 https://bugs.webkit.org/show_bug.cgi?id=165476
1239 http://trac.webkit.org/changeset/209422
1241 2016-12-06 Dean Jackson <dino@apple.com>
1243 Include default value in Experimental Feature information
1244 https://bugs.webkit.org/show_bug.cgi?id=165509
1245 <rdar://problems/29547177>
1247 Reviewed by Tim Horton.
1249 Add a defaultValue member variable to experimental
1250 features, both the C++ and ObjC interfaces.
1252 * UIProcess/API/APIExperimentalFeature.cpp:
1253 (API::ExperimentalFeature::create):
1254 (API::ExperimentalFeature::ExperimentalFeature):
1255 * UIProcess/API/APIExperimentalFeature.h:
1256 * UIProcess/API/Cocoa/_WKExperimentalFeature.h:
1257 * UIProcess/API/Cocoa/_WKExperimentalFeature.mm:
1258 (-[_WKExperimentalFeature description]):
1259 (-[_WKExperimentalFeature defaultValue]):
1260 * UIProcess/WebPreferences.cpp:
1261 (WebKit::createExperimentalFeaturesVector):
1263 2016-12-06 Commit Queue <commit-queue@webkit.org>
1265 Unreviewed, rolling out r209391.
1266 https://bugs.webkit.org/show_bug.cgi?id=165501
1268 requires explicit nullptr checks so missing env vars don't
1269 flip AC mode (Requested by mcatanzaro on #webkit).
1273 "[GTK] Process accelerated compositing env variables only if
1274 they are really enabled"
1275 https://bugs.webkit.org/show_bug.cgi?id=165300
1276 http://trac.webkit.org/changeset/209391
1278 2016-12-06 Alexey Proskuryakov <ap@apple.com>
1280 Correct SDKROOT values in xcconfig files
1281 https://bugs.webkit.org/show_bug.cgi?id=165487
1282 rdar://problem/29539209
1284 Reviewed by Dan Bernstein.
1286 Fix suggested by Dan Bernstein.
1288 * Configurations/DebugRelease.xcconfig:
1290 2016-12-06 Andreas Kling <akling@apple.com>
1292 [Cocoa] Add some memory usage related information to sysdiagnose state dumps
1293 <https://webkit.org/b/165375>
1294 <rdar://problem/29057243>
1296 Reviewed by Darin Adler.
1298 Follow-up to address two more review comments.
1300 * WebProcess/cocoa/WebProcessCocoa.mm:
1301 (WebKit::WebProcess::registerWithStateDumper): Use adoptNS() instead of autorelease for NSStrings.
1303 2016-12-06 Eric Carlson <eric.carlson@apple.com>
1305 [MediaStream][Mac] Revoke sandbox extensions when capture ends
1306 https://bugs.webkit.org/show_bug.cgi?id=165476
1308 Reviewed by Brady Eidson.
1310 Track media capture by process so it is possible to revoke the sandbox extensions issued to
1311 a web process when capture stops.
1313 * CMakeLists.txt: Add new files.
1315 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1316 (WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy): Register
1317 with process manager.
1318 (WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
1319 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Move sandbox
1320 extension code to the process manager.
1321 (WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
1322 (WebKit::UserMediaPermissionRequestManagerProxy::startedCaptureSession): New, report state
1323 change to the process manager.
1324 (WebKit::UserMediaPermissionRequestManagerProxy::endedCaptureSession): Ditto.
1325 * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1327 * UIProcess/UserMediaProcessManager.cpp: Added.
1328 (WebKit::ProcessState::ProcessState):
1329 (WebKit::ProcessState::managers):
1330 (WebKit::ProcessState::sandboxExtensionsGranted):
1331 (WebKit::ProcessState::setSandboxExtensionsGranted):
1333 (WebKit::processState):
1334 (WebKit::ProcessState::addRequestManager):
1335 (WebKit::ProcessState::removeRequestManager):
1336 (WebKit::UserMediaProcessManager::singleton):
1337 (WebKit::UserMediaProcessManager::addUserMediaPermissionRequestManagerProxy):
1338 (WebKit::UserMediaProcessManager::removeUserMediaPermissionRequestManagerProxy):
1339 (WebKit::UserMediaProcessManager::willCreateMediaStream):
1340 (WebKit::UserMediaProcessManager::startedCaptureSession):
1341 (WebKit::UserMediaProcessManager::endedCaptureSession):
1342 * UIProcess/UserMediaProcessManager.h: Added.
1344 * UIProcess/WebPageProxy.cpp:
1345 (WebKit::WebPageProxy::isPlayingMediaDidChange): Report capture state changes to the request
1347 * UIProcess/WebPageProxy.h:
1349 * WebKit2.xcodeproj/project.pbxproj: Add new files.
1351 * WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp: Added.
1352 (WebKit::MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions):
1353 (WebKit::MediaDeviceSandboxExtensions::encode):
1354 (WebKit::MediaDeviceSandboxExtensions::decode):
1355 (WebKit::MediaDeviceSandboxExtensions::operator[]):
1356 (WebKit::MediaDeviceSandboxExtensions::size):
1357 * WebProcess/MediaStream/MediaDeviceSandboxExtensions.h: Added.
1359 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1360 (WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Sandbox extension
1361 is now in a HashMap, not a Vector.
1362 (WebKit::UserMediaPermissionRequestManager::grantUserMediaDeviceSandboxExtensions): Record
1363 IDs with extensions so they can be revoked later.
1364 (WebKit::UserMediaPermissionRequestManager::revokeUserMediaDeviceSandboxExtensions): New.
1365 (WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Deleted.
1366 * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
1368 * WebProcess/WebPage/WebPage.cpp:
1369 (WebKit::WebPage::grantUserMediaDeviceSandboxExtensions):
1370 (WebKit::WebPage::revokeUserMediaDeviceSandboxExtensions):
1371 (WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Deleted.
1372 * WebProcess/WebPage/WebPage.h:
1373 * WebProcess/WebPage/WebPage.messages.in:
1375 2016-12-06 Anders Carlsson <andersca@apple.com>
1377 Add a new MachMessage class and use it for sending outgoing messages
1378 https://bugs.webkit.org/show_bug.cgi?id=165484
1380 Reviewed by Sam Weinig.
1382 * Platform/IPC/mac/ConnectionMac.mm:
1383 (IPC::Connection::sendOutgoingMessage):
1384 Instead of trying to randomly use memory from the stack as well as using mmap for the message data for out of line messages
1385 (which makes no sense at all, since the body data is already mmapped), just always create a MachMessage object and use it.
1387 (IPC::machMessageSize): Deleted.
1388 This has been moved to MachMessage::messageSize().
1390 * Platform/IPC/mac/MachMessage.cpp: Added.
1391 (IPC::MachMessage::create):
1392 Allocate extra memory to store the actual buffer.
1394 (IPC::MachMessage::MachMessage):
1395 Initialize variables. m_size isn't really used right now, but will be in a subsequent patch.
1397 (IPC::MachMessage::header):
1400 * Platform/IPC/mac/MachMessage.h: Added.
1401 (IPC::MachMessage::length):
1403 * WebKit2.xcodeproj/project.pbxproj:
1406 2016-12-06 Simon Fraser <simon.fraser@apple.com>
1408 Enable visual viewports by default on Mac, and iOS Wk2
1409 https://bugs.webkit.org/show_bug.cgi?id=165452
1411 Reviewed by Zalan Bujtas.
1413 Turn visual viewports on by default for WK2.
1415 * Shared/WebPreferencesDefinitions.h:
1417 2016-12-06 Daniel Bates <dabates@apple.com>
1419 WebKitTestRunner: Plugins are disabled in new windows
1420 https://bugs.webkit.org/show_bug.cgi?id=165410
1422 Reviewed by Alex Christensen.
1424 Remove SPI exposed to explicitly toggle plugins from WebKitTestRunner.
1425 Instead we will update WebKitTestRunner to make use of the SPI
1426 WKBundleOverrideBoolPreferenceForTestRunner() to toggle plugins in
1429 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1430 (WKBundleSetPluginsEnabled): Deleted.
1431 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1432 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1433 (WebKit::InjectedBundle::setPluginsEnabled): Deleted.
1435 2016-12-05 Anders Carlsson <andersca@apple.com>
1437 Don't memcpy out of line data
1438 https://bugs.webkit.org/show_bug.cgi?id=165434
1440 Reviewed by Sam Weinig.
1442 Change the Decoder constructor to take a buffer deallocator parameter. If the buffer deallocator is null, the
1443 data will be copied as before. Otherwise, the memory will be adopted by the Decoder object, and will be deallocated
1444 by invoking the data deallocator.
1446 * Platform/IPC/Decoder.cpp:
1450 (IPC::Decoder::Decoder):
1451 Copy the buffer if the deallocator is null.
1453 (IPC::Decoder::~Decoder):
1454 Invoke the deallocator or call fastFree if it is null.
1456 (IPC::Decoder::unwrapForTesting):
1459 (IPC::roundUpToAlignment):
1460 (IPC::Decoder::alignBufferPosition):
1461 (IPC::Decoder::decodeVariableLengthByteArray):
1462 (IPC::decodeValueFromBuffer):
1463 Change all these to deal with const pointers.
1465 * Platform/IPC/Decoder.h:
1468 * Platform/IPC/mac/ConnectionMac.mm:
1469 (IPC::createMessageDecoder):
1470 When we have out of line data, pass a deallocator that calls vm_deallocate, instead of copying the data
1471 and then immediately throwing the original away.
1473 2016-12-06 Tim Horton <timothy_horton@apple.com>
1475 Almost half-second stall scrolling apple.com because of synchronous getPositionInformation
1476 https://bugs.webkit.org/show_bug.cgi?id=165403
1477 <rdar://problem/29493285>
1479 Reviewed by Enrica Casucci.
1481 When retrieving interaction information, we don't always need to do
1482 snapshots for 3D Touch or the action sheet, especially if we're
1483 synchronously blocking the UI process main thread waiting for the reply.
1485 Add a new InteractionInformationRequest, which allows callers of
1486 getPositionInformation and requestPositionInformation to specify which
1487 optional pieces of information they would like to compute.
1489 * Shared/AssistedNodeInformation.h:
1490 Fix a incorrect comment.
1492 * Shared/ios/InteractionInformationRequest.cpp: Added.
1493 (WebKit::InteractionInformationRequest::encode):
1494 (WebKit::InteractionInformationRequest::decode):
1495 (WebKit::InteractionInformationRequest::isValidForRequest):
1496 * Shared/ios/InteractionInformationRequest.h: Added.
1497 (WebKit::InteractionInformationRequest::InteractionInformationRequest):
1498 * WebKit2.xcodeproj/project.pbxproj:
1499 Add InteractionInformationRequest, which encapsulates all of the
1500 parameters required to generate an InteractionInformationAtPosition.
1501 Previously, that was just a point, but now we have two new parameters:
1502 whether we should generate a snapshot of the element, and whether
1503 we should generate a TextIndicator if the element is a link.
1505 * Shared/ios/InteractionInformationAtPosition.h:
1506 * Shared/ios/InteractionInformationAtPosition.mm:
1507 (WebKit::InteractionInformationAtPosition::encode):
1508 (WebKit::InteractionInformationAtPosition::decode):
1509 (WebKit::InteractionInformationAtPosition::mergeCompatibleOptionalInformation):
1510 Adopt InteractionInformationRequest.
1512 * UIProcess/WebPageProxy.h:
1513 * UIProcess/ios/WebPageProxyIOS.mm:
1514 (WebKit::WebPageProxy::getPositionInformation):
1515 (WebKit::WebPageProxy::requestPositionInformation):
1516 * UIProcess/ios/WKActionSheetAssistant.mm:
1517 (-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
1518 (-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
1519 (-[WKActionSheetAssistant showImageSheet]):
1520 (-[WKActionSheetAssistant showLinkSheet]):
1521 * UIProcess/ios/WKPDFView.mm:
1522 (-[WKPDFView annotation:isBeingPressedAtPoint:controller:]):
1523 * WebProcess/WebPage/WebPage.h:
1524 * WebProcess/WebPage/WebPage.messages.in:
1525 Adopt InteractionInformationRequest.
1527 * UIProcess/ios/WKContentViewInteraction.h:
1528 * UIProcess/ios/WKContentViewInteraction.mm:
1529 (-[WKContentView _showAttachmentSheet]):
1530 (-[WKContentView ensurePositionInformationIsUpToDate:]):
1531 If we have a outstanding asynchronous position information request
1532 for the current point, instead of sending a second separate request,
1533 just wait for the async one to come in.
1535 (-[WKContentView requestAsynchronousPositionInformationUpdate:]):
1536 If asked to do an asynchronous request with more optional bits than
1537 the current otherwise-valid response's request, update the position information.
1539 (-[WKContentView gestureRecognizerShouldBegin:]):
1540 The design of this mechanism is that during the highlight long press,
1541 we do an async position information update, and then when we actually
1542 begin a 3D Touch gesture, we hope to already have the requisite snapshots
1543 ready (so that we can avoid synchronously blocking for them, there).
1544 So, in the highlight long-press async request, ask for all the goodies.
1546 (-[WKContentView hasSelectablePositionAtPoint:]):
1547 (-[WKContentView pointIsNearMarkedText:]):
1548 (-[WKContentView pointIsInAssistedNode:]):
1549 (-[WKContentView _didNotHandleTapAsClick:]):
1550 (-[WKContentView _positionInformationDidChange:]):
1551 If we get a position information update for the same point, but with less
1552 goodies attached (the snapshot/link indicator), copy them over from the old
1553 position information, so that we never accidentally "downgrade" our info.
1555 (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
1556 (-[WKContentView actionSheetAssistant:willStartInteractionWithElement:]):
1557 (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
1558 (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
1559 (-[WKContentView _presentedViewControllerForPreviewItemController:]):
1562 * WebProcess/WebPage/ios/WebPageIOS.mm:
1563 (WebKit::WebPage::handleTap):
1564 (WebKit::WebPage::handleTwoFingerTapAtPoint):
1565 (WebKit::WebPage::commitPotentialTap):
1566 Adopt InteractionInformationRequest.
1568 (WebKit::WebPage::getPositionInformation):
1569 (WebKit::WebPage::requestPositionInformation):
1570 Copy the request into the response.
1571 Only snapshot if the request wants a snapshot.
1572 Only make a link indicator if the request wants one.
1574 2016-12-06 Daniel Bates <dabates@apple.com>
1576 Cleanup: Rename some HTTP 0.9-specific functions to conform to WebKit Code Style Guidelines
1577 https://bugs.webkit.org/show_bug.cgi?id=165451
1579 Reviewed by Alex Christensen.
1581 * NetworkProcess/NetworkDataTask.cpp:
1582 (WebKit::NetworkDataTask::didReceiveResponse):
1584 2016-12-06 Daniel Bates <dabates@apple.com>
1586 Remove unused InjectedBundle::overrideXSSAuditorEnabledForTestRunner()
1587 https://bugs.webkit.org/show_bug.cgi?id=165408
1589 Reviewed by Alex Christensen.
1591 InjectedBundle::overrideXSSAuditorEnabledForTestRunner() is unused. This function was only
1592 called by WKBundleOverrideXSSAuditorEnabledForTestRunner(), which was removed in r106005.
1594 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1595 (WebKit::InjectedBundle::overrideXSSAuditorEnabledForTestRunner): Deleted.
1596 * WebProcess/InjectedBundle/InjectedBundle.h:
1598 2016-12-04 Darin Adler <darin@apple.com>
1600 Use ASCIICType more, and improve it a little bit
1601 https://bugs.webkit.org/show_bug.cgi?id=165360
1603 Reviewed by Sam Weinig.
1605 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1606 (WebKit::capitalizeRFC822HeaderFieldName): Removed unneeded checks to simplify code.
1608 2016-12-06 Dave Hyatt <hyatt@apple.com>
1610 [CSS Parser] Turn on the new CSS parser
1611 https://bugs.webkit.org/show_bug.cgi?id=165213
1613 Reviewed by Zalan Bujtas.
1615 * Shared/WebPreferencesDefinitions.h:
1617 2016-12-06 Tomas Popela <tpopela@redhat.com>
1619 [GTK] Process accelerated compositing env variables only if they are really enabled
1620 https://bugs.webkit.org/show_bug.cgi?id=165300
1622 Don't process the WEBKIT_FORCE_COMPOSITING_MODE and
1623 WEBKIT_DISABLE_COMPOSITING_MODE env variables if they are disabled
1624 (eg. WEBKIT_DISABLE_COMPOSITING_MODE=0).
1626 Reviewed by Michael Catanzaro.
1628 * UIProcess/gtk/WebPreferencesGtk.cpp:
1629 (WebKit::WebPreferences::platformInitializeStore):
1631 2016-12-06 Sam Weinig <sam@webkit.org>
1633 [WebIDL] Add support for converting dictionaries to JS
1634 https://bugs.webkit.org/show_bug.cgi?id=165367
1636 Reviewed by Darin Adler and Alex Christensen.
1639 Add missing directories to look in for headers.
1641 2016-12-05 Tim Horton <timothy_horton@apple.com>
1643 Try to fix the iOS Simulator build.
1645 * UIProcess/mac/RemoteLayerTreeHost.mm:
1646 (WebKit::RemoteLayerTreeHost::mapAllIOSurfaceBackingStore):
1648 2016-12-03 Simon Fraser <simon.fraser@apple.com>
1650 Minor reformat and renames in -didUpdateVisibleRect:
1651 https://bugs.webkit.org/show_bug.cgi?id=165365
1653 Reviewed by Dave Hyatt.
1655 didUpdateVisibleRect:... has lots of parameters. Put one on each line.
1657 Rename the rects to make it clear they are "content" rects (i.e. in document coordinates).
1659 * UIProcess/ios/WKContentView.h:
1660 * UIProcess/ios/WKContentView.mm:
1661 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
1663 2016-12-05 Tim Horton <timothy_horton@apple.com>
1665 Adopt CAMachPort-as-layer-contents
1666 https://bugs.webkit.org/show_bug.cgi?id=141687
1667 <rdar://problem/19393233>
1669 Reviewed by Darin Adler.
1671 * Shared/mac/RemoteLayerBackingStore.h:
1672 * Shared/mac/RemoteLayerBackingStore.mm:
1673 (WebKit::RemoteLayerBackingStore::decode):
1674 On the UI process side, instead of actually looking up the surface,
1675 just keep the MachSendRight around, to later be turned into a CAMachPort.
1677 (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
1678 Make a CAMachPort and leak our send right into it. CAMachPort
1679 will adopt the port and destroy it when needed.
1681 (WebKit::RemoteLayerBackingStore::setBufferVolatility):
1684 * Shared/mac/RemoteLayerTreePropertyApplier.h:
1685 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1686 (WebKit::applyPropertiesToLayer):
1687 (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
1688 * UIProcess/DrawingAreaProxy.h:
1689 (WebKit::DrawingAreaProxy::prepareForAppSuspension):
1690 * UIProcess/ios/WebPageProxyIOS.mm:
1691 (WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground):
1692 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1693 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1694 (WebKit::RemoteLayerTreeDrawingAreaProxy::prepareForAppSuspension):
1695 * UIProcess/mac/RemoteLayerTreeHost.h:
1696 * UIProcess/mac/RemoteLayerTreeHost.mm:
1697 (WebKit::RemoteLayerTreeHost::updateLayerTree):
1698 (WebKit::RemoteLayerTreeHost::mapAllIOSurfaceBackingStore):
1699 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1700 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
1701 Two supporting changes in order to fix the two regressions that this
1702 caused when we tried to land it two years ago:
1704 When an app is being suspended, resolve all CAMachPort backing store
1705 into actual IOSurfaces. Otherwise, any live CAMachPorts will keep a
1706 +1 on their respective IOSurface's use count, causing us to fail to
1707 mark them volatile, keeping the app alive for more time (re-trying the
1708 volatility change), and increasing the likelihood of background jetsam.
1710 If the debugging tile map is enabled, do not use CAMachPort, because
1711 we don't have a great way to plumb the same CAMachPort to two layers
1712 (and it doesn't seem to work even if you do). Instead, just map the
1713 IOSurface into the UI process like we used to.
1715 2016-12-05 Dean Jackson <dino@apple.com>
1717 pointer lock needs to be feature detectable
1718 https://bugs.webkit.org/show_bug.cgi?id=165426
1719 <rdar://problem/29486715>
1721 Reviewed by Antoine Quint.
1723 Set the RuntimeEnabledFeature as preferences
1726 * UIProcess/API/C/WKPreferences.cpp:
1727 (WKPreferencesSetPointerLockEnabled):
1728 (WKPreferencesGetPointerLockEnabled):
1729 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1730 * WebProcess/WebPage/WebPage.cpp:
1731 (WebKit::WebPage::updatePreferences):
1733 2016-12-05 Andreas Kling <akling@apple.com>
1735 [Cocoa] Add some memory usage related information to sysdiagnose state dumps
1736 <https://webkit.org/b/165375>
1737 <rdar://problem/29057243>
1739 Reviewed by Darin Adler.
1741 Add two new entries to the sysdiagnose state dumps for WebContent processes:
1742 "Memory Usage Stats" and "JavaScript Object Counts".
1744 The first category contains all the interesting stuff from task_info()
1745 along with some WebCore and JavaScriptCore object/memory counters.
1747 The second category contains a list of all the JS object types currently live
1748 on the heap, along with a count.
1750 * WebProcess/cocoa/WebProcessCocoa.mm:
1751 (WebKit::WebProcess::registerWithStateDumper): Add two new entries to the
1752 state dictionary: "Memory Usage Stats" and "JavaScript Object Counts".
1754 2016-12-05 Csaba Osztrogonác <ossy@webkit.org>
1756 Unreviewed cmake buildfix after r209307.
1758 * PlatformMac.cmake:
1760 2016-12-03 Dan Bernstein <mitz@apple.com>
1762 [Cocoa] Expose InjectedBundlePageEditorClient via the Objective-C bundle SPI
1763 https://bugs.webkit.org/show_bug.cgi?id=165276
1764 <rdar://problem/29467040>
1766 Reviewed by Darin Adler.
1768 Test: TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm
1770 * Shared/Cocoa/APIObject.mm:
1771 (API::Object::newObject): Wrap InjectedBundleRangeHandle in WKWebProcessPlugInRangeHandle.
1773 * WebKit2.xcodeproj/project.pbxproj: Added references to new files, making
1774 WKWebProcessPlugInEditingDelegate.h and WKWebProcessPlugInRangeHandle.h private headers.
1776 * WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h: Added. An base class
1777 based on InjectedBundlePageEditorClient.
1778 (API::InjectedBundle::EditorClient::~EditorClient):
1779 (API::InjectedBundle::EditorClient::shouldBeginEditing):
1780 (API::InjectedBundle::EditorClient::shouldEndEditing):
1781 (API::InjectedBundle::EditorClient::shouldInsertNode):
1782 (API::InjectedBundle::EditorClient::shouldInsertText):
1783 (API::InjectedBundle::EditorClient::shouldDeleteRange):
1784 (API::InjectedBundle::EditorClient::shouldChangeSelectedRange):
1785 (API::InjectedBundle::EditorClient::shouldApplyStyle):
1786 (API::InjectedBundle::EditorClient::didBeginEditing):
1787 (API::InjectedBundle::EditorClient::didEndEditing):
1788 (API::InjectedBundle::EditorClient::didChange):
1789 (API::InjectedBundle::EditorClient::didChangeSelection):
1790 (API::InjectedBundle::EditorClient::willWriteToPasteboard):
1791 (API::InjectedBundle::EditorClient::getPasteboardDataForRange):
1792 (API::InjectedBundle::EditorClient::didWriteToPasteboard):
1794 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h: Added. Declares
1795 the new delegate protocol, currently comprising three methods corresponding to
1796 willWriteToPasteboard, getPasteboardDataForRange, and didWriteToPasteboard.
1798 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
1799 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1800 (-[WKWebProcessPlugInFrame jsRangeForRangeHandle:inWorld:]): Added. Gets the JS wrapper for
1801 the specified range handle.
1803 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h: Added.
1804 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm: Added.
1805 (-[WKWebProcessPlugInRangeHandle dealloc]): Call the InjectedBundleRangeHandle destructor.
1806 (+[WKWebProcessPlugInRangeHandle rangeHandleWithJSValue:inContext:]): Get or create an
1807 InjectedBundleRangeHandle for the specified object.
1808 (-[WKWebProcessPlugInRangeHandle frame]): Return the range’s owner document’s frame.
1809 (-[WKWebProcessPlugInRangeHandle _rangeHandle]): Return the InjectedBundleRangeHandle.
1810 (-[WKWebProcessPlugInRangeHandle _apiObject]): Ditto.
1812 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandleInternal.h: Added.
1815 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1816 (WKBundlePageSetEditorClient): Updated for WebPage change.
1818 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1819 (-[WKWebProcessPlugInBrowserContextController _editingDelegate]): Added. Returns the
1821 (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Added. Defines a
1822 Client class, which derives from API::InjectedBundle::EditorClient, and invokes the
1823 delegate methods. Instantiates a Client and sets it on the WebPage.
1825 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
1826 Declared new _editingDelegate property.
1828 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1829 (WebKit::InjectedBundleRangeHandle::document): Added. Returns an InjectedBundleNodeHandle
1830 for the range’s owner document.
1831 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
1833 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
1834 (WebKit::InjectedBundlePageEditorClient::InjectedBundlePageEditorClient): Added. Calls
1836 (WebKit::InjectedBundlePageEditorClient::shouldBeginEditing): Updated for type change.
1837 (WebKit::InjectedBundlePageEditorClient::shouldEndEditing): Ditto.
1838 (WebKit::InjectedBundlePageEditorClient::shouldInsertNode): Ditto.
1839 (WebKit::InjectedBundlePageEditorClient::shouldInsertText): Ditto.
1840 (WebKit::InjectedBundlePageEditorClient::shouldDeleteRange): Ditto.
1841 (WebKit::InjectedBundlePageEditorClient::shouldChangeSelectedRange): Ditto.
1842 (WebKit::InjectedBundlePageEditorClient::shouldApplyStyle): Ditto.
1843 (WebKit::InjectedBundlePageEditorClient::didBeginEditing): Ditto.
1844 (WebKit::InjectedBundlePageEditorClient::didEndEditing): Ditto.
1845 (WebKit::InjectedBundlePageEditorClient::didChange): Ditto.
1846 (WebKit::InjectedBundlePageEditorClient::didChangeSelection): Ditto.
1847 (WebKit::InjectedBundlePageEditorClient::willWriteToPasteboard): Ditto.
1848 (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange): Ditto.
1849 (WebKit::InjectedBundlePageEditorClient::didWriteToPasteboard): Ditto.
1850 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: Now derives from
1851 API::InjectedBundle::EditorClient.
1853 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1854 (WebKit::WebEditorClient::shouldDeleteRange): Ditto.
1855 (WebKit::WebEditorClient::shouldBeginEditing): Ditto.
1856 (WebKit::WebEditorClient::shouldEndEditing): Ditto.
1857 (WebKit::WebEditorClient::shouldInsertNode): Ditto.
1858 (WebKit::WebEditorClient::shouldInsertText): Ditto.
1859 (WebKit::WebEditorClient::shouldChangeSelectedRange): Ditto.
1860 (WebKit::WebEditorClient::shouldApplyStyle): Ditto.
1861 (WebKit::WebEditorClient::didBeginEditing): Ditto.
1862 (WebKit::WebEditorClient::respondToChangedContents): Ditto.
1863 (WebKit::WebEditorClient::respondToChangedSelection): Ditto.
1864 (WebKit::WebEditorClient::didEndEditing): Ditto.
1865 (WebKit::WebEditorClient::didWriteSelectionToPasteboard): Ditto.
1866 (WebKit::WebEditorClient::willWriteSelectionToPasteboard): Ditto.
1867 (WebKit::WebEditorClient::getClientPasteboardDataForRange): Ditto.
1869 * WebProcess/WebPage/WebPage.cpp:
1870 (WebKit::WebPage::WebPage): Initialize m_editorClient.
1871 (WebKit::WebPage::setInjectedBundleEditorClient): Replaces
1872 initializeInjectedBundleEditorClient and just sets m_editorClient.
1873 (WebKit::WebPage::close): Resets m_editorClient.
1875 * WebProcess/WebPage/WebPage.h: Changed m_editorClient to a unique_ptr.
1877 2016-12-02 Said Abou-Hallawa <sabouhallawa@apple.com>
1879 [iOS] Add a WebView private configuration for changing the WebContent update frequency
1880 https://bugs.webkit.org/show_bug.cgi?id=165289
1881 <rdar://problem/29472577>
1883 Reviewed by Tim Horton.
1885 Expose a preference which allows us to control the fps of web content updates.
1887 * UIProcess/API/APIPageConfiguration.h:
1888 (API::PageConfiguration::contentUpdateFrequency):
1889 (API::PageConfiguration::setContentUpdateFrequency):
1890 * UIProcess/API/Cocoa/WKWebView.mm:
1891 (-[WKWebView _initializeWithConfiguration:]):
1892 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1893 (-[WKWebViewConfiguration copyWithZone:]):
1894 (-[WKWebViewConfiguration _contentUpdateFrequency]):
1895 (-[WKWebViewConfiguration _setContentUpdateFrequency:]):
1896 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1897 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1898 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1899 (-[WKOneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
1900 (WebKit::RemoteLayerTreeDrawingAreaProxy::contentUpdateFrequency):
1902 2016-12-02 Andy Estes <aestes@apple.com>
1904 [Cocoa] Adopt the PRODUCT_BUNDLE_IDENTIFIER build setting
1905 https://bugs.webkit.org/show_bug.cgi?id=164492
1907 Reviewed by Dan Bernstein.
1909 * Configurations/DatabaseService.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
1911 * Configurations/NetworkService.xcconfig: Ditto.
1912 * Configurations/PluginService.32.xcconfig: Ditto.
1913 * Configurations/PluginService.64.xcconfig: Ditto.
1914 * Configurations/WebContentService.xcconfig: Ditto.
1915 * Configurations/WebKit.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
1916 com.apple.$(PRODUCT_NAME:rfc1034identifier).
1917 * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist: Changed
1918 CFBundleIdentifier's value from ${PRODUCT_NAME} to ${PRODUCT_BUNDLE_IDENTIFIER}.
1919 * Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to
1920 ${PRODUCT_BUNDLE_IDENTIFIER}.
1921 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Changed
1922 CFBundleIdentifier's value from ${PRODUCT_NAME} to ${PRODUCT_BUNDLE_IDENTIFIER}.
1923 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist: Ditto.
1924 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist: Ditto.
1925 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Ditto.
1926 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: Ditto.
1927 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Ditto.
1928 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist: Ditto.
1929 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: Ditto.
1931 2016-12-02 Brent Fulgham <bfulgham@apple.com>
1933 [Mac] Update sandbox profiles to use modern syntax and avoid duplication
1934 https://bugs.webkit.org/show_bug.cgi?id=165332
1935 <rdar://problem/26898991>
1937 Reviewed by Anders Carlsson.
1939 Update the Mac sandbox profiles to reflect that modern Cocoa applications
1940 communicate with cfprefsd, rather than plists on disk (and have done so
1941 for the past several releases).
1943 Get rid of some duplicated rules, as well as old compatibility rules that
1944 are never triggered under supported operating systems.
1946 * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
1947 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1948 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1949 * WebProcess/com.apple.WebProcess.sb.in:
1951 2016-12-02 Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
1953 Fix build break when disabling some features.
1954 https://bugs.webkit.org/show_bug.cgi?id=165254
1956 The EFL port was broken if SPELLCHECK was disabled or
1957 PLUGIN_ARCHITECTURE is not x11.
1959 Reviewed by Michael Catanzaro.
1961 * UIProcess/efl/TextCheckerEfl.cpp:
1962 (WebKit::TextChecker::checkTextOfParagraph):
1963 (WebKit::TextChecker::checkSpellingOfString):
1964 Fix UNUSED_PARAM() usage if SPELLCHECK is disabled.
1965 * UIProcess/efl/WebPageProxyEfl.cpp:
1966 Isolate methods within #if PLUGIN_ARCHITECTURE(X11).
1968 2016-12-01 Jiewen Tan <jiewen_tan@apple.com>
1970 Add a runtime flag for SubtleCrypto
1971 https://bugs.webkit.org/show_bug.cgi?id=164982
1973 Reviewed by Brent Fulgham.
1975 * Shared/WebPreferencesDefinitions.h:
1976 * UIProcess/API/C/WKPreferences.cpp:
1977 (WKPreferencesSetSubtleCryptoEnabled):
1978 (WKPreferencesGetSubtleCryptoEnabled):
1979 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1980 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1981 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1982 * WebProcess/WebPage/WebPage.cpp:
1983 (WebKit::WebPage::updatePreferences):
1985 2016-12-01 Saam Barati <sbarati@apple.com>
1987 Rename CallFrame::callee() to CallFrame::jsCallee()
1988 https://bugs.webkit.org/show_bug.cgi?id=165293
1990 Reviewed by Keith Miller.
1992 * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1993 (WebKit::callMethod):
1994 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1995 (WebKit::callNPJSObject):
1996 (WebKit::constructWithConstructor):
1998 2016-12-01 Chris Dumez <cdumez@apple.com>
2000 [iOS][WK2] Tapping an element generates a 'click' event that has 0 as timeStamp
2001 https://bugs.webkit.org/show_bug.cgi?id=165270
2002 <rdar://problem/29224355>
2004 Reviewed by Simon Fraser.
2006 Tapping an element generates a 'click' event that has 0 as timeStamp
2007 instead of having a proper timeStamp value. This is breaking some
2010 * WebProcess/WebPage/ios/WebPageIOS.mm:
2011 (WebKit::WebPage::handleSyntheticClick):
2012 (WebKit::WebPage::completeSyntheticClick):
2014 2016-12-01 Tim Horton <timothy_horton@apple.com>
2016 Try to fix the EFL/Gtk build
2018 * UIProcess/efl/WebProcessPoolEfl.cpp:
2019 (WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
2020 * UIProcess/gtk/WebProcessPoolGtk.cpp:
2021 (WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
2023 2016-12-01 Tim Horton <timothy_horton@apple.com>
2025 Every WKWebView initialization spends a few milliseconds hitting the disk
2026 https://bugs.webkit.org/show_bug.cgi?id=165268
2027 <rdar://problem/29010113>
2029 Reviewed by Brady Eidson.
2031 Every WKWebView init currently involves doing directory creation and
2032 symlink resolution for a number of paths (to create sandbox extensions
2033 for all of our storage directories), which means touching the disk a
2034 lot during init. All of these paths are immutable per-WebProcessPool,
2035 so, instead, cache them on WebProcessPool and create sandbox extensions
2036 from the already-resolved paths. This is a sizable (~4x) speedup when
2037 initializing subsequent web views.
2039 * Shared/SandboxExtension.h:
2040 (WebKit::SandboxExtension::createHandleWithoutResolvingPath):
2041 Add createHandleWithoutResolvingPath, which makes a sandbox extension
2042 handle without doing symlink resolution.
2044 (WebKit::resolvePathForSandboxExtension):
2045 (WebKit::resolveAndCreateReadWriteDirectoryForSandboxExtension):
2046 Add two functions that do the same resolution that SandboxExtension::createHandle
2047 and ::createHandleForReadWriteDirectory do, but just return the paths,
2048 for later use with createHandleWithoutResolvingPath.
2050 * Shared/mac/SandboxExtensionMac.mm:
2051 (WebKit::resolveAndCreateReadWriteDirectoryForSandboxExtension):
2052 (WebKit::resolvePathForSandboxExtension):
2053 (WebKit::SandboxExtension::createHandleWithoutResolvingPath):
2054 (WebKit::SandboxExtension::createHandle):
2055 (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
2056 Implement the aforementioned functions, and reimplement the existing
2057 createHandle{ForReadWriteDirectory} functions in terms of them.
2059 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2060 (WebKit::WebProcessPool::platformDefaultIconDatabasePath):
2061 Stop wasting time generating and resolving a platform default icon
2062 database path, since we don't actually use it for anything anymore except
2063 to determine whether the icon database is enabled, and we only want to
2064 enable it if the client has provided a path.
2066 (WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
2067 (WebKit::WebProcessPool::platformInitializeWebProcess):
2068 * UIProcess/WebProcessPool.cpp:
2069 (WebKit::m_hiddenPageThrottlingTimer):
2070 (WebKit::WebProcessPool::resolvePathsForSandboxExtensions):
2071 (WebKit::WebProcessPool::createNewWebProcess):
2072 * UIProcess/WebProcessPool.h:
2073 Resolve paths in resolvePathsForSandboxExtensions, and use the resolved
2074 paths along with createHandleWithoutResolvingPath in order to effectively
2075 cache the resolution operation.
2077 2016-12-01 Antti Koivisto <antti@apple.com>
2080 https://bugs.webkit.org/show_bug.cgi?id=164924
2084 * NetworkProcess/cache/NetworkCache.cpp:
2085 (WebKit::NetworkCache::makeCacheKey):
2086 (WebKit::NetworkCache::Cache::makeCacheKey): Deleted.
2087 * NetworkProcess/cache/NetworkCache.h:
2088 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
2089 (WebKit::NetworkCache::BlobStorage::BlobStorage):
2090 (WebKit::NetworkCache::BlobStorage::add):
2091 (WebKit::NetworkCache::BlobStorage::get):
2092 * NetworkProcess/cache/NetworkCacheBlobStorage.h:
2093 * NetworkProcess/cache/NetworkCacheData.cpp:
2094 (WebKit::NetworkCache::computeSHA1):
2095 (WebKit::NetworkCache::makeSalt): Deleted.
2096 (WebKit::NetworkCache::readOrMakeSalt): Deleted.
2097 * NetworkProcess/cache/NetworkCacheData.h:
2098 * NetworkProcess/cache/NetworkCacheKey.cpp:
2099 (WebKit::NetworkCache::noPartitionString):
2100 (WebKit::NetworkCache::Key::Key):
2101 (WebKit::NetworkCache::Key::hasPartition):
2102 (WebKit::NetworkCache::Key::computeHash):
2103 (WebKit::NetworkCache::Key::hashAsString):
2104 (WebKit::NetworkCache::Key::computePartitionHash): Deleted.
2105 * NetworkProcess/cache/NetworkCacheKey.h:
2106 (WebKit::NetworkCache::Key::hash):
2107 (WebKit::NetworkCache::Key::partitionHash): Deleted.
2108 (WebKit::NetworkCache::Key::hashAsString): Deleted.
2109 (WebKit::NetworkCache::Key::partitionHashAsString): Deleted.
2110 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2111 (WebKit::NetworkCache::makeSubresourcesKey):
2112 (WebKit::NetworkCache::constructRevalidationRequest):
2113 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
2114 (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
2115 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2116 (WebKit::NetworkCache::Storage::open):
2117 (WebKit::NetworkCache::traverseRecordsFiles):
2118 (WebKit::NetworkCache::Storage::Storage):
2119 (WebKit::NetworkCache::Storage::recordDirectoryPathForKey):
2120 (WebKit::NetworkCache::decodeRecordHeader):
2121 (WebKit::NetworkCache::Storage::readRecord):
2122 (WebKit::NetworkCache::Storage::encodeRecord):
2123 (WebKit::NetworkCache::Storage::traverse):
2124 (WebKit::NetworkCache::makeSaltFilePath): Deleted.
2125 * NetworkProcess/cache/NetworkCacheStorage.h:
2126 (WebKit::NetworkCache::Storage::salt): Deleted.
2128 2016-11-30 Sam Weinig <sam@webkit.org>
2130 [WebIDL] Remove custom bindings for File and Blob constructors
2131 https://bugs.webkit.org/show_bug.cgi?id=165218
2133 Reviewed by Darin Adler.
2135 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2136 (WebKit::NetworkBlobRegistry::registerBlobURL):
2137 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
2138 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2139 (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
2140 * NetworkProcess/NetworkConnectionToWebProcess.h:
2141 * WebProcess/FileAPI/BlobRegistryProxy.cpp:
2142 (WebKit::BlobRegistryProxy::registerBlobURL):
2143 * WebProcess/FileAPI/BlobRegistryProxy.h:
2144 Avoid copies of the BlobPart Vector.
2146 2016-11-30 Carlos Garcia Campos <cgarcia@igalia.com>
2148 [GTK] UI process crash in WebKit::WaylandCompositor::Surface::prepareTextureForPainting
2149 https://bugs.webkit.org/show_bug.cgi?id=164911
2151 Reviewed by Michael Catanzaro.
2153 The problem is that m_buffer is nullptr in Surface::prepareTextureForPainting() even though we have already an
2154 image. We only use the buffer to get the image size, so we could save the image size when the image is created,
2155 and then we don't need to care about the buffer anymore.
2157 * UIProcess/gtk/WaylandCompositor.cpp:
2158 (WebKit::WaylandCompositor::Surface::prepareTextureForPainting):
2159 (WebKit::WaylandCompositor::Surface::commit):
2160 * UIProcess/gtk/WaylandCompositor.h:
2162 2016-11-30 Antoine Quint <graouts@apple.com>
2164 [Modern Media Controls] Add an HTML comment flag to turn the feature on
2165 https://bugs.webkit.org/show_bug.cgi?id=165226
2167 Reviewed by Dean Jackson.
2169 Add new methods to set the Modern Media Controls preference.
2171 * UIProcess/API/C/WKPreferences.cpp:
2172 (WKPreferencesSetModernMediaControlsEnabled):
2173 (WKPreferencesGetModernMediaControlsEnabled):
2174 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2176 2016-11-30 Said Abou-Hallawa <sabouhallawa@apple.com>
2178 Add separate settings and preferences to enable/disable async decoding for large images and animated images
2179 https://bugs.webkit.org/show_bug.cgi?id=165177
2181 Reviewed by Simon Fraser.
2183 Hook up the async image decoding settings for WebKit2.
2185 * Shared/WebPreferencesDefinitions.h:
2186 * UIProcess/API/Cocoa/WKPreferences.mm:
2187 (-[WKPreferences _largeImageAsyncDecodingEnabled]):
2188 (-[WKPreferences _setLargeImageAsyncDecodingEnabled:]):
2189 (-[WKPreferences _animatedImageAsyncDecodingEnabled]):
2190 (-[WKPreferences _setAnimatedImageAsyncDecodingEnabled:]):
2191 (-[WKPreferences _asyncImageDecodingEnabled]): Deleted.
2192 (-[WKPreferences _setAsyncImageDecodingEnabled:]): Deleted.
2193 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2194 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2195 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2196 * WebProcess/WebPage/WebPage.cpp:
2197 (WebKit::WebPage::updatePreferences):
2199 2016-11-30 Chris Dumez <cdumez@apple.com>
2201 [iOS][WK2] Turn on HTML interactive form validation feature
2202 https://bugs.webkit.org/show_bug.cgi?id=165212
2203 <rdar://problem/29444356>
2205 Reviewed by Simon Fraser.
2207 Turn on HTML interactive form validation feature on iOS WK2
2208 now that we have a native UI.
2210 * Shared/WebPreferencesDefinitions.h:
2212 2016-11-30 Brent Fulgham <bfulgham@apple.com>
2214 Correct plugin sandbox after r208611
2215 https://bugs.webkit.org/show_bug.cgi?id=165187
2216 <rdar://problem/29431165>
2218 Reviewed by Alex Christensen.
2220 In r208611 I removed the 'else' clause of a Scheme conditional
2221 that was needed to properly run plugins (such as Flash Player).
2223 This change retains the relevant current sandbox content, while
2224 still stripping out the old code that is no longer needed.
2226 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2228 2016-11-29 Carlos Garcia Campos <cgarcia@igalia.com>
2230 [GTK] Database process should not initialize gtk
2231 https://bugs.webkit.org/show_bug.cgi?id=165138
2233 Reviewed by Sergio Villar Senin.
2235 It doesn't use GTK+ at all.
2237 * DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp:
2238 (WebKit::DatabaseProcessMainUnix):
2241 2016-11-29 Gavin Barraclough <barraclough@apple.com>
2243 Remove WebPage::SetPageSuppressed
2244 https://bugs.webkit.org/show_bug.cgi?id=165158
2246 Unreviewed revert accidental change.
2248 * WebProcess/WebPage/WebPage.cpp:
2249 (WebKit::WebPage::setActivityState):
2251 2016-11-29 Gavin Barraclough <barraclough@apple.com>
2253 Remove WebPage::SetPageSuppressed
2254 https://bugs.webkit.org/show_bug.cgi?id=165158
2256 Reviewed by Tim Horton.
2258 This was scaffolding. We've now refactored to the point that the information driving throttling originates
2259 from the UI process (so UI and web processes can have a consistent view of what should throttle), but we
2260 don't need a separate message to handle this - necessary state to determine is provided in ActivityState.
2262 * UIProcess/WebPageProxy.cpp:
2263 (WebKit::WebPageProxy::updateThrottleState):
2264 - used to send SetPageSuppressed; no longer does.
2265 * UIProcess/WebPageProxy.h:
2266 - removed m_pageSuppressed (was used to avoid duplicated messages).
2267 * WebProcess/WebPage/WebPage.cpp:
2268 (WebKit::WebPage::updateThrottleState):
2269 - compute throttle state based on m_activityState.
2270 (WebKit::WebPage::setActivityState):
2271 - update throttle state whenever activity state changes.
2272 (WebKit::WebPage::updatePreferences):
2273 - update throttle state whenever preferences change (throttling can be disabled via preference).
2274 (WebKit::WebPage::setPageSuppressed): Deleted.
2275 - Removed WebPage::SetPageSuppressed.
2276 * WebProcess/WebPage/WebPage.h:
2277 - Removed WebPage::SetPageSuppressed.
2278 - Added m_processSuppressionEnabled, to cache preference state.
2279 * WebProcess/WebPage/WebPage.messages.in:
2280 - Removed WebPage::SetPageSuppressed.
2282 2016-11-29 Andy Estes <aestes@apple.com>
2284 [Cocoa] Enable two clang warnings recommended by Xcode
2285 https://bugs.webkit.org/show_bug.cgi?id=164498
2287 Reviewed by Mark Lam.
2289 * Configurations/Base.xcconfig: Enabled CLANG_WARN_INFINITE_RECURSION and CLANG_WARN_SUSPICIOUS_MOVE.
2291 2016-11-29 Eric Carlson <eric.carlson@apple.com>
2293 [MediaStream] Don't request user permission for a device if it has already been granted in the current browsing context
2294 https://bugs.webkit.org/show_bug.cgi?id=164760
2295 <rdar://problem/29261266>
2297 Reviewed by Youenn Fablet.
2299 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2300 (WebKit::FrameAuthorizationState::FrameAuthorizationState):
2301 (WebKit::FrameAuthorizationState::hasPermissionToUseCaptureDevice):
2302 (WebKit::FrameAuthorizationState::setHasPermissionToUseCaptureDevice):
2303 (WebKit::FrameAuthorizationState::reset):
2304 (WebKit::FrameAuthorizationState::securityOriginsAreEqual):
2305 (WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest):
2306 (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests):
2307 (WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
2308 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
2309 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
2310 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2311 * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2312 (WebKit::FrameAuthorizationState::~FrameAuthorizationState):
2313 (WebKit::FrameAuthorizationState::frameID):
2314 * UIProcess/UserMediaPermissionRequestProxy.cpp:
2315 (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
2316 * UIProcess/UserMediaPermissionRequestProxy.h:
2317 (WebKit::UserMediaPermissionRequestProxy::create):
2318 (WebKit::UserMediaPermissionRequestProxy::frameID):
2319 (WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin):
2320 (WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin):
2321 * UIProcess/WebPageProxy.cpp:
2322 (WebKit::WebPageProxy::didCommitLoadForFrame):
2323 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2324 (WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps):
2326 2016-11-29 Wenson Hsieh <wenson_hsieh@apple.com>
2328 Scroll snapping on Mac should use AppKit animations
2329 https://bugs.webkit.org/show_bug.cgi?id=147261
2330 <rdar://problem/29395293>
2332 Reviewed by Brent Fulgham.
2334 Add some logic to plumb filtered wheel velocity over to WebCore in the case of mainframe scrolling. See
2335 WebCore/ChangeLog for more details.
2337 * WebProcess/WebPage/EventDispatcher.cpp:
2338 (WebKit::EventDispatcher::wheelEvent):
2340 2016-11-21 Brian Burg <bburg@apple.com>
2342 Web Automation: add ObjC SPI to set whether a page is controlled by automation
2343 https://bugs.webkit.org/show_bug.cgi?id=165001
2344 <rdar://problem/29350432>
2346 Reviewed by Dan Bernstein.
2348 Add SPI property to WKWebViewConfiguration and plumb it through to
2349 initialize WebPageProxy::m_controlledByAutomation. This is propagated
2350 to the WebProcess on creation via WebPageCreationParameters.
2352 * UIProcess/API/APIPageConfiguration.cpp:
2353 (API::PageConfiguration::copy):
2354 * UIProcess/API/APIPageConfiguration.h:
2355 (API::PageConfiguration::isControlledByAutomation):
2356 (API::PageConfiguration::setControlledByAutomation):
2357 * UIProcess/API/Cocoa/WKWebView.mm:
2358 (-[WKWebView _initializeWithConfiguration:]):
2359 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2360 (-[WKWebViewConfiguration init]):
2361 (-[WKWebViewConfiguration copyWithZone:]):
2362 (-[WKWebViewConfiguration _isControlledByAutomation]):
2363 (-[WKWebViewConfiguration _setControlledByAutomation:]):
2364 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2365 * UIProcess/WebPageProxy.cpp:
2366 (WebKit::WebPageProxy::WebPageProxy):
2368 2016-11-28 Carlos Garcia Campos <cgarcia@igalia.com>
2370 [GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
2371 https://bugs.webkit.org/show_bug.cgi?id=164303
2373 Reviewed by Michael Catanzaro.
2375 Trap also BadDrawable and BadDamage X errors when creating the surface and damage.
2377 * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
2378 (WebKit::AcceleratedBackingStoreX11::update):
2380 2016-11-28 Chris Dumez <cdumez@apple.com>
2382 [Mac][WK2] Enable HTML interactive form validation
2383 https://bugs.webkit.org/show_bug.cgi?id=165123
2384 <rdar://problem/28944652>
2386 Reviewed by Simon Fraser.
2388 Enable HTML interactive form validation now that we have a native UI
2391 * Shared/WebPreferencesDefinitions.h:
2393 2016-11-28 Brent Fulgham <bfulgham@apple.com>
2395 Generated sandbox profile is not being put in the correct Resources directory
2396 https://bugs.webkit.org/show_bug.cgi?id=165126
2398 Reviewed by Tim Horton.
2400 * WebKit2.xcodeproj/project.pbxproj: Copy the generated file to the 'PlugInSandboxProfiles'
2403 2016-11-28 Ryan Haddad <ryanhaddad@apple.com>
2405 Unreviewed, rolling out r209008.
2407 This change appears to have caused two fast/mediastrem
2408 LayoutTests to fail.
2412 "[MediaStream] Don't request user permission for a device if
2413 it has already been granted in the current browsing context"
2414 https://bugs.webkit.org/show_bug.cgi?id=164760
2415 http://trac.webkit.org/changeset/209008
2417 2016-11-28 Andrew Gold <agold@apple.com>
2419 Support for HTML Media Capture API
2420 https://bugs.webkit.org/show_bug.cgi?id=43239
2422 Reviewed by Tim Horton.
2424 In order to enable media capture on iOS, we must first use the AVFoundation API to
2425 check/request capture permission from the user for Safari. Then, Safari must request
2426 permission on behalf of the webpage to use the capture devices. Additionally, Safari
2427 must present UI when the capture is taking place, so WebKit needs to notify the client
2428 of a capture session beginning and ending. To do this, we added four methods to
2429 WKUIDelegatePrivate to request permission from the user, check for permissions, notify
2430 that a capture session has begun, and notify that a capture session has ended. Additionally,
2431 we added a private method to WKWebView that allows the client to stop a capture session.
2433 * UIProcess/API/APIUIClient.h:
2434 (API::UIClient::didBeginCaptureSession): Notifies the client of a capture session beginning.
2435 (API::UIClient::didEndCaptureSession): Notifies the client of a capture session ending.
2437 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added new delegate methods to request permission,
2438 check for permission, notify of a capture session beginning, and notify of a capture session
2441 * UIProcess/API/Cocoa/WKWebView.mm:
2442 (-[WKWebView _stopMediaCapture]): Cancels a media capture session.
2443 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2445 * UIProcess/Cocoa/UIDelegate.h:
2446 * UIProcess/Cocoa/UIDelegate.mm:
2447 (WebKit::UIDelegate::setDelegate): Added the new delegate methods.
2448 (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
2449 First checks if the user has authorized the client application access capture devices,
2450 then uses the WKUIDelegate to request permission for a site from the user.
2451 (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin): Checks the client
2452 for permission to access capture devices.
2453 (WebKit::UIDelegate::UIClient::didBeginCaptureSession): Notifies the client of a capture
2455 (WebKit::UIDelegate::UIClient::didEndCaptureSession): Notifies the client of a capture
2458 * UIProcess/WebPageProxy.cpp:
2459 (WebKit::WebPageProxy::isPlayingMediaDidChange): Calls UIDelegate method to notify the
2460 client of a capture session beginning/ending.
2462 2016-11-28 Eric Carlson <eric.carlson@apple.com>
2464 [MediaStream] Don't request user permission for a device if it has already been granted in the current browsing context
2465 https://bugs.webkit.org/show_bug.cgi?id=164760
2466 <rdar://problem/29261266>
2468 Reviewed by Youenn Fablet.
2470 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2471 (WebKit::FrameAuthorizationState::FrameAuthorizationState):
2472 (WebKit::FrameAuthorizationState::hasPermissionToUseCaptureDevice):
2473 (WebKit::FrameAuthorizationState::setHasPermissionToUseCaptureDevice):
2474 (WebKit::FrameAuthorizationState::reset):
2475 (WebKit::FrameAuthorizationState::securityOriginsAreEqual):
2476 (WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest):
2477 (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests):
2478 (WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
2479 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
2480 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
2481 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2482 * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2483 (WebKit::FrameAuthorizationState::~FrameAuthorizationState):
2484 (WebKit::FrameAuthorizationState::frameID):
2485 * UIProcess/UserMediaPermissionRequestProxy.cpp:
2486 (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
2487 * UIProcess/UserMediaPermissionRequestProxy.h:
2488 (WebKit::UserMediaPermissionRequestProxy::create):
2489 (WebKit::UserMediaPermissionRequestProxy::frameID):
2490 (WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin):
2491 (WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin):
2492 * UIProcess/WebPageProxy.cpp:
2493 (WebKit::WebPageProxy::didCommitLoadForFrame):
2494 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2495 (WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps):
2497 2016-11-27 Dean Jackson <dino@apple.com>
2499 Removed a WTFLogAlways I left in with a recent commit.
2501 * UIProcess/Cocoa/WebViewImpl.mm:
2502 (-[WKAccessibilitySettingsObserver _settingsDidChange:]):
2504 2016-11-27 Csaba Osztrogonác <ossy@webkit.org>
2506 Fix unused-private-field build warning in WebKit2/Platform/SharedMemory.h
2507 https://bugs.webkit.org/show_bug.cgi?id=165069
2509 Reviewed by Darin Adler.
2511 * Platform/SharedMemory.h:
2513 2016-11-26 Simon Fraser <simon.fraser@apple.com>
2517 * WebProcess/WebPage/ios/WebPageIOS.mm:
2518 (WebKit::WebPage::eventThrottlingDelay):
2520 2016-11-26 Yusuke Suzuki <utatane.tea@gmail.com>
2522 [WTF] Import std::optional reference implementation as WTF::Optional
2523 https://bugs.webkit.org/show_bug.cgi?id=164199
2525 Reviewed by Saam Barati and Sam Weinig.
2527 * NetworkProcess/NetworkDataTask.cpp:
2528 (WebKit::NetworkDataTask::didReceiveResponse):
2529 * NetworkProcess/NetworkLoad.h:
2530 * NetworkProcess/cache/NetworkCache.cpp:
2531 (WebKit::NetworkCache::responseHasExpired):
2532 * NetworkProcess/cache/NetworkCacheCoders.h:
2533 (WebKit::NetworkCache::Coder<std::optional<T>>::encode):
2534 (WebKit::NetworkCache::Coder<std::optional<T>>::decode):
2535 (WebKit::NetworkCache::Coder<Optional<T>>::encode): Deleted.
2536 (WebKit::NetworkCache::Coder<Optional<T>>::decode): Deleted.
2537 * NetworkProcess/cache/NetworkCacheData.cpp:
2538 (WebKit::NetworkCache::readOrMakeSalt):
2539 * NetworkProcess/cache/NetworkCacheData.h:
2540 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2541 (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
2542 (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::revalidationRequest):
2543 (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
2544 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
2545 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2546 (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
2547 (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
2548 (WebKit::NetworkCache::Statistics::queryWasEverRequested):
2549 * NetworkProcess/cache/NetworkCacheStatistics.h:
2550 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2551 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2552 (WebKit::NetworkCache::Storage::encodeRecord):
2553 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2554 * NetworkProcess/cache/NetworkCacheStorage.h:
2555 * Platform/IPC/ArgumentCoders.h:
2556 (IPC::ArgumentCoder<std::optional<T>>::encode):
2557 (IPC::ArgumentCoder<std::optional<T>>::decode):
2558 (IPC::ArgumentCoder<WTF::Optional<T>>::encode): Deleted.
2559 (IPC::ArgumentCoder<WTF::Optional<T>>::decode): Deleted.
2560 * Platform/IPC/Connection.h:
2561 (IPC::Connection::sendWithReply):
2562 * Platform/SharedMemory.h:
2563 * Platform/unix/SharedMemoryUnix.cpp:
2564 (WebKit::SharedMemory::map):
2565 * Scripts/webkit/messages.py:
2566 (class_template_headers):
2567 * Shared/API/APISecurityOrigin.h:
2568 (API::SecurityOrigin::create):
2569 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
2570 * Shared/API/c/WKSecurityOriginRef.cpp:
2571 (WKSecurityOriginGetPort):
2572 * Shared/SessionState.h:
2573 * Shared/WebPageCreationParameters.h:
2574 * Shared/mac/ObjCObjectGraph.mm:
2575 (WebKit::typeFromObject):
2576 * Shared/mac/SecItemShim.cpp:
2577 (WebKit::sendSecItemRequest):
2578 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
2579 (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
2580 * UIProcess/API/Cocoa/WKSecurityOrigin.mm:
2581 (-[WKSecurityOrigin port]):
2582 * UIProcess/API/Cocoa/WKWebView.mm:
2583 (-[WKWebView _didCommitLayerTree:]):
2584 (-[WKWebView _navigationGestureDidEnd]):
2585 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2586 (WebKit::toWebsiteDataType):
2587 * UIProcess/API/efl/EwkView.cpp:
2588 (EwkView::setCursor):
2589 * UIProcess/API/mac/WKView.mm:
2590 (toCoreScrollbarStyle):
2591 (toAPIScrollbarStyle):
2592 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
2593 (WebKit::WebPaymentCoordinatorProxy::completeShippingMethodSelection):
2594 (WebKit::WebPaymentCoordinatorProxy::completeShippingContactSelection):
2595 (WebKit::WebPaymentCoordinatorProxy::completePaymentMethodSelection):
2596 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
2597 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
2598 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2599 (WebKit::toPKPaymentSummaryItem):
2600 (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection):
2601 (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
2602 (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):
2603 * UIProcess/Automation/WebAutomationSession.cpp:
2604 (WebKit::WebAutomationSession::webFrameIDForHandle):
2605 (WebKit::WebAutomationSession::switchToBrowsingContext):
2606 (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
2607 (WebKit::WebAutomationSession::resolveChildFrameHandle):
2608 (WebKit::WebAutomationSession::resolveParentFrameHandle):
2609 (WebKit::WebAutomationSession::computeElementLayout):
2610 * UIProcess/Automation/WebAutomationSession.h:
2611 * UIProcess/Cocoa/WebViewImpl.h:
2612 * UIProcess/Cocoa/WebViewImpl.mm:
2613 (WebKit::WebViewImpl::updateViewExposedRect):
2614 (WebKit::WebViewImpl::setOverlayScrollbarStyle):
2615 (WebKit::WebViewImpl::overlayScrollbarStyle):
2616 * UIProcess/DrawingAreaProxy.cpp:
2617 (WebKit::DrawingAreaProxy::setViewExposedRect):
2618 * UIProcess/DrawingAreaProxy.h:
2619 (WebKit::DrawingAreaProxy::viewExposedRect):
2620 * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
2621 (WebKit::WebSocketServerConnection::didReceiveSocketStreamData):
2622 * UIProcess/InspectorServer/WebSocketServerConnection.h:
2623 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2624 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
2625 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2626 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2627 (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
2628 * UIProcess/Scrolling/RemoteScrollingTree.h:
2629 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2630 (WebKit::fileCreationTime):
2631 (WebKit::fileModificationTime):
2632 * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2633 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2634 (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
2635 * UIProcess/WebBackForwardList.cpp:
2636 (WebKit::WebBackForwardList::backForwardListState):
2637 (WebKit::WebBackForwardList::restoreFromState):
2638 * UIProcess/WebPageProxy.cpp:
2639 (WebKit::WebPageProxy::didCommitLoadForFrame):
2640 (WebKit::WebPageProxy::creationParameters):
2641 (WebKit::WebPageProxy::setOverlayScrollbarStyle):
2642 * UIProcess/WebPageProxy.h:
2643 (WebKit::WebPageProxy::overlayScrollbarStyle):
2644 * UIProcess/WebPageProxy.messages.in:
2645 * UIProcess/WebsiteData/WebsiteDataRecord.h:
2646 * UIProcess/efl/WebView.cpp:
2647 (WebKit::WebView::transformFromScene):
2648 * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
2649 * UIProcess/gtk/WebPreferencesGtk.cpp:
2650 (WebKit::WebPreferences::platformInitializeStore):
2651 * UIProcess/ios/WKContentViewInteraction.mm:
2652 (-[WKContentView _scrollOffsetForEvent:]):
2653 (-[WKContentView _interpretKeyEvent:isCharEvent:]):
2654 * UIProcess/mac/LegacySessionStateCoding.cpp:
2655 (WebKit::encodeFormDataElement):
2656 (WebKit::decodeFormDataElement):
2657 (WebKit::decodeV1SessionHistory):
2658 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2659 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2660 (WebKit::RemoteLayerTreeDrawingAreaProxy::setViewExposedRect):
2661 * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
2662 (WebKit::WebPaymentCoordinator::completeShippingMethodSelection):
2663 (WebKit::WebPaymentCoordinator::completeShippingContactSelection):
2664 (WebKit::WebPaymentCoordinator::completePaymentMethodSelection):
2665 * WebProcess/ApplePay/WebPaymentCoordinator.h:
2666 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2667 (WKBundlePageSetEventThrottlingBehaviorOverride):
2668 * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
2669 (WebKit::PDFPlugin::convertFromPDFViewToRootView):
2670 (WebKit::PDFPlugin::convertFromPDFViewToScreen):
2671 (WebKit::PDFPlugin::boundsOnScreen):
2672 (WebKit::PDFPlugin::geometryDidChange):
2673 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2674 (WebKit::PDFPlugin::geometryDidChange):
2675 * WebProcess/Plugins/PluginView.cpp:
2676 (WebKit::PluginView::performFrameLoadURLRequest):
2677 (WebKit::PluginView::evaluate):
2678 * WebProcess/Plugins/WebPluginInfoProvider.cpp:
2679 (WebKit::WebPluginInfoProvider::pluginLoadClientPolicyForHost):
2680 * WebProcess/Plugins/WebPluginInfoProvider.h:
2681 * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
2682 (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
2683 * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2684 (WebKit::toFormData):
2685 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2686 (WebKit::WebChromeClient::preferredScrollbarOverlayStyle):
2687 * WebProcess/WebCoreSupport/WebChromeClient.h:
2688 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2689 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2690 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2691 * WebProcess/WebPage/DrawingArea.h:
2692 * WebProcess/WebPage/DrawingArea.messages.in:
2693 * WebProcess/WebPage/WebFrame.cpp:
2694 (WebKit::WebFrame::certificateInfo):
2695 * WebProcess/WebPage/WebPage.cpp:
2696 (WebKit::m_userInterfaceLayoutDirection):
2697 (WebKit::WebPage::setScrollbarOverlayStyle):
2698 * WebProcess/WebPage/WebPage.h:
2699 (WebKit::WebPage::scrollbarOverlayStyle):
2700 * WebProcess/WebPage/WebPage.messages.in:
2701 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2702 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2703 (WebKit::RemoteLayerTreeDrawingArea::setViewExposedRect):
2704 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2705 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2706 (WebKit::TiledCoreAnimationDrawingArea::setViewExposedRect):
2708 2016-11-26 Sam Weinig <sam@webkit.org>
2710 Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
2711 https://bugs.webkit.org/show_bug.cgi?id=164965
2713 Reviewed by Simon Fraser.
2715 * Shared/WebPreferencesDefinitions.h:
2716 * UIProcess/API/C/WKPreferences.cpp:
2717 (WKPreferencesSetIntersectionObserverEnabled):
2718 (WKPreferencesGetIntersectionObserverEnabled):
2719 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2720 * WebProcess/WebPage/WebPage.cpp:
2721 (WebKit::WebPage::updatePreferences):
2722 Add a preference, defaulting to off, for enabling IntersectionObserver.
2724 2016-11-26 Simon Fraser <simon.fraser@apple.com>
2726 Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime
2727 https://bugs.webkit.org/show_bug.cgi?id=164992
2729 Reviewed by Darin Adler.
2731 No more ugly conversion from seconds to milliseconds.
2733 * WebProcess/WebPage/WebPage.cpp:
2734 (WebKit::WebPage::updatePreferences):
2735 * WebProcess/WebPage/ios/WebPageIOS.mm:
2736 (WebKit::WebPage::eventThrottlingDelay):
2738 2016-11-25 Michael Catanzaro <mcatanzaro@igalia.com>
2740 [GTK] Follow-up fixes to r208974
2741 https://bugs.webkit.org/show_bug.cgi?id=164771
2743 Unreviewed, implement Carlos's review feedback.
2745 * UIProcess/API/gtk/WebKitNotification.cpp:
2746 (webkit_notification_get_tag):
2747 * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
2748 (WebKitNotificationProvider::withdrawAnyPreviousNotificationMatchingTag):
2749 (WebKitNotificationProvider::show):
2750 * UIProcess/API/gtk/WebKitNotificationProvider.h:
2752 2016-11-24 Michael Catanzaro <mcatanzaro@igalia.com>
2754 [GTK] Notifications API does not expose or respect the "tag" attribute
2755 https://bugs.webkit.org/show_bug.cgi?id=164771
2757 Reviewed by Gustavo Noronha Silva.
2759 Expose a tag property on WebKitNotification. Ensure that any previous notification with the
2760 same tag is closed when showing a new notification with that tag.
2762 * UIProcess/API/gtk/WebKitNotification.cpp:
2763 (webkit_notification_class_init):
2764 (webkitNotificationCreate):
2765 (webkit_notification_get_tag):
2766 * UIProcess/API/gtk/WebKitNotification.h:
2767 * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
2768 (WebKitNotificationProvider::withdrawAnyPreviousNotificationMatchingTag):
2769 (WebKitNotificationProvider::show):
2770 * UIProcess/API/gtk/WebKitNotificationProvider.h:
2771 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2773 2016-11-22 Sergio Villar Senin <svillar@igalia.com>
2775 [GTK] Fix introspection warning
2776 https://bugs.webkit.org/show_bug.cgi?id=165026
2778 Reviewed by Michael Catanzaro.
2780 This fixes an introspection annotation for a new API added in r208532.
2782 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2783 (webkit_web_page_class_init):
2785 2016-11-21 Carlos Garcia Campos <cgarcia@igalia.com>
2787 [SOUP] Simplify custom protocols handler implementation
2788 https://bugs.webkit.org/show_bug.cgi?id=164922
2790 Reviewed by Michael Catanzaro.
2792 We are using too many classes for this and also the C API that is not needed, because both GTK+ and EFL have
2793 their own APIs and this is not used by WTR at all.
2795 * PlatformEfl.cmake: Remove files from compilation.
2796 * PlatformGTK.cmake: Ditto.
2797 * Shared/API/c/WKBase.h:
2798 * Shared/API/c/soup/WKBaseSoup.h: Removed.
2799 * UIProcess/API/APICustomProtocolManagerClient.h: Added.
2800 (API::CustomProtocolManagerClient::~CustomProtocolManagerClient):
2801 (API::CustomProtocolManagerClient::startLoading):
2802 (API::CustomProtocolManagerClient::stopLoading):
2803 (API::CustomProtocolManagerClient::invalidate):
2804 * UIProcess/API/C/WKAPICast.h:
2805 * UIProcess/API/C/soup/WKAPICastSoup.h: Removed.
2806 * UIProcess/API/C/soup/WKContextSoup.h: Removed.
2807 * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp: Removed.
2808 * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: Removed.
2809 * UIProcess/API/C/soup/WKSoupRequestManager.h: Removed.
2810 * UIProcess/API/efl/ewk_context.cpp: Remove unneeded include.
2811 * UIProcess/API/efl/ewk_url_scheme_request.cpp: Use CustomProtocolManagerProxy instead of WKSoupCustomProtocolRequestManagerRef.
2812 (EwkUrlSchemeRequest::EwkUrlSchemeRequest):
2813 (EwkUrlSchemeRequest::finish):
2814 (EwkUrlSchemeRequest::invalidate):
2815 * UIProcess/API/efl/ewk_url_scheme_request_private.h:
2816 (EwkUrlSchemeRequest::create):
2817 (EwkUrlSchemeRequest::manager):
2818 * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp: Added.
2819 (attachCustomProtocolManagerClientToContext):
2820 * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h.
2821 * UIProcess/API/gtk/WebKitPrivate.h:
2822 * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Removed.
2823 * UIProcess/API/gtk/WebKitRequestManagerClient.h: Removed.
2824 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Use CustomProtocolManagerProxy instead of WebSoupCustomProtocolRequestManager.
2825 (webkitURISchemeRequestCreate):
2826 (webkitURISchemeRequestCancel):
2827 (webkitURISchemeRequestGetManager):
2828 (webkitURISchemeRequestInvalidate):
2829 (webkitURISchemeRequestReadCallback):
2830 (webkit_uri_scheme_request_finish_error):
2831 * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
2832 * UIProcess/API/gtk/WebKitWebContext.cpp:
2833 (webkitWebContextConstructed):
2834 (webkitWebContextDispose):
2835 (webkit_web_context_register_uri_scheme):
2836 (webkitWebContextStartLoadingCustomProtocol):
2837 (webkitWebContextInvalidateCustomProtocolRequests):
2838 * UIProcess/API/gtk/WebKitWebContextPrivate.h:
2839 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2840 * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2841 (WebKit::CustomProtocolManagerProxy::processDidClose):
2842 * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
2843 (WebKit::CustomProtocolManagerProxy::processDidClose): Invalidate the client.
2844 (WebKit::CustomProtocolManagerProxy::startLoading): Notify the client.
2845 (WebKit::CustomProtocolManagerProxy::stopLoading): Ditto.
2846 (WebKit::CustomProtocolManagerProxy::didReceiveResponse): Notify the network process.
2847 (WebKit::CustomProtocolManagerProxy::didLoadData): Ditto.
2848 (WebKit::CustomProtocolManagerProxy::didFailWithError): Ditto.
2849 (WebKit::CustomProtocolManagerProxy::didFinishLoading): Ditto.
2850 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp: Removed.
2851 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h: Removed.
2852 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp: Removed.
2853 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h: Removed.
2854 * UIProcess/Network/NetworkProcessProxy.cpp:
2855 (WebKit::NetworkProcessProxy::didClose): Notify the CustomProtocolManagerProxy.
2856 * UIProcess/WebProcessPool.cpp:
2857 (WebKit::WebProcessPool::WebProcessPool): Initialize the CustomProtocolManagerClient and remove the all supplement.
2858 (WebKit::WebProcessPool::setCustomProtocolManagerClient):
2859 (WebKit::WebProcessPool::registerSchemeForCustomProtocol): In case of soup cache the given protocol.
2860 (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): In case of soup delete the given protocol from the cache.
2861 * UIProcess/WebProcessPool.h:
2862 * UIProcess/efl/RequestManagerClientEfl.cpp: Do not use the C API, but API::CustomProtocolManagerClient.
2863 (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
2864 (WebKit::RequestManagerClientEfl::registerURLSchemeHandler):
2865 * UIProcess/efl/RequestManagerClientEfl.h:
2866 * UIProcess/efl/WebProcessPoolEfl.cpp:
2867 * UIProcess/gtk/WebProcessPoolGtk.cpp:
2868 * UIProcess/soup/WebProcessPoolSoup.cpp:
2869 (WebKit::WebProcessPool::platformInitializeNetworkProcess): Use m_urlSchemesRegisteredForCustomProtocols to
2870 build the list of custom protocols to send to the network process.
2872 2016-11-21 Alex Christensen <achristensen@webkit.org>
2874 Fix Sierra CMake build after r208452
2875 https://bugs.webkit.org/show_bug.cgi?id=164437
2877 * UIProcess/Cocoa/WebViewImpl.mm:
2878 (WebKit::WebViewImpl::updateMediaTouchBar):
2879 I haven't enabled VIDEO_PRESENTATION_MODE in the CMake build yet.
2880 It's needed for WebPlaybackSessionInterfaceMac to exist.
2882 2016-11-21 Carlos Garcia Campos <cgarcia@igalia.com>
2884 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.2 release.
2886 * gtk/NEWS: Add release notes for 2.15.2.
2888 2016-11-21 Carlos Garcia Campos <cgarcia@igalia.com>
2890 Remove m_customProtocolManagerProxy from WebProcessProxy
2891 https://bugs.webkit.org/show_bug.cgi?id=164908
2893 Reviewed by Andreas Kling.
2895 Since the network process is mandatory, the custom protocol manager proxy of WebProcessProxy is unused and can
2898 * UIProcess/WebProcessProxy.cpp:
2899 (WebKit::WebProcessProxy::WebProcessProxy):
2900 * UIProcess/WebProcessProxy.h:
2902 2016-11-20 Zan Dobersek <zdobersek@igalia.com>
2904 [EncryptedMedia] Make EME API runtime-enabled
2905 https://bugs.webkit.org/show_bug.cgi?id=164927
2907 Reviewed by Jer Noble.
2909 Add the new EncryptedMediaAPI preference. Set the same feature
2910 flag on the shared RuntimeEnabledFeatures object to the
2911 corresponding value that's stored in the WebPreferencesStore.
2913 InjectedBundle::overrideBoolPreferenceForTestRunner() does the
2914 same when the 'WebKitEncryptedMediaAPIEnabled' preference is
2915 overridden in WKTR for testing purposes.
2917 * Shared/WebPreferencesDefinitions.h:
2918 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2919 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2920 * WebProcess/WebPage/WebPage.cpp:
2921 (WebKit::WebPage::updatePreferences):
2923 2016-11-19 Antti Koivisto <antti@apple.com>
2925 Salt network cache hashes
2926 https://bugs.webkit.org/show_bug.cgi?id=164924
2928 Reviewed by Alex Christensen.
2930 To enhance privacy make cache content unidentifiable from file names alone.
2931 This is done by generating a unique persistent salt for each cache instance.
2932 It is used when computing hashes used in file names.
2934 The patch also replaces plain text partition directory names with salted hashes.
2936 * NetworkProcess/cache/NetworkCache.cpp:
2937 (WebKit::NetworkCache::Cache::makeCacheKey):
2938 (WebKit::NetworkCache::makeCacheKey): Deleted.
2939 * NetworkProcess/cache/NetworkCache.h:
2941 Increment cache version.
2943 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
2944 (WebKit::NetworkCache::BlobStorage::BlobStorage):
2945 (WebKit::NetworkCache::BlobStorage::add):
2946 (WebKit::NetworkCache::BlobStorage::get):
2948 Use salt for blob content hash.
2950 * NetworkProcess/cache/NetworkCacheBlobStorage.h:
2951 * NetworkProcess/cache/NetworkCacheData.cpp:
2952 (WebKit::NetworkCache::computeSHA1):
2954 For simplicity all SHA1s are now salted.
2956 (WebKit::NetworkCache::makeSalt):
2957 (WebKit::NetworkCache::readOrMakeSalt):
2959 Read salt if it exists, generate and persist it otherwise.
2961 * NetworkProcess/cache/NetworkCacheData.h:
2962 * NetworkProcess/cache/NetworkCacheKey.cpp:
2963 (WebKit::NetworkCache::Key::Key):
2965 Remove the "No partition" string and just empty.
2966 That was only needed to have a directory name of some sort.
2968 (WebKit::NetworkCache::Key::computeHash):
2970 Use salt for key hash.
2972 (WebKit::NetworkCache::Key::computePartitionHash):
2974 Separate hash for partition.
2976 * NetworkProcess/cache/NetworkCacheKey.h:
2977 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2978 (WebKit::NetworkCache::makeSubresourcesKey):
2979 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
2980 (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
2981 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2982 (WebKit::NetworkCache::makeSaltFilePath):
2983 (WebKit::NetworkCache::Storage::open):
2985 Cache can't be opened if we can't read or persist a salt.
2987 (WebKit::NetworkCache::traverseRecordsFiles):
2988 (WebKit::NetworkCache::Storage::Storage):
2989 (WebKit::NetworkCache::Storage::synchronize):
2990 (WebKit::NetworkCache::Storage::recordDirectoryPathForKey):
2992 Use the partition hash in the directory name instead of a plain text name.
2994 (WebKit::NetworkCache::decodeRecordHeader):
2995 (WebKit::NetworkCache::Storage::readRecord):
2996 (WebKit::NetworkCache::Storage::encodeRecord):
2997 (WebKit::NetworkCache::Storage::traverse):
2998 (WebKit::NetworkCache::Storage::clear):
2999 * NetworkProcess/cache/NetworkCacheStorage.h:
3000 (WebKit::NetworkCache::Storage::salt):
3002 2016-11-19 Simon Fraser <simon.fraser@apple.com>
3004 [iOS WK2] When zoomed in and panning on pages with fixed bars, parts of the bars are sometimes missing
3005 https://bugs.webkit.org/show_bug.cgi?id=164855
3007 Reviewed by Sam Weinig.
3009 During UI-process panning and zooming, we send visible rect updates to the web process
3010 with inStableState=false, and don't update GraphicsLayers until we get into a stable state.
3012 This causes a problem where the web process has a stale notion of where the GraphicsLayers
3013 for position:fixed elements are, but is then told to update tiling coverage with an up-to-date
3014 visible rect. The existing "sync layer positions" path isn't useful to fix this, because it
3015 breaks the relationship between the GraphicsLayer positions and their FixedPositionViewportConstraints
3016 in the scrolling tree.
3018 To address this, add the notion of an Optional<> approximatePosition on GraphicsLayers. This is used
3019 only by the coverageRect computation code path, and is cleared by a setPosition(). ApproximatePositions
3020 are pushed onto GraphicsLayers via the syncViewportConstrainedLayerPositions() code path (renamed to
3021 reconcileViewportConstrainedLayerPositions).
3023 Tested by scrollingcoordinator/ios/non-stable-viewport-scroll.html
3025 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
3026 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
3027 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
3028 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
3029 (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
3030 * UIProcess/Scrolling/RemoteScrollingTree.h:
3031 * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
3032 (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
3033 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
3034 (WebKit::CompositingCoordinator::flushPendingLayerChanges):
3035 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3036 (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
3037 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3038 (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
3039 * WebProcess/WebPage/ios/WebPageIOS.mm:
3040 (WebKit::WebPage::updateVisibleContentRects): Always push the custom fixed position rect down, but send
3041 ScrollingLayerPositionAction::SetApproximate if the state is not stable.
3042 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3043 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3044 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3045 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3047 2016-11-18 Simon Fraser <simon.fraser@apple.com>
3049 Make it possible to test non-stable-state scrolling on iOS
3050 https://bugs.webkit.org/show_bug.cgi?id=164905
3052 Reviewed by Dan Bernstein.
3054 Make it possible for an iOS layout test to force every visible rect update
3055 from the UI process to the web process to be in a non-stable state. This emulates
3056 what happens during panning and zooming interactions, and allows us to test the
3057 scrolling and layer trees in these transient states.
3059 This is done by adding a testing property on WKWebView, _stableStateOverride, whose
3060 getters and setters are overridden in TestRunnerWKWebView. When non-nil, we _updateVisibleContentRectAfterScrollInView
3061 consults the NSNumber's boolValue and uses it to override the stable state.
3063 To facilitate this kind of testing, also add immediateScrollToOffset() and
3064 immediateZoomToScale() to UIScriptController. Finally, add doAfterPresentationUpdate()
3065 which provides a callback that fires after one trip to the web process and back.
3067 * UIProcess/API/Cocoa/WKWebView.mm:
3068 (-[WKWebView _updateVisibleContentRectAfterScrollInView:]):
3069 (-[WKWebView _stableStateOverride]):
3070 (-[WKWebView _setStableStateOverride:]):
3071 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3073 2016-11-18 Simon Fraser <simon.fraser@apple.com>
3075 [iOS WK2] Eliminate a source of flakiness in layout tests by forcing WebPage into "responsive" mode for all tests, with an internals override
3076 https://bugs.webkit.org/show_bug.cgi?id=164980
3078 Reviewed by Chris Dumez.
3080 WebPage::eventThrottlingDelay() uses a latency estimate based on the round-trip time from the UI process
3081 to affect behavior, including whether scroll events are fired. This also affects the FrameView "scrolledByUser"
3082 flag that impacts tile coverage.
3084 During testing, latency falling above or below the 16ms threshold could affect behavior. Fix by forcing
3085 WebPage into "responsive" mode while running tests, via InjectedBundlePage::prepare().
3087 Add a nullable internals property so that a test can specify responsive, unresponsive or default behavior.
3089 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3090 (WKBundlePageSetEventThrottlingBehaviorOverride):
3091 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
3092 * WebProcess/WebPage/ios/WebPageIOS.mm:
3093 (WebKit::WebPage::eventThrottlingDelay):
3095 2016-11-18 Simon Fraser <simon.fraser@apple.com>
3097 Remove use of std::chrono in WebPage and entrained code
3098 https://bugs.webkit.org/show_bug.cgi?id=164967
3100 Reviewed by Tim Horton.
3102 Replace std::chrono with Seconds and Monotonic Time.
3104 Use more C++11 initialization for WebPage data members.
3106 * Shared/VisibleContentRectUpdateInfo.cpp:
3107 (WebKit::operator<<):
3108 * Shared/VisibleContentRectUpdateInfo.h:
3109 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
3110 (WebKit::VisibleContentRectUpdateInfo::timestamp):
3111 * Shared/WebCoreArgumentCoders.cpp:
3112 (IPC::ArgumentCoder<MonotonicTime>::encode):
3113 (IPC::ArgumentCoder<MonotonicTime>::decode):
3114 (IPC::ArgumentCoder<Seconds>::encode):
3115 (IPC::ArgumentCoder<Seconds>::decode):
3116 * Shared/WebCoreArgumentCoders.h:
3117 * UIProcess/ios/WKContentView.mm:
3118 (WebKit::HistoricalVelocityData::HistoricalVelocityData):
3119 (WebKit::HistoricalVelocityData::velocityForNewData):
3120 (WebKit::HistoricalVelocityData::append):
3121 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
3122 * WebProcess/WebCoreSupport/WebChromeClient.h:
3123 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
3124 (WebKit::WebChromeClient::eventThrottlingDelay):
3125 * WebProcess/WebPage/ViewUpdateDispatcher.h:
3126 * WebProcess/WebPage/WebPage.cpp:
3127 (WebKit::WebPage::WebPage):
3128 (WebKit::m_userActivityHysteresis):
3129 (WebKit::WebPage::didFlushLayerTreeAtTime):
3130 (WebKit::WebPage::didCommitLoad):
3131 * WebProcess/WebPage/WebPage.h:
3132 * WebProcess/WebPage/ios/WebPageIOS.mm:
3133 (WebKit::WebPage::eventThrottlingDelay):
3134 (WebKit::WebPage::updateVisibleContentRects):
3135 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3136 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3138 2016-11-18 Dean Jackson <dino@apple.com>
3140 AX: "(inverted-colors)" media query only matches on page reload; should match on change
3141 https://bugs.webkit.org/show_bug.cgi?id=163564
3142 <rdar://problem/28807350>
3144 Reviewed by Simon Fraser.
3146 Listen for the appropriate notifications that accessibility settings
3147 have changed. This is a single notification on macOS, which uses WebViewImpl,
3148 and more fine-grained notifications on iOS, using WKWebView.
3150 When we see the notification, send a message to the WebProcess which will
3151 then tell the WebCore::Page.
3153 * UIProcess/API/Cocoa/WKWebView.mm:
3154 (-[WKWebView _initializeWithConfiguration:]):
3155 (-[WKWebView _accessibilitySettingsDidChange:]):
3156 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3157 * UIProcess/Cocoa/WebViewImpl.h:
3158 * UIProcess/Cocoa/WebViewImpl.mm:
3159 (-[WKAccessibilitySettingsObserver initWithImpl:]):
3160 (-[WKAccessibilitySettingsObserver dealloc]):
3161 (-[WKAccessibilitySettingsObserver _settingsDidChange:]):
3162 (WebKit::WebViewImpl::WebViewImpl):
3163 (WebKit::WebViewImpl::accessibilitySettingsDidChange):
3164 * UIProcess/WebPageProxy.cpp:
3165 (WebKit::WebPageProxy::accessibilitySettingsDidChange):
3166 * UIProcess/WebPageProxy.h:
3167 * WebProcess/WebPage/WebPage.cpp:
3168 (WebKit::WebPage::accessibilitySettingsDidChange):
3169 * WebProcess/WebPage/WebPage.h:
3170 * WebProcess/WebPage/WebPage.messages.in:
3172 2016-11-18 Jeremy Jones <jeremyj@apple.com>
3174 USE WK_MAC_TBA for version number in _webViewRequestPointerLock:(WKWebView *)webView WK_API_AVAILABLE(macosx(10.12))
3175 https://bugs.webkit.org/show_bug.cgi?id=164962
3177 Reviewed by Dean Jackson.
3179 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3181 2016-11-18 Enrica Casucci <enrica@apple.com>
3183 Refactor drag and drop for WebKit2 to encode DragData message exchange.
3184 https://bugs.webkit.org/show_bug.cgi?id=164945
3186 Reviewed by Tim Horton.
3188 * Shared/WebCoreArgumentCoders.cpp:
3189 (IPC::ArgumentCoder<DragData>::encode):
3190 (IPC::ArgumentCoder<DragData>::decode):
3191 * Shared/WebCoreArgumentCoders.h:
3192 * UIProcess/WebPageProxy.cpp:
3193 (WebKit::WebPageProxy::performDragControllerAction):
3194 * WebProcess/WebCoreSupport/WebDragClient.cpp:
3195 (WebKit::WebDragClient::willPerformDragDestinationAction):
3196 (WebKit::WebDragClient::actionMaskForDrag):
3197 * WebProcess/WebCoreSupport/WebDragClient.h:
3198 * WebProcess/WebPage/WebPage.cpp:
3199 (WebKit::WebPage::performDragControllerAction):
3200 * WebProcess/WebPage/WebPage.h:
3201 * WebProcess/WebPage/WebPage.messages.in:
3203 2016-11-18 Jeremy Jones <jeremyj@apple.com>
3205 Add runtime flag to enable pointer lock. Enable pointer lock feature for mac.
3206 https://bugs.webkit.org/show_bug.cgi?id=163801
3208 Reviewed by Simon Fraser.
3210 Add SPI to notify client of pointer lock and for client to allow or deny.
3211 Unlock pointer when view is not longer active.
3213 * Configurations/FeatureDefines.xcconfig:
3214 * Shared/WebPreferencesDefinitions.h:
3215 * UIProcess/API/APIUIClient.h:
3216 (API::UIClient::requestPointerLock):
3217 (API::UIClient::didLosePointerLock):
3218 * UIProcess/API/C/WKPage.cpp:
3219 (WKPageSetPageUIClient):
3220 (WKPageDidAllowPointerLock):
3221 (WKPageDidDenyPointerLock):
3222 * UIProcess/API/C/WKPagePrivate.h:
3223 * UIProcess/API/C/WKPageUIClient.h:
3224 * UIProcess/API/C/WKPreferences.cpp:
3225 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3226 * UIProcess/Cocoa/UIDelegate.h:
3227 * UIProcess/Cocoa/UIDelegate.mm:
3228 (WebKit::UIDelegate::setDelegate):
3229 (WebKit::UIDelegate::UIClient::requestPointerLock):
3230 (WebKit::UIDelegate::UIClient::didLosePointerLock):
3231 * UIProcess/WebPageProxy.cpp:
3232 (WebKit::WebPageProxy::dispatchActivityStateChange):
3233 (WebKit::WebPageProxy::resetStateAfterProcessExited):
3234 (WebKit::WebPageProxy::requestPointerLock):
3235 (WebKit::WebPageProxy::didAllowPointerLock):
3236 (WebKit::WebPageProxy::didDenyPointerLock):
3237 (WebKit::WebPageProxy::requestPointerUnlock):
3238 * UIProcess/WebPageProxy.h:
3239 * WebProcess/WebPage/WebPage.cpp:
3240 (WebKit::WebPage::updatePreferences):
3242 2016-11-17 Carlos Garcia Campos <cgarcia@igalia.com>
3244 Downloads started by context menu actions should also have a web view associated
3245 https://bugs.webkit.org/show_bug.cgi?id=164364
3247 Reviewed by Michael Catanzaro.
3249 When a request is converted to a download WebPageProxy calls handleDownloadRequest() and clients handle that to
3250 associate the web view to the download. When a download is started by a context menu action, WebPageProxy calls
3251 WebProcessPool::download() with this as initiatingPage parameter, but clients are not notified in this case.
3253 * UIProcess/API/gtk/WebKitDownload.cpp:
3254 (webkitDownloadCreateForRequest): Deleted.
3255 * UIProcess/API/gtk/WebKitDownloadPrivate.h:
3256 * UIProcess/API/gtk/WebKitWebContext.cpp:
3257 (webkitWebContextStartDownload): Use webkitWebContextGetOrCreateDownload() after WebProcessPool::download()
3258 because the WebKitDownload could have already been created by the web view download handler at this point.
3259 * UIProcess/API/gtk/WebKitWebView.cpp:
3260 (webkit_web_view_download_uri): We no longer need to associate the web view to the download here.
3261 * UIProcess/WebProcessPool.cpp:
3262 (WebKit::WebProcessPool::download): If an initiatingPage has been passed, call handleDownloadRequest() to notify
3265 2016-11-17 Alex Christensen <achristensen@webkit.org>
3267 REGRESSION: API test _WKDownload.ConvertResponseToDownload is a flaky timeout
3268 https://bugs.webkit.org/show_bug.cgi?id=164631
3270 Reviewed by Carlos Garcia Campos.
3272 * NetworkProcess/NetworkResourceLoader.cpp:
3273 (WebKit::NetworkResourceLoader::convertToDownload):
3274 I could reproduce the flaky failure 100% of the time when not using NETWORK_SESSION
3275 by adding a usleep(1000000) in NetworkResourceLoader::convertToDownload. m_networkLoad
3276 was not being set to nullptr before it was being checked in NetworkResourceLoader::abort
3278 2016-11-17 Alex Christensen <achristensen@webkit.org>
3280 Fix CMake build after r208865
3281 https://bugs.webkit.org/show_bug.cgi?id=164894
3283 * PlatformMac.cmake:
3286 2016-11-17 Ryosuke Niwa <rniwa@webkit.org>
3288 WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled should keep text replacement enabled
3289 https://bugs.webkit.org/show_bug.cgi?id=164857
3290 <rdar://problem/27721742>
3292 Reviewed by Wenson Hsieh.
3294 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3295 (WebKit::InjectedBundleNodeHandle::setHTMLInputElementSpellcheckEnabled):
3297 2016-11-17 John Wilander <wilander@apple.com>
3299 Resource load statistics: Cover further data records, count removed data records, and only fire handler when needed
3300 https://bugs.webkit.org/show_bug.cgi?id=164659
3302 Reviewed by Andy Estes.
3304 * UIProcess/WebResourceLoadStatisticsStore.cpp:
3305 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
3306 Consistent naming with 'remove' rather than 'delete'.
3307 Now removes localStorage, IndexDB, disk cache, and memory cache too.
3308 Updates statistics with number of times it has removed data records.
3309 (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
3310 No longer checks whether it has enough data since the classification rules
3311 are absolute, not relative.
3312 (WebKit::WebResourceLoadStatisticsStore::clearDataRecords): Deleted.
3313 * UIProcess/WebResourceLoadStatisticsStore.h:
3314 Consistent naming with 'remove' rather than 'delete'.
3316 2016-11-17 Brady Eidson <beidson@apple.com>
3318 Add _WKIconLoadingDelegate SPI.
3319 https://bugs.webkit.org/show_bug.cgi?id=164894
3321 Reviewed by Alex Christensen.
3323 With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.
3325 WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.
3327 For icons the app decides to load, WebKit will pass the data to the app without storing locally.
3329 * UIProcess/API/APIIconLoadingClient.h: Copied from Source/WebCore/html/LinkIconCollector.h.
3330 (API::IconLoadingClient::~IconLoadingClient):
3331 (API::IconLoadingClient::getLoadDecisionForIcon):
3333 * UIProcess/API/Cocoa/WKWebView.mm:
3334 (-[WKWebView _initializeWithConfiguration:]):
3335 (-[WKWebView _iconLoadingDelegate]):
3336 (-[WKWebView _setIconLoadingDelegate:]):
3337 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3339 * UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
3341 * UIProcess/API/Cocoa/_WKLinkIconParameters.h: Copied from Source/WebCore/html/LinkIconCollector.h.
3342 * UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Copied from Source/WebCore/html/LinkIconCollector.h.
3343 (-[_WKLinkIconParameters _initWithLinkIcon:]):
3344 (-[_WKLinkIconParameters url]):
3345 (-[_WKLinkIconParameters mimeType]):
3346 (-[_WKLinkIconParameters size]):
3347 (-[_WKLinkIconParameters iconType]):
3348 * UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Copied from Source/WebCore/html/LinkIconCollector.h.
3350 * UIProcess/Cocoa/IconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
3351 * UIProcess/Cocoa/IconLoadingDelegate.mm: Added.
3352 (WebKit::IconLoadingDelegate::IconLoadingDelegate):
3353 (WebKit::IconLoadingDelegate::~IconLoadingDelegate):
3354 (WebKit::IconLoadingDelegate::createIconLoadingClient):
3355 (WebKit::IconLoadingDelegate::delegate):
3356 (WebKit::IconLoadingDelegate::setDelegate):
3357 (WebKit::IconLoadingDelegate::IconLoadingClient::IconLoadingClient):
3358 (WebKit::IconLoadingDelegate::IconLoadingClient::~IconLoadingClient):
3359 (WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):
3361 * UIProcess/WebPageProxy.cpp:
3362 (WebKit::WebPageProxy::setIconLoadingClient):
3363 (WebKit::WebPageProxy::getLoadDecisionForIcon):
3364 (WebKit::WebPageProxy::finishedLoadingIcon):
3365 * UIProcess/WebPageProxy.h:
3366 (WebKit::WebPageProxy::iconLoadingClient):
3367 * UIProcess/WebPageProxy.messages.in:
3369 * WebKit2.xcodeproj/project.pbxproj:
3371 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3372 (WebKit::WebFrameLoaderClient::useIconLoadingClient):
3373 (WebKit::WebFrameLoaderClient::getLoadDecisionForIcon):
3374 (WebKit::WebFrameLoaderClient::finishedLoadingIcon):
3375 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3376 (WebKit::WebFrameLoaderClient::setUseIconLoadingClient):
3378 * WebProcess/WebPage/WebPage.cpp:
3379 (WebKit::WebPage::didGetLoadDecisionForIcon):
3380 (WebKit::WebPage::setUseIconLoadingClient):
3381 * WebProcess/WebPage/WebPage.h:
3382 * WebProcess/WebPage/WebPage.messages.in:
3384 2016-11-17 Saam Barati <sbarati@apple.com>
3386 Remove async/await compile time flag and enable tests
3387 https://bugs.webkit.org/show_bug.cgi?id=164828
3388 <rdar://problem/28639334>
3390 Reviewed by Yusuke Suzuki.
3392 * Configurations/FeatureDefines.xcconfig:
3394 2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
3396 [JSC] WTF::TemporaryChange with WTF::SetForScope
3397 https://bugs.webkit.org/show_bug.cgi?id=164761
3399 Reviewed by Saam Barati.
3401 * PluginProcess/PluginControllerProxy.cpp:
3402 (WebKit::PluginControllerProxy::initialize):
3403 * PluginProcess/WebProcessConnection.cpp:
3404 (WebKit::WebProcessConnection::didReceiveMessage):
3405 (WebKit::WebProcessConnection::didReceiveSyncMessage):
3406 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3407 (createEncodedObject):
3409 * UIProcess/API/Cocoa/WKWebView.mm:
3410 (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
3411 * UIProcess/Cocoa/WebViewImpl.mm:
3412 (WebKit::WebViewImpl::updateTextTouchBar):
3413 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
3414 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
3415 * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
3416 (WebKit::WebPasteboardProxy::writeToClipboard):
3417 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
3418 (WebKit::CompositingCoordinator::flushPendingLayerChanges):
3419 (WebKit::CompositingCoordinator::purgeBackingStores):
3420 * WebProcess/WebPage/WebPage.cpp:
3421 (WebKit::WebPage::mouseEvent):
3422 (WebKit::WebPage::keyEvent):
3423 (WebKit::WebPage::dispatchTouchEvent):
3424 (WebKit::WebPage::setInitialFocus):
3425 (WebKit::WebPage::insertTextAsync):
3426 * WebProcess/WebPage/ios/WebPageIOS.mm:
3427 (WebKit::WebPage::dynamicViewportSizeUpdate):
3428 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
3429 * WebProcess/WebPage/mac/WebPageMac.mm:
3431 2016-11-16 Brent Fulgham <bfulgham@apple.com>
3433 Unreviewed build fix after r208589
3435 The generated com.apple.WebKit.plugin-common.sb file was not getting copied into
3436 the Resources folder, so was not deployed with WebKit. We need to treat it like
3437 com.apple.WebProcess.sb and the other generated files.
3439 * WebKit2.xcodeproj/project.pbxproj: Tell Xcode to include the generated file in
3440 the framework Resources.
3442 2016-11-16 Yusuke Suzuki <utatane.tea@gmail.com>
3444 [ES6][WebCore] Change ES6_MODULES compile time flag to runtime flag
3445 https://bugs.webkit.org/show_bug.cgi?id=164827
3447 Reviewed by Ryosuke Niwa.
3449 * Configurations/FeatureDefines.xcconfig:
3450 * Shared/WebPreferencesDefinitions.h:
3451 Annotated ES6 Modules option with DEFAULT_EXPERIMENTAL_FEATURES_ENABLED.