blob: 95bde9e9469611e07847ef8a29dbfd72bca44b6b [file] [log] [blame]
2016-10-13 Tim Horton <timothy_horton@apple.com>
Rename the SPI added in r207292 due to post-landing review comments
https://bugs.webkit.org/show_bug.cgi?id=163364
<rdar://problem/28012494>
Reviewed by Simon Fraser.
* UIProcess/API/APIPageConfiguration.h:
(API::PageConfiguration::waitsForPaintAfterViewDidMoveToWindow):
(API::PageConfiguration::setWaitsForPaintAfterViewDidMoveToWindow):
(API::PageConfiguration::shouldWaitForPaintAfterViewDidMoveToWindow): Deleted.
(API::PageConfiguration::setShouldWaitForPaintAfterViewDidMoveToWindow): Deleted.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _waitsForPaintAfterViewDidMoveToWindow]):
(-[WKWebViewConfiguration _setWaitsForPaintAfterViewDidMoveToWindow:]):
(-[WKWebViewConfiguration _shouldWaitForPaintAfterViewDidMoveToWindow]): Deleted.
(-[WKWebViewConfiguration _setShouldWaitForPaintAfterViewDidMoveToWindow:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::dispatchViewStateChange):
* UIProcess/WebPageProxy.h:
2016-10-13 Jonathan Bedard <jbedard@apple.com>
GTK and EFL on Mac fail to compile WebTextChecker due to missing definition of WKTextCheckerClientBase
https://bugs.webkit.org/show_bug.cgi?id=163346
Reviewed by Daniel Bates.
* UIProcess/API/C/WKTextChecker.cpp: Fixed #ifdefs for GTK and EFL builds on Darwin machines.
* UIProcess/API/C/WKTextChecker.h: Ditto.
2016-10-13 Tim Horton <timothy_horton@apple.com>
Expose SPI to disable synchronously blocking on painting after parenting a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=163364
<rdar://problem/28012494>
Reviewed by Geoff Garen.
Some clients may not want the default WKWebView behavior where we synchronously
block on the Web process after the first time a WKWebView is re-added to the window,
because they are e.g. parenting re-used WKWebViews while scrolling.
* UIProcess/API/APIPageConfiguration.h:
(API::PageConfiguration::shouldSynchronizeInitialPaintAfterMovingToWindow):
(API::PageConfiguration::setShouldSynchronizeInitialPaintAfterMovingToWindow):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _shouldSynchronizeInitialPaintAfterMovingToWindow]):
(-[WKWebViewConfiguration _setShouldSynchronizeInitialPaintAfterMovingToWindow:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Add and plumb a new WKWebView configuration parameter.
(WebKit::WebPageProxy::dispatchViewStateChange):
If the new configuration parameter is set, don't block the main thread when
a view is reparented.
2016-10-12 Chris Dumez <cdumez@apple.com>
[Web IDL] Drop support for legacy [ConstructorConditional=*]
https://bugs.webkit.org/show_bug.cgi?id=163368
Reviewed by Ryosuke Niwa.
Drop ENABLE_DOM4_EVENTS_CONSTRUCTOR compiler flag.
* Configurations/FeatureDefines.xcconfig:
2016-10-12 Alex Christensen <achristensen@webkit.org>
Fix assertion after switching to URLParser
https://bugs.webkit.org/show_bug.cgi?id=163350
rdar://problem/28739938
Reviewed by Brady Eidson.
Covered by a new API test.
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
The { } here is not understood by the compiler to mean WebCore::URL(), but rather the empty constructor for the enum ParsedURLStringTag.
We used to be unsafely trusting that the URL was valid and canonicalized, but with URLParser we are canonicalizing it,
and the assertion (url == m_string) in URL.cpp was failing.
2016-10-12 Anders Carlsson <andersca@apple.com>
Remove an unused function
https://bugs.webkit.org/show_bug.cgi?id=163341
Reviewed by Dan Bernstein.
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::isActive): Deleted.
* WebProcess/WebPage/WebBackForwardListProxy.h:
2016-10-11 Gyuyoung Kim <gyuyoung.kim@navercorp.com>
[EFL] Update API tests which are passed or failed
https://bugs.webkit.org/show_bug.cgi?id=163322
Unreviewed, simple on/off API test.
*ewk_favicon_database_clear* has been crashed for a long time, however
*ewk_cookie_manager_permanent_storage* is fine now. So the passing test
is enabled again, and disable the failure tests.
* UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
(TEST_F):
2016-10-11 Daniel Bates <dabates@apple.com>
Attempt to fix the Apple Internal Mac build following r207159
(https://bugs.webkit.org/show_bug.cgi?id=163244)
* UIProcess/API/Cocoa/WKWebView.mm:
(shouldRequireUserGestureToLoadVideo):
2016-10-11 Anders Carlsson <andersca@apple.com>
Clean up WebPageGroup somewhat
https://bugs.webkit.org/show_bug.cgi?id=163299
Reviewed by Tim Horton.
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPageGroupCopyIdentifier):
Move this here from WKPageGroup.
(WKPageGroupAddUserContentFilter):
(WKPageGroupRemoveUserContentFilter):
(WKPageGroupRemoveAllUserContentFilters):
Just call directly into the user content controller.
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserStyleSheet):
(WKPageGroupRemoveAllUserStyleSheets):
(WKPageGroupAddUserScript):
(WKPageGroupRemoveAllUserScripts):
Just call directly into the user content controller.
* UIProcess/API/C/WKPageGroup.h:
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::addUserStyleSheet): Deleted.
(WebKit::WebPageGroup::addUserScript): Deleted.
(WebKit::WebPageGroup::removeAllUserStyleSheets): Deleted.
(WebKit::WebPageGroup::removeAllUserScripts): Deleted.
(WebKit::WebPageGroup::removeAllUserContent): Deleted.
(WebKit::WebPageGroup::addUserContentExtension): Deleted.
(WebKit::WebPageGroup::removeUserContentExtension): Deleted.
(WebKit::WebPageGroup::removeAllUserContentExtensions): Deleted.
Get rid of these, all their callers just call into the user content controller now.
* UIProcess/WebPageGroup.h:
(WebKit::WebPageGroup::identifier): Deleted.
(WebKit::WebPageGroup::sendToAllProcessesInGroup): Deleted.
Remove unused code.
2016-10-11 Daniel Bates <dabates@apple.com>
[iOS] REGRESSION (r197953): User gesture required to load video in iOS 9-built apps
https://bugs.webkit.org/show_bug.cgi?id=163244
<rdar://problem/27250015>
Reviewed by Jer Noble.
Enable or disable the Setting::requiresUserGestureToLoadVideo() in WebKit depending on the
version of iOS SDK that the app was linked against. We require a user gesture to begin
loading a video as of iOS 10.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(shouldRequireUserGestureToLoadVideo): Added.
(-[WKWebView _initializeWithConfiguration:]): Set the requiresUserGestureToLoadVideo preference.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Modified to pass the WebKit requiresUserGestureToLoadVideo
preference to WebCore.
2016-10-11 Alex Christensen <achristensen@webkit.org>
Remove dead networking code
https://bugs.webkit.org/show_bug.cgi?id=163263
Reviewed by Daniel Bates.
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/ios/DownloadIOS.mm: Removed.
* NetworkProcess/Downloads/mac/DownloadMac.mm:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/mac/NetworkLoadMac.mm:
(WebKit::NetworkLoad::willCacheResponseAsync): Deleted.
* Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
* WebKit2.xcodeproj/project.pbxproj:
2016-10-11 Anders Carlsson <andersca@apple.com>
Move no longer used functions to WKDeprecatedFunctions.cpp
https://bugs.webkit.org/show_bug.cgi?id=163290
Reviewed by Dan Bernstein.
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPageGroupAddUserContentFilter):
(WKPageGroupRemoveUserContentFilter):
(WKPageGroupRemoveAllUserContentFilters):
(WKContextSetProcessModel): Deleted.
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupRemoveAllUserScripts):
(WKPageGroupAddUserContentFilter): Deleted.
(WKPageGroupRemoveUserContentFilter): Deleted.
(WKPageGroupRemoveAllUserContentFilters): Deleted.
* UIProcess/API/C/WKPageGroup.h:
2016-10-11 Konstantin Tokarev <annulen@yandex.ru>
Use modern for loops for iterating supplement maps
https://bugs.webkit.org/show_bug.cgi?id=163274
Reviewed by Alex Christensen.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::initializeConnection):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::~WebProcessPool):
(WebKit::WebProcessPool::networkProcessCrashed):
(WebKit::WebProcessPool::databaseProcessCrashed): Iterate by values()
like in other places.
2016-10-11 Wenson Hsieh <wenson_hsieh@apple.com>
The "Input Events" experimental feature runtime flag should not be on by default
https://bugs.webkit.org/show_bug.cgi?id=163278
Reviewed by Zalan Bujtas.
This was intended to be off by default.
* Shared/WebPreferencesDefinitions.h:
2016-10-10 Zan Dobersek <zdobersek@igalia.com>
Add ENABLE_ENCRYPTED_MEDIA configuration option
https://bugs.webkit.org/show_bug.cgi?id=163219
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
Add the ENABLE_ENCRYPTED_MEDIA configuration option. It will be used
to enable or disable the new EME implementation at build-time.
2016-10-10 Carlos Garcia Campos <cgarcia@igalia.com>
NetworkSession: NetworkDataTask is leaked if download finishes in didReceiveResponse completion handler
https://bugs.webkit.org/show_bug.cgi?id=163204
Reviewed by Alex Christensen.
After the completion handler a reference of the NetworkDataTask is saved in m_downloadsAfterDestinationDecided.
If the download failed or was canceled DownloadManager::dataTaskBecameDownloadTask is never called and the data
task is kept in the download manager forever. This patch exposes NSURLSessionTask state property in
NetworkDataTask, so that the download manager can check the task state after the completion handler and return
early if the download finished or was cancelled.
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::continueDecidePendingDownloadDestination):
* NetworkProcess/NetworkDataTask.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::state):
2016-10-10 Konstantin Tokarev <annulen@yandex.ru>
Added final specifier to WebInspectorServer and to its overridden methods
https://bugs.webkit.org/show_bug.cgi?id=163228
Reviewed by Darin Adler.
* UIProcess/InspectorServer/WebInspectorServer.h:
2016-10-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] 2.14.0 Compile Errors: GTK 3.22.1
https://bugs.webkit.org/show_bug.cgi?id=163190
Reviewed by Alex Christensen.
* UIProcess/gtk/AcceleratedBackingStoreX11.cpp: Include gtk.h since we are using gtk_widget_queue_draw().
2016-10-10 Gyuyoung Kim <gyuyoung.kim@navercorp.com>
[EFL] ewk_context_preferred_languages has been failed since r206949
https://bugs.webkit.org/show_bug.cgi?id=163211
Reviewed by Chris Dumez.
r206949 changed to return value of navigator.language from en-us to en-US
in order to match other browsers and w3c spec. So ewk_context_preferred_languages
needs to change the expected result as well.
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):
2016-10-10 Carlos Garcia Campos <cgarcia@igalia.com>
NetworkSession: downloads started by startDownload() can fail before starting from the API point of view
https://bugs.webkit.org/show_bug.cgi?id=163107
Reviewed by Alex Christensen.
In the network process we use a PendingDownload in this case, but in the UI process we always have a single
download proxy. If an error happens before the pending download is converted inot a real download, the DidFail
messages is received in the download proxy before the DidStart one. This is problematic at least for the GTK+
API, because it's common to connect to the started signal and connect to all other signals from there, but in
this case the started signal is never emitted, and then the failed one is not handled. This is not a problem for
downloads started by convertTaskToDownload, because in that case those loads are not considered a download by
the UI process when those early errors happen, and then the web page handles them.
* NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::PendingDownload): Send DidStart message right after the network load starts like the
non network session code does.
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::convertTaskToDownload): Send DidStart message now that the normal load has been converted
into a download.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::findPendingDownloadLocation): Do not send DidStart message here.
2016-10-10 Carlos Garcia Campos <cgarcia@igalia.com>
Network Session: PendingDownload is always nullptr in DownloadManager::dataTaskBecameDownloadTask
https://bugs.webkit.org/show_bug.cgi?id=163006
Reviewed by Alex Christensen.
In DownloadManager::dataTaskBecameDownloadTask() we are supposed to have either a pending download, or a network
data task depending on whether the download was started by startDownload() or convertTaskToDownload. However, in
both cases we do have a data task and never a pending download. In the case of startDownload() the pending
download is removed from m_pendingDownloads in willDecidePendingDownloadDestination(). The task is always
added to m_downloadsWaitingForDestination in willDecidePendingDownloadDestination() and to
m_downloadsAfterDestinationDecided in continueDecidePendingDownloadDestination() in both cases.
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::dataTaskBecameDownloadTask): Add an ASSERT to ensure we don't have a pending download
at this point and that the download is not already in the map. Remove the download from the
m_downloadsAfterDestinationDecided map, but don't check its result because it might not bein that map if
dataTaskBecameDownloadTask is called synchronously from the didReceiveResponse completion handler.
(WebKit::DownloadManager::willDecidePendingDownloadDestination): Do not take the pending download here, wait
until didReceiveResponse completion handler is called.
(WebKit::DownloadManager::continueDecidePendingDownloadDestination): Take the pending download here ensuring
it's alive while the didReceiveResponse completion handler is called. Also remove invalid early return when
either networkDataTask or completionHandler are nullptr because we are using both unconditionally, we should
return early if both are nullptr to avoid crashes. However, we are checking that the download is in the
m_downloadsWaitingForDestination and in that case we should always have both, so better add asserts there. If
the download is already in the map after the completion handler it means that dataTaskBecameDownloadTask() has
alrady been called, so we can just return in that case.
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): Protect the NetworkDataTask that can
be deleted by dataTaskBecameDownloadTask().
2016-10-10 Tim Horton <timothy_horton@apple.com>
Share more code between iOS and macOS ViewGestureController
https://bugs.webkit.org/show_bug.cgi?id=163158
Reviewed by Simon Fraser.
Share canSwipeInDirection() and the (unused on Mac) alternate back-forward list mechanism.
Make ViewGestureController operate in terms of WebPageProxy, not WKWebView,
because it shouldn't know anything about WKWebView.
Refactor scrollEventCanBecomeSwipe a bit to be less repetitive.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
* UIProcess/Cocoa/ViewGestureController.cpp:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
(WebKit::ViewGestureController::canSwipeInDirection):
(WebKit::ViewGestureController::gestureControllerForPage): Deleted.
* UIProcess/Cocoa/ViewGestureController.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::createWeakPtr):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::setAlternateBackForwardListSourceView): Deleted.
(WebKit::ViewGestureController::canSwipeInDirection): Deleted.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
2016-10-10 Tomas Popela <tpopela@redhat.com>
[GTK] UIProcess crashes when using Japanese IM
https://bugs.webkit.org/show_bug.cgi?id=163011
We have to reference the current GdkEventKey before we try process it
as later when the lambda body is reached the event could be already
freed.
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseKeyPressEvent):
(webkitWebViewBaseKeyReleaseEvent):
* UIProcess/gtk/InputMethodFilter.h:
Use non-copyable Function so we can use WTFMove to pass the event to
lambda.
2016-10-09 Wenson Hsieh <wenson_hsieh@apple.com>
Support InputEvent.inputType for the new InputEvent spec
https://bugs.webkit.org/show_bug.cgi?id=163025
<rdar://problem/28658092>
Reviewed by Darin Adler.
Accounts for some changes to the EditAction enum in nameForEditAction. Some former edit
actions, such as EditActionTyping, have been split out into its more specific subtypes,
so we preserve shipping behavior by treating all of the new subtypes the same way as the
original type.
* UIProcess/WebEditCommandProxy.cpp:
(WebKit::WebEditCommandProxy::nameForEditAction):
2016-10-08 Emanuele Aina <emanuele.aina@collabora.com>
[GTK] Drop redundant wl_display_flush_clients() call
https://bugs.webkit.org/show_bug.cgi?id=161904
Reviewed by Michael Catanzaro.
The Wayland GSource::prepare() function already calls
wl_display_flush_clients() at every mainloop iteration, so there's no
need to further call it on Surface::commit().
* UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::Surface::commit):
* UIProcess/gtk/WaylandCompositor.h:
2016-10-06 Darin Adler <darin@apple.com>
Next step on moving to modern way to return DOM exceptions
https://bugs.webkit.org/show_bug.cgi?id=163016
Reviewed by Ryosuke Niwa.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
(webkit_dom_dom_implementation_create_document_type): Updated for name change
from takeReturnValue to releaseReturnValue.
(webkit_dom_dom_implementation_create_document): Ditto.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
(webkit_dom_dom_selection_collapse_to_end): Use ExceptionOr instead of ExceptionCode.
(webkit_dom_dom_selection_collapse_to_start): Ditto.
(webkit_dom_dom_selection_extend): Ditto.
(webkit_dom_dom_selection_get_range_at): Ditto.
2016-10-08 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r206950.
https://bugs.webkit.org/show_bug.cgi?id=163169
broke an API test (Requested by thorton on #webkit).
Reverted changeset:
"Share more code between iOS and macOS ViewGestureController"
https://bugs.webkit.org/show_bug.cgi?id=163158
http://trac.webkit.org/changeset/206950
2016-10-08 Tim Horton <timothy_horton@apple.com>
Share more code between iOS and macOS ViewGestureController
https://bugs.webkit.org/show_bug.cgi?id=163158
Reviewed by Simon Fraser.
Share canSwipeInDirection() and the (unused on Mac) alternate back-forward list mechanism.
Make ViewGestureController operate in terms of WebPageProxy, not WKWebView,
because it shouldn't know anything about WKWebView.
Refactor scrollEventCanBecomeSwipe a bit to be less repetitive.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
* UIProcess/Cocoa/ViewGestureController.cpp:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
(WebKit::ViewGestureController::canSwipeInDirection):
(WebKit::ViewGestureController::gestureControllerForPage): Deleted.
* UIProcess/Cocoa/ViewGestureController.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::createWeakPtr):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::setAlternateBackForwardListSourceView): Deleted.
(WebKit::ViewGestureController::canSwipeInDirection): Deleted.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
2016-10-07 Anders Carlsson <andersca@apple.com>
Get rid of API::Session and WKSessionRef
https://bugs.webkit.org/show_bug.cgi?id=163140
Reviewed by Tim Horton.
This API is no longer used.
* CMakeLists.txt:
* Shared/API/APIObject.h:
* Shared/API/c/WKSharedAPICast.h:
* UIProcess/API/APISession.cpp: Removed.
(API::generateID): Deleted.
(API::Session::defaultSession): Deleted.
(API::Session::Session): Deleted.
(API::Session::createEphemeral): Deleted.
(API::Session::isEphemeral): Deleted.
(API::Session::getID): Deleted.
(API::Session::~Session): Deleted.
* UIProcess/API/APISession.h: Removed.
* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WKSessionRef.cpp: Removed.
(WKSessionCreate): Deleted.
(WKSessionGetTypeID): Deleted.
(WKSessionIsEphemeral): Deleted.
* UIProcess/API/C/WKSessionRef.h: Removed.
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
2016-10-07 Tim Horton <timothy_horton@apple.com>
Move ViewGestureController files to more accurate locations
https://bugs.webkit.org/show_bug.cgi?id=163141
Reviewed by Anders Carlsson.
* PlatformMac.cmake:
* UIProcess/Cocoa/ViewGestureController.cpp: Renamed from UIProcess/ViewGestureController.cpp.
* UIProcess/Cocoa/ViewGestureController.h: Renamed from UIProcess/mac/ViewGestureController.h.
* UIProcess/Cocoa/ViewGestureController.messages.in: Renamed from UIProcess/mac/ViewGestureController.messages.in.
* WebKit2.xcodeproj/project.pbxproj:
2016-10-07 Tim Horton <timothy_horton@apple.com>
Adopt BlockPtr in ViewGestureController
https://bugs.webkit.org/show_bug.cgi?id=163132
Reviewed by Anders Carlsson.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::setDidMoveSwipeSnapshotCallback):
* UIProcess/ViewGestureController.cpp:
(WebKit::ViewGestureController::SnapshotRemovalTracker::stopWaitingForEvent):
* UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
(WebKit::ViewGestureController::m_didMoveSwipeSnapshotCallback): Deleted.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::platformTeardown):
(WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback): Deleted.
2016-10-07 Anders Carlsson <andersca@apple.com>
Get rid of WKPageSetSession
https://bugs.webkit.org/show_bug.cgi?id=163129
Reviewed by Tim Horton.
This function is no longer used.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetSession): Deleted.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setSessionID): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::sessionID):
* WebProcess/WebPage/WebPage.messages.in:
2016-10-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r206909.
https://bugs.webkit.org/show_bug.cgi?id=163116
Caused most of GTK layout tests to crash (Requested by KaL on
#webkit).
Reverted changeset:
"[GTK] UIProcess crashes when using Japanese IM"
https://bugs.webkit.org/show_bug.cgi?id=163011
http://trac.webkit.org/changeset/206909
2016-10-07 Carlos Garcia Campos <cgarcia@igalia.com>
Network Session: Allow NetworkDataTask decide what to do when override is allowed for a download
https://bugs.webkit.org/show_bug.cgi?id=163010
Reviewed by Alex Christensen.
Current code always deletes the file before starting a download when allow override is True. In soup backend we
use glib API that takes care of it and tries to ensure that the original file is not deleted if the new file
creation fails for whatever reason.
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::continueDecidePendingDownloadDestination): Pass allowOverride to setPendingDownloadLocation().
* NetworkProcess/NetworkDataTask.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::setPendingDownloadLocation): Delete the destination file if exists and allowOverride
is True.
2016-10-07 Tomas Popela <tpopela@redhat.com>
[GTK] UIProcess crashes when using Japanese IM
https://bugs.webkit.org/show_bug.cgi?id=163011
We have to reference the current GdkEventKey before we try process it
as later when the lambda body is reached the event could be already
freed.
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseKeyPressEvent):
(webkitWebViewBaseKeyReleaseEvent):
* UIProcess/gtk/InputMethodFilter.h:
Use non-copyable Function so we can use WTFMove to pass the event to
lambda.
2016-10-06 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Expose WebKitDOMHTMLInputElement APIs for form autofill
https://bugs.webkit.org/show_bug.cgi?id=163082
Reviewed by Darin Adler.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
(webkit_dom_html_input_element_get_auto_filled): Added.
(webkit_dom_html_input_element_set_auto_filled): Added.
(webkit_dom_html_input_element_set_editing_value): Added.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
* WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
2016-10-06 John Wilander <wilander@apple.com>
Update Resource Load Statistics
https://bugs.webkit.org/show_bug.cgi?id=162811
Reviewed by Alex Christensen.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics):
Switched to vector-based classification.
(WebKit::WebResourceLoadStatisticsStore::classifyResource):
Simplified logic and moved the split between has and has
no user interaction into ResourceLoadStatisticsStore.
(WebKit::WebResourceLoadStatisticsStore::clearDataRecords):
Added.
(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
Updated to make use of the new functions.
(WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
Removed stray whitespace.
(WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
Removed stray whitespace.
(WebKit::WebResourceLoadStatisticsStore::createDecoderFromDisk):
Removed stray whitespace.
(WebKit::hasPrevalentResourceCharacteristics): Deleted.
(WebKit::classifyPrevalentResources): Deleted.
* UIProcess/WebResourceLoadStatisticsStore.h:
Added member variables for clearing of data records.
2016-10-06 Youenn Fablet <youenn@apple.com>
[WK2] 304 revalidation on the network process does not update the validated response
https://bugs.webkit.org/show_bug.cgi?id=162973
Reviewed by Darin Adler.
* NetworkProcess/NetworkResourceLoader.cpp: Updating cache entry with the revalidated one.
2016-10-05 Wenson Hsieh <wenson_hsieh@apple.com>
Introduce InputEvent bindings in preparation for the input events spec
https://bugs.webkit.org/show_bug.cgi?id=162954
Reviewed by Ryosuke Niwa.
Adds a new runtime switch for enabling InputEvents.
* Shared/WebPreferencesDefinitions.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2016-10-05 Myles C. Maxfield <mmaxfield@apple.com>
Put variation fonts work behind a compile-time flag
https://bugs.webkit.org/show_bug.cgi?id=162949
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
2016-10-05 Tim Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/Cocoa/WebViewImpl.mm:
2016-10-05 Tim Horton <timothy_horton@apple.com>
Avoid automatically re-taking snapshots for back-forward items that were never loaded into the view
https://bugs.webkit.org/show_bug.cgi?id=162955
<rdar://problem/27659173>
Reviewed by Simon Fraser.
Make it possible for clients to control the snapshot for back-forward
items that are restored from session state without navigating to them,
by ensuring that we won't stomp on the snapshot that they explicitly take,
until a load occurs.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem):
(WebKit::WebBackForwardList::goToItem):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::trackSwipeGesture):
Disambiguate explicit API-driven snapshot recording from automatic,
navigation-driven snapshot recording.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
Get rid of the version of recordNavigationSnapshot() that doesn't take a
back-forward list item, and grab the current item at the one remaining caller.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recordAutomaticNavigationSnapshot):
(WebKit::WebPageProxy::recordNavigationSnapshot):
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
Rename m_suppressNavigationSnapshotting to m_suppressAutomaticNavigationSnapshotting,
and make it be only about automatic (navigation-driven) snapshots; it won't have
any impact on explicit snapshots forced by clients.
Set m_suppressAutomaticNavigationSnapshotting unconditionally when restoring
from session state, so that we won't start automatically snapshotting until
something has loaded in the view.
2016-10-05 Tim Horton <timothy_horton@apple.com>
Make it possible to test ViewSnapshotStore behaviors
https://bugs.webkit.org/show_bug.cgi?id=162983
Reviewed by Simon Fraser.
Add two pieces of SPI to make it easier to test ViewSnapshotStore:
- [WKWebView _disableBackForwardSnapshotVolatilityForTesting]
This makes it so that we don't make snapshots volatile after we
take them, so that they won't get purged while the test is running
and cause the test to be flaky.
- [WKBackForwardListItem _copySnapshotForTesting]
This returns a CGImage with the content of the given back-forward
item's current snapshot, if there is one.
* UIProcess/API/Cocoa/WKBackForwardListItem.mm:
(-[WKBackForwardListItem _copySnapshotForTesting]):
* UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
* UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Added.
Add WKBackForwardListItem SPI to retrieve the snapshot for a given back-forward list item.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _disableBackForwardSnapshotVolatilityForTesting]):
Add WKWebView SPI to disable volatility of snapshots, for testing purposes.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::takeViewSnapshot):
Adopt ViewSnapshot::setVolatile instead of reaching into the surface.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::removeSwipeSnapshot):
Adopt ViewSnapshot::setVolatile instead of reaching into the surface.
* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshotStore::setDisableSnapshotVolatilityForTesting):
(WebKit::ViewSnapshotStore::disableSnapshotVolatilityForTesting):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshot::setVolatile):
(WebKit::ViewSnapshot::asLayerContents):
Move all touching of snapshot volatility into the new setVolatile,
and short-circuit if the testing-only m_disableSnapshotVolatility bit is set
(WebKit::ViewSnapshot::asImageForTesting):
Make a CGImageRef for the aforementioned WKBackForwardListItem SPI.
This is currently not implemented for the iOS Simulator, because we
don't have access to the bits of the image in that case.
2016-10-05 Chris Dumez <cdumez@apple.com>
KeyboardEvent.getModifierState() should support "CapsLock" modifier
https://bugs.webkit.org/show_bug.cgi?id=162861
Reviewed by Darin Adler.
Add support for CapsLock modifier on events.
* Shared/API/c/WKEvent.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
(WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
* Shared/efl/WebEventFactory.cpp:
(WebKit::toWebEventModifiers):
* Shared/ios/WebIOSEventFactory.mm:
(modifiersForEvent):
* Shared/mac/WebEventFactory.mm:
(WebKit::modifiersForEvent):
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(toNSEventModifierFlags):
* UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):
2016-10-05 Zan Dobersek <zdobersek@igalia.com>
Rename ENABLE_ENCRYPTED_MEDIA_V2 to ENABLE_LEGACY_ENCRYPTED_MEDIA
https://bugs.webkit.org/show_bug.cgi?id=162903
Reviewed by Alex Christensen.
Rename build guards for the remaining implementation of the legacy EME API
to ENABLE_LEGACY_ENCRYPTED_MEDIA. This will allow for the future implementation
of the near-finished API to be guarded with the simple ENABLE_ENCRYPTED_MEDIA guards.
* Configurations/FeatureDefines.xcconfig:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_userInterfaceLayoutDirection):
* WebProcess/WebProcess.cpp:
(WebKit::m_resourceLoadStatisticsStorage):
2016-10-05 Daniel Bates <dabates@apple.com>
[WK2][NetworkSession] Ping requests should follow redirects if applicable
https://bugs.webkit.org/show_bug.cgi?id=162580
<rdar://problem/28631274>
Reviewed by Alex Christensen.
Implement support for following redirects, if applicable, of a ping request when using the
Network Session (ENABLE(NETWORK_SESSION)) code path in WebKit2. For ping requests that are
in response to hyperlink auditing (e.g. <a ping>) we should follow redirect responses.
For Content Security Policy and XSS Auditor violation reports we should not follow redirect
responses.
Currently we always ignore redirects for ping requests that are sent using the Network Session
code path in WebKit2. This behavior disagrees with the behavior described in section
"Hyperlink auditing" of the HTML standard, <https://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing> (27 September 2016),
as well as the behavior in Legacy WebKit and WebKit2 with Network Session disabled. We should
follow redirects for ping requests initiated as part of hyperlink auditing to more closely
conform to the HTML standard and match the behavior in Legacy WebKit and WebKit2 with Network
Session disabled.
* NetworkProcess/PingLoad.h:
2016-10-05 Daniel Bates <dabates@apple.com>
Do not follow redirects when sending violation report
https://bugs.webkit.org/show_bug.cgi?id=162520
<rdar://problem/27957639>
Reviewed by Alex Christensen.
Update the non-Network Session WebKit2 implementation to follow redirect responses for a ping
request, if applicable. I did not update the Network Session implementation at this time. I
will fix it in <https://bugs.webkit.org/show_bug.cgi?id=162580>.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::loadPing): Tell PingHandle whether to follow redirects.
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode): Encode NetworkResourceLoadParameters::shouldFollowRedirects.
(WebKit::NetworkResourceLoadParameters::decode): Decode NetworkResourceLoadParameters::shouldFollowRedirects.
* NetworkProcess/PingLoad.h: Added FIXME comment to implement support for following redirects,
if applicable (for hyperlink auditing). See <https://bugs.webkit.org/show_bug.cgi?id=162580>
for more details.
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::createPingHandle): Modified to take a boolean whether to follow
redirects responses and set NetworkResourceLoadParameters::shouldFollowRedirects as appropriate.
* WebProcess/Network/WebLoaderStrategy.h:
2016-10-05 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Move global TLS errors handling from ResourceHandle to SoupNetworkSession
https://bugs.webkit.org/show_bug.cgi?id=162910
Reviewed by Alex Christensen.
Use SoupNetworkSession instead of ResourceHandle.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::setIgnoreTLSErrors):
(WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
2016-10-05 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build with USE_REDIRECTED_XCOMPOSITE_WINDOW disabled.
* UIProcess/AcceleratedDrawingAreaProxy.cpp:
(WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
2016-10-04 Chris Dumez <cdumez@apple.com>
Implement KeyboardEvent.code from the UI Event spec
https://bugs.webkit.org/show_bug.cgi?id=149584
Reviewed by Darin Adler.
Add support for Keyboard.code attribute:
- https://w3c.github.io/uievents/#dom-keyboardevent-code
- https://w3c.github.io/uievents-code/
* Shared/WebEvent.h:
(WebKit::WebKeyboardEvent::code):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::WebKeyboardEvent):
(WebKit::WebKeyboardEvent::encode):
(WebKit::WebKeyboardEvent::decode):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebKeyboardEvent):
2016-10-04 Said Abou-Hallawa <sabouhallawa@apple.com>
The dragged image should be the current frame only of the animated image
https://bugs.webkit.org/show_bug.cgi?id=162109
Reviewed by Tim Horton.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::provideDataForPasteboard): Call the Image function with its new name.
2016-10-04 Ryosuke Niwa <rniwa@webkit.org>
Revert a change erroneously committed in r206795.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2016-10-04 Anders Carlsson <andersca@apple.com>
Properly kill web processes in the launching state
https://bugs.webkit.org/show_bug.cgi?id=162938
Reviewed by Tim Horton.
* UIProcess/Launcher/ProcessLauncher.h:
Add m_xpcConnection member.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
Store the XPC connection in the m_xpcConnection member variable.
In the reply handler, handle m_xpcConnection being null.
(WebKit::ProcessLauncher::platformInvalidate):
Cancel and kill the connection.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::terminateProcess):
Get rid of an assertion.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::requestTermination):
Handle the launching state.
2016-10-04 Tim Horton <timothy_horton@apple.com>
Fix the build.
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::highestUsedItemID):
2016-10-04 Tim Horton <timothy_horton@apple.com>
Fix a typo in WebBackForwardListItem (highed->highest)
https://bugs.webkit.org/show_bug.cgi?id=162935
Reviewed by Anders Carlsson.
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::highestUsedItemID):
(WebKit::WebBackForwardListItem::highedUsedItemID): Deleted.
* Shared/WebBackForwardListItem.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
2016-10-04 Yusuke Suzuki <utatane.tea@gmail.com>
[DOMJIT] Introduce DOMJIT::GetterSetter to tell JIT information
https://bugs.webkit.org/show_bug.cgi?id=162916
Reviewed by Filip Pizlo.
* CMakeLists.txt:
2016-10-04 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Remove SSLPolicyFlags from SoupNetworkSession
https://bugs.webkit.org/show_bug.cgi?id=162906
Reviewed by Michael Catanzaro.
* NetworkProcess/soup/NetworkProcessMainSoup.cpp:
(WebKit::NetworkProcessMainUnix):
2016-10-04 Wenson Hsieh <wenson_hsieh@apple.com>
Media controls are displayed in the incorrect state momentarily after switching between tabs playing media
https://bugs.webkit.org/show_bug.cgi?id=162766
<rdar://problem/28533523>
Reviewed by Jer Noble.
Plumbs some more Now Playing information from the web process to the UI process for testing purposes. See
WebCore ChangeLog for more details.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _handleActiveNowPlayingSessionInfoResponse:title:duration:elapsedTime:]):
(-[WKWebView _handleActiveNowPlayingSessionInfoResponse:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleActiveNowPlayingSessionInfoResponse):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::handleActiveNowPlayingSessionInfoResponse):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::requestActiveNowPlayingSessionInfo):
2016-10-04 Zan Dobersek <zdobersek@igalia.com>
Unreviewed GTK+ build fix.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageNavigationClient): Guard the call to getDefaultWebCryptoMasterKey()
with ENABLE(SUBTLE_CRYPTO), since the same guard is used for the definition. Fixes
GTK+ production builds where the feature is disabled.
2016-10-03 Keith Rollin <krollin@apple.com>
More logging to diagnose "WebKit encountered an internal error" messages
https://bugs.webkit.org/show_bug.cgi?id=162754
Reviewed by Antti Koivisto.
Add more logging around calls to internalError, as well as some
low-level logging around SharedMemory, and mach_vm_map in particular.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
* Platform/Logging.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::allocate):
(WebKit::makeMemoryEntry):
(WebKit::SharedMemory::map):
(WebKit::SharedMemory::~SharedMemory):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::networkProcessCrashed):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResource):
2016-10-03 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r206754.
This change broke the El Capitan and Yosemite debug builds.
Reverted changeset:
"More logging to diagnose "WebKit encountered an internal
error" messages"
https://bugs.webkit.org/show_bug.cgi?id=162754
http://trac.webkit.org/changeset/206754
2016-10-03 Keith Rollin <krollin@apple.com>
More logging to diagnose "WebKit encountered an internal error" messages
https://bugs.webkit.org/show_bug.cgi?id=162754
Reviewed by Antti Koivisto.
Add more logging around calls to internalError, as well as some
low-level logging around SharedMemory, and mach_vm_map in particular.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
* Platform/Logging.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::allocate):
(WebKit::makeMemoryEntry):
(WebKit::SharedMemory::map):
(WebKit::SharedMemory::~SharedMemory):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::networkProcessCrashed):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResource):
2016-10-03 Chris Dumez <cdumez@apple.com>
Add support for KeyboardEvent.key attribute
https://bugs.webkit.org/show_bug.cgi?id=36267
Reviewed by Darin Adler.
Add support for KeyboardEvent.key attribute.
* Shared/WebEvent.h:
(WebKit::WebKeyboardEvent::key):
(WebKit::WebKeyboardEvent::unmodifiedText): Deleted.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::WebKeyboardEvent):
(WebKit::WebKeyboardEvent::encode):
(WebKit::WebKeyboardEvent::decode):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebKeyboardEvent):
2016-10-03 Chris Dumez <cdumez@apple.com>
Add support for KeyboardEvent.key attribute
https://bugs.webkit.org/show_bug.cgi?id=36267
Reviewed by Darin Adler.
Add support for KeyboardEvent.key attribute.
* Shared/WebEvent.h:
(WebKit::WebKeyboardEvent::key):
(WebKit::WebKeyboardEvent::unmodifiedText): Deleted.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::WebKeyboardEvent):
(WebKit::WebKeyboardEvent::encode):
(WebKit::WebKeyboardEvent::decode):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebKeyboardEvent):
2016-10-03 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Cleanup persistent credential storage code
https://bugs.webkit.org/show_bug.cgi?id=162777
Reviewed by Alex Christensen.
Use USE(LIBSECRET) instead of ENABLE(CREDENTIAL_STORAGE).
* UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
(webkit_authentication_request_can_save_credentials):
2016-10-02 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r206683.
This change caused API test WebKit2.FindMatches to fail on
Mac.
Reverted changeset:
"The dragged image should be the current frame only of the
animated image"
https://bugs.webkit.org/show_bug.cgi?id=162109
http://trac.webkit.org/changeset/206683
2016-09-30 Myles C. Maxfield <mmaxfield@apple.com>
Follow-up patch after r206701
https://bugs.webkit.org/show_bug.cgi?id=162818
Unreviewed.
I missed one place required to enable an experimental feature by default.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):
2016-09-30 Dan Bernstein <mitz@apple.com>
[iOS] Editing menu omits the Share command if the selected text is longer than 200 characters
https://bugs.webkit.org/show_bug.cgi?id=162821
<rdar://problem/28409828>
Reviewed by Tim Horton.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView canPerformAction:withSender:]): Changed to return YES for the _share:
action even if the selection is longer than 200 characters. While Define should not have
been available for longer selections, Share does not have such a limitation.
2016-09-30 Myles C. Maxfield <mmaxfield@apple.com>
Turn variation fonts on by default
https://bugs.webkit.org/show_bug.cgi?id=162818
Reviewed by Simon Fraser.
* Shared/WebPreferencesDefinitions.h:
2016-09-30 Brady Eidson <beidson@apple.com>
REGRESSION (Safari 10 combined with WK changes): Unable to store WebCrypto keys in IndexedDB database.
<rdar://problem/28334440> and https://bugs.webkit.org/show_bug.cgi?id=162554
Reviewed by Alexey Proskuryakov.
Safari 10 has a WKPageNavigation client but does not implement the "copyWebCryptoMasterKey" callback.
WebKit just fails in this case, instead of falling back to "getDefaultWebCryptoMasterKey".
It should fall back.
Additionally there's a WKContextClient callback to get the crypto key, also, but it is completely unused.
So it should be pulled.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::webCryptoMasterKey): Deleted.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
(WKPageSetPageNavigationClient): If the client doesn't implement this method, fallback to getDefaultWebCryptoMasterKey.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::webCryptoMasterKey): If the client doesn't implement this method,
fallback to getDefaultWebCryptoMasterKey.
* UIProcess/WebContextClient.cpp:
(WebKit::WebContextClient::copyWebCryptoMasterKey): Deleted.
* UIProcess/WebContextClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::wrapCryptoKey): Only ask the NavigationClient before falling back. Don't ask the loader client.
(WebKit::WebPageProxy::unwrapCryptoKey): Ditto.
2016-09-30 Said Abou-Hallawa <sabouhallawa@apple.com>
The dragged image should be the current frame only of the animated image
https://bugs.webkit.org/show_bug.cgi?id=162109
Reviewed by Tim Horton.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::provideDataForPasteboard): Call the Image function with its new name.
2016-09-30 Anders Carlsson <andersca@apple.com>
Second time going into fullscreen using silverlight, will hide the menu bar and dock for Safari
https://bugs.webkit.org/show_bug.cgi?id=162805
rdar://problem/28208495
Reviewed by Dan Bernstein.
Turns out that the WindowRef wrappers for full screen NSWindows can end up in the m_windows HashSet,
and never go away.
Fix this by storing the canonical CGWindowIDs in the hash map instead.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::cgWindowID):
(WebKit::windowCoversAnyScreen):
(WebKit::FullscreenWindowTracker::windowShown):
(WebKit::FullscreenWindowTracker::windowHidden):
2016-09-30 Myles C. Maxfield <mmaxfield@apple.com>
Create runtime flag for variation font work
https://bugs.webkit.org/show_bug.cgi?id=162780
Reviewed by Alex Christensen.
* Shared/WebPreferencesDefinitions.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2016-09-30 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint
https://bugs.webkit.org/show_bug.cgi?id=162787
<rdar://problem/28554292>
Reviewed by Benjamin Poulain.
Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint.
* Platform/spi/ios/UIKitSPI.h:
* Shared/WebEvent.h:
(WebKit::WebPlatformTouchPoint::setRadiusX):
(WebKit::WebPlatformTouchPoint::radiusX):
(WebKit::WebPlatformTouchPoint::setRadiusY):
(WebKit::WebPlatformTouchPoint::radiusY):
(WebKit::WebPlatformTouchPoint::setRotationAngle):
(WebKit::WebPlatformTouchPoint::rotationAngle):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):
* Shared/ios/WebPlatformTouchPointIOS.cpp:
(WebKit::WebPlatformTouchPoint::encode):
(WebKit::WebPlatformTouchPoint::decode):
2016-09-30 Megan Gardner <megan_gardner@apple.com>
Make it possible to test web-related user-interface features
https://bugs.webkit.org/show_bug.cgi?id=162657
Reviewed by Simon Fraser.
Added the ability to pull the strings from an Action Sheet and pass them to
test scripts to make sure we are giving the correct available actions for
the item we are interacting with.
Added a test for long press on an image, and used the sheet scraping functionality
to make sure that the correct actions were being displayed.
Test for previous patch, Changeset 205915; Bug 161761
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _contentsOfUserInterfaceItem:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant currentAvailableActionStrings]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _contentsOfUserInterfaceItem:]):
2016-09-27 Anders Carlsson <andersca@apple.com>
Remove a couple of unused members from PlatformKeyboardEvent
https://bugs.webkit.org/show_bug.cgi?id=162641
Reviewed by Tim Horton.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
2016-09-29 Nan Wang <n_wang@apple.com>
AX: iOS: Tapping <input> in Safari zooms in a bit when page has max scale = 1
https://bugs.webkit.org/show_bug.cgi?id=162471
Reviewed by Simon Fraser.
* Shared/AssistedNodeInformation.cpp:
(WebKit::AssistedNodeInformation::encode):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _displayFormNodeInputView]):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::maximumPageScaleFactorIgnoringAlwaysScalable):
(WebKit::WebPage::getAssistedNodeInformation):
2016-09-29 Daniel Bates <dabates@apple.com>
Mark NetworkLoad as final
https://bugs.webkit.org/show_bug.cgi?id=162681
Reviewed by Alex Christensen.
Mark class NetworkLoad as final as we do not have any derived classes at the moment and it
is unclear if it would make sense to subclass it. We can always unmark the class if it turns
out that it makes sense to subclass it.
* NetworkProcess/NetworkLoad.h:
2016-09-29 Sam Weinig <sam@webkit.org>
Allow overriding some NSURLSessionConfiguration properties on a per-NetworkProcess basis
<rdar://problem/27648683>
https://bugs.webkit.org/show_bug.cgi?id=162735
Reviewed by Dan Bernstein.
Add SPI for overriding the following NSURLSessionConfigurations properties:
- _sourceApplicationBundleIdentifier
- _sourceApplicationSecondaryIdentifier
- _CTDataConnectionServiceType
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::globalSourceApplicationBundleIdentifier):
(WebKit::globalSourceApplicationSecondaryIdentifier):
(WebKit::globalCTDataConnectionServiceType):
(WebKit::NetworkSession::setCustomProtocolManager):
(WebKit::NetworkSession::setSourceApplicationAuditTokenData):
(WebKit::NetworkSession::setSourceApplicationBundleIdentifier):
(WebKit::NetworkSession::setSourceApplicationSecondaryIdentifier):
(WebKit::NetworkSession::setCTDataConnectionServiceType):
(WebKit::NetworkSession::NetworkSession):
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration sourceApplicationBundleIdentifier]):
(-[_WKProcessPoolConfiguration setSourceApplicationBundleIdentifier:]):
(-[_WKProcessPoolConfiguration sourceApplicationSecondaryIdentifier]):
(-[_WKProcessPoolConfiguration setSourceApplicationSecondaryIdentifier:]):
(-[_WKProcessPoolConfiguration CTDataConnectionServiceType]):
(-[_WKProcessPoolConfiguration setCTDataConnectionServiceType:]):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2016-09-29 Carlos Garcia Campos <cgarcia@igalia.com>
NetworkSession: HTTP authentication doesn't work if PROTECTION_SPACE_AUTH_CALLBACK is not enabled
https://bugs.webkit.org/show_bug.cgi?id=162724
Reviewed by Alex Christensen.
NetworkLoad always expects continueCanAuthenticateAgainstProtectionSpace() to be called to complete the
authentication challenge, which is only defined when PROTECTION_SPACE_AUTH_CALLBACK is enabled.
I've added missing #ifdefs for PROTECTION_SPACE_AUTH_CALLBACK.
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
* NetworkProcess/Downloads/PendingDownload.h:
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::~NetworkLoad):
(WebKit::NetworkLoad::didReceiveChallenge): Call completeAuthenticationChallenge() instead of
canAuthenticateAgainstProtectionSpaceAsync() when PROTECTION_SPACE_AUTH_CALLBACK is not enabled.
(WebKit::NetworkLoad::completeAuthenticationChallenge): Moved common code to complete the authentication
challenge from continueCanAuthenticateAgainstProtectionSpace().
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace): Call completeAuthenticationChallenge().
(WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadClient.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
(WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
* Shared/Authentication/AuthenticationManager.h:
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Downloads/DownloadProxy.messages.in:
2016-09-28 Joseph Pecoraro <pecoraro@apple.com>
WKSharedAPICast should not warn about acceptable custom context menu tag values
https://bugs.webkit.org/show_bug.cgi?id=162597
<rdar://problem/28487627>
Reviewed by Tim Horton.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toImpl):
Don't log an error when casting ContextMenu types if it is within
the Custom ContextMenu tag range.
2016-09-27 Wenson Hsieh <wenson_hsieh@apple.com>
Adopt MediaRemote SPI to achieve desired Now Playing behavior
https://bugs.webkit.org/show_bug.cgi?id=162658
<rdar://problem/28499358>
Reviewed by Jer Noble.
Plumbs Now Playing session information (for now, this is just a flag indicating whether or not there is an
active session) across from the web process to the UI process for testing in the form of asynchronous request/
handle-response messages on the WebPage and its proxy in the UI process.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _requestActiveNowPlayingSessionInfo]):
(-[WKWebView _handleActiveNowPlayingSessionInfoResponse:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestActiveNowPlayingSessionInfo):
(WebKit::WebPageProxy::handleActiveNowPlayingSessionInfoResponse):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::handleActiveNowPlayingSessionInfoResponse):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::requestActiveNowPlayingSessionInfo):
2016-09-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Switch to use GMenu internally in the context menu implementation
https://bugs.webkit.org/show_bug.cgi?id=162603
Reviewed by Michael Catanzaro.
Switch to use GAction instead of GtkAction internally, but still keeping a GtkAction associated to the GAction,
because our API depends on GtkAction.
* Shared/gtk/WebContextMenuItemGtk.cpp:
(WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk):
(WebKit::WebContextMenuItemGtk::createActionIfNeeded): Create the GAction and the associated GtkAction. Ensure a
unique name for the GAction, since the name now matters.
* Shared/gtk/WebContextMenuItemGtk.h:
(WebKit::WebContextMenuItemGtk::gtkAction):
(WebKit::WebContextMenuItemGtk::gAction):
(WebKit::WebContextMenuItemGtk::submenuItems): Deleted.
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::contextMenuItemActivatedCallback): Use the GAction.
(WebKit::WebContextMenuProxyGtk::append): Create a new GMenuItem for the GAction.
(WebKit::WebContextMenuProxyGtk::buildMenu): Build a GMenu for the given items.
(WebKit::WebContextMenuProxyGtk::populate): Create a GMenu and bind it ot the GtkMenu.
(WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): Create the GActionGroup for the menu.
(WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): Remove the action group from the GtkMenu.
* UIProcess/gtk/WebContextMenuProxyGtk.h:
2016-09-27 Daniel Bates <dabates@apple.com>
NetworkLoad and PingLoad should use private inheritance
https://bugs.webkit.org/show_bug.cgi?id=162649
Reviewed by Alex Christensen.
Make NetworkLoad privately inherit from NetworkDataTaskClient and ResourceHandleClient,
and make the client callbacks from these interfaces private as this class implements
these interfaces.
Similarly, make PingLoad privately inherit from ResourceHandleClient.
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/PingLoad.h:
2016-09-20 Anders Carlsson <andersca@apple.com>
PlatformEvent::m_modifiers should be an OptionSet
https://bugs.webkit.org/show_bug.cgi?id=162326
Reviewed by Daniel Bates.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
(WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
2016-09-27 Dan Bernstein <mitz@apple.com>
[iOS] REGRESSION (r182126): Selection highlight and handles aren’t visible with WKSelectionGranularityCharacter
https://bugs.webkit.org/show_bug.cgi?id=162577
<rdar://problem/28481984>
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _uiTextSelectionRectViews]): Added this method in the WKTesting category, which
uses UIKit internals to get the views used for the selection highlight.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _selectionClipRect]): When selection is not confined to a form control or
content-editable element, return the null rect to indicate no clipping, rather than
clipping to the empty rect at the origin.
2016-09-27 Jer Noble <jer.noble@apple.com>
Remove deprecated ENCRYPTED_MEDIA implementation.
https://bugs.webkit.org/show_bug.cgi?id=161010
Reviewed by Eric Carlson.
Remove ENABLE_ENCRYPTED_MEDIA.
* Configurations/FeatureDefines.xcconfig:
2016-09-27 Chris Dumez <cdumez@apple.com>
[WK2] Navigating to a Blob URL does not trigger a download
https://bugs.webkit.org/show_bug.cgi?id=162574
Reviewed by Darin Adler.
Add support for converting Blob URL loads into downloads.
* NetworkProcess/Downloads/BlobDownloadClient.cpp:
(WebKit::BlobDownloadClient::didReceiveResponseAsync):
Make sure we return a valid suggested filename because the client side (Safari)
does not deal with empty suggested filenames. Use "unknown" by default to
match the default suggested filename of non-Blob downloads.
* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::startWithHandle):
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::convertHandleToDownload):
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::startNetworkLoadWithHandle):
* NetworkProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::startNetworkLoadWithHandle):
* NetworkProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::startNetworkLoadWithHandle):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* NetworkProcess/NetworkLoad.h:
(WebKit::NetworkLoad::handle):
2016-09-27 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Unreviewed typo fix
* UIProcess/API/gtk/WebKitWebInspector.cpp:
(webkit_web_inspector_class_init):
2016-09-27 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
[GTK] Should check whether GDK can use GL before asking it to
https://bugs.webkit.org/show_bug.cgi?id=162598
Reviewed by Michael Catanzaro.
gdk_cairo_draw_from_gl can fail even when WebKit itself has been able to use GL (its
context creation code might be buggy, GL may have been disabled using GDK_GL=disable, …).
Unfortunately it does not have any error reporting other than a warning printed to
stderr, so we cannot fallback from it. We have to first check if GL can be used by GDK
by trying to create a context.
See https://bugzilla.redhat.com/show_bug.cgi?id=1378987
* UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
(WebKit::AcceleratedBackingStoreWayland::canGdkUseGL): decide whether GDK can use GL by
trying to create a context for a GdkWindow.
(WebKit::AcceleratedBackingStoreWayland::paint): fallback to glReadPixels if GDK cannot
use GL.
* UIProcess/gtk/AcceleratedBackingStoreWayland.h:
2016-09-26 Tim Horton <timothy_horton@apple.com>
Delete some unused code from r202695
https://bugs.webkit.org/show_bug.cgi?id=162595
<rdar://problem/28343784>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setIsBlankBeforeFirstNonEmptyLayout:]): Deleted.
(-[WKWebView _didFirstVisuallyNonEmptyLayoutForMainFrame]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
We didn't end up needing this mechanism.
2016-09-26 Dan Bernstein <mitz@apple.com>
-_webViewWebProcessDidBecomeUnresponsive: gets called when the Web process is stopped in the debugger
https://bugs.webkit.org/show_bug.cgi?id=162234
Reviewed by Sam Weinig.
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::platformIsBeingDebugged): Use the KERN_PROC sysctl to get the
process flags and check for P_TRACED.
* UIProcess/ResponsivenessTimer.cpp:
(WebKit::ResponsivenessTimer::timerFired): Call the new client function
mayBecomeUnresponsive. If it returns false, restart the timer and bail out without
changing the responsiveness state.
* UIProcess/ResponsivenessTimer.h: Declared new client function mayBecomeUnresponsive.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::platformIsBeingDebugged): A generic implementation that always
returns false.
(WebKit::WebProcessProxy::mayBecomeUnresponsive): Implement this new
ResponsivenessTimer::Client function to return true unless the process is being debugged.
* UIProcess/WebProcessProxy.h:
2016-09-26 Chris Dumez <cdumez@apple.com>
[WK2] BlobDownloadClient should use asynchronous IPC to decide destination path
https://bugs.webkit.org/show_bug.cgi?id=162568
Reviewed by Alex Christensen.
Use DecideDestinationWithSuggestedFilenameAsync IPC to decide the destination
path in the case of Blob downloads, instead of the synchronous alternative.
To achieve this, BlobResourceHandle was updated in WebCore to properly support
asynchronous callback and BlobDownloadClient was updated to use asynchronous
callbacks. When BlobDownloadClient::didReceiveResponseAsync() is called, we
now ask the WebContent process asynchronously to decide what the destination
path should be. Then, when we later get the destination path back from the
WebContent process, we create the file on disk and call
continueDidReceiveResponse() on the BlobResourceHandle so we start getting the
blob data to write.
* NetworkProcess/Downloads/BlobDownloadClient.cpp:
(WebKit::BlobDownloadClient::didReceiveResponseAsync):
(WebKit::BlobDownloadClient::didDecideDownloadDestination):
* NetworkProcess/Downloads/BlobDownloadClient.h:
* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::decideDestinationWithSuggestedFilenameAsync):
(WebKit::Download::didDecideDownloadDestination):
(WebKit::Download::continueDidReceiveResponse):
(WebKit::Download::decideDestinationWithSuggestedFilename): Deleted.
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::willDecidePendingDownloadDestination):
(WebKit::DownloadManager::continueDecidePendingDownloadDestination):
(WebKit::DownloadManager::convertHandleToDownload): Deleted.
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::continueDidReceiveResponse):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::continueDecidePendingDownloadDestination):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync): Deleted.
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Downloads/DownloadProxy.messages.in:
2016-09-26 Daniel Bates <dabates@apple.com>
Mark Ping{Handle, Load} as final
https://bugs.webkit.org/show_bug.cgi?id=162576
Reviewed by Alex Christensen.
We should not support subclassing of a ping handle or overriding its NetworkDataTaskClient
callbacks because there are security/privacy implications with a ping request. We should
not encourage subclassing without careful consideration.
* NetworkProcess/PingLoad.h:
2016-09-26 Daniel Bates <dabates@apple.com>
Rename IOS_TEXT_AUTOSIZING to TEXT_AUTOSIZING
https://bugs.webkit.org/show_bug.cgi?id=162365
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2016-09-26 Michael Catanzaro <mcatanzaro@igalia.com>
Fix -Wformat warnings in WebLoaderStrategy
https://bugs.webkit.org/show_bug.cgi?id=162553
Reviewed by Alex Christensen.
Consistently use PRIu64 to print uint64_t
* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::didReceiveResponse):
(WebKit::Download::didReceiveData):
(WebKit::Download::didFinish):
(WebKit::Download::didFail):
(WebKit::Download::didCancel):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::setDefersLoading):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::willSendRequest):
(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didFailResourceLoad):
(WebKit::WebResourceLoader::didReceiveResource):
== Rolled over to ChangeLog-2016-09-26 ==