Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be proper...
[WebKit-https.git] / Source / WebKit2 / ChangeLog
index 444c3c6..38492d9 100644 (file)
@@ -1,3 +1,433 @@
+2016-11-26  Sam Weinig  <sam@webkit.org>
+
+        Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
+        https://bugs.webkit.org/show_bug.cgi?id=164965
+
+        Reviewed by Simon Fraser.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetIntersectionObserverEnabled):
+        (WKPreferencesGetIntersectionObserverEnabled):
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+        Add a preference, defaulting to off, for enabling IntersectionObserver.
+
+2016-11-26  Simon Fraser  <simon.fraser@apple.com>
+
+        Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime
+        https://bugs.webkit.org/show_bug.cgi?id=164992
+
+        Reviewed by Darin Adler.
+        
+        No more ugly conversion from seconds to milliseconds.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::eventThrottlingDelay):
+
+2016-11-25  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [GTK] Follow-up fixes to r208974
+        https://bugs.webkit.org/show_bug.cgi?id=164771
+
+        Unreviewed, implement Carlos's review feedback.
+
+        * UIProcess/API/gtk/WebKitNotification.cpp:
+        (webkit_notification_get_tag):
+        * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
+        (WebKitNotificationProvider::withdrawAnyPreviousNotificationMatchingTag):
+        (WebKitNotificationProvider::show):
+        * UIProcess/API/gtk/WebKitNotificationProvider.h:
+
+2016-11-24  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [GTK] Notifications API does not expose or respect the "tag" attribute
+        https://bugs.webkit.org/show_bug.cgi?id=164771
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Expose a tag property on WebKitNotification. Ensure that any previous notification with the
+        same tag is closed when showing a new notification with that tag.
+
+        * UIProcess/API/gtk/WebKitNotification.cpp:
+        (webkit_notification_class_init):
+        (webkitNotificationCreate):
+        (webkit_notification_get_tag):
+        * UIProcess/API/gtk/WebKitNotification.h:
+        * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
+        (WebKitNotificationProvider::withdrawAnyPreviousNotificationMatchingTag):
+        (WebKitNotificationProvider::show):
+        * UIProcess/API/gtk/WebKitNotificationProvider.h:
+        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
+
+2016-11-22  Sergio Villar Senin  <svillar@igalia.com>
+
+        [GTK] Fix introspection warning
+        https://bugs.webkit.org/show_bug.cgi?id=165026
+
+        Reviewed by Michael Catanzaro.
+
+        This fixes an introspection annotation for a new API added in r208532.
+
+        * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
+        (webkit_web_page_class_init):
+
+2016-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [SOUP] Simplify custom protocols handler implementation
+        https://bugs.webkit.org/show_bug.cgi?id=164922
+
+        Reviewed by Michael Catanzaro.
+
+        We are using too many classes for this and also the C API that is not needed, because both GTK+ and EFL have
+        their own APIs and this is not used by WTR at all.
+
+        * PlatformEfl.cmake: Remove files from compilation.
+        * PlatformGTK.cmake: Ditto.
+        * Shared/API/c/WKBase.h:
+        * Shared/API/c/soup/WKBaseSoup.h: Removed.
+        * UIProcess/API/APICustomProtocolManagerClient.h: Added.
+        (API::CustomProtocolManagerClient::~CustomProtocolManagerClient):
+        (API::CustomProtocolManagerClient::startLoading):
+        (API::CustomProtocolManagerClient::stopLoading):
+        (API::CustomProtocolManagerClient::invalidate):
+        * UIProcess/API/C/WKAPICast.h:
+        * UIProcess/API/C/soup/WKAPICastSoup.h: Removed.
+        * UIProcess/API/C/soup/WKContextSoup.h: Removed.
+        * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp: Removed.
+        * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: Removed.
+        * UIProcess/API/C/soup/WKSoupRequestManager.h: Removed.
+        * UIProcess/API/efl/ewk_context.cpp: Remove unneeded include.
+        * UIProcess/API/efl/ewk_url_scheme_request.cpp: Use CustomProtocolManagerProxy instead of WKSoupCustomProtocolRequestManagerRef.
+        (EwkUrlSchemeRequest::EwkUrlSchemeRequest):
+        (EwkUrlSchemeRequest::finish):
+        (EwkUrlSchemeRequest::invalidate):
+        * UIProcess/API/efl/ewk_url_scheme_request_private.h:
+        (EwkUrlSchemeRequest::create):
+        (EwkUrlSchemeRequest::manager):
+        * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp: Added.
+        (attachCustomProtocolManagerClientToContext):
+        * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h.
+        * UIProcess/API/gtk/WebKitPrivate.h:
+        * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Removed.
+        * UIProcess/API/gtk/WebKitRequestManagerClient.h: Removed.
+        * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Use CustomProtocolManagerProxy instead of WebSoupCustomProtocolRequestManager.
+        (webkitURISchemeRequestCreate):
+        (webkitURISchemeRequestCancel):
+        (webkitURISchemeRequestGetManager):
+        (webkitURISchemeRequestInvalidate):
+        (webkitURISchemeRequestReadCallback):
+        (webkit_uri_scheme_request_finish_error):
+        * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
+        * UIProcess/API/gtk/WebKitWebContext.cpp:
+        (webkitWebContextConstructed):
+        (webkitWebContextDispose):
+        (webkit_web_context_register_uri_scheme):
+        (webkitWebContextStartLoadingCustomProtocol):
+        (webkitWebContextInvalidateCustomProtocolRequests):
+        * UIProcess/API/gtk/WebKitWebContextPrivate.h:
+        * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
+        * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
+        (WebKit::CustomProtocolManagerProxy::processDidClose):
+        * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
+        (WebKit::CustomProtocolManagerProxy::processDidClose): Invalidate the client.
+        (WebKit::CustomProtocolManagerProxy::startLoading): Notify the client.
+        (WebKit::CustomProtocolManagerProxy::stopLoading): Ditto.
+        (WebKit::CustomProtocolManagerProxy::didReceiveResponse): Notify the network process.
+        (WebKit::CustomProtocolManagerProxy::didLoadData): Ditto.
+        (WebKit::CustomProtocolManagerProxy::didFailWithError): Ditto.
+        (WebKit::CustomProtocolManagerProxy::didFinishLoading): Ditto.
+        * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp: Removed.
+        * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h: Removed.
+        * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp: Removed.
+        * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h: Removed.
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::didClose): Notify the CustomProtocolManagerProxy.
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::WebProcessPool): Initialize the CustomProtocolManagerClient and remove the all supplement.
+        (WebKit::WebProcessPool::setCustomProtocolManagerClient):
+        (WebKit::WebProcessPool::registerSchemeForCustomProtocol): In case of soup cache the given protocol.
+        (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): In case of soup delete the given protocol from the cache.
+        * UIProcess/WebProcessPool.h:
+        * UIProcess/efl/RequestManagerClientEfl.cpp: Do not use the C API, but API::CustomProtocolManagerClient.
+        (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
+        (WebKit::RequestManagerClientEfl::registerURLSchemeHandler):
+        * UIProcess/efl/RequestManagerClientEfl.h:
+        * UIProcess/efl/WebProcessPoolEfl.cpp:
+        * UIProcess/gtk/WebProcessPoolGtk.cpp:
+        * UIProcess/soup/WebProcessPoolSoup.cpp:
+        (WebKit::WebProcessPool::platformInitializeNetworkProcess): Use m_urlSchemesRegisteredForCustomProtocols to
+        build the list of custom protocols to send to the network process.
+
+2016-11-21  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Sierra CMake build after r208452
+        https://bugs.webkit.org/show_bug.cgi?id=164437
+
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::updateMediaTouchBar):
+        I haven't enabled VIDEO_PRESENTATION_MODE in the CMake build yet.
+        It's needed for WebPlaybackSessionInterfaceMac to exist.
+
+2016-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.2 release.
+
+        * gtk/NEWS: Add release notes for 2.15.2.
+
+2016-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Remove m_customProtocolManagerProxy from WebProcessProxy
+        https://bugs.webkit.org/show_bug.cgi?id=164908
+
+        Reviewed by Andreas Kling.
+
+        Since the network process is mandatory, the custom protocol manager proxy of WebProcessProxy is unused and can
+        be removed.
+
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::WebProcessProxy):
+        * UIProcess/WebProcessProxy.h:
+
+2016-11-20  Zan Dobersek  <zdobersek@igalia.com>
+
+        [EncryptedMedia] Make EME API runtime-enabled
+        https://bugs.webkit.org/show_bug.cgi?id=164927
+
+        Reviewed by Jer Noble.
+
+        Add the new EncryptedMediaAPI preference. Set the same feature
+        flag on the shared RuntimeEnabledFeatures object to the
+        corresponding value that's stored in the WebPreferencesStore.
+
+        InjectedBundle::overrideBoolPreferenceForTestRunner() does the
+        same when the 'WebKitEncryptedMediaAPIEnabled' preference is
+        overridden in WKTR for testing purposes.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
+2016-11-19  Antti Koivisto  <antti@apple.com>
+
+        Salt network cache hashes
+        https://bugs.webkit.org/show_bug.cgi?id=164924
+
+        Reviewed by Alex Christensen.
+
+        To enhance privacy make cache content unidentifiable from file names alone.
+        This is done by generating a unique persistent salt for each cache instance.
+        It is used when computing hashes used in file names.
+
+        The patch also replaces plain text partition directory names with salted hashes.
+
+        * NetworkProcess/cache/NetworkCache.cpp:
+        (WebKit::NetworkCache::Cache::makeCacheKey):
+        (WebKit::NetworkCache::makeCacheKey): Deleted.
+        * NetworkProcess/cache/NetworkCache.h:
+
+            Increment cache version.
+
+        * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
+        (WebKit::NetworkCache::BlobStorage::BlobStorage):
+        (WebKit::NetworkCache::BlobStorage::add):
+        (WebKit::NetworkCache::BlobStorage::get):
+
+            Use salt for blob content hash.
+
+        * NetworkProcess/cache/NetworkCacheBlobStorage.h:
+        * NetworkProcess/cache/NetworkCacheData.cpp:
+        (WebKit::NetworkCache::computeSHA1):
+
+            For simplicity all SHA1s are now salted.
+
+        (WebKit::NetworkCache::makeSalt):
+        (WebKit::NetworkCache::readOrMakeSalt):
+
+            Read salt if it exists, generate and persist it otherwise.
+
+        * NetworkProcess/cache/NetworkCacheData.h:
+        * NetworkProcess/cache/NetworkCacheKey.cpp:
+        (WebKit::NetworkCache::Key::Key):
+
+            Remove the "No partition" string and just empty.
+            That was only needed to have a directory name of some sort.
+
+        (WebKit::NetworkCache::Key::computeHash):
+
+            Use salt for key hash.
+
+        (WebKit::NetworkCache::Key::computePartitionHash):
+
+            Separate hash for partition.
+
+        * NetworkProcess/cache/NetworkCacheKey.h:
+        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
+        (WebKit::NetworkCache::makeSubresourcesKey):
+        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
+        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
+        * NetworkProcess/cache/NetworkCacheStorage.cpp:
+        (WebKit::NetworkCache::makeSaltFilePath):
+        (WebKit::NetworkCache::Storage::open):
+
+            Cache can't be opened if we can't read or persist a salt.
+
+        (WebKit::NetworkCache::traverseRecordsFiles):
+        (WebKit::NetworkCache::Storage::Storage):
+        (WebKit::NetworkCache::Storage::synchronize):
+        (WebKit::NetworkCache::Storage::recordDirectoryPathForKey):
+
+            Use the partition hash in the directory name instead of a plain text name.
+
+        (WebKit::NetworkCache::decodeRecordHeader):
+        (WebKit::NetworkCache::Storage::readRecord):
+        (WebKit::NetworkCache::Storage::encodeRecord):
+        (WebKit::NetworkCache::Storage::traverse):
+        (WebKit::NetworkCache::Storage::clear):
+        * NetworkProcess/cache/NetworkCacheStorage.h:
+        (WebKit::NetworkCache::Storage::salt):
+
+2016-11-19  Simon Fraser  <simon.fraser@apple.com>
+
+        [iOS WK2] When zoomed in and panning on pages with fixed bars, parts of the bars are sometimes missing
+        https://bugs.webkit.org/show_bug.cgi?id=164855
+
+        Reviewed by Sam Weinig.
+
+        During UI-process panning and zooming, we send visible rect updates to the web process
+        with inStableState=false, and don't update GraphicsLayers until we get into a stable state.
+
+        This causes a problem where the web process has a stale notion of where the GraphicsLayers
+        for position:fixed elements are, but is then told to update tiling coverage with an up-to-date
+        visible rect. The existing "sync layer positions" path isn't useful to fix this, because it
+        breaks the relationship between the GraphicsLayer positions and their FixedPositionViewportConstraints
+        in the scrolling tree.
+
+        To address this, add the notion of an Optional<> approximatePosition on GraphicsLayers. This is used
+        only by the coverageRect computation code path, and is cleared by a setPosition(). ApproximatePositions
+        are pushed onto GraphicsLayers via the syncViewportConstrainedLayerPositions() code path (renamed to
+        reconcileViewportConstrainedLayerPositions).
+
+        Tested by scrollingcoordinator/ios/non-stable-viewport-scroll.html
+
+        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
+        (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
+        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
+        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
+        (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
+        * UIProcess/Scrolling/RemoteScrollingTree.h:
+        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
+        (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
+        * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
+        (WebKit::CompositingCoordinator::flushPendingLayerChanges):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
+        (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
+        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
+        (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::updateVisibleContentRects): Always push the custom fixed position rect down, but send
+        ScrollingLayerPositionAction::SetApproximate if the state is not stable.
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+
+2016-11-18  Simon Fraser  <simon.fraser@apple.com>
+
+        Make it possible to test non-stable-state scrolling on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=164905
+
+        Reviewed by Dan Bernstein.
+
+        Make it possible for an iOS layout test to force every visible rect update
+        from the UI process to the web process to be in a non-stable state. This emulates
+        what happens during panning and zooming interactions, and allows us to test the
+        scrolling and layer trees in these transient states.
+
+        This is done by adding a testing property on WKWebView, _stableStateOverride, whose
+        getters and setters are overridden in TestRunnerWKWebView. When non-nil, we _updateVisibleContentRectAfterScrollInView
+        consults the NSNumber's boolValue and uses it to override the stable state.
+
+        To facilitate this kind of testing, also add immediateScrollToOffset() and
+        immediateZoomToScale() to UIScriptController. Finally, add doAfterPresentationUpdate()
+        which provides a callback that fires after one trip to the web process and back.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _updateVisibleContentRectAfterScrollInView:]):
+        (-[WKWebView _stableStateOverride]):
+        (-[WKWebView _setStableStateOverride:]):
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+
+2016-11-18  Simon Fraser  <simon.fraser@apple.com>
+
+        [iOS WK2] Eliminate a source of flakiness in layout tests by forcing WebPage into "responsive" mode for all tests, with an internals override
+        https://bugs.webkit.org/show_bug.cgi?id=164980
+
+        Reviewed by Chris Dumez.
+
+        WebPage::eventThrottlingDelay() uses a latency estimate based on the round-trip time from the UI process
+        to affect behavior, including whether scroll events are fired. This also affects the FrameView "scrolledByUser"
+        flag that impacts tile coverage.
+
+        During testing, latency falling above or below the 16ms threshold could affect behavior. Fix by forcing
+        WebPage into "responsive" mode while running tests, via InjectedBundlePage::prepare().
+
+        Add a nullable internals property so that a test can specify responsive, unresponsive or default behavior.
+
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+        (WKBundlePageSetEventThrottlingBehaviorOverride):
+        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::eventThrottlingDelay):
+
+2016-11-18  Simon Fraser  <simon.fraser@apple.com>
+
+        Remove use of std::chrono in WebPage and entrained code
+        https://bugs.webkit.org/show_bug.cgi?id=164967
+
+        Reviewed by Tim Horton.
+
+        Replace std::chrono with Seconds and Monotonic Time.
+
+        Use more C++11 initialization for WebPage data members.
+
+        * Shared/VisibleContentRectUpdateInfo.cpp:
+        (WebKit::operator<<):
+        * Shared/VisibleContentRectUpdateInfo.h:
+        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
+        (WebKit::VisibleContentRectUpdateInfo::timestamp):
+        * Shared/WebCoreArgumentCoders.cpp:
+        (IPC::ArgumentCoder<MonotonicTime>::encode):
+        (IPC::ArgumentCoder<MonotonicTime>::decode):
+        (IPC::ArgumentCoder<Seconds>::encode):
+        (IPC::ArgumentCoder<Seconds>::decode):
+        * Shared/WebCoreArgumentCoders.h:
+        * UIProcess/ios/WKContentView.mm:
+        (WebKit::HistoricalVelocityData::HistoricalVelocityData):
+        (WebKit::HistoricalVelocityData::velocityForNewData):
+        (WebKit::HistoricalVelocityData::append):
+        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
+        (WebKit::WebChromeClient::eventThrottlingDelay):
+        * WebProcess/WebPage/ViewUpdateDispatcher.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        (WebKit::m_userActivityHysteresis):
+        (WebKit::WebPage::didFlushLayerTreeAtTime):
+        (WebKit::WebPage::didCommitLoad):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::eventThrottlingDelay):
+        (WebKit::WebPage::updateVisibleContentRects):
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+
 2016-11-18  Dean Jackson  <dino@apple.com>
 
         AX: "(inverted-colors)" media query only matches on page reload; should match on change