Guard Credential Management implementation behind a runtime enabled feature flag
[WebKit.git] / Source / WebKit2 / ChangeLog
index ffd9960..ca5b32d 100644 (file)
@@ -1,3 +1,198 @@
+2017-03-09  Daniel Bates  <dabates@apple.com>
+
+        Guard Credential Management implementation behind a runtime enabled feature flag
+        https://bugs.webkit.org/show_bug.cgi?id=169364
+        <rdar://problem/30957425>
+
+        Reviewed by Brent Fulgham.
+
+        Add WebKit2 preference for Credential Management (disabled by default).
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetCredentialManagementEnabled): Added.
+        (WKPreferencesGetCredentialManagementEnabled): Added.
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
+2017-03-09  Andy Estes  <aestes@apple.com>
+
+        [iOS] Add SPI to print to a single tall PDF page
+        https://bugs.webkit.org/show_bug.cgi?id=169439
+        <rdar://problem/30120532>
+
+        Reviewed by Tim Horton.
+
+        * Shared/PrintInfo.cpp:
+        (WebKit::PrintInfo::encode): Encoded snapshotFirstPage.
+        (WebKit::PrintInfo::decode): Decoded snapshotFirstPage.
+        (WebKit::PrintInfo::PrintInfo): Deleted.
+        * Shared/PrintInfo.h: Initialized member variables in place instead of in a default ctor.
+        * UIProcess/_WKWebViewPrintFormatter.h: Declared BOOL property snapshotFirstPage.
+        * UIProcess/_WKWebViewPrintFormatter.mm:
+        (-[_WKWebViewPrintFormatter _setSnapshotPaperRect:]): Added to set a custom paper size.
+        (-[_WKWebViewPrintFormatter rectForPageAtIndex:]): Returned the custom paper rect if
+        snapshotFirstPage is true.
+        * UIProcess/_WKWebViewPrintFormatterInternal.h: 
+        * UIProcess/ios/WKContentView.mm:
+        (-[WKContentView _wk_pageCountForPrintFormatter:]): Computed the custom paper size to be the
+        smaller of the document height and the maximum PDF page height.
+        * UIProcess/ios/WKPDFView.mm:
+        (-[WKPDFView _wk_pageCountForPrintFormatter:]): Changed to return a maximum page size of 1
+        if snapshotFirstPage is true.
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::computePagesForPrintingAndDrawToPDF): Ditto.
+
+2017-03-09  Anders Carlsson  <andersca@apple.com>
+
+        Add delegate support to WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=169427
+        Part of rdar://problem/28880714.
+
+        Reviewed by Geoffrey Garen.
+
+        * Configurations/FeatureDefines.xcconfig:
+        Add feature define.
+
+2017-03-09  Alex Christensen  <achristensen@webkit.org>
+
+        [Content Extensions] Introduce if-top-url and unless-top-url
+        https://bugs.webkit.org/show_bug.cgi?id=169433
+
+        Reviewed by Brady Eidson.
+
+        Rename conditionedFilters to topURLFilters to reflect the fact that they are the filters
+        that are run on the top URL, and possibly just the domain of the top url.
+        I was a bit too aggressive when renaming domain* to condition* in r213533.
+
+        * Shared/WebCompiledContentExtension.cpp:
+        (WebKit::WebCompiledContentExtension::conditionsApplyOnlyToDomain):
+        (WebKit::WebCompiledContentExtension::topURLFiltersBytecode):
+        (WebKit::WebCompiledContentExtension::topURLFiltersBytecodeLength):
+        (WebKit::WebCompiledContentExtension::conditionedFiltersBytecode): Deleted.
+        (WebKit::WebCompiledContentExtension::conditionedFiltersBytecodeLength): Deleted.
+        * Shared/WebCompiledContentExtension.h:
+        * Shared/WebCompiledContentExtensionData.cpp:
+        (WebKit::WebCompiledContentExtensionData::encode):
+        (WebKit::WebCompiledContentExtensionData::decode):
+        * Shared/WebCompiledContentExtensionData.h:
+        (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
+        * UIProcess/API/APIUserContentExtensionStore.cpp:
+        (API::encodeContentExtensionMetaData):
+        (API::decodeContentExtensionMetaData):
+        (API::compiledToFile):
+        (API::createExtension):
+        (API::UserContentExtensionStore::invalidateContentExtensionVersion):
+        (API::userContentExtensionStoreErrorCategory):
+        * UIProcess/API/APIUserContentExtensionStore.h:
+        Increment CurrentContentExtensionFileVersion because we have changed the format of the binary on disk.
+        We only added 4 bytes, but that's binary incompatible and requires re-compiling any existing content extensions.
+
+2017-03-09  Brent Fulgham  <bfulgham@apple.com>
+
+        [WK2][iOS] Extend WebProcess sandbox to support audio and video compression/decompression
+        https://bugs.webkit.org/show_bug.cgi?id=169431
+        <rdar://problem/30844650>
+
+        Reviewed by Youenn Fablet.
+
+        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
+2017-03-09  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        [WK2] Add a UI delegate hook for custom handling of data interaction operations
+        https://bugs.webkit.org/show_bug.cgi?id=169430
+        <rdar://problem/30954654>
+
+        Reviewed by Tim Horton.
+
+        Introduce a new SPI method on the UI delegate for clients who need to override data interaction operation behaviors.
+        Note that implementing this delegate method and returning YES will not propagate a `drop` event to the page.
+
+        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
+
+2017-03-08  Matt Rajca  <mrajca@apple.com>
+
+        Let clients control autoplay quirks with website policies.
+        https://bugs.webkit.org/show_bug.cgi?id=169390
+
+        Reviewed by Wenson Hsieh.
+        
+        Many sites incorrectly assume media will start off playing and display a pause button from the
+        start. We can trick many of these sites into updating their controls by sending a "pause"
+        event when we prevent a media element from playing.
+
+        We don't want this to become standard web behavior, however, since ultimately sites should adapt
+        to the new behavior. This patch lets clients decide which limited set of sites gets to use auto-play
+        quirks.
+
+        * Shared/WebsitePolicies.h:
+        (WebKit::WebsitePolicies::encode):
+        (WebKit::WebsitePolicies::decode):
+        * UIProcess/API/APIWebsitePolicies.h:
+        * UIProcess/API/C/WKWebsitePolicies.cpp:
+        (WKWebsitePoliciesSetAllowsAutoplayQuirks):
+        (WKWebsitePoliciesGetAllowsAutoplayQuirks):
+        * UIProcess/API/C/WKWebsitePolicies.h:
+        * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
+        * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
+        (-[_WKWebsitePolicies setAllowsAutoplayQuirks:]):
+        (-[_WKWebsitePolicies allowsAutoplayQuirks]):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updateWebsitePolicies):
+
+2017-03-09  Chris Dumez  <cdumez@apple.com>
+
+        [WK2] Prevent app nap for the active tab
+        https://bugs.webkit.org/show_bug.cgi?id=169417
+        <rdar://problem/30876965>
+
+        Reviewed by Gavin Barraclough.
+
+        Prevent app nap for the active tab to minimize the risks of breakage.
+
+        From the AppNap documentation [1], the app is only a candidate for app nap if it not the
+        foreground app. However, in the Safari case, the foreground app is Safari (UIProcess) and
+        the same policy does not apply to our foreground WebContent process unless we explicitly
+        make it so. This patch addresses the issue by taking a UserActivity when the tab is
+        active to prevent app nap.
+
+        [1] https://developer.apple.com/library/content/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/AppNap.html
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updateThrottleState):
+
+2017-03-08  Anders Carlsson  <andersca@apple.com>
+
+        Add new delegate methods
+        https://bugs.webkit.org/show_bug.cgi?id=169394
+        Part of rdar://problem/28880714.
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
+        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
+        (-[WKPaymentAuthorizationViewControllerDelegate invalidate]):
+        (toShippingMethod):
+        (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:handler:]):
+        (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectPaymentMethod:handler:]):
+        (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:handler:]):
+        (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:handler:]):
+        (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:completion:]):
+        (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:completion:]):
+        (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:completion:]):
+        (WebKit::toPKPaymentAuthorizationStatus):
+        (WebKit::toPKPaymentErrorCode):
+        (WebKit::toNSError):
+        (WebKit::toNSErrors):
+        (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentSession):
+        (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection):
+        (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
+        (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):
+
 2017-03-09  Tim Horton  <timothy_horton@apple.com>
 
         WKWebView should automatically respect insets from the view controller hierarchy