Unreviewed, fix the iOS build
[WebKit-https.git] / Source / WebCore / ChangeLog
index 197ebfc..4b3a1e3 100644 (file)
+2018-04-10  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Unreviewed, fix the iOS build
+
+        I accidentally exported an inline function in r230506.
+
+        * page/ViewportConfiguration.h:
+        (WebCore::ViewportConfiguration::viewSize const):
+
+2018-04-10  Nan Wang  <n_wang@apple.com>
+
+        AX: Expose strong password fields on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=184465
+        <rdar://problem/39325104>
+
+        Reviewed by Chris Fleizach.
+
+        Exposed the strong password field on iOS. And made sure
+        we are returning its actual value in accessibilityValue.
+
+        Test: accessibility/ios-simulator/strong-password-field.html
+
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper _accessibilityIsStrongPasswordField]):
+        (-[WebAccessibilityObjectWrapper accessibilityValue]):
+
+2018-04-10  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [Win] Add UserAgentWin.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=184438
+
+        Reviewed by Michael Catanzaro.
+
+        No new tests (No behavior change).
+
+        * PlatformWin.cmake:
+        * platform/win/UserAgentWin.cpp: Added.
+        (WebCore::standardUserAgent):
+        (WebCore::standardUserAgentForURL):
+
+2018-04-10  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        [Extra zoom mode] Add a mechanism to zoom to fixed scales when double tapping in extra zoom mode
+        https://bugs.webkit.org/show_bug.cgi?id=184435
+        <rdar://problem/38726260>
+
+        Reviewed by Dean Jackson.
+
+        Expose the size of the platform view. By default, in extra zoom mode, this *not* the same as the minimum layout
+        size, since we lay out at a large width and then shrink down to real device dimensions when computing the
+        initial scale (see r229063).
+
+        ViewGestureGeometryCollector uses this in the process of computing a target zoom scale when double tapping.
+
+        * page/ViewportConfiguration.h:
+        (WebCore::ViewportConfiguration::viewSize const):
+
+2018-04-10  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [Win][WebKit] LibWebRTCProvider::webRTCAvailable is an undefined symbol
+        https://bugs.webkit.org/show_bug.cgi?id=184437
+
+        Reviewed by Michael Catanzaro.
+
+        No new tests (No behavior change).
+
+        * PlatformWin.cmake: Added LibWebRTCProviderWin.cpp.
+        * platform/mediastream/libwebrtc/LibWebRTCProviderWin.cpp: Added.
+        (WebCore::LibWebRTCProvider::webRTCAvailable):
+
+2018-04-10  Chris Dumez  <cdumez@apple.com>
+
+        Unreviewed build fix.
+
+        Those enum value names were too generic and would cause conflicts.
+
+        * Modules/webvr/VRDisplayCapabilities.h:
+        (WebCore::VRDisplayCapabilities::hasPosition const):
+        (WebCore::VRDisplayCapabilities::hasOrientation const):
+        (WebCore::VRDisplayCapabilities::hasExternalDisplay const):
+        (WebCore::VRDisplayCapabilities::canPresent const):
+        * platform/vr/VRPlatformDisplay.h:
+        * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:
+        (WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):
+
+2018-04-10  Chris Dumez  <cdumez@apple.com>
+
+        Avoid constructing a service worker RegistrationStore for private sessions
+        https://bugs.webkit.org/show_bug.cgi?id=184463
+        <rdar://problem/36613948>
+
+        Reviewed by Youenn Fablet.
+
+        Avoid constructing a service worker RegistrationStore for private sessions since there
+        is no need for persistence and the registrationDatabaseDirectory is the empty string in
+        such cases.
+
+        * workers/service/server/SWServer.cpp:
+        (WebCore::SWServer::removeRegistration):
+        (WebCore::SWServer::clearAll):
+        (WebCore::SWServer::clear):
+        (WebCore::SWServer::SWServer):
+        (WebCore::SWServer::didFinishActivation):
+        * workers/service/server/SWServer.h:
+
+2018-04-10  Chris Dumez  <cdumez@apple.com>
+
+        Unreviewed build fix.
+
+        * page/LayoutContext.cpp:
+        (WebCore::LayoutContext::~LayoutContext):
+        * page/LayoutContext.h:
+
+2018-04-10  Jeremy Jones  <jeremyj@apple.com>
+
+        MediaSessionManageriOS should defer creation of MPVolumeView until it needs to monitor AirPlay routes
+        https://bugs.webkit.org/show_bug.cgi?id=184373
+        <rdar://problem/35177606>
+
+        Reviewed by Eric Carlson.
+
+        No change of behavior.
+
+        This delays the creation of MPVolumeView until airplay routes are monitored.
+        MPVolumeView is now also released when monitoring ends. 
+        This makes sure the MP* objects are only accessed from a UI safe thread. WebCore's "MainThread" may be different that the UI thread.
+        Since this state change is necessarily asynchronous, starting and stopping must prevent races to keep state coherent.
+
+        * platform/audio/ios/MediaSessionManagerIOS.mm:
+        (-[WebMediaSessionHelper initWithCallback:]):
+        (-[WebMediaSessionHelper dealloc]):
+        (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
+        (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]):
+        (-[WebMediaSessionHelper allocateVolumeView]): Deleted.
+        (-[WebMediaSessionHelper setVolumeView:]): Deleted.
+
+2018-04-10  Sihui Liu  <sihui_liu@apple.com>
+
+        Loading of multipart response was cancelled because of content policy set in WebFrameLoaderClient::dispatchDecidePolicyForResponse
+        https://bugs.webkit.org/show_bug.cgi?id=184268
+        <rdar://problem/39144446>
+
+        Reviewed by Chris Dumez.
+
+        The assertion is no longer true after the change, because multiple resources could have same
+        url. Used if condition here to make sure we only delete specified resource.
+
+        No new tests. Updated an existing test to test the stop loading case by not using injected 
+        bundle policy: http/tests/multipart/multipart-html.php.
+
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::removeCachedResource):
+
+2018-04-10  Zalan Bujtas  <zalan@apple.com>
+
+        Do not layout images when we only need the overflow information.
+        https://bugs.webkit.org/show_bug.cgi?id=175331
+
+        Reviewed by Simon Fraser.
+
+        This improves MotionMark's Simple Leaves by ~10%. 
+
+        Covered by existing tests.
+
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::layout):
+
+2018-04-10  Zan Dobersek  <zdobersek@igalia.com>
+
+        [TexMap] TextureMapperLayer unnecessarily duplicates state in GraphicsLayerTransform
+        https://bugs.webkit.org/show_bug.cgi?id=183868
+
+        Reviewed by Carlos Garcia Campos.
+
+        Drop the GraphicsLayerTransform member variable from TextureMapperLayer
+        and instead compute all the required transform information in the
+        computeTransformsRecursive() method. These computations are not too
+        expensive, and in turn we can drop an object from this class' state that
+        was only duplicating a bunch of state variables.
+
+        No new tests -- no change in functionality.
+
+        * platform/graphics/texmap/TextureMapperLayer.cpp:
+        (WebCore::TextureMapperLayer::computeTransformsRecursive):
+        (WebCore::TextureMapperLayer::paintSelf):
+        (WebCore::TextureMapperLayer::paintSelfAndChildren):
+        (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
+        (WebCore::TextureMapperLayer::replicaTransform):
+        (WebCore::TextureMapperLayer::computeOverlapRegions):
+        (WebCore::TextureMapperLayer::setPosition):
+        (WebCore::TextureMapperLayer::setSize):
+        (WebCore::TextureMapperLayer::setAnchorPoint):
+        (WebCore::TextureMapperLayer::setPreserves3D):
+        (WebCore::TextureMapperLayer::setTransform):
+        (WebCore::TextureMapperLayer::setChildrenTransform):
+        (WebCore::TextureMapperLayer::syncAnimations):
+        (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
+        * platform/graphics/texmap/TextureMapperLayer.h:
+
+2018-04-09  Brent Fulgham  <bfulgham@apple.com>
+
+        Add ProcessPrivilege assertions to places that access NSApp
+        https://bugs.webkit.org/show_bug.cgi?id=184322
+        <rdar://problem/39194560>
+
+        Reviewed by Per Arne Vollan.
+
+        Add ProcessPrivilege assertions to places where we interact with NSApp so
+        that we can prevent accidentally using them in the WebContent process.
+
+        * page/mac/EventHandlerMac.mm:
+        (WebCore::lastEventIsMouseUp):
+        (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
+        * platform/mac/EventLoopMac.mm:
+        (WebCore::EventLoop::cycle):
+        * platform/mac/PasteboardMac.mm:
+        (WebCore::Pasteboard::setDragImage):
+
+2018-04-09  John Wilander  <wilander@apple.com>
+
+        Refactor Ignore HSTS code
+        https://bugs.webkit.org/show_bug.cgi?id=184433
+        <rdar://problem/39298238>
+
+        Reviewed by Darin Adler.
+
+        This patch refactors our ignore HSTS code. The convenience functions are moved
+        out of CFNetwork SPI in PAL, and into where they are used. It also switches
+        from performSelector: calls to straight function calls, after checking that
+        there is a responder.
+
+        * platform/network/mac/WebCoreURLResponse.mm:
+        (WebCore::schemeWasUpgradedDueToDynamicHSTS):
+            Add convenience function here since it was moved out of
+            CFNetworkSPI.h.
+
+2018-04-09  Brady Eidson  <beidson@apple.com>
+
+        Expand WebCore policy concept of "shouldContinue" to allow for more than true/false
+        https://bugs.webkit.org/show_bug.cgi?id=184424
+
+        Reviewed by Alex Christensen.
+
+        No new tests (No behavior change, refactor only)
+
+        Specifically this expands the "shouldContinue" bool to be an enum class with:
+        -Yes
+        -No
+        -ForSuspension
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::willSendRequest):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::loadURL):
+        (WebCore::FrameLoader::load):
+        (WebCore::FrameLoader::loadWithDocumentLoader):
+        (WebCore::FrameLoader::loadPostRequest):
+        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
+        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
+        * loader/FrameLoader.h:
+        * loader/PolicyChecker.cpp:
+        (WebCore::PolicyChecker::checkNavigationPolicy):
+        (WebCore::PolicyChecker::checkNewWindowPolicy):
+        * loader/PolicyChecker.h:
+
+2018-04-09  Sihui Liu  <sihui_liu@apple.com>
+
+        REGRESSION(r229929): localStorage is broken for WebInspector
+        https://bugs.webkit.org/show_bug.cgi?id=184382
+        <rdar://problem/39257355>
+
+        Reviewed by Chris Dumez.
+
+        Removed an if condition that caused false positive cases of database error. As per 
+        https://www.sqlite.org/c3ref/errcode.html, return value of sqlite3_errcode() is undefined
+        on successful API call, so we should not use the code to check if there is an error. We
+        should only use it when there is an error.
+        After moving this condition, LocalStorage might return empty string instead of NULL on
+        sqlite3_column_blob() error.
+
+        Modified a test to cover this case: 
+        TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm.
+
+        * platform/sql/SQLiteStatement.cpp:
+        (WebCore::SQLiteStatement::getColumnBlobAsString):
+
+2018-04-09  Brent Fulgham  <bfulgham@apple.com>
+
+        WebCore::EventHandler::targetPositionInWindowForSelectionAutoscroll is directly accessing NSScreen
+        https://bugs.webkit.org/show_bug.cgi?id=184344
+        <rdar://problem/39224969>
+
+        Reviewed by Per Arne Vollan.
+
+        The implementation of targetPositionInWindowForSelectionAutoscroll uses the display ID to get the
+        screen boundaries of the current display. This causes a bunch of interaction with NSScreen that
+        we do not want to allow in the WebContent process.
+
+        Instead, we should just use the cached screen information the WebContent process already possesses.
+
+        This patch makes the following changes:
+        1. We now retrieve the screen rect of the page's display from the cache, rather than interacting with
+           the WindowServer directly.
+        2. Add a new 'toUserSpaceForPrimaryScreen' so we don't have to deal with a nil NSWindow when computing
+           the user space version of the coordinates. A nil Window just means we want to get coordinates in
+           terms of the primary display.
+        3. Keep track of the primary display so we can refer to it later.
+        4. Modify the IPC messages to include the primary display's ID so we can easily access it later.
+        5. Modify the PlatformScreen methods to actually use the primary display when appropriate, rather
+           than whichever screen happened to hash to the lowest value.
+
+        * page/mac/EventHandlerMac.mm:
+        (WebCore::EventHandler::targetPositionInWindowForSelectionAutoscroll const): Use new methods that
+        don't require WindowServer access.
+        * platform/PlatformScreen.h:
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::displayID): Assert if we hit this code in the WebContent process.
+        (WebCore::firstScreen): Ditto.
+        (WebCore::window): Ditto.
+        (WebCore::screen): Ditto.
+        (WebCore::primaryScreenID): Added.
+        (WebCore::getScreenProperties): Modify to return a pair consisting of the primary display ID and
+        the HashSet of screen settings.
+        (WebCore::setScreenProperties): Update to also track the primary display ID.
+        (WebCore::screenProperties): Update to use the primary display ID.
+        (WebCore::screenHasInvertedColors): Ditto.
+        (WebCore::toUserSpaceForPrimaryScreen): Added.
+
+2018-04-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
+
+        Make InlineTextBox::createTextRun() take a const lvalue reference String
+        https://bugs.webkit.org/show_bug.cgi?id=184182
+
+        Reviewed by Zalan Bujtas.
+
+        InlineTextBox::createTextRun() takes a non-const lvalue reference String.
+        It is tempting to change the signature of this method to take a const lvalue 
+        reference. But this was done intentionally. TextRun is effectively a StringView:
+        it does not own the passed string. Having the argument a non-const lvalue
+        reference makes the compiler prevent calls like createTextRun("abc").
+
+        To have a better way to express the lifetime of TextRun, this patch does
+        the following:
+
+        -- It makes TextRun::m_text of type String instead of StringView.
+        -- It adds a new constructor which takes const String&. This constructor
+           will addRef the underlying StringImpl when assigning it to m_text.
+        -- It keeps the constructor which takes a StringView. The caller of this
+           constructor still has to make sure the underlying String outlives the
+           TextRun. To avoid copying the underlying buffer of the StringView, we
+           will not use  StringView::toString(). Instead we will use
+           StringView::toStringWithoutCopying() which makes the returned String 
+           accesses the same buffer the StringView uses. In this case, the returned
+           String is effectively a StringView.
+
+        * page/DebugPageOverlays.cpp:
+        (WebCore::drawRightAlignedText):
+        * platform/graphics/TextRun.cpp:
+        * platform/graphics/TextRun.h:
+        (WebCore::TextRun::TextRun):
+        (WebCore::TextRun::subRun const):
+        (WebCore::TextRun::length const):
+        (WebCore::TextRun::setText):
+        (WebCore::TextRun::string const): Deleted.
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::localSelectionRect const):
+        (WebCore::InlineTextBox::paint):
+        (WebCore::InlineTextBox::paintPlatformDocumentMarker):
+        (WebCore::InlineTextBox::paintMarkedTextBackground):
+        (WebCore::InlineTextBox::paintMarkedTextForeground):
+        (WebCore::InlineTextBox::paintMarkedTextDecoration):
+        (WebCore::InlineTextBox::offsetForPosition const):
+        (WebCore::InlineTextBox::positionForOffset const):
+        (WebCore::InlineTextBox::createTextRun const):
+        There is no need for this function to take a String argument anymore. The
+        reason for passing the String was to guarantee its lifetime by keeping
+        a copy of it in the caller side. Now there is no need for that. The TextRun
+        itself will keep this copy.
+
+        * rendering/InlineTextBox.h:
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::computeCanUseSimplifiedTextMeasuring const):
+        RenderText::text() returns StringImpl. The compiler wants us to be more
+        explicit about which constructor of TextRun to call.
+
+        * rendering/SimpleLineLayout.cpp:
+        (WebCore::SimpleLineLayout::canUseForFontAndText):
+        * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
+        (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
+        RenderStyle::hyphenString() returns an AtomicString.
+
+2018-04-09  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        Unreviewed, rolling out r230390.
+
+        Broke accelerated compositing
+
+        Reverted changeset:
+
+        "[GTK] WaylandCompositorDisplay leaks its wl_display"
+        https://bugs.webkit.org/show_bug.cgi?id=184406
+        https://trac.webkit.org/changeset/230390
+
+2018-04-03  Sergio Villar Senin  <svillar@igalia.com>
+
+        [OpenVR][WebVR] Retrieve FrameData in WebVR's rAF
+        https://bugs.webkit.org/show_bug.cgi?id=184265
+
+        Reviewed by Žan Doberšek.
+
+        VRFrameData contains all the required information to properly render a VR scene like view
+        and projection matrices, pose data (position & orientation) and linear & angular velocity
+        among others. The getFrameData() call must be issued inside a WebVR's own
+        requestAnimationFrame.
+
+        * Modules/webvr/VRDisplay.cpp:
+        (WebCore::VRDisplay::getFrameData const):
+        (WebCore::VRDisplay::getPose const):
+        (WebCore::VRDisplay::requestAnimationFrame):
+        (WebCore::VRDisplay::cancelAnimationFrame):
+        * Modules/webvr/VRDisplay.h:
+        * Modules/webvr/VREyeParameters.h:
+        (WebCore::VREyeParameters::rawOffset const): Required to compute view matrices.
+        * Modules/webvr/VRFrameData.cpp:
+        (WebCore::matrixToArray):
+        (WebCore::VRFrameData::leftProjectionMatrix const):
+        (WebCore::VRFrameData::leftViewMatrix const):
+        (WebCore::VRFrameData::rightProjectionMatrix const):
+        (WebCore::VRFrameData::rightViewMatrix const):
+        (WebCore::projectionMatrixFromFieldOfView):
+        (WebCore::rotationMatrixFromQuaternion):
+        (WebCore::applyHeadToEyeTransform):
+        (WebCore::VRFrameData::update):
+        (WebCore::VRFrameData::timestamp const): Deleted.
+        * Modules/webvr/VRFrameData.h:
+        (WebCore::VRFrameData::timestamp const):
+        * Modules/webvr/VRPose.cpp:
+        (WebCore::optionalFloat3ToJSCArray):
+        (WebCore::VRPose::position const):
+        (WebCore::VRPose::linearVelocity const):
+        (WebCore::VRPose::linearAcceleration const):
+        (WebCore::VRPose::orientation const):
+        (WebCore::VRPose::angularVelocity const):
+        (WebCore::VRPose::angularAcceleration const):
+        * Modules/webvr/VRPose.h:
+        (WebCore::VRPose::create):
+        (WebCore::VRPose::update):
+        (WebCore::VRPose::VRPose):
+        * platform/vr/VRPlatformDisplay.h:
+        (WebCore::VRPlatformTrackingInfo::Quaternion::Quaternion):
+        (WebCore::VRPlatformTrackingInfo::Quaternion::conjugate):
+        (WebCore::VRPlatformTrackingInfo::Quaternion::operator*):
+        (WebCore::VRPlatformTrackingInfo::Float3::Float3): Just a group of 3 floats used to store
+        both velocity and acceleration in a format which is very convenient to later generate JSC
+        arrays.
+        (WebCore::VRPlatformTrackingInfo::clear):
+        * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:
+        (WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):
+        (WebCore::rotationMatrixToQuaternion):
+        (WebCore::VRPlatformDisplayOpenVR::getTrackingInfo):
+        * platform/vr/openvr/VRPlatformDisplayOpenVR.h:
+
+2018-04-09  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [GTK] WaylandCompositorDisplay leaks its wl_display
+        https://bugs.webkit.org/show_bug.cgi?id=184406
+
+        Reviewed by Carlos Garcia Campos.
+
+        Remove the protected default constructor, for good measure.
+
+        * platform/graphics/wayland/PlatformDisplayWayland.h:
+
+2018-04-08  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [CMake] WebKit should link to WebCore as a PRIVATE library if WebCore is a static library
+        https://bugs.webkit.org/show_bug.cgi?id=184127
+
+        Reviewed by Konstantin Tokarev.
+
+        No new tests (No behaviour changes).
+
+        * CMakeLists.txt: Added a interface library WebCoreHeaderInterface.
+
+2018-04-08  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Use alignas instead of compiler-specific attributes
+        https://bugs.webkit.org/show_bug.cgi?id=183508
+
+        Reviewed by Mark Lam.
+
+        Use alignas instead of aligned.
+
+        * platform/graphics/cpu/arm/filters/FELightingNEON.cpp:
+        * platform/graphics/cpu/arm/filters/FELightingNEON.h:
+        (WebCore::FELighting::platformApplyNeon):
+
+2018-04-08  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [WPE][GTK] Remove applicationDirectoryPath() and sharedResourcePath()
+        https://bugs.webkit.org/show_bug.cgi?id=184381
+
+        Reviewed by Carlos Garcia Campos.
+
+        These are unused.
+
+        * platform/FileSystem.h:
+        * platform/glib/FileSystemGlib.cpp:
+        (WebCore::FileSystem::applicationDirectoryPath): Deleted.
+        (WebCore::FileSystem::sharedResourcesPath): Deleted.
+
+2018-04-07  Daniel Bates  <dabates@apple.com>
+
+        Have WorkerScriptLoader::loadAsynchronously() take a FetchOptions
+        https://bugs.webkit.org/show_bug.cgi?id=184385
+
+        Reviewed by Youenn Fablet.
+
+        Currently we pass various FetchOptions to WorkerScriptLoader::loadAsynchronously()
+        so that it can build up a ThreadableLoaderOptions structure to pass to the loader.
+        Each time we want to set another FetchOptions option we need to add a new parameter.
+        Instead we should have WorkerScriptLoader::loadAsynchronously() take a FetchOptions.
+        This will make it straightforward for a caller to set new loader options as needed.
+        In particular, this will make it straightforward to support setting the request's
+        destination flag (i.e. FetchOptions::destination) to support blocking scripts with
+        a non-JavaScript MIME type in a subsequent commit.
+
+        No functionality changed. So, no new tests.
+
+        * loader/ResourceLoaderOptions.h:
+        (WebCore::ResourceLoaderOptions::ResourceLoaderOptions): Modified to take a FetchOptions
+        by value so as to support both move and copy semantics.
+        * loader/ThreadableLoader.cpp:
+        (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):  Added helper constructor
+        that takes a FetchOptions.
+        * loader/ThreadableLoader.h:
+        * workers/Worker.cpp:
+        (WebCore::Worker::create): Instantiate and pass a FetchOptions to the loader for the mode,
+        cache policy, and redirect policy.
+        * workers/WorkerScriptLoader.cpp:
+        (WebCore::WorkerScriptLoader::loadAsynchronously): Modified to take a FetchOptions and
+        instantiate a ThreadableLoaderOptions from it.
+        * workers/WorkerScriptLoader.h:
+        * workers/WorkerScriptLoaderClient.h:
+        (WebCore::WorkerScriptLoaderClient::isServiceWorkerClient const): Deleted. This function
+        is no longer needed because the Service Worker client now passes the service worker mode
+        directly to the loader.
+        * workers/service/ServiceWorkerJob.cpp:
+        (WebCore::ServiceWorkerJob::fetchScriptWithContext): Instantiate and pass a FetchOptions
+        to the loader.
+        * workers/service/ServiceWorkerJob.h:
+
+2018-04-07  Timothy Hatcher  <timothy@apple.com>
+
+        Use the system's link color when system appearance is desired for a WebView.
+
+        https://bugs.webkit.org/show_bug.cgi?id=184353
+        rdar://problem/9420053
+
+        Reviewed by Wenson Hsieh.
+
+        Have Document consult RenderTheme via StyleColor for the various link colors.
+        This allows the system to have different colors than the standard hardcoded ones.
+        This adds StyleColor::Options, to avoid multiple booleans being passed around,
+        since the "for visited link" state is now needed in RenderTheme.
+
+        * WebCore.xcodeproj/project.pbxproj: Made StyleColor.h private, since RenderTheme.h includes it.
+        * css/StyleColor.cpp:
+        (WebCore::StyleColor::colorFromKeyword): Use options instead of a bool.
+        (WebCore::StyleColor::isSystemColor): Consider CSSValueWebkitLink the start of system colors.
+        * css/StyleColor.h:
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::colorFromPrimitiveValue const): Use StyleColor::Options.
+        * css/parser/CSSParser.cpp:
+        (WebCore::CSSParser::parseSystemColor): Use StyleColor::Options.
+        * dom/Document.cpp:
+        (WebCore::Document::resetLinkColor): Ask StyleColor for the link color instead of hardcoding it.
+        (WebCore::Document::resetVisitedLinkColor): Ditto.
+        (WebCore::Document::resetActiveLinkColor): Ditto.
+        (WebCore::Document::styleColorOptions const): Added. Helper to get the options used.
+        * dom/Document.h:
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal): Use StyleColor::Options.
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::systemColor const): Add default values here, moved from Document.
+        (WebCore::RenderTheme::focusRingColor): Use StyleColor::Options.
+        * rendering/RenderTheme.h:
+        (WebCore::RenderTheme::platformFocusRingColor const): Use StyleColor::Options.
+        * rendering/RenderThemeGtk.cpp:
+        (WebCore::RenderThemeGtk::systemColor const): Use StyleColor::Options.
+        * rendering/RenderThemeGtk.h:
+        * rendering/RenderThemeIOS.h:
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::systemColor const): Use StyleColor::Options.
+        * rendering/RenderThemeMac.h:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::platformFocusRingColor const): Use StyleColor::Options.
+        (WebCore::RenderThemeMac::platformColorsDidChange): Clear m_systemVisitedLinkColor.
+        (WebCore::RenderThemeMac::systemColor const): Use StyleColor::Options.
+        (WebCore::RenderThemeMac::adjustMenuListStyle const): Ditto.
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::systemColor const): Use StyleColor::Options.
+        * rendering/RenderThemeWin.h:
+        * rendering/TextPaintStyle.cpp:
+        (WebCore::computeTextPaintStyle): Use StyleColor::Options.
+
+2018-04-06  Youenn Fablet  <youenn@apple.com>
+
+        Response headers should be filtered when sent from NetworkProcess to WebProcess
+        https://bugs.webkit.org/show_bug.cgi?id=184310
+
+        Reviewed by Ryosuke Niwa.
+
+        Did some refactoring to allow ResourceResponse to use header value parsing routines.
+        We add sanitization levels for regular responses in case responses might be exposed to scripts or not.
+        If not exposed to scripts, additional filtering is done.
+
+        Add internal API to get unfiltered response headers from a fetch response.
+        Test: http/wpt/service-workers/header-filtering.https.html
+
+        * Modules/fetch/FetchResponse.h:
+        * loader/CrossOriginPreflightResultCache.cpp:
+        (WebCore::CrossOriginPreflightResultCacheItem::parse):
+        * platform/network/HTTPParsers.h:
+        (WebCore::addToAccessControlAllowList):
+        (WebCore::parseAccessControlAllowList):
+        * platform/network/ResourceResponseBase.cpp:
+        (WebCore::isSafeToKeepRedirectionResponseHeader):
+        (WebCore::isCrossOriginSafeToKeepResponseHeader):
+        (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFields):
+        * platform/network/ResourceResponseBase.h:
+        * testing/ServiceWorkerInternals.cpp:
+        (WebCore::ServiceWorkerInternals::fetchResponseHeaderList):
+        * testing/ServiceWorkerInternals.h:
+        * testing/ServiceWorkerInternals.idl:
+
+2018-04-06  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        Unreviewed, fix unused parameter warning when credential storage is disabled
+
+        * platform/network/soup/NetworkStorageSessionSoup.cpp:
+        (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage):
+
+2018-04-06  Eric Carlson  <eric.carlson@apple.com>
+
+        [Extra zoom mode] Block playback until fullscreen begins
+        https://bugs.webkit.org/show_bug.cgi?id=184371
+        <rdar://problem/39250891>
+
+        Reviewed by Youenn Fablet.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::updatePlayState): Return early when waiting to enter fullscreen.
+        (WebCore::HTMLMediaElement::enterFullscreen): Set m_waitingToEnterFullscreen.
+        (WebCore::HTMLMediaElement::exitFullscreen): Clear m_waitingToEnterFullscreen.
+        (WebCore::HTMLMediaElement::didBecomeFullscreenElement): Ditto.
+        * html/HTMLMediaElement.h:
+
+2018-04-06  Brent Fulgham  <bfulgham@apple.com>
+
+        WebCore::screenSupportsExtendedColor improperly calls NSScreen functions in the WebContent process
+        https://bugs.webkit.org/show_bug.cgi?id=184364
+        <rdar://problem/39246314>
+
+        Reviewed by Per Arne Vollan.
+
+        The WebContent process is interacting directly with NSScreen to determine if the current screen
+        has extended color support. This should be brokered from the UIProcess.
+        
+        Tested by fast/media/mq-color-gamut.html.
+
+        * platform/ScreenProperties.h:
+        (WebCore::ScreenProperties::encode const): Add screenSupportsExtendedColor.
+        (WebCore::ScreenProperties::decode): Ditto.
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::getScreenProperties): Retrieve extended color support.
+        (WebCore::screenSupportsExtendedColor): Retrieve cached version when in the WebContent
+        process. Assert that NSScreen is not accessed in the WebContent process.
+
+2018-04-06  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [Win][WebCore] Expose a constant for scrollbar pixels per line (cScrollbarPixelsPerLine)
+        https://bugs.webkit.org/show_bug.cgi?id=184296
+
+        Reviewed by Alex Christensen.
+
+        No new tests (No behavior changes).
+
+        * platform/PlatformWheelEvent.h: Placed cScrollbarPixelsPerLine definition.
+        * platform/win/WheelEventWin.cpp:
+        (WebCore::PlatformWheelEvent::PlatformWheelEvent): Removed cScrollbarPixelsPerLine definition.
+
+2018-04-06  Brent Fulgham  <bfulgham@apple.com>
+
+        Unreviewed test fix after r230323
+
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::screenSupportsExtendedColor): Remove assertion hit during test runs.
+
+2018-04-06  Brent Fulgham  <bfulgham@apple.com>
+
+        WebCore::screenColorSpace is retrieving CGColorSpace from NSScreen directly
+        https://bugs.webkit.org/show_bug.cgi?id=184343
+        <rdar://problem/39224881>
+
+        Reviewed by Per Arne Vollan.
+
+        Revise ScreenProperties to serialize the screen's color space, and later
+        retrieve that in the WebContent process. This allows us to close off
+        the CGSWindowServer connection.
+
+        * platform/ScreenProperties.h:
+        (WebCore::ScreenProperties::encode const): Add CGColorSpaceRef support.
+        (WebCore::ScreenProperties::decode): Ditto.
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::displayID): Add assertion to prevent use in WebContent process.
+        (WebCore::firstScreen): Ditto.
+        (WebCore::getScreenProperties): Add support for CGColorSpaceRef.
+        (WebCore::screenColorSpace): Retrieve cached version when in WebContent process.
+        Assert that NSScreen is not accessed in WebContent process.
+
+2018-04-06  Ms2ger  <Ms2ger@igalia.com>
+
+        Implement createImageBitmap(Blob)
+        https://bugs.webkit.org/show_bug.cgi?id=183247
+
+        Reviewed by Dean Jackson.
+
+        Tests:
+            - imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
+            - imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
+
+        * fileapi/FileReaderLoader.h:
+        (WebCore::FileReaderLoader::url): expose the Blob's URL.
+        * html/ImageBitmap.cpp: implement createImageBitmap(Blob).
+        * html/ImageBitmap.h: allow the BlobImageObserver class access to the creation function.
+        * loader/cache/CachedImage.cpp: reuse extracted code.
+        (WebCore::CachedImage::isPDFResource const):
+        (WebCore::CachedImage::isPostScriptResource const):
+        (WebCore::CachedImage::createImage):
+        * platform/graphics/Image.cpp: extract some code from CachedImage to reuse.
+        (WebCore::Image::create):
+        (WebCore::Image::isPDFResource):
+        (WebCore::Image::isPostScriptResource):
+        * platform/graphics/Image.h: add declarations.
+
+2018-04-06  Zalan Bujtas  <zalan@apple.com>
+
+        Flex child does not get repainted when it is inserted back to the render tree.
+        https://bugs.webkit.org/show_bug.cgi?id=184361
+        <rdar://problem/34528716>
+
+        Reviewed by Antti Koivisto.
+
+        As with any regular block children, we should issue full repaint for flexbox items on their
+        first layout (see RenderBlockFlow::layoutBlockChild()).
+
+        Test: fast/flexbox/missing-repaint-when-flext-item-never-had-layout.html
+
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
+
+2018-04-06  Ms2ger  <Ms2ger@igalia.com>
+
+        Support transferring ImageBitmap objects
+        https://bugs.webkit.org/show_bug.cgi?id=183131
+
+        Reviewed by Dean Jackson.
+
+        Test: imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer.html
+
+        * bindings/js/SerializedScriptValue.cpp:
+        (WebCore::CloneSerializer::serialize): thread through ImageBitmaps.
+        (WebCore::CloneSerializer::CloneSerializer): thread through ImageBitmaps.
+        (WebCore::CloneSerializer::fillTransferMap): don't require a mutable reference.
+        (WebCore::CloneSerializer::dumpImageBitmap): add.
+        (WebCore::CloneSerializer::dumpIfTerminal): check for ImageBitmap.
+        (WebCore::CloneDeserializer::deserialize): thread through ImageBitmaps.
+        (WebCore::CloneDeserializer::CloneDeserializer): thread through ImageBitmaps.
+        (WebCore::CloneDeserializer::readImageBitmap): add.
+        (WebCore::CloneDeserializer::readTerminal): check for ImageBitmap.
+        (WebCore::SerializedScriptValue::SerializedScriptValue): thread through ImageBitmaps.
+        (WebCore::SerializedScriptValue::create): thread through ImageBitmaps.
+        (WebCore::containsDuplicates): add.
+        (WebCore::SerializedScriptValue::deserialize): handle ImageBitmap arguments.
+        * bindings/js/SerializedScriptValue.h: update signatures, add member.
+        * html/ImageBitmap.cpp:
+        (WebCore::ImageBitmap::create): add.
+        (WebCore::ImageBitmap::detachBitmaps): add.
+        * html/ImageBitmap.h: add signatures.
+
+2018-04-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
+
+        When recording the drawing, the DisplayList should be initialized with the GraphicsContextState of the underlying GraphicsContext
+        https://bugs.webkit.org/show_bug.cgi?id=184336
+
+        Reviewed by Antti Koivisto.
+
+        The state of the drawing context has to be transfered to the recording 
+        DisplayList before recording. Many recording GraphicsContext functions 
+        will behave wrongly if it gets the default state.
+
+        * html/canvas/CanvasRenderingContext2DBase.cpp:
+        (WebCore::DisplayListDrawingContext::DisplayListDrawingContext):
+        (WebCore::CanvasRenderingContext2DBase::drawingContext const):
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::recursiveCommitChanges):
+        * platform/graphics/displaylists/DisplayListRecorder.cpp:
+        (WebCore::DisplayList::Recorder::Recorder):
+        * platform/graphics/displaylists/DisplayListRecorder.h:
+        (WebCore::DisplayList::Recorder::ContextState::ContextState):
+        (WebCore::DisplayList::Recorder::ContextState::cloneForSave const):
+        * platform/graphics/displaylists/DisplayListReplayer.cpp:
+        (WebCore::DisplayList::Replayer::replay):
+        * platform/graphics/displaylists/DisplayListReplayer.h:
+        (WebCore::DisplayList::Replayer::replay): If we do not have a clipping
+        rectangle and we want to record all the drawing, we need a default value
+        for the clipping rectangle and we want no clipping to happen.
+
+2018-04-06  Daniel Bates  <dabates@apple.com>
+
+        Emit a more informative message when a script is blocked due to "X-Content-Type: nosniff"
+        https://bugs.webkit.org/show_bug.cgi?id=184359
+
+        Reviewed by Per Arne Vollan.
+
+        Emphasize in the message that the script was blocked from executing.
+
+        Test: http/tests/security/contentTypeOptions/nosniff-importScript-blocked.html
+
+        * dom/LoadableClassicScript.cpp:
+        (WebCore::LoadableClassicScript::notifyFinished):
+        * workers/WorkerScriptLoader.cpp:
+        (WebCore::WorkerScriptLoader::didReceiveResponse):
+
+2018-04-06  Daniel Bates  <dabates@apple.com>
+
+        importScripts() should throw exception with a reason when it fails to load a script from the network
+        https://bugs.webkit.org/show_bug.cgi?id=184345
+
+        Reviewed by Alexey Proskuryakov.
+
+        Currently importScripts() throws a NetworkError exception without a reason when
+        it fails to load a script from the network. It is ambiguous whether the load failed
+        due to an access control failure or some other error. Instead we should include
+        the reason the load failed in the thrown exception.
+
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::importScripts):
+
+2018-04-06  Daniel Bates  <dabates@apple.com>
+
+        Attempt to fix the build after <https://trac.webkit.org/changeset/230338>
+        (https://bugs.webkit.org/show_bug.cgi?id=184360)
+
+        Make lambdas mutable so that we can WTFMove() their captured arguments.
+
+        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+        (WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionFailed):
+        (WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed):
+        (WebCore::LibWebRTCMediaEndpoint::setRemoteSessionDescriptionFailed):
+
+2018-04-06  Daniel Bates  <dabates@apple.com>
+
+        Have class Exception take String by value instead of a String&&
+        https://bugs.webkit.org/show_bug.cgi?id=184360
+
+        Reviewed by Alexey Proskuryakov.
+
+        For convenience support instantiating an Exception with either an lvalue String or
+        rvalue String.
+
+        Although it can be argued that having Exception take a String by value instead of String&&
+        can lead to missed opportunities to WTFMove() a String object into Exception such mistakes
+        are just that, missed opportunities. That is, correctness is not affected and we may perform
+        an unnecessary ref/deref of the underlying StringImpl when instantiating an Exception. If
+        such missed opportunities show up in profiles and such mistakes happen often then we can
+        re-evaluate the decision to have Exception take a String by value.
+
+        * Modules/cache/DOMCache.cpp:
+        (WebCore::DOMCache::put): Simplify code now that Exception takes a String by value.
+        * Modules/fetch/FetchResponse.cpp:
+        (WebCore::FetchResponse::BodyLoader::didFail): Ditto.
+        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+        (WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionFailed): Move String into Exception to avoid an
+        unnecessary ref/de-ref.
+        (WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed): Ditto.
+        (WebCore::LibWebRTCMediaEndpoint::setRemoteSessionDescriptionFailed): Ditto.
+        * dom/Exception.h:
+        (WebCore::Exception::Exception): Take String by value. Also use uniform initializer syntax.
+
+2018-04-06  Antti Koivisto  <antti@apple.com>
+
+        Tighten ImageSource to have BitmapImage pointer instead of Image
+        https://bugs.webkit.org/show_bug.cgi?id=184356
+
+        Reviewed by Said Abou-Hallawa.
+
+        ImageSource is an implementation detail of BitmapImage, not a generic type.
+
+        * loader/ImageLoader.cpp:
+        (WebCore::ImageLoader::decode):
+        * platform/graphics/BitmapImage.h:
+        * platform/graphics/Image.h:
+        (WebCore::Image::decode): Deleted.
+        (WebCore::Image::imageFrameAvailableAtIndex): Deleted.
+
+        Also make some BitmapImage specific functions non-virtual and remove them from Image.
+
+        * platform/graphics/ImageSource.cpp:
+        (WebCore::ImageSource::ImageSource):
+        * platform/graphics/ImageSource.h:
+        (WebCore::ImageSource::create):
+
+        Make constructors private.
+
+        * platform/graphics/cg/GraphicsContext3DCG.cpp:
+        (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
+
+2018-04-06  Brent Fulgham  <bfulgham@apple.com>
+
+        Unreviewed test fix after r230323
+
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::screen): Remove assertion we still hit due to event handling code.
+
+2018-04-05  Youenn Fablet  <youenn@apple.com>
+
+        REGRESSION (r230223): LayoutTest http/tests/contentextensions/css-display-none-overflows-rule-data-1.html is crashing
+        https://bugs.webkit.org/show_bug.cgi?id=184306
+
+        Reviewed by Ryosuke Niwa.
+
+        Add an option to not compile CSS rules since they are not useful in NetworkProcess.
+        Covered by tests no longer crashing in Debug WK2 bots.
+
+        * contentextensions/ContentExtension.cpp:
+        (WebCore::ContentExtensions::ContentExtension::create):
+        (WebCore::ContentExtensions::ContentExtension::ContentExtension):
+        * contentextensions/ContentExtension.h:
+        * contentextensions/ContentExtensionsBackend.cpp:
+        (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
+        * contentextensions/ContentExtensionsBackend.h:
+
+2018-04-05  Brent Fulgham  <bfulgham@apple.com>
+
+        WebContent process is calling CGDisplayUsesInvertedPolarity
+        https://bugs.webkit.org/show_bug.cgi?id=184337
+        <rdar://problem/39215702>
+
+        Reviewed by Zalan Bujtas.
+
+        The PlatformScreenMac code is still calling display-related routines directly, specifically
+        CGDisplayUsesInvertedPolarity and CGDisplayUsesForceToGray. These should be brokered from
+        the UIProcess.
+        
+        There's also no reason to avoid the brokering behavior on current WebKit builds. Remove
+        the compile guards so all macOS builds use this behavior.
+        
+        Finally, add some ProcessPrivilege assertions to guard against accidentally calling these
+        routines in the future.
+
+        Tested by existing regression tests.
+
+        * platform/PlatformScreen.h:
+        * platform/ScreenProperties.h:
+        (WebCore::ScreenProperties::encode const): Add new values.
+        (WebCore::ScreenProperties::decode):
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::displayID): Add assertion that this is not calling display-related routines in
+        the WebContent process.
+        (WebCore::firstScreen): Ditto.
+        (WebCore::screenProperties): Moved higher in the file so it can be reused. Add calls to
+        CGDisplayUsesInvertedPolarity and CGDisplayUsesForceToGray.
+        (WebCore::getScreenProperties): Moved higher in the file so it can be reused. Stop
+        double-hashing displayID.
+        (WebCore::screenIsMonochrome): Use cached values in WebContent process. Assert if this
+        code attempts a display-related routine in the WebContent process.
+        (WebCore::screenHasInvertedColors): Ditto.
+        (WebCore::screenDepth): Add assertion that this is not calling display-related routines in
+        the WebContent process.
+        (WebCore::screenDepthPerComponent): Ditto.
+        (WebCore::screenRect): Ditto.
+        (WebCore::screenAvailableRect): Ditto.
+        (WebCore::screen): Ditto.
+        (WebCore::screenColorSpace): Ditto.
+        (WebCore::screenSupportsExtendedColor): Ditto.
+
+2018-04-05  John Wilander  <wilander@apple.com>
+
+        Resource Load Statistics: Apply cookie blocking to setCookiesFromDOM()
+        https://bugs.webkit.org/show_bug.cgi?id=184346
+        <rdar://problem/39226036>
+
+        Reviewed by Brent Fulgham.
+
+        Since these cookies can't be seen and are not sent in requests, I
+        can't write an automated test for them. This really should have been
+        done as part of: https://bugs.webkit.org/show_bug.cgi?id=180682.
+        That said, I have tested this manually.
+
+        * platform/network/mac/CookieJarMac.mm:
+        (WebCore::setCookiesFromDOM):
+
+2018-04-05  Zalan Bujtas  <zalan@apple.com>
+
+        Folding anonymous blocks should not result in deleting content.
+        https://bugs.webkit.org/show_bug.cgi?id=184339
+        <rdar://problem/37327428>
+
+        Reviewed by Antti Koivisto.
+
+        While folding multiple anonymous blocks (moving the children from next sibling over to previous sibling)
+        we should ensure that the block we are about to destroy does not gain new descendants.
+        In case of 4 sibling anonymous blocks (A B C D), while destroying B
+        1. we move C's children to A and destroy C.
+        2. While destroying C, we notice B and C as sibling anonymous blocks and we move
+        D's children over to B (even though B is going to be destroyed as we climb back on the stack).
+        
+        In this patch, B is detached from the tree before we start moving renderers around so that a subsequent folding won't
+        find B anymore as a candidate.
+
+        Test: fast/block/crash-while-folding-anonymous-blocks.html
+
+        * rendering/updating/RenderTreeBuilderBlock.cpp:
+        (WebCore::RenderTreeBuilder::Block::detach):
+
+2018-04-05  Andy Estes  <aestes@apple.com>
+
+        Mark Payment Request as "Supported" in features.json
+        https://bugs.webkit.org/show_bug.cgi?id=184338
+
+        Reviewed by Anders Carlsson.
+
+        * features.json:
+
+2018-04-05  Chris Dumez  <cdumez@apple.com>
+
+        Unreviewed, rolling out r230042.
+
+        It is no longer needed now that it is safe to construct a
+        SecurityOrigin from an on-main thread
+
+        Reverted changeset:
+
+        "WebSocket::didReceiveMessage() may construct a SecurityOrigin
+        object on a non-main thread"
+        https://bugs.webkit.org/show_bug.cgi?id=184068
+        https://trac.webkit.org/changeset/230042
+
+2018-04-05  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [WTF] Remove StaticLock
+        https://bugs.webkit.org/show_bug.cgi?id=184332
+
+        Reviewed by Mark Lam.
+
+        No behavior change.
+
+        * Modules/webdatabase/Database.cpp:
+        (WebCore::Database::Database):
+        (WebCore::Database::performOpenAndVerify):
+        (WebCore::Database::closeDatabase):
+        (WebCore::Database::getCachedVersion const):
+        (WebCore::Database::setCachedVersion):
+        * Modules/webdatabase/DatabaseTracker.cpp:
+        (WebCore::DatabaseTracker::openDatabaseMutex):
+        * Modules/webdatabase/DatabaseTracker.h:
+        * Modules/websockets/WebSocket.cpp:
+        (WebCore::WebSocket::allActiveWebSocketsMutex):
+        * Modules/websockets/WebSocket.h:
+        * bridge/objc/WebScriptObject.mm:
+        * crypto/CryptoAlgorithmRegistry.cpp:
+        (WebCore::CryptoAlgorithmRegistry::identifier):
+        (WebCore::CryptoAlgorithmRegistry::name):
+        (WebCore::CryptoAlgorithmRegistry::create):
+        (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
+        * dom/Node.cpp:
+        * platform/URL.cpp:
+        * platform/graphics/FontCache.cpp:
+        * platform/graphics/MediaPlayer.cpp:
+        * platform/ios/QuickLook.mm:
+        * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
+        * platform/ios/wak/WebCoreThread.mm:
+        * platform/ios/wak/WebCoreThreadRun.cpp:
+        * platform/network/cf/LoaderRunLoopCF.cpp:
+        (WebCore::loaderRunLoop):
+        * platform/network/curl/CurlContext.cpp:
+        (WebCore::CurlShareHandle::mutexFor):
+        * platform/network/curl/CurlContext.h:
+        * platform/sql/SQLiteDatabaseTracker.cpp:
+        (WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
+        (WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
+        * platform/text/TextEncodingRegistry.cpp:
+        (WebCore::buildBaseTextCodecMaps):
+        (WebCore::newTextCodec):
+        (WebCore::atomicCanonicalTextEncodingName):
+        * workers/WorkerThread.cpp:
+        (WebCore::WorkerThread::workerThreadCount):
+        (WebCore::WorkerThread::WorkerThread):
+        (WebCore::WorkerThread::~WorkerThread):
+        (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
+
+2018-04-04  Youenn Fablet  <youenn@apple.com>
+
+        WebRTC data channel only applications require capture permissions for direct connections
+        https://bugs.webkit.org/show_bug.cgi?id=174500
+        <rdar://problem/34134281>
+
+        Reviewed by Eric Carlson.
+
+        Test: webrtc/datachannel/mdns-ice-candidates.html
+
+        Add support at PeerConnectionBackend to obfuscate any gathered host candidate
+        by replacing the IP address with an opaque name that can be resolved by MDNS.
+        An opaque name is generated for each IP address and is scoped by the document owning the peer connection object.
+
+        Add support to resolve any such MDNS ICE candidate.
+        A limit of 250 ms is fixed for the resolution to happen.
+        After 250 ms, the candidate is discarded.
+
+        Add an experimental flag around this feature, off by default.
+
+        * Modules/mediastream/PeerConnectionBackend.cpp:
+        (WebCore::extractIPAddres):
+        (WebCore::PeerConnectionBackend::addIceCandidate):
+        (WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
+        (WebCore::PeerConnectionBackend::addIceCandidateFailed):
+        (WebCore::PeerConnectionBackend::newICECandidate):
+        (WebCore::PeerConnectionBackend::doneGatheringCandidates):
+        (WebCore::PeerConnectionBackend::registerMDNSName):
+        (WebCore::PeerConnectionBackend::finishedRegisteringMDNSName):
+        * Modules/mediastream/PeerConnectionBackend.h:
+        * Modules/mediastream/RTCIceCandidate.h:
+        (WebCore::RTCIceCandidate::setCandidate):
+        * Modules/mediastream/RTCPeerConnection.h:
+        * dom/Document.cpp:
+        (WebCore::Document::prepareForDestruction):
+        (WebCore::Document::suspend):
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::mdnsICECandidatesEnabled const):
+        (WebCore::RuntimeEnabledFeatures::setMDNSICECandidatesEnabled):
+        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
+
+2018-04-04  Brian Burg  <bburg@apple.com>
+
+        [Cocoa] WebDriver: test imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_non_session_cookie fails
+        https://bugs.webkit.org/show_bug.cgi?id=184314
+        <rdar://problem/39186578>
+
+        Reviewed by Timothy Hatcher.
+
+        Covered by several tests in add_cookie.py per the bug title.
+
+        * platform/network/cocoa/CookieCocoa.mm:
+        (WebCore::Cookie::operator NSHTTPCookie * const):
+        By converting an integral UNIX timestamp to |maxAge| fractional seconds into the future, we introduce unwanted
+        precision that is truncated when switching back to a UNIX timestamp later. Always round up maxAge so that
+        the truncated value and actual value are the same.
+
+2018-04-04  Alex Christensen  <achristensen@webkit.org>
+
+        Move PingHandle to WebKitLegacy
+        https://bugs.webkit.org/show_bug.cgi?id=184145
+
+        Reviewed by Youenn Fablet.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/network/PingHandle.h: Removed.
+
+2018-04-04  Per Arne Vollan  <pvollan@apple.com>
+
+        The layout test fast/canvas/canvas-blending-global-alpha.html is failing when the WebContent process does not have WindowServer access.
+        https://bugs.webkit.org/show_bug.cgi?id=183752
+        <rdar://problem/38635731>
+
+        The test is failing because the system is only providing software rendering when there is no access
+        to the WindowServer, and software rendering is producing slightly different results than hardware
+        rendering. To enable accelerated rendering, the GPU to be used for IOSurface rendering needs to be
+        selected by handing over the OpenGL display mask to the IOSurface CGContext.
+
+        Reviewed by Brent Fulgham.
+
+        No new tests, covered by existing tests.
+
+        * platform/graphics/GraphicsContext3D.h:
+        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
+        (WebCore::GraphicsContext3D::getOpenGLDisplayMask):
+        * platform/graphics/cocoa/IOSurface.mm:
+        (WebCore::IOSurface::ensurePlatformContext):
+
+2018-04-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
+
+        Track the paint frequency through a new class named PaintFrequencyTracker
+        https://bugs.webkit.org/show_bug.cgi?id=184311
+
+        Reviewed by Antti Koivisto.
+
+        PaintFrequencyTracker is a class which detects when a layer is painted 
+        frequently. SinglePaintFrequencyTracking is used in conjunction with
+        PaintFrequencyTracker to recored a single paint timing.
+
+        * rendering/PaintFrequencyTracker.h: Added.
+        (WebCore::PaintFrequencyTracker::begin):
+        (WebCore::PaintFrequencyTracker::end):
+        (WebCore::PaintFrequencyTracker::paintingFrequently const):
+        Simplify the logic for tracking the paint frequency and move it from
+        RenderLayer.cpp.
+
+        (WebCore::SinglePaintFrequencyTracking::SinglePaintFrequencyTracking):
+        (WebCore::SinglePaintFrequencyTracking::~SinglePaintFrequencyTracking):
+        A convenient way to bracket the begin() and the end() methods of
+        PaintFrequencyTracker.
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::paintLayerContents):
+        (WebCore::RenderLayer::calculateClipRects const):
+        (WebCore::PaintFrequencyInfo::PaintFrequencyInfo): Deleted.
+        (WebCore::PaintFrequencyInfo::setPaintedCacheableResource): Deleted.
+        (WebCore::PaintFrequencyInfo::paintingFrequently const): Deleted.
+        (WebCore::PaintFrequencyInfo::updatePaintFrequency): Deleted.
+        (WebCore::PaintFrequencyInfo::paintingCacheableResource): Deleted.
+        * rendering/RenderLayer.h:
+        Rename PaintFrequencyInfo to PaintFrequencyTracker and move it a separate
+        header file.
+
+2018-04-04  Jer Noble  <jer.noble@apple.com>
+
+        RELEASE_ASSERT in CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF() when MediaToolbox.framework missing
+        https://bugs.webkit.org/show_bug.cgi?id=184247
+        <rdar://problem/39007591>
+
+        Rubber-stamped by Eric Carlson.
+
+        Use SOFT_LINK_FRAMEWORK_OPTIONAL for frameworks which are not guaranteed to be present.
+
+        * page/CaptionUserPreferencesMediaAF.cpp:
+        (WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):
+
+2018-04-04  Brent Fulgham  <bfulgham@apple.com>
+
+        Failures from mach port reference handling should be fatal
+        https://bugs.webkit.org/show_bug.cgi?id=184202
+        <rdar://problem/37771114>
+
+        Reviewed by Anders Carlsson.
+
+        We may corrupt the Mach port space by improperly matching the equivalent of reference counting
+        retains (mach_port_mod_refs) with releases (mach_port_deallocate).
+
+        Our current implementation of MachSendRights::create does not grab a reference if the passed
+        port is MACH_PORT_DEAD, but we unconditionally call mach_port_deallocate on the port, which
+        could lead to a reference count mismatch.
+
+        Likewise, our MachSendRight destructor does not release the port if it has changed to MACH_PORT_DEAD
+        (e.g., if a child process dies), again leading to a mismatch in retain/releases.
+
+        Finally, failures in mach_port_deallocate should be fatal because they indicate that the
+        application was attempting to remove an unowned right. This is a fatal condition for Mach, and
+        should lead to an abort. 
+
+        This patch does the following:
+
+        1. It creates a helper function that does the right thing for safely deallocating a mach port.
+        2. It uses it in multiple places.
+        3. It revises 'MachSendRight::create" so that it properly handles the condition of a dead port.
+        4. It revises the MachSendRight destructor to properly handle the condition of a dead port.
+
+        No new tests, no change in behavior expected.
+
+        * SourcesCocoa.txt: Update for move of MachSendRight files.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * page/cocoa/ResourceUsageThreadCocoa.mm:
+        (WebCore::getMachThreads): Added.
+        (WebCore::cpuUsage): Use the new cleanup helper function.
+        * platform/cocoa/MachSendRight.cpp: Removed.
+        * platform/cocoa/MachSendRight.h: Removed.
+        * platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm:
+        (WebCore::VideoFullscreenLayerManagerObjC::setVideoFullscreenLayer):
+        * platform/graphics/cocoa/IOSurface.h:
+        * platform/graphics/cocoa/IOSurface.mm:
+
+2018-04-04  Youenn Fablet  <youenn@apple.com>
+
+        Remove unused HTTP header names
+        https://bugs.webkit.org/show_bug.cgi?id=184272
+
+        Reviewed by Alex Christensen.
+
+        No change of behavior.
+        Removed some names that are not used in the code base.
+        This allows to strengthen filtering of responses sent to WebProcess.
+        Added two headers used by web inspector.
+        Updated existing code to use indexed HTTP header names.
+
+        * html/parser/XSSAuditor.cpp:
+        (WebCore::XSSAuditor::init):
+        * inspector/agents/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::sourceMapURLForResource):
+        * platform/network/HTTPHeaderNames.in:
+
+2018-04-04  Beth Dakin  <bdakin@apple.com>
+
+        Fix the !HAVE(AVFOUNDATION_VIDEO_OUTPUT) build
+        https://bugs.webkit.org/show_bug.cgi?id=184309
+        -and corresponding-
+        rdar://problem/39179126
+
+        Reviewed by Jer Noble.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoFullscreenInlineImage):
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
+
+2018-04-04  Youenn Fablet  <youenn@apple.com>
+
+        MockRealtimeVideoSourceMac should produce kCVPixelFormatType_420YpCbCr8Planar buffers
+        https://bugs.webkit.org/show_bug.cgi?id=184304
+
+        Reviewed by Eric Carlson.
+
+        Allows covering RealtimeOutgoingVideoSourceMac code path handling native buffers produced by capture video sources.
+        ARGB buffer coverage is done through canvas capture streams.
+
+        * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
+        * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
+        (WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer):
+
+2018-04-04  Youenn Fablet  <youenn@apple.com>
+
+        Introduce a ThreadSafeRefCounted parameter to ensure being destroyed on the main thread
+        https://bugs.webkit.org/show_bug.cgi?id=183988
+
+        Reviewed by Darin Adler.
+
+        No change of behavior, TrackPrivate remains destroyed on the main thread.
+
+        * platform/graphics/TrackPrivateBase.h:
+        * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
+        (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
+        (WebCore::AudioTrackPrivateMediaStreamCocoa::render):
+
+2018-04-04  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Unreviewed. Fix the build with libsoup < 2.49.91 after r230251.
+
+        Stop using ResourceHandle in SoupNetworkSession.
+
+        * platform/network/soup/SoupNetworkSession.cpp:
+        (WebCore::SoupNetworkSession::SoupNetworkSession):
+        (WebCore::authenticateCallback): Deleted.
+        (WebCore::requestStartedCallback): Deleted.
+
+2018-04-03  Alex Christensen  <achristensen@webkit.org>
+
+        Remove unused libsoup ResourceHandle implementation
+        https://bugs.webkit.org/show_bug.cgi?id=184048
+
+        Reviewed by Michael Catanzaro.
+
+        This code is unused since r228901 so let's remove it!
+
+        * platform/network/ResourceHandle.h:
+        * platform/network/ResourceHandleInternal.h:
+        (WebCore::ResourceHandleInternal::ResourceHandleInternal):
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        (WebCore::ResourceHandle::~ResourceHandle):
+        (WebCore::ResourceHandleInternal::soupSession):
+        (WebCore::ResourceHandle::cancelledOrClientless):
+        (WebCore::ResourceHandle::ensureReadBuffer):
+        (WebCore::ResourceHandle::currentStreamPosition const):
+        (WebCore::ResourceHandle::platformContinueSynchronousDidReceiveResponse):
+        (WebCore::ResourceHandle::didStartRequest):
+        (WebCore::ResourceHandle::start):
+        (WebCore::ResourceHandle::releaseForDownload):
+        (WebCore::ResourceHandle::sendPendingRequest):
+        (WebCore::ResourceHandle::cancel):
+        (WebCore::ResourceHandle::shouldUseCredentialStorage):
+        (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge):
+        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+        (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
+        (WebCore::ResourceHandle::receivedCredential):
+        (WebCore::ResourceHandle::receivedCancellation):
+        (WebCore::ResourceHandle::receivedChallengeRejection):
+        (WebCore::ResourceHandle::platformSetDefersLoading):
+        (WebCore::sessionFromContext): Deleted.
+        (WebCore::ResourceHandle::create): Deleted.
+        (WebCore::ResourceHandle::ResourceHandle): Deleted.
+        (WebCore::isAuthenticationFailureStatusCode): Deleted.
+        (WebCore::tlsErrorsChangedCallback): Deleted.
+        (WebCore::gotHeadersCallback): Deleted.
+        (WebCore::applyAuthenticationToRequest): Deleted.
+        (WebCore::restartedCallback): Deleted.
+        (WebCore::shouldRedirect): Deleted.
+        (WebCore::shouldRedirectAsGET): Deleted.
+        (WebCore::continueAfterWillSendRequest): Deleted.
+        (WebCore::doRedirect): Deleted.
+        (WebCore::redirectSkipCallback): Deleted.
+        (WebCore::wroteBodyDataCallback): Deleted.
+        (WebCore::cleanupSoupRequestOperation): Deleted.
+        (WebCore::nextMultipartResponsePartCallback): Deleted.
+        (WebCore::sendRequestCallback): Deleted.
+        (WebCore::continueAfterDidReceiveResponse): Deleted.
+        (WebCore::startingCallback): Deleted.
+        (WebCore::networkEventCallback): Deleted.
+        (WebCore::createSoupMessageForHandleAndRequest): Deleted.
+        (WebCore::createSoupRequestAndMessageForHandle): Deleted.
+        (WebCore::ResourceHandle::timeoutFired): Deleted.
+        (WebCore::waitingToSendRequest): Deleted.
+        (WebCore::readCallback): Deleted.
+
+2018-04-03  Ross Kirsling  <ross.kirsling@sony.com>
+
+        Add missing WEBCORE_EXPORTs (for Windows shared library build)
+        https://bugs.webkit.org/show_bug.cgi?id=184279
+
+        Reviewed by Alex Christensen.
+
+        * dom/Element.h:
+        * dom/Node.h:
+        * editing/FrameSelection.h:
+        * html/DOMURL.h:
+        * html/HTMLFormElement.h:
+        * html/canvas/CanvasRenderingContext.h:
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/PlatformDisplay.h:
+        * platform/graphics/cairo/CairoOperations.h:
+        * platform/graphics/cairo/GraphicsContextImplCairo.h:
+        * platform/graphics/texmap/TextureMapperLayer.h:
+        * platform/network/HTTPHeaderMap.h:
+        * platform/network/ResourceRequestBase.h:
+        * platform/network/ResourceResponseBase.h:
+        * platform/network/curl/AuthenticationChallenge.h:
+        * platform/network/curl/CurlFormDataStream.h:
+        * platform/network/curl/CurlRequest.h:
+        * platform/network/curl/CurlSSLHandle.h:
+        * platform/network/curl/ResourceError.h:
+        * platform/network/curl/ResourceResponse.h:
+
 2018-04-03  Youenn Fablet  <youenn@apple.com>
 
         RealtimeOutgoingVideoSourceMac should pass a ObjCFrameBuffer buffer