Use more C++17
[WebKit-https.git] / Source / WebKit / ChangeLog
index 4068cc9..2005a22 100644 (file)
@@ -1,3 +1,452 @@
+2018-05-21  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Use more C++17
+        https://bugs.webkit.org/show_bug.cgi?id=185176
+
+        Reviewed by JF Bastien.
+
+        * Configurations/Base.xcconfig:
+        * DerivedSources.make:
+
+2018-05-21  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK][Wayland] UI process crash when closing the window
+        https://bugs.webkit.org/show_bug.cgi?id=185818
+
+        Reviewed by Michael Catanzaro.
+
+        This happens when a page containing a text field is loaded but the focus remains in the url bar when the window
+        is closed. This is because we are sending a notify-in to the IM context, but the focus is still in the URL
+        bar. That confuses the wayland input method manager that tries to free the text of the web view IM context that has
+        already been deleted.
+
+        * UIProcess/gtk/InputMethodFilter.cpp:
+        (WebKit::InputMethodFilter::setEnabled): Only send notify-in if the view is actually focused.
+
+2018-05-21  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove unused and no-op WKContextSetCookieStorageDirectory
+        https://bugs.webkit.org/show_bug.cgi?id=185857
+
+        Reviewed by Youenn Fablet.
+
+        Deleted C API which didn't do anything useful, and consequently not used by anyone.
+
+        * UIProcess/API/C/WKContext.cpp:
+        (WKContextSetCookieStorageDirectory): Deleted.
+        * UIProcess/API/C/WKContextPrivate.h:
+        * UIProcess/WebProcessPool.h:
+
+2018-05-21  Chris Nardi  <cnardi@chromium.org>
+
+        Remove dead exception in MediaList.appendMedium
+        https://bugs.webkit.org/show_bug.cgi?id=185278
+
+        Reviewed by Chris Dumez.
+
+        Remove code pertaining to an exception being thrown by appendMedium().
+
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
+        (webkit_dom_media_list_append_medium):
+
+2018-05-21  Aditya Keerthi  <akeerthi@apple.com>
+
+        [iOS] Click events only fire once when editing
+        https://bugs.webkit.org/show_bug.cgi?id=185777
+
+        Reviewed by Tim Horton.
+
+        gestureRecognizerShouldBegin: was returning false for the single tap gesture when a node was being
+        edited. This is an artifact of how the gesture was previously handled with the text selection assistant.
+        This condition is now removed, allowing the single tap gesture to go through and correctly propagate the
+        click event.
+
+        Also added an early return to _didGetTapHighlightForRequest: in order to prevent the tap highlight from
+        being shown when the node is already being assisted.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
+        (-[WKContentView gestureRecognizerShouldBegin:]):
+
+2018-05-21  Daniel Bates  <dabates@apple.com>
+
+        REGRESSION (r231107): CSP report-only policies are ignored for beacon, importScripts, fetch(), EventSource, and XHR
+        https://bugs.webkit.org/show_bug.cgi?id=185789
+        <rdar://problem/40380175>
+
+        Reviewed by Andy Estes.
+
+        Have NetworkLoadChecker implement the ContentSecurityPolicyClient interface and support logging
+        console messages, sending CSP reports, and dispatching SecurityPolicyViolation events.
+
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::loadPing):
+        * NetworkProcess/NetworkLoadChecker.cpp:
+        (WebKit::NetworkLoadChecker::NetworkLoadChecker): Modified to take a reference to the NetworkConnectionToWebProcess,
+        the web page ID, the web frame ID, and the resource load identifier. These details are necessary
+        in order to implement the ContentSecurityPolicyClient interface.
+        (WebKit::NetworkLoadChecker::isAllowedByContentSecurityPolicy): Added.
+        (WebKit::NetworkLoadChecker::continueCheckingRequest): Write in terms of isAllowedByContentSecurityPolicy().
+        (WebKit::NetworkLoadChecker::contentSecurityPolicy): Pass ourself as the client so that we receive
+        delegate callbacks.
+        (WebKit::NetworkLoadChecker::addConsoleMessage): Added.
+        (WebKit::NetworkLoadChecker::sendCSPViolationReport): Added.
+        (WebKit::NetworkLoadChecker::enqueueSecurityPolicyViolationEvent): Added.
+        * NetworkProcess/NetworkLoadChecker.h:
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (NetworkResourceLoader::enqueueSecurityPolicyViolationEvent): Added.
+        * NetworkProcess/NetworkResourceLoader.h:
+        * NetworkProcess/PingLoad.cpp:
+        (WebKit::PingLoad::PingLoad): Modified to take a reference to the NetworkConnectionToWebProcess and pass
+        this through to the NetworkLoadChecker along with the web page ID, web frame ID and resource load identifier.
+        * NetworkProcess/PingLoad.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::enqueueSecurityPolicyViolationEvent): Added.
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in: Add message EnqueueSecurityPolicyViolationEvent.
+
+2018-05-21  Brian Burg  <bburg@apple.com>
+
+        Web Automation: always return an empty cookie list if document.cookieURL() is empty
+        https://bugs.webkit.org/show_bug.cgi?id=185838
+        <rdar://problem/37737526>
+
+        Reviewed by Tim Horton.
+
+        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
+        (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
+        This crashes in CFNetwork code because an empty cookie URL is not a valid input.
+        Just return an empty list since there couldn't be any cookies returned.
+
+2018-05-21  Brian Burg  <bburg@apple.com>
+
+        Web Automation: terminate the automation session if the network or storage process crashes
+        https://bugs.webkit.org/show_bug.cgi?id=185827
+        <rdar://problem/40424020>
+
+        Reviewed by Tim Horton.
+
+        If one of the processes crashes, the page may be in an undefined state and
+        automation will fail in unpredictable ways. It's better to just give up immediately.
+
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::networkProcessFailedToLaunch):
+        (WebKit::WebProcessPool::storageProcessCrashed):
+
+2018-05-21  Sihui Liu  <sihui_liu@apple.com>
+
+        Add a diskCacheSizeOverride accessor function on WKContextConfigurationRef
+        https://bugs.webkit.org/show_bug.cgi?id=185826
+        <rdar://problem/39732113>
+
+        Reviewed by Alex Christensen.
+
+        * UIProcess/API/C/WKContextConfigurationRef.cpp:
+        (WKContextConfigurationDiskCacheSizeOverride):
+        (WKContextConfigurationSetDiskCacheSizeOverride):
+        * UIProcess/API/C/WKContextConfigurationRef.h:
+
+2018-05-21  Jer Noble  <jer.noble@apple.com>
+
+        Complete fix for enabling modern EME by default
+        https://bugs.webkit.org/show_bug.cgi?id=185770
+        <rdar://problem/40368220>
+
+        Reviewed by Eric Carlson.
+
+        * Configurations/FeatureDefines.xcconfig:
+
+2018-05-21  Sam Weinig  <sam@webkit.org>
+
+        Modernize RenderStyleConstants.h - Part 1
+        https://bugs.webkit.org/show_bug.cgi?id=185809
+
+        Reviewed by Yusuke Suzuki.
+
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::rangeForWebSelectionAtPosition):
+        (WebKit::WebPage::getPositionInformation):
+        Update for new enum names.
+
+2018-05-21  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Unreviewed. Update OptionsGTK.cmake and NEWS for 2.21.2 release.
+
+        * gtk/NEWS: Add release notes for 2.21.2.
+
+2018-05-21  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Unreviewed, rolling out r222967.
+
+        It's not ready yet
+
+        Reverted changeset:
+
+        "[GTK][WPE] Add API to configure and enable resource load
+        statistics"
+        https://bugs.webkit.org/show_bug.cgi?id=177943
+        https://trac.webkit.org/changeset/222967
+
+2018-05-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r231982.
+        https://bugs.webkit.org/show_bug.cgi?id=185793
+
+        Caused layout test failures (Requested by realdawei on
+        #webkit).
+
+        Reverted changeset:
+
+        "Complete fix for enabling modern EME by default"
+        https://bugs.webkit.org/show_bug.cgi?id=185770
+        https://trac.webkit.org/changeset/231982
+
+2018-05-18  Brian Burg  <bburg@apple.com>
+
+        [Cocoa] Add missing nullability annotations to _WKAutomationSessionDelegate
+        https://bugs.webkit.org/show_bug.cgi?id=185791
+        <rdar://problem/40279891>
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h: If there is no dialog shown,
+        then the delegate methods to return the dialog text may return a nil NSString.
+
+2018-05-18  Youenn Fablet  <youenn@apple.com>
+
+        NetworkLoadChecker should cancel its content extension retrieval task when being destroyed
+        https://bugs.webkit.org/show_bug.cgi?id=185661
+        <rdar://problem/39985509>
+
+        Reviewed by Chris Dumez.
+
+        Make sure that the Content Extension retrieval callback checks that NetworkLoadChecker is alive.
+        This allows stopping NetworkLoadChecker be ref counted.
+        This in turns allows NetworkResourceLoader to delete its NetworkLoadChecker when being deleted as well.
+        By doing so, we simplify the memory management of NetworkResourceLoader and NetworkLoadChecker.
+
+        * NetworkProcess/NetworkLoadChecker.cpp:
+        (WebKit::NetworkLoadChecker::checkRequest):
+        (WebKit::NetworkLoadChecker::processContentExtensionRulesForLoad):
+        * NetworkProcess/NetworkLoadChecker.h:
+        (WebKit::NetworkLoadChecker::weakPtrFactory):
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        * NetworkProcess/NetworkResourceLoader.h:
+        * NetworkProcess/PingLoad.cpp:
+        (WebKit::PingLoad::PingLoad):
+        * NetworkProcess/PingLoad.h:
+
+2018-05-18  Per Arne Vollan  <pvollan@apple.com>
+
+        WebProcess fails to launch
+        https://bugs.webkit.org/show_bug.cgi?id=185140
+
+        Reviewed by Geoffrey Garen.
+
+        If the NSApplication runloop is not used in the WebContent process, launchServicesCheckIn() needs to be called
+        in order for enableSandboxStyleFileQuarantine() to succeed. Determine at runtime if launchServicesCheckIn()
+        should be called by checking if the NSApplication event loop is running.
+
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeProcess):
+
+2018-05-18  Jer Noble  <jer.noble@apple.com>
+
+        Complete fix for enabling modern EME by default
+        https://bugs.webkit.org/show_bug.cgi?id=185770
+        <rdar://problem/40368220>
+
+        Reviewed by Eric Carlson.
+
+        * Configurations/FeatureDefines.xcconfig:
+
+2018-05-18  Brent Fulgham  <bfulgham@apple.com>
+
+        Convert ProcessPrivilege assertions to regular debug-only assertions
+        https://bugs.webkit.org/show_bug.cgi?id=185775
+        <rdar://problem/40372286>
+
+        Reviewed by Geoffrey Garen.
+
+        In Bug 184322 I added a number of RELEASE_ASSERT checks that certain
+        UI-only calls were not being made in the WebContent process.
+
+        Measurements have shown that these RELEASE_ASSERTs have regressed performance
+        by around 1% on some benchmarks, so we should convert them to normal asserts.
+
+        This patch changes the RELEASE_ASSERTs into ASSERTs.
+
+        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+        (WebKit::WebProcessPool::platformInitializeWebProcess):
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::WebViewImpl):
+        (WebKit::WebViewImpl::becomeFirstResponder):
+        (WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged):
+        (WebKit::WebViewImpl::validateUserInterfaceItem):
+        (WebKit::WebViewImpl::startSpeaking):
+        (WebKit::WebViewImpl::stopSpeaking):
+        (WebKit::applicationFlagsForDrag):
+        (WebKit::WebViewImpl::doneWithKeyEvent):
+        * UIProcess/Gamepad/mac/UIGamepadProviderMac.mm:
+        (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
+        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
+        (WebKit::PluginProcessProxy::enterFullscreen):
+        (WebKit::PluginProcessProxy::beginModal):
+        (WebKit::PluginProcessProxy::endModal):
+        * UIProcess/mac/DisplayLink.cpp:
+        (WebKit::DisplayLink::DisplayLink):
+        (WebKit::DisplayLink::~DisplayLink):
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::getIsSpeaking):
+        (WebKit::WebPageProxy::speak):
+        (WebKit::WebPageProxy::stopSpeaking):
+        (WebKit::WebPageProxy::startDisplayLink):
+        * UIProcess/mac/WebPopupMenuProxyMac.mm:
+        (WebKit::WebPopupMenuProxyMac::showPopupMenu):
+
+2018-05-18  Eric Carlson  <eric.carlson@apple.com>
+
+        Handle failure to extend sandbox gracefully
+        https://bugs.webkit.org/show_bug.cgi?id=185779
+        <rdar://problem/40316349>
+
+        Reviewed by Brent Fulgham.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _denyNextUserMediaRequest]): 
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+
+        * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
+        (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Don't append
+        the request to m_grantedRequests if it failed.
+        (WebKit::UserMediaPermissionRequestManagerProxy::grantAccess): Deny request if willCreateMediaStream
+        fails.
+        * UIProcess/UserMediaPermissionRequestManagerProxy.h:
+
+        * UIProcess/UserMediaProcessManager.cpp:
+        (WebKit::UserMediaProcessManager::willCreateMediaStream): Don't try to extend sandbox if
+        we fail to allocate all necessary handles.
+        * UIProcess/UserMediaProcessManager.h:
+        (WebKit::UserMediaProcessManager::denyNextUserMediaRequest): New, for testing.
+
+2018-05-18  Antoine Quint  <graouts@apple.com>
+
+        [Web Animations] Turn Web Animations with CSS integration on for test runners
+        https://bugs.webkit.org/show_bug.cgi?id=184819
+        <rdar://problem/39597337>
+
+        Unreviewed. Rolling out the patch for this bug, it caused some flaky timeouts for animation suspension tests.
+
+        * Shared/WebPreferences.yaml:
+
+2018-05-18  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        [Extra zoom mode] Clearing text fields should dispatch input events of type "deleteContent"
+        https://bugs.webkit.org/show_bug.cgi?id=185769
+        <rdar://problem/40368261>
+
+        Reviewed by Tim Horton.
+
+        When setting the text of the currently focused element to the empty string, just delete the text instead of
+        pretending to insert an empty string. This mimics deleting content using the delete key on macOS, and fires an
+        input event with inputType "deleteContent" instead of "insertText".
+
+        Test: fast/forms/extrazoom/delete-content-in-text-field.html
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::setTextAsync):
+
+2018-05-18  Keith Rollin  <krollin@apple.com>
+
+        Renamed "trackNetworkActivity" to "tracksResourceLoadMilestones"
+        https://bugs.webkit.org/show_bug.cgi?id=185523
+        <rdar://problem/40136361>
+
+        Reviewed by Geoffrey Garen.
+
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::networkActivityTrackingEnabled):
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::initializeNetworkProcess):
+        * NetworkProcess/NetworkProcess.h:
+        (WebKit::NetworkProcess::tracksResourceLoadMilestones const):
+        (WebKit::NetworkProcess::trackNetworkActivity const): Deleted.
+        * NetworkProcess/NetworkProcessCreationParameters.cpp:
+        (WebKit::NetworkProcessCreationParameters::encode const):
+        (WebKit::NetworkProcessCreationParameters::decode):
+        * NetworkProcess/NetworkProcessCreationParameters.h:
+        * UIProcess/API/APIProcessPoolConfiguration.cpp:
+        (API::ProcessPoolConfiguration::copy):
+        * UIProcess/API/APIProcessPoolConfiguration.h:
+        * UIProcess/API/C/WKContextConfigurationRef.cpp:
+        (WKContextConfigurationTracksResourceLoadMilestones):
+        (WKContextConfigurationSetTracksResourceLoadMilestones):
+        (WKContextConfigurationTrackNetworkActivity): Deleted.
+        (WKContextConfigurationSetTrackNetworkActivity): Deleted.
+        * UIProcess/API/C/WKContextConfigurationRef.h:
+        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
+        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
+        (-[_WKProcessPoolConfiguration tracksResourceLoadMilestones]):
+        (-[_WKProcessPoolConfiguration setTracksResourceLoadMilestones:]):
+        (-[_WKProcessPoolConfiguration trackNetworkActivity]): Deleted.
+        (-[_WKProcessPoolConfiguration setTrackNetworkActivity:]): Deleted.
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::ensureNetworkProcess):
+
+2018-05-18  Chris Dumez  <cdumez@apple.com>
+
+        Avoid keeping the frame alive when ref'ing a WindowProxy
+        https://bugs.webkit.org/show_bug.cgi?id=185737
+        <rdar://problem/40004666>
+
+        Reviewed by Sam Weinig.
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::windowScriptNPObject):
+
+2018-05-18  Youenn Fablet  <youenn@apple.com>
+
+        -Wmemset-elt-size warning in LibWebRTCSocket constructor
+        https://bugs.webkit.org/show_bug.cgi?id=185555
+        <rdar://problem/40217250>
+
+        Reviewed by Darin Adler.
+
+        GetOption implementation was broken in that it was not initializing properly its array of options.
+        This patch fixes it by using an array of optional<int> which are initialized by default.
+        When no value is set, we return the error code -1.
+        In theory, we should go to NetworkProcess to get the actual value.
+        Since GetOption is not used in practice, we just do this best effort implementation of storing previously set values.
+
+        * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
+        (WebKit::LibWebRTCSocket::LibWebRTCSocket):
+        (WebKit::LibWebRTCSocket::GetOption):
+        * WebProcess/Network/webrtc/LibWebRTCSocket.h:
+
+2018-05-18  Antoine Quint  <graouts@apple.com>
+
+        [Web Animations] Turn Web Animations with CSS integration on for test runners
+        https://bugs.webkit.org/show_bug.cgi?id=184819
+        <rdar://problem/39597337>
+
+        Reviewed by Jon Lee.
+
+        * Shared/WebPreferences.yaml: Leave Web Animations off by default, it's up to clients
+        to turn it on.
+
+2018-05-18  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [Curl] Remove unused SystemProxyWin.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=185224
+
+        Reviewed by Antti Koivisto.
+
+        SystemProxyWin is not used at the moment. Remove it.
+
+        * NetworkProcess/win/SystemProxyWin.cpp: Removed.
+        * NetworkProcess/win/SystemProxyWin.h: Removed.
+        * PlatformWin.cmake: Removed SystemProxyWin.cpp.
+
 2018-05-17  Nan Wang  <n_wang@apple.com>
 
         AX: [macOS] Expose the primary screen height through AX API