Unreviewed, fix the iOS build
[WebKit-https.git] / Source / WebCore / ChangeLog
index 41d2c2a..4b3a1e3 100644 (file)
@@ -1,3 +1,922 @@
+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