Add and remove cookie partition accordingly in intermediary redirect requests
[WebKit-https.git] / Source / WebKit / ChangeLog
index b1a9f4f..fd00148 100644 (file)
@@ -1,3 +1,284 @@
+2017-10-17  John Wilander  <wilander@apple.com>
+
+        Add and remove cookie partition accordingly in intermediary redirect requests
+        https://bugs.webkit.org/show_bug.cgi?id=178369
+        <rdar://problem/34467603>
+
+        Reviewed by Brent Fulgham.
+
+        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+        (WebKit::shouldChangePartition):
+            Convenience function. Comment documents the logic.
+        (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
+            Now adds and removes cookie partition based on the
+            redirect-to URL's domain.
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundleResourceLoadStatisticsNotifyObserver):
+            Test infrastructure.
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+
+2017-10-17  Youenn Fablet  <youenn@apple.com>
+
+        Cache API implementation should be able to compute storage size for WebKit client applications.
+        https://bugs.webkit.org/show_bug.cgi?id=178350
+
+        Reviewed by Chris Dumez.
+
+        When gathering data from DOM Cache, we compute the size as follows:
+        - If Caches object is not persistent, size is zero
+        - If Caches object is persistent, we use the size computed by NetworkCache::Storage. 
+        Covered by updated tests.
+
+        * NetworkProcess/cache/CacheStorageEngine.cpp:
+        (WebKit::CacheStorage::ReadOriginsTaskCounter::create):
+        (WebKit::CacheStorage::ReadOriginsTaskCounter::addOrigin):
+        (WebKit::CacheStorage::Engine::fetchEntries):
+        * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
+        (WebKit::CacheStorage::Caches::storageSize const):
+        * NetworkProcess/cache/CacheStorageEngineCaches.h:
+        * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
+        (WKWebsiteDataStoreGetFetchCacheSizeForOrigin):
+        * UIProcess/API/C/WKWebsiteDataStoreRef.h:
+
+2017-10-17  Keith Miller  <keith_miller@apple.com>
+
+        Change WebCore sources to work with unified source builds
+        https://bugs.webkit.org/show_bug.cgi?id=178229
+
+        Rubber stamped by Tim Horton.
+
+        * Configurations/FeatureDefines.xcconfig:
+
+2017-10-16  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Unreviewed, fix the iOS build after r223431
+
+        Remove an unused variable captured in a lambda.
+
+        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
+
+2017-10-12  Matt Rajca  <mrajca@apple.com>
+
+        Add API support for quirk that lets an arbitrary click allow auto-play.
+        https://bugs.webkit.org/show_bug.cgi?id=178227
+
+        Reviewed by Alex Christensen.
+
+        Instead of hardcoding sites in WebCore, let API clients control which websites opt into the quirk that lets
+        an arbitrary click allow auto-play via website policies.
+
+        * Shared/WebsitePolicies.h:
+        * UIProcess/API/C/WKWebsitePolicies.cpp:
+        (WKWebsitePoliciesSetAllowedAutoplayQuirks):
+        (WKWebsitePoliciesGetAllowedAutoplayQuirks):
+        * UIProcess/API/C/WKWebsitePolicies.h:
+        * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
+        * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
+        (-[_WKWebsitePolicies setAllowedAutoplayQuirks:]):
+        (-[_WKWebsitePolicies allowedAutoplayQuirks]):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::applyToDocumentLoader):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updateWebsitePolicies):
+
+2017-10-16  Andy Estes  <aestes@apple.com>
+
+        [Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and ApplePayError
+        https://bugs.webkit.org/show_bug.cgi?id=178191
+        <rdar://problem/34906367>
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
+        (WebKit::toNSError):
+
+2017-10-16  Tim Horton  <timothy_horton@apple.com>
+
+        Safari crashes after searching PDF (under [WKPDFView zoom:to:atPoint:kind:])
+        https://bugs.webkit.org/show_bug.cgi?id=178358
+        <rdar://problem/34676899>
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/ios/WKPDFView.mm:
+        (-[WKPDFView _didFindMatch:]):
+        UIPDFSelection can return a null rect as the selection's bounds.
+        We can't zoom to a null rect (and doing so results in CA throwing an
+        exception later).
+
+2017-10-16  Alex Christensen  <achristensen@webkit.org>
+
+        Add a _WKThumbnailView initializer with a WKWebView
+        https://bugs.webkit.org/show_bug.cgi?id=178351
+        <rdar://problem/34979453>
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _page]):
+        (-[WKWebView _setThumbnailView:]):
+        (-[WKWebView _thumbnailView]):
+        (-[WKWebView _setIgnoresAllEvents:]):
+        (-[WKWebView _ignoresAllEvents]):
+        * UIProcess/API/Cocoa/WKWebViewInternal.h:
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+        * UIProcess/API/Cocoa/_WKThumbnailView.h:
+        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
+        (-[_WKThumbnailView initWithFrame:fromWKWebView:]):
+        (-[_WKThumbnailView _viewWasUnparented]):
+        (-[_WKThumbnailView _viewWasParented]):
+
+2017-10-16  Alex Christensen  <achristensen@webkit.org>
+
+        Expose more WKView properties as WKWebViewPrivate SPI
+        https://bugs.webkit.org/show_bug.cgi?id=178349
+        <rdar://problem/34980919>
+
+        Reviewed by Tim Horton.
+
+        _backgroundExtendsBeyondPage was already exposed on iOS, but we need it on Mac, too.
+        A few other properties also need exposing.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (toAPIScrollbarStyle):
+        (toCoreScrollbarStyle):
+        (-[WKWebView _setBackgroundExtendsBeyondPage:]):
+        (-[WKWebView _backgroundExtendsBeyondPage]):
+        (-[WKWebView _setOverlayScrollbarStyle:]):
+        (-[WKWebView _overlayScrollbarStyle]):
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+
+2017-10-16  Chris Dumez  <cdumez@apple.com>
+
+        Log using differential privacy domains where the WebContent process crashes
+        https://bugs.webkit.org/show_bug.cgi?id=178346
+        <rdar://problem/33293830>
+
+        Reviewed by Alex Christensen.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::reload):
+        (WebKit::WebPageProxy::currentURL const):
+        (WebKit::WebPageProxy::processDidTerminate):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::didClose):
+
+2017-10-16  Youenn Fablet  <youenn@apple.com>
+
+        Activate Cache API by default
+        https://bugs.webkit.org/show_bug.cgi?id=178186
+
+        Reviewed by Chris Dumez.
+
+        * Shared/WebPreferencesDefinitions.h:
+
+2017-10-16  Sam Weinig  <sam@webkit.org>
+
+        [Settings] Remove all custom code from Settings.h/cpp
+        https://bugs.webkit.org/show_bug.cgi?id=178330
+
+        Reviewed by Simon Fraser.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetFrameFlatteningEnabled):
+        (WKPreferencesGetFrameFlatteningEnabled):
+        * UIProcess/API/glib/WebKitSettings.cpp:
+        (webkit_settings_get_enable_frame_flattening):
+        (webkit_settings_set_enable_frame_flattening):
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setFrameFlatteningEnabled):
+        
+            Update for naming changes of FrameFlattening now that it is an enum class.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::contentsSizeChanged const):
+
+            Ge the effectiveFrameFlattening from the FrameView, rather than the Settings.
+
+2017-10-16  Chris Dumez  <cdumez@apple.com>
+
+        [WK2][NetworkSession] Add support for resuming downloads
+        https://bugs.webkit.org/show_bug.cgi?id=177625
+        <rdar://problem/34345975>
+
+        Reviewed by Alex Christensen.
+
+        Add support for resuming downloads for the WK2 NETWORK_SESSION code path.
+
+        This was tested manually. I was unable to write an API test because our tests
+        do not run an HTTP server and CFNetwork does not seem to generate resume data
+        when cancelling a download over non-HTTP.
+
+        * NetworkProcess/Downloads/Download.cpp:
+        (WebKit::Download::didReceiveChallenge):
+        (WebKit::Download::continueCanAuthenticateAgainstProtectionSpace):
+        * NetworkProcess/Downloads/Download.h:
+        * NetworkProcess/Downloads/DownloadManager.cpp:
+        (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
+        (WebKit::DownloadManager::resumeDownload):
+        * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
+        (WebKit::Download::resume):
+        This currently includes a workaround for <rdar://problem/34745171>. We update the
+        resume data to include the NSURLSessionResumeInfoLocalPath key with the final
+        destination path so that CFNetwork looks for the temporary data at the right
+        location.
+
+        * NetworkProcess/cocoa/NetworkSessionCocoa.h:
+        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
+        (WebKit::NetworkSessionCocoa::downloadTaskWithResumeData):
+        * Shared/Authentication/AuthenticationManager.cpp:
+        (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
+        * Shared/Authentication/AuthenticationManager.h:
+
+2017-10-16  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [WPE] Build failure due to invalid cast of EGLNativeWindowType when targetting 64-bit ARM
+        https://bugs.webkit.org/show_bug.cgi?id=178090
+
+        Reviewed by Michael Catanzaro.
+
+        EGLNativeWindowType can be aliased to a different type depending (at least) on the EGL
+        implementation, its build options, and the libepoxy build options.  Using "static_cast"
+        works when it is a numeric value and the width of the value needs to be optionally
+        extended to 64 bits (e.g. the EGL type is "int" in a 32-bit CPU) but not for pointers,
+        and using "reinterpret_cast" works when the size of a pointer is 64 bits but not in other
+        cases. Therefore it seems reasonable to use a plain C cast expression to solve this
+        particular situation.
+
+        * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
+        (WebKit::AcceleratedSurfaceWPE::window const): Use a good old plain C cast expression.
+
+2017-10-16  Chris Dumez  <cdumez@apple.com>
+
+        Clicks on Link with download attribute causes all (other) links to trigger download when clicked
+        https://bugs.webkit.org/show_bug.cgi?id=178267
+        <rdar://problem/34985016>
+
+        Reviewed by Darin Adler.
+
+        When clicking on an anchor with the download attribute, the m_syncNavigationActionHasDownloadAttribute
+        flag on WebPageProxy would get set. This flag would not get reset right away and instead, it would get
+        updated during the next call to WebPageProxy::decidePolicyForNavigationAction(). The issue is that if
+        you later click on a link with target="_blank", WebPageProxy::decidePolicyForNewWindowAction() gets
+        called instead of WebPageProxy::decidePolicyForNavigationAction() and we do not reset the
+        m_syncNavigationActionHasDownloadAttribute flag and we force a download.
+
+        To address the problem, I got rid of this flag on WebPageProxy and it is error-prone and should really
+        not be at page-level. Instead, I added a shouldForceDownload flag on the navigation object. It makes
+        more sense to associate the flag with the navigation and makes it less error-prone.
+
+        * UIProcess/API/APINavigation.h:
+        (API::Navigation::setShouldForceDownload):
+        (API::Navigation::shouldForceDownload const):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::receivedPolicyDecision):
+        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
+        * UIProcess/WebPageProxy.h:
+
 2017-10-16  Ryan Haddad  <ryanhaddad@apple.com>
 
         Unreviewed, rolling out r223271.