ChangeLog-2019-06-05   [plain text]


2019-06-05  Antoine Quint  <graouts@apple.com>

        [Pointer Events] Fire pointerout and pointerleave events after firing pointercancel
        https://bugs.webkit.org/show_bug.cgi?id=198560

        Reviewed by Dean Jackson.

        The Pointer Events specification mandates that "pointerout" and "pointerleave" events must be dispatched
        immediately after dispatching a "pointercancel" event.

        Since we needed to determine the bubbling, cancelable and composed nature of those events in additional
        places, we now have static methods to determine this defined in PointerEvent.h such that both PointerEvent.cpp
        and PointerEventIOS.cpp may use them. This should guarantee consistency going forward.

        * dom/PointerEvent.cpp:
        (WebCore::PointerEvent::create):
        (WebCore::PointerEvent::PointerEvent):
        * dom/PointerEvent.h:
        * dom/ios/PointerEventIOS.cpp:
        (WebCore::pointerEventType):
        (WebCore::PointerEvent::create):
        (WebCore::PointerEvent::PointerEvent):
        (WebCore::phaseIsCancelable): Deleted.
        (WebCore::typeCanBubble): Deleted.
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::cancelPointer):

2019-06-05  Saam Barati  <sbarati@apple.com>

        [WHLSL] Implement loop expressions
        https://bugs.webkit.org/show_bug.cgi?id=195808
        <rdar://problem/50746309>

        Reviewed by Myles Maxfield.

        This patch makes continue/break break for "do/while/for" loops
        in WHLSL. Because of the way we emit code where every expression
        turns into a Metal statement, it's not convenient to emit native
        Metal loop constructs. Instead, we model break/continue as if
        we had goto.
        
        For example, this WHLSL program:
        ```
        for (INIT; COND; INC) {
            if (b)
                continue;
            if (b2)
                break;
        }
        ```
        would become something like:
        ```
        INIT;
        while (1) {
            if (!COND)
                break;
            if (b)
                goto increment;
            if (b2)
                goto exit;
        increment:
            INC;
        }
        exit:
        ```
        
        However, Metal doesn't have goto, so we model goto using a run-once
        loop and a variable indicating if we should break out early. This
        "break out early" variable is initially set to false. We "should
        break out early" when executing a WHLSL "break" statement. "continue"
        is modeled as breaking out of the run-once loop, but not touching the
        "break out early" variable. "break" is modeled as setting the "break
        out early" variable to true, followed by breaking out of the run-once loop.
        The above WHLSL will turn into this Metal:
        ```
        bool breakOutOfCurrentLoop = false;
        INIT;
        while (1) {
            if (!COND)
                break;
            do {
                if (b) {
                    // WHLSL 'continue'
                    break;
                }
                if (b2) {
                    // WHLSL 'break'
                    breakOutOfCurrentLoop = true;
                    break;
                }
            } while (0);
            if (breakOutOfCurrentLoop)
                break;
            INC;
        }
        ```
        
        This patch also found a bug with ForLoop where it held a Variant<VariableDeclarationsStatement, Expression>.
        This is invalid to do since we mutate the AST in place. This means some phase
        could replace VariableDeclarationsStatement with some other Statement, and
        we'd be breaking the C++ type system. So this patch migrates ForLoop to hold
        a statement instead. In general, AST nodes that point to other AST nodes
        should use broad types unless we know apriori that a certain type will
        never be replaced.

        Tests: webgpu/whlsl-do-while-loop-break.html
               webgpu/whlsl-do-while-loop-continue.html
               webgpu/whlsl-do-while-loop.html
               webgpu/whlsl-loops-break.html
               webgpu/whlsl-loops-continue.html
               webgpu/whlsl-loops.html
               webgpu/whlsl-nested-loop.html
               webgpu/whlsl-while-loop-break.html
               webgpu/whlsl-while-loop-continue.html

        * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
        (WebCore::WHLSL::AST::ForLoop::ForLoop):
        (WebCore::WHLSL::AST::ForLoop::initialization):
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
        (WebCore::WHLSL::ASTDumper::visit):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseForLoop):
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        (WebCore::WHLSL::Visitor::visit):

2019-06-05  Wenson Hsieh  <wenson_hsieh@apple.com>

        Upstream content mode support into open source from WebKitAdditions
        https://bugs.webkit.org/show_bug.cgi?id=198484
        <rdar://problem/51355671>

        Reviewed by Andy Estes.

        * Modules/modern-media-controls/media/media-controller.js:
        (MediaController.prototype.get layoutTraits):

        Adjust modern media controls code to use iOS-style controls on PLATFORM(IOS_FAMILY), instead of depending on the
        navigator's platform name or the presence of touch events.

        * page/Quirks.cpp:
        (WebCore::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForHost):
        (WebCore::shouldEmulateUndoRedoInHiddenEditableAreasForHost):
        * page/SettingsBase.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::mediaControlsScript):

2019-06-05  Saam Barati  <sbarati@apple.com>

        [WHLSL] checkDuplicateFunctions() should not be O(n^2)
        https://bugs.webkit.org/show_bug.cgi?id=198155
        <rdar://problem/51288811>

        Reviewed by Myles Maxfield.

        Originally, we filed this bug because we thought checkDuplicateFunctions()
        would take on the order of hundreds of milliseconds when using the
        full standard library. However, I was never able to reproduce that phase
        taking that long. I was seeing it take 3.5-4ms. Anyways, it makes sense
        to make this phase not be O(N^2), since the number of functions is a user
        controlled value. I am now seeing ~2.5ms to run this phase against the
        full standard library. On a microbenchmark I checked against, where there
        were 100,000 unique functions, this pass runs twice as fast as it used
        to, now taking 450ms instead of 900ms.

        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        (WebCore::WHLSL::AST::ArrayReferenceType::ArrayReferenceType):
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        (WebCore::WHLSL::AST::PointerType::PointerType):
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
        (WebCore::WHLSL::DuplicateFunctionKey::DuplicateFunctionKey):
        (WebCore::WHLSL::DuplicateFunctionKey::isEmptyValue const):
        (WebCore::WHLSL::DuplicateFunctionKey::isHashTableDeletedValue const):
        (WebCore::WHLSL::DuplicateFunctionKey::hash const):
        (WebCore::WHLSL::DuplicateFunctionKey::operator== const):
        (WebCore::WHLSL::DuplicateFunctionKey::Hash::hash):
        (WebCore::WHLSL::DuplicateFunctionKey::Hash::equal):
        (WebCore::WHLSL::DuplicateFunctionKey::Traits::isEmptyValue):
        (WebCore::WHLSL::checkDuplicateFunctions):

2019-06-05  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineLayout::placeInlineItems should not apply float contraint.
        https://bugs.webkit.org/show_bug.cgi?id=198565
        <rdar://problem/51440718>

        Reviewed by Antti Koivisto.

        This patch moves float constraint handling from placeInlineItems() to LineLayout::layout().
        When placeInlineItems() is called by the preferred width computation, intruding floats should be ignored
        since they don't constrain the "min/max lines".

        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::HorizontalConstraint::HorizontalConstraint):
        (WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::LineInput):
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
        (WebCore::Layout::constructLine): Deleted.

2019-06-05  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r246052.

        Caused 3 webgpu/ failures.

        Reverted changeset:

        "[WHLSL] Parsing and lexing the standard library is slow"
        https://bugs.webkit.org/show_bug.cgi?id=192890
        https://trac.webkit.org/changeset/246052

2019-06-05  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GStreamer] Crash in MediaPlayerPrivateGStreamerBase::ensureGstGLContext
        https://bugs.webkit.org/show_bug.cgi?id=198567

        Reviewed by Philippe Normand.

        MediaPlayerPrivateGStreamerBase::ensureGstGLContext is currently a guaranteed crash because
        it expects PlatformDisplay::sharedDisplayForCompositing() to return a PlatformDisplayLibWPE
        if compiled with USE(WPE_RENDERER), but PlatformDisplayLibWPE has lower precedence than
        PlatformDisplayX11 and PlatformDisplayWayland. When running our layout tests with
        run-webkit-tests --gtk, it's guaranteed to be a PlatformDisplayX11.

        I think Carlos was clearly expecting PlatformDisplayLibWPE, so I don't know what the ideal
        desired behavior is, but the crashes go away if we change the code to allow any type of
        PlatformDisplay. This should hopefully fix our bots, which are still exiting early.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):

2019-06-05  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move inline item height computation to a dedicated function
        https://bugs.webkit.org/show_bug.cgi?id=198550
        <rdar://problem/51424223>

        Reviewed by Antti Koivisto.

        The inlineItem height value is not available during preferred width computation (hence optional). 

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::UncommittedContent::add):
        (WebCore::Layout::inlineItemWidth):
        (WebCore::Layout::inlineItemHeight):
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendInlineContainerEnd):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendReplacedInlineBox):
        * layout/inlineformatting/InlineLine.h:

2019-06-01  Antoine Quint  <graouts@apple.com>

        [Pointer Events] Add support for chorded button interactions
        https://bugs.webkit.org/show_bug.cgi?id=198462

        Reviewed by Dean Jackson.

        Pointer events differ from mouse events in that pressing a button on a mouse and then pressing a second button
        would yield two "mousedown" events but a single "pointerdown" event, for the first time we're transitioning from
        a state where no button is pressed at all, and then a "pointermove" event to indicate an additional button has been
        pressed. This is what the Pointer Events specification calls "chorded button interactions".
        See https://w3c.github.io/pointerevents/#chorded-button-interactions for the full details.

        To implement this, we no longer directly call PointerEvent::create() from Element::dispatchMouseEvent() but instead
        call the new PointerCaptureController::pointerEventForMouseEvent() which implements the required logic to determine
        for "mousedown" and "mouseup" mouse events, if we're transitioning from or to a state where no button is pressed at
        all.

        While that basic change is pretty small, a wider change was required to report the correct value for a PointerEvents'
        "button" property which should return "-1" when there is no change in pressed button state compared to any previous
        pointer event.

        Up until now, MouseEvent.button was an "unsigned short", as specified up to and including DOM Level 2 Events. But the
        UI Events spec says that property is a "short", and PointerEvent is the only interface where a "-1" value is used. This
        required some changes throughout our codebase since we used a "-1" value to specify that no button was pressed when dealing
        with NSEvent input and going through PlatformMouseEvent and eventually MouseEvent. So now we change the various NoButton
        enum values to be "-2" and use that value, which is not going to be used for any mouse button, as the value reflected as
        "0" through MouseEvent.button, as specified by UI Events.

        Furthermore, we identified another issue: MouseEvent.buttons would always return 0 in DRT and WKTR. We rely upon that
        value in PointerCaptureController::pointerEventForMouseEvent() and so we had to make that work for the relevant WPT test,
        web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover.html, to pass and show a correct implementation
        of chorded button interactions. The details of the work required for this is in Tools/ChangeLog.

        * dom/Element.cpp:
        (WebCore::Element::dispatchMouseEvent):
        * dom/MouseEvent.cpp:
        (WebCore::MouseEvent::create):
        (WebCore::MouseEvent::MouseEvent):
        (WebCore::MouseEvent::initMouseEvent):
        (WebCore::MouseEvent::initMouseEventQuirk):
        * dom/MouseEvent.h:
        (WebCore::MouseEvent::button const):
        * dom/MouseEvent.idl:
        * dom/MouseEventInit.h:
        * dom/MouseEventInit.idl:
        * dom/PointerEvent.cpp:
        (WebCore::PointerEvent::create):
        (WebCore::PointerEvent::PointerEvent):
        * dom/PointerEvent.h:
        * loader/NavigationAction.h:
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::pointerEventForMouseEvent):
        * page/PointerCaptureController.h:
        * platform/PlatformMouseEvent.h:

2019-06-05  Michael Catanzaro  <mcatanzaro@igalia.com>

        REGRESSION(r245796): [WPE][GTK] Web process crash on startup
        https://bugs.webkit.org/show_bug.cgi?id=198485

        Reviewed by Chris Dumez.

        ResourceRequest's PageIdentifier may be unset, which causes coding to fail as
        ObjectIdentifiers are required to be valid (nonzero). We need to use Optional here.
        Previously, 0 was used to indicate unset page ID. This is clearer.

        * platform/network/soup/ResourceRequest.h:
        (WebCore::ResourceRequest::initiatingPageID const):
        (WebCore::ResourceRequest::decodeWithPlatformData):
        * platform/network/soup/ResourceRequestSoup.cpp:
        (WebCore::ResourceRequest::updateSoupRequest const):

2019-06-04  Ryosuke Niwa  <rniwa@webkit.org>

        iPadOS: Google calendars new event picker moves and flickers in landscape with software keyboard
        https://bugs.webkit.org/show_bug.cgi?id=198556

        Reviewed by Wenson Hsieh.

        Fix the issuse that it's really hard to create a new event using Google calendar on iPadOS with
        a software keyboard enabled because tapping on date brings up software keyboard and erratically
        shifts up/down the new event dialog/pane.

        Add a site specific quirk to pretend these input elements have inputmode=none for now.

        No new tests since this is a site specific quirk.

        * page/Quirks.cpp:
        (WebCore::Quirks::needsInputModeNoneImplicitly const):

2019-06-04  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Gmail text editing controls require two taps
        https://bugs.webkit.org/show_bug.cgi?id=198541
        <rdar://problem/51375055>

        Reviewed by Simon Fraser.

        When the animation completes we should also check if the newly visible content is also clickable and report it accordingly.
        When the animated content is not clickable, we need to proceed with click instead of stopping at hover.

        Test: fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove-no-clickable.html

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::isConsideredClickable):
        (WebCore::ContentChangeObserver::didFinishTransition):
        (WebCore::ContentChangeObserver::adjustObservedState):
        (WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
        (WebCore::ContentChangeObserver::StyleChangeScope::isConsideredClickable const): Deleted. -> Turn it into a static function so that didFinishTransition could call it as well.
        * page/ios/ContentChangeObserver.h:

2019-06-04  Michael Catanzaro  <mcatanzaro@igalia.com>

        Fix miscellaneous build warnings
        https://bugs.webkit.org/show_bug.cgi?id=198544

        Reviewed by Don Olmstead.

        Carefully silence -Wsign-compare warnings.

        * contentextensions/DFABytecodeCompiler.cpp:
        (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
        * inspector/InspectorCanvas.cpp:
        (WebCore::InspectorCanvas::indexForData):
        * xml/XSLStyleSheetLibxslt.cpp:
        (WebCore::XSLStyleSheet::parseString):

2019-06-04  Keith Rollin  <krollin@apple.com>

        Fix 64-bit vs 32-bit mismatch in ISOFairPlayStreamingPsshBox.cpp
        https://bugs.webkit.org/show_bug.cgi?id=198539
        <rdar://problem/51410358>

        Reviewed by Alex Christensen.

        Both ISOFairPlayStreamingKeyAssetIdBox and
        ISOFairPlayStreamingKeyContextBox have Vector<> data members. The
        parse() members of these classes call Vector<>::resize() on these
        members. In both cases, the type of the parameter passed is a
        uint64_t. However, resize() takes a size_t. On some platforms, size_t
        is a 32-bit value, leading to a compile-time type mismatch error. Fix
        this by changing the type of the value passed to parse() into a
        size_t.

        No new tests -- no new functionality.

        * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp:
        (WebCore::ISOFairPlayStreamingKeyAssetIdBox::parse):
        (WebCore::ISOFairPlayStreamingKeyContextBox::parse):

2019-06-04  Keith Rollin  <krollin@apple.com>

        Fix 64-bit vs 32-bit mismatch in TileController.cpp
        https://bugs.webkit.org/show_bug.cgi?id=198540
        <rdar://problem/51410851>

        Reviewed by Alex Christensen.

        TileController::blankPixelCountForTiles calculates its result as a
        uint64_t, but returns it as an unsigned. The former is a 64-bit value,
        while the latter can be a 32-bit value on some platforms. This
        mismatch can lead to a compile-time error. Fix this by explicitly
        casting the 64-bit value to an "unsigned".

        No new tests -- no new functionality.

        * platform/graphics/ca/TileController.cpp:
        (WebCore::TileController::blankPixelCountForTiles):

2019-06-04  Chris Dumez  <cdumez@apple.com>

        Crash when calling XMLHttpRequest.setRequestHeader() in a worker
        https://bugs.webkit.org/show_bug.cgi?id=198534
        <rdar://problem/51393912>

        Reviewed by Alex Christensen.

        Make sure the script execution context is a Document because calling document()
        to get the settings.

        Test: fast/workers/worker-xhr-setRequestHeader.html

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::setRequestHeader):

2019-06-04  Antti Koivisto  <antti@apple.com>

        Sticky positioning is jumpy in many overflow cases
        https://bugs.webkit.org/show_bug.cgi?id=198532
        <rdar://problem/51400532>

        Reviewed by Simon Fraser.

        Tests: scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-1.html
               scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-2.html
               scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-1.html
               scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-2.html
               scrollingcoordinator/ios/sticky-overflow-stacking-context-no-stick.html
               scrollingcoordinator/ios/sticky-overflow-stacking-context-stick.html

        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::notifyRelatedNodesAfterScrollPositionChange):
        (WebCore::ScrollingTree::notifyRelatedNodesRecursive):

        Simplify for relatedNodeScrollPositionDidChange removal.

        * page/scrolling/ScrollingTree.h:
        * page/scrolling/ScrollingTreeNode.cpp:
        (WebCore::ScrollingTreeNode::relatedNodeScrollPositionDidChange): Deleted.
        * page/scrolling/ScrollingTreeNode.h:
        * page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
        (WebCore::ScrollingTreeFixedNode::applyLayerPositions):
        * page/scrolling/cocoa/ScrollingTreePositionedNode.h:
        * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
        (WebCore::ScrollingTreePositionedNode::scrollOffsetSinceLastCommit const):

        Factor into a function.

        (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
        (WebCore::ScrollingTreePositionedNode::relatedNodeScrollPositionDidChange): Deleted.

        We can't bail out based on changed node as that makes us compute different positions based on what the change root is.
        Since all relatedNodeScrollPositionDidChange functions now always simply call applyLayerPositions we can remove the whole thing.

        * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
        (WebCore::ScrollingTreeStickyNode::applyLayerPositions):

        Implement taking into account that the containing scroller may not be our ancestor.

2019-06-04  Takashi Komori  <Takashi.Komori@sony.com>

        [WinCairo] Implement cpu and memory measuring functions.
        https://bugs.webkit.org/show_bug.cgi?id=198466

        Reviewed by Don Olmstead.

        Tests: inspector/memory/tracking.html
               inspector/cpu-profiler/tracking.html

        * PlatformWinCairo.cmake:
        * page/ResourceUsageThread.h:
        * page/win/ResourceUsageOverlayWin.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/win/TestRunnerWin.cpp.
        (WebCore::ResourceUsageOverlay::platformInitialize):
        (WebCore::ResourceUsageOverlay::platformDestroy):
        * page/win/ResourceUsageThreadWin.cpp: Added.
        (WebCore::ResourceUsageThread::platformSaveStateBeforeStarting):
        (WebCore::fileTimeToUint64):
        (WebCore::getCurrentCpuTime):
        (WebCore::cpuUsage):
        (WebCore::memoryUsage):
        (WebCore::ResourceUsageThread::platformCollectCPUData):
        (WebCore::ResourceUsageThread::platformCollectMemoryData):

2019-06-04  Antoine Quint  <graouts@apple.com>

        [Pointer Events] Only allow pointer capture if the pointer is in the active buttons state
        https://bugs.webkit.org/show_bug.cgi?id=198479

        Reviewed by Dean Jackson.

        The Pointer Events specification says that pointer capture can only be engaged provided the pointer is
        in the active buttons state, which means that it has dispatched a "pointerdown" event more recently than
        it has a "pointerup" event.

        This is tested by web-platform-tests/pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html.

        That test showed a few issues that this patch addresses. First, we would update the pointerIsPressed state to
        "true" only after a "pointerdown" event had been dispatched. This is incorrect since setPointerCapture() can,
        and is likely to, be called during handling of a "pointerdown" event. So we now call pointerEventWillBeDispatched()
        prior to dispatching a PointerEvent with a mouse type, which we only did previously for a PointerEvent with a
        touch or pen type. If the event is "pointerdown", we set "pointerIsPressed" to true on the CapturingData object
        matching the given pointer, and to false if the event is "pointerup".

        Finally, we must also ensure that "pointerIsPressed" is set to true when creating CapturingData for a PointerEvent
        with a touch or pen type since these types of pointer events implictly set capture.

        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::setPointerCapture):
        (WebCore::PointerCaptureController::dispatchEvent):
        (WebCore::PointerCaptureController::pointerEventWillBeDispatched):
        (WebCore::PointerCaptureController::pointerEventWasDispatched):

2019-06-04  Keith Rollin  <krollin@apple.com>

        Fix 32-bit/64-bit mismatch in PointerCaptureController::elementWasRemoved
        https://bugs.webkit.org/show_bug.cgi?id=198501
        <rdar://problem/51370464>

        Reviewed by Chris Dumez.

        keyAndValue.key is assigned to pointerId. KeyAndValue.key is a
        int64_t, whereas pointerId is a PointerID, aka int32_t. This mismatch
        is normally just a warning, but breaks builds where warnings are
        treated as errors.

        This issue is not encountered in most builds because the warning is
        disabled in the majority of build configurations. But there are some
        where the warning is not disabled, and so those builds break.

        Address this conversion error/warning by explicitly casting
        keyAndValue.key to a PointerID (and adding a debug check to make sure
        the cast is OK).

        No new tests -- no new functionality.

        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::elementWasRemoved):

2019-06-02  Antoine Quint  <graouts@apple.com>

        [Pointer Events] Expose navigator.maxTouchPoints
        https://bugs.webkit.org/show_bug.cgi?id=198468
        <rdar://problem/51273029>

        Reviewed by Chris Dumez.

        Expose the navigator.maxTouchPoints property when Pointer Events are enabled both at compile-time and run-time.
        We return a canned value for this on iOS touch-enabled devices that matches the number of simultaneous touches
        supported by the system, which is 5. In fact, iPad support more simultaneous touches, but it doesn't seem worthy
        to expose this level of granularity due to fingerprinting practices. In practice, what really matters is returning
        0, 1 or more than 1 for this value to identify multi-touch support.

        Test: js/dom/navigator-maxtouchpoints.html

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/NavigatorMaxTouchPoints.idl: Added.
        * page/Navigator.idl:
        * page/Navigator.h:
        (WebCore::Navigator::maxTouchPoints const):

2019-06-04  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Decouple float placement and line shrinking
        https://bugs.webkit.org/show_bug.cgi?id=198528
        <rdar://problem/51397638>

        Reviewed by Antti Koivisto.

        In LineLayout::placeInlineItems() float handling should be only about shrinking the current line, the actual
        float placement should happen later when we construct the the display boxes/runs. It enables the preferred width
        computation to call placeInlineItems() to gather line widths without accidentally mutating the layout context. 

        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::handleFloat const): Deleted.
        * layout/inlineformatting/InlineItem.h:

2019-06-04  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add hard line break handling to LineBreaker
        https://bugs.webkit.org/show_bug.cgi?id=198503
        <rdar://problem/51373482>

        Reviewed by Antti Koivisto.

        LineBreaker should simply return BreakingContext::Keep with the breaking opportunity of yes.

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContext):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::isAtBreakingOpportunity):
        * layout/inlineformatting/InlineLineBreaker.h:

2019-06-04  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Remove InlineItem::width
        https://bugs.webkit.org/show_bug.cgi?id=198502
        <rdar://problem/51371744>

        Reviewed by Antti Koivisto.

        InlineItems are supposd to work across subsequent layouts (and in preferred width computation as well) so they should
        not hold on to layout information (run width). This would not work with split runs either.

        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::UncommittedContent::runs):
        (WebCore::Layout::UncommittedContent::isEmpty const):
        (WebCore::Layout::UncommittedContent::size const):
        (WebCore::Layout::UncommittedContent::add):
        (WebCore::Layout::UncommittedContent::reset):
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
        (): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::commitInlineItemToLine const): Deleted.
        * layout/inlineformatting/InlineItem.h:
        (WebCore::Layout::InlineItem::style const):
        (): Deleted.
        (WebCore::Layout::InlineItem::setWidth): Deleted.
        (WebCore::Layout::InlineItem::width const): Deleted.

2019-06-04  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move run width measuring out of LineBreaker
        https://bugs.webkit.org/show_bug.cgi?id=198491
        <rdar://problem/51363554>

        Reviewed by Antti Koivisto.

        LineBreaker should not need to deal with measuring runs.
        This is also in preparation for removing InlineItem::width().

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::inlineItemWidth):
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContext):
        (WebCore::Layout::LineBreaker::LineBreaker): Deleted.
        (WebCore::Layout::LineBreaker::runWidth const): Deleted.
        (WebCore::Layout::LineBreaker::textWidth const): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:

2019-06-04  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Remove redundant InlineItem::width() calls.
        https://bugs.webkit.org/show_bug.cgi?id=198489
        <rdar://problem/51360390>

        Reviewed by Antti Koivisto.

        This is in preparation for removing InlineItem::width().

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::handleFloat const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::commitInlineItemToLine const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendInlineContainerEnd):
        * layout/inlineformatting/InlineLine.h:

2019-06-04  Antoine Quint  <graouts@apple.com>

        The "mouseenter" and "pointerenter" events are fired from the bottom up
        https://bugs.webkit.org/show_bug.cgi?id=198036
        <rdar://problem/50940350>

        Reviewed by Darin Adler.

        Ensure "mouseenter" and "pointerenter" events are dispatched from the bottom up to match the UI Events spec
        at https://w3c.github.io/uievents/#events-mouseevent-event-order. We also fix the issue where "pointerevent"
        and "pointerleave" events were dispatched as bubbling events on iOS which is not correct and was caught by the
        new iOS test.
 
        Tests: pointerevents/ios/enter-leave-order.html
               pointerevents/mouse/enter-leave-order.html

        * dom/ios/PointerEventIOS.cpp:
        (WebCore::typeCanBubble):
        (WebCore::PointerEvent::PointerEvent):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::updateMouseEventTargetNode):
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):

2019-06-04  Cathie Chen  <cathiechen@igalia.com>

        JS wrapper of target in ResizeObserverEntry/ResizeObserver shouldn't get collected ahead
        https://bugs.webkit.org/show_bug.cgi?id=197457

        Reviewed by Ryosuke Niwa.

        Add JSCustomMarkFunction to make sure JS wrappers wouldn't be collected when JSResizeObserverEntry live.

        For ResizeObserver, if targets are removed, it will get fired for the last time. We also need to keep these JS
        wrappers live. So add these targets to a GCReachableRef list once they're observed.

        Add element-leak.html to test the targets with `entry.target.myEntry = entry` could be released properly.

        Tests: resize-observer/element-leak.html
               resize-observer/resize-observer-entry-keeps-js-wrapper-of-target-alive.html
               resize-observer/resize-observer-keeps-js-wrapper-of-target-alive.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSResizeObserverEntryCustom.cpp: Added.
        (WebCore::JSResizeObserverEntry::visitAdditionalChildren):
        * page/ResizeObserver.cpp:
        (WebCore::ResizeObserver::observe):
        (WebCore::ResizeObserver::removeAllTargets):
        (WebCore::ResizeObserver::removeObservation):
        (WebCore::ResizeObserver::stop):
        * page/ResizeObserver.h:
        * page/ResizeObserverEntry.idl:

2019-06-03  Andy Estes  <aestes@apple.com>

        [Apple Pay] Disable script injection when canMakePayment APIs are called and return true
        https://bugs.webkit.org/show_bug.cgi?id=198448
        <rdar://problem/51323694>

        Reviewed by Alex Christensen.

        Previously, only an active Apple Pay session would disable script injection in restricted
        WKWebViews. However, this can result in websites rendering non-functional Apple Pay buttons
        due to the race between the hosting app calling -evaluateJavaScript:completionHandler: and
        the website calling canMakePayment APIs to determine whether to draw a button.

        This patch makes it so that, if a website calls ApplePaySession's canMakePayments or
        canMakePaymentsWithActiveCard, or PaymentRequest's canMakePayment, in a web view that has no
        injected scripts, and those calls return true, future script injections from the hosting app
        will be blocked.

        Also, this patch removes the restrictions on the openPaymentSetup, supportsVersion, and
        validatedPaymentNetwork APIs, since those APIs do not reveal transaction information and are
        not used to determine whether to draw buttons.

        Added new API tests.

        * Modules/applepay/PaymentCoordinator.cpp:
        (WebCore::PaymentCoordinator::supportsVersion const):
        (WebCore::PaymentCoordinator::canMakePayments):
        (WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
        (WebCore::PaymentCoordinator::openPaymentSetup):
        (WebCore::PaymentCoordinator::beginPaymentSession):
        (WebCore::PaymentCoordinator::validatedPaymentNetwork const):
        (WebCore::PaymentCoordinator::setApplePayIsActiveIfAllowed const):
        (WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
        (WebCore::PaymentCoordinator::shouldAllowApplePay const): Deleted.
        * Modules/applepay/PaymentCoordinator.h:
        * dom/Document.cpp:
        (WebCore::Document::isApplePayActive const):
        (WebCore::Document::setApplePayIsActive):
        (WebCore::Document::hasStartedApplePaySession const): Deleted.
        (WebCore::Document::setHasStartedApplePaySession): Deleted.
        * dom/Document.h:
        * testing/Internals.cpp:
        (WebCore::Internals::setApplePayIsActive):
        (WebCore::Internals::setHasStartedApplePaySession): Deleted.
        * testing/Internals.h:
        * testing/Internals.idl:

2019-06-03  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Parsing and lexing the standard library is slow
        https://bugs.webkit.org/show_bug.cgi?id=192890
        <rdar://problem/50746335>

        Reviewed by Myles Maxfield.

        The main idea is to avoid backtracking by instead peeking at the next token (and occasionally at the one after that).
        This implies a few things:
        - We can replace the stack of tokens by a trivial ring buffer of size 2 (holding the next token and the one after, or WTF::nullopt if we are at the end of the file).
        - We now have "completeFooExpression" functions, to avoid having to reparse the prefix of some expression, if we find half-way through what it is.

        I also fixed the following parser bug:
        - https://bugs.webkit.org/show_bug.cgi?id=198305 [WHLSL] Multiple variables with initializers in a declaration statement crashes the compiler
            which was due to a mistake I made in the grammar

        Finally I added two new macros: CONSUME_TYPE and PARSE to eliminate about 500 lines of error propagation boilerplate.

        There are still lots of ways of improving the parser and lexer, such as:
        - finishing the conversion of tokens in the lexer, not bothering with allocating string views
        - make two special tokens Invalid and EOF, to remove the overhead of Optional
        - make peekTypes and consumeTypes use templates to avoid constructing a Vector and calling find on it.
        - Turn the entire lexer into a proper automata, not going through the same characters again and again (this is certainly the largest win by far)
        - Remove the last few pieces of backtracking from the parser.

        The current patch is already enough to make parsing the full standard library (something like 85k lines) approximately 260ms.
        This is still longer than I would like, but nowhere near the bottleneck any longer because of some other parts of the compiler.

        * Modules/webgpu/WHLSL/WHLSLLexer.h:
        (WebCore::WHLSL::Lexer::Lexer):
        (WebCore::WHLSL::Lexer::consumeToken):
        (WebCore::WHLSL::Lexer::peek):
        (WebCore::WHLSL::Lexer::peekFurther):
        (WebCore::WHLSL::Lexer::state const):
        (WebCore::WHLSL::Lexer::setState):
        (WebCore::WHLSL::Lexer::unconsumeToken): Deleted.
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parse):
        (WebCore::WHLSL::Parser::peek):
        (WebCore::WHLSL::Parser::peekTypes):
        (WebCore::WHLSL::Parser::tryType):
        (WebCore::WHLSL::Parser::tryTypes):
        (WebCore::WHLSL::Parser::consumeTypes):
        (WebCore::WHLSL::Parser::parseConstantExpression):
        (WebCore::WHLSL::Parser::parseTypeArgument):
        (WebCore::WHLSL::Parser::parseTypeArguments):
        (WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated):
        (WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated):
        (WebCore::WHLSL::Parser::parseType):
        (WebCore::WHLSL::Parser::parseTypeDefinition):
        (WebCore::WHLSL::Parser::parseResourceSemantic):
        (WebCore::WHLSL::Parser::parseSpecializationConstantSemantic):
        (WebCore::WHLSL::Parser::parseStageInOutSemantic):
        (WebCore::WHLSL::Parser::parseSemantic):
        (WebCore::WHLSL::Parser::parseQualifiers):
        (WebCore::WHLSL::Parser::parseStructureElement):
        (WebCore::WHLSL::Parser::parseStructureDefinition):
        (WebCore::WHLSL::Parser::parseEnumerationDefinition):
        (WebCore::WHLSL::Parser::parseEnumerationMember):
        (WebCore::WHLSL::Parser::parseNativeTypeDeclaration):
        (WebCore::WHLSL::Parser::parseNumThreadsFunctionAttribute):
        (WebCore::WHLSL::Parser::parseAttributeBlock):
        (WebCore::WHLSL::Parser::parseParameter):
        (WebCore::WHLSL::Parser::parseParameters):
        (WebCore::WHLSL::Parser::parseFunctionDefinition):
        (WebCore::WHLSL::Parser::parseComputeFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseVertexFragmentFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseNativeFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseBlock):
        (WebCore::WHLSL::Parser::parseBlockBody):
        (WebCore::WHLSL::Parser::parseIfStatement):
        (WebCore::WHLSL::Parser::parseSwitchStatement):
        (WebCore::WHLSL::Parser::parseSwitchCase):
        (WebCore::WHLSL::Parser::parseForLoop):
        (WebCore::WHLSL::Parser::parseWhileLoop):
        (WebCore::WHLSL::Parser::parseDoWhileLoop):
        (WebCore::WHLSL::Parser::parseVariableDeclaration):
        (WebCore::WHLSL::Parser::parseVariableDeclarations):
        (WebCore::WHLSL::Parser::parseStatement):
        (WebCore::WHLSL::Parser::parseEffectfulExpression):
        (WebCore::WHLSL::Parser::parseEffectfulAssignment):
        (WebCore::WHLSL::Parser::parseExpression):
        (WebCore::WHLSL::Parser::parseTernaryConditional):
        (WebCore::WHLSL::Parser::completeTernaryConditional):
        (WebCore::WHLSL::Parser::parseAssignment):
        (WebCore::WHLSL::Parser::completeAssignment):
        (WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
        (WebCore::WHLSL::Parser::parsePossibleLogicalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleLogicalBinaryOperation):
        (WebCore::WHLSL::Parser::parsePossibleRelationalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleRelationalBinaryOperation):
        (WebCore::WHLSL::Parser::parsePossibleShift):
        (WebCore::WHLSL::Parser::completePossibleShift):
        (WebCore::WHLSL::Parser::parsePossibleAdd):
        (WebCore::WHLSL::Parser::completePossibleAdd):
        (WebCore::WHLSL::Parser::parsePossibleMultiply):
        (WebCore::WHLSL::Parser::completePossibleMultiply):
        (WebCore::WHLSL::Parser::parsePossiblePrefix):
        (WebCore::WHLSL::Parser::parsePossibleSuffix):
        (WebCore::WHLSL::Parser::parseCallExpression):
        (WebCore::WHLSL::Parser::parseTerm):
        (WebCore::WHLSL::Parser::parseAddressSpaceType): Deleted.
        (WebCore::WHLSL::Parser::parseNonAddressSpaceType): Deleted.
        (WebCore::WHLSL::Parser::parseEntryPointFunctionDeclaration): Deleted.
        (WebCore::WHLSL::Parser::parseEffectfulPrefix): Deleted.
        (WebCore::WHLSL::Parser::parseEffectfulSuffix): Deleted.
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        (WebCore::WHLSL::Parser::Error::dump const):

2019-06-03  Youenn Fablet  <youenn@apple.com>

        Allow resizing of camera video feeds to very small resolutions
        https://bugs.webkit.org/show_bug.cgi?id=198421

        Reviewed by Alex Christensen.

        Before the patch, the minimum capture resolution was set to 120.
        Since this is a bit arbitrary and there are some use cases for lower resolution,
        We now allow down to 1x1 resolution.

        Test: fast/mediastream/getUserMedia-video-rescaling.html

        * platform/mediastream/RealtimeVideoSource.cpp:
        (WebCore::RealtimeVideoSource::updateCapabilities):
        Allow 1x1 when computing min/max resolutions.
        (WebCore::RealtimeVideoSource::bestSupportedSizeAndFrameRate):
        In case width and height are provided, we pick the closest preset that matches and resize accordingly.
        If width or height is provided, we pick the closest preset tat matches and applies its aspect ratio.

2019-06-03  Wenson Hsieh  <wenson_hsieh@apple.com>

        Implement an internal switch to turn idempotent text autosizing and viewport rules off
        https://bugs.webkit.org/show_bug.cgi?id=198460
        <rdar://problem/51324526>

        Reviewed by Tim Horton.

        Add a new WebCore setting for viewport shrink-to-fit-content heuristics; additionally, tweak the existing
        idempotent text autosizing setting to default to false (this is overridden by preferences at the WebKit layer).

        * page/Settings.yaml:

2019-06-03  Rob Buis  <rbuis@igalia.com>

        Implement imagesrcset and imagesizes attributes on link rel=preload
        https://bugs.webkit.org/show_bug.cgi?id=192950

        Reviewed by Youenn Fablet.

        Implement imagesrcset and imagesizes attributes for both Link header
        and link element.

        Tests: imported/w3c/web-platform-tests/preload/dynamic-adding-preload-imagesrcset.html
               imported/w3c/web-platform-tests/preload/link-header-preload-imagesrcset.html
               imported/w3c/web-platform-tests/preload/link-header-preload-nonce.html
               imported/w3c/web-platform-tests/preload/link-header-preload.html
               imported/w3c/web-platform-tests/preload/onload-event.html
               imported/w3c/web-platform-tests/preload/preload-with-type.html

        * html/HTMLAttributeNames.in:
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):
        * html/HTMLLinkElement.idl:
        * loader/LinkHeader.cpp:
        (WebCore::paramterNameFromString):
        (WebCore::LinkHeader::setValue):
        (WebCore::LinkHeader::LinkHeader):
        * loader/LinkHeader.h:
        (WebCore::LinkHeader::imageSrcSet const):
        (WebCore::LinkHeader::imageSizes const):
        (WebCore::LinkHeader::isViewportDependent const):
        * loader/LinkLoader.cpp:
        (WebCore::LinkLoader::loadLinksFromHeader):
        (WebCore::LinkLoader::preloadIfNeeded):
        (WebCore::LinkLoader::loadLink):
        * loader/LinkLoader.h:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::linkPreloadResponsiveImagesEnabled const):
        (WebCore::RuntimeEnabledFeatures::setLinkPreloadResponsiveImagesEnabled):

2019-06-02  Andy Estes  <aestes@apple.com>

        Memory-cached main resources continue to load after the client decides a content policy of PolicyAction::Download
        https://bugs.webkit.org/show_bug.cgi?id=198469
        <rdar://problem/50512713>

        Reviewed by Youenn Fablet.

        When a document is loaded from the memory cache it does not have a main resource loader, but
        DocumentLoader::continueAfterContentPolicy relies on being able to call
        ResourceLoader::didFail on the main resource loader to cancel the provisional navigation
        when the client decides a content policy of PolicyAction::Download.

        This means that memory-cached main resources continue to load even after WebKit has started
        to download the main resource. The expected behavior is for the provisional navigation to
        fail once the download starts, like what happens when there is a main resource loader.

        This patch teaches DocumentLoader::continueAfterContentPolicy to call
        stopLoadingForPolicyChange() in the case of a null main resource loader. This will dispatch
        didFailProvisionalNavigation and remove the DocumentLoader as a client of its
        CachedRawResource to prevent it from delivering any cached data.

        Added a new API test.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::continueAfterContentPolicy):

2019-06-03  Timothy Hatcher  <timothy@apple.com>

        Tweak the text and underline color for data detected text.
        https://bugs.webkit.org/show_bug.cgi?id=198487
        rdar://problem/50667125

        Reviewed by Devin Rousso.

        Tests: Color.RGBToHSL API tests

        * editing/cocoa/DataDetection.mm:
        (WebCore::DataDetection::detectContentInRange): Use currentcolor so semantic text colors work.
        Force the lightness of the underline color to the middle, and multiply the alpha by 38%,
        so the color will appear on light and dark backgrounds, since only one color can be specified.
        * platform/graphics/Color.cpp:
        (WebCore::Color::getHSL const): Return hue in [0...6) range to easily round-trip with makeRGBAFromHSLA().

2019-06-03  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Add WebKit::JavaScriptCore target
        https://bugs.webkit.org/show_bug.cgi?id=198403

        Reviewed by Konstantin Tokarev.

        Use the WebKit::JavaScriptCore target.

        * CMakeLists.txt:

2019-06-03  Zan Dobersek  <zdobersek@igalia.com>

        [Nicosia] Disable async scrolling until implemented
        https://bugs.webkit.org/show_bug.cgi?id=198476
        <rdar://problem/51351478>

        Unreviewed follow-up to r246033.

        * page/scrolling/ScrollingCoordinator.cpp:
        Expand the PLATFORM(IOS) guard to IOS_FAMILY.

2019-06-03  Darin Adler  <darin@apple.com>

        Finish cleanup of String::number for floating point
        https://bugs.webkit.org/show_bug.cgi?id=198471

        Reviewed by Yusuke Suzuki.

        * css/CSSCursorImageValue.cpp:
        (WebCore::CSSCursorImageValue::customCSSText const): Use makeString instead
        of StringBuilder since it is more terse and possibly more efficient as well.
        * css/DOMMatrixReadOnly.cpp:
        (WebCore::DOMMatrixReadOnly::toString const): Ditto.
        * css/WebKitCSSMatrix.cpp:
        (WebCore::WebKitCSSMatrix::toString const): Ditto.

        * html/parser/HTMLParserIdioms.cpp:
        (WebCore::serializeForNumberType): Use String::number instead of
        String::numberToStringECMAScript since that is now the default.
        * html/shadow/MediaControlElementTypes.cpp:
        (WebCore::MediaControlVolumeSliderElement::setVolume): Ditto.
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlTimelineElement::setPosition): Ditto.
        * platform/Decimal.cpp:
        (WebCore::Decimal::fromDouble): Ditto.

        * rendering/RenderListMarker.cpp:
        (WebCore::toRoman): Return a String instead of taking a StringBuilder argument.
        Use LetterCase enum instead of bool for the uppercase vs. lowercase argument, to
        be less mysterious at call sites. Use unsigned for string lengths since that's
        what WTF::String uses.
        (WebCore::toAlphabeticOrNumeric): Ditto. Also updated since SequenceType is now
        an enum class.
        (WebCore::toSymbolic): Use String::createUninitialized instead of StringBuilder.
        Return a String instead of taking a StringBuilder argument. Straighten out the
        algorithm so it's easier to understand.
        (WebCore::toAlphabetic): Updated since SequenceType is now an enum class.
        (WebCore::toNumeric): Ditto.
        (WebCore::toHebrew): Return a String instead of taking a StringBuilder argument.
        Use unsigned for string lengths since that's what WTF::String uses.
        (WebCore::toArmenianUnder10000): Use unsigned and the LetterCase enum class.
        (WebCore::toArmenian): Return a String instead of taking a StringBuilder argument.
        Also use unsigned for string lengths since that's what WTF::String uses.
        (WebCore::toGeorgian): Ditto.
        (WebCore::toCJKIdeographic): Ditto.
        (WebCore::listMarkerSuffix): Tweaked a comment.
        (WebCore::listMarkerText): Use String return values instead of StringBuilder.
        (WebCore::RenderListMarker::paint): Use String::createUninitialized instead of
        StringBuilder since it's a bit more efficient. Use makeString instead of turning
        single characters into strings since that's more efficient.

        * svg/SVGPathUtilities.cpp:
        (WebCore::buildStringFromPath): Use appendNumber instead of appendShortestFormNumber
        since that is now the default.

2019-06-03  Zan Dobersek  <zdobersek@igalia.com>

        [Nicosia] Disable async scrolling until implemented
        https://bugs.webkit.org/show_bug.cgi?id=198476

        Reviewed by Antti Koivisto.

        Build ScrollingCoordinator::create() method on iOS or whenever
        ASYNC_SCROLLING is not enabled.

        Additionally, the USE(COORDINATED_GRAPHICS) build guards are removed
        throughout the async scrolling classes as they aren't required now
        and shouldn't be in the future.

        * page/scrolling/ScrollingCoordinator.cpp:
        * page/scrolling/ScrollingStateFixedNode.cpp:
        * page/scrolling/ScrollingStateFixedNode.h:
        * page/scrolling/ScrollingStateFrameHostingNode.cpp:
        * page/scrolling/ScrollingStateFrameHostingNode.h:
        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
        * page/scrolling/ScrollingStateFrameScrollingNode.h:
        * page/scrolling/ScrollingStateNode.cpp:
        * page/scrolling/ScrollingStateNode.h:
        * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
        * page/scrolling/ScrollingStateOverflowScrollingNode.h:
        * page/scrolling/ScrollingStatePositionedNode.cpp:
        * page/scrolling/ScrollingStatePositionedNode.h:
        * page/scrolling/ScrollingStateScrollingNode.cpp:
        * page/scrolling/ScrollingStateScrollingNode.h:
        * page/scrolling/ScrollingStateStickyNode.cpp:
        * page/scrolling/ScrollingStateStickyNode.h:
        * page/scrolling/ScrollingStateTree.cpp:
        * page/scrolling/ScrollingStateTree.h:

2019-06-03  Antoine Quint  <graouts@apple.com>

        [Pointer Events] Check that capturing data managed by the PointerCaptureController gets cleared upon navigation
        https://bugs.webkit.org/show_bug.cgi?id=198191

        Unreviewed post-commit review feedback suggested by Darin Adler.

        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::reset):

2019-06-01  Simon Fraser  <simon.fraser@apple.com>

        [Async overflow scroll] Flashing content when scrolling async overflow with a negative z-index child
        https://bugs.webkit.org/show_bug.cgi?id=198458

        Reviewed by Dean Jackson.

        Set the GraphicsLayerPaintOverflowContents phase on the foreground layer in a composited overflow scroller,
        which prevents clipping to the visible region, fixing scrolling flashes.

        Tested by compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updatePaintingPhases):

2019-06-01  Simon Fraser  <simon.fraser@apple.com>

        Async overflow scroll on iOS paints slowly if it has a negative z-index child
        https://bugs.webkit.org/show_bug.cgi?id=196508
        rdar://problem/49532709

        Reviewed by Dean Jackson.
        
        If a RenderLayerBacking had a foreground layer and a scrolled contents layer, every geometry
        update would change the size and offsetFromRenderer of the foreground layer between two
        states, triggering repaint.

        Fix by updating the fore- and background-layers last (nothing elese has dependencies
        on their geometry), and using GraphicsLayer::DontSetNeedsDisplay as we do for the
        scrolled contents layer.
        
        The test also revealed a bug where the shapeMaskLayer would get incorrect geometry when scrollbars
        were visible, because it would be squished by setting the wrong bounds, so fix that.

        Test: compositing/repaint/scroller-with-foreground-layer-repaints.html

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::updateClippingStrategy):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateGeometry):

2019-06-01  Simon Fraser  <simon.fraser@apple.com>

        Non-composited negative z-order children should not trigger creation of a foreground layer
        https://bugs.webkit.org/show_bug.cgi?id=198455

        Reviewed by Sam Weinig.

        The existing code triggered creation of a foreground layer on RenderLayerBacking when
        the negative z-order list was non-empty. This isn't necessary; we can paint the negative
        z-order children just fine.

        We only need a foreground layer when the negative z-order layers are composited or
        have composited descendants.

        This will reduce backing store memory use in some cases.

        Test: compositing/layer-creation/composited-negative-z-subtree.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
        (WebCore::RenderLayerCompositor::needsContentsCompositingLayer const):

2019-06-01  Andy Estes  <aestes@apple.com>

        [Apple Pay] Every PaymentCoordinator client should explicitly decide whether they support unrestricted Apple Pay
        https://bugs.webkit.org/show_bug.cgi?id=198449
        <rdar://problem/51038583>

        Reviewed by Wenson Hsieh.

        Rather than having a default return value of true for
        PaymentCoordinatorClient::supportsUnrestrictedApplePay, make it pure virtual to force each
        subclass to implement an override and explicitly choose an appropriate return value.

        The only two clients that did not explicitly override were the empty client and
        WebKitLegacy's client, and Apple Pay was never enabled in those clients, so there is no
        change in behavior.

        * Modules/applepay/PaymentCoordinatorClient.h:
        (WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
        (WebCore::PaymentCoordinatorClient::supportsUnrestrictedApplePay const): Deleted.
        * loader/EmptyClients.cpp:

2019-05-31  Youenn Fablet  <youenn@apple.com>

        Add an option to mute audio capture automatically when page is not visible
        https://bugs.webkit.org/show_bug.cgi?id=198307

        Reviewed by Eric Carlson.

        Reuse video capture mechanism for audio capture.
        In case document gets in the background, interrupt the audio track if the audio factory requires it.
        CoreAudioCaptureSourceIOS requires the audio source be interrupted if the app has not the right background mode.
        It also allows interrupting the audio capture based on a runtime flag.

        Add a runtime flag to control this.
        Internals API is used to set it for test purposes, off by default.
        For regular cases, the runtime flag is set through web preferences.

        Test: platform/ios/mediastream/audio-muted-in-background-tab.html

        * dom/Document.cpp:
        (WebCore::Document::notifyMediaCaptureOfVisibilityChanged):
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::interruptAudioOnPageVisibilityChangeEnabled const):
        (WebCore::RuntimeEnabledFeatures::setInterruptAudioOnPageVisibilityChangeEnabled):
        * platform/mediastream/RealtimeMediaSourceCenter.cpp:
        (WebCore::RealtimeMediaSourceCenter::RealtimeMediaSourceCenter):
        (WebCore::RealtimeMediaSourceCenter::initializeShouldInterruptAudioOnPageVisibilityChange):
        (WebCore::RealtimeMediaSourceCenter::setCapturePageState):
        (WebCore::RealtimeMediaSourceCenter::visibilityDidChange):
        * platform/mediastream/RealtimeMediaSourceCenter.h:
        (WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange):
        * platform/mediastream/RealtimeMediaSourceFactory.h:
        (WebCore::AudioCaptureFactory::setAudioCapturePageState):
        (WebCore::VideoCaptureFactory::setVideoCapturePageState):
        * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h:
        * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
        (WebCore::CoreAudioCaptureSourceFactory::setAudioCapturePageState):
        (WebCore::CoreAudioCaptureSourceFactoryIOS::shouldInterruptAudioOnPageVisibilityChange):
        * platform/mediastream/mac/CoreAudioCaptureSource.h:
        * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
        (WebCore::RealtimeMediaSourceCenter::initializeShouldInterruptAudioOnPageVisibilityChange):
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::setShouldInterruptAudioOnPageVisibilityChange):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-05-31  Geoffrey Garen  <ggaren@apple.com>

        Some WeakPtr typedef cleanup
        https://bugs.webkit.org/show_bug.cgi?id=198431

        Reviewed by Chris Dumez.

        Use "using" instead of "typedef", since using is preferred in C++ for
        better compatibility with templates.

        * Modules/indexeddb/shared/InProcessIDBServer.h:
        * html/HTMLMediaElement.h:
        * platform/ScrollView.h:

2019-05-31  Andres Gonzalez  <andresg_22@apple.com>

        Inserting a newline in contenteditable causes two characters to be added instead of one
        https://bugs.webkit.org/show_bug.cgi?id=197894
        <rdar://problems/49700998>

        Reviewed by Chris Fleizach.

        No new test is necessary since this is a comment change.

        Removed radar reference from code.

        * editing/Editing.cpp:
        (WebCore::visiblePositionForIndexUsingCharacterIterator):

2019-05-31  Tim Horton  <timothy_horton@apple.com>

        Optionally respect device management restrictions when loading from the network
        https://bugs.webkit.org/show_bug.cgi?id=198318
        <rdar://problem/44263806>

        Reviewed by Alex Christensen.

        * en.lproj/Localizable.strings:

2019-05-31  Simon Fraser  <simon.fraser@apple.com>

        Move code that sets compositing paint phases into a single function
        https://bugs.webkit.org/show_bug.cgi?id=198420

        Reviewed by Zalan Bujtas.

        To compute the correct paint phases for the various GraphicsLayers in a RenderLayerBacking,
        we have to know which set of layers we've created (m_scrollContainerLayer, m_foregroundLayer etc).
        So move the code that sets phases into a single function which is called when that
        set of layers changes.

        The test dumps paint phases for a stacking-context-composited scroller with a negative z-index child.

        Also have GraphicsLayer::setPaintingPhase() trigger the necessary repaint when the paint phase changes.

        Test: compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases.html

        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::setPaintingPhase):
        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::setPaintingPhase): Deleted.
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateConfiguration):
        (WebCore::RenderLayerBacking::updateForegroundLayer):
        (WebCore::RenderLayerBacking::updateBackgroundLayer):
        (WebCore::RenderLayerBacking::updateMaskingLayer):
        (WebCore::RenderLayerBacking::updateScrollingLayers):
        (WebCore::RenderLayerBacking::updatePaintingPhases):
        (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer const): Deleted.
        * rendering/RenderLayerBacking.h:

2019-05-31  Saam Barati  <sbarati@apple.com>

        [WHLSL] Make sure we properly emit code for "&*x"
        https://bugs.webkit.org/show_bug.cgi?id=198198

        Reviewed by Myles C. Maxfield.

        I ran into this when trying to test zero-filling code, so let's just fix it.
        The issue is that the property resolver ends up emitting code that looks like
        "&*x". The semantics of this are such that it should result in just x.
        However, we emitted Metal code in such a way where we'd end up with a pointer
        to a temporary value. To fix this, DereferenceExpression will emit code that results
        in a reference type. Then, MakePointerExpression will correctly return the
        pointer backing that reference type.
        
        Because of this, we also no longer need to pattern match the lhs of assignment
        expressions since we will now be assigning to a reference type.

        Test: webgpu/whlsl-store-to-property-updates-properly.html

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):

2019-05-31  Simon Fraser  <simon.fraser@apple.com>

        [Async overflow scrolling] Flashes of missing layer backing store when scrolling an overflow
        https://bugs.webkit.org/show_bug.cgi?id=198363

        Reviewed by Tim Horton.

        When the contents of an overflow:scroll did not use a tiled backing layer, GraphicsLayerCA::adjustCoverageRect()
        would do no coverage rect expansion for scrolling, which meant that backing store attachment for
        descendant layers would just use the visible rect from their scrolling ancestor which made it easy
        to scroll into view a layer whose backing store was not yet attached.
        
        Since this only affects non-tiled layers, re-use the generic TileController::adjustTileCoverageRect()
        code by moving it down to GraphicsLayer, and call it for a scrolled contents layer which does not
        have tiled backing.
        
        Tested by fast/scrolling/ios/reconcile-layer-position-recursive.html

        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::adjustCoverageRectForMovement):
        * platform/graphics/GraphicsLayer.h:
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::adjustCoverageRect const):
        * platform/graphics/ca/TileController.cpp:
        (WebCore::TileController::adjustTileCoverageRect):

2019-05-31  Geoffrey Garen  <ggaren@apple.com>

        Some WeakPtr cleanup
        https://bugs.webkit.org/show_bug.cgi?id=198390

        Reviewed by Chris Dumez.

        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
        (WebCore::storageQuotaManagerGetter): Dereference the weak pointer
        directly instead of using a weak pointer to guard a raw pointer. It's
        safer and more idiomatic to use weak pointers directly.

        * Modules/indexeddb/shared/InProcessIDBServer.h: Use our base clase
        weakPtrFactory() definition instead of writing our own. Declare
        WeakValueType so we can dereference the weak pointer we create (above).

2019-05-31  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] InlineFormattingContext::LineLayout::processInlineItemsForLine should create and destroy Line.
        https://bugs.webkit.org/show_bug.cgi?id=198419
        <rdar://problem/51300837>

        Reviewed by Antti Koivisto.

        This is in preparation for using "createInlineRunsForLine" logic when computing preferred width.
        1. Line object is now constructed and destroyed in processInlineItemsForLine (caller does not need to know about Line).
        2. processInlineItemsForLine returns a Line::Content instance.

        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::LineInput):
        (WebCore::Layout::constructLine):
        (WebCore::Layout::InlineFormattingContext::LineLayout::processInlineItemsForLine const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::createLine const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::createInlineRunsForLine const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::processInlineRuns const): Deleted.

2019-05-31  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Add WebKit::WTF target
        https://bugs.webkit.org/show_bug.cgi?id=198400

        Reviewed by Konstantin Tokarev.

        Use the WebKit::WTF target.

        * PlatformWin.cmake:

2019-05-31  Joonghun Park  <jh718.park@samsung.com>

        Always min-width should win over max-width.
        https://bugs.webkit.org/show_bug.cgi?id=198032

        Reviewed by Darin Adler.

        In the spec, https://www.w3.org/TR/CSS21/visudet.html#min-max-widths,
        the following algorithm describes how the two properties influence
        the used value of the 'width' property.

        1. The tentative used width is calculated (without 'min-width' and 'max-width')
        following the rules under "Calculating widths and margins" above.
        2. If the tentative used width is greater than 'max-width',
        the rules above are applied again, but this time using the computed value of 'max-width'
        as the computed value for 'width'.
        3. If the resulting width is smaller than 'min-width', the rules above are applied again,
        but this time using the value of 'min-width' as the computed value for 'width'.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::computePreferredLogicalWidths):

2019-05-31  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r245946.

        Breaks the watchOS build.

        Reverted changeset:

        "Add an option to mute audio capture automatically when page
        is not visible"
        https://bugs.webkit.org/show_bug.cgi?id=198307
        https://trac.webkit.org/changeset/245946

2019-05-31  Zalan Bujtas  <zalan@apple.com>

        [LFC[IFC] Do not reuse the same Line object.
        https://bugs.webkit.org/show_bug.cgi?id=198366
        <rdar://problem/51250279>

        Reviewed by Antti Koivisto.

        This is in preparation for constructing Line inside createInlineRunsForLine and return Line::Content. 

        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::createLine const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::processInlineRuns const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::initializeLine const): Deleted.
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::m_lineLogicalWidth):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::moveLogicalLeft):
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):
        (WebCore::Layout::Line::reset): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::hasContent const):

2019-05-31  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move final runs to a dedicated class (Line::Content)
        https://bugs.webkit.org/show_bug.cgi?id=198360
        <rdar://problem/51247717>

        Reviewed by Antti Koivisto.

        It decouples the line and the final line content. So when we process the runs after closing the line,
        LineContent should be able to answer all the content and geometry related questions.
        This is also in preparation for
        transfering the ownership of the line content when calling Line::close(). 

        * WebCore.xcodeproj/project.pbxproj:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::processInlineRuns const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Content::isVisuallyEmpty const):
        (WebCore::Layout::Line::Content::Run::Run):
        (WebCore::Layout::Line::reset):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::moveLogicalLeft):
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):
        (WebCore::Layout::Line::LineItem::LineItem): Deleted.
        (WebCore::Layout::Line::hasContent const): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Content::runs const):
        (WebCore::Layout::Line::Content::isEmpty const):
        (WebCore::Layout::Line::Content::logicalTop const):
        (WebCore::Layout::Line::Content::logicalLeft const):
        (WebCore::Layout::Line::Content::logicalRight const):
        (WebCore::Layout::Line::Content::logicalBottom const):
        (WebCore::Layout::Line::Content::logicalWidth const):
        (WebCore::Layout::Line::Content::logicalHeight const):
        (WebCore::Layout::Line::Content::setLogicalRect):
        (WebCore::Layout::Line::Content::runs):
        (WebCore::Layout::Line::hasContent const):
        (WebCore::Layout::Line::availableWidth const):
        (WebCore::Layout::Line::contentLogicalRight const):
        (WebCore::Layout::Line::logicalTop const):
        (WebCore::Layout::Line::logicalBottom const):
        (WebCore::Layout::Line::logicalLeft const):
        (WebCore::Layout::Line::logicalRight const):
        (WebCore::Layout::Line::logicalWidth const):
        (WebCore::Layout::Line::logicalHeight const):
        (WebCore::Layout::Line::contentLogicalWidth const):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

2019-05-31  Joonghun Park  <jh718.park@samsung.com>

        Unreviewed. Fix typo of |ComputedStyleExtractor::valueForPropertyInStyle|
        to follow camel case function naming style.

        No behavioral changes.

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::getKeyframes):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::propertyValue):
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): Deleted.
        * css/CSSComputedStyleDeclaration.h:
        * rendering/style/RenderStyle.cpp:
        (WebCore::changedCustomPaintWatchedProperty):

2019-05-31  Ali Juma  <ajuma@chromium.org>

        REGRESSION (r245396): Page load time performance regression
        https://bugs.webkit.org/show_bug.cgi?id=198382

        Reviewed by Simon Fraser.

        Delay the scheduling of a rendering update by 500ms when a new
        IntersectionObserver target is added during page load. This addresses
        a page load time regression from r245396, which immediately scheduled a
        rendering update when a target is added. Note that even with this change,
        if anything else triggers a rendering update before the 500ms delay expires,
        intersection observations will be updated during that rendering update.

        Covered by intersection-observer/initial-observation.html 

        * dom/Document.cpp:
        (WebCore::Document::updateIntersectionObservations):
        (WebCore::Document::scheduleInitialIntersectionObservationUpdate):
        * dom/Document.h:
        * page/IntersectionObserver.cpp:
        (WebCore::IntersectionObserver::observe):

2019-05-30  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed. Suppress -Wunused-variable warnings for the unused static
        mousePointerID variable by making it a constexpr.

        * platform/PointerID.h:

2019-05-30  Simon Fraser  <simon.fraser@apple.com>

        Use an OptionSet<> for GraphicsLayerPaintingPhase
        https://bugs.webkit.org/show_bug.cgi?id=198404

        Reviewed by Tim Horton.

        Replace GraphicsLayerPaintingPhase with OptionSet<GraphicsLayerPaintingPhase>.

        No behavior change.

        * page/PageOverlayController.cpp:
        (WebCore::PageOverlayController::setPageOverlayNeedsDisplay):
        (WebCore::PageOverlayController::paintContents):
        (WebCore::PageOverlayController::notifyFlushRequired):
        * page/PageOverlayController.h:
        * page/linux/ResourceUsageOverlayLinux.cpp:
        * page/mac/ServicesOverlayController.h:
        * page/mac/ServicesOverlayController.mm:
        (WebCore::ServicesOverlayController::Highlight::paintContents):
        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::dumpProperties const):
        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::paintingPhase const):
        (WebCore::GraphicsLayer::setPaintingPhase):
        * platform/graphics/GraphicsLayerClient.h:
        (WebCore::GraphicsLayerClient::paintContents):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateForegroundLayer):
        (WebCore::RenderLayerBacking::updateBackgroundLayer):
        (WebCore::RenderLayerBacking::updateMaskingLayer):
        (WebCore::RenderLayerBacking::updateChildClippingStrategy):
        (WebCore::RenderLayerBacking::updateScrollingLayers):
        (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer const):
        (WebCore::RenderLayerBacking::paintIntoLayer):
        (WebCore::RenderLayerBacking::paintContents):
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::paintContents):
        * rendering/RenderLayerCompositor.h:

2019-05-30  Youenn Fablet  <youenn@apple.com>

        Fix AVVideoCaptureSource::setFrameRateWithPreset logging
        https://bugs.webkit.org/show_bug.cgi?id=198392

        Reviewed by Eric Carlson.

        Move logging from setFrameRateWithPreset to setSessionSizeAndFrameRate which does the actual job.
        This ensures to not log in case of preset being null.
        No change of behavior.

        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::setFrameRateWithPreset):
        (WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate):

2019-05-30  Jer Noble  <jer.noble@apple.com>

        Video playback in Safari should continue when CarPlay is plugged in
        https://bugs.webkit.org/show_bug.cgi?id=198345
        <rdar://problem/45505750>

        Reviewed by Eric Carlson.

        Test: media/video-isplayingtoautomotiveheadunit.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction const):
        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::setIsPlayingToAutomotiveHeadUnit):
        * platform/audio/PlatformMediaSessionManager.h:
        (WebCore::PlatformMediaSessionManager::isPlayingToAutomotiveHeadUnit const):
        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
        (WebCore::MediaSessionManageriOS::carPlayServerDied):
        (WebCore::MediaSessionManageriOS::updateCarPlayIsConnected):
        (-[WebMediaSessionHelper initWithCallback:]):
        (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
        (-[WebMediaSessionHelper interruption:]):
        (-[WebMediaSessionHelper applicationWillEnterForeground:]):
        (-[WebMediaSessionHelper applicationDidBecomeActive:]):
        (-[WebMediaSessionHelper applicationWillResignActive:]):
        (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
        (-[WebMediaSessionHelper applicationDidEnterBackground:]):
        (-[WebMediaSessionHelper carPlayServerDied:]):
        (-[WebMediaSessionHelper carPlayIsConnectedDidChange:]):
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::setIsPlayingToAutomotiveHeadUnit):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-05-30  Youenn Fablet  <youenn@apple.com>

        Add an option to mute audio capture automatically when page is not visible
        https://bugs.webkit.org/show_bug.cgi?id=198307

        Reviewed by Eric Carlson.

        Reuse video capture mechanism for audio capture.
        In case document gets in the background, interrupt the audio track if the audio factory requires it.
        CoreAudioCaptureSourceIOS requires the audio source be interrupted if the app has not the right background mode.
        It also allows interrupting the audio capture based on a runtime flag.

        Add a runtime flag to control this.
        Internals API is used to set it for test purposes, off by default.
        For regular cases, the runtime flag is set through web preferences.

        Test: platform/ios/mediastream/audio-muted-in-background-tab.html

        * dom/Document.cpp:
        (WebCore::Document::notifyMediaCaptureOfVisibilityChanged):
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::interruptAudioOnPageVisibilityChangeEnabled const):
        (WebCore::RuntimeEnabledFeatures::setInterruptAudioOnPageVisibilityChangeEnabled):
        * platform/mediastream/RealtimeMediaSourceCenter.cpp:
        (WebCore::RealtimeMediaSourceCenter::RealtimeMediaSourceCenter):
        (WebCore::RealtimeMediaSourceCenter::initializeShouldInterruptAudioOnPageVisibilityChange):
        (WebCore::RealtimeMediaSourceCenter::setCapturePageState):
        (WebCore::RealtimeMediaSourceCenter::visibilityDidChange):
        * platform/mediastream/RealtimeMediaSourceCenter.h:
        (WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange):
        * platform/mediastream/RealtimeMediaSourceFactory.h:
        (WebCore::AudioCaptureFactory::setAudioCapturePageState):
        (WebCore::VideoCaptureFactory::setVideoCapturePageState):
        * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h:
        * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
        (WebCore::CoreAudioCaptureSourceFactory::setAudioCapturePageState):
        (WebCore::CoreAudioCaptureSourceFactoryIOS::shouldInterruptAudioOnPageVisibilityChange):
        * platform/mediastream/mac/CoreAudioCaptureSource.h:
        * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
        (WebCore::RealtimeMediaSourceCenter::initializeShouldInterruptAudioOnPageVisibilityChange):
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::setShouldInterruptAudioOnPageVisibilityChange):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-05-30  Saam Barati  <sbarati@apple.com>

        [WHLSL] Enforce variable lifetimes
        https://bugs.webkit.org/show_bug.cgi?id=195794
        <rdar://problem/50746293>

        Reviewed by Myles C. Maxfield.

        In WHLSL, each variable has global lifetime. So returning a pointer to a
        local variable is a legitimate and well specified thing to do. Each local
        variable has a unique place in memory. So, for example:
        
        ```
        thread int* ptr() { int local; return &local; }
        thread int* ptrPtr() { return ptr(); }
        ```
        
        In the above program, ptr() must always return the same value
        as ptrPtr(). So, the following would print "42":
        ```
        thread int* p = ptrPtr();
        *ptr() = 42;
        print(*p);
        ```
        
        To implement these semantics, this patch introduces a new pass which does the
        following transformations:
        - It notes every variable whose address is taken in the program.
        - Each such variable gets defined as a field in a struct.
        - Each function which is an entry point defines this struct.
        - Each non entry point takes a pointer to this struct as its final parameter.
        - Each call to a non-native function is rewritten to pass a pointer to the
          struct as the last call argument.
        - Each variable reference to "x", where "x" ends up in the struct, is
          modified to instead be "struct->x". We store to "struct->x" after declaring
          "x". If "x" is a function parameter, we store to "struct->x" as the first
          thing we do in the function body.

        Tests: webgpu/whlsl-ensure-proper-variable-lifetime-2.html
               webgpu/whlsl-ensure-proper-variable-lifetime-3.html
               webgpu/whlsl-ensure-proper-variable-lifetime.html
               webgpu/whlsl-return-local-variable.html

        * Modules/webgpu/WHLSL/AST/WHLSLAST.h:
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        (WebCore::WHLSL::AST::Expression::Expression):
        (WebCore::WHLSL::AST::Expression::isGlobalVariableReference const):
        (WebCore::WHLSL::AST::Expression::origin const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
        (WebCore::WHLSL::AST::FunctionDeclaration::origin):
        * Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h: Added.
        (WebCore::WHLSL::AST::GlobalVariableReference::GlobalVariableReference):
        (WebCore::WHLSL::AST::GlobalVariableReference::structField):
        (WebCore::WHLSL::AST::GlobalVariableReference::base):
        * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
        (WebCore::WHLSL::AST::Statement::Statement):
        (WebCore::WHLSL::AST::Statement::isStatementList const):
        (WebCore::WHLSL::AST::Statement::isWhileLoop const):
        * Modules/webgpu/WHLSL/AST/WHLSLStatementList.h: Added.
        (WebCore::WHLSL::AST::StatementList::StatementList):
        (WebCore::WHLSL::AST::StatementList::statements):
        * Modules/webgpu/WHLSL/AST/WHLSLValue.h:
        (WebCore::WHLSL::AST::Value::Value):
        (WebCore::WHLSL::AST::Value::origin const):
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        (WebCore::WHLSL::AST::VariableDeclaration::VariableDeclaration):
        (WebCore::WHLSL::AST::VariableDeclaration::takeInitializer):
        (WebCore::WHLSL::AST::VariableDeclaration::origin const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
        (WebCore::WHLSL::AST::VariableReference::wrap):
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
        (WebCore::WHLSL::ASTDumper::visit):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.h:
        (WebCore::WHLSL::dumpASTNode):
        (WebCore::WHLSL::dumpAST):
        (WebCore::WHLSL::toString): Deleted.
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp: Added.
        (WebCore::WHLSL::EscapedVariableCollector::takeEscapedVariables):
        (WebCore::WHLSL::anonymousToken):
        (WebCore::WHLSL::PreserveLifetimes::PreserveLifetimes):
        (WebCore::WHLSL::PreserveLifetimes::makeStructVariableReference):
        (WebCore::WHLSL::preserveVariableLifetimes):
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.h: Added.
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        (WebCore::WHLSL::Visitor::visit):
        * Modules/webgpu/WHLSL/WHLSLVisitor.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-05-30  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r245890, 245887.

        Breaks internal builds.

        Reverted changeset:
        "Video playback in Safari should continue when CarPlay is plugged in"
        https://bugs.webkit.org/show_bug.cgi?id=198345
        https://trac.webkit.org/changeset/245887/webkit

2019-05-30  Dean Jackson  <dino@apple.com>

        Media documents on iPad are too wide in split screen
        https://bugs.webkit.org/show_bug.cgi?id=198405
        <rdar://problem/50974548>

        Reviewed by Tim Horton.

        Media documents on iPad had a minimum width of 700px. This
        was fine in full-screen, but didn't work when then window
        was smaller, such as split screen or a link preview.

        Tests: media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html
               media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html

        * Modules/modern-media-controls/controls/media-document.css: Add a media query to
        detect small windows.
        * Modules/modern-media-controls/media/media-document-controller.js:

2019-05-30  Andres Gonzalez  <andresg_22@apple.com>

        Inserting a newline in contenteditable causes two characters to be added instead of one
        https://bugs.webkit.org/show_bug.cgi?id=197894
        <rdar://problem/49700998>

        Reviewed by Wenson Hsieh and Chris Fleizach.

        There were two issues with inserting a newline character at the end of 
        a line that caused problems for accessibility:
        - the first '\n' inserted after text would result in two line breaks 
        inserted instead of one. createFragmentFromText in markup.cpp was 
        splitting the string "\n" into two empty strings and creating a <div> 
        and a <br> respectively. Then the emission code would emit a '\n' for 
        the empty div and another for the <br>.
        - the second problem is a consequence of <rdar://problem/5192593> and 
        the workaround is the change in editing.cpp in the function
        visiblePositionForIndexUsingCharacterIterator, similar to what is done
        in VisibleUnits.cpp for nextBoundary.
        The rest of the changes in this patch are accessibility changes to 
        execute the layout tests.

        Tests: accessibility/ios-simulator/set-selected-text-range-after-newline.html
               accessibility/set-selected-text-range-after-newline.html

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::setSelectedTextRange):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper stringForRange:]):
        (-[WebAccessibilityObjectWrapper _accessibilitySelectedTextRange]):
        (-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        * editing/Editing.cpp:
        (WebCore::visiblePositionForIndexUsingCharacterIterator):
        * editing/markup.cpp:
        (WebCore::createFragmentFromText):

2019-05-30  Justin Fan  <justin_fan@apple.com>

        [Web GPU] Vertex Buffers/Input State API updates
        https://bugs.webkit.org/show_bug.cgi?id=194258
        <rdar://problem/47806127>

        Reviewed by Myles C. Maxfield.

        The vertex buffer attributes model for GPURenderPipelines in the WebGPU API has been updated.
        Update our implementation to match.

        No new tests. Existing tests updated to match new behavior.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/webgpu/GPUVertexAttributeDescriptor.idl:
        * Modules/webgpu/GPUVertexBufferDescriptor.idl: Renamed from Source/WebCore/Modules/webgpu/GPUInputStateDescriptor.idl.
        * Modules/webgpu/GPUVertexInputDescriptor.idl:
        * Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/GPURenderPipelineDescriptor.h:
        * platform/graphics/gpu/GPUVertexAttributeDescriptor.h:
        * platform/graphics/gpu/GPUVertexBufferDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUInputStateDescriptor.h.
        * platform/graphics/gpu/GPUVertexInputDescriptor.h:
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::trySetVertexInput): Added. Populate Metal and WHLSL pipeline descriptors with vertex attribute metadata.
        (WebCore::trySetColorStates): Added. Populate Metal and WHLSL pipeline descriptors with color attachment metadata.
        (WebCore::convertLayout): Moved.
        (WebCore::trySetMetalFunctions): Moved.
        (WebCore::trySetFunctions): Added. WHLSL compilation to Metal SL happens here, then MSL functions are set on pipeline descriptor.
        (WebCore::convertRenderPipelineDescriptor): Repurposed. Convert a GPURenderPipelineDescriptor to Metal and WHLSL versions.
        (WebCore::tryCreateMtlRenderPipelineState):
        (WebCore::GPURenderPipeline::tryCreate):
        (WebCore::trySetMetalFunctionsForPipelineDescriptor): Deleted.
        (WebCore::trySetWHLSLFunctionsForPipelineDescriptor): Deleted.
        (WebCore::trySetFunctionsForPipelineDescriptor): Deleted.
        (WebCore::trySetInputStateForPipelineDescriptor): Deleted.
        (WebCore::setColorStatesForColorAttachmentArray): Deleted.

2019-05-30  Zalan Bujtas  <zalan@apple.com>

        [iOS] Do not linkify telephone numbers inside <a> elements.
        https://bugs.webkit.org/show_bug.cgi?id=198378

        Reviewed by Chris Dumez.

        Phone number linkifying mutates the DOM in a potentially unexpected way triggering different kinds of failures with JS, CSS selectors etc.
        This patch tightens the linkifying rule so that content inside an <a> element won't get linkified even when the <a> has no valid href attribute.

        Test: fast/dom/linkify-phone-numbers.html

        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::disallowTelephoneNumberParsing):

2019-05-30  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r245883.

        Caused 6 webgpu/ layout test failures.

        Reverted changeset:

        "[WHLSL] Parsing and lexing the standard library is slow"
        https://bugs.webkit.org/show_bug.cgi?id=192890
        https://trac.webkit.org/changeset/245883

2019-05-30  Simon Fraser  <simon.fraser@apple.com>

        Move some HistoricalVelocityData code into the cpp file
        https://bugs.webkit.org/show_bug.cgi?id=198353

        Reviewed by Tim Horton.
        
        Now that we have VelocityData.cpp put the non-trivial HistoricalVelocityData::velocityForNewData()
        into it. append() can become a lambda function.

        * platform/graphics/VelocityData.cpp:
        (WebCore::HistoricalVelocityData::velocityForNewData):
        * platform/graphics/VelocityData.h:
        (WebCore::HistoricalVelocityData::velocityForNewData): Deleted.
        (WebCore::HistoricalVelocityData::append): Deleted.

2019-05-30  Truitt Savell  <tsavell@apple.com>

        Fix the iOS build after r245887
        https://bugs.webkit.org/show_bug.cgi?id=198345

        Unreviewed build fix.

        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::updateCarPlayIsConnected):

2019-05-30  Jer Noble  <jer.noble@apple.com>

        ASSERTION FAILED: m_scriptExecutionContext under WebCore::AudioContext::isPlayingAudioDidChange()
        https://bugs.webkit.org/show_bug.cgi?id=181597
        <rdar://problem/36474088>

        Reviewed by Eric Carlson.

        Because document() is usually null-checked before using (and we can add null-checks where missing),
        there's no good reason to debug-assert that m_scriptExecutionContext is non-null before downcast<>ing
        to Document*.

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::constructCommon):
        (WebCore::AudioContext::stop):
        (WebCore::AudioContext::document const):
        (WebCore::AudioContext::visibilityStateChanged):
        (WebCore::AudioContext::willBeginPlayback):
        (WebCore::AudioContext::willPausePlayback):
        (WebCore::AudioContext::pageMutedStateDidChange):

2019-05-30  Jer Noble  <jer.noble@apple.com>

        Video playback in Safari should continue when CarPlay is plugged in
        https://bugs.webkit.org/show_bug.cgi?id=198345
        <rdar://problem/45505750>

        Reviewed by Eric Carlson.

        Test: media/video-isplayingtoautomotiveheadunit.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction const):
        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::setIsPlayingToAutomotiveHeadUnit):
        * platform/audio/PlatformMediaSessionManager.h:
        (WebCore::PlatformMediaSessionManager::isPlayingToAutomotiveHeadUnit const):
        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
        (WebCore::MediaSessionManageriOS::carPlayServerDied):
        (WebCore::MediaSessionManageriOS::updateCarPlayIsConnected):
        (-[WebMediaSessionHelper initWithCallback:]):
        (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
        (-[WebMediaSessionHelper interruption:]):
        (-[WebMediaSessionHelper applicationWillEnterForeground:]):
        (-[WebMediaSessionHelper applicationDidBecomeActive:]):
        (-[WebMediaSessionHelper applicationWillResignActive:]):
        (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
        (-[WebMediaSessionHelper applicationDidEnterBackground:]):
        (-[WebMediaSessionHelper carPlayServerDied:]):
        (-[WebMediaSessionHelper carPlayIsConnectedDidChange:]):
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::setIsPlayingToAutomotiveHeadUnit):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-05-29  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Parsing and lexing the standard library is slow
        https://bugs.webkit.org/show_bug.cgi?id=192890
        <rdar://problem/50746335>

        Reviewed by Myles Maxfield.

        The main idea is to avoid backtracking by instead peeking at the next token (and occasionally at the one after that).
        This implies a few things:
        - We can replace the stack of tokens by a trivial ring buffer of size 2 (holding the next token and the one after, or WTF::nullopt if we are at the end of the file).
        - We now have "completeFooExpression" functions, to avoid having to reparse the prefix of some expression, if we find half-way through what it is.

        I also fixed the following parser bug:
        - https://bugs.webkit.org/show_bug.cgi?id=198305 [WHLSL] Multiple variables with initializers in a declaration statement crashes the compiler
            which was due to a mistake I made in the grammar

        Finally I added two new macros: CONSUME_TYPE and PARSE to eliminate about 500 lines of error propagation boilerplate.

        There are still lots of ways of improving the parser and lexer, such as:
        - finishing the conversion of tokens in the lexer, not bothering with allocating string views
        - make two special tokens Invalid and EOF, to remove the overhead of Optional
        - make peekTypes and consumeTypes use templates to avoid constructing a Vector and calling find on it.
        - Turn the entire lexer into a proper automata, not going through the same characters again and again (this is certainly the largest win by far)
        - Remove the last few pieces of backtracking from the parser.

        The current patch is already enough to make parsing the full standard library (something like 85k lines) approximately 260ms.
        This is still longer than I would like, but nowhere near the bottleneck any longer because of some other parts of the compiler.

        * Modules/webgpu/WHLSL/WHLSLLexer.h:
        (WebCore::WHLSL::Lexer::Lexer):
        (WebCore::WHLSL::Lexer::consumeToken):
        (WebCore::WHLSL::Lexer::peek):
        (WebCore::WHLSL::Lexer::peekFurther):
        (WebCore::WHLSL::Lexer::state const):
        (WebCore::WHLSL::Lexer::setState):
        (WebCore::WHLSL::Lexer::unconsumeToken): Deleted.
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parse):
        (WebCore::WHLSL::Parser::peek):
        (WebCore::WHLSL::Parser::peekTypes):
        (WebCore::WHLSL::Parser::tryType):
        (WebCore::WHLSL::Parser::tryTypes):
        (WebCore::WHLSL::Parser::consumeTypes):
        (WebCore::WHLSL::Parser::parseConstantExpression):
        (WebCore::WHLSL::Parser::parseTypeArgument):
        (WebCore::WHLSL::Parser::parseTypeArguments):
        (WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated):
        (WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated):
        (WebCore::WHLSL::Parser::parseType):
        (WebCore::WHLSL::Parser::parseTypeDefinition):
        (WebCore::WHLSL::Parser::parseResourceSemantic):
        (WebCore::WHLSL::Parser::parseSpecializationConstantSemantic):
        (WebCore::WHLSL::Parser::parseStageInOutSemantic):
        (WebCore::WHLSL::Parser::parseSemantic):
        (WebCore::WHLSL::Parser::parseQualifiers):
        (WebCore::WHLSL::Parser::parseStructureElement):
        (WebCore::WHLSL::Parser::parseStructureDefinition):
        (WebCore::WHLSL::Parser::parseEnumerationDefinition):
        (WebCore::WHLSL::Parser::parseEnumerationMember):
        (WebCore::WHLSL::Parser::parseNativeTypeDeclaration):
        (WebCore::WHLSL::Parser::parseNumThreadsFunctionAttribute):
        (WebCore::WHLSL::Parser::parseAttributeBlock):
        (WebCore::WHLSL::Parser::parseParameter):
        (WebCore::WHLSL::Parser::parseParameters):
        (WebCore::WHLSL::Parser::parseFunctionDefinition):
        (WebCore::WHLSL::Parser::parseComputeFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseVertexFragmentFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseNativeFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseBlock):
        (WebCore::WHLSL::Parser::parseBlockBody):
        (WebCore::WHLSL::Parser::parseIfStatement):
        (WebCore::WHLSL::Parser::parseSwitchStatement):
        (WebCore::WHLSL::Parser::parseSwitchCase):
        (WebCore::WHLSL::Parser::parseForLoop):
        (WebCore::WHLSL::Parser::parseWhileLoop):
        (WebCore::WHLSL::Parser::parseDoWhileLoop):
        (WebCore::WHLSL::Parser::parseVariableDeclaration):
        (WebCore::WHLSL::Parser::parseVariableDeclarations):
        (WebCore::WHLSL::Parser::parseStatement):
        (WebCore::WHLSL::Parser::parseEffectfulExpression):
        (WebCore::WHLSL::Parser::parseEffectfulAssignment):
        (WebCore::WHLSL::Parser::parseExpression):
        (WebCore::WHLSL::Parser::parseTernaryConditional):
        (WebCore::WHLSL::Parser::completeTernaryConditional):
        (WebCore::WHLSL::Parser::parseAssignment):
        (WebCore::WHLSL::Parser::completeAssignment):
        (WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
        (WebCore::WHLSL::Parser::parsePossibleLogicalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleLogicalBinaryOperation):
        (WebCore::WHLSL::Parser::parsePossibleRelationalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleRelationalBinaryOperation):
        (WebCore::WHLSL::Parser::parsePossibleShift):
        (WebCore::WHLSL::Parser::completePossibleShift):
        (WebCore::WHLSL::Parser::parsePossibleAdd):
        (WebCore::WHLSL::Parser::completePossibleAdd):
        (WebCore::WHLSL::Parser::parsePossibleMultiply):
        (WebCore::WHLSL::Parser::completePossibleMultiply):
        (WebCore::WHLSL::Parser::parsePossiblePrefix):
        (WebCore::WHLSL::Parser::parsePossibleSuffix):
        (WebCore::WHLSL::Parser::parseCallExpression):
        (WebCore::WHLSL::Parser::parseTerm):
        (WebCore::WHLSL::Parser::parseAddressSpaceType): Deleted.
        (WebCore::WHLSL::Parser::parseNonAddressSpaceType): Deleted.
        (WebCore::WHLSL::Parser::parseEntryPointFunctionDeclaration): Deleted.
        (WebCore::WHLSL::Parser::parseEffectfulPrefix): Deleted.
        (WebCore::WHLSL::Parser::parseEffectfulSuffix): Deleted.
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        (WebCore::WHLSL::Parser::Error::dump const):

2019-05-29  Jiewen Tan  <jiewen_tan@apple.com>

        Unreviewed, update WebAuthN to "Supported In Preview"

        * features.json:

2019-05-29  Don Olmstead  <don.olmstead@sony.com>

        Remove ENABLE definitions from WebKit config files
        https://bugs.webkit.org/show_bug.cgi?id=197858

        Reviewed by Simon Fraser.

        Sync FeatureDefines.xcconfig.

        * Configurations/FeatureDefines.xcconfig:

2019-05-29  Youenn Fablet  <youenn@apple.com>

        Reestablish WebSWClientConnection in case of network process crash
        https://bugs.webkit.org/show_bug.cgi?id=198333

        Reviewed by Alex Christensen.

        Refactor DocumentLoader to no longer take a ref to the SWClientConnection.
        Instead, store the sessionID and get the SWClientConnection from it.
        Remove unused code from ServiceWorkerContainer.

        Test: http/wpt/service-workers/service-worker-networkprocess-crash.html

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
        (WebCore::DocumentLoader::unregisterTemporaryServiceWorkerClient):
        * loader/DocumentLoader.h:
        * workers/service/ServiceWorkerContainer.cpp:
        * workers/service/ServiceWorkerContainer.h:
        * workers/service/ServiceWorkerJobClient.h:

2019-05-29  David Kilzer  <ddkilzer@apple.com>

        IndexedDatabase Server thread in com.apple.WebKit.Networking process leaks objects into an autoreleasePool that's never cleared
        <https://webkit.org/b/198346>
        <rdar://problem/50895658>

        Reviewed by Brent Fulgham.

        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::IDBServer):
        - Pass AutodrainedPoolForRunLoop::Use when creating
          CrossThreadTaskHandler to fix the bug.

2019-05-29  Geoffrey Garen  <ggaren@apple.com>

        WeakPtr breaks vtables when upcasting to base classes
        https://bugs.webkit.org/show_bug.cgi?id=188799

        Reviewed by Youenn Fablet.

        * Modules/encryptedmedia/MediaKeySession.cpp:
        (WebCore::MediaKeySession::MediaKeySession):
        * Modules/encryptedmedia/MediaKeySession.h: Adopted modern WeakPtr APIs.
        Removed redundant WeakPtrFactory.

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::existingWrapper):
        * css/CSSFontFace.h: Moved functions out of line to avoid #include
        explosion for .get().

        * dom/ContainerNode.h:
        * dom/Document.h:
        * dom/Element.h: Moved CanMakeWeakPtr to ContainerNode because all
        subclasses except for DocumentFragment were already so, and we have
        code that uses WeakPtr<ContainerNode>, which, now that WeakPtr is
        type-safe, is awkward to do when ContainerNode isn't CanMakeWeakPtr.

        * dom/FullscreenManager.cpp:
        (WebCore::FullscreenManager::fullscreenRenderer const):
        * dom/FullscreenManager.h:
        (WebCore::FullscreenManager::fullscreenRenderer const): Deleted.
        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::form const):
        * html/FormAssociatedElement.h:
        (WebCore::FormAssociatedElement::form const): Deleted. Moved functions
        out of line to avoid #include explosion for .get().

        * html/HTMLMediaElement.h: It takes an extra using declaration
        to disambiguate multiple CanMakeWeakPtr base classes now.

        * loader/MediaResourceLoader.cpp:
        (WebCore::MediaResourceLoader::requestResource): Removed redundant .get().

        * page/DOMWindowProperty.cpp:
        (WebCore::DOMWindowProperty::window const):
        * page/DOMWindowProperty.h:
        (WebCore::DOMWindowProperty::window const): Deleted.
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::subtreeLayoutRoot const):
        * page/FrameViewLayoutContext.h:
        (WebCore::FrameViewLayoutContext::subtreeLayoutRoot const): Deleted.
        * page/UndoItem.cpp:
        (WebCore::UndoItem::undoManager const):
        * page/UndoItem.h:
        (WebCore::UndoItem::undoManager const): Deleted. Moved functions out of
        line to avoid #include explosion for .get().

        * platform/ScrollView.h: It takes an extra using declaration
        to disambiguate multiple CanMakeWeakPtr base classes now.

        * platform/Widget.cpp:
        (WebCore::Widget::parent const):
        * platform/Widget.h:
        (WebCore::Widget::parent const): Deleted. Moved functions out of line to avoid #include
        explosion for .get().

        * platform/encryptedmedia/CDMInstanceSession.h: Made
        CDMInstanceSessionClient CanMakeWeakPtr because we use WeakPtr<CDMInstanceSessionClient>.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        CanMakeWeakPtr is inherited now.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession const): Deleted.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::CMTimebaseEffectiveRateChangedCallback):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession const):
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
        (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
        (WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
        (WebCore::SourceBufferPrivateAVFObjC::flushVideo):
        (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
        (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):
        (WebCore::SourceBufferPrivateAVFObjC::setVideoLayer):
        (WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession): Modernized WeakPtr API usage.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::multiColumnFlowSlowCase const):
        * rendering/RenderBlockFlow.h:
        (WebCore::RenderBlockFlow::multiColumnFlow const):
        * rendering/RenderMultiColumnFlow.cpp:
        (WebCore::RenderMultiColumnFlow::findColumnSpannerPlaceholder const):
        * rendering/RenderMultiColumnFlow.h:
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::header const):
        (WebCore::RenderTable::footer const):
        (WebCore::RenderTable::firstBody const):
        (WebCore::RenderTable::topSection const):
        * rendering/RenderTable.h:
        (WebCore::RenderTable::header const): Deleted.
        (WebCore::RenderTable::footer const): Deleted.
        (WebCore::RenderTable::firstBody const): Deleted.
        (WebCore::RenderTable::topSection const): Deleted. Moved functions out
        of line to avoid #include explosion for .get().

2019-05-29  Antoine Quint  <graouts@apple.com>

        [Pointer Events] toElement and fromElement should be null
        https://bugs.webkit.org/show_bug.cgi?id=198338

        Reviewed by Dean Jackson.

        * dom/MouseEvent.h:
        * dom/PointerEvent.h:

2019-05-29  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r245857.

        Breaks internal builds.

        Reverted changeset:

        "WeakPtr breaks vtables when upcasting to base classes"
        https://bugs.webkit.org/show_bug.cgi?id=188799
        https://trac.webkit.org/changeset/245857

2019-05-29  Keith Rollin  <krollin@apple.com>

        Fix builds that don't use makeWindowFromView
        https://bugs.webkit.org/show_bug.cgi?id=198342
        <rdar://problem/51228563>

        Reviewed by Wenson Hsieh.

        In some configurations, VideoFullscreenInterfaceAVKit.mm declares but
        does not use makeWindowFromView. Fix by conditionalizing the the
        declaration on the same symbol as point where it's used.

        No new tests -- no new functionality.

        * platform/ios/VideoFullscreenInterfaceAVKit.mm:

2019-05-28  Geoffrey Garen  <ggaren@apple.com>

        WeakPtr breaks vtables when upcasting to base classes
        https://bugs.webkit.org/show_bug.cgi?id=188799

        Reviewed by Youenn Fablet.

        * Modules/encryptedmedia/MediaKeySession.cpp:
        (WebCore::MediaKeySession::MediaKeySession):
        * Modules/encryptedmedia/MediaKeySession.h: Adopted modern WeakPtr APIs.
        Removed redundant WeakPtrFactory.

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::existingWrapper):
        * css/CSSFontFace.h: Moved functions out of line to avoid #include
        explosion for .get().

        * dom/ContainerNode.h:
        * dom/Document.h:
        * dom/Element.h: Moved CanMakeWeakPtr to ContainerNode because all
        subclasses except for DocumentFragment were already so, and we have
        code that uses WeakPtr<ContainerNode>, which, now that WeakPtr is
        type-safe, is awkward to do when ContainerNode isn't CanMakeWeakPtr.

        * dom/FullscreenManager.cpp:
        (WebCore::FullscreenManager::fullscreenRenderer const):
        * dom/FullscreenManager.h:
        (WebCore::FullscreenManager::fullscreenRenderer const): Deleted.
        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::form const):
        * html/FormAssociatedElement.h:
        (WebCore::FormAssociatedElement::form const): Deleted. Moved functions
        out of line to avoid #include explosion for .get().

        * html/HTMLMediaElement.h: It takes an extra using declaration
        to disambiguate multiple CanMakeWeakPtr base classes now.

        * loader/MediaResourceLoader.cpp:
        (WebCore::MediaResourceLoader::requestResource): Removed redundant .get().

        * page/DOMWindowProperty.cpp:
        (WebCore::DOMWindowProperty::window const):
        * page/DOMWindowProperty.h:
        (WebCore::DOMWindowProperty::window const): Deleted.
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::subtreeLayoutRoot const):
        * page/FrameViewLayoutContext.h:
        (WebCore::FrameViewLayoutContext::subtreeLayoutRoot const): Deleted.
        * page/UndoItem.cpp:
        (WebCore::UndoItem::undoManager const):
        * page/UndoItem.h:
        (WebCore::UndoItem::undoManager const): Deleted. Moved functions out of
        line to avoid #include explosion for .get().

        * platform/ScrollView.h: It takes an extra using declaration
        to disambiguate multiple CanMakeWeakPtr base classes now.

        * platform/Widget.cpp:
        (WebCore::Widget::parent const):
        * platform/Widget.h:
        (WebCore::Widget::parent const): Deleted. Moved functions out of line to avoid #include
        explosion for .get().

        * platform/encryptedmedia/CDMInstanceSession.h: Made
        CDMInstanceSessionClient CanMakeWeakPtr because we use WeakPtr<CDMInstanceSessionClient>.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        CanMakeWeakPtr is inherited now.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession const): Deleted.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::CMTimebaseEffectiveRateChangedCallback):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession const):
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
        (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
        (WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
        (WebCore::SourceBufferPrivateAVFObjC::flushVideo):
        (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
        (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):
        (WebCore::SourceBufferPrivateAVFObjC::setVideoLayer):
        (WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession): Modernized WeakPtr API usage.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::multiColumnFlowSlowCase const):
        * rendering/RenderBlockFlow.h:
        (WebCore::RenderBlockFlow::multiColumnFlow const):
        * rendering/RenderMultiColumnFlow.cpp:
        (WebCore::RenderMultiColumnFlow::findColumnSpannerPlaceholder const):
        * rendering/RenderMultiColumnFlow.h:
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::header const):
        (WebCore::RenderTable::footer const):
        (WebCore::RenderTable::firstBody const):
        (WebCore::RenderTable::topSection const):
        * rendering/RenderTable.h:
        (WebCore::RenderTable::header const): Deleted.
        (WebCore::RenderTable::footer const): Deleted.
        (WebCore::RenderTable::firstBody const): Deleted.
        (WebCore::RenderTable::topSection const): Deleted. Moved functions out
        of line to avoid #include explosion for .get().

2019-05-29  Antti Koivisto  <antti@apple.com>

        Scrolling node ordering wrong when a layer has both positioning and fixed/sticky node
        https://bugs.webkit.org/show_bug.cgi?id=198329

        Reviewed by Darin Adler.

        Test: scrollingcoordinator/scrolling-tree/sticky-in-overflow.html

        With sticky positioning in non-stacking context overflow you currently get structure like

        FrameScrollingNode
          OverflowScrollingNode
          StickyNode
            PositionedNode

        where StickyNode and PositionedNode reference the same layer. Sticky doesn't get applied at all when the overflow moves.

        This patch reverses the order of sticky and positioned. It doesn't fix sticky positioning during scrolling yet,
        but it does make it less jumpy. It is a prerequisite for the full fix.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):

2019-05-29  Ludovico de Nittis  <ludovico.denittis@collabora.com>

        Prepend KEY_ to the last key alias in PlatformEventKeyboardGtk
        https://bugs.webkit.org/show_bug.cgi?id=198331

        Reviewed by Michael Catanzaro.

        No behavior change.

        With the commit
        https://bugs.webkit.org/show_bug.cgi?id=198326
        A gdk key slipped away from the renaming.

        * platform/gtk/PlatformKeyboardEventGtk.cpp:
        (WebCore::modifiersForGdkKeyEvent):

2019-05-29  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move Line class to a dedicated file
        https://bugs.webkit.org/show_bug.cgi?id=198332
        <rdar://problem/51221403>

        Reviewed by Antti Koivisto.

        An upcoming refactoring requires the Line class to be in a .h.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/displaytree/DisplayRun.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::initializeLine const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::halfLeadingMetrics): Deleted.
        (WebCore::Layout::Line::availableWidth const): Deleted.
        (WebCore::Layout::Line::contentLogicalRight const): Deleted.
        (WebCore::Layout::Line::contentLogicalWidth const): Deleted.
        (WebCore::Layout::Line::logicalTop const): Deleted.
        (WebCore::Layout::Line::logicalLeft const): Deleted.
        (WebCore::Layout::Line::logicalRight const): Deleted.
        (WebCore::Layout::Line::logicalBottom const): Deleted.
        (WebCore::Layout::Line::logicalWidth const): Deleted.
        (WebCore::Layout::Line::logicalHeight const): Deleted.
        (WebCore::Layout::Line::LineItem::LineItem): Deleted.
        (WebCore::Layout::Line::Line): Deleted.
        (WebCore::Layout::Line::reset): Deleted.
        (WebCore::Layout::Line::close): Deleted.
        (WebCore::Layout::Line::removeTrailingTrimmableContent): Deleted.
        (WebCore::Layout::Line::moveLogicalLeft): Deleted.
        (WebCore::Layout::Line::moveLogicalRight): Deleted.
        (WebCore::Layout::isTrimmableContent): Deleted.
        (WebCore::Layout::Line::trailingTrimmableWidth const): Deleted.
        (WebCore::Layout::Line::hasContent const): Deleted.
        (WebCore::Layout::Line::appendNonBreakableSpace): Deleted.
        (WebCore::Layout::Line::appendInlineContainerStart): Deleted.
        (WebCore::Layout::Line::appendInlineContainerEnd): Deleted.
        (WebCore::Layout::Line::appendTextContent): Deleted.
        (WebCore::Layout::Line::appendNonReplacedInlineBox): Deleted.
        (WebCore::Layout::Line::appendReplacedInlineBox): Deleted.
        (WebCore::Layout::Line::appendHardLineBreak): Deleted.
        * layout/inlineformatting/InlineTextItem.h:
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::isTrimmableContent):
        * layout/inlineformatting/text/TextUtil.h:

2019-05-29  Ludovico de Nittis  <ludovico.denittis@collabora.com>

        PlatformEventKeyboardGtk still uses old key aliases
        https://bugs.webkit.org/show_bug.cgi?id=198326

        Reviewed by Carlos Garcia Campos.

        No behavior change.

        Use the new key names convention prepending "KEY_".

        * platform/gtk/PlatformKeyboardEventGtk.cpp:
        (WebCore::PlatformKeyboardEvent::keyIdentifierForGdkKeyCode):
        (WebCore::PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode):
        (WebCore::PlatformKeyboardEvent::singleCharacterString):
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

2019-05-28  Yacine Bandou  <yacine.bandou@softathome.com>

        [MSE][GStreamer] update the readyState correctly in MediaPlayerPrivateGStreamerMSE
        https://bugs.webkit.org/show_bug.cgi?id=197834

        Reviewed by Xabier Rodriguez-Calvar.

        The buffering state and the m_downloadFinished boolean aren't supported in the MSE case.
        When the readyState is already "HaveEnoughData", we don't want to revert it to "HaveFutureData",
        or else the MediaPlayer would send a "canplay" event instead of a "canplaythrough".

        Test: media/media-source/media-source-canplaythrough-event.html

        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
        (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates):

2019-05-28  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo] ASSERTION FAILED: !m_preparingToPlay in MediaPlayerPrivateMediaFoundation::prepareToPlay
        https://bugs.webkit.org/show_bug.cgi?id=190747

        Reviewed by Alex Christensen.

        HTMLMediaElement::prepareToPlay had a assertion ensuring that it
        was not called twice. However, it was called twice. The first from
        HTMLMediaElement::load, the second from
        MediaPlayerPrivateMediaFoundation::onTopologySet.

        prepareToPlay started loading. And, loading should be started
        after onTopologySet is called back.

        Covered by existing tests.

        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
        (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet): Moved code from prepareToPlay.
        (WebCore::MediaPlayerPrivateMediaFoundation::prepareToPlay): Deleted and moved the code to onTopologySet.
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Removed prepareToPlay declaration.

2019-05-28  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo][MediaFoundation] Assertion failure in MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample
        https://bugs.webkit.org/show_bug.cgi?id=198290

        Reviewed by Per Arne Vollan.

        Covered by existing tests.

        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
        (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample):
        Call clear() of m_memSurface before assigning new value.

2019-05-28  Saam Barati  <sbarati@apple.com>

        [WHLSL] Type of dereference is the type of the thing we point to, not a pointer to that type
        https://bugs.webkit.org/show_bug.cgi?id=198321

        Reviewed by Myles C. Maxfield.

        Consider this program:
        ```
        thread int* x;
        *x = 42
        ```
        
        In the Checker, we were saying the type of "*x" was "int*" instead of "int".

        Test: webgpu/whlsl-dereference-pointer-should-type-check.html

        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::visit):

2019-05-28  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Respect NSItemProvider's registered types when dropping files that are loaded in-place
        https://bugs.webkit.org/show_bug.cgi?id=198315
        <rdar://problem/51183762>

        Reviewed by Tim Horton.

        Currently, logic in PasteboardIOS.mm and WebContentReaderCocoa.mm attempts to deduce the content type from the
        file path when dropping attachments on iOS. Instead, we should be plumbing the content type through to the
        reader.

        Test: WKAttachmentTestsIOS.InsertDroppedImageWithNonImageFileExtension

        * editing/WebContentReader.h:
        * editing/cocoa/WebContentReaderCocoa.mm:
        (WebCore::typeForAttachmentElement):

        Add a helper method to determine which type to use in attachment elements. This makes the paste
        (attachmentForData) and drop (attachmentForFilePaths) behave the same way, with respect to the type attribute
        used to represent the attachment.

        (WebCore::attachmentForFilePath):

        Use the content type, if specified; otherwise, fall back to deducing it from the file path.

        (WebCore::attachmentForData):
        (WebCore::WebContentReader::readFilePath):
        * platform/Pasteboard.h:
        (WebCore::PasteboardWebContentReader::readFilePath):

        Pass the highest fidelity representation's content type to the web content reader.

        * platform/ios/PasteboardIOS.mm:
        (WebCore::Pasteboard::readRespectingUTIFidelities):

2019-05-28  Myles C. Maxfield  <mmaxfield@apple.com>

        Move idempotent text autosizing to StyleTreeResolver
        https://bugs.webkit.org/show_bug.cgi?id=197808
        <rdar://problem/50283983>

        Reviewed by Antti Koivisto.

        This patch migrates the idempotent text autosizing code to live inside style resolution. This is almost
        the same as the algorithm that uses the result of layout to calculate autosizing, but this version only
        operates on style (and thus doesn't require double layouts). Because it is being run in an environment
        with less information, autosizing is occurring in more places, so the curves have been adjusted to make
        autosizing not boost as much as the previous implementation did. The new algorithm is modelled after
        text-decorations-in-effect. I've claimed 4 of the unused bits in RenderStyle to contain the state of the
        autosizing algorithm. StyleResolver::adjustRenderStyle() is where the algorithm is implemented:
        - Look at the inherited bits
        - Interogate the element's RenderStyle
        - Compute new bits for the element, and set them in its RenderStyle
        - Based on the newly computed bits, determine whether we should increase the text size
        - If so, determine how much using the specified font size, and apply the result to the computed font size

        This works because StyleBuilderCustom::applyInheritFontSize() inherits from the specified font size, not
        the computed font size.

        This patch also will disable autosizing using the other methods (so there aren't two methods of autosizing
        fighting each other) and will honor text-size-adjust:none. However, it won't honor text-size-adjust:100%.
        If content says text-size-adjust:100%, we will disregard it and take this code path.

        Tests: fast/text-autosizing/ios/idempotentmode/css-exposure.html
               fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-skip.html
               fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-identity.html
               fast/text-autosizing/ios/idempotentmode/idempotent-autosizing.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
        * css/CSSProperties.json:
        * css/StyleBuilderCustom.h:
        (WebCore::computeBaseSpecifiedFontSize):
        (WebCore::computeLineHeightMultiplierDueToFontSize):
        * css/StyleResolver.cpp:
        (WebCore::idempotentTextSize):
        (WebCore::hasTextChildren):
        (WebCore::StyleResolver::adjustRenderStyle):
        (WebCore::StyleResolver::checkForTextSizeAdjust):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::applyTextSizingIfNeeded):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::adjustComputedFontSizes):
        (WebCore::idempotentTextSize): Deleted.
        * rendering/RenderBlockFlow.h:
        * rendering/RenderElement.cpp:
        (WebCore::includeNonFixedHeight):
        (WebCore::RenderElement::adjustComputedFontSizesOnBlocks):
        (WebCore::RenderElement::resetTextAutosizing):
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::RenderStyle):
        (WebCore::RenderStyle::autosizeStatus const):
        (WebCore::RenderStyle::setAutosizeStatus):
        * rendering/style/RenderStyle.h:
        * rendering/style/TextSizeAdjustment.cpp: Added.
        (WebCore::AutosizeStatus::AutosizeStatus):
        (WebCore::AutosizeStatus::contains const):
        (WebCore::AutosizeStatus::modifiedStatus const):
        (WebCore::AutosizeStatus::shouldSkipSubtree const):
        * rendering/style/TextSizeAdjustment.h:

2019-05-28  Simon Fraser  <simon.fraser@apple.com>

        Use scroll-velocity-based tile coverage for overflow:scroll
        https://bugs.webkit.org/show_bug.cgi?id=198294
        rdar://problem/48942184

        Reviewed by Tim Horton.

        Start using a velocity-based tile coverage computation on layers with Type::ScrolledContents,
        which is the content layers for overflow:scroll when they get big enough to get tiled.

        Move legacy macOS coverage code into adjustTileCoverageForDesktopPageScrolling() because
        I don't want to change its behavior in this patch. Use TileController::adjustTileCoverageRectForScrolling()
        for iOS and macOS overflow scrolling. Since only iOS page scrolling gets velocity data from the UI
        process, compute velocity in TileController using the visible rect top-left.
        
        For overflow scroll, we have to plumb horizontal and vertical coverage in from
        RenderLayerBacking.

        Tests: tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage.html
               tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage.html
               tiled-drawing/scrolling/overflow/overflow-tile-coverage.html

        * platform/graphics/TiledBacking.h:
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::adjustCoverageRect const):
        * platform/graphics/ca/PlatformCALayer.h:
        * platform/graphics/ca/TileController.cpp:
        (WebCore::TileController::setVelocity):
        (WebCore::TileController::adjustTileCoverageRect):
        (WebCore::TileController::adjustTileCoverageForDesktopPageScrolling const):
        (WebCore::TileController::adjustTileCoverageWithScrollingVelocity const):
        (WebCore::TileController::adjustTileCoverageRectForScrolling):
        (WebCore::expandRectWithinRect): Deleted.
        (WebCore::TileController::adjustTileCoverageRect const): Deleted.
        (WebCore::TileController::adjustTileCoverageRectForScrolling const): Deleted.
        * platform/graphics/ca/TileController.h:
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::computePageTiledBackingCoverage):
        (WebCore::computeOverflowTiledBackingCoverage):
        (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
        (WebCore::RenderLayerBacking::updateGeometry):

2019-05-28  Shawn Roberts  <sroberts@apple.com>

        Unreviewed, rolling out r245475.

        Newly imported test is flaky. Features need flags.

        Reverted changeset:

        "Implement imagesrcset and imagesizes attributes on link
        rel=preload"
        https://bugs.webkit.org/show_bug.cgi?id=192950
        https://trac.webkit.org/changeset/245475

2019-05-28  Brent Fulgham  <bfulgham@apple.com>

        Protect frames during style and layout changes
        https://bugs.webkit.org/show_bug.cgi?id=198047
        <rdar://problem/50954082>

        Reviewed by Zalan Bujtas.

        Be more careful about the scope and lifetime of objects that participate in layout or
        style updates. If a method decides a layout or style update is needed, it needs to
        confirm that the elements it was operating on are still valid and needed in the
        current operation.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::getOrCreate):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::accessibilityHitTest const):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
        * css/CSSComputedStyleDeclaration.h:
        * css/SVGCSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::svgPropertyValue):
        * dom/Document.cpp:
        (WebCore::Document::setFocusedElement):
        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::insertTextRunWithoutNewlines):
        (WebCore::TypingCommand::insertLineBreak):
        (WebCore::TypingCommand::insertParagraphSeparator):
        (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
        * editing/ios/EditorIOS.mm:
        (WebCore::Editor::setDictationPhrasesAsChildOfElement):
        * html/HTMLLabelElement.cpp:
        (WebCore::HTMLLabelElement::focus):
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::appendFormData):
        * html/ImageDocument.cpp:
        (WebCore::ImageDocument::imageClicked):
        * html/ValidationMessage.cpp:
        (WebCore::ValidationMessage::buildBubbleTree):
        * page/FrameView.cpp:
        (WebCore::FrameView::autoSizeIfEnabled):
        (WebCore::FrameView::trackedRepaintRectsAsText const):
        * page/PrintContext.cpp:
        (WebCore::PrintContext::pageProperty):
        (WebCore::PrintContext::numberOfPages):
        (WebCore::PrintContext::spoolAllPagesWithBoundaries):

2019-05-28  Antti Koivisto  <antti@apple.com>

        [async scrolling] Fixed positioning inside stacking context overflow scroll is jumpy
        https://bugs.webkit.org/show_bug.cgi?id=198292

        Reviewed by Darin Adler.

        Tests: scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll-2.html
               scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll.html

        We were computing delta from the layout scroll position in ScrollingTree::notifyRelatedNodesAfterScrollPositionChange
        based on the passed in node only. If any other node had deltas they were not taken into account at all. This would occur
        frequently since the function is always invoked for the root node after layer tree commit.

        Fix by moving the delta computation (and fetching layoutViewport) to ScrollingTreeFixedNode.

        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::applyLayerPositions):

        No need to pass offset and layoutViewport around anymore.

        (WebCore::ScrollingTree::applyLayerPositionsRecursive):
        (WebCore::ScrollingTree::notifyRelatedNodesAfterScrollPositionChange):

        Remove the offset and layoutViewport computations.

        (WebCore::ScrollingTree::notifyRelatedNodesRecursive):
        * page/scrolling/ScrollingTree.h:
        * page/scrolling/ScrollingTreeFrameHostingNode.cpp:
        (WebCore::ScrollingTreeFrameHostingNode::applyLayerPositions):
        * page/scrolling/ScrollingTreeFrameHostingNode.h:
        * page/scrolling/ScrollingTreeNode.cpp:
        (WebCore::ScrollingTreeNode::relatedNodeScrollPositionDidChange):
        * page/scrolling/ScrollingTreeNode.h:
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::applyLayerPositions):
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/cocoa/ScrollingTreeFixedNode.h:
        * page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
        (WebCore::ScrollingTreeFixedNode::applyLayerPositions):

        Compute them here instead, always taking all overflow scrollers up to the closest frame into account.

        * page/scrolling/cocoa/ScrollingTreePositionedNode.h:
        * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
        (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
        (WebCore::ScrollingTreePositionedNode::relatedNodeScrollPositionDidChange):
        * page/scrolling/cocoa/ScrollingTreeStickyNode.h:
        * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
        (WebCore::ScrollingTreeStickyNode::applyLayerPositions):

2019-05-28  Zalan Bujtas  <zalan@apple.com>

        [LFC][Verification] Add additional inline and block checks
        https://bugs.webkit.org/show_bug.cgi?id=198252
        <rdar://problem/51140687>

        Reviewed by Antti Koivisto.

        Now we also test the geometry of the blocks with inline formatting contexts.

        * layout/Verification.cpp:
        (WebCore::Layout::checkForMatchingTextRuns):
        (WebCore::Layout::verifyAndOutputSubtree):

2019-05-28  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Decouple line layout and processing inline runs.
        https://bugs.webkit.org/show_bug.cgi?id=198282
        <rdar://problem/51167954>

        Reviewed by Antti Koivisto.

        This is in preparation for using "createInlineRunsForLine" logic when computing preferred width.

        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::UncommittedContent::size const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::createInlineRunsForLine const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::processInlineRuns const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::closeLine const): Deleted.
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::addInlineItem):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):

2019-05-28  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move intrinsic width computation from InlineFormattingContext to LineLayout
        https://bugs.webkit.org/show_bug.cgi?id=198258

        Reviewed by Antti Koivisto.

        This is in preparation for sharing even more code between line layout and preferred width computation. 

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layout const):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::initializeLine const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::closeLine const):

2019-05-28  Zalan Bujtas  <zalan@apple.com>

        [LFC[IFC] Ignore the initial strut's height when the line does not have any content.
        https://bugs.webkit.org/show_bug.cgi?id=198268
        <rdar://problem/51150057>

        Reviewed by Antti Koivisto.

        The strut (https://www.w3.org/TR/CSS22/visudet.html#leading) defines the initial logical height
        for the line. This height should be ignored though when the line does not have any content. 

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::closeLine const):

2019-05-27  Antoine Quint  <graouts@apple.com>

        [Pointer Events] Check that capturing data managed by the PointerCaptureController gets cleared upon navigation
        https://bugs.webkit.org/show_bug.cgi?id=198191

        Reviewed by Dean Jackson.

        When the document of the page's main frame changes, make sure we clear all of the data accumulated for the previous document.
        I don't think this particular change is testable as none of the data contained in the PointerIdToCapturingDataMap maintained by
        the PointerCaptureController contains any data that could be inspected by the page due to other fixes landed to fix wkb.ug/198129,
        but I've checked that removing those fixes and using this patch correctly fixes that bug.

        * page/Page.cpp:
        (WebCore::Page::didChangeMainDocument):
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::PointerCaptureController):
        (WebCore::PointerCaptureController::reset):
        * page/PointerCaptureController.h:

2019-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Use WPEBackend-fdo for accelerating compositing in Wayland instead of the nested compositor
        https://bugs.webkit.org/show_bug.cgi?id=197944

        Reviewed by Michael Catanzaro.

        * PlatformGTK.cmake:
        * SourcesGTK.txt:
        * platform/graphics/GLContext.cpp:
        (WebCore::GLContext::createContextForWindow): Check current display is X11 before trying to create a GLX context.
        * platform/graphics/PlatformDisplay.cpp:
        (WebCore::PlatformDisplay::createPlatformDisplay): Use USE(WPE_RENDERER) instead of USE(LIBWPE).
        * platform/graphics/PlatformDisplay.h:
        * platform/graphics/egl/GLContextEGL.cpp:
        (WebCore::GLContextEGL::createWindowContext): Use USE(WPE_RENDERER) instead of PLATFORM(WPE).
        (WebCore::GLContextEGL::createContext): Ditto.
        (WebCore::GLContextEGL::createSharingContext): Ditto.
        (WebCore::GLContextEGL::~GLContextEGL): Ditto.
        * platform/graphics/egl/GLContextEGL.h:
        * platform/graphics/egl/GLContextEGLLibWPE.cpp:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): Ditto.
        * platform/graphics/libwpe/PlatformDisplayLibWPE.cpp:
        (WebCore::PlatformDisplayLibWPE::PlatformDisplayLibWPE): In GTK port set the display as the shared one for compositing.
        * platform/graphics/libwpe/PlatformDisplayLibWPE.h:

2019-05-27  Takashi Komori  <Takashi.Komori@sony.com>

        [CURL] Fix crashing SocketStreamHandle.
        https://bugs.webkit.org/show_bug.cgi?id=197873

        Reviewed by Fujii Hironori.

        When NetworkSocketStream was destructed SocketStreamHandleImple::platformClose was called wrongly times.
        This is because closed state is not set.

        Test: http/tests/websocket/tests/hybi/workers/close.html

        * platform/network/curl/SocketStreamHandleImpl.h:
        * platform/network/curl/SocketStreamHandleImplCurl.cpp:
        (WebCore::SocketStreamHandleImpl::platformSendInternal):
        (WebCore::SocketStreamHandleImpl::platformClose):
        (WebCore::SocketStreamHandleImpl::threadEntryPoint):
        (WebCore::SocketStreamHandleImpl::handleError):
        (WebCore::SocketStreamHandleImpl::callOnWorkerThread):
        (WebCore::SocketStreamHandleImpl::executeTasks):

2019-05-27  Oriol Brufau  <obrufau@igalia.com>

        [css-grid] Preserve repeat() notation when serializing declared values
        https://bugs.webkit.org/show_bug.cgi?id=197840

        Reviewed by Manuel Rego Casasnovas.

        Tests: fast/css-grid-layout/grid-element-auto-repeat-get-set.html
               fast/css-grid-layout/grid-repeat-calc.html
               fast/css-grid-layout/named-grid-line-get-set.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html

        Before this change, a repeat() notation with an integral number of
        repetitions was expanded at parse time. This was observable when reading
        declared values using JS APIs.

        This patch makes the parser preserve that notation, like it was already
        happening when the number of repetitions was automatic and not integral.

        The resolved value in getComputedStyle() will still be expanded, though,
        as required by the spec.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSGridIntegerRepeatValue.cpp: Added.
        (WebCore::CSSGridIntegerRepeatValue::customCSSText const):
        (WebCore::CSSGridIntegerRepeatValue::equals const):
        * css/CSSGridIntegerRepeatValue.h: Added.
        * css/CSSValue.cpp:
        (WebCore::CSSValue::equals const):
        (WebCore::CSSValue::cssText const):
        (WebCore::CSSValue::destroy):
        * css/CSSValue.h:
        (WebCore::CSSValue::isGridIntegerRepeatValue const):
        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::createGridTrackList):
        (WebCore::StyleBuilderConverter::convertGridTrackSizeList):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeGridTrackRepeatFunction):

2019-05-27  Chris Dumez  <cdumez@apple.com>

        Use a strongly-typed identifier for pages
        https://bugs.webkit.org/show_bug.cgi?id=198206

        Reviewed by Youenn Fablet.

        * WebCore/*:

2019-05-26  Simon Fraser  <simon.fraser@apple.com>

        Move GraphicsLayerCA::adjustTiledLayerVisibleRect() to TileController
        https://bugs.webkit.org/show_bug.cgi?id=198266

        Reviewed by Zalan Bujtas.

        GraphicsLayerCA::adjustTiledLayerVisibleRect() was computing tile coverage for a
        TiledBacking, just like TileController::adjustTileCoverageRect(), so move the code
        into TileController as a first step to unifying more of this code. It's currently
        used for tiled compositing layers, including overflow:scroll, and tiled layers
        whose coverage may be affected by animations, so it's general-purpose.

        TileController::adjustTileCoverageRect() is used for scrollable things, so rename
        it to adjustTileCoverageRectForScrolling().

        No behavior change.

        * platform/graphics/TiledBacking.h:
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::adjustCoverageRect const):
        (WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect): Deleted.
        * platform/graphics/ca/GraphicsLayerCA.h:
        * platform/graphics/ca/TileController.cpp:
        (WebCore::TileController::adjustTileCoverageRect const):
        (WebCore::TileController::adjustTileCoverageRectForScrolling const):
        * platform/graphics/ca/TileController.h:

2019-05-27  Simon Fraser  <simon.fraser@apple.com>

        Fix Apple Internal builds after r245788.

        * platform/PlatformScreen.h:
        (WebCore::screenHasTouchDevice):
        (WebCore::screenIsTouchPrimaryInputDevice):

2019-05-27  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Ignore collapsed runs when setting the width on the associated display boxes.
        https://bugs.webkit.org/show_bug.cgi?id=198260
        <rdar://problem/51145704>

        Reviewed by Antti Koivisto.

        Collapsed runs don't contribute to the logical width of their containers.

        Covered by existing tests.

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::closeLine const):

2019-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK distcheck

        Move mac headers to platform specific makefile.

        * Headers.cmake:
        * PlatformMac.cmake:

2019-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        Touch support is reported even when the device doesn't have a touch screen
        https://bugs.webkit.org/show_bug.cgi?id=139681

        Reviewed by Michael Catanzaro.

        Add screenHasTouchDevice() and screenIsTouchPrimaryInputDevice() to PlatformScreen and use it to decide whether
        to expose touch events functionality or not.

        * bindings/js/WebCoreBuiltinNames.h:
        * css/MediaQueryEvaluator.cpp:
        (WebCore::hoverEvaluate): Use screenIsTouchPrimaryInputDevice() when touch events are enabled at build time.
        (WebCore::anyHoverEvaluate): Use screenHasTouchDevice() when touch events are enabled at build time.
        (WebCore::pointerEvaluate): Use screenIsTouchPrimaryInputDevice() when touch events are enabled at build time.
        (WebCore::anyPointerEvaluate): Use screenHasTouchDevice() when touch events are enabled at build time.
        * dom/GlobalEventHandlers.idl: Make touch event attributes enabled at runtime.
        * page/RuntimeEnabledFeatures.cpp:
        (WebCore::RuntimeEnabledFeatures::touchEventsEnabled const): Return whether touch events are enabled.
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setTouchEventsEnabled): Force touch events to be enabled or disabled.
        * platform/PlatformScreen.h:
        (WebCore::screenHasTouchDevice): Just return true when touch events are enabled at build time for non-gtk ports.
        (WebCore::screenIsTouchPrimaryInputDevice): Ditto.
        * platform/gtk/PlatformScreenGtk.cpp:
        (WebCore::screenHasTouchDevice):
        (WebCore::screenIsTouchPrimaryInputDevice):
        (WebCore::isTouchDevice):
        (WebCore::deviceAddedCallback):
        (WebCore::deviceRemovedCallback):

2019-05-26  Simon Fraser  <simon.fraser@apple.com>

        Move VelocityData to WebCore
        https://bugs.webkit.org/show_bug.cgi?id=198261

        Reviewed by Antti Koivisto.

        Move VelocityData and HistoricalVelocityData to WebCore for future use in overflow scroll.
        
        VisibleContentRectUpdateInfo can now store a VelocityData (its timestamp is used as
        the timetamp for the entire update).

        No behavior change.

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * page/FrameView.cpp:
        (WebCore::FrameView::setScrollVelocity):
        * page/FrameView.h:
        * platform/graphics/TiledBacking.h:
        (WebCore::VelocityData::VelocityData): Deleted.
        (WebCore::VelocityData::velocityOrScaleIsChanging const): Deleted.
        * platform/graphics/ca/TileController.cpp:
        (WebCore::TileController::adjustTileCoverageRect const):
        * platform/graphics/ca/TileController.h:

2019-05-26  Simon Fraser  <simon.fraser@apple.com>

        Add a GraphicsLayer::Type for ScrolledContents
        https://bugs.webkit.org/show_bug.cgi?id=198257

        Reviewed by Zalan Bujtas.

        This ScrolledContents layer type will be used to choose different tiling behaviors
        in a future patch.

        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::supportsLayerType):
        * platform/graphics/GraphicsLayer.h:
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayer::supportsLayerType):
        (WebCore::GraphicsLayerCA::initialize):
        (WebCore::GraphicsLayerCA::adjustCoverageRect const):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateScrollingLayers):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::ensureRootLayer):

2019-05-26  John Wilander  <wilander@apple.com>

        Resource Load Statistics: Downgrade document.referrer to the referrer's eTLD+1 if the page was navigated to with a prevalent resource referrer containing link decoration
        https://bugs.webkit.org/show_bug.cgi?id=198227
        <rdar://problem/51117258>

        Reviewed by Alex Christensen.

        Test: http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource.html

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::referrer const):
            Now checks if the referrer has been overridden.
        (WebCore::Document::wasLoadedWithDataTransferFromPrevalentResource):
        (WebCore::Document::downgradeReferrerToRegistrableDomain):
        * dom/Document.h:
        * page/CrossSiteNavigationDataTransfer.h: Added.
            New option set for the growing number of navigational data transfers we care about.
        * platform/network/NetworkStorageSession.cpp:
        (WebCore::NetworkStorageSession::didCommitCrossSiteLoadWithDataTransferFromPrevalentResource):
        (WebCore::NetworkStorageSession::committedCrossSiteLoadWithLinkDecoration): Deleted.
            New name since we no longer only look for link decoration but also other means of navigational data transfer.
        * platform/network/NetworkStorageSession.h:

2019-05-26  Zalan Bujtas  <zalan@apple.com>

        [LFC][Verification] Add areEssentiallyEqual for LayoutRect
        https://bugs.webkit.org/show_bug.cgi?id=198250
        <rdar://problem/51140119>

        Reviewed by Antti Koivisto.

        WebKit's inline layout is a mix of int/float/LayoutUnit types, while LFC mostly uses LayoutUnit.
        When we compute the used size of a block container (based on the inline tree), the final value might go through a few conversions.

        * layout/Verification.cpp:
        (WebCore::Layout::areEssentiallyEqual):
        (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):

2019-05-26  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Dropped text, attachments, and images should animate into place
        https://bugs.webkit.org/show_bug.cgi?id=198243
        <rdar://problem/35205373>

        Reviewed by Tim Horton.

        Add some hooks to notify the chrome client when an HTMLImageElement's image is finished loading. See WebKit
        changelog for more detail.

        Test: DragAndDropTests.DropPreviewForImageInEditableArea

        * loader/EmptyClients.h:
        * page/ChromeClient.h:
        * page/Page.cpp:
        (WebCore::Page::didFinishLoadingImageForElement):
        * page/Page.h:
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::notifyFinished):

2019-05-25  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Introduce DisplayRun to display tree
        https://bugs.webkit.org/show_bug.cgi?id=197198

        Reviewed by Antti Koivisto.

        Add a simple inline layout implementation. Now we've got DisplayBoxes for layout boxes and
        DisplayRuns for inline runs.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::contentHeightForFormattingContextRoot):
        * layout/Verification.cpp:
        (WebCore::Layout::areEssentiallyEqual):
        (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
        (WebCore::Layout::checkForMatchingNonTextRuns):
        (WebCore::Layout::checkForMatchingTextRuns):
        (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
        (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
        (WebCore::Layout::resolveForRelativePositionIfNeeded): Deleted.
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        * layout/displaytree/DisplayBox.cpp:
        (WebCore::Display::Box::marginBox const):
        (WebCore::Display::Box::nonCollapsedMarginBox const):
        (WebCore::Display::Box::borderBox const):
        (WebCore::Display::Box::paddingBox const):
        (WebCore::Display::Box::contentBox const):
        (WebCore::Display::Box::Rect::Rect): Deleted.
        * layout/displaytree/DisplayBox.h:
        (WebCore::Display::Box::rectWithMargin const):
        (WebCore::Display::Box::horizontalMargin const):
        (WebCore::Display::Box::Rect::intersects const): Deleted.
        (WebCore::Display::Box::Rect::invalidateTop): Deleted.
        (WebCore::Display::Box::Rect::invalidateLeft): Deleted.
        (WebCore::Display::Box::Rect::invalidateWidth): Deleted.
        (WebCore::Display::Box::Rect::invalidateHeight): Deleted.
        (WebCore::Display::Box::Rect::hasValidPosition const): Deleted.
        (WebCore::Display::Box::Rect::hasValidSize const): Deleted.
        (WebCore::Display::Box::Rect::hasValidGeometry const): Deleted.
        (WebCore::Display::Box::Rect::invalidatePosition): Deleted.
        (WebCore::Display::Box::Rect::setHasValidPosition): Deleted.
        (WebCore::Display::Box::Rect::setHasValidSize): Deleted.
        (WebCore::Display::Box::Rect::top const): Deleted.
        (WebCore::Display::Box::Rect::left const): Deleted.
        (WebCore::Display::Box::Rect::bottom const): Deleted.
        (WebCore::Display::Box::Rect::right const): Deleted.
        (WebCore::Display::Box::Rect::topLeft const): Deleted.
        (WebCore::Display::Box::Rect::bottomRight const): Deleted.
        (WebCore::Display::Box::Rect::size const): Deleted.
        (WebCore::Display::Box::Rect::width const): Deleted.
        (WebCore::Display::Box::Rect::height const): Deleted.
        (WebCore::Display::Box::Rect::setTopLeft): Deleted.
        (WebCore::Display::Box::Rect::setTop): Deleted.
        (WebCore::Display::Box::Rect::setLeft): Deleted.
        (WebCore::Display::Box::Rect::setWidth): Deleted.
        (WebCore::Display::Box::Rect::setHeight): Deleted.
        (WebCore::Display::Box::Rect::setSize): Deleted.
        (WebCore::Display::Box::Rect::shiftLeftTo): Deleted.
        (WebCore::Display::Box::Rect::shiftRightTo): Deleted.
        (WebCore::Display::Box::Rect::shiftTopTo): Deleted.
        (WebCore::Display::Box::Rect::shiftBottomTo): Deleted.
        (WebCore::Display::Box::Rect::moveHorizontally): Deleted.
        (WebCore::Display::Box::Rect::moveVertically): Deleted.
        (WebCore::Display::Box::Rect::expand): Deleted.
        (WebCore::Display::Box::Rect::clone const): Deleted.
        (WebCore::Display::Box::Rect::operator LayoutRect const): Deleted.
        * layout/displaytree/DisplayRect.h: Added.
        (WebCore::Display::Rect::expandHorizontally):
        (WebCore::Display::Rect::expandVertically):
        (WebCore::Display::Rect::intersects const):
        (WebCore::Display::Rect::invalidateTop):
        (WebCore::Display::Rect::invalidateLeft):
        (WebCore::Display::Rect::invalidateWidth):
        (WebCore::Display::Rect::invalidateHeight):
        (WebCore::Display::Rect::hasValidPosition const):
        (WebCore::Display::Rect::hasValidSize const):
        (WebCore::Display::Rect::hasValidGeometry const):
        (WebCore::Display::Rect::Rect):
        (WebCore::Display::Rect::invalidatePosition):
        (WebCore::Display::Rect::setHasValidPosition):
        (WebCore::Display::Rect::setHasValidSize):
        (WebCore::Display::Rect::top const):
        (WebCore::Display::Rect::left const):
        (WebCore::Display::Rect::bottom const):
        (WebCore::Display::Rect::right const):
        (WebCore::Display::Rect::topLeft const):
        (WebCore::Display::Rect::bottomRight const):
        (WebCore::Display::Rect::size const):
        (WebCore::Display::Rect::width const):
        (WebCore::Display::Rect::height const):
        (WebCore::Display::Rect::setTopLeft):
        (WebCore::Display::Rect::setTop):
        (WebCore::Display::Rect::setLeft):
        (WebCore::Display::Rect::setWidth):
        (WebCore::Display::Rect::setHeight):
        (WebCore::Display::Rect::setSize):
        (WebCore::Display::Rect::shiftLeftTo):
        (WebCore::Display::Rect::shiftRightTo):
        (WebCore::Display::Rect::shiftTopTo):
        (WebCore::Display::Rect::shiftBottomTo):
        (WebCore::Display::Rect::moveHorizontally):
        (WebCore::Display::Rect::moveVertically):
        (WebCore::Display::Rect::expand):
        (WebCore::Display::Rect::clone const):
        (WebCore::Display::Rect::operator LayoutRect const):
        * layout/displaytree/DisplayRun.h: Renamed from Source/WebCore/layout/inlineformatting/InlineRun.h.
        (WebCore::Display::Run::TextContext::start const):
        (WebCore::Display::Run::TextContext::end const):
        (WebCore::Display::Run::TextContext::length const):
        (WebCore::Display::Run::TextContext::expand):
        (WebCore::Display::Run::logicalTopLeft const):
        (WebCore::Display::Run::logicalLeft const):
        (WebCore::Display::Run::logicalRight const):
        (WebCore::Display::Run::logicalTop const):
        (WebCore::Display::Run::logicalBottom const):
        (WebCore::Display::Run::logicalWidth const):
        (WebCore::Display::Run::logicalHeight const):
        (WebCore::Display::Run::setLogicalWidth):
        (WebCore::Display::Run::setLogicalTop):
        (WebCore::Display::Run::setLogicalLeft):
        (WebCore::Display::Run::setLogicalRight):
        (WebCore::Display::Run::moveVertically):
        (WebCore::Display::Run::moveHorizontally):
        (WebCore::Display::Run::expandVertically):
        (WebCore::Display::Run::expandHorizontally):
        (WebCore::Display::Run::setTextContext):
        (WebCore::Display::Run::textContext):
        (WebCore::Display::Run::textContext const):
        (WebCore::Display::Run::Run):
        (WebCore::Display::Run::TextContext::TextContext):
        * layout/floats/FloatAvoider.cpp:
        (WebCore::Layout::FloatAvoider::rectInContainingBlock const):
        * layout/floats/FloatAvoider.h:
        (WebCore::Layout::FloatAvoider::rect const):
        * layout/floats/FloatBox.cpp:
        (WebCore::Layout::FloatBox::rect const):
        * layout/floats/FloatBox.h:
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatPair::intersects const):
        * layout/floats/FloatingState.h:
        (WebCore::Layout::FloatingState::FloatItem::rectWithMargin const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layout const):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const):
        (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox const):
        (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer const):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFloatBox const):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForInlineBlock const):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin const):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
        (WebCore::Layout::InlineFormattingContext::collectInlineContent const):
        (WebCore::Layout::InlineFormattingContext::computeMargin const): Deleted.
        (WebCore::Layout::addDetachingRules): Deleted.
        (WebCore::Layout::createAndAppendInlineItem): Deleted.
        * layout/inlineformatting/InlineFormattingContext.h:
        (WebCore::Layout::InlineFormattingContext::LineLayout::layoutState const):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::halfLeadingMetrics):
        (WebCore::Layout::Line::availableWidth const):
        (WebCore::Layout::Line::contentLogicalRight const):
        (WebCore::Layout::Line::contentLogicalWidth const):
        (WebCore::Layout::Line::logicalTop const):
        (WebCore::Layout::Line::logicalLeft const):
        (WebCore::Layout::Line::logicalRight const):
        (WebCore::Layout::Line::logicalBottom const):
        (WebCore::Layout::Line::logicalWidth const):
        (WebCore::Layout::Line::logicalHeight const):
        (WebCore::Layout::Line::LineItem::LineItem):
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::reset):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::removeTrailingTrimmableContent):
        (WebCore::Layout::Line::moveLogicalLeft):
        (WebCore::Layout::Line::moveLogicalRight):
        (WebCore::Layout::isTrimmableContent):
        (WebCore::Layout::Line::trailingTrimmableWidth const):
        (WebCore::Layout::Line::hasContent const):
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendInlineContainerEnd):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonTextContent):
        (WebCore::Layout::Line::appendHardLineBreak):
        (WebCore::Layout::UncommittedContent::isEmpty const):
        (WebCore::Layout::UncommittedContent::width const):
        (WebCore::Layout::UncommittedContent::add):
        (WebCore::Layout::UncommittedContent::reset):
        (WebCore::Layout::InlineFormattingContext::LineLayout::LineLayout):
        (WebCore::Layout::InlineFormattingContext::LineLayout::initializeLine const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::closeLine const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::handleFloat const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::commitInlineItemToLine const):
        (WebCore::Layout::horizontalAdjustmentForAlignment):
        (WebCore::Layout::InlineFormattingContext::LineLayout::alignRuns const):
        (WebCore::Layout::Line::isClosed const): Deleted.
        (WebCore::Layout::Line::isFirstLine const): Deleted.
        (WebCore::Layout::Line::runs): Deleted.
        (WebCore::Layout::Line::contentLogicalLeft const): Deleted.
        (WebCore::Layout::Line::lastRunType const): Deleted.
        (WebCore::Layout::Line::init): Deleted.
        (WebCore::Layout::Line::adjustLogicalLeft): Deleted.
        (WebCore::Layout::Line::adjustLogicalRight): Deleted.
        (WebCore::Layout::Line::appendContent): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::initializeNewLine const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::splitInlineRunIfNeeded const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::createFinalRuns const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::postProcessInlineRuns const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::appendContentToLine const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::computeFloatPosition const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInFlowPositionedChildren const): Deleted.
        (WebCore::Layout::adjustedLineLogicalLeft): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::justifyRuns): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::computeExpansionOpportunities const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::runWidth const): Deleted.
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::inlineItems):
        (WebCore::Layout::InlineFormattingState::lineBoxes):
        (WebCore::Layout::InlineFormattingState::addInlineItem):
        (WebCore::Layout::InlineFormattingState::addInlineRun):
        (WebCore::Layout::InlineFormattingState::addLineBox):
        (WebCore::Layout::InlineFormattingState::inlineContent): Deleted.
        (WebCore::Layout::InlineFormattingState::lastInlineItem const): Deleted.
        (WebCore::Layout::InlineFormattingState::appendInlineRun): Deleted.
        * layout/inlineformatting/InlineItem.h:
        (WebCore::Layout::InlineItem::type const):
        (WebCore::Layout::InlineItem::isText const):
        (WebCore::Layout::InlineItem::isBox const):
        (WebCore::Layout::InlineItem::isHardLineBreak const):
        (WebCore::Layout::InlineItem::isFloat const):
        (WebCore::Layout::InlineItem::isLineBreak const):
        (WebCore::Layout::InlineItem::isContainerStart const):
        (WebCore::Layout::InlineItem::isContainerEnd const):
        (WebCore::Layout::InlineItem::InlineItem):
        (WebCore::Layout::InlineItem::setWidth):
        (WebCore::Layout::InlineItem::width const):
        (WebCore::Layout::InlineItem::addDetachingRule): Deleted.
        (WebCore::Layout::InlineItem::detachingRules const): Deleted.
        (WebCore::Layout::InlineItem::nonBreakableStart const): Deleted.
        (WebCore::Layout::InlineItem::nonBreakableEnd const): Deleted.
        (WebCore::Layout::InlineItem::addNonBreakableStart): Deleted.
        (WebCore::Layout::InlineItem::addNonBreakableEnd): Deleted.
        (WebCore::Layout::InlineItem::textContent const): Deleted.
        * layout/inlineformatting/InlineLineBox.h: Copied from Source/WebCore/layout/floats/FloatBox.h.
        (WebCore::Layout::LineBox::logicalTopLeft const):
        (WebCore::Layout::LineBox::logicalLeft const):
        (WebCore::Layout::LineBox::logicalRight const):
        (WebCore::Layout::LineBox::logicalTop const):
        (WebCore::Layout::LineBox::logicalBottom const):
        (WebCore::Layout::LineBox::logicalWidth const):
        (WebCore::Layout::LineBox::logicalHeight const):
        (WebCore::Layout::LineBox::LineBox):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::LineBreaker):
        (WebCore::Layout::LineBreaker::breakingContext):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::runWidth const):
        (WebCore::Layout::LineBreaker::isAtBreakingOpportunity):
        (WebCore::Layout::LineBreaker::textWidth const):
        (WebCore::Layout::InlineLineBreaker::InlineLineBreaker): Deleted.
        (WebCore::Layout::InlineLineBreaker::nextRun): Deleted.
        (WebCore::Layout::InlineLineBreaker::isAtContentEnd const): Deleted.
        (WebCore::Layout::InlineLineBreaker::lineBreakingBehavior): Deleted.
        (WebCore::Layout::InlineLineBreaker::runWidth const): Deleted.
        (WebCore::Layout::InlineLineBreaker::textWidth const): Deleted.
        (WebCore::Layout::InlineLineBreaker::splitRun): Deleted.
        (WebCore::Layout::InlineLineBreaker::adjustSplitPositionWithHyphenation const): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/InlineRunProvider.cpp: Removed.
        * layout/inlineformatting/InlineRunProvider.h: Removed.
        * layout/inlineformatting/InlineTextItem.cpp: Added.
        (WebCore::Layout::isWhitespaceCharacter):
        (WebCore::Layout::isSoftLineBreak):
        (WebCore::Layout::moveToNextNonWhitespacePosition):
        (WebCore::Layout::moveToNextBreakablePosition):
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        (WebCore::Layout::InlineTextItem::InlineTextItem):
        * layout/inlineformatting/InlineTextItem.h: Copied from Source/WebCore/layout/inlineformatting/text/TextUtil.h.
        (WebCore::Layout::InlineTextItem::start const):
        (WebCore::Layout::InlineTextItem::end const):
        (WebCore::Layout::InlineTextItem::length const):
        (WebCore::Layout::InlineTextItem::isWhitespace const):
        (WebCore::Layout::InlineTextItem::isCollapsed const):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::hyphenPositionBefore):
        (WebCore::Layout::TextUtil::width):
        (WebCore::Layout::TextUtil::fixedPitchWidth):
        * layout/inlineformatting/text/TextUtil.h:
        * layout/layouttree/LayoutBox.h:
        * layout/layouttree/LayoutReplaced.cpp:
        (WebCore::Layout::Replaced::intrinsicRatio const):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::accumulatedOffsetForInFlowPositionedContinuation):
        (WebCore::Layout::TreeBuilder::createSubTree):
        (WebCore::Layout::outputInlineRuns):
        (WebCore::Layout::outputLayoutBox):

2019-05-25  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Respect -[NSItemProvider preferredPresentationSize] when dropping images
        https://bugs.webkit.org/show_bug.cgi?id=198242

        Reviewed by Beth Dakin.

        Teach the web content reader to respect the -preferredPresentationSize when creating attachment-backed image
        elements. See below for more details.

        Test: WKAttachmentTestsIOS.InsertDroppedImageWithPreferredPresentationSize

        * editing/WebContentReader.h:
        * editing/cocoa/WebContentReaderCocoa.mm:
        (WebCore::attachmentForFilePath):
        (WebCore::attachmentForData):

        When creating attachment-backed image elements, additionally set width and height attributes from the preferred
        presentation size, if specified.

        (WebCore::WebContentReader::readFilePath):

        Add a version of readFilePath that takes a single file path, and an optional preferred presentation size.

        (WebCore::WebContentReader::readFilePaths):

        Reimplement readFilePaths in terms of readFilePath.

        (WebCore::WebContentReader::readDataBuffer):

        Add more plumbing for preferredPresentationSize.

        * platform/Pasteboard.h:
        (WebCore::PasteboardWebContentReader::readFilePath):
        (WebCore::PasteboardWebContentReader::readDataBuffer):
        * platform/ios/PasteboardIOS.mm:
        (WebCore::Pasteboard::read):
        (WebCore::Pasteboard::readRespectingUTIFidelities):

        Forward PasteboardItemInfo's preferredPresentationSize to the web content reader.

2019-05-25  Antoine Quint  <graouts@apple.com>

        Opt naver.com into simulated mouse events quirk on iOS
        https://bugs.webkit.org/show_bug.cgi?id=198248
        <rdar://problem/50598281>

        Reviewed by Brent Fulgham.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

2019-05-25  Youenn Fablet  <youenn@apple.com>

        media/video-remote-control-playpause.html is timing out after r245712
        https://bugs.webkit.org/show_bug.cgi?id=198238

        Reviewed by Eric Carlson.

        Fix regression introduced in r245712.
        Covered by test no longer timing out.

        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):

2019-05-25  Simon Fraser  <simon.fraser@apple.com>

        [Async overflow scrolling] Absolute positioned element inside async overflow scroll didn't get composited sometimes
        https://bugs.webkit.org/show_bug.cgi?id=198237

        Reviewed by Antti Koivisto.

        The logic in requiresCompositingForIndirectReason() that decides if we need to do
        compositing for a layer that needs to move independently of its enclosing scroller
        was wrong.

        Instead of asking question about the enclosing compositing layer, it needs to ask
        whether it has different positioning behavior from the layer that it would
        otherwise paint into, which is its paint-order parent.

        "paintsIntoProvidedBacking" already does a containing-block check against the
        scroller, so we know we don't have to do the check in that case.

        Test: scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::enclosingCompositedScrollingLayer):
        (WebCore::isScrolledByOverflowScrollLayer):
        (WebCore::isNonScrolledLayerInsideScrolledCompositedAncestor):
        (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
        * rendering/RenderLayerCompositor.h:

2019-05-25  Simon Fraser  <simon.fraser@apple.com>

        [macOS] Fix programmatic scroll in RTL overflow with async scrolling enabled
        https://bugs.webkit.org/show_bug.cgi?id=198226

        Reviewed by Antti Koivisto.

        On macOS we need to use a scroll offset to set the layer position, not
        a scroll position.

        Test: scrollingcoordinator/mac/rtl-programmatic-overflow-scroll.html

        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
        (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):

2019-05-24  Joonghun Park  <jh718.park@samsung.com>

        Make computed width of non-replaced inline return computed style.
        https://bugs.webkit.org/show_bug.cgi?id=197814

        Reviewed by Antti Koivisto.

        Currently, Computed width of non-replaced inline incorrectly returns "auto"
        instead of the computed value.
        This patch changes the behavior according to
        https://drafts.csswg.org/cssom/#resolved-value as below.

        'If the property applies to the element or pseudo-element
        and the resolved value of the display property is not none or contents,
        then the resolved value is the used value.
        Otherwise the resolved value is the computed value.'

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

2019-05-24  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Allow vertex attributes to have arbitrary names in the shader
        https://bugs.webkit.org/show_bug.cgi?id=198235

        Reviewed by Dean Jackson and Justin Fan.

        Metal doesn't allow arbitrary vertex attribute IDs. If you try to create a vertex attribute > 16,
        the Metal validation layer will assert. So, we need to have a mapping from whatever the WebGPU
        API says the vertex attribute IDs should be to the internally-used vertex attribute IDs.

        Test: webgpu/whlsl-arbitrary-vertex-attribute-locations.html

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::VertexEntryPointScaffolding):
        * Modules/webgpu/WHLSL/WHLSLPipelineDescriptor.h:
        * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
        (WebCore::WHLSL::matchVertexAttributes):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::convertRenderPipelineDescriptor):
        (WebCore::trySetInputStateForPipelineDescriptor):

2019-05-24  Timothy Hatcher  <timothy@apple.com>

        Refactor how showLetterpressedGlyphsWithAdvances gets the graphics context.
        https://bugs.webkit.org/show_bug.cgi?id=198225

        Reviewed by Dean Jackson.

        * platform/graphics/cocoa/FontCascadeCocoa.mm:
        (WebCore::showLetterpressedGlyphsWithAdvances):
        (WebCore::FontCascade::drawGlyphs):

2019-05-24  Timothy Hatcher  <timothy@apple.com>

        Plumb dark appearance down to GraphicsContext.
        https://bugs.webkit.org/show_bug.cgi?id=198224
        rdar://problem/51068494

        Reviewed by Dean Jackson.

        No test yet, as it is not testable until this gets used.

        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContextStateChange::changesFromState const):
        (WebCore::GraphicsContextStateChange::accumulate):
        (WebCore::GraphicsContextStateChange::apply const):
        (WebCore::GraphicsContextStateChange::dump const):
        (WebCore::GraphicsContext::setUseDarkAppearance):
        * platform/graphics/GraphicsContext.h:
        (WebCore::GraphicsContext::useDarkAppearance const):
        * rendering/TextPaintStyle.cpp:
        (WebCore::TextPaintStyle::operator== const):
        (WebCore::computeTextPaintStyle):
        (WebCore::updateGraphicsContext):
        * rendering/TextPaintStyle.h:

2019-05-24  Youenn Fablet  <youenn@apple.com>

        Make sure completion handler is always called in SWServer::startSuspension
        https://bugs.webkit.org/show_bug.cgi?id=198215

        Reviewed by Alex Christensen.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::startSuspension):
        Make sure completion handler is called in case of no registration store.

2019-05-24  Ryosuke Niwa  <rniwa@webkit.org>

        Asssertion failure in dispatchSubtreeModifiedEvent due to TextFieldInputType updating UA shadow tree inside Element::removedFromAncestor
        https://bugs.webkit.org/show_bug.cgi?id=198216

        Reviewed by Brent Fulgham.

        The bug was caused by ListAttributeTargetObserver::idTargetChanged() updating the shadow tree of an input element
        within Element::removedFromAncestor via TextFieldInputType::createDataListDropdownIndicator(). Fixed it by
        supressing the assertions with ScriptDisallowedScope::EventAllowedScope since it's always safe to update
        UA shadow trees of input elements as it's not exposed to author scripts.

        Avoiding the creation of dropdown indicator in this particular scenario is a lot more involved and it's not
        particularly correct because there could be another datalist element which matches the ID specified in list
        content attribute after the removal of the old datalist element.

        Test: fast/forms/datalist/datalist-removal-assertion.html

        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::createDataListDropdownIndicator):
        (WebCore::TextFieldInputType::createContainer):
        * html/shadow/DataListButtonElement.cpp:
        (WebCore::DataListButtonElement::DataListButtonElement):

2019-05-24  Saam barati  <sbarati@apple.com>

        [WHLSL] ReadModifyWriteExpression always has a result and new value expression
        https://bugs.webkit.org/show_bug.cgi?id=198079

        Reviewed by Myles Maxfield.

        Let's not pretend it might not.

        * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::newValueExpression):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::resultExpression):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeNewValueExpression):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeResultExpression):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
        (WebCore::WHLSL::ASTDumper::visit):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::PropertyResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        (WebCore::WHLSL::Visitor::visit):

2019-05-23  Simon Fraser  <simon.fraser@apple.com>

        With async overflow scrolling, programmatic scroll to a negative offset fails to clamp the scroll offset
        https://bugs.webkit.org/show_bug.cgi?id=198208
        <rdar://problem/49720087>

        Reviewed by Zalan Bujtas.

        RenderLayer::scrollToOffset() needs to pass the clamped offset to scrollingCoordinator->requestScrollPositionUpdate(),
        otherwise the scrolling tree will round-trip a negative value and scrollLeft will end up negative.

        Test: fast/scrolling/programmatic-scroll-to-negative-offset.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollToOffset):

2019-05-23  Devin Rousso  <drousso@apple.com>

        Web Inspector: Overlay: rulers/guides should be shown whenever element selection is enabled
        https://bugs.webkit.org/show_bug.cgi?id=198088

        Reviewed by Timothy Hatcher.

        When trying to "measure" the absolute position (to the viewport) or relative position (to
        another element) of a given element, often the easiest way is to enable Element Selection
        and Show Rulers at the same time.

        This can have the undesired "side-effect" of having the rulers be always present, even when
        not highlighting any nodes.

        The ideal functionality is to allow the rulers/guides to be shown when element selection is
        active and a node is hovered, regardless of whether "Show Rulers" is enabled.

        * inspector/InspectorOverlay.h:
        (WebCore::InspectorOverlay::setShowRulersDuringElementSelection): Added.
        * inspector/InspectorOverlay.cpp:
        (WebCore::InspectorOverlay::paint):
        (WebCore::InspectorOverlay::shouldShowOverlay):
        (WebCore::InspectorOverlay::drawNodeHighlight):
        (WebCore::InspectorOverlay::drawQuadHighlight):
        (WebCore::InspectorOverlay::drawElementTitle):
        If `showRulersDuringElementSelection` is enabled, draw rulers whenever any highlight bounds
        are calculated, but don't update the overlay if it's the only thing enabled (e.g. if there's
        no currently hovered node, the overlay will disappear).

        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorDOMAgent::inspect):
        (WebCore::InspectorDOMAgent::setInspectModeEnabled):
        (WebCore::InspectorDOMAgent::setSearchingForNode):
        Add an optional `showRulers` parameter to `DOM.setInspectModeEnabled` that supersedes the
        current value of `Page.setShowRulers` as to whether rulers/guides are shown.

2019-05-23  Devin Rousso  <drousso@apple.com>

        Web Inspector: Overlay: rulers should switch sides if they intersect the highlighted node(s) so they don't obstruct any content
        https://bugs.webkit.org/show_bug.cgi?id=198165

        Reviewed by Timothy Hatcher.

        If the highlighted node is against the top edge of the screen, the top ruler should shift to
        the bottom, unless the highlighted node is also against the bottom edge of the screen.

        If the highlighted node is against the left edge of the screen, the left ruler should shift
        to the right, unless the highlighted node is also against the right edge of the screen.

        This way, unless the node is very wide/tall, the rulers won't be drawn on top of anything
        being highlighted.

        * inspector/InspectorOverlay.h:
        * inspector/InspectorOverlay.cpp:
        (WebCore::InspectorOverlay::paint):
        (WebCore::InspectorOverlay::drawNodeHighlight):
        (WebCore::InspectorOverlay::drawQuadHighlight):
        (WebCore::InspectorOverlay::drawBounds):
        (WebCore::InspectorOverlay::drawRulers):
        Drive-by: create an alias for the type (`FloatRect`) used when calculating the bounds of
                  everything that's highlighted.

2019-05-23  Saam barati  <sbarati@apple.com>

        [WHLSL] Make the AST dumper disambiguate expressions using parenthesis to represent AST construction
        https://bugs.webkit.org/show_bug.cgi?id=198199

        Reviewed by Myles C. Maxfield.

        We would dump "*foo.bar" for "(*foo).bar", which is super confusing.
        We now dump "(*foo).bar".

        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
        (WebCore::WHLSL::ASTDumper::visit):

2019-05-23  Saam barati  <sbarati@apple.com>

        [WHLSL] Don't wrap anonymous variables in parens in the AST dumper
        https://bugs.webkit.org/show_bug.cgi?id=198196

        Reviewed by Myles C. Maxfield.

        This makes the dump of 'foo.bar.x = 42' go from
        ($(0x7f86d9d94440) = &foo, $(0x7f86d9d944e0) = operator.bar(*$(0x7f86d9d94440)), $(0x7f86d9d944e0) = operator.x=($(0x7f86d9d944e0), 42), *$(0x7f86d9d94440) = operator.bar=(*$(0x7f86d9d94440), $(0x7f86d9d944e0)));
        
        to:
        ($0x7f86d9d94440 = &foo, $0x7f86d9d944e0 = operator.bar(*$0x7f86d9d94440), $0x7f86d9d944e0 = operator.x=($0x7f86d9d944e0, 42), *$0x7f86d9d94440 = operator.bar=(*$0x7f86d9d94440, $0x7f86d9d944e0));

        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
        (WebCore::WHLSL::ASTDumper::visit):

2019-05-23  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Implement property resolver
        https://bugs.webkit.org/show_bug.cgi?id=195925
        <rdar://problem/48219643>

        Unreviewed watchOS build fix.

        * Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
        (WebCore::WHLSL::AST::AssignmentExpression::AssignmentExpression):

2019-05-23  Saam barati  <sbarati@apple.com>

        [WHLSL] Property resolver needs to recurse to handle the base when simplifying rvalues
        https://bugs.webkit.org/show_bug.cgi?id=198193

        Reviewed by Myles Maxfield.

        We were only transforming the top most node in the AST. So things like
        'x = foo.bar' would work, but 'x = foo.bar.baz' would not.

        Test: webgpu/whlsl-nested-dot-expression-rvalue.html

        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::PropertyResolver::simplifyRightValue):

2019-05-22  Stephanie Lewis  <slewis@apple.com>

        release builds of webkit cannot be used to generate a dyld shared cache
        https://bugs.webkit.org/show_bug.cgi?id=198150
        <rdar://problem/50675982>

        Reviewed by Dan Bernstein.

        Restrict the -not_for_dyld_shared_cache linker flag to macosx

        * Configurations/WebCore.xcconfig:

2019-05-23  Zalan Bujtas  <zalan@apple.com>

        [Hittest] Move hittesting from RenderView to Document
        https://bugs.webkit.org/show_bug.cgi?id=198192
        <rdar://problem/51077762>

        Reviewed by Antti Koivisto.

        RenderView is not refcounted and may be destroyed in updateLayout(), so enter hit-testing from Document.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::press):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::visiblePositionForPoint const):
        * dom/Document.cpp:
        (WebCore::FrameFlatteningLayoutDisallower::FrameFlatteningLayoutDisallower):
        (WebCore::FrameFlatteningLayoutDisallower::~FrameFlatteningLayoutDisallower):
        (WebCore::Document::scheduleStyleRecalc):
        (WebCore::Document::prepareMouseEvent):
        (WebCore::Document::hitTest):
        * dom/Document.h:
        (WebCore::Document::inHitTesting const):
        * dom/TreeScope.cpp:
        (WebCore::TreeScope::nodeFromPoint):
        (WebCore::TreeScope::elementsFromPoint):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::contains const):
        * html/HTMLPlugInElement.cpp:
        (WebCore::HTMLPlugInElement::isReplacementObscured):
        * html/MediaElementSession.cpp:
        (WebCore::isElementMainContentForPurposesOfAutoplay):
        * page/DragController.cpp:
        (WebCore::elementUnderMouse):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMouseDraggedEvent):
        (WebCore::EventHandler::eventMayStartDrag const):
        (WebCore::EventHandler::updateSelectionForMouseDrag):
        (WebCore::EventHandler::hitTestResultAtPoint const):
        (WebCore::EventHandler::updateCursor):
        (WebCore::EventHandler::isInsideScrollbar const):
        (WebCore::EventHandler::handleWheelEvent):
        (WebCore::EventHandler::hoverTimerFired):
        (WebCore::EventHandler::handleDrag):
        (WebCore::hitTestResultInFrame):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::setNeedsLayoutAfterViewConfigurationChange):
        * rendering/RenderView.cpp:
        (WebCore::FrameFlatteningLayoutDisallower::FrameFlatteningLayoutDisallower): Deleted.
        (WebCore::FrameFlatteningLayoutDisallower::~FrameFlatteningLayoutDisallower): Deleted.
        (): Deleted.
        (WebCore::RenderView::hitTest): Deleted.
        * rendering/RenderView.h:
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::nodeAtPoint):
        * testing/Internals.cpp:
        (WebCore::Internals::nodesFromRect const):

2019-05-23  Youenn Fablet  <youenn@apple.com>

        CacheStorageConnection callbacks should be completed on network connection close
        https://bugs.webkit.org/show_bug.cgi?id=195757

        Reviewed by Alex Christensen.

        Move HashMap-based callbacks to WorkerCacheStorageConnection.
        Make CacheStorageConnection default API to implement use callbacks.
        This is used by WebKit layer to do AsyncReply IPC.

        Move DOMCacheEngine callbacks to CompletionHandler.

        Test: http/wpt/cache-storage/cache-storage-networkprocess-crash.html

        * Modules/cache/CacheStorageConnection.cpp:
        * Modules/cache/CacheStorageConnection.h:
        (WebCore::CacheStorageConnection::engineRepresentation):
        * Modules/cache/DOMCacheEngine.h:
        * Modules/cache/WorkerCacheStorageConnection.cpp:
        (WebCore::recordsDataFromRecords):
        (WebCore::recordsDataOrErrorFromRecords):
        (WebCore::recordsFromRecordsData):
        (WebCore::recordsOrErrorFromRecordsData):
        (WebCore::WorkerCacheStorageConnection::open):
        (WebCore::WorkerCacheStorageConnection::openOrRemoveCompleted):
        (WebCore::WorkerCacheStorageConnection::remove):
        (WebCore::WorkerCacheStorageConnection::retrieveCaches):
        (WebCore::WorkerCacheStorageConnection::retrieveCachesCompleted):
        (WebCore::WorkerCacheStorageConnection::retrieveRecords):
        (WebCore::WorkerCacheStorageConnection::retrieveRecordsCompleted):
        (WebCore::WorkerCacheStorageConnection::batchDeleteOperation):
        (WebCore::WorkerCacheStorageConnection::deleteRecordsCompleted):
        (WebCore::WorkerCacheStorageConnection::batchPutOperation):
        (WebCore::WorkerCacheStorageConnection::putRecordsCompleted):
        (WebCore::WorkerCacheStorageConnection::reference):
        (WebCore::WorkerCacheStorageConnection::dereference):
        (WebCore::WorkerCacheStorageConnection::clearPendingRequests):
        * Modules/cache/WorkerCacheStorageConnection.h:
        * page/CacheStorageProvider.h:
        (WebCore::CacheStorageProvider::createCacheStorageConnection):

2019-05-23  Youenn Fablet  <youenn@apple.com>

        Multiple videos (with audios) with autoplay & playinline not working. Only one video play at a time.
        https://bugs.webkit.org/show_bug.cgi?id=193312
        <rdar://problem/47189864>

        Reviewed by Jer Noble.

        Allow all MediaStream backed video elements to play together.
        Any non MediaStream backed video will stop all MediaStream backed video elements.
        Conversely, all non MediaStream backed videos will stop when playing one MediaStream backed video.

        Refactor PlatformMediaSessionManager as the way to iterate through sessions
        is not safe when pausing a session: if playing, the session will be moved in the array of sessions.

        To handle this, copy the list of sessions before iterating through them.
        For extra safety, make sessions WeakPtr.

        Add routines for the case of filtering with a predicate taking a const session.
        In that case, we do not copy the vector but iterate through it as a small optimization.

        Test: webrtc/concurrentVideoPlayback.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::bestMediaElementForShowingPlaybackControlsManager):
        (WebCore::HTMLMediaElement::hasMediaStreamSource const):
        * html/HTMLMediaElement.h:
        * platform/audio/PlatformMediaSession.cpp:
        (WebCore::PlatformMediaSession::activeAudioSessionRequired const):
        (WebCore::PlatformMediaSession::canPlayConcurrently const):
        (WebCore::PlatformMediaSession::activeAudioSessionRequired): Deleted.
        * platform/audio/PlatformMediaSession.h:
        (WebCore::PlatformMediaSessionClient::hasMediaStreamSource const):
        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::has const):
        (WebCore::PlatformMediaSessionManager::activeAudioSessionRequired const):
        (WebCore::PlatformMediaSessionManager::canProduceAudio const):
        (WebCore::PlatformMediaSessionManager::count const):
        (WebCore::PlatformMediaSessionManager::beginInterruption):
        (WebCore::PlatformMediaSessionManager::endInterruption):
        (WebCore::PlatformMediaSessionManager::addSession):
        (WebCore::PlatformMediaSessionManager::removeSession):
        (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
        (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
        (WebCore::PlatformMediaSessionManager::setCurrentSession):
        (WebCore::PlatformMediaSessionManager::currentSession const):
        (WebCore::PlatformMediaSessionManager::applicationWillBecomeInactive):
        (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive):
        (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground):
        (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground):
        (WebCore::PlatformMediaSessionManager::systemWillSleep):
        (WebCore::PlatformMediaSessionManager::systemDidWake):
        (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument):
        (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess):
        (WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument):
        (WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument):
        (WebCore::PlatformMediaSessionManager::suspendAllMediaBufferingForDocument):
        (WebCore::PlatformMediaSessionManager::resumeAllMediaBufferingForDocument):
        (WebCore::PlatformMediaSessionManager::currentSessionsMatching const):
        (WebCore::PlatformMediaSessionManager::forEachMatchingSession):
        (WebCore::PlatformMediaSessionManager::forEachMatchingSession const):
        (WebCore::PlatformMediaSessionManager::forEachSession):
        (WebCore::PlatformMediaSessionManager::anyOfSessions const):
        (): Deleted.
        (WebCore::PlatformMediaSessionManager::applicationWillBecomeInactive const): Deleted.
        (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive const): Deleted.
        (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground const): Deleted.
        (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground const): Deleted.
        (WebCore::PlatformMediaSessionManager::forEachSession const): Deleted.
        (WebCore::PlatformMediaSessionManager::findSession const): Deleted.
        * platform/audio/PlatformMediaSessionManager.h:
        (WebCore::PlatformMediaSessionManager::anyOfSessions const): Deleted.
        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
        (MediaSessionManagerCocoa::updateSessionState):
        (MediaSessionManagerCocoa::beginInterruption):
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring):
        (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):

2019-05-23  Saam barati  <sbarati@apple.com>

        [WHLSL] Add a helper for in-place AST mutation
        https://bugs.webkit.org/show_bug.cgi?id=198175

        Reviewed by Myles Maxfield.

        This makes WHLSL AST mutation code a bit easier to read and write.
        
        Code that looked like:
        ```
        static_assert(sizeof(AST::DereferenceExpression) <= sizeof(AST::DotExpression), "Dot expressions need to be able to become dereference expressions without updating backreferences");
        void* location = &dotExpression;
        dotExpression.~DotExpression();
        auto* dereferenceExpression = new (location) AST::DereferenceExpression(WTFMove(origin), WTFMove(callExpression));
        ```
        
        Can now be:
        ```
        auto* dereferenceExpression = AST::replaceWith<AST::DereferenceExpression>(dotExpression, WTFMove(origin), WTFMove(callExpression));
        ```

        * Modules/webgpu/WHLSL/AST/WHLSLNode.h:
        (WebCore::WHLSL::AST::replaceWith):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::PropertyResolver::visit):
        (WebCore::WHLSL::PropertyResolver::simplifyRightValue):
        (WebCore::WHLSL::LeftValueSimplifier::visit):

2019-05-23  Eric Carlson  <eric.carlson@apple.com>

        [macOS,iOS] Add always-on logging for AVPlayerTimeControlStatus changes
        https://bugs.webkit.org/show_bug.cgi?id=197946
        <rdar://problem/50627457>

        Reviewed by Jon Lee.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::convertEnumerationToString):
        (WTF::LogArgument<AVPlayerTimeControlStatus>::toString):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::timeControlStatusDidChange):

2019-05-23  Antoine Quint  <graouts@apple.com>

        [Pointer Events] Compatibility mouse events can only be prevented while the pointer is pressed
        https://bugs.webkit.org/show_bug.cgi?id=198178

        Reviewed by Dean Jackson.

        Test: pointerevents/mouse/compatibility-mouse-events-prevention-mouse-released.html

        The Pointer Events spec, in https://www.w3.org/TR/pointerevents/#compatibility-mapping-with-mouse-events, says that "Mouse events
        can only be prevented when the pointer is down. Hovering pointers (e.g. a mouse with no buttons pressed) cannot have their mouse
        events prevented." We now track whether the pointer is pressed and clear the preventsCompatibilityMouseEvents when the pointer is
        moved and it is not pressed.

        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::pointerEventWasDispatched):
        * page/PointerCaptureController.h:

2019-05-23  Simon Fraser  <simon.fraser@apple.com>

        Build fix after r245695.

        * dom/Element.cpp:

2019-05-23  Antoine Quint  <graouts@apple.com>

        [Pointer Events] The mouseover, mouseout, mouseenter, and mouseleave events should not be prevented while the pointer is down
        https://bugs.webkit.org/show_bug.cgi?id=198177

        Reviewed by Dean Jackson.

        Test: pointerevents/mouse/compatibility-mouse-events-prevention-mouse-pressed.html

        The Pointer Event spec, in https://www.w3.org/TR/pointerevents/#compatibility-mapping-with-mouse-events, says that "the mouseover,
        mouseout, mouseenter, and mouseleave events are never prevented (even if the pointer is down)." We add a new static function which
        indicates what is "compatibility" mouse event since those should be excluded, along with "click", which we already excluded.

        * dom/Element.cpp:
        (WebCore::isCompatibilityMouseEvent):
        (WebCore::Element::dispatchMouseEvent):

2019-05-23  Jon Davis  <jond@apple.com>

        Update feature status for shipped features
        https://bugs.webkit.org/show_bug.cgi?id=196783

        Reviewed by Timothy Hatcher.
        
        Updated feature status for Beacon API, CSS Text Decoration Level 4, Intersection Observer,
        Conic Gradients, Datalist Element, and Web Share.

        * features.json:

2019-05-23  Simon Fraser  <simon.fraser@apple.com>

        Create scrolling tree nodes for descendants of position:absolute inside stacking-context overflow
        https://bugs.webkit.org/show_bug.cgi?id=198154

        Reviewed by Antti Koivisto.
        
        There exists code that creates scrolling tree nodes for position:absolute when the containing block
        chain skips an enclosing scroller, but the compositing ancestor tree includes the scroller. However
        this code explicitly checked that the layer was position:absolute.

        This needed to be generalized for any layer whose containing block ancestor chain includes
        a position:absolute that skips the scroller, for example a transformed inside a position:absolute,
        so remove an explicit isAbsolutelyPositioned() check and some similar assertions.

        Test: scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::collectStationaryLayerRelatedOverflowNodes):
        (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
        (WebCore::collectRelatedCoordinatedScrollingNodes):

2019-05-23  Adrian Perez de Castro  <aperez@igalia.com>

        Fix a few missing header inclusions often masked by by unified sources
        https://bugs.webkit.org/show_bug.cgi?id=198180

        Reviewed by Eric Carlson.

        * editing/markup.h: Add missing "FloatSize.h" inclusion.
        * html/FeaturePolicy.cpp: Add missing "HTMLParserIdioms.h" inclusion.
        * platform/text/TextCodec.cpp: Add missing <cstdio> inclusion.

2019-05-23  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Implement property resolver
        https://bugs.webkit.org/show_bug.cgi?id=195925
        <rdar://problem/48219643>

        Reviewed by Saam Barati and Robin Morisset.

        The property resolver is the thing that replaces dot expressions, index expressions, and
        read-modify-write expressions with calls to getters, setters, and anders. This patch doesn't
        fully implement the property resolver, but implements enough for simple dot expressions to
        work. This is enough for us to be able to test most of the rest of the compiler. Index
        expressions and read-modify-write expressions are not fully included in this patch, and will
        be finished in a follow-up patch.

        The property resolver may introduce anonymous variables in various places. In order to do
        this, after the property resolver runs, it will insert all these anonymous variables in the
        beginning of the function. However, this means that entries in the VariableDeclarations
        vector will all shift, which means VariableDeclarations have to be allocated on the heap so
        backreferences to them stay valid. This patch moves the storage associated with these values
        to living directly in the vector's storage to living in heap storage (via filling the vector
        with UniqueRefs).

        This patch also adds the third concept of value-ness. We now have right values, left values,
        and abstract left values (for things which have setters but have no address). This addition
        is required for the analysis the property resolver performs. This concept is also present in
        the spec.

        Test: webgpu/whlsl-dot-expressions.html

        * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
        (WebCore::WHLSL::AST::TypeAnnotation::TypeAnnotation):
        (WebCore::WHLSL::AST::TypeAnnotation::leftAddressSpace const):
        (WebCore::WHLSL::AST::TypeAnnotation::isRightValue const):
        (WebCore::WHLSL::AST::TypeAnnotation::visit):
        * Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
        (WebCore::WHLSL::AST::AssignmentExpression::takeRight):
        * Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        (WebCore::WHLSL::AST::Expression::maybeResolvedType):
        (WebCore::WHLSL::AST::Expression::resolvedType):
        (WebCore::WHLSL::AST::Expression::maybeTypeAnnotation const):
        (WebCore::WHLSL::AST::Expression::typeAnnotation const):
        (WebCore::WHLSL::AST::Expression::setTypeAnnotation):
        (WebCore::WHLSL::AST::Expression::addressSpace const): Deleted.
        (WebCore::WHLSL::AST::Expression::setAddressSpace): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
        (WebCore::WHLSL::AST::FloatLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.cpp:
        (WebCore::WHLSL::AST::IntegerLiteral::valueForSelectedType const):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
        (WebCore::WHLSL::AST::IntegerLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
        (WebCore::WHLSL::AST::MakeArrayReferenceExpression::MakeArrayReferenceExpression):
        (WebCore::WHLSL::AST::MakeArrayReferenceExpression::leftValue):
        (WebCore::WHLSL::AST::MakeArrayReferenceExpression::lValue): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
        (WebCore::WHLSL::AST::MakePointerExpression::MakePointerExpression):
        (WebCore::WHLSL::AST::MakePointerExpression::leftValue):
        (WebCore::WHLSL::AST::MakePointerExpression::lValue): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
        (WebCore::WHLSL::AST::NullLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
        (WebCore::WHLSL::AST::PropertyAccessExpression::possibleGetterOverloads):
        (WebCore::WHLSL::AST::PropertyAccessExpression::possibleSetterOverloads):
        (WebCore::WHLSL::AST::PropertyAccessExpression::possibleAnderOverloads):
        (WebCore::WHLSL::AST::PropertyAccessExpression::getterFunction):
        (WebCore::WHLSL::AST::PropertyAccessExpression::anderFunction):
        (WebCore::WHLSL::AST::PropertyAccessExpression::threadAnderFunction):
        (WebCore::WHLSL::AST::PropertyAccessExpression::setterFunction):
        (WebCore::WHLSL::AST::PropertyAccessExpression::setPossibleGetterOverloads):
        (WebCore::WHLSL::AST::PropertyAccessExpression::setPossibleAnderOverloads):
        (WebCore::WHLSL::AST::PropertyAccessExpression::setPossibleSetterOverloads):
        (WebCore::WHLSL::AST::PropertyAccessExpression::setGetterFunction):
        (WebCore::WHLSL::AST::PropertyAccessExpression::setAnderFunction):
        (WebCore::WHLSL::AST::PropertyAccessExpression::setThreadAnderFunction):
        (WebCore::WHLSL::AST::PropertyAccessExpression::setSetterFunction):
        (WebCore::WHLSL::AST::PropertyAccessExpression::takeBase):
        (WebCore::WHLSL::AST::PropertyAccessExpression::possibleGetOverloads): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::possibleSetOverloads): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::possibleAndOverloads): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::setPossibleGetOverloads): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::setPossibleSetOverloads): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::setPossibleAndOverloads): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::oldVariableReference):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::newVariableReference):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::leftValue):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeLeftValue):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeOldValue):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeNewValue):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeNewValueExpression):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeResultExpression):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::lValue): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
        (WebCore::WHLSL::AST::ResolvableType::maybeResolvedType const):
        (WebCore::WHLSL::AST::ResolvableType::resolvedType const):
        (WebCore::WHLSL::AST::ResolvableType::maybeResolvedType):
        (WebCore::WHLSL::AST::ResolvableType::resolvedType):
        * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp:
        (WebCore::WHLSL::AST::ResourceSemantic::isAcceptableType const):
        * Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.cpp:
        (WebCore::WHLSL::AST::SpecializationConstantSemantic::isAcceptableType const):
        * Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.cpp:
        (WebCore::WHLSL::AST::StageInOutSemantic::isAcceptableType const):
        * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
        (WebCore::WHLSL::AST::StructureDefinition::find):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        (WebCore::WHLSL::AST::TypeReference::maybeResolvedType const):
        (WebCore::WHLSL::AST::TypeReference::resolvedType const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.cpp:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::valueForSelectedType const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:
        (WebCore::WHLSL::AST::VariableDeclarationsStatement::VariableDeclarationsStatement):
        (WebCore::WHLSL::AST::VariableDeclarationsStatement::variableDeclarations):
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::attributeForSemantic):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledInputPath):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::unpackResourcesAndNamedBuiltIns):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::helperTypes):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::unpack):
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDeclarationWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeType):
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::findInVector):
        (WebCore::WHLSL::Metal::TypeNamer::visit):
        (WebCore::WHLSL::Metal::TypeNamer::createNameNode):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
        (WebCore::WHLSL::ASTDumper::visit):
        * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
        (WebCore::WHLSL::checkDuplicateFunctions):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveWithOperatorAnderIndexer):
        (WebCore::WHLSL::resolveWithOperatorLength):
        (WebCore::WHLSL::resolveWithReferenceComparator):
        (WebCore::WHLSL::resolveByInstantiation):
        (WebCore::WHLSL::checkOperatorOverload):
        (WebCore::WHLSL::Checker::assignTypes):
        (WebCore::WHLSL::commit):
        (WebCore::WHLSL::Checker::visit):
        (WebCore::WHLSL::Checker::recurseAndGetInfo):
        (WebCore::WHLSL::Checker::getInfo):
        (WebCore::WHLSL::Checker::assignType):
        (WebCore::WHLSL::Checker::forwardType):
        (WebCore::WHLSL::getUnnamedType):
        (WebCore::WHLSL::Checker::finishVisitingPropertyAccess): Deleted.
        (WebCore::WHLSL::Checker::recurseAndWrapBaseType): Deleted.
        * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:
        (WebCore::WHLSL::Gatherer::takeEntryPointItems):
        (WebCore::WHLSL::Gatherer::visit):
        * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
        (WebCore::WHLSL::matchAndCommit):
        (WebCore::WHLSL::commit):
        (WebCore::WHLSL::inferTypesForCall):
        * Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.cpp:
        (WebCore::WHLSL::getNativeTypeDeclaration):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseParameters):
        (WebCore::WHLSL::Parser::parseVariableDeclarations):
        * Modules/webgpu/WHLSL/WHLSLPipelineDescriptor.h:
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLPrepare.h:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp: Added.
        (WebCore::WHLSL::PropertyResolver::visit):
        (WebCore::WHLSL::setterCall):
        (WebCore::WHLSL::getterCall):
        (WebCore::WHLSL::modify):
        (WebCore::WHLSL::PropertyResolver::simplifyRightValue):
        (WebCore::WHLSL::LeftValueSimplifier::visit):
        (WebCore::WHLSL::PropertyResolver::simplifyLeftValue):
        (WebCore::WHLSL::resolveProperties):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h.
        * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
        (WebCore::WHLSL::RecursiveTypeChecker::visit):
        * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:
        (WebCore::WHLSL::conversionCost):
        * Modules/webgpu/WHLSL/WHLSLResolvingType.h:
        (WebCore::WHLSL::ResolvingType::getUnnamedType):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
        (WebCore::WHLSL::FindArrayTypes::takeArrayTypes):
        (WebCore::WHLSL::synthesizeArrayOperatorLength):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        (WebCore::WHLSL::FindAllTypes::takeUnnamedTypes):
        (WebCore::WHLSL::FindAllTypes::takeNamedTypes):
        (WebCore::WHLSL::synthesizeConstructors):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
        (WebCore::WHLSL::synthesizeEnumerationFunctions):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
        (WebCore::WHLSL::synthesizeStructureAccessors):
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        (WebCore::WHLSL::Visitor::visit):
        * Modules/webgpu/WHLSL/WHLSLVisitor.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::trySetWHLSLFunctionsForPipelineDescriptor):

2019-05-22  Myles C. Maxfield  <mmaxfield@apple.com>

        font-optical-sizing applies the wrong variation value
        https://bugs.webkit.org/show_bug.cgi?id=197528
        <rdar://problem/50152854>

        Reviewed by Antti Koivisto.

        The OpenType spec says in
        https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_opsz

        "Scale interpretation: Values can be interpreted as text size, in points."

        It turns out that it means "typographic point size" which is equal to CSS pixels, not
        CSS points.

        There are two parts of the font that are sensitive to optical sizing: variation values and
        the trak table. We don't want to set the variation value directly because then the trak table
        won't be affected. Instead, we can use kCTFontOpticalSizeAttribute to set both of them together.
        We will only do this when the CSS says text-rendering:optimizeLegibility or when the font has
        an opsz axis but no STAT table. Otherwise, we won't do anything special, which lets CoreText
        handle the default behavior for us. This gives us the same default behavior as the rest of the
        system.

        Tests: fast/text/variations/optical-sizing-trak-2.html
               fast/text/variations/optical-sizing-trak.html
               fast/text/variations/optical-sizing-units-2.html
               fast/text/variations/optical-sizing-units.html

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontType::FontType):
        (WebCore::preparePlatformFont):
        (WebCore::fontWithFamily):
        (WebCore::FontCache::systemFallbackForCharacters):
        * platform/graphics/cocoa/FontCacheCoreText.h:
        * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
        (WebCore::FontFamilySpecificationCoreText::fontRanges const):
        * platform/graphics/mac/FontCustomPlatformData.cpp:
        (WebCore::FontCustomPlatformData::fontPlatformData):

2019-05-22  Antti Koivisto  <antti@apple.com>

        Subselectors not searched when determining property whitelist for selector
        https://bugs.webkit.org/show_bug.cgi?id=198147
        <rdar://problem/50405208>

        Reviewed by Zalan Bujtas.

        This can cause marker elements get style they shouldn't.

        Test: fast/lists/marker-style-subselector-whitelist.html

        * css/RuleSet.cpp:
        (WebCore::determinePropertyWhitelistType):

        Check subselectors too.

2019-05-22  Saam barati  <sbarati@apple.com>

        WHLSL: fix enum parsing
        https://bugs.webkit.org/show_bug.cgi?id=198087

        Reviewed by Myles Maxfield.

        This fixes two bugs:
        
        1. We were using a String by reference after moving the underlying owner of
        the string. This would lead to the String becoming the empty value, and
        crashing when used as a key in a hash map.
        2. We were incorrectly producing a syntax error for enum declarations by
        saying it's invalid if an enum value was added to a hash map for the first
        time. This logic should be negated. We need to error when it's added for
        the second time and onwards.

        Test: webgpu/whlsl-dont-crash-parsing-enum.html

        * Modules/webgpu/WHLSL/AST/WHLSLAST.h: Replaced.
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
        (WebCore::WHLSL::AST::EnumerationDefinition::add):
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:
        (WebCore::WHLSL::AST::EnumerationMember::name):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp: Replaced.
        (WebCore::WHLSL::ASTDumper::visit):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.h: Replaced.

2019-05-22  Simon Fraser  <simon.fraser@apple.com>

        Fix scrolling tree state for more obscure combinations of positioning and paint order
        https://bugs.webkit.org/show_bug.cgi?id=198139

        Reviewed by Antti Koivisto.

        There were three places in RenderLayerCompositor that used a version of ancestor
        layer traversal looking at containing blocks, and all three had issues. So make a
        shared function to do the ancestor walk, and use it thrice.

        isScrolledByOverflowScrollLayer() fumbled containingBlockCanSkipLayers, so failed
        to create a scrolling tree node for a composited layer inside position:fixed in
        overflow (tested by composited-in-absolute-in-overflow.html).

        collectStationaryLayerRelatedOverflowNodes() failed to handle nested
        overflow:scroll; it needs to find all the composited scrollers that affect the
        position of the given layer relative to its compositing ancestor, which may be the
        scroller, or a descendant of the scroller. However, it didn't walk up far enough
        and find more that one ancestor. Tested by absolute-in-nested-sc-scrollers.html.

        enclosingClippingScopes() was OK but now uses the share function.

        Tests: scrollingcoordinator/scrolling-tree/absolute-in-nested-sc-scrollers.html
               scrollingcoordinator/scrolling-tree/composited-in-absolute-in-overflow.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::traverseAncestorLayers):
        (WebCore::enclosingClippingScopes):
        (WebCore::isScrolledByOverflowScrollLayer):
        (WebCore::collectStationaryLayerRelatedOverflowNodes):
        (WebCore::collectRelatedCoordinatedScrollingNodes):

2019-05-22  Simon Fraser  <simon.fraser@apple.com>

        Inner scroller of nested overflow:scrolls jitters when scrolling
        https://bugs.webkit.org/show_bug.cgi?id=198131

        Reviewed by Antti Koivisto.

        enclosingCompositedScrollingLayer(layer) would return the layer itself, rather than
        its scrolling ancestor, which meant that a composited scroller nested inside another
        scroller would fail to get a "Moves" scrolling tree node, and therefore jitter
        when scrolling.

        Test: scrollingcoordinator/scrolling-tree/nested-overflow-scroll.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::enclosingCompositedScrollingLayer):

2019-05-22  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r245598.

        Breaks watchOS build.

        Reverted changeset:

        "font-optical-sizing applies the wrong variation value"
        https://bugs.webkit.org/show_bug.cgi?id=197528
        https://trac.webkit.org/changeset/245598

2019-05-22  Daniel Bates  <dabates@apple.com>

        WebKit does not generate an ESC key event for CMD+.
        https://bugs.webkit.org/show_bug.cgi?id=198137
        <rdar://problem/51038641>

        Reviewed by Brent Fulgham.

        This patch maps the Command + '.' keystroke to the 'Escape'. This also requires a change to UIKit to properly pass
        the key state to WebKit (see <rdar://problem/46431552>).

        * platform/ios/WebEvent.mm:
        (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:withInputManagerHint:keyCode:isTabKey:]):

2019-05-22  Ali Juma  <ajuma@chromium.org>

        Intersection Observer: bounding client rect is wrong for an inline element
        https://bugs.webkit.org/show_bug.cgi?id=198009

        Reviewed by Simon Fraser.

        Make target rect computation for inline elements share logic with the computation
        of bounding client rects.

        Test: imported/w3c/web-platform-tests/intersection-observer/inline-with-block-child-client-rect.html

        * dom/Document.cpp:
        (WebCore::computeIntersectionState):
        * dom/Element.cpp:
        (WebCore::Element::boundingAbsoluteRectWithoutLayout):
        (WebCore::Element::boundingClientRect):
        * dom/Element.h:

2019-05-22  Antoine Quint  <graouts@apple.com>

        [iOS] Compatibility mouse events aren't prevented by calling preventDefault() on pointerdown
        https://bugs.webkit.org/show_bug.cgi?id=198124
        <rdar://problem/50410863>

        Reviewed by Tim Horton.

        This fix builds atop the one made for wkb.ug/198072 which fixes this bug on macOS alone.

        In order to correctly prevent "compatibility" mouse events from being dispatched when the initial "pointerdown" event had preventDefault()
        called while handled, we need to pass the PointerID for the touch that triggered a tap gesture in the UI process down in the Web process
        and into the resulting PlatformMouseEvent. This will allow upon dispatch of a PlatformMouseEvent to call into PointerCaptureController
        to identify if the dispatch of mouse events is allowed for the event's PointerID.

        To support this, some refactoring was required. The PointerID header is now under platform/ such that PlatformMouseEvent may safely use it.
        Additionally, PointerEvent::defaultMousePointerIdentifier() is now a global mousePointerID defined in PointerID.h.

        Finally, PointerCaptureController::touchEndedOrWasCancelledForIdentifier() has been renamed to PointerCaptureController::touchWithIdentifierWasRemoved() and
        has WEBCORE_EXPORT such that it may be called from WebKit as the indication that a pointer is no longer active will now be initiated in WebKit
        on the UI process side.

        Testing is covered by the pre-existing imported/w3c/web-platform-tests/pointerevents/pointerevent_suppress_compat_events_on_click.html
        which will now run on iOS through a change to WebKitAdditions.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Element.cpp:
        (WebCore::Element::dispatchMouseEvent): When dealing with a mouse event on iOS, check whether the mouse event's PointerID allows for compatibility
        mouse events to be dispatched using PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier(). The "click" event is not a compatibility
        mouse event.
        * dom/PointerEvent.h:
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::PointerCaptureController):
        (WebCore::PointerCaptureController::touchWithIdentifierWasRemoved):
        (WebCore::PointerCaptureController::touchEndedOrWasCancelledForIdentifier): Deleted.
        * page/PointerCaptureController.h:
        * platform/PlatformMouseEvent.h:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        (WebCore::PlatformMouseEvent::pointerId const):
        * platform/PointerID.h: Renamed from Source/WebCore/dom/PointerID.h.
        (WebCore::mousePointerID):

2019-05-22  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthN] Support Attestation Conveyance Preference
        https://bugs.webkit.org/show_bug.cgi?id=192722
        <rdar://problem/49939647>

        Reviewed by Brent Fulgham.

        This patch implements https://www.w3.org/TR/webauthn/#enumdef-attestationconveyancepreference, together with
        Step 20 with regard to AttestationConveyancePreference of https://www.w3.org/TR/webauthn/#createCredential.
        Few notes with regard to Step 20: 1) We treat indirect attestation as direct attestation as we don't MITM
        the attestation process; 2) We won't distinguish self attestation and return it to keep consistency between
        the response and the request. If callers want none attestation, they will very likely ignore fmt and attStmt
        of the attestation object, and therefore it is meaningless to return self attestation.

        Covered by new tests within existing files.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Headers.cmake:
        * Modules/webauthn/AttestationConveyancePreference.h: Copied from Source/WebCore/Modules/webauthn/WebAuthenticationUtils.h.
        * Modules/webauthn/AttestationConveyancePreference.idl: Copied from Source/WebCore/Modules/webauthn/WebAuthenticationUtils.h.
        * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
        (WebCore::PublicKeyCredentialCreationOptions::encode const):
        (WebCore::PublicKeyCredentialCreationOptions::decode):
        * Modules/webauthn/PublicKeyCredentialCreationOptions.idl:
        * Modules/webauthn/WebAuthenticationConstants.h:
        * Modules/webauthn/WebAuthenticationUtils.cpp:
        (WebCore::buildAttestationObject):
        * Modules/webauthn/WebAuthenticationUtils.h:
        * Modules/webauthn/fido/DeviceResponseConverter.cpp:
        (fido::readCTAPMakeCredentialResponse):
        * Modules/webauthn/fido/DeviceResponseConverter.h:
        * Modules/webauthn/fido/FidoConstants.h:
        noneAttestationValue is moved to WebAuthenticationConstants.h.
        * Modules/webauthn/fido/U2fResponseConverter.cpp:
        (fido::readU2fRegisterResponse):
        * Modules/webauthn/fido/U2fResponseConverter.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-05-22  Zalan Bujtas  <zalan@apple.com>

        [Paste] Add support for preferred presentation size when pasting an image
        https://bugs.webkit.org/show_bug.cgi?id=198132
        <rdar://problem/50886917>

        Reviewed by Wenson Hsieh.

        Set the pasted <img> width/height attributes when the preferred presentation size is available.

        * editing/WebContentReader.h:
        * editing/cocoa/WebContentReaderCocoa.mm:
        (WebCore::createFragmentForImageAttachment):
        (WebCore::WebContentReader::readImage):
        * editing/markup.cpp:
        (WebCore::createFragmentForImageAndURL):
        * editing/markup.h:
        * platform/Pasteboard.h:
        (WebCore::PasteboardWebContentReader::readImage):
        * platform/PasteboardItemInfo.h:
        (WebCore::PasteboardItemInfo::encode const):
        (WebCore::PasteboardItemInfo::decode):
        * platform/ios/PasteboardIOS.mm:
        (WebCore::Pasteboard::readPasteboardWebContentDataForType):
        (WebCore::Pasteboard::read):
        (WebCore::Pasteboard::readRespectingUTIFidelities):
        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::informationForItemAtIndex):

2019-05-22  Jer Noble  <jer.noble@apple.com>

        Hide MediaCapabilities.encodingInfo() when the platform does not support it.
        https://bugs.webkit.org/show_bug.cgi?id=197476

        Reviewed by Eric Carlson.

        Test: platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html

        Add a new IDL attribute, CustomEnabled, which allows non Settings-based enabling of attributes and objects.

        * Modules/mediacapabilities/MediaCapabilities.idl:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSMediaCapabilitiesCustom.h: Copied from Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl.
        (WebCore::JSMediaCapabilitiesEncodingInfoIsEnabled):
        * bindings/scripts/CodeGeneratorJS.pm:
        (NeedsRuntimeCheck):
        (GenerateRuntimeEnableConditionalString):
        * bindings/scripts/IDLAttributes.json:
        * bindings/scripts/preprocess-idls.pl:
        (GenerateConstructorAttributes):
        * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:
        (WebCore::MediaEngineConfigurationFactory::hasDecodingConfigurationFactory):
        (WebCore::MediaEngineConfigurationFactory::hasEncodingConfigurationFactory):
        * platform/mediacapabilities/MediaEngineConfigurationFactory.h:

2019-05-22  Youenn Fablet  <youenn@apple.com>

        Implement Feature policy self/none/* parsing
        https://bugs.webkit.org/show_bug.cgi?id=198078

        Reviewed by Eric Carlson.

        Start to implement https://w3c.github.io/webappsec-feature-policy/#algo-parse-policy-directive
        'src' is not supported yet.
        Apply the rules to getUserMedia.
        Update getDisplayMedia keyword from 'display' to 'display-capture' as per spec.

        Test: imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-feature-policy-none.https.html

        * Headers.cmake:
        * Modules/mediastream/UserMediaController.cpp:
        (WebCore::isSecure):
        (WebCore::isAllowedByFeaturePolicy):
        (WebCore::isAllowedToUse):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * html/FeaturePolicy.cpp: Added.
        (WebCore::isAllowedByFeaturePolicy):
        (WebCore::processOriginItem):
        (WebCore::updateList):
        (WebCore::FeaturePolicy::parse):
        (WebCore::FeaturePolicy::allows const):
        * html/FeaturePolicy.h: Added.
        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::featurePolicy const):
        * html/HTMLIFrameElement.h:

2019-05-21  Jer Noble  <jer.noble@apple.com>

        Media controls don't show in WK2 video fullscreen sometimes
        https://bugs.webkit.org/show_bug.cgi?id=198094
        <rdar://problem/50970661>

        Reviewed by Tim Horton.

        Ensure that the WebAVPlayerLayer never allows hit testing, as this keeps touches from reaching
        AVKit's controls.

        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerLayer init]):

2019-05-21  Saam barati  <sbarati@apple.com>

        WHLSL: Add an AST dumper
        https://bugs.webkit.org/show_bug.cgi?id=198059

        Reviewed by Myles Maxfield.

        This patch makes it so we can dump the WHLSL program's AST.
        This will become useful when we're debugging passes that
        transform the AST.
        
        The dumper mostly prints in a style where the dump is almost
        valid WHLSL code. E.g, this WHLSL program:
        ```
        int foo(int arg) {
            return arg + 1;
        }
        ```
        
        gets dumped as:
        ```
        int foo(int arg) {
           return operator+(arg, 1);
        }
        ```
        
        This patch also adds a way to dump between each pass, after
        parsing, or at the end of all passes. Currently, this is controlled
        by a static variable. I'll make these runtime configurable in a follow
        up: https://bugs.webkit.org/show_bug.cgi?id=198097

        No new tests because this is used for logging.

        * Modules/webgpu/WHLSL/AST/WHLSLAST.h: Added.
        * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
        (WebCore::WHLSL::AST::toString):
        * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:
        (WebCore::WHLSL::AST::BuiltInSemantic::toString const):
        * Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h:
        (WebCore::WHLSL::AST::toString):
        * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h:
        (WebCore::WHLSL::AST::ResourceSemantic::toString):
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::toString): Deleted.
        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp: Added.
        (WebCore::WHLSL::ASTDumper::visit):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.h: Added.
        (WebCore::WHLSL::ASTDumper::toString):
        (WebCore::WHLSL::ASTDumper::Indent::Indent):
        (WebCore::WHLSL::ASTDumper::bumpIndent):
        (WebCore::WHLSL::toString):
        (WebCore::WHLSL::dumpAST):
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::dumpASTIfNeeded):
        (WebCore::WHLSL::dumpASTAfterParsingIfNeeded):
        (WebCore::WHLSL::dumpASTBetweenEachPassIfNeeded):
        (WebCore::WHLSL::dumpASTAtEndIfNeeded):
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-05-21  Saam barati  <sbarati@apple.com>

        WHLSL: Parsing negative int literals parses the positive value instead
        https://bugs.webkit.org/show_bug.cgi?id=198096

        Reviewed by Dean Jackson.

        I also made the code around < INT_MIN a bit easier to follow along with.

        No new tests because we haven't imported WHLSL test suite yet.
        Verified this works using the AST dumper.

        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::intLiteralToInt):

2019-05-21  Myles C. Maxfield  <mmaxfield@apple.com>

        font-optical-sizing applies the wrong variation value
        https://bugs.webkit.org/show_bug.cgi?id=197528
        <rdar://problem/50152854>

        Reviewed by Antti Koivisto.

        The OpenType spec says in
        https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_opsz

        "Scale interpretation: Values can be interpreted as text size, in points."

        It turns out that it means "typographic point size" which is equal to CSS pixels, not
        CSS points.

        There are two parts of the font that are sensitive to optical sizing: variation values and
        the trak table. We don't want to set the variation value directly because then the trak table
        won't be affected. Instead, we can use kCTFontOpticalSizeAttribute to set both of them together.
        We will only do this when the CSS says text-rendering:optimizeLegibility or when the font has
        an opsz axis but no STAT table. Otherwise, we won't do anything special, which lets CoreText
        handle the default behavior for us. This gives us the same default behavior as the rest of the
        system.

        Tests: fast/text/variations/optical-sizing-trak-2.html
               fast/text/variations/optical-sizing-trak.html
               fast/text/variations/optical-sizing-units.html
               fast/text/variations/optical-sizing-units-2.html

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontType::FontType):
        (WebCore::preparePlatformFont):
        (WebCore::fontWithFamily):
        (WebCore::FontCache::systemFallbackForCharacters):
        * platform/graphics/cocoa/FontCacheCoreText.h:
        * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
        (WebCore::FontFamilySpecificationCoreText::fontRanges const):
        * platform/graphics/mac/FontCustomPlatformData.cpp:
        (WebCore::FontCustomPlatformData::fontPlatformData):

2019-05-21  Simon Fraser  <simon.fraser@apple.com>

        Layer flashing and poor perf during scrolling of message list on gmail.com and hotmail.com - overlap testing needs to constrained to clipping scopes
        https://bugs.webkit.org/show_bug.cgi?id=198091
        <rdar://problem/49403082>

        Reviewed by Antti Koivisto.
        
        When overflow:scroll is scrolled asynchronously, we need to have already created compositing layers where necessary
        for clipped-out layers in the scrolled content so that we have something to reveal. We also have ensure
        that layers inside the scroller (but scrolled out of view) don't trigger overlap with layers outside the scroller.
        All this has to work when the containing block hierarchy (clipping/scrolling) doesn't match the paint order hierarchy (structure
        of the z-order and compositing trees).

        Overlap testing previously simply used a list of rectangles per compositing container (OverlapMapContainer). This is
        a series of layer bounds, built up as we traver the layer tree in z-order. Layers contribute to container N-2, and test
        against container N-1.
        
        To handle overlap with non-stacking-context scrollers, introduce the concept of a ClippingScope, which encompasses
        a set of layers sharing the same composited-scrolling containing-block ancestor. Within a ClippingScope, layer bounds
        are computed unclipped. Between them, bounds are tested clipped.
        
        Conceptually, each OverlapMapContainer has a tree of ClippingScopes (reflecting the containing-block order tree of
        composited overflow scroll), and rects are added to the appropriate ClippingScope. This tree is currently always
        root-relative; the root node is the RenderView's RenderLayer, and will accumulate the bounds of layers not inside
        composited overflow scroll (just like the old code).
        
        When a OverlapMapContainer is popped, the list of rectangles in its ClippingScope tree is merged with that of the previous
        container.

        Tests: compositing/layer-creation/clipping-scope/nested-scroller-overlap.html
               compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller.html
               compositing/layer-creation/clipping-scope/overlap-constrained-inside-stacking-context-scroller.html
               compositing/layer-creation/clipping-scope/scroller-with-negative-z-children.html
               compositing/layer-creation/clipping-scope/shared-layers-in-scroller.html

        * rendering/LayerOverlapMap.cpp:
        (WebCore::operator<<):
        (WebCore::OverlapMapContainer::OverlapMapContainer):
        (WebCore::OverlapMapContainer::ClippingScope::ClippingScope):
        (WebCore::OverlapMapContainer::ClippingScope::childWithLayer const):
        (WebCore::OverlapMapContainer::ClippingScope::addChildWithLayerAndBounds):
        (WebCore::OverlapMapContainer::ClippingScope::addChild):
        (WebCore::OverlapMapContainer::ClippingScope::appendRect):
        (WebCore::OverlapMapContainer::clippingScopeContainingLayerChildRecursive):
        (WebCore::OverlapMapContainer::scopeContainingLayer const):
        (WebCore::OverlapMapContainer::rootScope const):
        (WebCore::OverlapMapContainer::rootScope):
        (WebCore::OverlapMapContainer::add):
        (WebCore::OverlapMapContainer::overlapsLayers const):
        (WebCore::OverlapMapContainer::mergeClippingScopesRecursive):
        (WebCore::OverlapMapContainer::append):
        (WebCore::OverlapMapContainer::ensureClippingScopeForLayers):
        (WebCore::OverlapMapContainer::findClippingScopeForLayers const):
        (WebCore::OverlapMapContainer::recursiveOutputToStream const):
        (WebCore::OverlapMapContainer::dump const):
        (WebCore::LayerOverlapMap::LayerOverlapMap):
        (WebCore::LayerOverlapMap::add):
        (WebCore::LayerOverlapMap::overlapsLayers const):
        (WebCore::LayerOverlapMap::pushCompositingContainer):
        (WebCore::LayerOverlapMap::popCompositingContainer):
        (WebCore::OverlapMapContainer::unite): Deleted.
        (WebCore::OverlapMapContainer::rectList const): Deleted.
        * rendering/LayerOverlapMap.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::BackingSharingState::appendSharingLayer):
        (WebCore::RenderLayerCompositor::BackingSharingState::updateBeforeDescendantTraversal):
        (WebCore::RenderLayerCompositor::updateCompositingLayers):
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
        (WebCore::RenderLayerCompositor::computeExtent const):
        (WebCore::createsClippingScope):
        (WebCore::enclosingClippingScopes):
        (WebCore::RenderLayerCompositor::addToOverlapMap const):
        (WebCore::RenderLayerCompositor::updateOverlapMap const):
        (WebCore::RenderLayerCompositor::layerOverlaps const):
        * rendering/RenderLayerCompositor.h:

2019-05-21  Antoine Quint  <graouts@apple.com>

        [macOS] Compatibility mouse events aren't prevented by calling preventDefault() on pointerdown
        https://bugs.webkit.org/show_bug.cgi?id=198072
        <rdar://problem/50983361>

        Reviewed by Dean Jackson.

        The Pointer Events spec says that "compatibility" mouse events, which means all mouse events save for "click",
        should not be dispatched for a given pointer if preventDefault() was called during the dispatch of the "pointerdown"
        event. Additionally, calling preventDefault() during the dispatch of "pointerup" has no effect.

        * dom/Element.cpp:
        (WebCore::Element::dispatchMouseEvent):
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier):
        (WebCore::PointerCaptureController::pointerEventWasDispatched):
        * page/PointerCaptureController.h:

2019-05-21  Antti Koivisto  <antti@apple.com>

        RTL/overflow scroll tests fail with async overflow enabled
        https://bugs.webkit.org/show_bug.cgi?id=196013
        <rdar://problem/49066649>

        Reviewed by Simon Fraser.

        Test: compositing/ios/rtl-overflow-scrolling-2.html

        This patch makes the basic RTL cases work in the scrolling tree.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::minimumScrollPosition const):
        (WebCore::ScrollingTreeScrollingNode::maximumScrollPosition const):

        Add missing scroll offset <-> scroll position conversions.

2019-05-21  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] Add initial accessibility support using ATK
        https://bugs.webkit.org/show_bug.cgi?id=197413

        Reviewed by Michael Catanzaro.

        Use USE(ATK) instead of PLATFORM(GTK) for ATK related code and use ATK when available for WPE port too.

        * PlatformWPE.cmake:
        * SourcesWPE.txt:
        * accessibility/AXObjectCache.h:
        * accessibility/AccessibilityList.cpp:
        (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::canSetValueAttribute const):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::textIteratorBehaviorForTextRange const):
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::indexForVisiblePosition const):
        (WebCore::AccessibilityRenderObject::shouldNotifyActiveDescendant const):
        * accessibility/AccessibilityTableColumn.cpp:
        (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored const):
        * accessibility/AccessibilityTableHeaderContainer.cpp:
        (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored const):
        * accessibility/atk/WebKitAccessible.cpp:
        (webkitAccessibleGetAttributes):
        * accessibility/wpe/AXObjectCacheWPE.cpp: Removed.
        * accessibility/wpe/AccessibilityObjectWPE.cpp: Removed.
        * editing/FrameSelection.h:

2019-05-20  Ross Kirsling  <ross.kirsling@sony.com>

        Make lossy LayoutUnit constructors explicit
        https://bugs.webkit.org/show_bug.cgi?id=191811

        Reviewed by Antti Koivisto.

        * platform/LayoutUnit.h:
        Make lossy unary constructors explicit.
        For ergonomics, give float overloads to copy constructor and round/floor/ceil functions.

        * css/LengthFunctions.h:
        * platform/graphics/LayoutPoint.h:
        * platform/graphics/LayoutRect.h:
        * platform/graphics/LayoutSize.h:
        * rendering/RenderBox.h:
        * rendering/RenderElement.h:
        Templatize common functions to allow LayoutUnit itself to dictate which types it allows.

        * html/shadow/SliderThumbElement.cpp:
        * page/FrameView.cpp:
        * page/Page.cpp:
        * page/SpatialNavigation.cpp:
        * page/scrolling/AxisScrollSnapOffsets.cpp:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        * layout/FormattingContextGeometry.cpp:
        * layout/FormattingContextQuirks.cpp:
        * layout/LayoutState.cpp:
        * layout/displaytree/DisplayBox.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        * layout/layouttree/LayoutReplaced.cpp:
        * platform/animation/AnimationUtilities.h:
        * platform/cocoa/ScrollSnapAnimatorState.mm:
        * rendering/BorderEdge.cpp:
        * rendering/EllipsisBox.cpp:
        * rendering/FixedTableLayout.cpp:
        * rendering/InlineBox.cpp:
        * rendering/InlineFlowBox.cpp:
        * rendering/InlineFlowBox.h:
        * rendering/InlineTextBox.cpp:
        * rendering/RenderBlock.cpp:
        * rendering/RenderBlockFlow.cpp:
        * rendering/RenderBlockLineLayout.cpp:
        * rendering/RenderBox.cpp:
        * rendering/RenderBoxModelObject.cpp:
        * rendering/RenderBoxModelObject.h:
        * rendering/RenderDeprecatedFlexibleBox.cpp:
        * rendering/RenderElement.cpp:
        * rendering/RenderImage.cpp:
        * rendering/RenderInline.cpp:
        * rendering/RenderLineBreak.cpp:
        * rendering/RenderListMarker.cpp:
        * rendering/RenderMultiColumnSet.cpp:
        * rendering/RenderMultiColumnSet.h:
        * rendering/RenderObject.cpp:
        * rendering/RenderReplaced.cpp:
        * rendering/RenderTable.cpp:
        * rendering/RenderTableCell.cpp:
        * rendering/RenderTableSection.cpp:
        * rendering/RenderText.cpp:
        * rendering/RenderTextControlMultiLine.cpp:
        * rendering/RenderThemeMac.mm:
        * rendering/RenderVTTCue.cpp:
        * rendering/RenderView.cpp:
        * rendering/RootInlineBox.cpp:
        * rendering/SimpleLineLayoutFunctions.cpp:
        * rendering/SimpleLineLayoutPagination.cpp:
        * rendering/SimpleLineLayoutResolver.cpp:
        * rendering/line/LineWidth.cpp:
        * rendering/mathml/MathOperator.cpp:
        * rendering/mathml/RenderMathMLBlock.cpp:
        * rendering/mathml/RenderMathMLBlock.h:
        * rendering/mathml/RenderMathMLFencedOperator.h:
        * rendering/mathml/RenderMathMLFraction.cpp:
        * rendering/mathml/RenderMathMLMenclose.cpp:
        * rendering/mathml/RenderMathMLOperator.cpp:
        * rendering/mathml/RenderMathMLRoot.cpp:
        * rendering/mathml/RenderMathMLScripts.cpp:
        * rendering/mathml/RenderMathMLToken.cpp:
        * rendering/shapes/BoxShape.cpp:
        * rendering/shapes/ShapeOutsideInfo.cpp:
        * rendering/style/CollapsedBorderValue.h:
        * rendering/style/NinePieceImage.cpp:
        * rendering/style/NinePieceImage.h:
        * rendering/style/RenderStyle.cpp:
        * rendering/style/RenderStyle.h:
        * rendering/svg/RenderSVGText.cpp:
        * rendering/svg/SVGInlineTextBox.cpp:
        Make usage of LayoutUnit(float) and LayoutUnit(double) explicit where needed.

2019-05-20  Jer Noble  <jer.noble@apple.com>

        Provide an explicit UIModalPresentation style when creating an AVPlayerViewController for fullscreen.
        https://bugs.webkit.org/show_bug.cgi?id=198052

        Reviewed by Tim Horton.

        Make sure AVPlayerViewController has an "overFullScreen" modal style.

        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerViewController initWithFullscreenInterface:]):

2019-05-20  Chris Dumez  <cdumez@apple.com>

        Fix security check in ScriptController::canAccessFromCurrentOrigin()
        https://bugs.webkit.org/show_bug.cgi?id=196730
        <rdar://problem/49731231>

        Reviewed by Ryosuke Niwa.

        Fix security check in ScriptController::canAccessFromCurrentOrigin() when there is no
        current JS exec state. Instead of returning true unconditionally, we now fall back to
        using the accessing document's origin for the security check. The new behavior is
        aligned with Blink:
        https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/html_frame_element_base.cc?rcl=d3f22423d512b45466f1694020e20da9e0c6ee6a&l=62

        This fix is based on a patch from Sergei Glazunov <glazunov@google.com>.

        Test: http/tests/security/showModalDialog-sync-cross-origin-page-load2.html

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::canAccessFromCurrentOrigin):
        * bindings/js/ScriptController.h:
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::isURLAllowed const):

2019-05-20  Gabe Giosia  <giosia@google.com>

        Range getBoundingClientRect returning zero rect on simple text node with <br> before it
        https://bugs.webkit.org/show_bug.cgi?id=182181

        Reviewed by Antti Koivisto.
        
        Correct rect of RenderText in a block element when used in a Range
        over a line break element. The end offset was miscalculated.

        Addded line-break case to fast/dom/Range/getBoundingClientRect.html

        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::collectAbsoluteQuadsForRange):
        * rendering/SimpleLineLayoutResolver.cpp:
        (WebCore::SimpleLineLayout::RunResolver::rangeForRendererWithOffsets const):

2019-05-19  Brent Fulgham  <bfulgham@apple.com>

        Unreviewed build fix after r245508.

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: Don't use
        an 'import' directive in a C++ file.

2019-05-19  Brent Fulgham  <bfulgham@apple.com>

        Wait to get frame until after layout has been run
        https://bugs.webkit.org/show_bug.cgi?id=197999
        <rdar://problem/50800345>

        Reviewed by Alex Christensen.

        The current frame can change when layout runs, so don't bother retrieving
        the frame until the final layout pass is complete.

        Test: fast/dom/window-inner-width-crash.html

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::innerHeight const): Move frame access past the
        layout operation.
        (WebCore::DOMWindow::innerWidth const): Ditto.
        (WebCore::DOMWindow::scrollX const): Ditto.
        (WebCore::DOMWindow::scrollY const): Ditto.

2019-05-19  Brent Fulgham  <bfulgham@apple.com>

        Unreviewed build fix

        Attempting to build with only Open Source sources on shipping software with
        ASan enabled triggers build failures due to missing includes. This patch adds
        the necessary includes to cleanly build WebCore.

        * Modules/applepay/ApplePaySession.cpp:
        * Modules/applepay/PaymentSession.cpp:
        * Modules/mediastream/UserMediaController.cpp:
        * bindings/js/ScriptController.cpp:
        * contentextensions/ContentExtensionsBackend.cpp:
        * dom/Document.cpp:
        * dom/ScriptedAnimationController.cpp:
        * editing/cocoa/EditorCocoa.mm:
        * editing/cocoa/HTMLConverter.mm:
        * editing/cocoa/WebContentReaderCocoa.mm:
        * editing/markup.cpp:
        * history/CachedFrame.cpp:
        * html/HTMLDocument.cpp:
        * html/HTMLHtmlElement.cpp:
        * html/HTMLMediaElement.cpp:
        * html/ImageDocument.cpp:
        * html/MediaDocument.cpp:
        * html/PluginDocument.cpp:
        * html/parser/HTMLDocumentParser.cpp:
        * html/parser/XSSAuditor.cpp:
        * inspector/InspectorInstrumentation.cpp:
        * inspector/agents/InspectorApplicationCacheAgent.cpp:
        * inspector/agents/InspectorNetworkAgent.cpp:
        * inspector/agents/InspectorPageAgent.cpp:
        * inspector/agents/page/PageNetworkAgent.cpp:
        * loader/ApplicationManifestLoader.cpp:
        * loader/FrameLoader.cpp:
        * loader/LoadTiming.cpp:
        * loader/NetscapePlugInStreamLoader.cpp:
        * loader/ResourceLoader.cpp:
        * loader/SubresourceLoader.cpp:
        * loader/appcache/ApplicationCacheHost.cpp:
        * loader/archive/cf/LegacyWebArchive.cpp:
        * loader/icon/IconLoader.cpp:
        * page/ContextMenuController.cpp:
        * page/FrameView.cpp:
        * page/Page.cpp:
        * page/Performance.cpp:
        * page/PerformanceNavigation.cpp:
        * page/Quirks.cpp:
        * page/UserContentProvider.cpp:
        * page/csp/ContentSecurityPolicy.cpp:
        * page/mac/PageMac.mm:
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        * svg/graphics/SVGImage.cpp:
        * testing/Internals.cpp:

2019-05-19  Antoine Quint  <graouts@apple.com>

        [Pointer Events] Listening to a "pointerover", "pointerenter", "pointerout" or "pointerleave" event alone does not fire the event on iOS
        https://bugs.webkit.org/show_bug.cgi?id=197882
        <rdar://problem/50769116>

        Reviewed by Dean Jackson.

        Tests: pointerevents/ios/pointerenter-alone.html
               pointerevents/ios/pointerleave-alone.html
               pointerevents/ios/pointerout-alone.html
               pointerevents/ios/pointerover-alone.html

        * dom/EventNames.h:
        (WebCore::EventNames::isTouchRelatedEventType const):
        (WebCore::EventNames::touchRelatedEventNames const):
        (WebCore::EventNames::extendedTouchRelatedEventNames const):

2019-05-19  Antoine Quint  <graouts@apple.com>

        [Pointer Events] A pointer should be marked as primary for all of its events
        https://bugs.webkit.org/show_bug.cgi?id=197909
        <rdar://problem/50801608>

        Reviewed by Dean Jackson.

        Add an ivar for EventHandler which we'll use in WebKitAdditions code to track the touch identifier
        of the very first touch to start in a given sequence.

        * page/EventHandler.h:

2019-05-19  Darin Adler  <darin@apple.com>

        Change String::number to use "shortest" instead of "fixed precision 6 digits"
        https://bugs.webkit.org/show_bug.cgi?id=178319

        Reviewed by Sam Weinig.

        * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
        (webkitAccessibleSetNewValue): Use String::numberToStringFixedPrecision
        instead of String::number to be explicit about the fact that it's fixed precision.
        * page/linux/ResourceUsageOverlayLinux.cpp:
        (gcTimerString): Ditto.

        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
        (printTransform): Use appendFixedPrecisionNumber instead of appendNumber
        to be explicit about the fact that it's fixed precision.
        (printLayer): Ditto.
        (WebCore::PlatformCALayerWin::layerTreeAsString const): Ditto.
        * platform/graphics/freetype/FontCacheFreeType.cpp:
        (buildVariationSettings): Ditto.

        * svg/SVGNumberList.h: Use appendFixedPrecisionNumber instead of appendNumber
        to be explicit about the fact that it's fixed precision. We'll consider moving
        to shortest later.

        * svg/SVGPathUtilities.cpp:
        (WebCore::buildStringFromPath): Use appendNumberShortest instead of
        appendNumberECMAScript since these are single-precision.

        * svg/SVGPointList.h: Use appendFixedPrecisionNumber instead of appendNumber
        to be explicit about the fact that it's fixed precision. We'll consider moving
        to shortest later.
        * svg/SVGTransformValue.h: Ditto.

2019-05-19  Simon Fraser  <simon.fraser@apple.com>

        Layers painting into shared backing need to contribute to overlap
        https://bugs.webkit.org/show_bug.cgi?id=198021

        Reviewed by Zalan Bujtas.
        
        Layers that paint into a composited (non-root) layer get added to the overlap map so
        that later layers correct overlap them; this is done via the test against currentState.compositingAncestor.

        We need the same logic for layers that paint into shared backing; they need to behave
        the same way in terms of how they contribute to overlap. We already had currentState.backingSharingAncestor
        which was unused, but now use it for this, and correctly null it out when a layer composites.

        Bug was noticed during testing, and not known to affect any websites (though it probably does).
        
        Also move the overlap container popping into updateOverlapMap() so the two callers can
        share the code, and more explicitly track whether a container was pushed.

        Test: compositing/shared-backing/sharing-child-contributes-to-overlap.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
        (WebCore::RenderLayerCompositor::updateOverlapMap const):
        * rendering/RenderLayerCompositor.h:

2019-05-17  Joonghun Park  <pjh0718@gmail.com>

        Implement CSS `display: flow-root` (modern clearfix)
        https://bugs.webkit.org/show_bug.cgi?id=165603

        Reviewed by Zalan Bujtas.

        This change follows https://drafts.csswg.org/css-display-3/#valdef-display-flow-root as below.

        'display: flow-root' generates a block container box, and lays out its contents using flow layout.
        It always establishes a new block formatting context for its contents.

        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        * css/CSSValueKeywords.in:
        * css/StyleResolver.cpp:
        (WebCore::equivalentBlockDisplay):
        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::createsNewFormattingContext const):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::createFor):
        * rendering/style/RenderStyleConstants.h:

2019-05-17  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Use builtin FindICU
        https://bugs.webkit.org/show_bug.cgi?id=197934

        Reviewed by Michael Catanzaro.

        Remove uses of ICU_INCLUDE_DIRS and ICU_LIBRARIES.

        * CMakeLists.txt:
        * PlatformPlayStation.cmake:
        * PlatformWPE.cmake:

2019-05-17  Alex Christensen  <achristensen@webkit.org>

        Enable legacy EME for iOS WKWebView
        https://bugs.webkit.org/show_bug.cgi?id=197964
        <rdar://problem/50625666>

        Reviewed by Wenson Hsieh.

        This was attempted unsuccessfully in r230169.
        Verified manually that it works as desired.

        * page/RuntimeEnabledFeatures.h:

2019-05-17  Sihui Liu  <sihui_liu@apple.com>

        ASSERTION FAILED: !m_backingStore in WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore(uint64_t)
        https://bugs.webkit.org/show_bug.cgi?id=197741
        <rdar://problem/50625006>

        Reviewed by Youenn Fablet.

        If an open request is made before a delete request, open task should be performed before delete task on the
        database thread. After r242911, open request needs to wait decision of StorageQuotaManager before posting task
        to database thread, while delete request needs not. This makes deletion happen before open.

        We need to make sure tasks are in correct order by not starting next open or delete request when database is in 
        the middle of open or deletion.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
        (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):

2019-05-17  Antoine Quint  <graouts@apple.com>

        Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior
        https://bugs.webkit.org/show_bug.cgi?id=197943
        <rdar://problem/49078202>

        Reviewed by Brent Fulgham.

        Tests: fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html
               platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html

        * css/parser/CSSParserContext.cpp:
        (WebCore::CSSParserContext::CSSParserContext):
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::legacyOverflowScrollingTouchPolicy const):
        (WebCore::DocumentLoader::setLegacyOverflowScrollingTouchPolicy):

2019-05-17  Alex Christensen  <achristensen@webkit.org>

        Add SPI to set a list of hosts to which to send custom header fields cross-origin
        https://bugs.webkit.org/show_bug.cgi?id=197397

        Reviewed by Geoff Garen.

        In r223001 I added the ability to send custom headers, but with a restriction that they will not be sent except to the origin of the main document.
        We need the ability to specify what origins to send these headers to even if they are not first party requests.
        We get this information in a list of strings which are the hosts to send the headers to.  Some of the strings have an asterisk at the beginning,
        indicating that the headers are to be sent to all subdomains.

        I repurposed some ObjC SPI that was never adopted, but I keep testing the C API that was to verify no regression.
        I also added some new API tests for the new behavior.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/CustomHeaderFields.cpp: Added.
        (WebCore::CustomHeaderFields::thirdPartyDomainsMatch const):
        * loader/CustomHeaderFields.h: Added.
        (WebCore::CustomHeaderFields::encode const):
        (WebCore::CustomHeaderFields::decode):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::setCustomHeaderFields): Deleted.
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::setCustomHeaderFields):
        (WebCore::DocumentLoader::customHeaderFields const):
        (WebCore::DocumentLoader::customHeaderFields): Deleted.
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):

2019-05-17  Youenn Fablet  <youenn@apple.com>

        Make AVVideoCaptureSource more robust to configuration failures
        https://bugs.webkit.org/show_bug.cgi?id=197997
        rdar://problem/50875662

        Reviewed by Eric Carlson.

        Covered by manual testing.

        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate):
        Make sure to commit configuration once calling beginConfiguration.
        In case of error in setting frame rate, log the error but continue capturing.

2019-05-17  Rob Buis  <rbuis@igalia.com>

        Implement imagesrcset and imagesizes attributes on link rel=preload
        https://bugs.webkit.org/show_bug.cgi?id=192950

        Reviewed by Youenn Fablet.

        Implement imagesrcset and imagesizes attributes for both Link header
        and link element.

        Tests: imported/w3c/web-platform-tests/preload/dynamic-adding-preload-imagesrcset.html
               imported/w3c/web-platform-tests/preload/link-header-preload-delay-onload.html
               imported/w3c/web-platform-tests/preload/link-header-preload-imagesrcset.html
               imported/w3c/web-platform-tests/preload/link-header-preload-nonce.html
               imported/w3c/web-platform-tests/preload/link-header-preload.html
               imported/w3c/web-platform-tests/preload/onload-event.html
               imported/w3c/web-platform-tests/preload/preload-with-type.html

        * html/HTMLAttributeNames.in:
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):
        * html/HTMLLinkElement.idl:
        * loader/LinkHeader.cpp:
        (WebCore::paramterNameFromString):
        (WebCore::LinkHeader::setValue):
        (WebCore::LinkHeader::LinkHeader):
        * loader/LinkHeader.h:
        (WebCore::LinkHeader::imageSrcSet const):
        (WebCore::LinkHeader::imageSizes const):
        (WebCore::LinkHeader::isViewportDependent const):
        * loader/LinkLoader.cpp:
        (WebCore::LinkLoader::loadLinksFromHeader):
        (WebCore::LinkLoader::preloadIfNeeded):
        (WebCore::LinkLoader::loadLink):
        * loader/LinkLoader.h:

2019-05-17  Keith Rollin  <krollin@apple.com>

        Re-enable generate-xcfilelists
        https://bugs.webkit.org/show_bug.cgi?id=197933
        <rdar://problem/50831677>

        Reviewed by Jonathan Bedard.

        The following two tasks have been completed, and we can re-enable
        generate-xcfilelists:

        Bug 197619 <rdar://problem/50507392> Temporarily disable generate-xcfilelists (197619)
        Bug 197622 <rdar://problem/50508222> Rewrite generate-xcfilelists in Python (197622)

        No new tests -- no change in user-visible functionality.

        * Scripts/check-xcfilelists.sh:

2019-05-17  Wenson Hsieh  <wenson_hsieh@apple.com>

        Fix a typo in some user agent string logic
        https://bugs.webkit.org/show_bug.cgi?id=197992
        <rdar://problem/50895962>

        Reviewed by Brent Fulgham.

        Adjust the major version number for the desktop user agent string.

        * platform/ios/UserAgentIOS.mm:
        (WebCore::standardUserAgentWithApplicationName):

2019-05-17  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r245170): gmail.com inbox table header flickers
        https://bugs.webkit.org/show_bug.cgi?id=198005
        <rdar://problem/50907718>

        Reviewed by Antti Koivisto.

        When a layer started as painting into shared backing, but then became independently
        composited (e.g. by having to clip composited children), it wouldn't have the "overlap"
        indirect compositing reason. This allowed requiresOwnBackingStore() to say that it
        could paint into some ancestor, but this breaks overlap. So in this code path,
        put IndirectCompositingReason::Overlap back on the layer which restores the previous
        behavior.

        Make some logging changes to help diagnose things like this.

        Test: compositing/shared-backing/overlap-after-end-sharing.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):
        (WebCore::outputPaintOrderTreeLegend):
        (WebCore::outputPaintOrderTreeRecursive):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::updateBacking):
        (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
        (WebCore::RenderLayerCompositor::reasonsForCompositing const):
        (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
        * rendering/RenderLayerCompositor.h:

2019-05-17  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r245170): gmail.com header flickers when hovering over the animating buttons
        https://bugs.webkit.org/show_bug.cgi?id=197975
        <rdar://problem/50865946>

        Reviewed by Antti Koivisto.

        When computeCompositingRequirements() determined that a layer could paint into shared backing, it
        pushed an overlap container. If that layer then converted to normal composting, we'd push a second
        overlap container, which left the overlap map in a bad state for the rest of the compositing
        traversal, causing layers to not get composited when necessary.

        Test: compositing/shared-backing/overlap-after-shared-to-composited.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):

2019-05-17  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r245401.
        https://bugs.webkit.org/show_bug.cgi?id=197990

        Causing internal build failures (Requested by ShawnRoberts on
        #webkit).

        Reverted changeset:

        "Add SPI to set a list of hosts to which to send custom header
        fields cross-origin"
        https://bugs.webkit.org/show_bug.cgi?id=197397
        https://trac.webkit.org/changeset/245401

2019-05-16  Said Abou-Hallawa  <sabouhallawa@apple.com>

        SVGElement should detach itself from all its properties before it is deleted
        https://bugs.webkit.org/show_bug.cgi?id=197954

        Reviewed by Simon Fraser.

        Before deleting the SVGElement node, SVGElement::detachAllProperties()
        needs to be called. This will make the properties be detached objects
        which means no change will be committed unless these properties are
        attached to another owner.

        Test: svg/dom/svg-properties-detach-change.html

        * dom/Node.cpp:
        (WebCore::Node::removedLastRef):
        * svg/SVGElement.h:
        (WebCore::SVGElement::detachAllProperties):

2019-05-17  Eric Carlson  <eric.carlson@apple.com>

        Allow sequential playback of media files when initial playback started with a user gesture
        https://bugs.webkit.org/show_bug.cgi?id=197959
        <rdar://problem/50655207>

        Reviewed by Youenn Fablet.

        Test: media/playlist-inherits-user-gesture.html

        * dom/Document.cpp:
        (WebCore::Document::processingUserGestureForMedia const): Return true if it is within
        one second of the last HTMLMediaElement 'ended' event.
        * dom/Document.h:
        (WebCore::Document::mediaFinishedPlaying):

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::parseAttribute): removeBehaviorsRestrictionsAfterFirstUserGesture -> 
        removeBehaviorRestrictionsAfterFirstUserGesture.
        (WebCore::HTMLMediaElement::load): Ditto. Don't call removeBehaviorsRestrictionsAfterFirstUserGesture,
        it will be done in prepareForLoad.
        (WebCore::HTMLMediaElement::prepareForLoad): removeBehaviorsRestrictionsAfterFirstUserGesture -> 
        removeBehaviorRestrictionsAfterFirstUserGesture.
        (WebCore::HTMLMediaElement::audioTrackEnabledChanged): Ditto.
        (WebCore::HTMLMediaElement::play): Ditto.
        (WebCore::HTMLMediaElement::pause): Ditto.
        (WebCore::HTMLMediaElement::setVolume): Ditto.
        (WebCore::HTMLMediaElement::setMuted): Ditto.
        (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Ditto.
        (WebCore::HTMLMediaElement::dispatchEvent): Call document().mediaFinishedPlaying()
        when dispatching the 'ended' event.
        (WebCore::HTMLMediaElement::removeBehaviorRestrictionsAfterFirstUserGesture): Rename. Set
        m_removedBehaviorRestrictionsAfterFirstUserGesture.
        (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Deleted.
        * html/HTMLMediaElement.h:
        
        * html/HTMLVideoElement.cpp:
        (WebCore:HTMLVideoElement::nativeImageForCurrentTime): Convert to runtime logging.
        (WebCore:HTMLVideoElement::webkitEnterFullscreen): Ditto.
        (WebCore:HTMLVideoElement::webkitSetPresentationMode): Ditto.
        (WebCore:HTMLVideoElement::fullscreenModeChanged): Ditto.

        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::removeBehaviorRestriction): Update log message.

2019-05-17  Brent Fulgham  <bfulgham@apple.com>

        Hardening: Prevent FrameLoader crash due to SetForScope
        https://bugs.webkit.org/show_bug.cgi?id=197458
        <rdar://problem/50368338>

        Reviewed by Chris Dumez.

        Since SetForScope takes action during a function returns, it might cause
        a crash if its scope is broader than the value it is resetting.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadDifferentDocumentItem):

2019-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Need WebKitContextMenuItemType to open emoji picker
        https://bugs.webkit.org/show_bug.cgi?id=176760

        Reviewed by Michael Catanzaro.

        Add a new context menu item to insert an emoji.

        * loader/EmptyClients.cpp: Empty implementation of ContextMenuClient::insertEmoji().
        * page/ContextMenuClient.h: Add insertEmoji for GTK port.
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::contextMenuItemSelected): Handle insert emoji action.
        (WebCore::ContextMenuController::populate): Add insert emoji item after select all.
        (WebCore::ContextMenuController::checkOrEnableIfNeeded const): Handle insert emoji action.
        * platform/ContextMenuItem.h: Add insert emoji action.
        * platform/LocalizedStrings.h:
        * platform/gtk/LocalizedStringsGtk.cpp:
        (WebCore::contextMenuItemTagInsertEmoji):

2019-05-16  Greg Doolittle  <gr3g@apple.com>

        AX: Unship some ARIA string reflectors that are to-be-replaced by element reflection
        https://bugs.webkit.org/show_bug.cgi?id=197764
        <rdar://problem/50649689>

        Reviewed by Chris Fleizach.

        Specifically these:
        - ariaActiveDescendant
        - ariaControls
        - ariaDescribedBy
        - ariaDetails
        - ariaErrorMessage
        - ariaFlowTo
        - ariaLabelledBy
        - ariaOwns

        Test: LayoutTests/accessibility/ARIA-reflections.html (updated)

        * accessibility/AriaAttributes.idl:

2019-05-16  Youenn Fablet  <youenn@apple.com>

        CoreAudioCaptureSource should be marked as an audio capture track
        https://bugs.webkit.org/show_bug.cgi?id=197953
        <rdar://problem/50552007>

        Reviewed by Eric Carlson.

        Manually tested.

        * platform/mediastream/mac/CoreAudioCaptureSource.h:
        Mark it as microphone so that it can get muted properly.

2019-05-16  Alex Christensen  <achristensen@webkit.org>

        Add SPI to set a list of hosts to which to send custom header fields cross-origin
        https://bugs.webkit.org/show_bug.cgi?id=197397

        Reviewed by Geoff Garen.

        In r223001 I added the ability to send custom headers, but with a restriction that they will not be sent except to the origin of the main document.
        We need the ability to specify what origins to send these headers to even if they are not first party requests.
        We get this information in a list of strings which are the hosts to send the headers to.  Some of the strings have an asterisk at the beginning,
        indicating that the headers are to be sent to all subdomains.

        I repurposed some ObjC SPI that was never adopted, but I keep testing the C API that was to verify no regression.
        I also added some new API tests for the new behavior.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/CustomHeaderFields.cpp: Added.
        (WebCore::CustomHeaderFields::thirdPartyDomainsMatch const):
        * loader/CustomHeaderFields.h: Added.
        (WebCore::CustomHeaderFields::encode const):
        (WebCore::CustomHeaderFields::decode):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::setCustomHeaderFields): Deleted.
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::setCustomHeaderFields):
        (WebCore::DocumentLoader::customHeaderFields const):
        (WebCore::DocumentLoader::customHeaderFields): Deleted.
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):

2019-05-16  Ali Juma  <ajuma@chromium.org>

        [IntersectionObserver] Regression: No initial observation when nothing else triggers rendering
        https://bugs.webkit.org/show_bug.cgi?id=197891

        Reviewed by Simon Fraser.

        Schedule a rendering update whenever a new IntersectionObserver target is added.

        Test: intersection-observer/initial-observation.html

        * page/IntersectionObserver.cpp:
        (WebCore::IntersectionObserver::observe):

2019-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>

        [FreeType] Some character sequences with a variation selector are not rendered
        https://bugs.webkit.org/show_bug.cgi?id=197838

        Reviewed by Michael Catanzaro.

        We get the invalid glyph instead. See http://mts.io/2015/04/21/unicode-symbol-render-text-emoji/. In the table at
        the end the Emoji and Text columns are not correctly rendered. It happens also when copying an emoji from
        GtkEmojiChooser and pasting in WebKit text field, because GTK appends U+FE0F to all emojis to force the emoji
        style. We need to take into account the variation selector when checking if a font can render a combining
        sequence, using FT_Face_GetCharVariantIndex to get the right glyph in case of variation character present.

        * platform/graphics/Font.cpp:
        (WebCore::Font::platformSupportsCodePoint const): Add optional variation parameter.
        (WebCore::Font::canRenderCombiningCharacterSequence const): Take into account variation selector characters
        * platform/graphics/Font.h:
        * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
        (WebCore::FontCascade::fontForCombiningCharacterSequence const): Check variation selectors 0xFE0E and 0xFE0F to
        decide whether to use the emoji or text style.
        * platform/graphics/cocoa/FontCocoa.mm:
        (WebCore::Font::platformSupportsCodePoint const): Return false when a variation character is passed so that
        characters are checked individually.
        * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
        (WebCore::Font::platformSupportsCodePoint const): Use FT_Face_GetCharVariantIndex when a variation character is
        passed.
        * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
        (WebCore::harfBuzzFontFunctions): Do not return true when FT_Face_GetCharVariantIndex returns 0.

2019-05-16  Greg Hughes  <ghughes@apple.com>

        Updated screenHasInvertedColors to use AppKit when available
        https://bugs.webkit.org/show_bug.cgi?id=197935
        <rdar://problem/50834405>

        Reviewed by Chris Fleizach.

        * platform/mac/PlatformScreenMac.mm:
        (WebCore::collectScreenProperties):
        (WebCore::screenHasInvertedColors):

2019-05-15  Simon Fraser  <simon.fraser@apple.com>

        Avoid a recursive descendants layer walk sometimes
        https://bugs.webkit.org/show_bug.cgi?id=197939

        Reviewed by Zalan Bujtas.

        If a layer got composited post-descendants because it needs to clip, for example, we'd do a recursive
        descendant tree walk to add layers to the overlap map. However, all the descendants would already
        have contributed to the overlap map if some non-root ancestor was already composited. So we can
        skip the addDescendantsToOverlapMapRecursive() if we know, before descendants, whether there's
        a non-root composited ancestor.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::CompositingState::hasNonRootCompositedAncestor const):
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):

2019-05-15  Simon Fraser  <simon.fraser@apple.com>

        Clean up code related to compositing overlap map maintenance
        https://bugs.webkit.org/show_bug.cgi?id=197936

        Reviewed by Zalan Bujtas.

        Clarify the logic around updating the overlap map:

        When a layer becomes composited, or paints into a non-root composited layer, we add it to the overlap map
        after traversing descendants (since it only affets layers later in traversal).

        If a layer became composited after traversing descendants, we need to go back and add all the descendants
        to the overlap map with a recursive traversal.

        We can do all this near the end of computeCompositingRequirements/traverseUnchangedSubtree because
        we only check overlap when we enter this function on later layers.

        Add a CompositingOverlap log channel and use it to log the state of the overlap map.

        * platform/Logging.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
        (WebCore::RenderLayerCompositor::addToOverlapMap const):
        (WebCore::RenderLayerCompositor::addDescendantsToOverlapMapRecursive const):
        (WebCore::RenderLayerCompositor::updateOverlapMap const):
        (WebCore::RenderLayerCompositor::addToOverlapMap): Deleted.
        (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): Deleted.
        * rendering/RenderLayerCompositor.h:

2019-05-15  Timothy Hatcher  <timothy@apple.com>

        REGRESSION (r245072): Missing code in Document::styleColorOptions to propagate StyleColor::Options::UseInactiveAppearance
        https://bugs.webkit.org/show_bug.cgi?id=197930
        rdar://problem/49833954

        Reviewed by Wenson Hsieh and Megan Gardner.

        Add some code that was missing from Document in my original patch for r245072.

        * dom/Document.cpp:
        (WebCore::Document::useSystemAppearance const): Drive-by fix code style.
        (WebCore::Document::useInactiveAppearance const): Added.
        (WebCore::Document::styleColorOptions const): Add StyleColor::Options::UseInactiveAppearance.
        * dom/Document.h: Added useInactiveAppearance().

2019-05-15  Devin Rousso  <drousso@apple.com>

        Web Inspector: user gesture toggle should also force user interaction flag
        https://bugs.webkit.org/show_bug.cgi?id=197269

        Reviewed by Joseph Pecoraro.

        Test: inspector/runtime/evaluate-userGestureEmulation-userIsInteracting.html

        * inspector/agents/page/PageRuntimeAgent.cpp:
        (WebCore::PageRuntimeAgent::evaluate):

        * page/ChromeClient.h:
        (WebCore::ChromeClient::userIsInteracting const): Added.
        (WebCore::ChromeClient::setUserIsInteracting): Added.

        * testing/Internals.idl:
        * testing/Internals.h:
        * testing/Internals.cpp:
        (WebCore::Internals::userIsInteracting): Added.

2019-05-15  Zalan Bujtas  <zalan@apple.com>

        Do not create a shape object outside of the layout context
        https://bugs.webkit.org/show_bug.cgi?id=197926
        <rdar://problem/50627858>

        Reviewed by Simon Fraser.

        ShapeOutside objects are used to compute line constrains during layout (in a strict sense, they are part of the layout context and should only be mutated during layout).
        If we don't create one during layout, we probably don't need to know its geometry during paint (or any other non-layout activity) either.

        Test: fast/block/float/float-with-shape-outside-crash.html

        * rendering/FloatingObjects.cpp:
        (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
        (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
        * rendering/shapes/ShapeOutsideInfo.cpp:
        (WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine):

2019-05-15  Youenn Fablet  <youenn@apple.com>

        Mark beacon and ping loads as low priority
        https://bugs.webkit.org/show_bug.cgi?id=197919
        <rdar://problem/50818286>

        Reviewed by Alex Christensen.

        No JS observable change of behavior.

        * Modules/beacon/NavigatorBeacon.cpp:
        (WebCore::NavigatorBeacon::sendBeacon):
        * loader/PingLoader.cpp:
        (WebCore::PingLoader::sendPing):

2019-05-15  Simon Fraser  <simon.fraser@apple.com>

        Clean up RenderLayerCompositor::computeCompositingRequirements() and traverseUnchangedSubtree()
        https://bugs.webkit.org/show_bug.cgi?id=197931

        Reviewed by Zalan Bujtas.

        These functions have grown and become hard to maintain, so try to undo some technical debt.

        Rename "childState" to "currentState" since it's the state we pass to children, but also
        is state we change when the current layer becomes composited.

        Separate the layerWillComposite() lambda from layerWillCompositePostDescendants().

        Group the chunks of code at end of the functions into:
            - updating bits on RenderLayer
            - updating compositingState with changes from children and our state
            - doing post-traversal work on overlapMap and backingSharingState

        Code shared between the two functions is pushed into CompositingState::updateWithDescendantStateAndLayer().

        This moves code around but should not cause any behavior change.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateConfiguration):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::OverlapExtent::knownToBeHaveExtentUncertainty const):
        (WebCore::RenderLayerCompositor::CompositingState::updateWithDescendantStateAndLayer):
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
        (WebCore::RenderLayerCompositor::clipsCompositingDescendants):
        (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildren): Deleted.
        (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildrenForUnchangedSubtree): Deleted.
        (WebCore::RenderLayerCompositor::clipsCompositingDescendants const): Deleted.
        * rendering/RenderLayerCompositor.h:

2019-05-15  Simon Fraser  <simon.fraser@apple.com>

        Make LayerOverlapMap able to output to a TextStream
        https://bugs.webkit.org/show_bug.cgi?id=197923

        Reviewed by Zalan Bujtas.

        Make it possible output LayerOverlapMap to a TextStream for logging.

        * rendering/LayerOverlapMap.cpp:
        (WebCore::OverlapMapContainer::rectList const):
        (WebCore::operator<<):
        * rendering/LayerOverlapMap.h:
        (WebCore::LayerOverlapMap::overlapStack const):

2019-05-15  Youenn Fablet  <youenn@apple.com>

        getUserMedia sandbox extensions should not be revoked when a getUserMedia allowed request is being processed
        https://bugs.webkit.org/show_bug.cgi?id=197851

        Reviewed by Alex Christensen.

        Add a completion handler to create a new capture stream.
        This is used by WK2 layer to acknowledge the pending capture request is completed.
        Just after the completion handler, make sure to update the document media state.
        This is done to ensure that, should capture failing, the UIProcess
        knows about it and can manage proper sandbox extension revocation.

        Test: fast/mediastream/gum-stop-track.html

        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::allow):
        (WebCore::UserMediaRequest::PendingActivationMediaStream::PendingActivationMediaStream):
        (WebCore::UserMediaRequest::PendingActivationMediaStream::~PendingActivationMediaStream):
        * Modules/mediastream/UserMediaRequest.h:
        (WebCore::UserMediaRequest::PendingActivationMediaStream::create):
        * platform/mock/MockRealtimeMediaSourceCenter.cpp:
        (WebCore::MockRealtimeMediaSourceCenter::mockRealtimeMediaSourceCenterEnabled):
        * platform/mock/MockRealtimeMediaSourceCenter.h:

2019-05-15  Simon Fraser  <simon.fraser@apple.com>

        Make LOG_WITH_STREAM more efficient
        https://bugs.webkit.org/show_bug.cgi?id=197905

        Reviewed by Alex Christensen.

        No longer need to conditionalize ClipRects logging on the channel being enabled
        since LOG_WITH_STREAM fix the performance problem.

        Convert some RenderLayerCompositor logging to use LOG_WITH_STREAM.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):
        (WebCore::clipRectsLogEnabled): Deleted.
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):

2019-05-15  Simon Fraser  <simon.fraser@apple.com>

        Move RenderLayerCompositor's OverlapMap to its own file
        https://bugs.webkit.org/show_bug.cgi?id=197915

        Reviewed by Alex Christensen.

        Move OverlapMap to its own file.
        Make use of RectList, which was in the file but unused!
        Allocate OverlapMapContainer on the heap both to avoid header pollution of internals,
        and because they will get bigger in future.

        No behavior change.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * rendering/LayerOverlapMap.cpp: Added.
        (WebCore::RectList::append):
        (WebCore::RectList::intersects const):
        (WebCore::OverlapMapContainer::add):
        (WebCore::OverlapMapContainer::overlapsLayers const):
        (WebCore::OverlapMapContainer::unite):
        (WebCore::LayerOverlapMap::LayerOverlapMap):
        (WebCore::LayerOverlapMap::add):
        (WebCore::LayerOverlapMap::overlapsLayers const):
        (WebCore::LayerOverlapMap::pushCompositingContainer):
        (WebCore::LayerOverlapMap::popCompositingContainer):
        * rendering/LayerOverlapMap.h: Added.
        (WebCore::LayerOverlapMap::isEmpty const):
        (WebCore::LayerOverlapMap::geometryMap const):
        (WebCore::LayerOverlapMap::geometryMap):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateCompositingLayers):
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
        (WebCore::RenderLayerCompositor::computeExtent const):
        (WebCore::RenderLayerCompositor::addToOverlapMap):
        (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
        (WebCore::OverlapMapContainer::add): Deleted.
        (WebCore::OverlapMapContainer::overlapsLayers const): Deleted.
        (WebCore::OverlapMapContainer::unite): Deleted.
        (WebCore::RenderLayerCompositor::OverlapMap::OverlapMap): Deleted.
        (WebCore::RenderLayerCompositor::OverlapMap::add): Deleted.
        (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers const): Deleted.
        (WebCore::RenderLayerCompositor::OverlapMap::isEmpty const): Deleted.
        (WebCore::RenderLayerCompositor::OverlapMap::pushCompositingContainer): Deleted.
        (WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer): Deleted.
        (WebCore::RenderLayerCompositor::OverlapMap::geometryMap const): Deleted.
        (WebCore::RenderLayerCompositor::OverlapMap::geometryMap): Deleted.
        (WebCore::RenderLayerCompositor::OverlapMap::RectList::append): Deleted.
        (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects const): Deleted.
        * rendering/RenderLayerCompositor.h:

2019-05-15  Devin Rousso  <drousso@apple.com>

        Web Automation: elements larger than the viewport have incorrect in-view center point
        https://bugs.webkit.org/show_bug.cgi?id=195696
        <rdar://problem/48737122>

        Reviewed by Simon Fraser.

        Original patch by Brian Burg <bburg@apple.com>.

        Some conversion methods do not exist for `FloatRect`/`FloatPoint`. Fill them in as needed,
        and export some symbols used by WebDriver code to compute an element's in-view center point
        in various coordinate systems.

        * dom/TreeScope.h:
        * dom/TreeScope.cpp:
        (WebCore::TreeScope::elementsFromPoint): Added.
        * page/FrameView.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::absoluteToLayoutViewportPoint const): Added.
        (WebCore::FrameView::layoutViewportToAbsoluteRect const): Added.
        (WebCore::FrameView::absoluteToLayoutViewportRect const): Added.
        * platform/ScrollView.h:
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::viewToContents const): Added.
        (WebCore::ScrollView::contentsToView const): Added.
        (WebCore::ScrollView::contentsToRootView const): Added.
        * platform/Widget.h:
        * platform/Widget.cpp:
        (WebCore::Widget::convertToRootView const): Added.
        (WebCore::Widget::convertFromRootView const): Added.
        (WebCore::Widget::convertToContainingView const): Added.
        (WebCore::Widget::convertFromContainingView const): Added.

2019-05-14  Wenson Hsieh  <wenson_hsieh@apple.com>

        Missing cursor/caret showing in search field on google.com
        https://bugs.webkit.org/show_bug.cgi?id=197862
        <rdar://problem/50291989>

        Reviewed by Simon Fraser.

        In this bug, the search field is inside of a fixed position container, which is inside of an empty "overflow:
        hidden" form element (the new layout test demonstrates a simple version of this). The layer of the fixed
        position container's renderer has an overflow clipping layer of itself, and its clipping rect is non-empty, so
        the heuristic initially identifies the layer as not fully clipped. However, as the heuristic ascends the
        RenderLayer tree, it then finds the layer for the "overflow: hidden" form element's renderer; this layer is
        completely clipped, which causes the heuristic to incorrectly believe that the editable element is completely
        clipped.

        To fix the bug, this patch reworks the clipping portion of the heuristic, such that we no longer need to ascend
        the layer tree. Instead of computing the clip rect relative to the nearest ancestor that has an overflow clip
        and then walking up the layer tree repeating this process, simply compute the clip rect relative to RenderView's
        layer, and then walk up to the parent frame and repeat if necessary.

        Test: editing/selection/ios/do-not-hide-selection-in-visible-field.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::isTransparentOrFullyClippedRespectingParentFrames const):

2019-05-14  Andy Estes  <aestes@apple.com>

        [Apple Pay] Payment APIs should be completely disabled in web views into which clients have injected user scripts
        https://bugs.webkit.org/show_bug.cgi?id=197751
        <rdar://problem/50631563>

        Reviewed by Alex Christensen.

        In r243324, when a document has had user agent scripts injected into it, payment APIs were
        disabled at runtime by having all entry points return falsy values or throw exceptions
        (e.g., ApplePaySession.canMakePayments() returns false).

        In the case of user scripts in particular (e.g., WKUserScript), since we know whether these
        exist at the time we create a document's DOMWindow, we can do better than r243324 by
        completely disabling the payment APIs in the presence of user scripts.

        To achieve this, this change introduces the 'EnabledByContext' extended attribute for
        interfaces, which instructs the bindings generator to add a conjunct to the payment API
        constructors that asks the interface's implementation class whether it should be enabled for
        a given ScriptExecutionContext. The PaymentRequest and ApplePaySession interfaces adopt this
        new extended attribute to implement the new user script check.

        Added new API tests.

        * Modules/applepay/ApplePaySession.idl:
        * Modules/applepay/PaymentCoordinator.cpp:
        (WebCore::PaymentCoordinator::shouldEnableApplePayAPIs const):
        * Modules/applepay/PaymentCoordinator.h:
        * Modules/applepay/PaymentSession.cpp:
        (WebCore::PaymentSession::enabledForContext):
        * Modules/applepay/PaymentSession.h:
        * Modules/paymentrequest/PaymentHandler.cpp:
        (WebCore::PaymentHandler::enabledForContext):
        * Modules/paymentrequest/PaymentHandler.h:
        * Modules/paymentrequest/PaymentRequest.cpp:
        (WebCore::PaymentRequest::enabledForContext):
        * Modules/paymentrequest/PaymentRequest.h:
        * Modules/paymentrequest/PaymentRequest.idl:
        * bindings/scripts/CodeGeneratorJS.pm:
        (NeedsRuntimeCheck):
        (GenerateRuntimeEnableConditionalString):
        * bindings/scripts/IDLAttributes.json:
        * bindings/scripts/preprocess-idls.pl:
        (GenerateConstructorAttributes):
        * bindings/scripts/test/JS/JSTestEnabledForContext.cpp: Added.
        * bindings/scripts/test/JS/JSTestEnabledForContext.h: Added.
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::JSTestGlobalObject::finishCreation):
        (WebCore::jsTestGlobalObjectTestEnabledForContextConstructorGetter):
        (WebCore::jsTestGlobalObjectTestEnabledForContextConstructor):
        (WebCore::setJSTestGlobalObjectTestEnabledForContextConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestEnabledForContextConstructor):
        * bindings/scripts/test/TestEnabledForContext.idl: Added.

2019-05-14  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] parseEffectfulSuffix() is never called
        https://bugs.webkit.org/show_bug.cgi?id=195864
        <rdar://problem/50746278>

        Reviewed by Myles C. Maxfield.

        The fix is trivial: when parseEffectfulPrefix does not see a ++ or --, it must call parseEffectfulSuffix.

        No test yet, as it is not testable until the property resolver is finished.
        It will be tested with the rest of the compiler, when we port the testsuite from the js implementation (it already covers this case).

        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseEffectfulPrefix):

2019-05-14  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] parseEffectfulAssignment should not call parseCallExpression directly
        https://bugs.webkit.org/show_bug.cgi?id=197890

        Reviewed by Myles Maxfield.

        callExpression already appears in effSuffix which is in effPrefix which is in effAssignment, so having it directly in effAssignment as well is useless (and ambiguous).
        I've already fixed the grammar (https://github.com/gpuweb/WHLSL/commit/a07005f4d692fe3370618dca5db218992b362049), the grammar was always good, this patch is fixing the parser.

        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseEffectfulAssignment):

2019-05-14  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed restoration of non-unified build.

        * Modules/cache/DOMCache.cpp:
        * bindings/js/JSLazyEventListener.h:
        * loader/NavigationScheduler.h:
        * page/Quirks.cpp:
        * page/Quirks.h:
        * rendering/ClipRect.cpp:

2019-05-14  Zalan Bujtas  <zalan@apple.com>

        Do not try to issue repaint while the render tree is being destroyed.
        https://bugs.webkit.org/show_bug.cgi?id=197461
        <rdar://problem/50368992>

        Reviewed by Simon Fraser.

        Test: http/tests/svg/crash-on-reload-with-filter.html

        We don't need to compute repaint rects when the render tree is getting torn down. We'll issue a full repaint at some point.
        Also during full render tree destruction the inline tree state is undefined. We should avoid accessing it.

        * rendering/svg/RenderSVGResourceContainer.cpp:
        (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):

2019-05-14  Youenn Fablet  <youenn@apple.com>

        A service worker process should app nap when all its clients app nap
        https://bugs.webkit.org/show_bug.cgi?id=185626
        <rdar://problem/46785908>

        Reviewed by Alex Christensen.

        Update RegistrableDomain to work with SecurityOriginData.
        Add internal API to enable accessing to service worker process throttle state.

        Test: http/wpt/service-workers/mac/processSuppression.https.html

        * platform/RegistrableDomain.h:
        (WebCore::RegistrableDomain::RegistrableDomain):
        (WebCore::RegistrableDomain::matches const):
        (WebCore::RegistrableDomain::registrableDomainFromHost):
        * testing/ServiceWorkerInternals.cpp:
        (WebCore::ServiceWorkerInternals::isThrottleable const):
        * testing/ServiceWorkerInternals.h:
        * testing/ServiceWorkerInternals.idl:
        * workers/service/SWClientConnection.h:
        * workers/service/context/SWContextManager.cpp:
        * workers/service/context/SWContextManager.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::serverToContextConnectionCreated):
        * workers/service/server/SWServer.h:
        (WebCore::SWServer::Connection::server const):
        (WebCore::SWServer::connections const):
        * workers/service/server/SWServerToContextConnection.h:

2019-05-14  Youenn Fablet  <youenn@apple.com>

        getUserMedia capture changes on iOS after homing out
        https://bugs.webkit.org/show_bug.cgi?id=197707

        Reviewed by Eric Carlson.

        In case of muting an AVVideoCaptureSource on iOS, the session is cleared.
        We need to store the preset information, to setup the new session on unnmuting correctly.
        Manually tested.

        * platform/mediastream/mac/AVVideoCaptureSource.h:
        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):
        (WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate):
        (WebCore::AVVideoCaptureSource::setupCaptureSession):

2019-05-14  Oriol Brufau  <obrufau@igalia.com>

        [css-grid] Update grid when changing auto repeat type
        https://bugs.webkit.org/show_bug.cgi?id=197849

        Reviewed by Javier Fernandez.

        Test: imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-change-auto-repeat-tracks.html

        This patch makes two 'repeat()' values for 'grid-template' be considered
        to be different if one uses 'auto-fill' and the other 'auto-fit'.

        Previously, they were considered to be equal if the repeated values
        were the same, without comparing the repeat type. Therefore, the grid
        was not updated when setting both values one after the other.

        * css/CSSGridAutoRepeatValue.cpp:
        (WebCore::CSSGridAutoRepeatValue::equals const):
        * css/CSSGridAutoRepeatValue.h:

2019-05-14  Antti Koivisto  <antti@apple.com>

        Event region computation should respect transforms
        https://bugs.webkit.org/show_bug.cgi?id=197836
        <rdar://problem/50762971>

        Reviewed by Darin Adler.

        * platform/graphics/transforms/AffineTransform.cpp:
        (WebCore::AffineTransform::mapRegion const):

        Add support for transforming regions. Non-rectlinear results use enclosing rects.

        * platform/graphics/transforms/AffineTransform.h:
        * rendering/EventRegion.cpp:
        (WebCore::EventRegionContext::EventRegionContext):
        (WebCore::EventRegionContext::pushTransform):
        (WebCore::EventRegionContext::popTransform):
        (WebCore::EventRegionContext::unite):
        (WebCore::EventRegionContext::contains const):

        Add a context object that holds the current transform.

        * rendering/EventRegion.h:
        (WebCore::EventRegion::makeContext):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paint):
        * rendering/PaintInfo.h:

        Replace the region object with the context.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayerByApplyingTransform):

        Apply transforms to regions if needed.

        (WebCore::RenderLayer::collectEventRegionForFragments):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateEventRegion):
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::paintFlow):

2019-05-14  Youenn Fablet  <youenn@apple.com>

        Video frame resizing should be using Trim
        https://bugs.webkit.org/show_bug.cgi?id=197722
        <rdar://problem/50602188>

        Reviewed by Eric Carlson.

        Move from letter box to trim mode for resizing.
        This ensures no black stripes are present when rendering the stream.

        Test: fast/mediastream/resize-trim.html

        * platform/cocoa/VideoToolboxSoftLink.cpp:
        * platform/cocoa/VideoToolboxSoftLink.h:
        * platform/graphics/cv/ImageTransferSessionVT.mm:
        (WebCore::ImageTransferSessionVT::ImageTransferSessionVT):

2019-05-14  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Shrink sizeof(UnlinkedFunctionExecutable) more
        https://bugs.webkit.org/show_bug.cgi?id=197833

        Reviewed by Darin Adler.

        * testing/Internals.cpp:
        (WebCore::Internals::parserMetaData):

2019-05-14  Antoine Quint  <graouts@apple.com>

        [Pointer Events] The pointerenter and pointerleave events target the wrong element on iOS
        https://bugs.webkit.org/show_bug.cgi?id=197881
        <rdar://problem/50187657>

        Reviewed by Dean Jackson.

        Test: pointerevents/ios/enter-leave-target.html

        The "pointerenter" and "pointerleave" should target the element on which the event listener was added and not
        the element that would otherwise hit test. This matches the behavior of "mouseenter" and "mouseleave" on macOS.

        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):

2019-05-14  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [CG] Adding support for HEIF-sequence ('public.heics') images
        https://bugs.webkit.org/show_bug.cgi?id=197384

        Reviewed by Simon Fraser.

        -- Get the image repetitionCount and the frame duration.
        -- Add a new function setAdditionalSupportedImageTypesForTesting() which
           takes a delimited String.
        -- Add internal APIs to retrive the image frame count and the frame
           duration.

        Tests: fast/images/animated-heics-draw.html
               fast/images/animated-heics-verify.html

        * platform/graphics/ImageSource.h:
        * platform/graphics/cg/ImageDecoderCG.cpp:
        (WebCore::animationPropertiesFromProperties):
        (WebCore::animationHEICSPropertiesFromProperties):
        (WebCore::ImageDecoderCG::repetitionCount const):
        (WebCore::ImageDecoderCG::frameDurationAtIndex const):
        * platform/graphics/cg/UTIRegistry.cpp:
        (WebCore::setAdditionalSupportedImageTypesForTesting):
        * platform/graphics/cg/UTIRegistry.h:
        * testing/Internals.cpp:
        (WebCore::Internals::imageFrameCount):
        (WebCore::Internals::imageFrameDurationAtIndex):
        * testing/Internals.h:
        * testing/Internals.idl:
        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::setAdditionalSupportedImageTypesForTesting):
        * testing/js/WebCoreTestSupport.h:

2019-05-14  Manuel Rego Casasnovas  <rego@igalia.com>

        [css-grid] Use max size to compute auto repeat tracks
        https://bugs.webkit.org/show_bug.cgi?id=197854

        Reviewed by Javier Fernandez.

        When available size is indefinite we should use max size to compute the number of auto repeat tracks.

        The spec text is very clear (https://drafts.csswg.org/css-grid/#auto-repeat):
        > When auto-fill is given as the repetition number, if the grid container
        > has a definite size or **max size** in the relevant axis...

        So far we were not doing that for widths, in this patch we modify RenderGrid::computeAutoRepeatTracksCount()
        to do the same than for heights.

        We also take advantage to fix problems related to min|max sizes and box-sizing property,
        that were inconsistent for columns and rows.

        Tests: imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-002.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-min-max-size-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-min-size-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-min-size-002.html

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::computeAutoRepeatTracksCount const):

2019-05-14  Joonghun Park  <pjh0718@gmail.com>

        Implement page-break-* and -webkit-column-break-* as legacy-shorthands.
        https://bugs.webkit.org/show_bug.cgi?id=197656

        Reviewed by Darin Adler.

        According to https://drafts.csswg.org/css-cascade-4/#legacy-shorthand,
        implement page-break-* and -webkit-column-break-* as legacy-shorthands for break-*.

        This change also serialize page-break-* properties
        to CSSStyleDeclaration,
        per https://drafts.csswg.org/css-break/#page-break-properties.

        * css/CSSProperties.json:
        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::convertFontSynthesis):
        (WebCore::StyleBuilderConverter::convertPageBreakBetween): Deleted.
        (WebCore::StyleBuilderConverter::convertPageBreakInside): Deleted.
        (WebCore::StyleBuilderConverter::convertColumnBreakBetween): Deleted.
        (WebCore::StyleBuilderConverter::convertColumnBreakInside): Deleted.
        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::getPropertyValue const):
        (WebCore::StyleProperties::pageBreakPropertyValue const):
        * css/StyleProperties.h:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseValueStart):
        (WebCore::mapFromPageBreakBetween):
        (WebCore::CSSPropertyParser::parseShorthand):
        (WebCore::isLegacyBreakProperty): Deleted.

2019-05-14  Javier Fernandez  <jfernandez@igalia.com>

        Implement "line-break: anywhere"
        https://bugs.webkit.org/show_bug.cgi?id=181169
        <rdar://problem/48507088>

        Reviewed by Myles C. Maxfield.

        The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break'
        CSS property in order to allow additional breaking opportunities not
        considered in the definition of the 'word-break: break-all'.

        [1] https://github.com/w3c/csswg-drafts/issues/1171

        Tests: imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-003.html
               imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-004.html
               imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-005.html
               imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-006.html
               imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-007.html
               imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-008.html
               imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-009.html
               imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-010.html
               imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-011.html
               imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-012.html
               imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-016.html
               imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-017.html
               imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-018.html
               imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-019.html
               imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-021.html
               imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-022.html
               imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-023.html
               imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html

        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator LineBreak const):
        * css/CSSProperties.json:
        * css/CSSValueKeywords.in:
        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
        * rendering/BreakLines.h:
        (WebCore::nextBreakablePositionBreakCharacter):
        (WebCore::isBreakable):
        * rendering/RenderText.cpp:
        (WebCore::mapLineBreakToIteratorMode):
        (WebCore::RenderText::computePreferredLogicalWidths):
        * rendering/line/BreakingContext.h:
        (WebCore::BreakingContext::handleText):
        * rendering/style/RenderStyleConstants.h:

2019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>

        Unreviewed, build fix after 245258, missing ThreadSpecific.h include
        https://bugs.webkit.org/show_bug.cgi?id=197146

        * platform/ios/wak/WebCoreThread.mm:

2019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>

        [WTF] Simplify GCThread and CompilationThread flags by adding them to WTF::Thread
        https://bugs.webkit.org/show_bug.cgi?id=197146

        Reviewed by Saam Barati.

        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::hasPendingActivity const):
        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::hasPendingActivity const):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::hasPendingActivity const):

2019-05-13  Geoffrey Garen  <ggaren@apple.com>

        Downgrade RELEASE_ASSERT TO RELEASE_LOG_FAULT for SQLite Class A files
        https://bugs.webkit.org/show_bug.cgi?id=197760

        Reviewed by Jer Noble.

        Only makeSafeToUseMemoryMapForPath() if needed. (Fixed missing brace.)

        * platform/sql/SQLiteDatabase.cpp:
        (WebCore::SQLiteDatabase::open):

2019-05-13  Tadeu Zagallo  <tzagallo@apple.com>

        JSObject::getOwnPropertyDescriptor is missing an exception check
        https://bugs.webkit.org/show_bug.cgi?id=197693

        Reviewed by Saam Barati.

        JSObject::getOwnPropertyDescriptor assumes that getOwnPropertySlot returns false
        if an exception is thrown, but that was not true for JSLocation::getOwnPropertySlotCommon.

        This is already covered by http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html

        * bindings/js/JSLocationCustom.cpp:
        (WebCore::getOwnPropertySlotCommon):
        (WebCore::JSLocation::getOwnPropertySlot):
        (WebCore::JSLocation::getOwnPropertySlotByIndex):

2019-05-13  Antti Koivisto  <antti@apple.com>

        REGRESSION (r245208): compositing/shared-backing/sharing-bounds-non-clipping-shared-layer.html asserts
        https://bugs.webkit.org/show_bug.cgi?id=197818
        <rdar://problem/50705762>

        Reviewed by Simon Fraser.

        Tests: fast/scrolling/ios/event-region-scale-transform-shared.html
               fast/scrolling/ios/event-region-translate-transform-shared.html

        This fixes the assert. However the added tests demonstrate that transform is not taken into account
        when computing the event region, https://bugs.webkit.org/show_bug.cgi?id=197836.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateEventRegion):

2019-05-13  Wenson Hsieh  <wenson_hsieh@apple.com>

        [macOS] Font formatting options don't work when composing a message in Yahoo mail
        https://bugs.webkit.org/show_bug.cgi?id=197813
        <rdar://problem/49382250>

        Reviewed by Darin Adler.

        The bug happens because on mousedown, the "Aa Font" menu item's event handler hides itself before changing the
        font at the text selection. This causes us to clear the selection in FocusController::setFocusedElement.

        There is existing logic in clearSelectionIfNeeded that would normally prevent us from clearing the selection due
        to the mousePressNode not being able to start a selection. However, since the clickable element in this case is
        hidden during mousedown, it is missing a renderer, and we bail from the `mousePressNode->renderer() &&
        !mousePressNode->canStartSelection()` check as a result.

        This check was orginally added in https://trac.webkit.org/r24334 to avoid clearing the selection when clicking
        a button; the intention appears to have been making it so that clicking on something that could not start a
        selection (back then, synonymous with -webkit-user-select: ignore;) would not clear the current selection; to
        this end, it seems odd to additionally require that the thing being clicked should still have a renderer, so
        it seems safe to remove this requirement.

        Test: editing/selection/preserve-selection-when-clicking-button.html

        * page/FocusController.cpp:
        (WebCore::clearSelectionIfNeeded):

2019-05-13  Eric Carlson  <eric.carlson@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=197793
        <rdar://problem/46429187>

        Unreviewed, build fix after r245199.

        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):

2019-05-13  Darin Adler  <darin@apple.com>

        WHLSLPrepare.cpp always recompiles, even if nothing was changed
        https://bugs.webkit.org/show_bug.cgi?id=197151

        Reviewed by Dan Bernstein and Keith Rollin.

        * DerivedSources-input.xcfilelist: Script updated this automatically after
        DerivedSources.make was corrected.
        * DerivedSources-output.xcfilelist: Ditto, although I had to manually remove
        one bogus leftover reference to WHLSLStandardLibrary.cpp.

        * DerivedSources.make: Updated the rule that builds WHSLStandardLibrary.h to
        no longer refer to nonexistent WHLSLStandardLibrary.cpp. Because the dependency
        was on a file that was never created, the rule to regenerate WHSLStandardLibrary.h
        was running on every build, instead of only when one of the dependencies changed.

2019-05-12  Simon Fraser  <simon.fraser@apple.com>

        When the set of backing-sharing layers changes, we need to issue a repaint
        https://bugs.webkit.org/show_bug.cgi?id=197825

        Reviewed by Zalan Bujtas.

        If the set of layers painting into a shared backing store changes, we need
        to repaint that backing store. This happens when scrolling as shared layers
        enter the visible area.

        Test: compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::setBackingSharingLayers):

2019-05-02  Simon Fraser  <simon.fraser@apple.com>

        Add logging for RenderLayer clip rects
        https://bugs.webkit.org/show_bug.cgi?id=197547

        Reviewed by Zalan Bujtas.

        Add a ClipRects log channel, and stream output for ClipRect and ClipRects.

        The ClipRect code is performance sensitive, even in debug, so guard the log sites
        with clipRectsLogEnabled() because the macro still evaluates its arguments even if
        the channel is disabled (we need some better way to log that doesn't do this).

        * platform/Logging.h:
        * rendering/ClipRect.cpp:
        (WebCore::operator<<):
        * rendering/ClipRect.h:
        * rendering/RenderLayer.cpp:
        (WebCore::operator<<):
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayer.h:

2019-05-12  Simon Fraser  <simon.fraser@apple.com>

        Refactor composited backing-sharing code
        https://bugs.webkit.org/show_bug.cgi?id=197824

        Reviewed by Zalan Bujtas.

        Clean up the backing-sharing code to share more code, and make it easier to understand.
        
        Moves more logic into member functions on BackingSharingState, which are named to make
        their functions clearer: startBackingSharingSequence/endBackingSharingSequence.
        
        computeCompositingRequirements() and traverseUnchangedSubtree() now just call
        updateBeforeDescendantTraversal/updateAfterDescendantTraversal.

        No behavior change.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::willBeDestroyed):
        (WebCore::RenderLayerBacking::setBackingSharingLayers): Remove the early return, since
        we need to call setBackingProviderLayer() on the sharing layers in both code paths.
        (WebCore::RenderLayerBacking::removeBackingSharingLayer):
        (WebCore::RenderLayerBacking::clearBackingSharingLayers):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::BackingSharingState::backingProviderCandidate const):
        (WebCore::RenderLayerCompositor::BackingSharingState::appendSharingLayer):
        (WebCore::RenderLayerCompositor::BackingSharingState::startBackingSharingSequence):
        (WebCore::RenderLayerCompositor::BackingSharingState::endBackingSharingSequence):
        (WebCore::RenderLayerCompositor::BackingSharingState::updateBeforeDescendantTraversal):
        (WebCore::RenderLayerCompositor::BackingSharingState::updateAfterDescendantTraversal):
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
        (WebCore::RenderLayerCompositor::BackingSharingState::resetBackingProviderCandidate): Deleted.
        * rendering/RenderLayerCompositor.h:

2019-05-12  Youenn Fablet  <youenn@apple.com>

        Use clampTo in AVVideoCaptureSource::setSizeAndFrameRateWithPreset
        https://bugs.webkit.org/show_bug.cgi?id=197704

        Reviewed by Alex Christensen.

        Use clampTo as suggested in bug 196214 review.
        No change of behavior.

        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):

2019-05-12  Youenn Fablet  <youenn@apple.com>

        Use the main screen for screen capture
        https://bugs.webkit.org/show_bug.cgi?id=197804
        <rdar://problem/47671383>

        Reviewed by Eric Carlson.

        If the main screen, i.e. the screen that has focus at the time of
        selection of the screen to capture, is capturable, add it to the list
        of screen devices, but do not add any other screen.
        This will make sure the main screen is selected.
        Manually tested.

        * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
        (WebCore::ScreenDisplayCaptureSourceMac::screenCaptureDevices):

2019-05-12  Takashi Komori  <Takashi.Komori@sony.com>

        [Curl] Suppress extra didReceiveAuthenticationChallenge call when accessing a server which checks basic auth.
        https://bugs.webkit.org/show_bug.cgi?id=197650

        Reviewed by Fujii Hironori.

        When Curl port accesses a page which checks Basic Authentication credential and server trust challenge occurs,
        Curl port calls extra didReceiveAuthenticationChallenge unnecessarily.
        This is because Curl port discards information about allowed server trust challenge before in NetworkDataTaskCurl::restartWithCredential.

        Test: http/tests/ssl/curl/certificate-and-authentication.html

        * platform/network/curl/CurlRequest.h:
        (WebCore::CurlRequest::isServerTrustEvaluationDisabled):

2019-05-11  Simon Fraser  <simon.fraser@apple.com>

        Overflow scroll that becomes non-scrollable should stop being composited
        https://bugs.webkit.org/show_bug.cgi?id=197817
        <rdar://problem/50697290>

        Reviewed by Antti Koivisto.

        Remove the iOS-specific #ifdef around code that triggers a compositing re-evaluation
        when scrolling state changes.

        Test: compositing/scrolling/async-overflow-scrolling/become-non-scrollable.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateScrollInfoAfterLayout):

2019-05-11  Simon Fraser  <simon.fraser@apple.com>

        Layer bounds are incorrect for sharing layers that paint with transforms
        https://bugs.webkit.org/show_bug.cgi?id=197768
        <rdar://problem/50695493>

        Reviewed by Zalan Bujtas.

        We don't need to traverse shared layers if the backing-provider has overflow clip,
        because we know they are containing-block descendants and therefore clipped.

        Note tha the CSS "clip" property doesn't guarantee this, because the clip rect
        can be larger than the element, so in that case we just traverse shared layers.

        Tests: compositing/shared-backing/sharing-bounds-clip.html
               compositing/shared-backing/sharing-bounds-non-clipping-shared-layer.html
               compositing/shared-backing/sharing-bounds-transformed-sharing-layer.html
               compositing/shared-backing/sharing-bounds.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateCompositedBounds):

2019-05-11  Simon Fraser  <simon.fraser@apple.com>

        Translucent gradient rendering bug due to will-change transform
        https://bugs.webkit.org/show_bug.cgi?id=197654
        <rdar://problem/50547664>

        Reviewed by Dean Jackson.
        
        We failed to re-evaluate 'contentsOpaque' when a background changed, because this
        happened in updateGeometry() and that doesn't run for background changes.
        
        However, 'contentsOpaque' also requires knowing about geometry because we have to
        turn it off when there's subpixel positioning, and updateConfiguration()
        runs before updateGeometry().
        
        So compute m_hasSubpixelRounding in updateGeometry() and set contentsOpaque in
        updateAfterDescendants().

        Test: compositing/contents-opaque/background-change-to-transparent.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateConfiguration):
        (WebCore::RenderLayerBacking::updateGeometry):
        (WebCore::RenderLayerBacking::updateAfterDescendants):
        * rendering/RenderLayerBacking.h:

2019-05-11  Simon Fraser  <simon.fraser@apple.com>

        When the scroller hosting a shared layer becomes non-scrollable, content disappears
        https://bugs.webkit.org/show_bug.cgi?id=197766
        <rdar://problem/50695808>

        Reviewed by Zalan Bujtas.

        RenderLayerCompositor::requiresOwnBackingStore() should return true for a layer that shares
        its backing store. We always made backing for overlap layers, so even  if the sharing layers
        have no painted content, this should rarely be a backing store memory regression.

        Test: compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):

2019-05-11  Simon Fraser  <simon.fraser@apple.com>

        Backing-sharing layers with transforms render incorrectly
        https://bugs.webkit.org/show_bug.cgi?id=197692
        <rdar://problem/50652127>

        Reviewed by Antti Koivisto.

        Layers that paint into shared backing need to enter the RenderLayer painting code
        in a way that paints the filters, transforms, opacity and blending.
        
        RenderLayerBacking::paintIntoLayer() normally enters at paintLayerContents(), because
        the effects are rendered via the GraphicsLayer, but shared layers will paint effects.
        Note that if the backing-provider has effects, it will be the stacking context
        for the shared layers, so it's correct that sharing layers are impacted by effects
        on the backing-provider.

        In addition, we have to ensure that we don't over-eagerly make layers shared.
        Consider:
        
        <div class="clipping">
            <div class="sharing">
                <div class="inner">
                </div>
            </div>
        </div>
        
        Here "clipping" is the provider layer, "sharing" paints into shared backing, but
        we don't want to also mark "inner" as sharing, since "sharing" will just paint it.
        This is akin to avoiding unnecessary compositing of z-order descendants when they can just
        paint.
        
        To do this we need to ensure that sharing layers are treated like compositing layers
        in the overlap map, i.e. when a layer is sharing, we call overlapMap.pushCompositingContainer(),
        and later overlapMap.popCompositingContainer().

        Tests: compositing/shared-backing/nested-shared-layers-with-opacity.html
               compositing/shared-backing/shared-layer-has-blending.html
               compositing/shared-backing/shared-layer-has-filter.html
               compositing/shared-backing/shared-layer-has-opacity.html
               compositing/shared-backing/shared-layer-has-reflection.html
               compositing/shared-backing/shared-layer-has-transform.html
               compositing/shared-backing/shared-layer-isolates-blending.html
               compositing/shared-backing/shared-transformed-layer-bounds.html
               compositing/shared-backing/sharing-layer-becomes-non-scrollable.html
               compositing/shared-backing/sharing-layer-has-effect.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayer):
        (WebCore::RenderLayer::paintLayerWithEffects):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::paintIntoLayer):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::CompositingState::stateForPaintOrderChildren const):
        (WebCore::backingProviderLayerCanIncludeLayer):
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):

2019-05-10  Youenn Fablet  <youenn@apple.com>

        A service worker instance should be terminated when its SWServer is destroyed
        https://bugs.webkit.org/show_bug.cgi?id=197801
        <rdar://problem/50587270>

        Reviewed by Chris Dumez.

        On session destruction, the SWServer is destroyed.
        At that time, it should terminate all its running service workers.
        Covered by updated API test.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::~SWServer):

2019-05-10  Eric Carlson  <eric.carlson@apple.com>

        [iOS] HTMLMediaElement sometimes doesn't send 'webkitplaybacktargetavailabilitychanged' event
        https://bugs.webkit.org/show_bug.cgi?id=197793
        <rdar://problem/46429187>

        Reviewed by Jer Noble.

        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::MediaElementSession): Initialize m_hasPlaybackTargets.

        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange): Log
        target availability.
        (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Call the client 
        externalOutputDeviceAvailableDidChange method after the AVRouteDetector is available.

2019-05-09  Geoffrey Garen  <ggaren@apple.com>

        Downgrade RELEASE_ASSERT TO RELEASE_LOG_FAULT for SQLite Class A files
        https://bugs.webkit.org/show_bug.cgi?id=197760

        Reviewed by Jer Noble.

        We have all the data we need, and this crash is happening more than
        expected.

        * platform/sql/SQLiteDatabase.cpp:
        (WebCore::SQLiteDatabase::open):

2019-05-10  Zalan Bujtas  <zalan@apple.com>

        [iOS] baidu.com: Synthetic bold renders too far apart, appears doubled.
        https://bugs.webkit.org/show_bug.cgi?id=197781
        <rdar://problem/48027412>

        Reviewed by Simon Fraser.

        Synthetic bold is essentially two regular glyphs painted with an offset. While on macOS this offset is always 1px (CSS), on iOS larger font produces higher offset value. At paint time, this offset value (in CSS px unit) get converted
        to a device pixel value taking context scale into account. This conversion ensures that the gap between the 2 regular glyphs won't get wider (in device pixels) as the user pinch zooms in.
        This works as long as the scale on the context is >= 1. This patch ensures that a scaled down context won't blow up this gap.

        Test: fast/text/large-synthetic-bold-with-scale-transform.html

        * platform/graphics/cocoa/FontCascadeCocoa.mm:
        (WebCore::FontCascade::drawGlyphs):

2019-05-10  Brent Fulgham  <bfulgham@apple.com>

        Gracefully handle inaccessible font face data
        https://bugs.webkit.org/show_bug.cgi?id=197762
        <rdar://problem/50433861>

        Reviewed by Per Arne Vollan.

        Make sure CSS Font Face handling gracefully recovers from
        missing font data.

        Test: fast/text/missing-font-crash.html

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::fontLoadEventOccurred):
        (WebCore::CSSFontFace::timeoutFired):
        (WebCore::CSSFontFace::fontLoaded):
        (WebCore::CSSFontFace::font):

2019-05-10  Simon Fraser  <simon.fraser@apple.com>

        ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant()) on nytimes.com after r245170
        https://bugs.webkit.org/show_bug.cgi?id=197776

        Reviewed by Zalan Bujtas.

        Only try to paint into shared backing for layers that are able to be composited. This
        avoids trying to do sharing for non-self-painting layers, which doesn't make sense.

        Test: compositing/shared-backing/overflow-scroll/non-self-painting-layer-should-not-share.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):

2019-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>

        Fix a bunch of compiler warnings
        https://bugs.webkit.org/show_bug.cgi?id=197785

        Reviewed by Don Olmstead.

        * CMakeLists.txt: WebCoreTestSupport should accept extra SYSTEM includes.
        * PlatformGTK.cmake: GTK includes should be added to SYSTEM headers to avoid warnings.
        * inspector/InspectorCanvas.cpp: Add preprocessor guards to fix unused function warning.
        * rendering/RenderLayer.cpp: Fix unused variable warning.
        (WebCore::RenderLayer::updateClipRects):

2019-05-10  Antti Koivisto  <antti@apple.com>

        Event region generation needs to know about backing-sharing
        https://bugs.webkit.org/show_bug.cgi?id=197694
        <rdar://problem/50584991>

        Reviewed by Simon Fraser.

        Test: pointerevents/ios/touch-action-region-backing-sharing.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateEventRegion):

        Gather event region from backing sharing layers too.

2019-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>

        [WPE][GTK] Add WebKitWebPage::did-associate-form-controls-for-frame and deprecate original did-associate-form-controls
        https://bugs.webkit.org/show_bug.cgi?id=197271

        Reviewed by Youenn Fablet.

        * dom/Document.cpp:
        (WebCore::Document::didAssociateFormControlsTimerFired):
        * loader/EmptyClients.h:
        * page/ChromeClient.h:

2019-05-09  Simon Fraser  <simon.fraser@apple.com>

        Implement backing-sharing in compositing layers, allowing overlap layers to paint into the backing store of another layer
        https://bugs.webkit.org/show_bug.cgi?id=197561
        <rdar://problem/50445998>

        Reviewed by Antti Koivisto.

        This change introduces the concept of layers that share backing store for compositing. A layer
        which is sharing its backing store first paints itself, and then some set of layers which come
        later in paint order in the same stacking context. This reduces the composited layer count in
        some overflow scrolling scenarios, thereby also simplifying the scrolling tree.
        
        A backing-shared layer stores a vector of "sharing" RenderLayer* in its RenderLayerBacking. At
        paint time, the owning layer is painted, then the sharing layers, setting the owning layer as the
        painting root so that positioning and clipping just work.
        
        Sharing layer relationships are constructed in RenderLayerCompositor::computeCompositingRequirements().
        We track the last layer which was composited in paint order as a shared candidate. If a later layer
        would composite for overlap (and no other reasons), then we allow it to share with the candidate
        if the candidate is in its ancestor containing block chain. Sharing is currently limited to layers
        in the same stacking context.
        
        isComposited() returns false for sharing layers, but they are like composited layers in that
        they behave as painting boundaries, so RenderLayer::paintLayer() needs to stop at them,
        and repaints in shared layers have to be directed to their shared layer, hence
        changes to RenderLayer::clippingRootForPainting() and RenderLayer::enclosingCompositingLayerForRepaint().
        
        The clipping boundary logic in RenderLayer::backgroundClipRect() needed to be generalized so that
        all calls to RenderLayer::parentClipRects() check for crossing painting boundaries and use
        TemporaryClipRects in that case.

        Tests: compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html
               compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html
               compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html
               compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html
               compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html
               compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html
               compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html
               compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html
               compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html
               compositing/shared-backing/overflow-scroll/shared-layer-clipping.html
               compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html
               compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html
               compositing/shared-backing/overflow-scroll/shared-layer-repaint.html
               compositing/shared-backing/partial-compositing-update.html
               compositing/shared-backing/partial-compositing-update2.html
               compositing/shared-backing/remove-sharing-layer.html
               compositing/shared-backing/sharing-cached-clip-rects.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::~RenderLayer):
        (WebCore::RenderLayer::ancestorLayerIsInContainingBlockChain const):
        (WebCore::RenderLayer::setBackingProviderLayer):
        (WebCore::RenderLayer::disconnectFromBackingProviderLayer):
        (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
        (WebCore::RenderLayer::clippingRootForPainting const):
        (WebCore::RenderLayer::clipToRect):
        (WebCore::RenderLayer::paintLayer):
        (WebCore::RenderLayer::updateClipRects):
        (WebCore::RenderLayer::clipCrossesPaintingBoundary const):
        (WebCore::RenderLayer::calculateClipRects const):
        (WebCore::outputPaintOrderTreeLegend):
        (WebCore::outputPaintOrderTreeRecursive):
        (WebCore::inContainingBlockChain): Deleted.
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::willBeDestroyed):
        (WebCore::clearBackingSharingLayerProviders):
        (WebCore::RenderLayerBacking::setBackingSharingLayers):
        (WebCore::RenderLayerBacking::removeBackingSharingLayer):
        (WebCore::RenderLayerBacking::clearBackingSharingLayers):
        (WebCore::RenderLayerBacking::updateCompositedBounds):
        (WebCore::RenderLayerBacking::updateDrawsContent):
        (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer const):
        (WebCore::RenderLayerBacking::paintIntoLayer):
        (WebCore::RenderLayerBacking::paintContents):
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::CompositingState::stateForPaintOrderChildren const):
        (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildren):
        (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildrenForUnchangedSubtree):
        (WebCore::RenderLayerCompositor::BackingSharingState::resetBackingProviderCandidate):
        (WebCore::RenderLayerCompositor::updateCompositingLayers):
        (WebCore::backingProviderLayerCanIncludeLayer):
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
        (WebCore::RenderLayerCompositor::updateBacking):
        (WebCore::RenderLayerCompositor::layerWillBeRemoved):
        (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
        * rendering/RenderLayerCompositor.h:
        * rendering/RenderTreeAsText.cpp:

2019-05-09  Daniel Bates  <dabates@apple.com>

        [iOS] Right command key has wrong value for property code
        https://bugs.webkit.org/show_bug.cgi?id=193876
        <rdar://problem/47577308>

        Reviewed by Brent Fulgham.

        We're looking for the wrong Windows virtual key code for the right command key.
        Substitute VK_APPS for VK_RWIN so we can identify the right command key and return
        the correct value for the code property of the DOM key event.

        * platform/ios/PlatformEventFactoryIOS.mm:
        (WebCore::codeForKeyEvent):

2019-05-09  Daniel Bates  <dabates@apple.com>

        [iOS] Numpad comma key has incorrect keyIdentifier property
        https://bugs.webkit.org/show_bug.cgi?id=197753
        <rdar://problem/50636274>

        Reviewed by Brent Fulgham.

        Map the Numpad Comma HID usage code to its Window virtual key code, VK_SEPARATOR,
        so that can compute the keyIdentifier property for the Numpad Comma key. Also
        consider this key as a keypad key just like we do on Mac. There is no discernable
        difference for doing so on iOS because the non-keypad code path computes the same result
        due to GraphicsServices having fixed up the input string for the Numpad Comma to be
        ",", which is want.

        * platform/ios/KeyEventIOS.mm:
        (WebCore::windowsKeyCodeForKeyCode): Map kHIDUsage_KeypadComma to VK_SEPARATOR.
        * platform/ios/PlatformEventFactoryIOS.mm:
        (WebCore::codeForKeyEvent): Add a comment to explain that this key is only on
        JIS keyboards.
        (WebCore::isKeypadEvent): Return true for the Numpad Comma key.

2019-05-09  Zalan Bujtas  <zalan@apple.com>

        Do not mix inline and block level boxes.
        https://bugs.webkit.org/show_bug.cgi?id=197462
        <rdar://problem/50369362>

        Reviewed by Antti Koivisto.

        This patch tightens the remove-anonymous-wrappers logic by checking if the removal would
        produce an inline-block sibling mix.
        When a block level box is removed from the tree, we check if after the removal the anonymous sibling block
        boxes are still needed or whether we can removed them as well (and have only inline level child boxes).
        In addition to checking if the container is anonymous and is part of a continuation, we also need to check
        if collapsing it (and by that moving its children one level up) would cause a inline-block box mix.

        Test: fast/ruby/continuation-and-column-spanner-crash.html

        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::removeAnonymousWrappersForInlineChildrenIfNeeded):
        * rendering/updating/RenderTreeBuilderContinuation.cpp:
        (WebCore::RenderTreeBuilder::Continuation::cleanupOnDestroy):

2019-05-09  Eric Carlson  <eric.carlson@apple.com>

        Refine AudioSession route sharing policy
        https://bugs.webkit.org/show_bug.cgi?id=197742
        <rdar://problem/50590818>

        Reviewed by Darin Adler.

        No new tests, updated AVAudioSessionRouteSharingPolicy API test.

        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
        (MediaSessionManagerCocoa::updateSessionState):

2019-05-09  Simon Fraser  <simon.fraser@apple.com>

        fast/hidpi/video-controls-in-hidpi.html sometimes asserts in WK1
        https://bugs.webkit.org/show_bug.cgi?id=197695

        Reviewed by Zalan Bujtas.

        With the backing-sharing changes that landed in r245058, some WebKit1 tests with media controls asserted in
        RenderLayerBacking::computeParentGraphicsLayerRect() because a layer would have a m_ancestorClippingLayer,
        but backgroundClipRect() would return an infinite rect.
        
        This happened when a layer tree change caused the layer's compositing ancestor to no longer isolate
        composited blending (which affects the behavior of RenderLayerCompositor:clippedByAncestor()), but we failed
        to mark its composited children as needing the configuration update which would eliminate their m_ancestorClippingLayers.
        
        The fix is to call setChildrenNeedCompositingGeometryUpdate() when isolatesCompositedBlending changes. We don't haev
        setChildrenNeedCompositingConfigurationUpdate(), but setChildrenNeedCompositingGeometryUpdate() has the desired side-effect.

        I was unable to make a standalone test case for this, but the code is exercised by media control tests.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):

2019-05-09  Brent Fulgham  <bfulgham@apple.com>

        Correct delayed load event handling
        https://bugs.webkit.org/show_bug.cgi?id=197679
        <rdar://problem/50423334>

        Reviewed by Alex Christensen.

        We need to properly account for the fact that JavaScript might run
        while performing loads.

        * dom/Document.cpp:
        (WebCore::Document::loadEventDelayTimerFired):

2019-05-09  Antti Koivisto  <antti@apple.com>

        Elements with "display: inline-block" don't have a touch-action region
        https://bugs.webkit.org/show_bug.cgi?id=197281
        <rdar://problem/50535081>

        Reviewed by Antoine Quint.

        Test: pointerevents/ios/touch-action-region-inline-block.html

        PaintPhase::EventRegion failed to traverse into inline boxes.

        * rendering/InlineElementBox.cpp:
        (WebCore::InlineElementBox::paint):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::paintAsInlineBlock):

2019-05-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r239915): [FreeType] White space skipped when rendering plain text with noto CJK font
        https://bugs.webkit.org/show_bug.cgi?id=197658

        Reviewed by Michael Catanzaro.

        Since r239915 we no longer overwrite control characters with zero width space, they are handled later when
        filling the glyph pages. In Font::platformGlyphInit() there's an optimization to get the glyph of zero with
        space character that assumes that control characters are always overwritten. Since the glyph for character at 0
        index is always overwritten with zero width space, we can avoid loading the page for the actual zero width space
        character and use the first page instead. In the particular case of noto CJK font, character at 0 is mapped to
        the same glyph as space character, so space and zero width space end up being the same glyph. That breaks the
        space width calculation, that returns 0 when isZeroWidthSpaceGlyph() is true. That's why spaces are no
        longer rendered, ComplexTextController::adjustGlyphsAndAdvances() is setting the x advance for the space glyphs
        to 0.

        * platform/graphics/Font.cpp:
        (WebCore::Font::platformGlyphInit): Use the actual zero width space page to get the glyph instead of 0 when
        using FreeType.

2019-05-08  Alex Christensen  <achristensen@webkit.org>

        Fix WPE build.

        * CMakeLists.txt:
        Bots wanted a "PUBLIC" or "PRIVATE" keyword here.

2019-05-08  Alex Christensen  <achristensen@webkit.org>

        Try to fix Linux build

        * platform/graphics/ANGLEWebKitBridge.h:
        Include headers consistently on all platforms.

2019-05-08  Don Olmstead  <don.olmstead@sony.com>

        Update ANGLE
        https://bugs.webkit.org/show_bug.cgi?id=197676

        Reviewed by Alex Christensen.

        * CMakeLists.txt:
        * PlatformGTK.cmake:
        * PlatformMac.cmake:
        * PlatformPlayStation.cmake:
        * PlatformWPE.cmake:
        * PlatformWin.cmake:
        * platform/graphics/GLContext.cpp:
        * platform/graphics/egl/GLContextEGL.cpp:
        * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
        * platform/graphics/opengl/Extensions3DOpenGLES.h:
        * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
        * platform/graphics/texmap/TextureMapperGLHeaders.h:

2019-05-08  Chris Dumez  <cdumez@apple.com>

        [iOS Debug] ASSERTION FAILED: !m_originalNode in WebCore::JSLazyEventListener::checkValidityForEventTarget(WebCore::EventTarget &)
        https://bugs.webkit.org/show_bug.cgi?id=197696
        <rdar://problem/50586956>

        Reviewed by Simon Fraser.

        Setting the onorientationchange / onresize event handler on the body should set the event handler on the
        window object, as per the HTML specification. However, calling body.addEventListener() with 'orientationchange'
        or 'resize' should not set the event listener on the window object, only the body. Blink and Gecko seem to
        behave as per specification but WebKit had a quirk for the addEventListener case. The quirk's implementation
        is slightly wrong (because it is unsafe to take a JSLazyEventListener from a body element and add it to the
        window, given that the JSLazyEventListener keeps a raw pointer to its element) and was causing crashes such
        as <rdar://problem/24314027>. As a result, this patch simply drops the WebKit quirk, which will align our
        behavior with other browsers and fix the crashes altogether.

        Test: fast/events/ios/rotation/orientationchange-event-listener-on.body.html

        * dom/Node.cpp:
        (WebCore::tryAddEventListener):
        (WebCore::tryRemoveEventListener):

2019-05-08  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r245058.

        Causes crashes under ASan / GuardMalloc

        Reverted changeset:

        "Implement backing-sharing in compositing layers, allowing
        overlap layers to paint into the backing store of another
        layer"
        https://bugs.webkit.org/show_bug.cgi?id=197561
        https://trac.webkit.org/changeset/245058

2019-05-08  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r245068.

        Caused debug layout tests to exit early due to an assertion
        failure.

        Reverted changeset:

        "All prototypes should call didBecomePrototype()"
        https://bugs.webkit.org/show_bug.cgi?id=196315
        https://trac.webkit.org/changeset/245068

2019-05-08  Megan Gardner  <megan_gardner@apple.com>

        Add quirks to emulate undo and redo in hidden editable areas on some websites
        https://bugs.webkit.org/show_bug.cgi?id=197452

        Reviewed by Alex Christensen.

        UI change, not testable.

        We need to send synthetic keyboard events to the web process to emulate undo and redo
        key combinations for when we are trying to get our undo and redo UI to work
        on rich editing websites that only listen to keystrokes, and don't let us use our
        undo manager to help manage the input content.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):
        * platform/PlatformKeyboardEvent.h:
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
        (WebCore::PlatformKeyboardEvent::isSyntheticEvent):
        (WebCore::PlatformKeyboardEvent::setSyntheticEvent):
        * platform/ios/KeyEventIOS.mm:
        (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys):
        * platform/ios/PlatformEventFactoryIOS.mm:
        (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
        * platform/mac/PlatformEventFactoryMac.mm:
        (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):

2019-05-08  Don Olmstead  <don.olmstead@sony.com>

        CSSFontFaceSource fails to compile when !ENABLE(SVG_FONTS)
        https://bugs.webkit.org/show_bug.cgi?id=197720

        Unreviewed build fix.

        Add usesInDocumentSVGFont to the !ENABLE(SVG_FONT) path.

        * css/CSSFontFaceSource.cpp:
        (WebCore::CSSFontFaceSource::font):

2019-05-08  Timothy Hatcher  <timothy@apple.com>

        Add plumbing for inactive system colors in RenderTheme cache.
        https://bugs.webkit.org/show_bug.cgi?id=197699
        rdar://problem/49406936

        Reviewed by Tim Horton.

        * css/StyleColor.h:
        * page/Page.cpp:
        (WebCore::Page::effectiveAppearanceDidChange): Renamed from setUseDarkAppearance.
        * page/Page.h:
        (WebCore::Page::useInactiveAppearance const):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::purgeCaches):
        (WebCore::RenderTheme::platformColorsDidChange):
        (WebCore::RenderTheme::colorCache const):
        * rendering/RenderTheme.h:
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::setUseDarkAppearanceInternal):

2019-05-08  Robin Morisset  <rmorisset@apple.com>

        All prototypes should call didBecomePrototype()
        https://bugs.webkit.org/show_bug.cgi?id=196315

        Reviewed by Saam Barati.

        This changelog already landed, but the commit was missing the actual changes.

        It was found by existing tests, with the new assert in JSC::Structure

        * bindings/js/JSWindowProxy.cpp:
        (WebCore::JSWindowProxy::setWindow):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GeneratePrototypeDeclaration):
        (GenerateConstructorHelperMethods):
        * bindings/scripts/test/JS/JSInterfaceName.cpp:
        (WebCore::JSInterfaceNamePrototype::JSInterfaceNamePrototype):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::JSMapLikePrototype::JSMapLikePrototype):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::JSReadOnlyMapLikePrototype::JSReadOnlyMapLikePrototype):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype):
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        (WebCore::JSTestCEReactionsPrototype::JSTestCEReactionsPrototype):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        (WebCore::JSTestCEReactionsStringifierPrototype::JSTestCEReactionsStringifierPrototype):
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::JSTestCallTracerPrototype::JSTestCallTracerPrototype):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
        (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::JSTestClassWithJSBuiltinConstructorPrototype):
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::JSTestDOMJITPrototype::JSTestDOMJITPrototype):
        (WebCore::JSTestDOMJITConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::JSTestEnabledBySettingPrototype::JSTestEnabledBySettingPrototype):
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype):
        (WebCore::JSTestEventConstructorConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype):
        (WebCore::JSTestEventTargetConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestException.cpp:
        (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype):
        * bindings/scripts/test/JS/JSTestGlobalObject.h:
        (WebCore::JSTestGlobalObjectPrototype::JSTestGlobalObjectPrototype):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestIndexedSetterNoIdentifierPrototype::JSTestIndexedSetterNoIdentifierPrototype):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
        (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::JSTestIndexedSetterThrowingExceptionPrototype):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestIndexedSetterWithIdentifierPrototype::JSTestIndexedSetterWithIdentifierPrototype):
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
        (WebCore::JSTestInterfaceLeadingUnderscorePrototype::JSTestInterfaceLeadingUnderscorePrototype):
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        (WebCore::JSTestIterablePrototype::JSTestIterablePrototype):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
        (WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::JSTestNamedAndIndexedSetterNoIdentifierPrototype):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
        (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::JSTestNamedAndIndexedSetterThrowingExceptionPrototype):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::JSTestNamedAndIndexedSetterWithIdentifierPrototype):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        (WebCore::JSTestNamedDeleterNoIdentifierPrototype::JSTestNamedDeleterNoIdentifierPrototype):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::JSTestNamedDeleterThrowingExceptionPrototype):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::JSTestNamedDeleterWithIdentifierPrototype::JSTestNamedDeleterWithIdentifierPrototype):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::JSTestNamedDeleterWithIndexedGetterPrototype):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
        (WebCore::JSTestNamedGetterCallWithPrototype::JSTestNamedGetterCallWithPrototype):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
        (WebCore::JSTestNamedGetterNoIdentifierPrototype::JSTestNamedGetterNoIdentifierPrototype):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::JSTestNamedGetterWithIdentifierPrototype::JSTestNamedGetterWithIdentifierPrototype):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedSetterNoIdentifierPrototype::JSTestNamedSetterNoIdentifierPrototype):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
        (WebCore::JSTestNamedSetterThrowingExceptionPrototype::JSTestNamedSetterThrowingExceptionPrototype):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedSetterWithIdentifierPrototype::JSTestNamedSetterWithIdentifierPrototype):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::JSTestNamedSetterWithIndexedGetterPrototype):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::JSTestNamedSetterWithIndexedGetterAndSetterPrototype):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::JSTestNamedSetterWithOverrideBuiltinsPrototype):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::JSTestNamedSetterWithUnforgablePropertiesPrototype):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::JSTestNodePrototype::JSTestNodePrototype):
        (WebCore::JSTestNodeConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::JSTestObjPrototype::JSTestObjPrototype):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::JSTestOverloadedConstructorsWithSequencePrototype):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::JSTestOverrideBuiltinsPrototype::JSTestOverrideBuiltinsPrototype):
        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
        (WebCore::JSTestPluginInterfacePrototype::JSTestPluginInterfacePrototype):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::JSTestPromiseRejectionEventPrototype::JSTestPromiseRejectionEventPrototype):
        (WebCore::JSTestPromiseRejectionEventConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        (WebCore::JSTestSerializationPrototype::JSTestSerializationPrototype):
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
        (WebCore::JSTestSerializationIndirectInheritancePrototype::JSTestSerializationIndirectInheritancePrototype):
        (WebCore::JSTestSerializationIndirectInheritanceConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
        (WebCore::JSTestSerializationInheritPrototype::JSTestSerializationInheritPrototype):
        (WebCore::JSTestSerializationInheritConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
        (WebCore::JSTestSerializationInheritFinalPrototype::JSTestSerializationInheritFinalPrototype):
        (WebCore::JSTestSerializationInheritFinalConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        (WebCore::JSTestStringifierPrototype::JSTestStringifierPrototype):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        (WebCore::JSTestStringifierAnonymousOperationPrototype::JSTestStringifierAnonymousOperationPrototype):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        (WebCore::JSTestStringifierNamedOperationPrototype::JSTestStringifierNamedOperationPrototype):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        (WebCore::JSTestStringifierOperationImplementedAsPrototype::JSTestStringifierOperationImplementedAsPrototype):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        (WebCore::JSTestStringifierOperationNamedToStringPrototype::JSTestStringifierOperationNamedToStringPrototype):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        (WebCore::JSTestStringifierReadOnlyAttributePrototype::JSTestStringifierReadOnlyAttributePrototype):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        (WebCore::JSTestStringifierReadWriteAttributePrototype::JSTestStringifierReadWriteAttributePrototype):
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):

2019-05-08  Don Olmstead  <don.olmstead@sony.com>

        WEBCORE_EXPORT shouldn't be on the class and its methods
        https://bugs.webkit.org/show_bug.cgi?id=197681

        Reviewed by Simon Fraser.

        Remove WEBCORE_EXPORT from the methods.

        * page/scrolling/ScrollingTreeFrameScrollingNode.h:
        * page/scrolling/ScrollingTreeScrollingNode.h:

2019-05-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Add a quirk to synthesize mouse events when modifying the selection
        https://bugs.webkit.org/show_bug.cgi?id=197683
        <rdar://problem/48003980>

        Reviewed by Tim Horton.

        See WebKit ChangeLog for more details.

        Test: editing/selection/ios/dispatch-mouse-events-when-modifying-selection-quirk.html

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::supportsSelectionUpdatesOnMouseDrag const):

        Add some platform hooks to prevent mousemove events from updating the selection on iOS.

        (WebCore::EventHandler::shouldAllowMouseDownToStartDrag const):

        Add some platform hooks to prevent drag and drop from kicking in when sending synthetic mousemove events to the
        page on iOS (drag and drop is instead triggered by EventHandler::tryToBeginDragAtPoint).

        (WebCore::EventHandler::updateSelectionForMouseDrag):
        * page/EventHandler.h:
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldDispatchSyntheticMouseEventsWhenModifyingSelection const):
        * page/Quirks.h:

        Add the new site-specific quirk.

        * page/Settings.yaml:
        * page/ios/EventHandlerIOS.mm:
        (WebCore::EventHandler::tryToBeginDragAtPoint):
        (WebCore::EventHandler::supportsSelectionUpdatesOnMouseDrag const):
        (WebCore::EventHandler::shouldAllowMouseDownToStartDrag const):
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setShouldDispatchSyntheticMouseEventsWhenModifyingSelection):
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:

        Add an internal settings hook to opt into this quirk, for use in layout tests.

2019-05-08  Simon Fraser  <simon.fraser@apple.com>

        Implement backing-sharing in compositing layers, allowing overlap layers to paint into the backing store of another layer
        https://bugs.webkit.org/show_bug.cgi?id=197561
        <rdar://problem/50445998>

        Reviewed by Antti Koivisto.

        This change introduces the concept of layers that share backing store for compositing. A layer
        which is sharing its backing store first paints itself, and then some set of layers which come
        later in paint order in the same stacking context. This reduces the composited layer count in
        some overflow scrolling scenarios, thereby also simplifying the scrolling tree.
        
        A backing-shared layer stores a vector of "sharing" RenderLayer* in its RenderLayerBacking. At
        paint time, the owning layer is painted, then the sharing layers, setting the owning layer as the
        painting root so that positioning and clipping just work.
        
        Sharing layer relationships are constructed in RenderLayerCompositor::computeCompositingRequirements().
        We track the last layer which was composited in paint order as a shared candidate. If a later layer
        would composite for overlap (and no other reasons), then we allow it to share with the candidate
        if the candidate is in its ancestor containing block chain. Sharing is currently limited to layers
        in the same stacking context.
        
        isComposited() returns false for sharing layers, but they are like composited layers in that
        they behave as painting boundaries, so RenderLayer::paintLayer() needs to stop at them,
        and repaints in shared layers have to be directed to their shared layer, hence
        changes to RenderLayer::clippingRootForPainting() and RenderLayer::enclosingCompositingLayerForRepaint().
        
        The clipping boundary logic in RenderLayer::backgroundClipRect() needed to be generalized so that
        all calls to RenderLayer::parentClipRects() check for crossing painting boundaries and use
        TemporaryClipRects in that case.

        Tests: compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html
               compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html
               compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html
               compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html
               compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html
               compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html
               compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html
               compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html
               compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html
               compositing/shared-backing/overflow-scroll/shared-layer-clipping.html
               compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html
               compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html
               compositing/shared-backing/overflow-scroll/shared-layer-repaint.html
               compositing/shared-backing/partial-compositing-update.html
               compositing/shared-backing/partial-compositing-update2.html
               compositing/shared-backing/remove-sharing-layer.html
               compositing/shared-backing/sharing-cached-clip-rects.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::~RenderLayer):
        (WebCore::RenderLayer::ancestorLayerIsInContainingBlockChain const):
        (WebCore::RenderLayer::setBackingProviderLayer):
        (WebCore::RenderLayer::disconnectFromBackingProviderLayer):
        (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
        (WebCore::RenderLayer::clippingRootForPainting const):
        (WebCore::RenderLayer::clipToRect):
        (WebCore::RenderLayer::paintLayer):
        (WebCore::RenderLayer::updateClipRects):
        (WebCore::RenderLayer::clipCrossesPaintingBoundary const):
        (WebCore::RenderLayer::calculateClipRects const):
        (WebCore::outputPaintOrderTreeLegend):
        (WebCore::outputPaintOrderTreeRecursive):
        (WebCore::inContainingBlockChain): Deleted.
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::willBeDestroyed):
        (WebCore::clearBackingSharingLayerProviders):
        (WebCore::RenderLayerBacking::setBackingSharingLayers):
        (WebCore::RenderLayerBacking::removeBackingSharingLayer):
        (WebCore::RenderLayerBacking::clearBackingSharingLayers):
        (WebCore::RenderLayerBacking::updateCompositedBounds):
        (WebCore::RenderLayerBacking::updateDrawsContent):
        (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer const):
        (WebCore::RenderLayerBacking::paintIntoLayer):
        (WebCore::RenderLayerBacking::paintContents):
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::CompositingState::stateForPaintOrderChildren const):
        (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildren):
        (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildrenForUnchangedSubtree):
        (WebCore::RenderLayerCompositor::BackingSharingState::resetBackingProviderCandidate):
        (WebCore::RenderLayerCompositor::updateCompositingLayers):
        (WebCore::backingProviderLayerCanIncludeLayer):
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
        (WebCore::RenderLayerCompositor::updateBacking):
        (WebCore::RenderLayerCompositor::layerWillBeRemoved):
        (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
        * rendering/RenderLayerCompositor.h:
        * rendering/RenderTreeAsText.cpp:

2019-05-08  Brent Fulgham  <bfulgham@apple.com>

        Correct delayed load event handling
        https://bugs.webkit.org/show_bug.cgi?id=197679
        <rdar://problem/50423334>

        Reviewed by Alex Christensen.

        We need to properly account for the fact that JavaScript might run
        while performing loads.

        * dom/Document.cpp:
        (WebCore::Document::loadEventDelayTimerFired):

2019-05-08  Philippe Normand  <pnormand@igalia.com>

        REGRESSION(r243197): [GStreamer] Error playing redirected streams
        https://bugs.webkit.org/show_bug.cgi?id=197410

        Reviewed by Carlos Garcia Campos.

        Revert the change introduced in r243197 that was checking the
        redirected URI instead of the original URI. Non-main URIs should
        be ignored only when they are HLS (or similar) fragments.

        Test http/tests/security/canvas-remote-read-remote-video-hls.html still passes.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):

2019-05-08  Rob Buis  <rbuis@igalia.com>

        Link prefetch not useful for top-level navigation
        https://bugs.webkit.org/show_bug.cgi?id=195623

        Reviewed by Youenn Fablet.

        Cache cross-domain top-level prefetches in a dedicated cache and not in the
        memory cache.

        Tests: http/tests/cache/link-prefetch-main-resource-iframe.html
               http/tests/cache/link-prefetch-main-resource.html
               http/tests/contentextensions/prefetch-blocked.html

        * loader/LinkLoader.cpp:
        (WebCore::LinkLoader::prefetchIfNeeded):
        * loader/ResourceLoadInfo.cpp:
        (WebCore::toResourceType):

2019-05-07  Don Olmstead  <don.olmstead@sony.com>

        Fix !HAVE(ACCESSIBILITY) build
        https://bugs.webkit.org/show_bug.cgi?id=197680

        Reviewed by Fujii Hironori.

        * accessibility/AXObjectCache.h:
        (WebCore::AXObjectCache::focusedUIElementForPage):
        Update declaration for !HAVE(ACCESSIBILITY)
        * accessibility/AccessibilityObject.h:
        Add wrapper implementation for !HAVE(ACCESSIBILITY)
        * accessibility/AccessibilityProgressIndicator.cpp:
        (WebCore::AccessibilityProgressIndicator::roleValue const):
        Add ENABLE(METER_ELEMENT) guard.

2019-05-07  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r245038.

        Breaks internal builds.

        Reverted changeset:

        "Add SPI to set a list of hosts to which to send custom header
        fields cross-origin"
        https://bugs.webkit.org/show_bug.cgi?id=197397
        https://trac.webkit.org/changeset/245038

2019-05-07  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthN] A new request should always suppress the pending request if any
        https://bugs.webkit.org/show_bug.cgi?id=191517
        <rdar://problem/46888222>

        Reviewed by Brent Fulgham.

        Blocking new requests from the same page when there is a pending request could DoS the
        WebAuthN API in the period between [the page is refreshed, the pending request is
        hanedled/timeout]. Therefore, the policy will be to always cancel any pending requests
        whenever a new request is made. This will enforce the policy of handling only one
        request at a time.

        Covered by new tests in existing files.

        * Modules/webauthn/AuthenticatorCoordinatorClient.cpp:
        (WebCore::AuthenticatorCoordinatorClient::requestReply):
        (WebCore::AuthenticatorCoordinatorClient::setRequestCompletionHandler):
        (WebCore::AuthenticatorCoordinatorClient::addQueryCompletionHandler):
        * Modules/webauthn/AuthenticatorCoordinatorClient.h:

2019-05-07  Eric Carlson  <eric.carlson@apple.com>

        Define media buffering policy
        https://bugs.webkit.org/show_bug.cgi?id=196979
        <rdar://problem/28383861>

        Reviewed by Jer Noble.

        Test: MediaBufferingPolicy API test.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::suspend):
        (WebCore::HTMLMediaElement::resume):
        (WebCore::HTMLMediaElement::createMediaPlayer):
        (WebCore::HTMLMediaElement::setBufferingPolicy):
        (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible):
        (WebCore::HTMLMediaElement::bufferingPolicy const):
        (WebCore::HTMLMediaElement::setShouldBufferData): Deleted.
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::shouldBufferData const): Deleted.
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::updateClientDataBuffering):
        (WebCore::MediaElementSession::preferredBufferingPolicy const):
        (WebCore::MediaElementSession::dataBufferingPermitted const): Deleted.
        * html/MediaElementSession.h:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::setBufferingPolicy):
        (WebCore::convertEnumerationToString):
        (WebCore::MediaPlayer::setShouldBufferData): Deleted.
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerEnums.h:
        (WTF::LogArgument<WebCore::MediaPlayerEnums::BufferingPolicy>::toString):
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::setBufferingPolicy):
        (WebCore::MediaPlayerPrivateInterface::setShouldBufferData): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setBufferingPolicy):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setBufferingPolicy):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushAndRemoveVideoSampleBuffers): Deleted.
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setShouldBufferData): Deleted.
        * testing/Internals.cpp:
        (WebCore::Internals::elementShouldBufferData):
        (WebCore::Internals::elementBufferingPolicy):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-05-07  Alex Christensen  <achristensen@webkit.org>

        Add SPI to set a list of hosts to which to send custom header fields cross-origin
        https://bugs.webkit.org/show_bug.cgi?id=197397

        Reviewed by Geoff Garen.

        In r223001 I added the ability to send custom headers, but with a restriction that they will not be sent except to the origin of the main document.
        We need the ability to specify what origins to send these headers to even if they are not first party requests.
        We get this information in a list of strings which are the hosts to send the headers to.  Some of the strings have an asterisk at the beginning,
        indicating that the headers are to be sent to all subdomains.

        I repurposed some ObjC SPI that was never adopted, but I keep testing the C API that was to verify no regression.
        I also added some new API tests for the new behavior.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/CustomHeaderFields.cpp: Added.
        (WebCore::CustomHeaderFields::thirdPartyDomainsMatch const):
        * loader/CustomHeaderFields.h: Added.
        (WebCore::CustomHeaderFields::encode const):
        (WebCore::CustomHeaderFields::decode):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::setCustomHeaderFields): Deleted.
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::setCustomHeaderFields):
        (WebCore::DocumentLoader::customHeaderFields const):
        (WebCore::DocumentLoader::customHeaderFields): Deleted.
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):

2019-05-07  Andy Estes  <aestes@apple.com>

        run-bindings-tests should test global scope constructor generation
        https://bugs.webkit.org/show_bug.cgi?id=197669

        Reviewed by Alex Christensen.

        For interfaces that are exposed on a global object, preprocess-idls.pl generates a partial
        interface for the global object defining attributes for the interfaces' constructors. Most
        interfaces don't specify a global object, so preprocess-idls.pl defaults to DOMWindow.
        Since there is no DOMWindow.idl test case, we never generate the code for exposed interface
        constructors when running bindings tests. This means that we can't test changes to how these
        constructors are generated.

        To fix this, teach preprocess-idls.pl to treat 'TestGlobalObject' as the default global
        object when running bindings tests. This means that all exposed interface test cases will
        generate their constructors as part of JSTestGlobalObject (unless otherwise specified
        by the 'Exposed' extended attribute).

        * bindings/scripts/preprocess-idls.pl:
        Added --testGlobalContextName and --testGlobalScopeConstructorsFile arguments for use by
        run-bindings-tests.

        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        Updated expected results.

2019-05-07  Youenn Fablet  <youenn@apple.com>

        Video stream freeze on front camera orientation changing
        https://bugs.webkit.org/show_bug.cgi?id=197227
        <rdar://problem/50175498>

        Reviewed by Eric Carlson.

        Use m_currentRotationSessionAngle instead of m_currentRotation to create or not a new rotation session.
        Covered by updated test.

        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
        (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):

2019-05-07  Youenn Fablet  <youenn@apple.com>

        getUserMedia framerate unusable under low light in iOS 12.2
        https://bugs.webkit.org/show_bug.cgi?id=196214
        <rdar://problem/49232193>

        Reviewed by Geoffrey Garen.

        When setting the frame rate, set it to the exact value instead of a range.
        Otherwise, the capture device might use the lowest frame rate according the light conditions
        for best picture quality which is not what is expected by most web pages.

        Move frame rate range computation to closer where actually used.
        Since frame rate matching is fuzzy, add some checks in case the expected frame rate is slightly out of min/max range.

        Manually tested on a real device.

        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):

2019-05-07  Robin Morisset  <rmorisset@apple.com>

        All prototypes should call didBecomePrototype()
        https://bugs.webkit.org/show_bug.cgi?id=196315

        Reviewed by Saam Barati.

        It was found by existing tests, with the new assert in JSC::Structure

        * bindings/js/JSWindowProxy.cpp:
        (WebCore::JSWindowProxy::setWindow):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GeneratePrototypeDeclaration):
        (GenerateConstructorHelperMethods):

2019-05-07  John Wilander  <wilander@apple.com>

        Storage Access API: Make two changes requested by developers and complete refactoring and cleanup
        https://bugs.webkit.org/show_bug.cgi?id=197648
        <rdar://problem/50527493>

        Reviewed by Chris Dumez.

        Developers have requested two minor changes to the Storage Access API:
        - Only consume the user gesture when the user explicitly denies access.
        - Make document.hasStorageAccess() return true instead of false when the feature is off.

        In addition to this, we have refactoring and cleanup to do. Namely:
        - Make use of WebCore::RegistrableDomain all the way.
        - Remove dead code in WebKit::NetworkProcess since the calls now go through NetworkConnectionToWebProcess.
        - Introduce boolean enums for state handling.
        - Break out the Storage Access API functionality into a supplement of WebCore::Document.

        Reviewed by Chris Dumez.

        Tests: http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture.html
               http/tests/storageAccess/deny-without-prompt-preserves-gesture.html
               http/tests/storageAccess/grant-with-prompt-preserves-gesture.html
               http/tests/storageAccess/has-storage-access-true-if-feature-off.html

        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::hasStorageAccess): Deleted.
        (WebCore::Document::requestStorageAccess): Deleted.
        (WebCore::Document::enableTemporaryTimeUserGesture): Deleted.
        (WebCore::Document::consumeTemporaryTimeUserGesture): Deleted.
        (WebCore::Document::hasFrameSpecificStorageAccess const): Deleted.
        (WebCore::Document::setHasFrameSpecificStorageAccess): Deleted.
        * dom/Document.h:
        (WebCore::Document::setUserGrantsStorageAccessOverride): Deleted.
            All of this has been moved to the supplement WebCore::DocumentStorageAccess.
        * dom/Document.idl:
            The Storage Access API has been moved to DocumentStorageAccess.idl.
        * dom/DocumentStorageAccess.cpp: Added.
        (WebCore::DocumentStorageAccess::from):
        (WebCore::DocumentStorageAccess::supplementName):
        (WebCore::DocumentStorageAccess::hasStorageAccess):
        (WebCore::DocumentStorageAccess::requestStorageAccess):
        (WebCore::DocumentStorageAccess::enableTemporaryTimeUserGesture):
        (WebCore::DocumentStorageAccess::consumeTemporaryTimeUserGesture):
        (WebCore::DocumentStorageAccess::hasFrameSpecificStorageAccess const):
        (WebCore::DocumentStorageAccess::setHasFrameSpecificStorageAccess):
        * dom/DocumentStorageAccess.h: Added.
        * dom/DocumentStorageAccess.idl: Added.
        * page/ChromeClient.h:
        * testing/Internals.cpp:
        (WebCore::Internals::setUserGrantsStorageAccess): Deleted.
            This was dead code.
        * testing/Internals.h:
        * testing/Internals.idl:

2019-05-07  Antoine Quint  <graouts@apple.com>

        [Pointer Events] isPrimary property of pointercancel events should match previous events for that pointer
        https://bugs.webkit.org/show_bug.cgi?id=197665

        Reviewed by Dean Jackson.

        The test at web-platform-tests/pointerevents/pointerevent_pointercancel_touch.html would fail early because one of the first assertions
        would check that isPrimary for a pointercancel event would match the isPrimary property of the previous pointer event dispatched for that
        pointer id. This prevented many further assertions from passing and also was the cause of flakiness for the next test since this test was
        ended early and the state of touches created using UIScriptController were not in a clean state.

        We now track the isPrimary state for a given pointer using the CapturingData and use that value when dispatching a pointercancel event.

        * dom/PointerEvent.cpp:
        (WebCore::PointerEvent::create):
        (WebCore::PointerEvent::PointerEvent):
        * dom/PointerEvent.h:
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::pointerEventWasDispatched):
        (WebCore::PointerCaptureController::cancelPointer):
        * page/PointerCaptureController.h:

2019-05-07  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r244900.

        Caused media/track/track-cue-missing.html to fail on debug
        queues

        Reverted changeset:

        "Add logging for RenderLayer clip rects"
        https://bugs.webkit.org/show_bug.cgi?id=197547
        https://trac.webkit.org/changeset/244900

2019-05-07  Antti Koivisto  <antti@apple.com>

        <body> with overflow:hidden CSS is scrollable on iOS
        https://bugs.webkit.org/show_bug.cgi?id=153852
        <rdar://problem/38715356>

        Reviewed by Antoine Quint.

        Tests: fast/scrolling/ios/body-overflow-hidden-frame.html
               fast/scrolling/ios/body-overflow-hidden.html

        * page/scrolling/ScrollingTreeScrollingNode.h:

2019-05-07  Antoine Quint  <graouts@apple.com>

        Mouse event simulation should be limited to the graphing calculator on Desmos.com
        https://bugs.webkit.org/show_bug.cgi?id=197652
        <rdar://problem/47068176>

        Reviewed by Antti Koivisto.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

2019-05-06  James Savage  <james.savage@apple.com>

        Improve coordination for creating UIWindow instances.
        https://bugs.webkit.org/show_bug.cgi?id=197578.
        <rdar://problem/50456965>.

        Reviewed by Wenson Hsieh.

        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (makeWindowFromView): Pull out window creation.
        (VideoFullscreenInterfaceAVKit::doSetup): Call new helper function.

2019-05-06  Tim Horton  <timothy_horton@apple.com>

        _overrideViewportWithArguments does not work when called before loading
        https://bugs.webkit.org/show_bug.cgi?id=197638
        <rdar://problem/50505111>

        Reviewed by Wenson Hsieh.

        * dom/Document.cpp:
        (WebCore::Document::viewportArguments const):
        (WebCore::Document::updateViewportArguments):
        (WebCore::Document::setOverrideViewportArguments): Deleted.
        * dom/Document.h:
        (WebCore::Document::viewportArguments const): Deleted.
        * page/Page.cpp:
        (WebCore::Page::setOverrideViewportArguments):
        * page/Page.h:
        (WebCore::Page::overrideViewportArguments const):
        * page/ViewportConfiguration.cpp:
        (WebCore::ViewportConfiguration::setViewportArguments):
        Move overrideViewportArguments to Page, since it is view-global in the API.

2019-05-06  Chris Dumez  <cdumez@apple.com>

        Add assertions to JSLazyEventListener to help catch the cause of a crash
        https://bugs.webkit.org/show_bug.cgi?id=197617

        Reviewed by Alexey Proskuryakov.

        Add assertions to JSLazyEventListener to help catch the cause of <rdar://problem/24314027>.

        * bindings/js/JSLazyEventListener.cpp:
        (WebCore::JSLazyEventListener::checkValidityForEventTarget):
        * bindings/js/JSLazyEventListener.h:
        * dom/EventListener.h:
        (WebCore::EventListener::checkValidityForEventTarget):
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::addEventListener):
        (WebCore::EventTarget::setAttributeEventListener):
        (WebCore::EventTarget::innerInvokeEventListeners):

2019-05-04  Per Arne Vollan  <pvollan@apple.com>

        -[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:] doesn't delete _WKWebsiteDataTypeCredentials
        https://bugs.webkit.org/show_bug.cgi?id=197510
        <rdar://problem/50372338>

        Reviewed by Alex Christensen.

        This patch implements deletion of non persistent credentials for a set of origins. In order for this to work, fetching
        credentials from the credential storage needs to return a set of SecurityOriginData objects, instead of a set of origin
        strings. This is implemented by iterating over all the elements in the credential map, and creating a SecurityOriginData
        object for each credential based on the protection space.

        API test: WKWebsiteDataStore.RemoveNonPersistentCredentials

        * platform/network/CredentialStorage.cpp:
        (WebCore::CredentialStorage::removeCredentialsWithOrigin):
        (WebCore::CredentialStorage::originsWithCredentials const):
        * platform/network/CredentialStorage.h:
        (WebCore::CredentialStorage::originsWithCredentials const): Deleted.

2019-05-06  Keith Rollin  <krollin@apple.com>

        Temporarily disable generate-xcfilelists
        https://bugs.webkit.org/show_bug.cgi?id=197619
        <rdar://problem/50507392>

        Reviewed by Alex Christensen.

        We need to perform a significant update to the generate-xcfilelist
        scripts. This work involves coordinated work with another facility. If
        the work does not occur in tandem, the build will be broken. To avoid
        this, disable the invoking of the scripts during the transition. The
        checking will be restored once the new scripts are in place.

        No new tests -- no change in user-visible functionality.

        * Scripts/check-xcfilelists.sh:

2019-05-06  Andres Gonzalez  <andresg_22@apple.com>

        Hitpoint for link which spans two lines in web content is incorrect
        https://bugs.webkit.org/show_bug.cgi?id=197511
        <rdar://problem/49971483>

        Reviewed by Chris Fleizach.

        - Special case for links to return first char location as clickPoint instead of middle point of bounding rect.
        - Modified iOS ActivationPoint to use clickPoint. This way all code paths go through the same function.
        - Made boundsForRects to return content coordinates in all platforms. Adjusted all callers, directly or indirectly, appropriately.

        Tests: accessibility/ios-simulator/links-activation.html
               accessibility/links-activation.html

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::clickPoint):
        (WebCore::AccessibilityRenderObject::boundsForRects):
        (WebCore::AccessibilityRenderObject::boundsForRects const): Deleted.
        * accessibility/AccessibilityRenderObject.h:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

2019-05-06  Jer Noble  <jer.noble@apple.com>

        Adopt AVStreamDataParser.audiovisualMIMETypes
        https://bugs.webkit.org/show_bug.cgi?id=197581
        <rdar://problem/50458981>

        Reviewed by Eric Carlson.

        Add a new singleton class, AVStreamDataParserMIMETypeCache, and rename AVFoundationMIMETypeCache to the more precise
        AVAssetMIMETypeCache.  Update all the old AVFoundationMIMETypeCache with the new name.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.h.
        (WebCore::AVAssetMIMETypeCache::setCacheMIMETypesCallback):
        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm.
        (WebCore::AVAssetMIMETypeCache::singleton):
        (WebCore::AVAssetMIMETypeCache::setSupportedTypes):
        (WebCore::AVAssetMIMETypeCache::types):
        (WebCore::AVAssetMIMETypeCache::supportsContentType):
        (WebCore::AVAssetMIMETypeCache::canDecodeType):
        (WebCore::AVAssetMIMETypeCache::isAvailable const):
        (WebCore::AVAssetMIMETypeCache::loadMIMETypes):
        * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h: Added.
        * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm: Added.
        (WebCore::AVStreamDataParserMIMETypeCache::singleton):
        (WebCore::AVStreamDataParserMIMETypeCache::types):
        (WebCore::AVStreamDataParserMIMETypeCache::supportsContentType):
        (WebCore::AVStreamDataParserMIMETypeCache::canDecodeType):
        (WebCore::AVStreamDataParserMIMETypeCache::isAvailable const):
        (WebCore::AVStreamDataParserMIMETypeCache::loadMIMETypes):
        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
        (WebCore::ImageDecoderAVFObjC::create):
        (WebCore::ImageDecoderAVFObjC::supportsMediaType):
        (WebCore::ImageDecoderAVFObjC::supportsContentType):
        (WebCore::ImageDecoderAVFObjC::canDecodeType):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):

2019-05-06  Youenn Fablet  <youenn@apple.com>

        WebAudio Node JS wrappers should not be collected if events can be fired
        https://bugs.webkit.org/show_bug.cgi?id=197533

        Reviewed by Jer Noble.

        Before the patch, some web audio nodes could fire event listeners, but were not protected from GC.
        Use CustomIsReachable to ensure theses nodes can be collected if:
        - their AudioContext is stopped (typically due to document being navigated away).
        - their AudioContext is closed.
        - nodes do not have event listeners.

        Covered by WPT mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https.html and
        WPT webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html
        and web audio WebRTC tests.
        Specific newly added test: webaudio/webaudio-gc.html

        * Modules/webaudio/AudioContext.h:
        (WebCore::AudioContext::isClosed const):
        * Modules/webaudio/AudioNode.idl:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSAudioNodeCustom.cpp: Added.
        (WebCore::JSAudioNodeOwner::isReachableFromOpaqueRoots):

2019-05-06  Daniel Bates  <dabates@apple.com>

        Google Docs & Yahoo! Japan: Can’t compose characters with Chinese or Japanese keyboard
        https://bugs.webkit.org/show_bug.cgi?id=197474
        <rdar://problem/47219324>

        Reviewed by Ryosuke Niwa.

        Fix up some #if defs to compile more Mac code when building on iOS.

        * dom/KeyboardEvent.cpp:
        (WebCore::KeyboardEvent::KeyboardEvent):
        * platform/PlatformKeyboardEvent.h:
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

2019-05-06  Chris Dumez  <cdumez@apple.com>

        Add assertions to CachedFrame to help figure out crash in CachedFrame constructor
        https://bugs.webkit.org/show_bug.cgi?id=197621

        Reviewed by Geoffrey Garen.

        Add release assertions to try and figure out who is sometimes detaching the document from its
        frame while constructing CachedFrames for its descendants.

        * dom/Document.cpp:
        (WebCore::Document::detachFromFrame):
        * dom/Document.h:
        (WebCore::Document::setMayBeDetachedFromFrame):
        * history/CachedFrame.cpp:
        (WebCore::CachedFrame::CachedFrame):

2019-05-06  Zan Dobersek  <zdobersek@igalia.com>

        [GLib] WebCore::MainThreadSharedTimer should use the appropriate GSource priority, name
        https://bugs.webkit.org/show_bug.cgi?id=197606

        Reviewed by Carlos Garcia Campos.

        * platform/MainThreadSharedTimer.cpp:
        (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
        Use the MainThreadSharedTimer GLib priority for this timer. The name is
        also adjusted accordingly.

2019-05-05  Wenson Hsieh  <wenson_hsieh@apple.com>

        fast/attachment/attachment-folder-icon.html is an Image Only failure on recent macOS builds
        https://bugs.webkit.org/show_bug.cgi?id=197593
        <rdar://problem/50379267>

        Reviewed by Tim Horton.

        On recent versions of macOS, -[NSWorkspace iconForFileType:] returns the generic document icon for
        "public.directory". Instead of using this UTI to generate attachment icons for "multipart/x-folder" and
        "application/vnd.apple.folder", we should instead be using "public.folder", which has a folder icon. This fixes
        the existing test fast/attachment/attachment-folder-icon.html, which currently results in an image diff on these
        builds of macOS.

        * rendering/RenderThemeMac.mm:
        (WebCore::iconForAttachment):

2019-05-04  Alex Christensen  <achristensen@webkit.org>

        Revert r244953 and r244954 because they broke internal builds.
        https://bugs.webkit.org/show_bug.cgi?id=197534

        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::changeCount const):
        (WebCore::PlatformPasteboard::write):

2019-05-04  Alex Christensen  <achristensen@webkit.org>

        Merge the three UIKitSPI.h files into a single one in PAL
        https://bugs.webkit.org/show_bug.cgi?id=197534

        Reviewed by Darin Adler.

        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::changeCount const):
        (WebCore::PlatformPasteboard::write):

2019-05-04  Youenn Fablet  <youenn@apple.com>

        Convert some RealtimeOutgoingVideoSourceCocoa logging to ERROR_LOG
        https://bugs.webkit.org/show_bug.cgi?id=197549

        Reviewed by Eric Carlson.

        No change of behavior.

        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
        (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):

2019-05-03  Simon Fraser  <simon.fraser@apple.com>

        [macOS] Fix programmatic scrolling with async overflow scroll
        https://bugs.webkit.org/show_bug.cgi?id=197590

        Reviewed by Sam Weinig.
        
        ScrollingTreeOverflowScrollingNodeMac needs to handle RequestedScrollPosition.

        Tests: scrollingcoordinator/mac/programmatic-frame-scroll.html
               scrollingcoordinator/mac/programmatic-overflow-scroll.html

        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
        (WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren):

2019-05-03  Zalan Bujtas  <zalan@apple.com>

        [iOS] outlook.live.com: Compose email frame not fully visible and not scrollable
        https://bugs.webkit.org/show_bug.cgi?id=197573
        <rdar://problem/48008441>

        Reviewed by Wenson Hsieh.

        The outlook mail view's flex column setup produces a somewhat unfortunate layout at certain viewport widths.
        This patch addresses the issue by ensuring that we never fall into that range.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldIgnoreShrinkToFitContent const):
        (WebCore::Quirks::overriddenViewportLayoutWidth const):
        * page/Quirks.h:

2019-05-02  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthN] A focused document should be required
        https://bugs.webkit.org/show_bug.cgi?id=197543
        <rdar://problem/50430989>

        Reviewed by Brent Fulgham.

        This patch adds a check to see if the invoking document is focused before
        calling into WebAuthN. This patch also removes some out-to-dated comments.

        Test: http/wpt/webauthn/public-key-credential-unfocused-document.https.html

        * Modules/credentialmanagement/CredentialsContainer.cpp:
        (WebCore::CredentialsContainer::get):
        (WebCore::CredentialsContainer::isCreate):
        * Modules/webauthn/AuthenticatorCoordinator.cpp:
        (WebCore::AuthenticatorCoordinator::create const):
        (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):

2019-05-03  Devin Rousso  <drousso@apple.com>

        Web Inspector: DOM: rename "low power" to "display composited"
        https://bugs.webkit.org/show_bug.cgi?id=197296

        Reviewed by Joseph Pecoraro.

        Removed specific ChangeLog entries since it is almost entirely mechanical changes.

        * inspector/agents/InspectorDOMAgent.h:
        * inspector/agents/InspectorDOMAgent.cpp:

2019-05-03  Daniel Bates  <dabates@apple.com>

        Pass KeyboardEvent by reference in more places
        https://bugs.webkit.org/show_bug.cgi?id=197480

        Reviewed by Wenson Hsieh.

        * editing/Editor.cpp:
        (WebCore::Editor::handleKeyboardEvent):
        (WebCore::Editor::handleInputMethodKeydown):
        * loader/EmptyClients.cpp:
        * page/EditorClient.h:

2019-05-03  Chris Dumez  <cdumez@apple.com>

        [iOS Sim Debug] ASSERTION FAILED The atomic string comes from an other thread! Layout Test imported/w3c/web-platform-tests/workers/WorkerNavigator_appName.htm is a flaky crash
        https://bugs.webkit.org/show_bug.cgi?id=197530
        <rdar://problem/50448285>

        Reviewed by Geoffrey Garen.

        The issue is that NavigatorBase::platform() was not thread safe but was called by both Navigator on
        the main thread and WorkerNavigator on worker threads.

        No new tests, covered by existing tests.

        * page/Navigator.cpp:
        (WebCore::Navigator::platform const):
        * page/Navigator.h:

        * page/NavigatorBase.cpp:
        (WebCore::NavigatorBase::platform const):
        * page/NavigatorBase.h:
        Make NavigatorBase::platform() thread safe.

        * platform/ios/Device.cpp:
        (WebCore::deviceName):
        * platform/ios/Device.h:
        Make WebCore::deviceName() thread safe.

        * platform/ios/UserAgentIOS.mm:
        (WebCore::deviceNameForUserAgent):
        Cache value returned by WebCore::deviceName() for performance.

2019-05-03  Chris Dumez  <cdumez@apple.com>

        Use WeakPtr for JSLazyEventListener::m_originalNode for safety
        https://bugs.webkit.org/show_bug.cgi?id=197576
        <rdar://problem/24314027>

        Reviewed by Alex Christensen.

        * bindings/js/JSLazyEventListener.cpp:
        (WebCore::JSLazyEventListener::JSLazyEventListener):
        (WebCore::JSLazyEventListener::create):
        * bindings/js/JSLazyEventListener.h:

2019-05-03  Eric Carlson  <eric.carlson@apple.com>

        AVFoundation framework isn't always installed
        https://bugs.webkit.org/show_bug.cgi?id=197577
        <rdar://problem/50447841>

        Reviewed by Jer Noble.
        
        Use PAL::isAVFoundationFrameworkAvailable() to check to see if AVFoundation is
        installed, not PAL::AVFoundationLibrary().

        * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
        (WebCore::AVFoundationMIMETypeCache::isAvailable const):
        (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
        (WebCore::exernalDeviceDisplayNameForPlayer):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
        * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
        (WebCore::validateHEVCParameters):
        * platform/mediastream/mac/AVCaptureDeviceManager.mm:
        (WebCore::AVCaptureDeviceManager::isAvailable):

2019-05-03  Sihui Liu  <sihui_liu@apple.com>

        Add assertion to check whether shm files have maximum FileProtection of CompleteUnlessOpen
        https://bugs.webkit.org/show_bug.cgi?id=197390
        <rdar://problem/42685773>

        Reviewed by Geoffrey Garen.

        We have seen crashes about accessing database files after device is locked. We are suspecting this is because 
        shm files have wrong data protection class, but shm files should not have Complete class protection when it 
        is created. It is likely the protection class is changed later. Add an assertion to verify our guess. If the 
        crash signature changes after this patch, we probably need to change database implementation. If it is not, we
        have other problem than data protection.

        * platform/sql/SQLiteDatabase.cpp:
        (WebCore::SQLiteDatabase::open):

2019-05-03  Youenn Fablet  <youenn@apple.com>

        Cache.add and Cache.addAll should compute a correct response body size
        https://bugs.webkit.org/show_bug.cgi?id=197464

        Reviewed by Chris Dumez.

        Compute the response body size as we do for regular Cache.put

        Test: http/wpt/cache-storage/cache-quota-add.any.html

        * Modules/cache/CacheStorageConnection.cpp:
        (WebCore::CacheStorageConnection::computeRecordBodySize):
        * Modules/cache/CacheStorageConnection.h:
        * Modules/cache/DOMCache.cpp:
        (WebCore::FetchTasksHandler::addResponseBody):
        (WebCore::DOMCache::addAll):
        Compute the response body size requires getting access to the connection.
        'this' is added to the lambda which is fine since taskHandler keeps a
        Ref to 'this' in its completion handler.
        (WebCore::DOMCache::toConnectionRecord):
        * Modules/fetch/FetchResponse.h:

2019-05-03  Tomoki Imai  <Tomoki.Imai@sony.com>

        [Cairo] Improve ShadowBlur performance using tiling optimization
        https://bugs.webkit.org/show_bug.cgi?id=197308
        Reviewed by Žan Doberšek.

        Enable tiling tiling-based optimization for drawRectShadow() and drawInsetShadow().
        Since r228776, cairo ports doesn't have tiling-based optimization.

        For AppleWin, this patch refactors code and it shares almost same code as cairo port.
        Only the difference is that AppleWin uses ScratchBuffer, but cairo ports doesn't.
        This should avoid a performance regression for AppleWin.

        No new tests, covered by existing tests.

        * platform/graphics/ShadowBlur.cpp:
        (WebCore::calculateLobes):
        Fix stylecheck errors

        (WebCore::ShadowBlur::blurLayerImage):
        Fix stylecheck errors

        (WebCore::ShadowBlur::calculateLayerBoundingRect):
        We don't use position of m_sourceRect, so change the type to FloatSize.

        (WebCore::ShadowBlur::drawShadowBuffer):
        Use m_layerSize instead of m_shadowedResultSize to fillRect, as m_layerSize is always smaller than m_shadowedResultSize.
        It's because in m_layerSize is equal to m_shadowedResultSize if it's not clipped.
        Clipping doesn't increase size of m_layerSize, so m_layerSize is always smaller than or equal to m_shadowedResultSize.

        (WebCore::ShadowBlur::templateSize const):
        Fix stylecheck errors

        (WebCore::ShadowBlur::drawRectShadow):
        (WebCore::ShadowBlur::drawInsetShadow):
        (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
        (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
        (WebCore::ShadowBlur::drawRectShadowWithTiling):
        (WebCore::ShadowBlur::drawInsetShadowWithTiling):
        Incorporate tile-based drawing.
        To accomplish it, this patch abstracts GraphicsContext::drawImageBuffer to ShadowBlur::DrawImageCallback,
        GraphicsContext::fillRect to ShadowBlur::FillRectCallback, drawing rect with hole to  ShadowBlur::FillRectWithHoleCallback.

        Variants which takes GraphicsContext as parameter now just calls another drawRectShadow.

        (WebCore::ShadowBlur::drawLayerPieces):
        Instead of graphicsContext.drawImageBuffer, call corresponding callback.

        (WebCore::ShadowBlur::drawLayerPiecesAndFillCenter):
        This function calls drawLayerPieces and fill center for outer shadow.
        Drawing outer shadow requires another callback for graphicsContext.fillRect.

        (WebCore::ShadowBlur::drawShadowLayer):
        Use m_layerSize instead of m_shadowedResultSize to fillRect,
        as m_layerSize is always smaller than m_shadowedResultSize.

        * platform/graphics/ShadowBlur.h:
        Rename m_sourceRect to m_shadowedResultSize, and change it to FloatSize from FloatRect.
        Remove GraphicsContext usage as much as possible and replace them by corresponding callbacks.

        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::drawShadowImage):
        This function corresponds to ShadowBlur::DrawImageCallback.

        (WebCore::Cairo::fillShadowBuffer):
        Erase sourceRect, as it's always bigger than layerSize.

        (WebCore::Cairo::drawPathShadow):
        (WebCore::Cairo::drawGlyphsShadow):
        Erase unused parameter.

        (WebCore::Cairo::fillRect):
        (WebCore::Cairo::fillRoundedRect):
        (WebCore::Cairo::fillRectWithRoundedHole):
        For tile-based optimization, add extra arguments to drawRectShadow.

        (WebCore::Cairo::drawSurface):
        Erase unused parameter.

2019-05-03  Antti Koivisto  <antti@apple.com>

        Add a quirk to make youtube navigation bar scrollable without mouse hover on iOS
        https://bugs.webkit.org/show_bug.cgi?id=197555
        <rdar://problem/49582231>

        Reviewed by Brent Fulgham.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyleForSiteSpecificQuirks):

        Turn 'overflow:hidden' into 'overflow:auto' on element with id="guide-inner-content".

        * page/Quirks.cpp:
        (WebCore::Quirks::needsYouTubeOverflowScrollQuirk const):
        * page/Quirks.h:

2019-05-03  Devin Rousso  <drousso@apple.com>

        Web Inspector: Record actions performed on WebGL2RenderingContext
        https://bugs.webkit.org/show_bug.cgi?id=176008
        <rdar://problem/34213884>

        Reviewed by Joseph Pecoraro.

        Tests: inspector/canvas/recording-webgl2.html
               inspector/canvas/recording-webgl2-snapshots.html

        * html/canvas/WebGL2RenderingContext.idl:

        * bindings/js/CallTracerTypes.h:
        * inspector/RecordingSwizzleTypes.h:

        * inspector/InspectorCanvas.h:
        * inspector/InspectorCanvas.cpp:
        (WebCore::InspectorCanvas::canvasChanged): Added.
        (WebCore::InspectorCanvas::resetRecordingData):
        (WebCore::shouldSnapshotWebGL2Action): Added.
        (WebCore::InspectorCanvas::recordAction):
        (WebCore::InspectorCanvas::releaseObjectForRecording):
        (WebCore::InspectorCanvas::appendActionSnapshotIfNeeded):
        (WebCore::InspectorCanvas::buildAction):
        * inspector/agents/InspectorCanvasAgent.h:
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::canvasChanged): Added.
        (WebCore::InspectorCanvasAgent::startRecording):
        Provide an actual implementation of `CanvasObserver::canvasChanged` since it can be used to
        determine whether or not an action needs a snapshot.

        * page/PageConsoleClient.cpp:
        (WebCore::canvasRenderingContext):

2019-05-03  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r244881.
        https://bugs.webkit.org/show_bug.cgi?id=197559

        Breaks compilation of jsconly on linux, breaking compilation
        for jsc-i386-ews, jsc-mips-ews and jsc-armv7-ews (Requested by
        guijemont on #webkit).

        Reverted changeset:

        "[CMake] Refactor WEBKIT_MAKE_FORWARDING_HEADERS into
        WEBKIT_COPY_FILES"
        https://bugs.webkit.org/show_bug.cgi?id=197174
        https://trac.webkit.org/changeset/244881

2019-05-03  Joonghun Park  <jh718.park@samsung.com>

        Resolve the percentage values of inset properties against proper box.
        https://bugs.webkit.org/show_bug.cgi?id=189549

        Reviewed by Antti Koivisto.

        Before this CL, sticky element's layout was executed relative to
        a box's overflow container,
        but the value returned by getComputedStyle was resolved against
        its containing block.

        So, the computed value and the actual value used in layout
        was different before this change.

        Tests: imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky-container-for-abspos.html
               imported/w3c/web-platform-tests/css/cssom/getComputedStyle-sticky-pos-percent.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::positionOffsetValue):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::enclosingScrollportBox const):
        * rendering/RenderBox.h:

2019-05-02  Antti Koivisto  <antti@apple.com>

        Add a quirk to make gmail navigation bar scrollable without mouse hover on iOS
        https://bugs.webkit.org/show_bug.cgi?id=197529
        <rdar://problem/49403416>

        Reviewed by Simon Fraser.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyle):
        (WebCore::StyleResolver::adjustRenderStyleForSiteSpecificQuirks):

        Turn 'overflow:hidden' to 'overflow:auto' on element with role="navigation".
        This should be both reasonably targeted and robust.

        * css/StyleResolver.h:
        * page/Quirks.cpp:
        (WebCore::Quirks::needsGMailOverflowScrollQuirk const):
        * page/Quirks.h:

2019-05-02  Simon Fraser  <simon.fraser@apple.com>

        Add logging for RenderLayer clip rects
        https://bugs.webkit.org/show_bug.cgi?id=197547

        Reviewed by Zalan Bujtas.

        Add a ClipRects log channel, and stream output for ClipRect and ClipRects.

        * platform/Logging.h:
        * rendering/ClipRect.cpp:
        (WebCore::operator<<):
        * rendering/ClipRect.h:
        * rendering/RenderLayer.cpp:
        (WebCore::operator<<):
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayer.h:

2019-05-02  Youenn Fablet  <youenn@apple.com>

        Make AudioContext::scriptExecutionContext() private
        https://bugs.webkit.org/show_bug.cgi?id=197512

        Reviewed by Eric Carlson.

        Refactor code to make audio nodes not rely on AudioContext::scriptExecutionContext.
        Instead, let AudioContext provide the necessary API for its nodes.
        Covered by existing tests.

        * Modules/webaudio/AudioBufferSourceNode.cpp:
        (WebCore::AudioBufferSourceNode::looping):
        (WebCore::AudioBufferSourceNode::setLooping):
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::postTask):
        (WebCore::AudioContext::origin const):
        (WebCore::AudioContext::addConsoleMessage):
        * Modules/webaudio/AudioContext.h:
        (WebCore::AudioContext::isStopped const):
        * Modules/webaudio/AudioNode.cpp:
        (WebCore::AudioNode::scriptExecutionContext const):
        * Modules/webaudio/AudioNode.h:
        * Modules/webaudio/AudioScheduledSourceNode.cpp:
        (WebCore::AudioScheduledSourceNode::finish):
        * Modules/webaudio/DefaultAudioDestinationNode.cpp:
        (WebCore::DefaultAudioDestinationNode::resume):
        (WebCore::DefaultAudioDestinationNode::suspend):
        (WebCore::DefaultAudioDestinationNode::close):
        * Modules/webaudio/MediaElementAudioSourceNode.cpp:
        (WebCore::MediaElementAudioSourceNode::wouldTaintOrigin):
        * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
        (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
        * Modules/webaudio/ScriptProcessorNode.cpp:
        (WebCore::ScriptProcessorNode::fireProcessEvent):

2019-05-02  Ryosuke Niwa  <rniwa@webkit.org>

        Disable software keyboard for a math field textarea on desmos.com
        https://bugs.webkit.org/show_bug.cgi?id=197488

        Reviewed by Wenson Hsieh.

        Treat a textarea inside a math field span as if it had inputmode content attribute set to none to suppress
        the software keyboard on desmos.com as it interferes with website's own UI.

        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::canonicalInputMode const):
        * page/Quirks.cpp:
        (WebCore::Quirks::needsInputModeNoneImplicitly const):
        * page/Quirks.h:

2019-05-02  Timothy Hatcher  <timothy@apple.com>

        NSAttributedString conversion in a loop returns nil and WKUnknownError every other time.
        https://bugs.webkit.org/show_bug.cgi?id=197523

        Reviewed by Darin Adler.

        * editing/cocoa/HTMLConverter.mm:
        (HTMLConverter::convert): Don't return early if m_dataSource is nil. This is already null
        checked later and only needed in specific cases, it shouldn't fail the whole conversion.

2019-05-02  Chris Dumez  <cdumez@apple.com>

        Setting a frame's src to a javascript URL should not run it synchronously
        https://bugs.webkit.org/show_bug.cgi?id=197466

        Reviewed by Darin Adler.

        When an iframe's src attribute is set to a javascript URL, whether when parsing
        or later on via JS, we now execute the URL's JavaScript asynchronously. We used
        to execute it synchronously, which was a source of bugs and also did not match
        other browsers.

        I have verified that our new behavior is aligned with both Firefox and Chrome.

        Note that for backward-compatibility and interoperability with Blink
        (https://bugs.chromium.org/p/chromium/issues/detail?id=923585), the
        "javascript:''" URL will still run synchronously. We should consider dropping
        this quirk at some point.

        Test: fast/dom/frame-src-javascript-url-async.html

        * loader/NavigationScheduler.cpp:
        (WebCore::ScheduledLocationChange::ScheduledLocationChange):
        (WebCore::ScheduledLocationChange::~ScheduledLocationChange):
        (WebCore::NavigationScheduler::scheduleLocationChange):
        * loader/NavigationScheduler.h:
        (WebCore::NavigationScheduler::scheduleLocationChange):
        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::requestFrame):

2019-05-02  Gary Katsevman  <git@gkatsev.com>

        WebVTT: fix vertical cue alignment.
        https://bugs.webkit.org/show_bug.cgi?id=136627.
        <rdar://problem/49725538>

        Reviewed by Eric Carlson.

        Updated existing test results.

        * html/track/VTTCue.cpp:
        (WebCore::VTTCueBox::applyCSSProperties):

2019-05-02  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Refactor WEBKIT_MAKE_FORWARDING_HEADERS into WEBKIT_COPY_FILES
        https://bugs.webkit.org/show_bug.cgi?id=197174

        Reviewed by Alex Christensen.

        Replace WEBKIT_MAKE_FORWARDING_HEADERS with WEBKIT_COPY_FILES and make dependencies
        for framework headers explicit.

        * CMakeLists.txt:

2019-05-02  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthN] Add a quirk for google.com when processing AppID extension
        https://bugs.webkit.org/show_bug.cgi?id=196046
        <rdar://problem/49088479>

        Reviewed by Brent Fulgham.

        Relaxing the same site restriction on AppID while in google.com and any
        of its subdomains to allow two www.gstatic.com AppIDs to slip in.

        Covered by manual tests on Google.com.

        * Modules/webauthn/AuthenticatorCoordinator.cpp:
        (WebCore::AuthenticatorCoordinatorInternal::needsAppIdQuirks):
        (WebCore::AuthenticatorCoordinatorInternal::processAppIdExtension):

2019-05-02  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed fix for non-unified build after r244853.

        * page/SecurityOrigin.cpp:

2019-05-02  Frederic Wang  <fwang@igalia.com>

        [GTK][WPE] Disable "thin", "thick", "medium" values of mfrac@linethickness at runtime
        https://bugs.webkit.org/show_bug.cgi?id=196142

        This patch introduces some experimental runtime flag to let users
        disable MathML features that are removed from MathML Core [1]. For now,
        these features are only disabled on GTK and WPE ports. This patch also
        adds a condition to disable "thin", "thick", "medium" values of
        mfrac@linethickness at runtime as agreed in [2].

        [1] https://mathml-refresh.github.io/mathml-core/
        [2] https://github.com/mathml-refresh/mathml/issues/4

        Reviewed by Rob Buis.

        No new tests, covered by frac-linethickness-0001.html

        * mathml/MathMLFractionElement.cpp:
        (WebCore::MathMLFractionElement::lineThickness): Just do standard
        parsing for MathML lengths when non-core MathML features are disabled.
        * page/Settings.yaml: Add WebCore setting.

2019-05-01  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthN] Adopt SecurityOrigin::isMatchingRegistrableDomainSuffix()
        https://bugs.webkit.org/show_bug.cgi?id=197481

        Reviewed by Brent Fulgham.

        This patch implements Step 6-7 from:
        https://www.w3.org/TR/webauthn/#createCredential,
        https://www.w3.org/TR/webauthn/#discover-from-external-source.

        Test: http/wpt/webauthn/public-key-credential-ip-address.html

        * Modules/webauthn/AuthenticatorCoordinator.cpp:
        (WebCore::AuthenticatorCoordinator::create const):
        (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):

2019-05-01  Youenn Fablet  <youenn@apple.com>

        Add back hasNullReferences() assert in Document::updateIsPlayingMedia
        https://bugs.webkit.org/show_bug.cgi?id=197477

        Reviewed by Eric Carlson.

        AudioContext had a special scriptExecutionContext() getter
        that was returning nullptr when AudioContext is stopped.
        Instead, make this getter behave as all other scriptExecutionContext() getters
        and make sure existing call sites of the getter are fine with the change.

        Covered by existing tests.

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::AudioContext):
        No need to check whether offline since this constructor is for non offline AudioContext.
        (WebCore::AudioContext::scriptExecutionContext const):
        (WebCore::AudioContext::fireCompletionEvent):
        * dom/Document.cpp:
        (WebCore::Document::updateIsPlayingMedia):

2019-05-01  Justin Fan  <justin_fan@apple.com>

        Update WebGPU class names based on sketch.idl
        https://bugs.webkit.org/show_bug.cgi?id=194260

        Reviewed by Dean Jackson.

        Update all exposed Web GPU interface names to GPU* prefix.

        Existing Web GPU tests updated to expect new names.

        * Modules/webgpu/WebGPU.idl:
        * Modules/webgpu/WebGPUAdapter.idl:
        * Modules/webgpu/WebGPUBindGroup.idl:
        * Modules/webgpu/WebGPUBindGroupLayout.idl:
        * Modules/webgpu/WebGPUBuffer.idl:
        * Modules/webgpu/WebGPUDevice.idl:
        * Modules/webgpu/WebGPUInputStepMode.h: Removed.
        * Modules/webgpu/WebGPUPipelineLayout.idl:
        * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
        * Modules/webgpu/WebGPUQueue.idl:
        * Modules/webgpu/WebGPURenderPassEncoder.idl:
        * Modules/webgpu/WebGPURenderPipeline.idl:
        * Modules/webgpu/WebGPUSampler.idl:
        * Modules/webgpu/WebGPUTexture.idl:
        * Modules/webgpu/WebGPUTextureView.idl:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:

2019-05-01  Jiewen Tan  <jiewen_tan@apple.com>

        Move Document::domainIsRegisterable to SecurityOrigin::isMatchingRegistrableDomainSuffix
        https://bugs.webkit.org/show_bug.cgi?id=181950
        <rdar://problem/43357371>

        Reviewed by Brent Fulgham.

        This patch moves Document::domainIsRegisterable to SecurityOrigin::isMatchingRegistrableDomainSuffix
        to be more aligned with the HTML standard:
        https://html.spec.whatwg.org/multipage/origin.html#is-a-registrable-domain-suffix-of-or-is-equal-to.
        Besides that, it also removes redundant codes within the original method that is also done in
        OriginAccessEntry::matchesOrigin.

        Covered by new API tests.

        * dom/Document.cpp:
        (WebCore::Document::setDomain):
        (WebCore::Document::domainIsRegisterable const): Deleted.
        * dom/Document.h:
        * page/SecurityOrigin.cpp:
        (WebCore::SecurityOrigin::isMatchingRegistrableDomainSuffix const):
        * page/SecurityOrigin.h:

2019-05-01  Ryosuke Niwa  <rniwa@webkit.org>

        [iOS] Element::focus and Element::scrollIntoView do not clamp scroll positions
        https://bugs.webkit.org/show_bug.cgi?id=197211

        Reviewed by Simon Fraser.

        Fixed the bug that Element::focus and Element::scrollIntoView were not clamping scroll offsets,
        which causes scrollTop etc... to return a bogus negative scrolling offset.

        Unfortunately, we can't just use FrameView's ScrollableArea::constrainScrollPosition since
        scrollRectToVisible relies on the visible rect being expanded by the content insets in order to scroll to
        a position within the content insets of UIScrollView; e.g. revealing the top of the page as the center.
        We manually expand minimumScrollPosition() and maximumScrollPosition() by the content insets instead.

        Tests: fast/scrolling/ios/programmatic-scroll-via-focus-should-clamp-top.html
               fast/scrolling/ios/programmatic-scroll-via-scrollIntoView-inside-iframe-should-clamp-top.html
               fast/scrolling/ios/programmatic-scroll-via-scrollIntoView-should-clamp-top.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible):

2019-05-01  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Add a version of viewport shrink-to-fit heuristics that preserves page layout
        https://bugs.webkit.org/show_bug.cgi?id=197342
        <rdar://problem/50063091>

        Reviewed by Tim Horton.

        Adds support for a new shrink-to-fit heuristic that attempts to lay out the contents of the page at a larger
        width in order to shrink content to fit the viewport. See WebKit ChangeLog for more details.

        Tests: fast/viewport/ios/shrink-to-fit-content-constant-width.html
               fast/viewport/ios/shrink-to-fit-content-large-width-breakpoint.html
               fast/viewport/ios/shrink-to-fit-content-no-viewport.html
               fast/viewport/ios/shrink-to-fit-content-responsive-viewport-with-horizontal-overflow.html
               fast/viewport/ios/shrink-to-fit-content-temporary-overflow.html

        * page/ViewportConfiguration.cpp:
        (WebCore::ViewportConfiguration::setMinimumEffectiveDeviceWidth):
        (WebCore::ViewportConfiguration::setIsKnownToLayOutWiderThanViewport):
        (WebCore::ViewportConfiguration::description const):
        * page/ViewportConfiguration.h:
        (WebCore::ViewportConfiguration::canIgnoreScalingConstraints const):
        (WebCore::ViewportConfiguration::minimumEffectiveDeviceWidth const):

        Add several new getters and setters in ViewportConfiguration.

        (WebCore::ViewportConfiguration::isKnownToLayOutWiderThanViewport const):
        (WebCore::ViewportConfiguration::shouldIgnoreMinimumEffectiveDeviceWidth const):

        Importantly, only allow ignoring the minimum effective device width in webpages with responsive viewports, if
        they also have *not* laid out wider than the viewport.

        (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):

2019-05-01  Zalan Bujtas  <zalan@apple.com>

        [iOS] Star rating is covered with a black circle when writing a review on Yelp
        https://bugs.webkit.org/show_bug.cgi?id=197469
        <rdar://problem/48094446>

        Reviewed by Dean Jackson.

        This patch moves the background painting of the radio/checkbox form controls in checked state to RenderTheme.
        It enables content authors to disable default appearance using -webkit-appearance: none (it is also inline with what we do on macOS).

        Test: fast/forms/radio-and-checkbox-checked-with-no-appearance.html

        * css/html.css:
        (input:matches([type="checkbox"], [type="radio"]):checked):
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::paintCheckboxDecorations):
        (WebCore::RenderThemeIOS::paintRadioDecorations):

2019-05-01  Said Abou-Hallawa  <sabouhallawa@apple.com>

        REGRESSION (r244182): RenderingUpdate should not be scheduled for invisible pages
        https://bugs.webkit.org/show_bug.cgi?id=197451

        Reviewed by Simon Fraser.

        Before r244182, some web pages never need to schedule a RenderingUpdate.
        Only pages with rAF callbacks, web animations, intersection and resize 
        observers needed to do so. After r244182, all pages have to schedule a
        RenderingUpdate when a page rendering update is required.

        When Safari opens, it create a 'blank' web page. The blank page will not
        be visible unless the user selects to show the 'Empty page' in the new
        tab. Although the blank page is not visible, the loader needs to resolveStyle()
        which requires to scheduleLayerFlushNow(). 

        We need to optimize this case: calling scheduleLayerFlushNow() for invisible
        pages. We do that by checking if the page is visible before scheduling
        the RenderingUpdate.

        Also we need to change or get rid of scheduleLayerFlushNow() since its name
        has become confusing. It suggests that it is going to schedule flushing
        the layer 'now'. But after r244182, it does scheduleRenderingUpdate() first.
        And when it fires, scheduleCompositingLayerFlush() will be called.

        * page/RenderingUpdateScheduler.cpp:
        (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::scheduleLayerFlush):
        (WebCore::RenderLayerCompositor::didChangeVisibleRect):
        (WebCore::RenderLayerCompositor::frameViewDidScroll):
        (WebCore::RenderLayerCompositor::attachRootLayer):
        (WebCore::RenderLayerCompositor::setLayerFlushThrottlingEnabled):
        (WebCore::RenderLayerCompositor::layerFlushTimerFired):
        (WebCore::RenderLayerCompositor::scheduleLayerFlushNow): Deleted.
        * rendering/RenderLayerCompositor.h:

2019-05-01  Darin Adler  <darin@apple.com>

        WebKit has too much of its own UTF-8 code and should rely more on ICU's UTF-8 support
        https://bugs.webkit.org/show_bug.cgi?id=195535

        Reviewed by Alexey Proskuryakov.

        * platform/SharedBuffer.cpp:
        (WebCore::utf8Buffer): Removed unnecessary "strict" argument to convertUTF16ToUTF8 since
        that is the default behavior. Also updated for changes to return values.

        * xml/XSLTProcessorLibxslt.cpp:
        (WebCore::writeToStringBuilder): Removed unnecessary use of StringBuffer for a temporary
        buffer for characters. Rewrote to use U8_NEXT and U16_APPEND directly.

        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::convertUTF16EntityToUTF8): Updated for changes to CompletionResult.

2019-05-01  Shawn Roberts  <sroberts@apple.com>

        Unreviewed, rolling out r244821.

        Causing

        Reverted changeset:

        "WebKit has too much of its own UTF-8 code and should rely
        more on ICU's UTF-8 support"
        https://bugs.webkit.org/show_bug.cgi?id=195535
        https://trac.webkit.org/changeset/244821

2019-05-01  Shawn Roberts  <sroberts@apple.com>

        Unreviewed, rolling out r244822.

        Causing

        Reverted changeset:

        https://trac.webkit.org/changeset/244822

2019-05-01  Youenn Fablet  <youenn@apple.com>

        Reject/throw when calling AudioContext methods on a stopped AudioContext
        https://bugs.webkit.org/show_bug.cgi?id=197391

        Reviewed by Eric Carlson.

        Return InvalidStateError in that case.
        ASSERT that we do not call lazyInitialize after being stopped
        since this would mean we are doing unneeded processing.

        Test: http/wpt/webaudio/audiocontext-stopped.html

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::lazyInitialize):
        (WebCore::AudioContext::createBufferSource):
        (WebCore::AudioContext::createMediaElementSource):
        (WebCore::AudioContext::createMediaStreamSource):
        (WebCore::AudioContext::createMediaStreamDestination):
        (WebCore::AudioContext::createScriptProcessor):
        (WebCore::AudioContext::createBiquadFilter):
        (WebCore::AudioContext::createWaveShaper):
        (WebCore::AudioContext::createPanner):
        (WebCore::AudioContext::createConvolver):
        (WebCore::AudioContext::createDynamicsCompressor):
        (WebCore::AudioContext::createAnalyser):
        (WebCore::AudioContext::createGain):
        (WebCore::AudioContext::createDelay):
        (WebCore::AudioContext::createChannelSplitter):
        (WebCore::AudioContext::createChannelMerger):
        (WebCore::AudioContext::createOscillator):
        (WebCore::AudioContext::createPeriodicWave):
        (WebCore::AudioContext::startRendering):
        (WebCore::AudioContext::suspend):
        (WebCore::AudioContext::resume):
        (WebCore::AudioContext::close):
        * Modules/webaudio/AudioContext.h:
        * Modules/webaudio/AudioContext.idl:

2019-05-01  Eric Carlson  <eric.carlson@apple.com>

        XMLHttpRequest should propagate user gestures for media playback
        https://bugs.webkit.org/show_bug.cgi?id=197428
        <rdar://problem/46677392>

        Reviewed by Jer Noble.

        A user gesture the would allow media state change in effect when XMLHttpRequest.send is 
        called should be active when the event handlers fire after the transaction completes successfully.

        Test: http/tests/media/user-gesture-preserved-across-xmlhttprequest.html

        * dom/UserGestureIndicator.cpp:
        (WebCore::UserGestureIndicator::UserGestureIndicator): Add a 'scope' parameter to potentially
        limit the scope of the gesture to just media.
        (WebCore::UserGestureIndicator::~UserGestureIndicator): Clear the scope.
        * dom/UserGestureIndicator.h:
        (WebCore::UserGestureToken::processingUserGesture const):
        (WebCore::UserGestureToken::setScope):
        (WebCore::UserGestureToken::resetScope):
        (WebCore::UserGestureToken::hasExpired const):

        * page/DOMTimer.cpp:
        (WebCore::DOMTimerFireState::DOMTimerFireState): Don't need to store the nested timer interval,
        UserGestureIndicator knows when it started.
        (WebCore::DOMTimer::DOMTimer): Ditto.
        (WebCore::DOMTimer::fired): Ditto.
        (WebCore::DOMTimerFireState::nestedTimerInterval const): Deleted.
        (WebCore::shouldForwardUserGesture): Deleted.
        (WebCore::userGestureTokenToForward): Deleted.
        (WebCore::currentNestedTimerInterval): Deleted.
        * page/DOMTimer.h:

        * testing/Internals.cpp:
        (WebCore::Internals::setXHRMaximumIntervalForUserGestureForwarding): Override the maximum
        user gesture interval for testing.
        * testing/Internals.h:
        * testing/Internals.idl:

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::XMLHttpRequest): 
        (WebCore::XMLHttpRequest::send): Stash the user gesture token.
        (WebCore::XMLHttpRequest::dispatchEvent): Clear user gesture token if it has expired. If still
        valid, activate it.
        * xml/XMLHttpRequest.h:

2019-04-29  Darin Adler  <darin@apple.com>

        WebKit has too much of its own UTF-8 code and should rely more on ICU's UTF-8 support
        https://bugs.webkit.org/show_bug.cgi?id=195535

        Reviewed by Alexey Proskuryakov.

        * platform/SharedBuffer.cpp:
        (WebCore::utf8Buffer): Removed unnecessary "strict" argument to convertUTF16ToUTF8 since
        that is the default behavior. Also updated for changes to return values.

        * xml/XSLTProcessorLibxslt.cpp:
        (WebCore::writeToStringBuilder): Removed unnecessary use of StringBuffer for a temporary
        buffer for characters. Rewrote to use U8_NEXT and U16_APPEND directly.

        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::convertUTF16EntityToUTF8): Updated for changes to CompletionResult.

2019-04-30  John Wilander  <wilander@apple.com>

        Add logging of Ad Click Attribution errors and events to a dedicated channel
        https://bugs.webkit.org/show_bug.cgi?id=197332
        <rdar://problem/49918800>

        Reviewed by Youenn Fablet.

        This patch adds an experimental Ad Click Attribution debug mode which
        logs information.

        No new tests.

        * loader/AdClickAttribution.cpp:
        (WebCore::AdClickAttribution::parseConversionRequest):
        (WebCore::AdClickAttribution::debugModeEnabled):
        * loader/AdClickAttribution.h:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::adClickAttributionDebugModeEnabled const):
        (WebCore::RuntimeEnabledFeatures::setAdClickAttributionDebugModeEnabled):
        * platform/Logging.h:

2019-04-30  Myles C. Maxfield  <mmaxfield@apple.com>

        font-weight: 1000 is not parsed successfully
        https://bugs.webkit.org/show_bug.cgi?id=197427

        Reviewed by Dean Jackson.

        The spec says:
        "Only values greater than or equal to 1, and less than or equal to 1000, are valid"

        This change brings us in-line with all the other browsers.

        Test: fast/text/font-weight-1-1000.html

        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):

2019-04-30  Youenn Fablet  <youenn@apple.com>

        Make Document audio producers use WeakPtr
        https://bugs.webkit.org/show_bug.cgi?id=197382

        Reviewed by Eric Carlson.

        Move from a hash set of raw pointers to a hash set of weak pointers.
        This helps make the code cleaner.
        No observable change of behavior.

        * Modules/mediastream/MediaStreamTrack.h:
        * dom/Document.cpp:
        (WebCore::Document::addAudioProducer):
        (WebCore::Document::removeAudioProducer):
        (WebCore::Document::updateIsPlayingMedia):
        (WebCore::Document::pageMutedStateDidChange):
        * dom/Document.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
        * html/HTMLMediaElement.h:
        * page/MediaProducer.h:

2019-04-30  Youenn Fablet  <youenn@apple.com>

        [macOS WK1] ASSERTION FAILED: formData in WebCore::ResourceRequest::doUpdateResourceHTTPBody()
        https://bugs.webkit.org/show_bug.cgi?id=196864
        <rdar://problem/49854497>

        Reviewed by Alex Christensen.

        In case of redirection, it is sometimes not possible to retrieve the form data
        from its NSInputStream in case of redirections.
        To handle this case, reuse the first request form data if the new request has a body.
        We also clear the HTTP content type in such a case if the original request has no content type.

        Covered by re-enabled tests.

        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
        (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):

2019-04-30  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r244773.
        https://bugs.webkit.org/show_bug.cgi?id=197436

        Causing assertion failures on debug queues (Requested by
        ShawnRoberts on #webkit).

        Reverted changeset:

        "Make Document audio producers use WeakPtr"
        https://bugs.webkit.org/show_bug.cgi?id=197382
        https://trac.webkit.org/changeset/244773

2019-04-30  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r244774.
        https://bugs.webkit.org/show_bug.cgi?id=197431

        Causing assertion failures on debug queues (Requested by
        ShawnRoberts on #webkit).

        Reverted changeset:

        "Reject/throw when calling AudioContext methods on a stopped
        AudioContext"
        https://bugs.webkit.org/show_bug.cgi?id=197391
        https://trac.webkit.org/changeset/244774

2019-04-30  Alex Christensen  <achristensen@webkit.org>

        Add WKContentRuleList ping resource-type
        https://bugs.webkit.org/show_bug.cgi?id=197325
        <rdar://problem/49841404>

        Reviewed by Geoff Garen.

        Tests: http/tests/contentextensions/block-ping-resource-type-ping.html and http/tests/contentextensions/block-ping-resource-type-raw.html

        * contentextensions/ContentExtensionsBackend.cpp:
        (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
        * contentextensions/ContentExtensionsBackend.h:
        * loader/PingLoader.cpp:
        (WebCore::processContentRuleListsForLoad):
        (WebCore::PingLoader::sendPing):
        * loader/ResourceLoadInfo.cpp:
        (WebCore::ContentExtensions::readResourceType):
        (WebCore::ContentExtensions::ResourceLoadInfo::getResourceFlags const):
        * loader/ResourceLoadInfo.h:
        * page/UserContentProvider.cpp:
        (WebCore::UserContentProvider::processContentRuleListsForLoad):
        * page/UserContentProvider.h:

2019-04-30  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Move 'gpu' API entry point from DOMWindow to Navigator
        https://bugs.webkit.org/show_bug.cgi?id=197348

        Reviewed by Myles C. Maxfield.

        Latest API provides 'gpu' through Navigator instead of DOMWindow. Replace DOMWindowWebGPU with NavigatorGPU.

        Existing tests updated to match. Add test: webgpu-enabled-in-worker.html to ensure workers can access WebGPU.

        * CMakeLists.txt:
        * DerivedSources.make:
        * Modules/webgpu/NavigatorGPU.cpp:
        (WebCore::NavigatorGPU::from):
        (WebCore::NavigatorGPU::supplementName):
        (WebCore::NavigatorGPU::gpu):
        (WebCore::NavigatorGPU::gpu const):
        * Modules/webgpu/NavigatorGPU.h:
        * Modules/webgpu/NavigatorGPU.idl:
        * Modules/webgpu/WorkerNavigatorGPU.cpp:
        (WebCore::WorkerNavigatorGPU::from):
        (WebCore::WorkerNavigatorGPU::supplementName):
        (WebCore::WorkerNavigatorGPU::gpu):
        (WebCore::WorkerNavigatorGPU::gpu const):
        * Modules/webgpu/WorkerNavigatorGPU.h:
        * Modules/webgpu/WorkerNavigatorGPU.idl:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-04-30  Zalan Bujtas  <zalan@apple.com>

        Double-tapping a post to like doesn't work on Instagram.com (needs 'dblclick' event)
        https://bugs.webkit.org/show_bug.cgi?id=197347
        <rdar://problem/49393423>

        Reviewed by Wenson Hsieh.

        Tests: fast/events/touch/ios/double-tap-for-double-click1.html
               fast/events/touch/ios/double-tap-for-double-click2.html

        * page/Frame.h:
        * page/ios/FrameIOS.mm:
        (WebCore::Frame::nodeRespondingToDoubleClickEvent):

2019-04-30  Youenn Fablet  <youenn@apple.com>

        Reject/throw when calling AudioContext methods on a stopped AudioContext
        https://bugs.webkit.org/show_bug.cgi?id=197391

        Reviewed by Eric Carlson.

        Return InvalidStateError in that case.
        ASSERT that we do not call lazyInitialize after being stopped
        since this would mean we are doing unneeded processing.

        Test: http/wpt/webaudio/audiocontext-stopped.html

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::lazyInitialize):
        (WebCore::AudioContext::createBufferSource):
        (WebCore::AudioContext::createMediaElementSource):
        (WebCore::AudioContext::createMediaStreamSource):
        (WebCore::AudioContext::createMediaStreamDestination):
        (WebCore::AudioContext::createScriptProcessor):
        (WebCore::AudioContext::createBiquadFilter):
        (WebCore::AudioContext::createWaveShaper):
        (WebCore::AudioContext::createPanner):
        (WebCore::AudioContext::createConvolver):
        (WebCore::AudioContext::createDynamicsCompressor):
        (WebCore::AudioContext::createAnalyser):
        (WebCore::AudioContext::createGain):
        (WebCore::AudioContext::createDelay):
        (WebCore::AudioContext::createChannelSplitter):
        (WebCore::AudioContext::createChannelMerger):
        (WebCore::AudioContext::createOscillator):
        (WebCore::AudioContext::createPeriodicWave):
        (WebCore::AudioContext::startRendering):
        (WebCore::AudioContext::suspend):
        (WebCore::AudioContext::resume):
        (WebCore::AudioContext::close):
        * Modules/webaudio/AudioContext.h:
        * Modules/webaudio/AudioContext.idl:

2019-04-30  Youenn Fablet  <youenn@apple.com>

        Make Document audio producers use WeakPtr
        https://bugs.webkit.org/show_bug.cgi?id=197382

        Reviewed by Eric Carlson.

        Move from a hash set of raw pointers to a hash set of weak pointers.
        This helps make the code cleaner.
        No observable change of behavior.

        * Modules/mediastream/MediaStreamTrack.h:
        * dom/Document.cpp:
        (WebCore::Document::addAudioProducer):
        (WebCore::Document::removeAudioProducer):
        (WebCore::Document::updateIsPlayingMedia):
        (WebCore::Document::pageMutedStateDidChange):
        * dom/Document.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
        * html/HTMLMediaElement.h:
        * page/MediaProducer.h:

2019-04-30  Antti Koivisto  <antti@apple.com>

        Tighten type of ScrollingTree:rootNode() to ScrollingTreeFrameScrollingNode
        https://bugs.webkit.org/show_bug.cgi?id=197414

        Reviewed by Frédéric Wang.

        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
        (WebCore::ScrollingTree::handleWheelEvent):
        (WebCore::ScrollingTree::mainFrameViewportChangedViaDelegatedScrolling):
        (WebCore::ScrollingTree::updateTreeFromStateNode):
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::rootNode const):

2019-04-30  Youenn Fablet  <youenn@apple.com>

        Refactor AudioContext to register/unregister itself at construction/destruction time
        https://bugs.webkit.org/show_bug.cgi?id=197383

        Reviewed by Eric Carlson.

        Registering/Unregistering is cheap.
        Instead of registering/unregistering in initialize/uninitialize,
        move this code to constructor/destructor.
        No observable change of behavior.

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::AudioContext):
        (WebCore::AudioContext::~AudioContext):
        (WebCore::AudioContext::lazyInitialize):
        (WebCore::AudioContext::uninitialize):
        (WebCore::AudioContext::visibilityStateChanged):

2019-04-30  Michael Catanzaro  <mcatanzaro@igalia.com>

        WebCore::StyleColorScheme should not have explicitly-declared copy constructor
        https://bugs.webkit.org/show_bug.cgi?id=197412

        Reviewed by Don Olmstead.

        Either we need to explicitly declare a copy assignment operator here, or the copy
        constructor needs to be removed. Having one without the other causes a huge warning spam
        with GCC 9. In this case, the copy constructor is redundant because it's identical to an
        implicitly-declared copy constructor, so let's just remove it.

        * rendering/style/StyleColorScheme.h:

2019-04-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Support prefers-color-scheme media query
        https://bugs.webkit.org/show_bug.cgi?id=196685

        Reviewed by Michael Catanzaro.

        Change the gtk-application-prefer-dark-theme setting when tests change the useDarkModeAppearance setting.

        * PlatformGTK.cmake:
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::resetToConsistentState):
        (WebCore::InternalSettings::setUseDarkAppearanceInternal):
        (WebCore::InternalSettings::setUseDarkAppearance):
        * testing/InternalSettings.h:

2019-04-29  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r244755.

        Casued several test failures on iOS

        Reverted changeset:

        "Double-tapping a post to like doesn't work on Instagram.com
        (needs 'dblclick' event)"
        https://bugs.webkit.org/show_bug.cgi?id=197347
        https://trac.webkit.org/changeset/244755

2019-04-29  Alex Christensen  <achristensen@webkit.org>

        <rdar://problem/50299396> Fix internal High Sierra build
        https://bugs.webkit.org/show_bug.cgi?id=197388

        * Configurations/Base.xcconfig:

2019-04-29  Zalan Bujtas  <zalan@apple.com>

        Double-tapping a post to like doesn't work on Instagram.com (needs 'dblclick' event)
        https://bugs.webkit.org/show_bug.cgi?id=197347
        <rdar://problem/49393423>

        Reviewed by Wenson Hsieh.

        Tests: fast/events/touch/ios/double-tap-for-double-click1.html
               fast/events/touch/ios/double-tap-for-double-click2.html

        * page/Frame.h:
        * page/ios/FrameIOS.mm:
        (WebCore::Frame::nodeRespondingToDoubleClickEvent):

2019-04-30  Simon Fraser  <simon.fraser@apple.com>

        Transform is sometimes left in a bad state after an animation
        https://bugs.webkit.org/show_bug.cgi?id=197401
        rdar://problem/48179186

        Reviewed by Dean Jackson.
        
        In some more complex compositing scenarios, at the end of an animation we'd
        fail to push a new transform onto a layer, because updateGeometry() would
        think there's an animation running (which there is, but in the "Ending" state).

        It's simpler in this code to just always push transform and opacity to the layer;
        they will get overridden by the animation while it's running. The current code
        dates from the first landing of the file, and the reason for the if (!isRunningAcceleratedTransformAnimation)
        check is lost in the sands of time.

        I was not able to get a reliable ref or layer tree test for this, because the next compositing update
        fixes it, and WTR seems to trigger one.  But the added test does show the bug
        in Safari, and is a good test to have.

        Test: compositing/animation/transform-after-animation.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateGeometry):

2019-04-29  Youenn Fablet  <youenn@apple.com>

        getDisplayMedia should be called on user gesture
        https://bugs.webkit.org/show_bug.cgi?id=197356

        Reviewed by Eric Carlson.

        Allow getDisplayMedia on user gesture only.
        Otherwise reject the promise.
        Minor refactoring to align getDisplayMedia, getUserMedia and
        enumerateDevices when called with no document.

        Test: fast/mediastream/screencapture-user-gesture.html

        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::getUserMedia const):
        * Modules/mediastream/MediaDevices.h:
        * Modules/mediastream/NavigatorMediaDevices.h:
        * page/DOMWindow.h:
        * testing/Internals.cpp:
        (WebCore::Internals::setDisableGetDisplayMediaUserGestureConstraint):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-04-29  Javier Fernandez  <jfernandez@igalia.com>

        line should not be broken before the first space after a word
        https://bugs.webkit.org/show_bug.cgi?id=197278

        Reviewed by Myles C. Maxfield.

        The 'white-space: break-spaces' only adds breaking opportunities after
        a white space character. However, it's possible to break before the
        first space after a word when the feature is used in combination with
        other properties, like overflow-wrap.

        However, breaking before the first space should not be allowed if
        there are previous opportunities. We wrongly assumed that we had to
        consider these previous breaking opportunities if the proper combination
        of line breaking properties is being used, so that breaking before the
        first space after a word is allowed.

        This wrong assumption caused several issues, like the one described in
        the bug, that lead to incorrectly break before the first space even
        though there are previous opportunities, either white spaces or between
        letters.

        Theses issues have been analyzed [1] by the CSS WG and finally agreed on a
        expected behavior, represented in the Web Platform tests added in this
        patch.

        For the later case, of considering previous opportunities between
        letters, we have a seperated issue #952254, so the tests covering such
        cases will be added to the TestExpecations as Failure entries.

        [1] https://github.com/w3c/csswg-drafts/issues/3701

        Tests: imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013.html

        * rendering/line/BreakingContext.h:
        (WebCore::BreakingContext::handleText):
        (WebCore::BreakingContext::trailingSpacesHang):

2019-04-29  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r238090): animation on https://www.robotodyssey.online gets stuck; site broken
        https://bugs.webkit.org/show_bug.cgi?id=197381

        Reviewed by Zalan Bujtas.

        When -webkit-clip-path changes on a composited layer, we need to trigger a backing geometry update
        to push the changes to GraphicsLayers.

        Test: compositing/style-change/clip-path-change.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::recompositeChangeRequiresGeometryUpdate):

2019-04-29  Chris Dumez  <cdumez@apple.com>

        User-facing strings should use curly quotes instead of straight
        https://bugs.webkit.org/show_bug.cgi?id=197370

        Reviewed by Geoffrey Garen.

        Update localizable strings.

        * en.lproj/Localizable.strings:

2019-04-29  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed fix for non-unified build after r244687.

        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

2019-04-29  Youenn Fablet  <youenn@apple.com>

        RTCTrackEvent should be delayed until the whole remote description is set
        https://bugs.webkit.org/show_bug.cgi?id=196808
        <rdar://problem/49802649>

        Reviewed by Eric Carlson.

        As per https://w3c.github.io/webrtc-pc/#set-description,
        fire events just before resolving the setRemoteDescription promise.
        This ensures that the exposed stream has all necessary tracks from the beginning.
        Pending track events are created in LibWebRTCMediaEndpoint and stored in PeerConnectionBackend.

        Covered by updated test.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
        (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
        (WebCore::PeerConnectionBackend::addPendingTrackEvent):
        (WebCore::PeerConnectionBackend::stop):
        * Modules/mediastream/PeerConnectionBackend.h:
        * Modules/mediastream/RTCPeerConnection.cpp:
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack):
        (WebCore::LibWebRTCMediaEndpoint::addPendingTrackEvent):
        (WebCore::LibWebRTCMediaEndpoint::newTransceiver):
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:

2019-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r244635): [GTK] Wrong background color used in non-dark mode
        https://bugs.webkit.org/show_bug.cgi?id=197276

        Reviewed by Michael Catanzaro.

        Since r244635, we are now getting the frame view background color from the theme. That's correct for dark mode,
        but in non-dark mode we still want to use white backgrounds by default. This made a lot of tests to fail.

        * css/CSSValueKeywords.in: Add -webkit-control-background when HAVE(OS_DARK_MODE_SUPPORT).
        * css/html.css: Use -webkit-control-background instead of -apple-system-control-background.
        * page/FrameView.cpp:
        (WebCore::FrameView::updateBackgroundRecursively): Use CSSValueWindow instead of CSSValueWindowframe.
        * rendering/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::systemColor const): Only get the window background from the theme in dark mode. Handle
        also CSSValueWebkitControlBackground.
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::systemColor const): Handle CSSValueWebkitControlBackground when HAVE(OS_DARK_MODE_SUPPORT).

2019-04-28  Andy Estes  <aestes@apple.com>

        [Apple Pay] Increment the API version from 6 to 7
        https://bugs.webkit.org/show_bug.cgi?id=197041
        <rdar://problem/49986625>

        Reviewed by Geoffrey Garen.

        * Modules/applepay/PaymentCoordinatorClient.cpp:
        (WebCore::PaymentCoordinatorClient::supportsVersion):

2019-04-28  Andy Estes  <aestes@apple.com>

        Fix the watchOS engineering build.

        * Modules/webgpu/WebGPUComputePassEncoder.cpp: Included Logging.h.

2019-04-28  Youenn Fablet  <youenn@apple.com>

        Remove no longer needed mDNS ICE candidate resolution code
        https://bugs.webkit.org/show_bug.cgi?id=197315

        Reviewed by Eric Carlson.

        No change of behavior.
        Removed code is no longer exercised as mDNS resolution happens inside libwebrtc
        using the same resolution mechanism as for TURN/STUN server names.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
        (WebCore::PeerConnectionBackend::addIceCandidateFailed):
        * Modules/mediastream/PeerConnectionBackend.h:

2019-04-27  Simon Fraser  <simon.fraser@apple.com>

        Move some Compositing logging to the Layers log channel
        https://bugs.webkit.org/show_bug.cgi?id=197345

        Reviewed by Sam Weinig.

        Make Compositing logging a bit less verbose by moving the GraphicsLayer tree dump
        to the Layers log channel. Also log GraphicsLayers after flushing, when we'll have
        accurate visible rects. 

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::updateCoverage):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::layersLogEnabled):
        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
        (WebCore::RenderLayerCompositor::updateCompositingLayers):

2019-04-27  Megan Gardner  <megan_gardner@apple.com>

        Lookup only looking up the first word in selection
        https://bugs.webkit.org/show_bug.cgi?id=197341
        <rdar://problem/48221414>

        Reviewed by Wenson Hsieh.

        Lookup is not testable.

        Reveal needs the full range in order to correctly create the item for the popover.

        * editing/cocoa/DictionaryLookup.mm:
        (WebCore::showPopupOrCreateAnimationController):

2019-04-26  Jer Noble  <jer.noble@apple.com>

        Reduce the number of copies made during SourceBufferPrivateAVFObjC::append() using SharedBuffer
        https://bugs.webkit.org/show_bug.cgi?id=197335
        <rdar://problem/49175604>

        Rubber-stamped by Alex Christensen.

        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (WebCore::SourceBufferPrivateAVFObjC::append):

2019-04-26  Jessie Berlin  <jberlin@webkit.org>

        Add new mac target numbers
        https://bugs.webkit.org/show_bug.cgi?id=197313

        Reviewed by Alex Christensen.

        * Configurations/Version.xcconfig:
        * Configurations/WebKitTargetConditionals.xcconfig:

2019-04-26  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r244708.
        https://bugs.webkit.org/show_bug.cgi?id=197334

        "Broke the debug build" (Requested by rmorisset on #webkit).

        Reverted changeset:

        "All prototypes should call didBecomePrototype()"
        https://bugs.webkit.org/show_bug.cgi?id=196315
        https://trac.webkit.org/changeset/244708

2019-04-26  Robin Morisset  <rmorisset@apple.com>

        All prototypes should call didBecomePrototype()
        https://bugs.webkit.org/show_bug.cgi?id=196315

        Reviewed by Saam Barati.

        It was found by existing tests, with the new assert in JSC::Structure

        * bindings/js/JSWindowProxy.cpp:
        (WebCore::JSWindowProxy::setWindow):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GeneratePrototypeDeclaration):
        (GenerateConstructorHelperMethods):

2019-04-26  Eric Carlson  <eric.carlson@apple.com>

        Create AVFoundationSoftLink.{h,mm} to reduce duplicate code
        https://bugs.webkit.org/show_bug.cgi?id=197171
        <rdar://problem/47454979>

        Reviewed by Youenn Fablet.

        Tests: TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm

        * Modules/plugins/QuickTimePluginReplacement.mm:
        (WebCore::jsValueWithValueInContext):
        (WebCore::jsValueWithAVMetadataItemInContext):
        * WebCore.xcodeproj/project.pbxproj:
        * platform/audio/ios/AudioSessionIOS.mm:
        (WebCore::AudioSession::setCategory):
        (WebCore::AudioSession::category const):
        (WebCore::AudioSession::routeSharingPolicy const):
        (WebCore::AudioSession::routingContextUID const):
        (WebCore::AudioSession::sampleRate const):
        (WebCore::AudioSession::bufferSize const):
        (WebCore::AudioSession::numberOfOutputChannels const):
        (WebCore::AudioSession::tryToSetActiveInternal):
        (WebCore::AudioSession::preferredBufferSize const):
        (WebCore::AudioSession::setPreferredBufferSize):
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (-[WebMediaSessionHelper initWithCallback:]):
        (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
        * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
        (WebCore::AVTrackPrivateAVFObjCImpl::audioKind const):
        (WebCore::AVTrackPrivateAVFObjCImpl::videoKind const):
        (WebCore::AVTrackPrivateAVFObjCImpl::label const):
        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
        (WebCore::AudioSourceProviderAVFObjC::createMix):
        * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
        * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
        (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
        * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
        (WebCore::AVFoundationMIMETypeCache::canDecodeType):
        (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistableState):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistentKeys):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsMediaCapability):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):
        * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
        (WebCore::CDMSessionAVContentKeySession::isAvailable):
        (WebCore::CDMSessionAVContentKeySession::releaseKeys):
        (WebCore::CDMSessionAVContentKeySession::update):
        (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
        (WebCore::CDMSessionAVContentKeySession::contentKeySession):
        * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
        * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
        (WebCore::CDMSessionAVStreamSession::releaseKeys):
        (WebCore::CDMSessionAVStreamSession::update):
        (WebCore::CDMSessionAVStreamSession::setStreamSession):
        (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
        (WebCore::imageDecoderAssetOptions):
        (WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
        (WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
        (WebCore::ImageDecoderAVFObjC::readSamples):
        (SOFT_LINK_CONSTANT_MAY_FAIL): Deleted.
        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
        (WebCore::InbandTextTrackPrivateAVFObjC::label const):
        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
        (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label const):
        * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
        (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::assetCacheForPath):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
        (WebCore::determineChangedTracksFromNewTracksAndOldItems):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
        (WebCore::exernalDeviceDisplayNameForPlayer):
        (WebCore::metadataType):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
        (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
        (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
        (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
        (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
        (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
        (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
        (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
        (WebCore::PlatformCALayerCocoa::clone const):
        (WebCore::PlatformCALayerCocoa::avPlayerLayer const):
        * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
        (WebCore::validateHEVCParameters):
        * platform/ios/PlatformSpeechSynthesizerIOS.mm:
        (getAVSpeechUtteranceDefaultSpeechRate):
        (getAVSpeechUtteranceMaximumSpeechRate):
        (-[WebSpeechSynthesisWrapper speakUtterance:]):
        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
        (SOFT_LINK_CONSTANT): Deleted.
        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerLayer init]):
        (-[WebAVPlayerLayer layoutSublayers]):
        (-[WebAVPlayerLayer setVideoGravity:]):
        (-[WebAVPlayerLayer videoRect]):
        (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
        * platform/mac/SerializedPlatformRepresentationMac.mm:
        (WebCore::jsValueWithValueInContext):
        (WebCore::jsValueWithAVMetadataItemInContext):
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (WebCore::getAVFormatIDKeyWithFallback):
        (WebCore::getAVNumberOfChannelsKeyWithFallback):
        (WebCore::getAVSampleRateKeyWithFallback):
        (WebCore::getAVEncoderBitRateKeyWithFallback):
        (WebCore::MediaRecorderPrivateWriter::create):
        (WebCore::MediaRecorderPrivateWriter::setVideoInput):
        (WebCore::MediaRecorderPrivateWriter::setAudioInput):
        * platform/mediastream/RealtimeVideoSource.h:
        * platform/mediastream/VideoPreset.h:
        * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
        (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):
        * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
        (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
        (-[WebCoreAudioCaptureSourceIOSListener handleInterruption:]):
        * platform/mediastream/mac/AVCaptureDeviceManager.mm:
        (WebCore::deviceIsAvailable):
        (WebCore::AVCaptureDeviceManager::updateCachedAVCaptureDevices):
        (WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
        (WebCore::AVCaptureDeviceManager::isAvailable):
        (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager):
        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoPreset::create):
        (WebCore::AVVideoPreset::AVVideoPreset):
        (WebCore::AVVideoCaptureSource::create):
        (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
        (WebCore::AVVideoCaptureSource::capabilities):
        (WebCore::sensorOrientationFromVideoOutput):
        (WebCore::AVVideoCaptureSource::setupSession):
        (WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
        (WebCore::AVVideoCaptureSource::setupCaptureSession):
        (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
        (WebCore::AVVideoCaptureSource::generatePresets):
        (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
        (-[WebCoreAVVideoCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]):

2019-04-26  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r244683.
        https://bugs.webkit.org/show_bug.cgi?id=197320

        Causing crash on iOS Simulator and EWS failures (Requested by
        sroberts on #webkit).

        Reverted changeset:

        "[iOS] Add internal setting to force -webkit-text-size-adjust
        to "auto""
        https://bugs.webkit.org/show_bug.cgi?id=197275
        https://trac.webkit.org/changeset/244683

2019-04-26  Youenn Fablet  <youenn@apple.com>

        Use normal loading path for ping loads
        https://bugs.webkit.org/show_bug.cgi?id=196807

        Reviewed by Alex Christensen.

        Make use of regular code path for ping loads and beacon.
        This is done conditionally on KeepAlive flag.
        The benefits are a single loading code path and service worker interception.

        For that purpose, introduce a LoaderStrategy switch based on KeepAlive runtime flag.
        This switch is used to use ping loads when keepAlive is set or regular loads.
        In case of regular loads, the keepAlive flag should be used to extend the lifetime of the load.

        Migrate ping loads to use CachedResourceLoader instead of PingLoad.
        For that purpose, introduce a new Ping CachedResource type.

        Covered by existing tests.

        * Modules/beacon/NavigatorBeacon.cpp:
        (WebCore::NavigatorBeacon::sendBeacon):
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::inspectorResourceType):
        * loader/LinkLoader.cpp:
        (WebCore::createLinkPreloadResourceClient):
        * loader/LoaderStrategy.h:
        * loader/PingLoader.cpp:
        (WebCore::PingLoader::loadImage):
        (WebCore::PingLoader::sendPing):
        (WebCore::PingLoader::sendViolationReport):
        (WebCore::PingLoader::startPingLoad):
        * loader/PingLoader.h:
        * loader/ResourceLoadInfo.cpp:
        (WebCore::toResourceType):
        * loader/SubresourceLoader.cpp:
        (WebCore::logResourceLoaded):
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::defaultPriorityForResourceType):
        (WebCore::CachedResource::load):
        (WebCore::CachedResource::cancelLoad):
        * loader/cache/CachedResource.h:
        (WebCore::CachedResource::shouldUsePingLoad):
        (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::createResource):
        (WebCore::CachedResourceLoader::requestPingResource):
        (WebCore::contentTypeFromResourceType):
        (WebCore::CachedResourceLoader::checkInsecureContent const):
        (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
        (WebCore::CachedResourceLoader::canRequest):
        (WebCore::isResourceSuitableForDirectReuse):
        (WebCore::destinationForType):
        * loader/cache/CachedResourceLoader.h:

2019-04-26  Alex Christensen  <achristensen@webkit.org>

        Fix Windows build after r244695
       ​https://bugs.webkit.org/show_bug.cgi?id=197165

        * loader/PingLoader.cpp:

2019-04-26  Alex Christensen  <achristensen@webkit.org>

        Fix internal High Sierra build after r244653
        https://bugs.webkit.org/show_bug.cgi?id=197131

        * DerivedSources.make:
        -std=gnu++17 didn't exist yet.  -std=gnu++1z did.

2019-04-26  Alex Christensen  <achristensen@webkit.org>

        Add ENABLE(CONTENT_EXTENSIONS) and namespace ContentExtensions to ResourceLoadInfo.h
        https://bugs.webkit.org/show_bug.cgi?id=197165

        Reviewed by Youenn Fablet.

        No change in behavior.  This will just make it harder for people working on the loader to mistake
        these ContentExtension specific structures for other structures general to loading.
        One such mistake was made in r244248.

        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::connect):
        * contentextensions/ContentExtensionsBackend.h:
        * css/StyleSheetContents.cpp:
        (WebCore::StyleSheetContents::subresourcesAllowReuse const):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::loadResource):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadResourceSynchronously):
        * loader/NetscapePlugInStreamLoader.cpp:
        (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
        * loader/PingLoader.cpp:
        (WebCore::processContentRuleListsForLoad):
        (WebCore::PingLoader::loadImage):
        (WebCore::PingLoader::sendPing):
        (WebCore::PingLoader::sendViolationReport):
        * loader/ResourceLoadInfo.cpp:
        (WebCore::toResourceType): Deleted.
        (WebCore::readResourceType): Deleted.
        (WebCore::readLoadType): Deleted.
        (WebCore::ResourceLoadInfo::isThirdParty const): Deleted.
        (WebCore::ResourceLoadInfo::getResourceFlags const): Deleted.
        * loader/ResourceLoadInfo.h:
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::willSendRequestInternal):
        * loader/ResourceLoader.h:
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::SubresourceLoader):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::open):
        * page/UserContentProvider.cpp:
        (WebCore::UserContentProvider::processContentRuleListsForLoad):
        (WebCore::UserContentProvider::actionsForResourceLoad):
        * page/UserContentProvider.h:

2019-04-26  Alex Christensen  <achristensen@webkit.org>

        Fix an internal High Sierra build after r244653
       ​https://bugs.webkit.org/show_bug.cgi?id=197131

        * DerivedSources.make:
        Apparently we can't use gnu++17 when preprocessing Platform.h in the makefile.

2019-04-26  Chris Fleizach  <cfleizach@apple.com>

        AX: Provide iOS method for setting focus
        https://bugs.webkit.org/show_bug.cgi?id=197200
        <rdar://problem/50131679>

        Reviewed by Alex Christensen.

        Put the focus setting code in a place that iOS and macOS can access.
        Override a platform level method for setting focus on iOS.

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper _accessibilitySetFocus:]):
        * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (-[WebAccessibilityObjectWrapperBase baseAccessibilitySetFocus:]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):

2019-04-26  Said Abou-Hallawa  <sabouhallawa@apple.com>

        propertyRegistry() was not overridden for SVGFEFloodElement and SVGFEMergeElement
        https://bugs.webkit.org/show_bug.cgi?id=197303

        Reviewed by Alex Christensen.

        Therefore SVGElement::propertyRegistry() was called instead. This means
        these two elements will not have access to the properties of the base
        class SVGFilterPrimitiveStandardAttributes.

        Tests: svg/dom/SVGFEFloodElement-filter-standard-attributes.svg

        * svg/SVGElement.cpp:
        (WebCore::SVGElement::commitPropertyChange):
        * svg/SVGFEFloodElement.h:
        * svg/SVGFEMergeElement.h:

2019-04-26  Youenn Fablet  <youenn@apple.com>

        [Mac WK2 iOS Sim] Layout Test imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=196633
        <rdar://problem/49627667>

        Reviewed by Alex Christensen.

        Use formula defined in https://w3c.github.io/webrtc-stats/#dom-rtcrtpcontributingsourcestats-audiolevel
        to compute the audio level from the RTP header information.
        Covered by rebased test.

        * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
        (WebCore::fillRTCRtpContributingSource):

2019-04-26  Sihui Liu  <sihui_liu@apple.com>

        Stop IDB transactions to release locked database files when network process is ready to suspend
        https://bugs.webkit.org/show_bug.cgi?id=196372
        <rdar://problem/48930116>

        Reviewed by Brady Eidson.

        Suspend IDB database thread and finish ongoing IDB transactions on the main thread before suspending network 
        process.

        API test: IndexedDB.IndexedDBSuspendImminently

        * Modules/indexeddb/server/IDBBackingStore.h:
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::tryStop):
        (WebCore::IDBServer::IDBServer::resume):
        * Modules/indexeddb/server/IDBServer.h:
        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: Remove some error log messages, because now we may try
        performing database operations without an active transaction if the transaction is finished on the main thread.
        (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
        (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
        (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
        (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
        (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
        (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
        (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
        (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
        (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
        (WebCore::IDBServer::SQLiteIDBBackingStore::hasTransaction const):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::prepareToFinishTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransactionAfterQuotaCheck):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::abortTransactionOnMainThread):
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransactionOnMainThread):
        (WebCore::IDBServer::UniqueIDBDatabase::finishActiveTransactions):
        * Modules/indexeddb/server/UniqueIDBDatabase.h:
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::setState):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::state const):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::setResult):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::result const):
        * platform/sql/SQLiteDatabaseTracker.cpp:
        (WebCore::SQLiteDatabaseTracker::hasTransactionInProgress):
        * platform/sql/SQLiteDatabaseTracker.h:

2019-04-26  Takashi Komori  <Takashi.Komori@sony.com>

        [Curl] Fix Curl Request Scheduler not to release wrong Curl handle when request is cancelled.
        https://bugs.webkit.org/show_bug.cgi?id=191650

        Reviewed by Fujii Hironori.

        Test: http/tests/misc/repeat-open-cancel.html

        * platform/network/curl/CurlRequest.cpp:
        (WebCore::CurlRequest::cancel):
        (WebCore::CurlRequest::isCancelled):
        (WebCore::CurlRequest::isCompletedOrCancelled):
        (WebCore::CurlRequest::didCompleteTransfer):
        (WebCore::CurlRequest::completeDidReceiveResponse):
        (WebCore::CurlRequest::pausedStatusChanged):
        * platform/network/curl/CurlRequest.h:
        (WebCore::CurlRequest::isCompleted const): Deleted.
        (WebCore::CurlRequest::isCancelled const): Deleted.
        (WebCore::CurlRequest::isCompletedOrCancelled const): Deleted.
        * platform/network/curl/CurlRequestScheduler.cpp:
        (WebCore::CurlRequestScheduler::cancel):
        (WebCore::CurlRequestScheduler::callOnWorkerThread):
        (WebCore::CurlRequestScheduler::startThreadIfNeeded):
        (WebCore::CurlRequestScheduler::stopThreadIfNoMoreJobRunning):
        (WebCore::CurlRequestScheduler::stopThread):
        (WebCore::CurlRequestScheduler::executeTasks):
        (WebCore::CurlRequestScheduler::workerThread):
        (WebCore::CurlRequestScheduler::startTransfer):
        (WebCore::CurlRequestScheduler::completeTransfer):
        (WebCore::CurlRequestScheduler::cancelTransfer):
        (WebCore::CurlRequestScheduler::finalizeTransfer):
        * platform/network/curl/CurlRequestScheduler.h:

2019-04-25  Myles C. Maxfield  <mmaxfield@apple.com>

        [iOS] Add internal setting to force -webkit-text-size-adjust to "auto"
        https://bugs.webkit.org/show_bug.cgi?id=197275
        <rdar://problem/50211019>

        Reviewed by Simon Fraser.

        This setting makes it easier to investigate the autosizing work we've been doing
        in https://bugs.webkit.org/show_bug.cgi?id=197250.

        * page/Settings.yaml:
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::adjustComputedFontSizes):
        * rendering/TextAutoSizing.cpp:
        (WebCore::TextAutoSizingValue::adjustTextNodeSizes):

2019-04-25  Myles C. Maxfield  <mmaxfield@apple.com>

        [iOS] Implement idempotent mode for text autosizing
        https://bugs.webkit.org/show_bug.cgi?id=197250
        <rdar://problem/50211034>

        Reviewed by Jon Lee.

        Our text autosizing code has this interesting behavior where it is sensitive to the width of the text's container
        and the number of lines of text inside the element. Not only is it sensitive to those things, but as those things
        change, their values are stored inside the RenderObject itself and then never recomputed. This means that the text
        autosizing parameters are sensitive to the entire history of an element. So, a newly created element with the same
        style as an existing element can have dramatically different results.

        This patch adds a new mode for text autosizing, which isn't sensitive to either of those things, and therefore
        maintains the invariant that a newly created element will behave the same as an existing element with the same style.
        Instead of using container size, it instead uses the viewport's initial scale. As the viewport's initial scale
        changes, new layouts will be triggered, which will cause the autosizing code to use the new value.

        Tests: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-identity.html
               fast/text-autosizing/ios/idempotentmode/idempotent-autosizing.html

        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::applyTextSizingIfNeeded):
        * page/Page.cpp:
        (WebCore::Page::setInitialScale): WebKit will push the initial scale down into the page.
        * page/Page.h:
        (WebCore::Page::initialScale const):
        * page/SettingsBase.h:
        * page/cocoa/SettingsBaseCocoa.mm:
        (WebCore::SettingsBase::textAutosizingUsesIdempotentMode):
        (WebCore::SettingsBase::defaultTextAutosizingEnabled):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::idempotentTextSize): Describe a piecewise-linear curve for the text size to follow. The curve scales
        depending on the viewport's initial scale.
        (WebCore::RenderBlockFlow::adjustComputedFontSizes):
        * rendering/RenderBlockFlow.h:
        * rendering/RenderElement.cpp:
        (WebCore::includeNonFixedHeight): This new mode should consider max-height as well as height when determining if
        content overflows.
        (WebCore::RenderElement::adjustComputedFontSizesOnBlocks):
        (WebCore::RenderElement::resetTextAutosizing):
        * rendering/RenderElement.h:
        * rendering/RenderObject.h:

2019-04-25  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r234330): 3 legacy-animation-engine/compositing tests are flaky failures
        https://bugs.webkit.org/show_bug.cgi?id=188357
        <rdar://problem/42986633>

        Reviewed by Dean Jackson.

        DumpRenderTree had no code that set page.setCompositingPolicyOverride() to Normal, so some
        tests would fall into low memory mode and have different behavior.
        
        Fix by moving the code that calls setCompositingPolicyOverride(Normal) from the WK2 layer
        to Internals, so it's shared by DRT and WTR.
        
        We no longer need the WK2 C SPI glue.

        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):

2019-04-25  Sihui Liu  <sihui_liu@apple.com>

        [ iOS Sim ] REGRESSION (r242986) Layout Test storage/indexeddb/modern/idbtransaction-objectstore-failures-private.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=196357
        <rdar://problem/49386836>

        Reviewed by Geoffrey Garen.

        Dispatch IDBRequest event to IDBTransaction if event of IDBTransaction has not been dispatched.

        Covered by existing tests.

        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::dispatchEvent):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::dispatchEvent):
        * Modules/indexeddb/IDBTransaction.h:

2019-04-25  Chris Dumez  <cdumez@apple.com>

        ASSERT(scriptExecutionContext()) in Performance::resourceTimingBufferFullTimerFired()
        https://bugs.webkit.org/show_bug.cgi?id=197300
        <rdar://problem/49965990>

        Reviewed by Youenn Fablet.

        We crash because the scriptExecutionContext has been destroyed by the time the m_resourceTimingBufferFullTimer
        timer fires. However, r241598 already makes sure that we stop the timer when the script execution context
        is destroyed. This makes me think that somebody restarts the timer *after* the script execution context has
        been destroyed. The thing is that we only start the timer in Performance::addResourceTiming() and there are
        only 2 call sites for this method. Both call sites get the Performance object from the Window object, which
        they get from the Document object. As a result, I would believe that the Window's document is alive, even
        though the Performance object's scriptExecutionContext is not. This could indicate that the Performance
        object's scriptExecutionContext gets out of sync with its Window's document. I have found one place where
        it could happen in theory (DOMWindow::didSecureTransitionTo()). I have not been able to write a test
        confirming my theory though so this is a speculative fix. I have also added a few assertions to help us
        track down the issue if my speculative fix turns out to be ineffective.

        No new tests, we do not know how to reproduce.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::didSecureTransitionTo):
        This is a speculative fix for the crash. When a DOMWindow transitions from one document to
        another, reset its data members which store the DOMWindow's document to make sure that they
        do not get out of sync.

        (WebCore::DOMWindow::crypto const):
        (WebCore::DOMWindow::navigator):
        (WebCore::DOMWindow::performance const):
        Add assertions to make sure that the member's scriptExecutionContext is in sync with
        the window's.

        * page/Performance.cpp:
        (WebCore::Performance::addResourceTiming):
        Add assertion to make sure that the scriptExecutionContext() is non-null when calling this
        as this may start the m_resourceTimingBufferFullTimer timer. If my speculative fix above
        does not work, we should hit this and this should tell us which call site is causing this.

2019-04-25  Timothy Hatcher  <timothy@apple.com>

        Disable ContentChangeObserver on iOSMac.
        https://bugs.webkit.org/show_bug.cgi?id=197292
        rdar://problem/49039957

        Reviewed by Zalan Bujtas.

        We don’t need to run any of ContentChangeObserver, because we have hover events on iOSMac.
        Disabling it skips the synthetic mouse move events and speeds up clicks.

        * page/SettingsBase.cpp:
        (WebCore::SettingsBase::defaultContentChangeObserverEnabled): Return false for PLATFORM(IOSMAC).

2019-04-25  Timothy Hatcher  <timothy@apple.com>

        Disable date and time inputs on iOSMac.
        https://bugs.webkit.org/show_bug.cgi?id=197287
        rdar://problem/46794376

        Reviewed by Wenson Hsieh.

        * Configurations/FeatureDefines.xcconfig:
        * platform/text/mac/LocaleMac.h:
        * platform/text/mac/LocaleMac.mm:
        (WebCore::LocaleMac::formatDateTime):

2019-04-25  Alex Christensen  <achristensen@webkit.org>

        Fix more Windows builds after r244653
        https://bugs.webkit.org/show_bug.cgi?id=197131

        * svg/properties/SVGAnimatedPropertyList.h:
        * svg/properties/SVGProperty.h:
        * svg/properties/SVGPropertyList.h:

2019-04-25  Alex Christensen  <achristensen@webkit.org>

        Fix more builds after r244653
        https://bugs.webkit.org/show_bug.cgi?id=197131

        * svg/properties/SVGValuePropertyList.h:
        Something is preventing MSVC from seeing protected constructors from subclasses.

2019-04-25  Per Arne Vollan  <pvollan@apple.com>

        -[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:] never returns _WKWebsiteDataTypeCredentials
        https://bugs.webkit.org/show_bug.cgi?id=196991
        <rdar://problem/45507423>

        Reviewed by Alex Christensen.

        Add method to get all origins with persistent credentials from credential storage.

        API tests: WKWebsiteDataStore.FetchNonPersistentCredentials
                   WKWebsiteDataStore.FetchPersistentCredentials

        * platform/network/CredentialStorage.h:
        * platform/network/mac/CredentialStorageMac.mm:
        (WebCore::CredentialStorage::originsWithPersistentCredentials):

2019-04-25  Alex Christensen  <achristensen@webkit.org>

        Fix MSVC build after r244653
        https://bugs.webkit.org/show_bug.cgi?id=197131

        * svg/properties/SVGValueProperty.h:
        MSVC doesn't think it can access these protected constructors from subclasses.
        Make the build work and investigate this later.

2019-04-25  Alex Christensen  <achristensen@webkit.org>

        Start using C++17
        https://bugs.webkit.org/show_bug.cgi?id=197131

        Reviewed by Darin Adler.

        * Configurations/Base.xcconfig:
        * DerivedSources.make:

2019-04-25  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r244627.
        https://bugs.webkit.org/show_bug.cgi?id=197282

        Causing internal build failures (Requested by ShawnRoberts on
        #webkit).

        Reverted changeset:

        "Create AVFoundationSoftLink.{h,mm} to reduce duplicate code"
        https://bugs.webkit.org/show_bug.cgi?id=197171
        https://trac.webkit.org/changeset/244627

2019-04-25  Antti Koivisto  <antti@apple.com>

        redefinition of enumerator 'NSAttachmentCharacter' with Apple internal build
        https://bugs.webkit.org/show_bug.cgi?id=197279

        Reviewed by Antoine Quint.

        Try to fix the build.

        * platform/mac/WebNSAttributedStringExtras.mm:

2019-04-25  Antti Koivisto  <antti@apple.com>

        Visited link hash should be computed only once
        https://bugs.webkit.org/show_bug.cgi?id=197229
        <rdar://problem/48438924>

        Reviewed by Alex Christensen.

        Test: fast/history/visited-href-mutation.html

        Visited link style is now based on the first target URL of the link element. Further href mutations don't affect styling.

        * dom/Document.cpp:
        (WebCore::Document::updateBaseURL):
        * dom/VisitedLinkState.cpp:
        (WebCore::linkAttribute):
        (WebCore::linkHashForElement):

        Visited link support is now limited to HTML and SVG <a> elements.

        (WebCore::VisitedLinkState::invalidateStyleForLink):
        (WebCore::VisitedLinkState::determineLinkStateSlowCase):
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::HTMLAnchorElement):
        (WebCore::HTMLAnchorElement::parseAttribute):
        * html/HTMLAnchorElement.h:
        (WebCore::HTMLAnchorElement::visitedLinkHash const):
        (WebCore::HTMLAnchorElement::invalidateCachedVisitedLinkHash): Deleted.
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::visitedLinkHash const):
        * svg/SVGAElement.h:

2019-04-25  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed in WebCore::MediaPlayerPrivateGStreamer::paused
        https://bugs.webkit.org/show_bug.cgi?id=196691

        Reviewed by Eric Carlson.

        For gif assets, fail media loading early and notify the
        MediaPlayer by setting both network and ready states, so that the
        MediaPlayer will try with with the next media engine or pass the
        error to HTMLMediaElement if there are none.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::loadFull):
        (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

2019-04-25  Philippe Normand  <pnormand@igalia.com>

        [REGRESSION(r243197)][GStreamer] http/tests/media/clearkey/collect-webkit-media-session.html hits an ASSERT
        https://bugs.webkit.org/show_bug.cgi?id=197230

        Reviewed by Xabier Rodriguez-Calvar.

        Perform the resource loader disposal and destruction from the main
        thread. Also ensure there's no circular reference between the
        CachedResourceStreamingClient and WebKitWebSrc when disposing of
        the private WebKitWebSrc storage.

        * platform/graphics/gstreamer/MainThreadNotifier.h:
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (_WebKitWebSrcPrivate::~_WebKitWebSrcPrivate):
        (webkit_web_src_class_init):
        (webKitWebSrcDispose):
        (webKitWebSrcCloseSession):
        (webKitWebSrcFinalize): Deleted.

2019-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Hardcoded text color in input fields
        https://bugs.webkit.org/show_bug.cgi?id=126907

        Reviewed by Michael Catanzaro.

        Enable HAVE_OS_DARK_MODE_SUPPORT for GTK port to ensure that dark mode is used when Page::useDarkAppearance()
        returns true. This patch reverts r232913, I'll reopen the bug, I think we need to find a better solution for
        that.

        * CMakeLists.txt: Add HAVE_OS_DARK_MODE_SUPPORT to FEATURE_DEFINES_WITH_SPACE_SEPARATOR if enabled.
        * css/CSSDefaultStyleSheets.cpp: Ensure html{color:text} is used in simple style sheet when
        HAVE_OS_DARK_MODE_SUPPORT is enabled.
        * page/FrameView.cpp:
        (WebCore::FrameView::updateBackgroundRecursively): Use CSSValueWindowframe to get the frame view background
        color when HAVE_OS_DARK_MODE_SUPPORT is enabled for non-mac ports.
        * platform/gtk/RenderThemeWidget.cpp:
        (WebCore::RenderThemeWidget::getOrCreate): Create window widget.
        (WebCore::RenderThemeWindow::RenderThemeWindow): Add window widget.
        * platform/gtk/RenderThemeWidget.h:
        * rendering/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::disabledTextColor const): Always use the color from the theme for consistency with
        other form controls.
        (WebCore::RenderThemeGtk::systemColor const): Get the color from the theme for CSSValueText, CSSValueGraytext
        and CSSValueWindowframe.
        * rendering/RenderThemeGtk.h:

2019-04-24  Zalan Bujtas  <zalan@apple.com>

        Regression (r244291): Broken API Test AutoLayoutRenderingProgressRelativeOrdering
        https://bugs.webkit.org/show_bug.cgi?id=196948
        <rdar://problem/49927131>

        Reviewed by Tim Horton.

        Covered by existing tests.

        * loader/EmptyClients.h:
        * page/ChromeClient.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::autoSizeIfEnabled):
        (WebCore::FrameView::enableAutoSizeMode):
        * page/FrameView.h:

2019-04-24  Youenn Fablet  <youenn@apple.com>

        Do not restart WebRTC stats timer if backend is stopped
        https://bugs.webkit.org/show_bug.cgi?id=197257
        <rdar://problem/50095879>

        Reviewed by Eric Carlson.

        We used to stop and reschedule the stat gathering timer in case the
        gathering delay is changing. Timer should not be rescheduled if the backend is stopped.

        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):

2019-04-24  Andres Gonzalez  <andresg_22@apple.com>

        Flaky crash under WebCore::AXObjectCache::stopCachingComputedObjectAttributes()
        https://bugs.webkit.org/show_bug.cgi?id=187391
        <rdar://problem/40681396

        Check for null value returned by AccessibilityObject::axObjectCache.

        Reviewed by Chris Fleizach.

        No need for new test since existing tests caught this problem.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::firstChild const):
        (WebCore::AccessibilityNodeObject::lastChild const):
        (WebCore::AccessibilityNodeObject::previousSibling const):
        (WebCore::AccessibilityNodeObject::nextSibling const):
        (WebCore::AccessibilityNodeObject::addChildren):
        (WebCore::AccessibilityNodeObject::anchorElement const):
        (WebCore::AccessibilityNodeObject::changeValueByStep):
        (WebCore::AccessibilityNodeObject::changeValueByPercent):
        (WebCore::AccessibilityNodeObject::textForLabelElement const):
        (WebCore::AccessibilityNodeObject::titleElementText const):
        (WebCore::AccessibilityNodeObject::alternativeText const):
        (WebCore::AccessibilityNodeObject::ariaLabeledByText const):
        (WebCore::AccessibilityNodeObject::helpText const):

2019-04-24  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r242132): Nested position:sticky elements move incorrectly
        https://bugs.webkit.org/show_bug.cgi?id=197255
        rdar://problem/50137744

        Reviewed by Zalan Bujtas.
        
        Revert to the behavior of the code before r242132, where we looked at the direct parent
        scrolling tree node instead of walking up the ancestor chain to find an enclosing scrolling node.
        This fixes nested sticky behavior.

        Test: scrollingcoordinator/mac/nested-sticky.html

        * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
        (WebCore::ScrollingTreeStickyNode::applyLayerPositions):

2019-04-24  Eric Carlson  <eric.carlson@apple.com>

        Create AVFoundationSoftLink.{h,mm} to reduce duplicate code
        https://bugs.webkit.org/show_bug.cgi?id=197171
        <rdar://problem/47454979>

        Reviewed by Youenn Fablet.

        Tests: TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm

        * Modules/plugins/QuickTimePluginReplacement.mm:
        (WebCore::jsValueWithValueInContext):
        (WebCore::jsValueWithAVMetadataItemInContext):
        * WebCore.xcodeproj/project.pbxproj:
        * platform/audio/ios/AudioSessionIOS.mm:
        (WebCore::AudioSession::setCategory):
        (WebCore::AudioSession::category const):
        (WebCore::AudioSession::routeSharingPolicy const):
        (WebCore::AudioSession::routingContextUID const):
        (WebCore::AudioSession::sampleRate const):
        (WebCore::AudioSession::bufferSize const):
        (WebCore::AudioSession::numberOfOutputChannels const):
        (WebCore::AudioSession::tryToSetActiveInternal):
        (WebCore::AudioSession::preferredBufferSize const):
        (WebCore::AudioSession::setPreferredBufferSize):
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (-[WebMediaSessionHelper initWithCallback:]):
        (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
        * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
        (WebCore::AVTrackPrivateAVFObjCImpl::audioKind const):
        (WebCore::AVTrackPrivateAVFObjCImpl::videoKind const):
        (WebCore::AVTrackPrivateAVFObjCImpl::label const):
        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
        (WebCore::AudioSourceProviderAVFObjC::createMix):
        * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
        * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
        (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
        * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
        (WebCore::AVFoundationMIMETypeCache::canDecodeType):
        (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistableState):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistentKeys):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsMediaCapability):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):
        * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
        (WebCore::CDMSessionAVContentKeySession::isAvailable):
        (WebCore::CDMSessionAVContentKeySession::releaseKeys):
        (WebCore::CDMSessionAVContentKeySession::update):
        (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
        (WebCore::CDMSessionAVContentKeySession::contentKeySession):
        * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
        * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
        (WebCore::CDMSessionAVStreamSession::releaseKeys):
        (WebCore::CDMSessionAVStreamSession::update):
        (WebCore::CDMSessionAVStreamSession::setStreamSession):
        (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
        (WebCore::imageDecoderAssetOptions):
        (WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
        (WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
        (WebCore::ImageDecoderAVFObjC::readSamples):
        (SOFT_LINK_CONSTANT_MAY_FAIL): Deleted.
        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
        (WebCore::InbandTextTrackPrivateAVFObjC::label const):
        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
        (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label const):
        * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
        (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::assetCacheForPath):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
        (WebCore::determineChangedTracksFromNewTracksAndOldItems):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
        (WebCore::exernalDeviceDisplayNameForPlayer):
        (WebCore::metadataType):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
        (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
        (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
        (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
        (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
        (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
        (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
        (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
        (WebCore::PlatformCALayerCocoa::clone const):
        (WebCore::PlatformCALayerCocoa::avPlayerLayer const):
        * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
        (WebCore::validateHEVCParameters):
        * platform/ios/PlatformSpeechSynthesizerIOS.mm:
        (getAVSpeechUtteranceDefaultSpeechRate):
        (getAVSpeechUtteranceMaximumSpeechRate):
        (-[WebSpeechSynthesisWrapper speakUtterance:]):
        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
        (SOFT_LINK_CONSTANT): Deleted.
        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerLayer init]):
        (-[WebAVPlayerLayer layoutSublayers]):
        (-[WebAVPlayerLayer setVideoGravity:]):
        (-[WebAVPlayerLayer videoRect]):
        (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
        * platform/mac/SerializedPlatformRepresentationMac.mm:
        (WebCore::jsValueWithValueInContext):
        (WebCore::jsValueWithAVMetadataItemInContext):
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (WebCore::getAVFormatIDKeyWithFallback):
        (WebCore::getAVNumberOfChannelsKeyWithFallback):
        (WebCore::getAVSampleRateKeyWithFallback):
        (WebCore::getAVEncoderBitRateKeyWithFallback):
        (WebCore::MediaRecorderPrivateWriter::create):
        (WebCore::MediaRecorderPrivateWriter::setVideoInput):
        (WebCore::MediaRecorderPrivateWriter::setAudioInput):
        * platform/mediastream/RealtimeVideoSource.h:
        * platform/mediastream/VideoPreset.h:
        * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
        (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):
        * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
        (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
        (-[WebCoreAudioCaptureSourceIOSListener handleInterruption:]):
        * platform/mediastream/mac/AVCaptureDeviceManager.mm:
        (WebCore::deviceIsAvailable):
        (WebCore::AVCaptureDeviceManager::updateCachedAVCaptureDevices):
        (WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
        (WebCore::AVCaptureDeviceManager::isAvailable):
        (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager):
        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoPreset::create):
        (WebCore::AVVideoPreset::AVVideoPreset):
        (WebCore::AVVideoCaptureSource::create):
        (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
        (WebCore::AVVideoCaptureSource::capabilities):
        (WebCore::sensorOrientationFromVideoOutput):
        (WebCore::AVVideoCaptureSource::setupSession):
        (WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
        (WebCore::AVVideoCaptureSource::setupCaptureSession):
        (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
        (WebCore::AVVideoCaptureSource::generatePresets):
        (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
        (-[WebCoreAVVideoCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]):

2019-04-24  Brady Eidson  <beidson@apple.com>

        XMLHTTPRequest POSTs to a custom WKURLSchemeHandler protocol are missing the HTTP body.
        https://bugs.webkit.org/show_bug.cgi?id=191362

        Reviewed by Alex Christensen.

        Covered by new API tests.

        In 2008 some refactoring added an HTTP(S)-only restriction to copying the form body for
        XHRs that POST, and it added that restriction with no explanation.

        We definitely want to allow that.

        Blobs are broken at this time (covered by bug 197237)

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::send):
        (WebCore::XMLHttpRequest::sendBytesData):

2019-04-24  John Wilander  <wilander@apple.com>

        Age out unconverted Ad Click Attributions after one week.
        https://bugs.webkit.org/show_bug.cgi?id=197238
        <rdar://problem/50177349>

        Reviewed by Chris Dumez.

        This patch adds the two functions AdClickAttribution::markAsExpired()
        and AdClickAttribution::hasExpired() which make use of the existing
        m_timeOfAdClick member.

        Test: http/tests/adClickAttribution/expired-attributions-removed.html

        * loader/AdClickAttribution.cpp:
        (WebCore::AdClickAttribution::markAsExpired):
        (WebCore::AdClickAttribution::hasExpired const):
        * loader/AdClickAttribution.h:

2019-04-24  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (iOS 12.2): CSS perspective property value can only be set correctly once
        https://bugs.webkit.org/show_bug.cgi?id=197105
        rdar://problem/50068230

        Reviewed by Zalan Bujtas.

        Make sure we trigger a geometry update when style properties change that
        result in a StyleDifference::RecompositeLayer, and which are updated on layers
        via RenderLayerBacking::updateGeometry().

        Tests: compositing/style-change/backface-visibility-change.html
               compositing/style-change/perspective-change.html
               compositing/style-change/perspective-origin-change.html
               compositing/style-change/transform-origin-change.html
               compositing/style-change/transform-style-change.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::recompositeChangeRequiresGeometryUpdate):
        (WebCore::RenderLayerCompositor::layerStyleChanged):

2019-04-24  Simon Fraser  <simon.fraser@apple.com>

        Make it possible to control the renderTreeAsText output by setting options on testRunner
        https://bugs.webkit.org/show_bug.cgi?id=197133

        Reviewed by Sam Weinig.

        Add testRunner.setRenderTreeDumpOptions() and expose the subset of RenderAsTextFlag flags
        that make sense in testing (those that don't dump unstable data like addresses), and plumb
        these flags through the various framework layers.

        Convert RenderAsTextBehavior to an OptionSet<RenderAsTextFlag>.

        Fix code generation in WebKitTestRunner to generate bindings for IDL const values,
        and hand-code DumpRenderTree bindings.

        Some cleanup of the TestRunners, using member initializers.

        Test: fast/harness/render-tree-as-text-options.html

        * rendering/RenderLayer.cpp:
        (WebCore::showLayerTree):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::RenderTreeAsText::writeRenderObject):
        (WebCore::writeDebugInfo):
        (WebCore::write):
        (WebCore::writeLayer):
        (WebCore::writeLayerRenderers):
        (WebCore::writeLayers):
        (WebCore::externalRepresentation):
        * rendering/RenderTreeAsText.h:
        (WebCore::externalRepresentation):
        (WebCore::write):
        (WebCore::writeDebugInfo):
        (): Deleted.
        * rendering/svg/SVGRenderTreeAsText.cpp:
        (WebCore::writePositionAndStyle):
        (WebCore::writeStandardPrefix):
        (WebCore::writeChildren):
        (WebCore::writeSVGResourceContainer):
        (WebCore::writeSVGContainer):
        (WebCore::write):
        (WebCore::writeSVGText):
        (WebCore::writeSVGInlineText):
        (WebCore::writeSVGImage):
        (WebCore::writeSVGGradientStop):
        (WebCore::writeResources):
        * rendering/svg/SVGRenderTreeAsText.h:

2019-04-24  Antoine Quint  <graouts@apple.com>

        [iOS] Calling preventDefault() when handling a pointerdown event should not prevent panning, zooming or click event dispatch
        https://bugs.webkit.org/show_bug.cgi?id=195839
        <rdar://problem/48946154>

        Reviewed by Brent Fulgham.

        Tests: pointerevents/ios/pointer-events-prevent-default-allows-click-event.html
               pointerevents/ios/pointer-events-prevent-default-allows-scrolling.html

        The Pointer Events specification defines that the default action of any and all pointer events MUST NOT
        be a manipulation of the viewport (e.g. panning or zooming). In practice, this means that calling
        preventDefault() while handling a Pointer Event has no effect on the inner workings of the user agent,
        so we change the method signature of PointerCaptureController::dispatchEventForTouchAtIndex() to return
        void since we don't need to know whether preventDefault() was called.

        https://www.w3.org/TR/pointerevents/#declaring-candidate-regions-for-default-touch-behaviors

        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
        * page/PointerCaptureController.h:

2019-04-24  Frederic Wang  <fwang@igalia.com>

        With async scrolling enabled, this MathML test asserts
        https://bugs.webkit.org/show_bug.cgi?id=196123

        This patch ensures that updateScrollInfoAfterLayout() is called during MathML layout. This
        fixes assertions when async scrolling is enabled and MathML elements have non-visible overflow.

        Reviewed by Rob Buis.

        Test: mathml/mathml-overflow-crash.html

        * rendering/mathml/RenderMathMLBlock.cpp:
        (WebCore::RenderMathMLBlock::layoutBlock):
        (WebCore::RenderMathMLBlock::layoutInvalidMarkup):
        * rendering/mathml/RenderMathMLFraction.cpp:
        (WebCore::RenderMathMLFraction::layoutBlock):
        * rendering/mathml/RenderMathMLMath.cpp:
        (WebCore::RenderMathMLMath::layoutBlock):
        * rendering/mathml/RenderMathMLMenclose.cpp:
        (WebCore::RenderMathMLMenclose::layoutBlock):
        * rendering/mathml/RenderMathMLOperator.cpp:
        (WebCore::RenderMathMLOperator::layoutBlock):
        * rendering/mathml/RenderMathMLPadded.cpp:
        (WebCore::RenderMathMLPadded::layoutBlock):
        * rendering/mathml/RenderMathMLRoot.cpp:
        (WebCore::RenderMathMLRoot::layoutBlock):
        * rendering/mathml/RenderMathMLRow.cpp:
        (WebCore::RenderMathMLRow::layoutBlock):
        * rendering/mathml/RenderMathMLScripts.cpp:
        (WebCore::RenderMathMLScripts::layoutBlock):
        * rendering/mathml/RenderMathMLSpace.cpp:
        (WebCore::RenderMathMLSpace::layoutBlock):
        * rendering/mathml/RenderMathMLToken.cpp:
        (WebCore::RenderMathMLToken::layoutBlock):
        * rendering/mathml/RenderMathMLUnderOver.cpp:
        (WebCore::RenderMathMLUnderOver::layoutBlock):

2019-04-24  Greg V  <greg@unrelenting.technology>

        Fix -Wc++11-narrowing on unsigned char platforms like FreeBSD/aarch64
        https://bugs.webkit.org/show_bug.cgi?id=197148

        Reviewed by Alex Christensen.

        * contentextensions/DFACombiner.cpp:
        * contentextensions/NFAToDFA.cpp:

2019-04-24  Chris Dumez  <cdumez@apple.com>

        X-Frame-Options header should be ignored when frame-ancestors CSP directive is present
        https://bugs.webkit.org/show_bug.cgi?id=197226
        <rdar://problem/50155649>

        Reviewed by Alex Christensen.

        X-Frame-Options header should be ignored when frame-ancestors CSP directive is present:
        - https://www.w3.org/TR/CSP3/#frame-ancestors-and-frame-options

        Specification says:
        """
        In order to allow backwards-compatible deployment, the frame-ancestors directive _obsoletes_ the
        X-Frame-Options header. If a resource is delivered with an policy that includes a directive named
        frame-ancestors and whose disposition is "enforce", then the X-Frame-Options header MUST be ignored.
        """

        Gecko and Blink follow the specification, WebKit does not. As a result, page [1] is broken with
        WebKit-only on Schwab.com. The page height is wrong and you cannot see all the ETFs as a result.

        [1] https://www.schwab.com/public/schwab/investing/investment_help/investment_research/etf_research/etfs.html?&path=/Prospect/Research/etfs/overview/oneSourceETFs.asp

        Test: http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-overrides-X-Frames-Options.html

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::responseReceived):
        * page/csp/ContentSecurityPolicy.cpp:
        (WebCore::ContentSecurityPolicy::overridesXFrameOptions const):
        * page/csp/ContentSecurityPolicy.h:
        * page/csp/ContentSecurityPolicyDirectiveList.h:
        (WebCore::ContentSecurityPolicyDirectiveList::hasFrameAncestorsDirective const):

2019-04-24  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Do not use the global _WKContentChange in WebKitLegacy
        https://bugs.webkit.org/show_bug.cgi?id=196286
        <rdar://problem/49364417>

        Reviewed by Simon Fraser.

        By reporting WKContentIndeterminateChange in sendMouseMoveEvent enables us to remove the global _WKContentChange state.
        Using _WKContentChange is fine as long as only the observed frame reports content change during the synthetic click event.
        In case of multiple frames, we should really consult the local state instead.
        Unfortunately sendMouseMoveEvent has no access to the observed Document object so we can't really identify the observed content change.
        WKContentIndeterminateChange triggers asynchronous decision making at the callsite and in the callback we have access
        to the active Document/ContentChangeObverver object and can report the correct state.
        This is inline with current WebKit(WK2) behaviour.

        Manually tested with a WebKitLegacy test app.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * page/ios/ContentChangeObserver.h:
        (WebCore::ContentChangeObserver::setHasNoChangeState):
        (WebCore::ContentChangeObserver::setHasIndeterminateState):
        (WebCore::ContentChangeObserver::setHasVisibleChangeState):
        (WebCore::ContentChangeObserver::setObservedContentState): Deleted.
        * page/ios/EventHandlerIOS.mm:
        (WebCore::EventHandler::mouseMoved):
        * platform/ios/wak/WAKWindow.mm:
        (-[WAKWindow sendMouseMoveEvent:contentChange:]):
        * platform/ios/wak/WKContentObservation.cpp: Removed.
        * platform/ios/wak/WKContentObservation.h:

2019-04-24  Philippe Normand  <pnormand@igalia.com>

        [GTK][GStreamer] Flaky ASSERTION FAILED: m_lock.isHeld() in TextureMapperPlatformLayerProxy
        https://bugs.webkit.org/show_bug.cgi?id=196739

        Reviewed by Xabier Rodriguez-Calvar.

        The crash was triggered because m_videoDecoderPlatform not being
        explicitely set, its value would be inferred as one of the enum
        class values. Making it Optional avoids this issue.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

2019-04-24  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Crash in AudioTrackPrivate with playbin3 enabled
        https://bugs.webkit.org/show_bug.cgi?id=196913

        Reviewed by Xabier Rodriguez-Calvar.

        The crash was due to a playbin3 code path being triggered during
        MSE playback, which is not supposed to work in playbin3 anyway.
        The problem is that setting the USE_PLAYBIN3 environment variable
        to "1" makes the GStreamer playback plugin register the playbin3
        element under the playbin name. So that leads to playbin3 being
        used everywhere in WebKit where we assume the playbin element is
        used. So the proposed solution is to:

        - use a WebKit-specific environment variable instead of the
        GStreamer USE_PLAYBIN3 variable.
        - emit a warning if the USE_PLAYBIN3 environment variable is
        detected. We can't unset it ourselves for security reasons.

        The patch also includes a code cleanup of the player method
        handling the pipeline creation. The previous code had a bug
        leading to playbin3 being used for MSE.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

2019-04-24  chris fleizach  <cfleizach@apple.com>

        AX: Remove deprecated Accessibility Object Model events
        https://bugs.webkit.org/show_bug.cgi?id=197073
        <rdar://problem/50027819>

        Reviewed by Ryosuke Niwa.

        Test: accessibility/mac/replace-text-with-range.html

        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * accessibility/AccessibilityListBoxOption.cpp:
        (WebCore::AccessibilityListBoxOption::setSelected):
        * accessibility/AccessibilityMediaObject.cpp:
        (WebCore::AccessibilityMediaObject::increment):
        (WebCore::AccessibilityMediaObject::decrement):
        * accessibility/AccessibilityMenuListOption.cpp:
        (WebCore::AccessibilityMenuListOption::setSelected):
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::increment):
        (WebCore::AccessibilityNodeObject::decrement):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::press):
        (WebCore::AccessibilityObject::replaceTextInRange):
        (WebCore::AccessibilityObject::scrollToMakeVisible const):
        (WebCore::AccessibilityObject::shouldDispatchAccessibilityEvent const): Deleted.
        (WebCore::AccessibilityObject::dispatchAccessibilityEvent const): Deleted.
        (WebCore::AccessibilityObject::dispatchAccessibilityEventWithType const): Deleted.
        (WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent const): Deleted.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::setFocused):
        (WebCore::AccessibilityRenderObject::setValue):
        * accessibility/AccessibilityScrollbar.cpp:
        (WebCore::AccessibilityScrollbar::setValue):
        * accessibility/AccessibilitySlider.cpp:
        (WebCore::AccessibilitySlider::setValue):
        * accessibility/ios/AccessibilityObjectIOS.mm:
        (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const):
        (WebCore::AccessibilityObject::hasAccessibleDismissEventListener const): Deleted.
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityPerformEscape]): Deleted.
        (-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]): Deleted.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
        * dom/Element.idl:
        * dom/EventNames.h:
        * dom/EventNames.in:
        * html/HTMLAttributeNames.in:
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::createEventHandlerNameMap):
        * page/Settings.yaml:
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setAccessibilityEventsEnabled): Deleted.
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:

2019-04-23  Andy Estes  <aestes@apple.com>

        [iOS] QuickLook documents loaded from file: URLs should be allowed to perform same-document navigations
        https://bugs.webkit.org/show_bug.cgi?id=196749
        <rdar://problem/35773454>

        Reviewed by Daniel Bates.

        QuickLook previews are in a non-local origin defined by a unique x-apple-ql-id: URL, which
        isolates the origin that hosted the document from the document preview itself. When a
        QuickLook document is loaded as a file: URL, SecurityOrigin's protections against loading
        local resources from non-local origins prevented navigations like location.reload() and
        fragment navigations.

        To allow reloads and same-document navigations in QuickLook documents loaded from file: URLs,
        we should grant the QuickLook document's SecurityOrigin access to the file path that loaded
        the preview.

        Added a new API test.

        * dom/Document.cpp:
        (WebCore::Document::applyQuickLookSandbox):
        * page/SecurityOrigin.cpp:
        (WebCore::SecurityOrigin::createNonLocalWithAllowedFilePath):
        (WebCore::SecurityOrigin::canDisplay const):
        * page/SecurityOrigin.h:

2019-04-23  Devin Rousso  <drousso@apple.com>

        Web Inspector: Debugger: remove ASSERT_NOT_REACHED where it's possible to reach
        https://bugs.webkit.org/show_bug.cgi?id=197210
        <rdar://problem/48462912>

        Reviewed by Joseph Pecoraro.

        * inspector/agents/page/PageDebuggerAgent.cpp:
        (WebCore::PageDebuggerAgent::didAddEventListener):
        (WebCore::PageDebuggerAgent::didPostMessage):

        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::consoleAgentEnabled):
        (WebCore::InspectorInstrumentation::timelineAgentEnabled):
        Drive-by: add additional `FAST_RETURN_IF_NO_FRONTENDS`.

2019-04-23  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r244556.
        https://bugs.webkit.org/show_bug.cgi?id=197212

        Causing build failures on multiple builders (Requested by
        ShawnRoberts on #webkit).

        Reverted changeset:

        "Create AVFoundationSoftLink.{h,mm} to reduce duplicate code"
        https://bugs.webkit.org/show_bug.cgi?id=197171
        https://trac.webkit.org/changeset/244556

2019-04-23  Devin Rousso  <drousso@apple.com>

        Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.ownerDocument.frameIdentifier')
        https://bugs.webkit.org/show_bug.cgi?id=196420
        <rdar://problem/49444205>

        Reviewed by Timothy Hatcher.

        Modify the existing `frameId` to represent the owner frame of the node, rather than the
        frame it holds (in the case of an `<iframe>`).

        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::buildObjectForNode):

2019-04-23  Devin Rousso  <drousso@apple.com>

        ContentSecurityPolicy::logToConsole should include line/column number and source location
        https://bugs.webkit.org/show_bug.cgi?id=114317
        <rdar://problem/13614617>

        Reviewed by Timothy Hatcher.

        No change in functionality.

        * page/csp/ContentSecurityPolicy.h:
        * page/csp/ContentSecurityPolicy.cpp:
        (WebCore::ContentSecurityPolicy::reportViolation const):
        (WebCore::ContentSecurityPolicy::logToConsole const):

2019-04-23  Devin Rousso  <drousso@apple.com>

        Web Inspector: Canvas: support recording TypedOMCSSImageValue
        https://bugs.webkit.org/show_bug.cgi?id=192609

        Reviewed by Timothy Hatcher.

        * inspector/InspectorCanvas.h:
        * inspector/InspectorCanvas.cpp:
        (WebCore::InspectorCanvas::indexForData):
        (WebCore::InspectorCanvas::buildAction):

2019-04-23  Andres Gonzalez  <andresg_22@apple.com>

        Accessibility text search and selection API enhancements.
        https://bugs.webkit.org/show_bug.cgi?id=197095
        <rdar://problem/48181791>

        Reviewed by Chris Fleizach.

        - Split the existing SelectTextWithCriteria API into two: search text API (SearchTextWithCriteria) and a text operation API (TextOperation: select, replace, capitalize...).
        - This allows for more flexibility and extensibility.
        - Added the ability to retrieve text markers for multiple search hits.
        - Various code clean up and consolidation.
        - Added LayoutTest for search API.
        - Previous API is marked with "To be deprecated", and is implemented with new implementation. May be removed in a future change.

        Test: accessibility/mac/search-text/search-text.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::rangeClosestToRange):
        (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection const):
        (WebCore::AccessibilityObject::findTextRange const):
        (WebCore::AccessibilityObject::findTextRanges const):
        (WebCore::AccessibilityObject::performTextOperation):
        (WebCore::AccessibilityObject::frame const):
        (WebCore::AccessibilityObject::selectText): Deleted.
        * accessibility/AccessibilityObject.h:
        (WebCore::AccessibilitySearchTextCriteria::AccessibilitySearchTextCriteria):
        (WebCore::AccessibilityTextOperation::AccessibilityTextOperation):
        (WebCore::AccessibilitySelectTextCriteria::AccessibilitySelectTextCriteria): Deleted.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (accessibilityTextCriteriaForParameterizedAttribute):
        (accessibilitySearchTextCriteriaForParameterizedAttribute):
        (accessibilityTextOperationForParameterizedAttribute):
        (-[WebAccessibilityObjectWrapper IGNORE_WARNINGS_END]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
        (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute): Deleted.

2019-04-23  Guy Lewin  <guy@lewin.co.il>

        Multiple File Input Icon Set Regardless of File List
        https://bugs.webkit.org/show_bug.cgi?id=195537

        Reviewed by Alexey Proskuryakov.

        File input elements display icon with an empty file list after
        resetting the file list in 'change' event handler - on iOS

        Test: fast/forms/file/file-reset-in-change-using-open-panel-with-icon.html

        * html/FileInputType.cpp:
        (WebCore::FileInputType::filesChosen):

2019-04-23  Eric Carlson  <eric.carlson@apple.com>

        Create AVFoundationSoftLink.{h,mm} to reduce duplicate code
        https://bugs.webkit.org/show_bug.cgi?id=197171
        <rdar://problem/47454979>

        Reviewed by Youenn Fablet.

        Tests: TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm

        * Modules/plugins/QuickTimePluginReplacement.mm:
        (WebCore::jsValueWithValueInContext):
        (WebCore::jsValueWithAVMetadataItemInContext):
        * WebCore.xcodeproj/project.pbxproj:
        * platform/audio/ios/AudioSessionIOS.mm:
        (WebCore::AudioSession::setCategory):
        (WebCore::AudioSession::category const):
        (WebCore::AudioSession::routeSharingPolicy const):
        (WebCore::AudioSession::routingContextUID const):
        (WebCore::AudioSession::sampleRate const):
        (WebCore::AudioSession::bufferSize const):
        (WebCore::AudioSession::numberOfOutputChannels const):
        (WebCore::AudioSession::tryToSetActiveInternal):
        (WebCore::AudioSession::preferredBufferSize const):
        (WebCore::AudioSession::setPreferredBufferSize):
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (-[WebMediaSessionHelper initWithCallback:]):
        (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
        * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
        (WebCore::AVTrackPrivateAVFObjCImpl::audioKind const):
        (WebCore::AVTrackPrivateAVFObjCImpl::videoKind const):
        (WebCore::AVTrackPrivateAVFObjCImpl::label const):
        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
        (WebCore::AudioSourceProviderAVFObjC::createMix):
        * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
        * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
        (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
        * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
        (WebCore::AVFoundationMIMETypeCache::canDecodeType):
        (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistableState):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistentKeys):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsMediaCapability):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):
        * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
        (WebCore::CDMSessionAVContentKeySession::isAvailable):
        (WebCore::CDMSessionAVContentKeySession::releaseKeys):
        (WebCore::CDMSessionAVContentKeySession::update):
        (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
        (WebCore::CDMSessionAVContentKeySession::contentKeySession):
        * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
        * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
        (WebCore::CDMSessionAVStreamSession::releaseKeys):
        (WebCore::CDMSessionAVStreamSession::update):
        (WebCore::CDMSessionAVStreamSession::setStreamSession):
        (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
        (WebCore::imageDecoderAssetOptions):
        (WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
        (WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
        (WebCore::ImageDecoderAVFObjC::readSamples):
        (SOFT_LINK_CONSTANT_MAY_FAIL): Deleted.
        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
        (WebCore::InbandTextTrackPrivateAVFObjC::label const):
        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
        (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label const):
        * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
        (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::assetCacheForPath):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
        (WebCore::determineChangedTracksFromNewTracksAndOldItems):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
        (WebCore::exernalDeviceDisplayNameForPlayer):
        (WebCore::metadataType):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
        (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
        (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
        (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
        (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
        (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
        (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
        (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
        (WebCore::PlatformCALayerCocoa::clone const):
        (WebCore::PlatformCALayerCocoa::avPlayerLayer const):
        * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
        (WebCore::validateHEVCParameters):
        * platform/ios/PlatformSpeechSynthesizerIOS.mm:
        (getAVSpeechUtteranceDefaultSpeechRate):
        (getAVSpeechUtteranceMaximumSpeechRate):
        (-[WebSpeechSynthesisWrapper speakUtterance:]):
        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
        (SOFT_LINK_CONSTANT): Deleted.
        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerLayer init]):
        (-[WebAVPlayerLayer layoutSublayers]):
        (-[WebAVPlayerLayer setVideoGravity:]):
        (-[WebAVPlayerLayer videoRect]):
        (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
        * platform/mac/SerializedPlatformRepresentationMac.mm:
        (WebCore::jsValueWithValueInContext):
        (WebCore::jsValueWithAVMetadataItemInContext):
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (WebCore::getAVFormatIDKeyWithFallback):
        (WebCore::getAVNumberOfChannelsKeyWithFallback):
        (WebCore::getAVSampleRateKeyWithFallback):
        (WebCore::getAVEncoderBitRateKeyWithFallback):
        (WebCore::MediaRecorderPrivateWriter::create):
        (WebCore::MediaRecorderPrivateWriter::setVideoInput):
        (WebCore::MediaRecorderPrivateWriter::setAudioInput):
        * platform/mediastream/RealtimeVideoSource.h:
        * platform/mediastream/VideoPreset.h:
        * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
        (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):
        * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
        (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
        (-[WebCoreAudioCaptureSourceIOSListener handleInterruption:]):
        * platform/mediastream/mac/AVCaptureDeviceManager.mm:
        (WebCore::deviceIsAvailable):
        (WebCore::AVCaptureDeviceManager::updateCachedAVCaptureDevices):
        (WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
        (WebCore::AVCaptureDeviceManager::isAvailable):
        (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager):
        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoPreset::create):
        (WebCore::AVVideoPreset::AVVideoPreset):
        (WebCore::AVVideoCaptureSource::create):
        (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
        (WebCore::AVVideoCaptureSource::capabilities):
        (WebCore::sensorOrientationFromVideoOutput):
        (WebCore::AVVideoCaptureSource::setupSession):
        (WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
        (WebCore::AVVideoCaptureSource::setupCaptureSession):
        (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
        (WebCore::AVVideoCaptureSource::generatePresets):
        (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
        (-[WebCoreAVVideoCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]):

2019-04-23  Timothy Hatcher  <timothy@apple.com>

        Speed up RenderTheme::systemColor on Speedometer2.
        https://bugs.webkit.org/show_bug.cgi?id=197203
        rdar://problem/50056756

        Reviewed by Tim Horton.

        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::systemColor const): Remove some unused code. And fetch the cache after an early return.
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::systemColor const): Avoid some allocations in LocalDefaultSystemAppearance
        when a CSS color is in the system color cache.

2019-04-23  Ryosuke Niwa  <rniwa@webkit.org>

        [iOS] element.focus() sometimes fails to reveal the focused element when it becomes editable dynamically
        https://bugs.webkit.org/show_bug.cgi?id=197188

        Reviewed by Wenson Hsieh.

        The bug was caused by the scroll-to-reveal code triggered by Element::updateFocusAppearance updating
        the scroll position via scrolling tree update in a layer tree commit which happens after
        _zoomToRevealFocusedElement in WKContentView had already scrolled the frame view.

        To fix this problem, we need to defer the editor state update until the layer commit (see r244494),
        and update the scrolling tree before invoking WebPageProxy::editorStateChanged which brings up
        the keyboard and scroll-to-reveal the caret in the UI process side.

        We also avoid revealing the focus for the second time via Document::scheduleScrollToFocusedElement
        in Element::updateFocusAppearance as this timer based scrolling also happens after we had already
        revealed the caret in _zoomToRevealFocusedElement. This is a bit hacky but works for most cases since
        we wouldn't bring up a keyboard if the focused element was not editable anyway.

        Test: editing/selection/ios/scrolling-to-focused-element-inside-iframe.html

        * dom/Element.cpp:
        (WebCore::Element::updateFocusAppearance): Avoid scheduling a timer based reavel of the focused element
        when we're already revealing the element via selection change.

2019-04-23  Remy Demarest  <rdemarest@apple.com>

        Fix layout issues occuring when entering full screen mode.
        https://bugs.webkit.org/show_bug.cgi?id=197086
        <rdar://problem/47733671>.

        Reviewed by Darin Adler.

        This issue is the result of changing the style mask of the window after entering
        full screen mode. Safari adds an invisible toolbar to display the URL of the page
        which ends up breaking the layout. Having that window use a style that includes a
        titlebar fixes the bug.

        * platform/mac/WebCoreFullScreenWindow.mm:
        (-[WebCoreFullScreenWindow constrainFrameRect:toScreen:]): Ensure that the window
        can fill the entire screen including the underlapping the menu bar, so that the
        window does not resize when the animation is done.
        (-[WebCoreFullScreenWindow canBecomeMainWindow]): Borderless windows cannot become
        main by default, adding the titlebar allows it to become main, prevent this from
        happening at all to preserve the existing behavior.

2019-04-23  Chris Dumez  <cdumez@apple.com>

        [Process-Swap-On-Navigation] WebKit hangs when going back to a form submission's page due to Process-Swap-On-Navigation on iOS 12.2 and higher
        https://bugs.webkit.org/show_bug.cgi?id=197097
        <rdar://problem/50048318>

        Reviewed by Alex Christensen.

        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
        If we still have a provisional item (new load has been started or we did not clear it because we're about to retry),
        then let the client know the load will continue by passing an extra flag with the didFailProvisionalLoad.

        * loader/FrameLoaderClient.h:
        * loader/FrameLoaderTypes.h:

2019-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        [ATK] Implement AtkComponentIface scroll_to methods
        https://bugs.webkit.org/show_bug.cgi?id=196856

        Reviewed by Michael Catanzaro.

        Implement scroll_to and scroll_to_point when ATK >= 2.30.

        Fixes: accessibility/scroll-to-global-point-iframe-nested.html
               accessibility/scroll-to-global-point-iframe.html
               accessibility/scroll-to-global-point-main-window.html
               accessibility/scroll-to-global-point-nested.html
               accessibility/scroll-to-make-visible-div-overflow.html
               accessibility/scroll-to-make-visible-iframe.html
               accessibility/scroll-to-make-visible-nested-2.html
               accessibility/scroll-to-make-visible-nested.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::scrollToMakeVisible const): Add new method receiving the
        ScrollRectToVisibleOptions since ATK interface has a parameter to decide how to scroll.
        * accessibility/AccessibilityObject.h:
        * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
        (atkToContents):
        (webkitAccessibleComponentRefAccessibleAtPoint):
        (webkitAccessibleComponentGetExtents):
        (webkitAccessibleComponentGrabFocus):
        (webkitAccessibleComponentScrollTo):
        (webkitAccessibleComponentScrollToPoint):
        (webkitAccessibleComponentInterfaceInit):
        (core): Deleted.

2019-04-22  Youenn Fablet  <youenn@apple.com>

        Update libwebrtc logging when WebCore WebRTC logging is updated
        https://bugs.webkit.org/show_bug.cgi?id=197166
        <rdar://problem/50107696>

        Unreviewed.

        Build fix after https://trac.webkit.org/changeset/244511.

        * page/Page.cpp:
        (WebCore::Page::configureLoggingChannel):

2019-04-22  Youenn Fablet  <youenn@apple.com>

        Cache API should return Abort error in case of putting an aborted fetch
        https://bugs.webkit.org/show_bug.cgi?id=196757

        Reviewed by Darin Adler.

        In case of an aborted fetch, call consume callback with an AbortError.
        Update the code that handles load cancelling as the loader callback is called.
        Covered by rebased tests.

        * Modules/fetch/FetchResponse.cpp:
        (WebCore::FetchResponse::addAbortSteps):
        (WebCore::FetchResponse::BodyLoader::didFail):
        (WebCore::FetchResponse::BodyLoader::BodyLoader):
        (WebCore::FetchResponse::BodyLoader::~BodyLoader):
        (WebCore::FetchResponse::stop):
        * Modules/fetch/FetchResponse.h:

2019-04-22  Youenn Fablet  <youenn@apple.com>

        Update libwebrtc logging when WebCore WebRTC logging is updated
        https://bugs.webkit.org/show_bug.cgi?id=197166

        Reviewed by Eric Carlson.

        When updating WebRTC logging from Web Inspector, update libwebrtc logging so that no page reload is required.
        Manually tested.

        * page/Page.cpp:
        (WebCore::Page::configureLoggingChannel):

2019-04-22  Simon Fraser  <simon.fraser@apple.com>

        Introduce the concept of "opportunistic" stacking contexts
        https://bugs.webkit.org/show_bug.cgi?id=197077

        Reviewed by Zalan Bujtas.

        Bring back a variant of some code removed in r236424, which allows a RenderLayer
        to be stacking context for painting, without actually being on in terms of CSS.
        
        Internally, RenderLayer will call setIsOpportunisticStackingContext() to make a layer
        into a stacking context for painting. External callers deal with isStackingContext()
        or isCSSStackingContext().

        Sadly we can't make m_forcedStackingContext (set on media element layers) trigger a
        non-CSS stacking context; media controls use mix-blend-mode, and rely on the fake-stacking
        media layer to be the "isolateBlending" ancestor.

        No code uses this yet.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer):
        (WebCore::RenderLayer::shouldBeCSSStackingContext const):
        (WebCore::RenderLayer::isStackingContextChanged):
        (WebCore::RenderLayer::setIsOpportunisticStackingContext):
        (WebCore::RenderLayer::setIsCSSStackingContext):
        (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
        (WebCore::RenderLayer::dirtyAncestorChainHasBlendingDescendants):
        (WebCore::RenderLayer::beginTransparencyLayers):
        (WebCore::RenderLayer::calculateClipRects const):
        (WebCore::outputPaintOrderTreeLegend):
        (WebCore::outputPaintOrderTreeRecursive):
        (WebCore::RenderLayer::shouldBeStackingContext const): Deleted.
        (WebCore::RenderLayer::setIsStackingContext): Deleted.
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::compositingOpacity const):

2019-04-22  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Move swap chain methods from GPUDevice to GPUCanvasContext
        https://bugs.webkit.org/show_bug.cgi?id=197126

        Reviewed by Dean Jackson.

        GPUSwapChains are now configured via GPUCanvasContext instead of GPUDevice. Covers WebGPU API 
        pull request #262.

        Existing WebGPU tests updated to match.

        * Modules/webgpu/GPUCanvasContext.cpp:
        (WebCore::GPUCanvasContext::configureSwapChain):
        (WebCore::GPUCanvasContext::replaceSwapChain): Deleted.
        * Modules/webgpu/GPUCanvasContext.h:
        * Modules/webgpu/GPUCanvasContext.idl:
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createSwapChain const): Deleted.
        * Modules/webgpu/WebGPUDevice.h:
        (WebCore::WebGPUDevice::device):
        * Modules/webgpu/WebGPUDevice.idl:
        * Modules/webgpu/WebGPUSwapChainDescriptor.cpp: Copied from Source/WebCore/Modules/webgpu/WebGPUSwapChainDescriptor.h.
        (WebCore::WebGPUSwapChainDescriptor::asGPUSwapChainDescriptor const):
        * Modules/webgpu/WebGPUSwapChainDescriptor.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/GPUDevice.cpp:
        (WebCore::GPUDevice::setSwapChain):
        (WebCore::GPUDevice::tryCreateSwapChain const): Deleted.
        * platform/graphics/gpu/GPUDevice.h:
        * platform/graphics/gpu/GPUSwapChain.h:
        * platform/graphics/gpu/GPUSwapChainDescriptor.h:
        (WebCore::GPUSwapChainDescriptor::GPUSwapChainDescriptor):
        * platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:
        (WebCore::GPUSwapChain::tryCreate):

2019-04-22  Said Abou-Hallawa  <said@apple.com>

        Mark SVGStringList properties '[SameObject]' in the IDL files
        Followup to https://bugs.webkit.org/show_bug.cgi?id=197137

        Reviewed by Darin Adler.

        The SVG elements do not create tear-off wrappers for SVGStrigList DOM
        objects anymore. Instead they return Ref pointers to the same RefCounted
        objects. So they should be marked '[SameObject]' in their IDL files.

        * svg/SVGTests.idl:
        * svg/SVGViewElement.idl:

2019-04-22  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r244495.
        https://bugs.webkit.org/show_bug.cgi?id=197159

        Causing build failures on OpenSource and Internal bots
        (Requested by ShawnRoberts on #webkit).

        Reverted changeset:

        "WHLSLPrepare.cpp always recompiles, even if nothing was
        changed"
        https://bugs.webkit.org/show_bug.cgi?id=197151
        https://trac.webkit.org/changeset/244495

2019-04-22  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r241289): [GTK] accessibility/removed-continuation-element-causes-crash.html and accessibility/removed-anonymous-block-child-causes-crash.html crashes
        https://bugs.webkit.org/show_bug.cgi?id=194630

        Reviewed by Michael Catanzaro.

        Do not assume core object always has a wrapper in webkitAccessibleRefChild().

        Fixes: accessibility/removed-continuation-element-causes-crash.html
               accessibility/removed-anonymous-block-child-causes-crash.html

        * accessibility/atk/WebKitAccessible.cpp:
        (webkitAccessibleRefChild): Return early if wrapper is nullptr.

2019-04-21  Darin Adler  <darin@apple.com>

        WHLSLPrepare.cpp always recompiles, even if nothing was changed
        https://bugs.webkit.org/show_bug.cgi?id=197151

        Reviewed by Dan Bernstein.

        * DerivedSources-input.xcfilelist: Script updated this automatically after
        DerivedSources.make was corrected.
        * DerivedSources-output.xcfilelist: Ditto, although I had to manually remove
        one bogus leftover reference to WHLSLStandardLibrary.cpp.

        * DerivedSources.make: Updated the rule that builds WHSLStandardLibrary.h to
        no longer refer to nonexistent WHLSLStandardLibrary.cpp. Because the dependency
        was on a file that was never created, the rule to regenerate WHSLStandardLibrary.h
        was running on every build, instead of only when one of the dependencies changed.

2019-04-20  Said Abou-Hallawa  <said@apple.com>

        REGRESSION (r243137): SVGViewElement.viewTarget should not return a new object
        https://bugs.webkit.org/show_bug.cgi?id=197137

        Reviewed by Darin Adler.

        All the DOM objects accessing the viewTarget of the same SVGViewElement 
        should hold a Ref pointer to the same SVGStringList property.

        Test: svg/dom/SVGViewElement-viewTarget.html

        * svg/SVGViewElement.idl:

2019-04-20  Jer Noble  <jer.noble@apple.com>

        REGRESSION(r243958): Unnecessary deactivation of AudioSession (PLT Regression)
        https://bugs.webkit.org/show_bug.cgi?id=197123
        <rdar://problem/49783264>

        Reviewed by Per Arne Vollan.

        Only set m_becameActive if we actually activated the AudioSession before starting playback. This
        avoids unnecessarily deactivating the AudioSession in processWillSuspend().

        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):

2019-04-19  Devin Rousso  <drousso@apple.com>

        Web Inspector: Timelines: CPU: ensure that tracking stops when disconnecting Web Inspector
        https://bugs.webkit.org/show_bug.cgi?id=197115
        <rdar://problem/49877875>

        Reviewed by Joseph Pecoraro.

        * inspector/agents/InspectorCPUProfilerAgent.cpp:
        (WebCore::InspectorCPUProfilerAgent::willDestroyFrontendAndBackend):

2019-04-19  Devin Rousso  <drousso@apple.com>

        Web Inspector: REGRESSION: Elements: "Inspect Element" context menu often doesn't select that element
        https://bugs.webkit.org/show_bug.cgi?id=197091
        <rdar://problem/49953728>

        Reviewed by Joseph Pecoraro.

        Delay the `inspect` event fron firing with the focued node until the frontend has had a
        chance to request the document. Otherwise, requesting the document clears the mapping of
        node-to-id, so the focused node's id would no longer be valid.

        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
        (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorDOMAgent::getDocument):
        (WebCore::InspectorDOMAgent::focusNode):
        (WebCore::InspectorDOMAgent::didCommitLoad):

2019-04-19  John Wilander  <wilander@apple.com>

        Disable Ad Click Attribution in ephemeral sessions and make sure conversion requests use an ephemeral, stateless session
        https://bugs.webkit.org/show_bug.cgi?id=197108
        <rdar://problem/49918702>

        Reviewed by Alex Christensen.

        Tests: http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html
               http/tests/adClickAttribution/store-disabled-in-ephemeral-session.html

        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
            Early return for ephemeral sessions.
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::shouldUseCredentialStorage):
            Now returns false for StoredCredentialsPolicy:EphemeralStatelessCookieless.
        * platform/network/StoredCredentialsPolicy.h:
            Added enum value EphemeralStatelessCookieless.

2019-04-19  Timothy Hatcher  <timothy@apple.com>

        Standardize the <meta name="color-scheme"> separator.
        https://bugs.webkit.org/show_bug.cgi?id=193931
        rdar://problem/49995929

        Reviewed by Darin Adler.

        Tests: css-dark-mode/color-scheme-meta.html

        * dom/Document.cpp:
        (WebCore::processColorSchemeString): Use isHTMLSpace insead of isColorSchemeSeparator and isASCIISpace.
        (WebCore::isColorSchemeSeparator): Deleted.

2019-04-19  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Add quirks to disable autocorrection and autocapitalization in hidden editable areas on some websites
        https://bugs.webkit.org/show_bug.cgi?id=197102
        <rdar://problem/49864669>

        Reviewed by Ryosuke Niwa.

        Add a quirk to disable autocorrection and autocapitalization in hidden editable areas.

        * page/Quirks.cpp:
        (WebCore::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForHost):
        (WebCore::Quirks::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreas const):
        * page/Quirks.h:

2019-04-18  Fujii Hironori  <Hironori.Fujii@sony.com>

        Implement KeyedDecoderGeneric and KeyedEncoderGeneric
        https://bugs.webkit.org/show_bug.cgi?id=186410

        Reviewed by Don Olmstead.

        Implemented KeyedDecoderGeneric and KeyedEncoderGeneric by using
        WTF::Persistence::Decoder and WTF::Persistence::Encoder.

        No new tests. Covered by existing tests.

        * PlatformWin.cmake: Added KeyedDecoderGeneric.cpp and
        KeyedEncoderGeneric.cpp, and removed KeyedDecoderCF.cpp and
        KeyedEncoderCF.cpp for WinCairo port.
        * platform/generic/KeyedDecoderGeneric.cpp:
        * platform/generic/KeyedDecoderGeneric.h:
        * platform/generic/KeyedEncoderGeneric.cpp:
        * platform/generic/KeyedEncoderGeneric.h:

2019-04-18  Ross Kirsling  <ross.kirsling@sony.com>

        [WinCairo] Non-unified build fails to link Tools
        https://bugs.webkit.org/show_bug.cgi?id=196866

        Reviewed by Fujii Hironori.

        * CMakeLists.txt:
        Drive-by fix -- don't disable string pooling when building WebCoreTestSupport.
        (This should have been part of r235203.)

2019-04-18  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r244434.
        https://bugs.webkit.org/show_bug.cgi?id=197089

        caused 1 API test failure (Requested by zalan on #webkit).

        Reverted changeset:

        "Regression (r244291): Broken API Test
        AutoLayoutRenderingProgressRelativeOrdering"
        https://bugs.webkit.org/show_bug.cgi?id=196948
        https://trac.webkit.org/changeset/244434

2019-04-18  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Make WebCore headers copies
        https://bugs.webkit.org/show_bug.cgi?id=182512
        <rdar://problem/37510435>

        Unreviewed build fix.

        Add new header from r244440.

        * Headers.cmake:

2019-04-18  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Make WebCore headers copies
        https://bugs.webkit.org/show_bug.cgi?id=182512
        <rdar://problem/37510435>

        Reviewed by Alex Christensen.

        The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was
        originally Windows only but now this is enabled for all CMake based ports.

        Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and
        tests. Shared headers are within Headers.cmake while port and platform specific headers
        are in their respective CMake files. Listing out all headers is preferred because globbing
        will break the build whenever a file is added.

        All include directories within the WebCore source tree are now PRIVATE. They were
        modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets
        which will prevent erroneous includes in targets dependent on WebCore.

        * CMakeLists.txt:
        * Headers.cmake: Added.
        * PlatformAppleWin.cmake:
        * PlatformGTK.cmake:
        * PlatformMac.cmake:
        * PlatformPlayStation.cmake:
        * PlatformWPE.cmake:
        * PlatformWin.cmake:
        * PlatformWinCairo.cmake:
        * platform/Cairo.cmake:
        * platform/Curl.cmake:
        * platform/FreeType.cmake:
        * platform/GStreamer.cmake:
        * platform/HolePunch.cmake:
        * platform/ImageDecoders.cmake:
        * platform/Soup.cmake: Added.
        * platform/TextureMapper.cmake:

2019-04-18  Justin Fan  <justin_fan@apple.com>

        [Web GPU] Implement API default values
        https://bugs.webkit.org/show_bug.cgi?id=197032

        Reviewed by Myles C. Maxfield.

        Add default values and 'required' qualifiers recently merged to the WebGPU API.

        WebGPU tests specifying these default values have been updated to rely on them for functionality.

        * Modules/webgpu/GPUBindGroupLayoutBinding.idl:
        * Modules/webgpu/GPUBindGroupLayoutDescriptor.idl:
        * Modules/webgpu/GPUBlendDescriptor.idl:
        * Modules/webgpu/GPUBufferDescriptor.idl:
        * Modules/webgpu/GPUColor.idl:
        * Modules/webgpu/GPUColorStateDescriptor.idl:
        * Modules/webgpu/GPUDepthStencilStateDescriptor.idl:
        * Modules/webgpu/GPUExtent3D.idl:
        * Modules/webgpu/GPUInputStateDescriptor.idl:
        * Modules/webgpu/GPUOrigin3D.h:
        * Modules/webgpu/GPUOrigin3D.idl:
        * Modules/webgpu/GPURequestAdapterOptions.idl:
        * Modules/webgpu/GPUTextureDescriptor.idl:
        * Modules/webgpu/GPUVertexAttributeDescriptor.idl:
        * Modules/webgpu/GPUVertexInputDescriptor.idl:
        * Modules/webgpu/WebGPUBindGroupBinding.idl:
        * Modules/webgpu/WebGPUBindGroupDescriptor.idl:
        * Modules/webgpu/WebGPUBufferBinding.h:
        * Modules/webgpu/WebGPUBufferBinding.idl:
        * Modules/webgpu/WebGPUCommandEncoder.idl:
        * Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
        * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl:
        * Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
        * Modules/webgpu/WebGPURenderPassDescriptor.idl:
        * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp:
        (WebCore::WebGPURenderPipelineDescriptor::tryCreateGPURenderPipelineDescriptor const):
        * Modules/webgpu/WebGPURenderPipelineDescriptor.h:
        * Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
        * Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
        * platform/graphics/gpu/GPUBlendDescriptor.h:
        * platform/graphics/gpu/GPUColorStateDescriptor.h:
        * platform/graphics/gpu/GPUCommandBuffer.h:
        * platform/graphics/gpu/GPUDepthStencilStateDescriptor.h:
        * platform/graphics/gpu/GPURenderPassDescriptor.h:
        * platform/graphics/gpu/GPURenderPipelineDescriptor.h:
        (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
        * platform/graphics/gpu/GPURequestAdapterOptions.h:
        * platform/graphics/gpu/GPUTextureDescriptor.h:
        * platform/graphics/gpu/GPUVertexAttributeDescriptor.h:
        * platform/graphics/gpu/GPUVertexInputDescriptor.h:
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::convertRenderPipelineDescriptor):
        (WebCore::trySetFunctionsForPipelineDescriptor):

2019-04-18  Jer Noble  <jer.noble@apple.com>

        Refactoring: Pull all fullscreen code out of Document and into its own helper class
        https://bugs.webkit.org/show_bug.cgi?id=197017

        Reviewed by Eric Carlson.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSDefaultStyleSheets.cpp:
        (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
        * css/SelectorCheckerTestFunctions.h:
        (WebCore::matchesFullScreenPseudoClass):
        (WebCore::matchesFullScreenAnimatingFullScreenTransitionPseudoClass):
        (WebCore::matchesFullScreenDocumentPseudoClass):
        (WebCore::matchesFullScreenControlsHiddenPseudoClass):
        * dom/Document.cpp:
        (WebCore::Document::removedLastRef):
        (WebCore::Document::prepareForDestruction):
        (WebCore::Document::nodeChildrenWillBeRemoved):
        (WebCore::Document::nodeWillBeRemoved):
        (WebCore::isAttributeOnAllOwners): Deleted.
        (WebCore::Document::fullScreenIsAllowedForElement const): Deleted.
        (WebCore::Document::requestFullScreenForElement): Deleted.
        (WebCore::Document::webkitCancelFullScreen): Deleted.
        (WebCore::Document::webkitExitFullscreen): Deleted.
        (WebCore::Document::webkitFullscreenEnabled const): Deleted.
        (WebCore::unwrapFullScreenRenderer): Deleted.
        (WebCore::Document::webkitWillEnterFullScreen): Deleted.
        (WebCore::Document::webkitDidEnterFullScreen): Deleted.
        (WebCore::Document::webkitWillExitFullScreen): Deleted.
        (WebCore::Document::webkitDidExitFullScreen): Deleted.
        (WebCore::Document::setFullScreenRenderer): Deleted.
        (WebCore::Document::dispatchFullScreenChangeEvents): Deleted.
        (WebCore::Document::dispatchFullScreenChangeOrErrorEvent): Deleted.
        (WebCore::Document::fullScreenElementRemoved): Deleted.
        (WebCore::Document::adjustFullScreenElementOnNodeRemoval): Deleted.
        (WebCore::Document::isAnimatingFullScreen const): Deleted.
        (WebCore::Document::setAnimatingFullScreen): Deleted.
        (WebCore::Document::areFullscreenControlsHidden const): Deleted.
        (WebCore::Document::setFullscreenControlsHidden): Deleted.
        (WebCore::Document::clearFullscreenElementStack): Deleted.
        (WebCore::Document::popFullscreenElementStack): Deleted.
        (WebCore::Document::pushFullscreenElementStack): Deleted.
        (WebCore::Document::addDocumentToFullScreenChangeEventQueue): Deleted.
        * dom/Document.h:
        (WebCore::Document::fullscreenManager):
        (WebCore::Document::webkitIsFullScreen const): Deleted.
        (WebCore::Document::webkitFullScreenKeyboardInputAllowed const): Deleted.
        (WebCore::Document::webkitCurrentFullScreenElement const): Deleted.
        (WebCore::Document::webkitCurrentFullScreenElementForBindings const): Deleted.
        (WebCore::Document::fullScreenRenderer const): Deleted.
        (WebCore::Document::webkitFullscreenElement const): Deleted.
        (WebCore::Document::webkitFullscreenElementForBindings const): Deleted.
        * dom/Document.idl:
        * dom/DocumentFullscreen.h:
        (WebCore::DocumentFullscreen::webkitFullscreenEnabled):
        (WebCore::DocumentFullscreen::webkitFullscreenElement):
        (WebCore::DocumentFullscreen::webkitExitFullscreen):
        (WebCore::DocumentFullscreen::webkitIsFullScreen):
        (WebCore::DocumentFullscreen::webkitFullScreenKeyboardInputAllowed):
        (WebCore::DocumentFullscreen::webkitCurrentFullScreenElement):
        (WebCore::DocumentFullscreen::webkitCancelFullScreen):
        * dom/DocumentFullscreen.idl:
        * dom/Element.cpp:
        (WebCore::Element::webkitRequestFullscreen):
        * dom/EventPath.cpp:
        (WebCore::shouldEventCrossShadowBoundary):
        * dom/FullscreenManager.cpp: Added.
        (WebCore::isAttributeOnAllOwners):
        (WebCore::FullscreenManager::FullscreenManager):
        (WebCore::FullscreenManager::fullscreenIsAllowedForElement const):
        (WebCore::FullscreenManager::requestFullscreenForElement):
        (WebCore::FullscreenManager::cancelFullscreen):
        (WebCore::FullscreenManager::requestExitFullscreen):
        (WebCore::FullscreenManager::exitFullscreen):
        (WebCore::FullscreenManager::isFullscreenEnabled const):
        (WebCore::unwrapFullscreenRenderer):
        (WebCore::FullscreenManager::willEnterFullscreen):
        (WebCore::FullscreenManager::didEnterFullscreen):
        (WebCore::FullscreenManager::willExitFullscreen):
        (WebCore::FullscreenManager::didExitFullscreen):
        (WebCore::FullscreenManager::setFullscreenRenderer):
        (WebCore::FullscreenManager::dispatchFullscreenChangeEvents):
        (WebCore::FullscreenManager::dispatchFullscreenChangeOrErrorEvent):
        (WebCore::FullscreenManager::fullscreenElementRemoved):
        (WebCore::FullscreenManager::adjustFullscreenElementOnNodeRemoval):
        (WebCore::FullscreenManager::isAnimatingFullscreen const):
        (WebCore::FullscreenManager::setAnimatingFullscreen):
        (WebCore::FullscreenManager::areFullscreenControlsHidden const):
        (WebCore::FullscreenManager::setFullscreenControlsHidden):
        (WebCore::FullscreenManager::clear):
        (WebCore::FullscreenManager::emptyEventQueue):
        (WebCore::FullscreenManager::clearFullscreenElementStack):
        (WebCore::FullscreenManager::popFullscreenElementStack):
        (WebCore::FullscreenManager::pushFullscreenElementStack):
        (WebCore::FullscreenManager::addDocumentToFullscreenChangeEventQueue):
        * dom/FullscreenManager.h: Added.
        (WebCore::FullscreenManager::document):
        (WebCore::FullscreenManager::document const):
        (WebCore::FullscreenManager::topDocument const):
        (WebCore::FullscreenManager::page const):
        (WebCore::FullscreenManager::frame const):
        (WebCore::FullscreenManager::documentElement const):
        (WebCore::FullscreenManager::hasLivingRenderTree const):
        (WebCore::FullscreenManager::pageCacheState const):
        (WebCore::FullscreenManager::scheduleFullStyleRebuild):
        (WebCore::FullscreenManager::fullscreenElement const):
        (WebCore::FullscreenManager::isFullscreen const):
        (WebCore::FullscreenManager::isFullscreenKeyboardInputAllowed const):
        (WebCore::FullscreenManager::currentFullscreenElement const):
        (WebCore::FullscreenManager::fullscreenRenderer const):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::isFullscreen const):
        (WebCore::HTMLMediaElement::isStandardFullscreen const):
        (WebCore::HTMLMediaElement::enterFullscreen):
        (WebCore::HTMLMediaElement::exitFullscreen):
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::canShowControlsManager const):
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
        * inspector/agents/InspectorDOMAgent.cpp:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::isKeyEventAllowedInFullScreen const):
        (WebCore::EventHandler::internalKeyEvent):
        * page/Page.cpp:
        (WebCore::Page::setFullscreenControlsHidden):
        * rendering/RenderFullScreen.cpp:
        (WebCore::RenderFullScreen::wrapNewRenderer):
        (WebCore::RenderFullScreen::wrapExistingRenderer):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::isDescendantOfFullScreenLayer):
        * rendering/updating/RenderTreeBuilder.h:
        * rendering/updating/RenderTreeBuilderInline.cpp:
        (WebCore::RenderTreeBuilder::Inline::splitInlines):
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::createRenderer):
        * style/StyleSharingResolver.cpp:
        (WebCore::Style::SharingResolver::canShareStyleWithElement const):
        * testing/Internals.cpp:
        (WebCore::Internals::webkitWillEnterFullScreenForElement):
        (WebCore::Internals::webkitDidEnterFullScreenForElement):
        (WebCore::Internals::webkitWillExitFullScreenForElement):
        (WebCore::Internals::webkitDidExitFullScreenForElement):
        (WebCore::Internals::isAnimatingFullScreen const):

2019-04-18  Jer Noble  <jer.noble@apple.com>

        Add support for parsing FairPlayStreaming PSSH boxes.
        https://bugs.webkit.org/show_bug.cgi?id=197064

        Reviewed by Eric Carlson.

        API Tests: ISO.ISOFairPlayStreamingPsshBox

        Add a new set of ISOBox classes for parsing the contents of a FairPlayStreaming PSSH box,
        and add support for this new box to CDMFairPlayStreaming.

        Drive-by fix: add an explicit include for MainThread.h to LibWebRTCProviderCocoa.cpp.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/FourCC.h:
        * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
        (WebCore::CDMPrivateFairPlayStreaming::cencName):
        (WebCore::fairPlaySystemID):
        (WebCore::extractSchemeAndKeyIdFromCenc):
        (WebCore::CDMPrivateFairPlayStreaming::extractKeyIDsCenc):
        (WebCore::CDMPrivateFairPlayStreaming::sanitizeCenc):
        (WebCore::validInitDataTypes):
        (WebCore::CDMFactory::platformRegisterFactories):
        * platform/graphics/avfoundation/CDMFairPlayStreaming.h:
        * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp: Added.
        (WebCore::ISOFairPlayStreamingPsshBox::fairPlaySystemID):
        (WebCore::ISOFairPlayStreamingInfoBox::parse):
        (WebCore::ISOFairPlayStreamingKeyRequestInfoBox::parse):
        (WebCore::ISOFairPlayStreamingKeyAssetIdBox::parse):
        (WebCore::ISOFairPlayStreamingKeyContextBox::parse):
        (WebCore::ISOFairPlayStreamingKeyVersionListBox::parse):
        (WebCore::ISOFairPlayStreamingKeyRequestBox::parse):
        (WebCore::ISOFairPlayStreamingInitDataBox::parse):
        (WebCore::ISOFairPlayStreamingPsshBox::parse):
        * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h: Added.
        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

2019-04-18  Sihui Liu  <sihui_liu@apple.com>

        Blob type cannot be stored correctly in IDB when IDBObjectStore has autoIncrement and keyPath options
        https://bugs.webkit.org/show_bug.cgi?id=196128
        <rdar://problem/49562115>

        Reviewed by Geoffrey Garen.

        If a key is auto-generated, it should become a property of the value object. Network process would perform the 
        key injection by deserializing IDBValue into script value, setting the property, serializing the result and 
        storing it in a database record. But network process does not have a JSDOMGlobalObject, so it would fail to 
        deserialize types including Blob and File.

        To solve this issue, we move the key injection to web process and let network process store the original value 
        it gets. In this case, when web process asks for some value, network process should return key, value and key 
        path so that web process can decide whether it should perform a key injection before returning the result. Note
        that the auto-generated key would always be stored as the key in a ObjectStore record.

        Test: storage/indexeddb/modern/objectstore-autoincrement-types.html

        * Modules/indexeddb/IDBCursor.cpp:
        (WebCore::IDBCursor::setGetResult):
        * Modules/indexeddb/IDBCursor.h:
        (WebCore::IDBCursor::primaryKeyPath):
        * Modules/indexeddb/IDBGetAllResult.cpp:
        (WebCore::IDBGetAllResult::isolatedCopy):
        (WebCore::IDBGetAllResult::addKey):
        (WebCore::IDBGetAllResult::addValue):
        (WebCore::IDBGetAllResult::keys const):
        (WebCore::IDBGetAllResult::values const):
        (WebCore::IDBGetAllResult::allBlobFilePaths const):
        (WebCore::isolatedCopyOfVariant): Deleted.

        * Modules/indexeddb/IDBGetAllResult.h: Introduce an IDBKeyPath parameter. Also replace Variant with two Vectors,
        because we only needed to store either key or value before, and now the stored value could be incomplete.
        (WebCore::IDBGetAllResult::IDBGetAllResult):
        (WebCore::IDBGetAllResult::keyPath const):
        (WebCore::IDBGetAllResult::encode const):
        (WebCore::IDBGetAllResult::decode):

        * Modules/indexeddb/IDBGetResult.cpp:
        (WebCore::IDBGetResult::setValue):
        * Modules/indexeddb/IDBGetResult.h:
        (WebCore::IDBGetResult::IDBGetResult):
        (WebCore::IDBGetResult::keyPath const):
        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::setResult):
        (WebCore::IDBRequest::setResultToStructuredClone):
        * Modules/indexeddb/IDBRequest.h:
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::didGetAllRecordsOnServer):
        (WebCore::IDBTransaction::didGetRecordOnServer):
        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
        (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
        * Modules/indexeddb/server/MemoryIndex.cpp:
        (WebCore::IDBServer::MemoryIndex::getResultForKeyRange const):
        (WebCore::IDBServer::MemoryIndex::getAllRecords const):
        * Modules/indexeddb/server/MemoryIndexCursor.cpp:
        (WebCore::IDBServer::MemoryIndexCursor::currentData):
        * Modules/indexeddb/server/MemoryObjectStore.cpp:
        (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
        (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
        (WebCore::IDBServer::MemoryObjectStore::getAllRecords const):
        * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
        (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
        (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
        (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
        * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
        (WebCore::IDBServer::SQLiteIDBCursor::currentData):
        * Modules/indexeddb/server/SQLiteIDBCursor.h:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:

        (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Remove the key injection from network process. 
        UniqueIDBDatabase stores any value it gets from IDBClient.

        * Modules/indexeddb/shared/IDBResultData.cpp:
        (WebCore::IDBResultData::getResultRef):
        * Modules/indexeddb/shared/IDBResultData.h:

        * bindings/js/IDBBindingUtilities.cpp:
        (WebCore::injectIDBKeyIntoScriptValue): If property is read-only, set would fail and injectKeyIntoResult would
        return null, but we expect it to return result as long as the property value is the same as target. Therefore, 
        we can add an early return here.

        (WebCore::createKeyPathArray):
        (WebCore::generateIndexKeyForValue): We used to generate IndexKey from value stored in database but now the
        value gets stored does not include auto-generated key, as we remove the key injection from network process. In 
        this case if the IDBIndex has the same key path as the auto-generated key, IndexKey would be failed to create
        for it cannot extract auto-generated key from value. Since the auto-generated key would always be the key in 
        database record, we could use value of that key when we find a match in key path.

        (WebCore::deserializeIDBValueWithKeyInjection): If the key path in the result is single entry, the key is 
        probably auto-generated, so we could inject the result key into the result value unconditionally.

        * bindings/js/IDBBindingUtilities.h:
        * bindings/js/JSIDBCursorWithValueCustom.cpp:
        (WebCore::JSIDBCursorWithValue::value const):
        * bindings/js/JSIDBRequestCustom.cpp:
        (WebCore::JSIDBRequest::result const):

2019-04-18  Zalan Bujtas  <zalan@apple.com>

        Regression (r244291): Broken API Test AutoLayoutRenderingProgressRelativeOrdering
        https://bugs.webkit.org/show_bug.cgi?id=196948
        <rdar://problem/49927131>

        Reviewed by Tim Horton.

        * page/FrameView.cpp:
        (WebCore::FrameView::setContentsSize):
        (WebCore::FrameView::autoSizeIfEnabled):
        * page/FrameView.h:

2019-04-18  Shawn Roberts  <sroberts@apple.com>

        Unreviewed manual rollout of r244248 and r244409
        Causing assertion failures on Mac WK2 Debug builds
        https://bugs.webkit.org/show_bug.cgi?id=195623

        * loader/LinkLoader.cpp:
        (WebCore::LinkLoader::prefetchIfNeeded):
        * loader/ResourceLoadInfo.cpp:
        (WebCore::toResourceType):
        * loader/ResourceLoadInfo.h:
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::willSendRequestInternal):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):

2019-04-18  Antti Koivisto  <antti@apple.com>

        Tile update problems in iframe after scrolling page too soon after load
        https://bugs.webkit.org/show_bug.cgi?id=197057
        <rdar://problem/49913663>

        Reviewed by Simon Fraser.

        We end up destroying FrameHosting scrolling node when we shouldn't.

        No test, despite attempts I couldn't get this state to stick. The problem is that in
        most cases the destroying scrolling node gets immediately recreated and connected again.
        Getting into testably buggy state requires some very specific layer tree configuration update.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):

        Test the right thing.

2019-04-18  Antoine Quint  <graouts@apple.com>

        [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node.html
        https://bugs.webkit.org/show_bug.cgi?id=197004

        Reviewed by Antti Koivisto.

        We need to release pointer capture when an element that has pointer capture is disconnected from the DOM.

        * dom/Element.cpp:
        (WebCore::Element::removedFromAncestor): Notify the PointerCaptureController that an element was disconnected.
        * dom/PointerEvent.cpp:
        (WebCore::PointerEvent::create): Broaden createPointerCancelEvent() to take in an event type so that we may use it to create a
        lostpointercapture event as well.
        (WebCore::PointerEvent::createPointerCancelEvent): Deleted.
        * dom/PointerEvent.h:
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::elementWasRemoved): Check whether the provided element matches one of the target overrides recorded
        in the map of captured pointer IDs.
        (WebCore::PointerCaptureController::pointerEventWasDispatched): This block of code was actually useless in this location, the new code
        added in elementWasRemoved() performs the actions that the spec text mandates.
        (WebCore::PointerCaptureController::cancelPointer): Replace the call to createPointerCancelEvent() with one to create().
        * page/PointerCaptureController.h:

2019-04-17  Antoine Quint  <graouts@apple.com>

        [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers.html
        https://bugs.webkit.org/show_bug.cgi?id=197006

        Reviewed by Antti Koivisto.

        Add support for on* HTML attributes and JS properties for pointer events.

        * dom/GlobalEventHandlers.idl:
        * html/HTMLAttributeNames.in:
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::createEventHandlerNameMap):

2019-04-17  Timothy Hatcher  <timothy@apple.com>

        Standardize the `<meta name="color-scheme">` separator.
        https://bugs.webkit.org/show_bug.cgi?id=193931

        Reviewed by Simon Fraser.

        Drop support for comma as a valid seperator in <meta name="color-scheme"> to
        match the proposal being tracked by: https://github.com/whatwg/html/issues/4504

        Tests: css-dark-mode/color-scheme-meta.html
               css-dark-mode/older-syntax/supported-color-schemes-meta.html

        * dom/Document.cpp:
        (WebCore::isColorSchemeSeparator): Drop support for comma.

2019-04-17  Timothy Hatcher  <timothy@apple.com>

        Rename `supported-color-schemes` to `color-scheme`.
        https://bugs.webkit.org/show_bug.cgi?id=197016
        rdar://problem/49980259

        Reviewed by Simon Fraser.

        Changed `supported-color-schemes` to `color-scheme` to follow the spec changes
        being tracked by: https://github.com/w3c/csswg-drafts/issues/3807

        The old `supported-color-schemes` is now an alias of `color-scheme` for compatibility.

        Tests: css-dark-mode/color-scheme-css-parse.html
               css-dark-mode/color-scheme-css.html
               css-dark-mode/color-scheme-meta.html
               css-dark-mode/color-scheme-priority.html
               css-dark-mode/color-scheme-scrollbar.html
               css-dark-mode/older-syntax/supported-color-schemes-css.html
               css-dark-mode/older-syntax/supported-color-schemes-meta.html
               css-dark-mode/older-systems/color-scheme-css.html
               css-dark-mode/older-systems/color-scheme-meta.html

        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
        * css/CSSProperties.json:
        * css/CSSValueKeywords.in:
        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::updateColorScheme):
        (WebCore::StyleBuilderConverter::convertColorScheme):
        (WebCore::StyleBuilderConverter::updateSupportedColorSchemes): Deleted.
        (WebCore::StyleBuilderConverter::convertSupportedColorSchemes): Deleted.
        * css/StyleBuilderCustom.h:
        (WebCore::StyleBuilderCustom::applyValueColorScheme):
        (WebCore::StyleBuilderCustom::applyValueSupportedColorSchemes): Deleted.
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::applyMatchedProperties):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeColorScheme):
        (WebCore::CSSPropertyParser::parseSingleValue):
        (WebCore::consumeSupportedColorSchemes): Deleted.
        * dom/Document.cpp:
        (WebCore::processColorSchemeString):
        (WebCore::Document::processColorScheme):
        (WebCore::Document::useDarkAppearance const):
        (WebCore::processColorSchemes): Deleted.
        (WebCore::Document::processSupportedColorSchemes): Deleted.
        * dom/Document.h:
        * html/HTMLMetaElement.cpp:
        (WebCore::HTMLMetaElement::process):
        * page/FrameView.cpp:
        (WebCore::FrameView::rendererForColorScheme const):
        (WebCore::FrameView::useDarkAppearance const):
        (WebCore::FrameView::styleColorOptions const):
        (WebCore::FrameView::rendererForSupportedColorSchemes const): Deleted.
        * page/FrameView.h:
        * rendering/style/RenderStyle.cpp:
        (WebCore::rareInheritedDataChangeRequiresRepaint):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::colorScheme const):
        (WebCore::RenderStyle::setHasExplicitlySetColorScheme):
        (WebCore::RenderStyle::hasExplicitlySetColorScheme const):
        (WebCore::RenderStyle::setColorScheme):
        (WebCore::RenderStyle::initialColorScheme):
        (WebCore::RenderStyle::NonInheritedFlags::operator== const):
        (WebCore::RenderStyle::supportedColorSchemes const): Deleted.
        (WebCore::RenderStyle::setHasExplicitlySetSupportedColorSchemes): Deleted.
        (WebCore::RenderStyle::hasExplicitlySetSupportedColorSchemes const): Deleted.
        (WebCore::RenderStyle::setSupportedColorSchemes): Deleted.
        (WebCore::RenderStyle::initialSupportedColorSchemes): Deleted.
        * rendering/style/RenderStyleConstants.h:
        * rendering/style/StyleColorScheme.h: Renamed from Source/WebCore/rendering/style/StyleSupportedColorSchemes.h.
        (WebCore::StyleColorScheme::StyleColorScheme):
        (WebCore::StyleColorScheme::operator== const):
        (WebCore::StyleColorScheme::operator!= const):
        (WebCore::StyleColorScheme::isAuto const):
        (WebCore::StyleColorScheme::isOnly const):
        (WebCore::StyleColorScheme::colorScheme const):
        (WebCore::StyleColorScheme::add):
        (WebCore::StyleColorScheme::contains const):
        (WebCore::StyleColorScheme::setAllowsTransformations):
        (WebCore::StyleColorScheme::allowsTransformations const):
        * rendering/style/StyleRareInheritedData.cpp:
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator== const):
        * rendering/style/StyleRareInheritedData.h:

2019-04-17  Justin Fan  <justin_fan@apple.com>

        [Web GPU] GPUComputePassEncoder::dispatch number of thread groups, not grid size
        https://bugs.webkit.org/show_bug.cgi?id=196984

        Reviewed by Myles C. Maxfield.

        Test: Updated compute-squares.html.

        * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm:
        (WebCore::GPUComputePassEncoder::dispatch):

2019-04-17  Andy Estes  <aestes@apple.com>

        [iOS] Support multiple file selection in UIDocumentPickerViewController
        https://bugs.webkit.org/show_bug.cgi?id=197014
        <rdar://problem/49963514>

        Reviewed by Tim Horton.

        * platform/LocalizedStrings.h:
        Exported multipleFileUploadText().

2019-04-17  John Wilander  <wilander@apple.com>

        Add prioritization of ad click conversions and cleaning of sent ad click conversions
        https://bugs.webkit.org/show_bug.cgi?id=196934
        <rdar://problem/49917773>

        Reviewed by Chris Dumez.

        Tests: http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html
               http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html
               http/tests/adClickAttribution/second-conversion-with-higher-priority.html
               http/tests/adClickAttribution/second-conversion-with-lower-priority.html

        * loader/AdClickAttribution.cpp:
        (WebCore::AdClickAttribution::hasHigherPriorityThan const):
            Added to facilitate priority comparison between two attributions.
        * loader/AdClickAttribution.h:
        (WebCore::AdClickAttribution::Destination::Destination):
            Added a WTF::HashTableDeletedValueType constructor and changed the copy constructor to
            a move constructor.
        (WebCore::AdClickAttribution::isEmpty const):

2019-04-17  Devin Rousso  <drousso@apple.com>

        AX: AccessibilityObject::parentObject() doesn't need to be pure virtual
        https://bugs.webkit.org/show_bug.cgi?id=197026
        <rdar://problem/49448209>

        Reviewed by Timothy Hatcher.

        * accessibility/AccessibilityObject.h:
        (WebCore::AccessibilityObject::parentObject const):

2019-04-17  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Use aria role as a hint whether a tap should result in a synthetic click
        https://bugs.webkit.org/show_bug.cgi?id=196988
        <rdar://problem/49955328>

        Reviewed by Simon Fraser.

        Test: fast/events/touch/ios/content-observation/tap-on-input-looking-div-with-role.html

        * accessibility/AccessibilityObject.h:

2019-04-17  Alex Christensen  <achristensen@webkit.org>

        WebSocketHandshake should not know about a Document
        https://bugs.webkit.org/show_bug.cgi?id=196468

        Reviewed by Tim Horton.

        I'll need to move WebSocketHandshake to the NetworkProcess for rdar://problem/46287028
        It currently uses the Document pointer for 3 things:
        1. To get the user agent, which we can pass in as a creation parameter.
        2. To get the origin, which we can also pass in as a creation parameter.
        3. To get cookies for the web inspector.  We can pass in a functor instead and have the inspector provide cookies itself.

        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::connect):
        (WebCore::WebSocketChannel::disconnect):
        (WebCore::WebSocketChannel::didOpenSocketStream):
        (WebCore::WebSocketChannel::clientHandshakeRequest):
        * Modules/websockets/WebSocketChannel.h:
        (WebCore::WebSocketChannel::document):
        * Modules/websockets/WebSocketHandshake.cpp:
        (WebCore::WebSocketHandshake::WebSocketHandshake):
        (WebCore::WebSocketHandshake::clientHandshakeMessage const):
        (WebCore::WebSocketHandshake::clientHandshakeRequest const):
        (WebCore::WebSocketHandshake::clientOrigin const): Deleted.
        (WebCore::WebSocketHandshake::clientHandshakeCookieRequestHeaderFieldProxy const): Deleted.
        (WebCore::WebSocketHandshake::clearDocument): Deleted.
        * Modules/websockets/WebSocketHandshake.h:
        * inspector/agents/InspectorNetworkAgent.cpp:
        (WebCore::InspectorNetworkAgent::enable):

2019-04-17  Timothy Hatcher  <timothy@apple.com>

        Unreviewed build fix for iOSMac after r244223.

        * platform/audio/ios/AudioSessionIOS.mm:
        (WebCore::AudioSession::routeSharingPolicy const): Add ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END
        around AVAudioSessionRouteSharingPolicyLongForm use.

2019-04-17  Chris Dumez  <cdumez@apple.com>

        Remember device orientation permission for the duration of the browsing session
        https://bugs.webkit.org/show_bug.cgi?id=196992
        <rdar://problem/49946067>

        Reviewed by Alex Christensen.

        Use DeviceOrientationOrMotionPermissionState type more consistently in the code base
        instead of bool or Optional<bool>. Added "Prompt" value to this enumeration which is the
        default state and which indicates we should ask the client.

        * WebCore.xcodeproj/project.pbxproj:
        * dom/DeviceOrientationAndMotionAccessController.cpp:
        (WebCore::DeviceOrientationAndMotionAccessController::DeviceOrientationAndMotionAccessController):
        (WebCore::DeviceOrientationAndMotionAccessController::shouldAllowAccess):
        * dom/DeviceOrientationAndMotionAccessController.h:
        (WebCore::DeviceOrientationAndMotionAccessController::accessState const):
        * dom/DeviceOrientationOrMotionEvent.cpp:
        (WebCore::DeviceOrientationOrMotionEvent::requestPermission):
        * dom/DeviceOrientationOrMotionPermissionState.h:
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::deviceOrientationAndMotionAccessState const):
        (WebCore::DocumentLoader::setDeviceOrientationAndMotionAccessState):
        * page/ChromeClient.h:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::isAllowedToAddDeviceMotionOrientationListener const):

2019-04-17  Rob Buis  <rbuis@igalia.com>

        XMLHttpRequest has the wrong fallback encoding
        https://bugs.webkit.org/show_bug.cgi?id=191741

        Reviewed by Alex Christensen.

        Allow overriding the response charset as specified here:
        https://xhr.spec.whatwg.org/#final-charset

        Behavior matches Firefox and Chrome.

        Tests: imported/w3c/web-platform-tests/encoding/replacement-encodings.any.html
               imported/w3c/web-platform-tests/encoding/replacement-encodings.any.worker.html
               imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.html
               imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.worker.html

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::finalResponseCharset const):
        (WebCore::XMLHttpRequest::createDecoder const):
        * xml/XMLHttpRequest.h:

2019-04-16  Antoine Quint  <graouts@apple.com>

        Opt Google Maps into simulated mouse events dispatch quirk
        https://bugs.webkit.org/show_bug.cgi?id=196965
        <rdar://problem/49934766>

        Reviewed by Dean Jackson.

        Use the correct Google Maps path.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

2019-04-16  Antoine Quint  <graouts@apple.com>

        Opt flipkart.com into simulated mouse events dispatch quirk
        https://bugs.webkit.org/show_bug.cgi?id=196961
        <rdar://problem/49648520>

        Reviewed by Dean Jackson.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

2019-04-16  Antoine Quint  <graouts@apple.com>

        Opt MSN.com into simulated mouse events dispatch quirk
        https://bugs.webkit.org/show_bug.cgi?id=196960
        <rdar://problem/49403260>

        Reviewed by Dean Jackson.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

2019-04-16  Zan Dobersek  <zdobersek@igalia.com>

        ScalableImageDecoder: don't forcefully decode image data when querying frame completeness, duration
        https://bugs.webkit.org/show_bug.cgi?id=191354
        <rdar://problem/46123406>

        Reviewed by Michael Catanzaro.

        ScalableImageDecoder::frameIsCompleteAtIndex() should only check the
        index validity and, if the index is valid, check for completeness of the
        corresponding frame. ScalableImageDecoder::frameDurationAtIndex() should
        also only retrieve duration for already-complete frames, or expand the
        default 0-second value according to the flashing-protection rule when
        the target frame is not yet complete.

        Both methods avoid calling ScalableImageDecoder::frameBufferAtIndex()
        as that method goes on and decodes image data to determine specific
        information. The ImageSource class that's querying this information
        doesn't anticipate this, and doesn't handle the increased memory
        consumption of the decoded data, leaving MemoryCache in the blind about
        the image resource's actual amount of consumed memory. ImageSource can
        instead gracefully handle any incomplete frame by marking the decoding
        status for this frame as only partial.

        * platform/image-decoders/ScalableImageDecoder.cpp:
        (WebCore::ScalableImageDecoder::frameIsCompleteAtIndex const):
        (WebCore::ScalableImageDecoder::frameHasAlphaAtIndex const):
        (WebCore::ScalableImageDecoder::frameDurationAtIndex const):

2019-04-16  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed non-unified build fix after r244307.

        * page/DiagnosticLoggingClient.h:

2019-04-16  Chris Dumez  <cdumez@apple.com>

        URL set by document.open() is not communicated to the UIProcess
        https://bugs.webkit.org/show_bug.cgi?id=196941
        <rdar://problem/49237544>

        Reviewed by Geoff Garen.

        Notify the FrameLoaderClient whenever an explicit open was done and provide it with
        the latest document URL.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::didExplicitOpen):
        * loader/FrameLoaderClient.h:

2019-04-16  Timothy Hatcher  <timothy@apple.com>

        FrameView base background color always starts white.
        https://bugs.webkit.org/show_bug.cgi?id=196976

        Reviewed by Beth Dakin.

        * page/FrameView.cpp:
        (WebCore::FrameView::setBaseBackgroundColor): Bail early if the base background
        color did not change.

2019-04-16  Devin Rousso  <drousso@apple.com>

        Unprefix -webkit-sticky
        https://bugs.webkit.org/show_bug.cgi?id=196962
        <rdar://problem/40903458>

        Reviewed by Simon Fraser.

        Updated existing tests.

        This change doesn't modify functionality, only exposing a new unprefixed CSS value.

        * css/CSSProperties.json:
        * css/CSSValueKeywords.in:

        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator PositionType const):

        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

        * editing/EditingStyle.cpp:
        (WebCore::EditingStyle::convertPositionStyle):

2019-04-16  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r244321.
        https://bugs.webkit.org/show_bug.cgi?id=196968

        Causing all WK2 Debug builds to exit early after Assertion
        failures. (Requested by ShawnRoberts on #webkit).

        Reverted changeset:

        "URL set by document.open() is not communicated to the
        UIProcess"
        https://bugs.webkit.org/show_bug.cgi?id=196941
        https://trac.webkit.org/changeset/244321

2019-04-16  Caitlin Potter  <caitp@igalia.com>

        [JSC] Filter DontEnum properties in ProxyObject::getOwnPropertyNames()
        https://bugs.webkit.org/show_bug.cgi?id=176810

        Reviewed by Saam Barati.

        Previously, there was a comment here indicating uncertainty of whether it
        was necessary to filter DontEnum properties explicitly or not. It turns
        out that it was necessary in the case of JSC ProxyObjects.

        This patch adds DontEnum filtering for ProxyObjects, however we continue
        to explicitly filter them in JSDOMConvertRecord, which needs to use the
        property descriptor after filtering. This change prevents observably
        fetching the property descriptor twice per property.

        * bindings/js/JSDOMConvertRecord.h:

2019-04-15  Antoine Quint  <graouts@apple.com>

        [iOS] Redundant pointer events causes material design buttons to flush twice
        https://bugs.webkit.org/show_bug.cgi?id=196914
        <rdar://problem/49571860>

        Reviewed by Dean Jackson.

        Test: pointerevents/ios/pointer-event-order.html

        Do not dispatch pointer events for mouse events on iOS since we're already dispatching them when processing touch events.

        * dom/Element.cpp:
        (WebCore::Element::dispatchMouseEvent):

2019-04-15  John Wilander  <wilander@apple.com>

        Add a query string nonce to LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html to address flakiness
        https://bugs.webkit.org/show_bug.cgi?id=196955

        Unreviewed test gardening. The WebCore change is only in a dedicated
        test function.

        No new tests. Existing test updated.

        * loader/AdClickAttribution.cpp:
        (WebCore::AdClickAttribution::urlForTesting const):
            Now preserves the query string in the test URL.

2019-04-15  Chris Dumez  <cdumez@apple.com>

        URL set by document.open() is not communicated to the UIProcess
        https://bugs.webkit.org/show_bug.cgi?id=196941
        <rdar://problem/49237544>

        Reviewed by Geoffrey Garen.

        Notify the FrameLoaderClient whenever an explicit open was done and provide it with
        the latest document URL.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::didExplicitOpen):
        * loader/FrameLoaderClient.h:

2019-04-15  Eike Rathke  <erack@redhat.com>

        Fix logic flow for error log
        https://bugs.webkit.org/show_bug.cgi?id=196933

        Reviewed by Alexey Proskuryakov.

        Missing block braces logged an error always, not just
        if (actionIfInvalid == Complain).

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::isSafeToLoadURL):

2019-04-15  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] FontPlatformData objects aren't cached at all when using font-family:system-ui
        https://bugs.webkit.org/show_bug.cgi?id=196846
        <rdar://problem/49499971>

        Reviewed by Simon Fraser and Darin Adler.

        When adding the special codepath for system-ui to behave as an entire list of fonts rather than a single item,
        I never added a cache for the FontPlatformData objects that codepath creates. The non-system-ui codepath already
        has a cache in fontPlatformDataCache() in FontCache.cpp.

        This patch causes a 16.8x performance improvement on the attached benchmark.

        Test: PerformanceTests/Layout/system-ui-rebuild-emoji.html

        * page/cocoa/MemoryReleaseCocoa.mm:
        (WebCore::platformReleaseMemory):
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::invalidateFontCache):
        * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
        (WebCore::FontFamilySpecificationKey::FontFamilySpecificationKey):
        (WebCore::FontFamilySpecificationKey::operator== const):
        (WebCore::FontFamilySpecificationKey::operator!= const):
        (WebCore::FontFamilySpecificationKey::isHashTableDeletedValue const):
        (WebCore::FontFamilySpecificationKey::computeHash const):
        (WebCore::FontFamilySpecificationKeyHash::hash):
        (WebCore::FontFamilySpecificationKeyHash::equal):
        (WebCore::fontMap):
        (WebCore::clearFontFamilySpecificationCoreTextCache):
        (WebCore::FontFamilySpecificationCoreText::fontRanges const):
        * platform/graphics/cocoa/FontFamilySpecificationCoreText.h:
        * platform/graphics/mac/ComplexTextControllerCoreText.mm:
        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
        (WebCore::safeCFEqual): Deleted.

2019-04-15  Devin Rousso  <drousso@apple.com>

        Web Inspector: fake value descriptors for promises add a catch handler, preventing "rejectionhandled" events from being fired
        https://bugs.webkit.org/show_bug.cgi?id=196484
        <rdar://problem/49114725>

        Reviewed by Joseph Pecoraro.

        Test: inspector/runtime/promise-native-getter.html

        Mark errors created from getters as being `isNativeGetterTypeError`.

        * bindings/js/JSDOMExceptionHandling.cpp:
        (WebCore::throwGetterTypeError):
        (WebCore::rejectPromiseWithGetterTypeError):
        (WebCore::rejectPromiseWithThisTypeError):

        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::makeGetterTypeErrorForBuiltins):

        * bindings/js/JSDOMPromiseDeferred.h:
        * bindings/js/JSDOMPromiseDeferred.cpp:
        (WebCore::createRejectedPromiseWithTypeError):

        * Modules/streams/WritableStream.js:
        (getter.closed):
        (getter.ready):

2019-04-15  Jer Noble  <jer.noble@apple.com>

        Add a DiagnosticLogging method taking an arbitrary dictionary of values.
        https://bugs.webkit.org/show_bug.cgi?id=196773

        Reviewed by Alex Christensen.

        * page/DiagnosticLoggingClient.h:

2019-04-15  Justin Fan  <justin_fan@apple.com>

        Let WTF::convertSafely deduce types from arguments.

        Reviewer's (Darin Adler) follow-up to https://bugs.webkit.org/show_bug.cgi?id=196793.

        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::tryCreate):
        * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
        (WebCore::GPUCommandBuffer::copyBufferToTexture):
        (WebCore::GPUCommandBuffer::copyTextureToBuffer):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::trySetInputStateForPipelineDescriptor):

2019-04-12  Ryosuke Niwa  <rniwa@webkit.org>

        Throw TypeError when custom element constructor returns a wrong element or tries to create itself
        https://bugs.webkit.org/show_bug.cgi?id=196892

        Reviewed by Dean Jackson.

        Throw TypeError instead of InvalidStateError for consistency. This updates WebKit's custom elements
        implementation for https://github.com/whatwg/html/pull/4525.

        Tests: imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html
               imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html

        * bindings/js/JSCustomElementInterface.cpp:
        (WebCore::JSCustomElementInterface::upgradeElement):
        * bindings/js/JSHTMLElementCustom.cpp:
        (WebCore::constructJSHTMLElement):

2019-04-15  Don Olmstead  <don.olmstead@sony.com>

        [CMake] WebCore derived sources should only be referenced inside WebCore
        https://bugs.webkit.org/show_bug.cgi?id=196904

        Reviewed by Konstantin Tokarev.

        Use WebCore_DERIVED_SOURCES_DIR instead of DERIVED_SOURCES_WEBCORE_DIR.

        * CMakeLists.txt:
        * PlatformGTK.cmake:
        * PlatformWin.cmake:
        * WebCoreMacros.cmake:

2019-04-15  John Wilander  <wilander@apple.com>

        Send delayed Ad Click Attribution conversion requests to the click source
        https://bugs.webkit.org/show_bug.cgi?id=196838
        <rdar://problem/47650157>

        Reviewed by Chris Dumez and Youenn Fablet.

        WebCore::AdClickAttribution now:
        - Sets m_earliestTimeToSend correctly based on WallTime::now().
        - Allows for a test override of the base URL for conversions.
        - Holds state for whether or not a conversion request has been sent.
        - Outputs m_earliestTimeToSend and m_conversion->hasBeenSent in toString().
        - Returns m_earliestTimeToSend as a result of a call to
        convertAndGetEarliestTimeToSend() which used to be called setConversion().

        Test: http/tests/adClickAttribution/send-attribution-conversion-request.html

        * loader/AdClickAttribution.cpp:
        (WebCore::AdClickAttribution::convertAndGetEarliestTimeToSend):
        (WebCore::AdClickAttribution::url const):
        (WebCore::AdClickAttribution::urlForTesting const):
        (WebCore::AdClickAttribution::markConversionAsSent):
        (WebCore::AdClickAttribution::wasConversionSent const):
        (WebCore::AdClickAttribution::toString const):
        (WebCore::AdClickAttribution::setConversion): Deleted.
            Renamed convertAndGetEarliestTimeToSend().
        * loader/AdClickAttribution.h:
        (WebCore::AdClickAttribution::Conversion::Conversion):
        (WebCore::AdClickAttribution::Conversion::encode const):
        (WebCore::AdClickAttribution::Conversion::decode):
        * platform/Timer.h:
            Now exports nextFireInterval.

2019-04-15  Chris Dumez  <cdumez@apple.com>

        Regression(r237903) Speedometer 2 is 1-2% regressed on iOS
        https://bugs.webkit.org/show_bug.cgi?id=196841
        <rdar://problem/45957016>

        Reviewed by Myles C. Maxfield.

        Speedometer 2 content does not use the text-underline-offset and text-decoration-thickness
        features that were added in r237903 so I looked for behavior changes in the context of
        Speedometer from r237903. I found that RenderStyle::changeAffectsVisualOverflow() started
        returning true a lot more often after r237903. The reason is that r237903 dropped the
        visualOverflowForDecorations() checks in this method and started returning true a lot
        more as a result.

        To restore previous behavior, this patch adds back the visualOverflowForDecorations() checks
        that were dropped in r237903. I have verified that with this patch,
        RenderStyle::changeAffectsVisualOverflow() returns true as many times as it used to before
        r237903.

        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::changeAffectsVisualOverflow const):

2019-04-15  Said Abou-Hallawa  <said@apple.com>

        ASSERT fires when removing a disallowed clone from the shadow tree without reseting its corresponding element
        https://bugs.webkit.org/show_bug.cgi?id=196895

        Reviewed by Darin Adler.

        When cloning elements to the shadow tree of an SVGUseElement, the
        corresponding element links are set from the clones to the originals.
        Later some of the elements may be disallowed to exist in the shadow tree.
        For example the SVGPatternElement is disallowed and has to be removed 
        even after cloning. The problem is the corresponding elements are not
        reset to null. Usually this is not a problem because the removed elements
        will be deleted and the destructor of SVGElement will reset the corresponding
        element links. However in some cases, the cloned element is referenced
        from another SVGElement, for example the target of a SVGTRefElement. In
        this case the clone won't be deleted but it will be linked to the original
        and the event listeners won't be copied from the original. When the
        original is deleted, its event listeners have to be removed. The event
        listeners of the clones also ave to be removed. But because the event
        listeners of the original were not copied when cloning, the assertion in
        SVGElement::removeEventListener() fires.

        Test: svg/custom/use-disallowed-element-clear-corresponding-element.html

        * svg/SVGUseElement.cpp:
        (WebCore::disassociateAndRemoveClones):

2019-04-15  Devin Rousso  <drousso@apple.com>

        Web Inspector: DOMDebugger: "Attribute Modified" breakpoints pause after the modification occurs for the style attribute
        https://bugs.webkit.org/show_bug.cgi?id=196556
        <rdar://problem/49570681>

        Reviewed by Timothy Hatcher.

        Test: inspector/dom-debugger/attribute-modified-style.html

        * css/PropertySetCSSStyleDeclaration.h:
        * css/PropertySetCSSStyleDeclaration.cpp:
        (WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope):
        (WebCore::InlineCSSStyleDeclaration::willMutate): Added.

        * dom/StyledElement.cpp:
        (WebCore::StyledElement::styleAttributeChanged):
        (WebCore::StyledElement::inlineStyleChanged):

        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::willInvalidateStyleAttr): Added.
        (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::willInvalidateStyleAttrImpl): Added.
        (WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):

        * inspector/agents/InspectorDOMAgent.h:
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::didInvalidateStyleAttr):

        * inspector/agents/InspectorDOMDebuggerAgent.h:
        * inspector/agents/InspectorDOMDebuggerAgent.cpp:
        (WebCore::InspectorDOMDebuggerAgent::willInvalidateStyleAttr): Added.
        (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr): Deleted.

2019-04-15  Devin Rousso  <drousso@apple.com>

        Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
        https://bugs.webkit.org/show_bug.cgi?id=196887
        <rdar://problem/49870627>

        Reviewed by Timothy Hatcher.

        Test: inspector/dom/event-listener-add-remove.html
              inspector/dom/event-listener-inspected-node.html

        * inspector/agents/InspectorDOMAgent.h:
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::getEventListenersForNode):
        (WebCore::InspectorDOMAgent::setInspectedNode):
        (WebCore::InspectorDOMAgent::didAddEventListener):
        (WebCore::InspectorDOMAgent::willRemoveEventListener):

2019-04-15  Antoine Quint  <graouts@apple.com>

        Ensure iOS layout traits are used for media controls in modern compatibility mode
        https://bugs.webkit.org/show_bug.cgi?id=196812
        <rdar://problem/47460637>

        Unreviewed. Speculative fix for test regressions on open-source bots.

        * Modules/modern-media-controls/media/media-controller.js:
        (MediaController.prototype.get layoutTraits):

2019-04-11  Antoine Quint  <graouts@apple.com>

        Ensure iOS layout traits are used for media controls in modern compatibility mode
        https://bugs.webkit.org/show_bug.cgi?id=196812
        <rdar://problem/47460637>

        Reviewed by Dean Jackson.

        Test: media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html

        Instead of looking at the UA string, check whether we support touches which is the correct indicator of whether we should
        be using the iOS layout traits for media controls.

        * Modules/modern-media-controls/media/media-controller.js:
        (MediaController.prototype.get layoutTraits):

2019-04-14  Rob Buis  <rbuis@igalia.com>

        Link prefetch not useful for top-level navigation
        https://bugs.webkit.org/show_bug.cgi?id=195623

        Reviewed by Youenn Fablet.

        Cache cross-domain top-level prefetches in a dedicated cache and not in the
        memory cache. Ignore prefetches for content extension checks.

        Tests: http/tests/cache/link-prefetch-main-resource-iframe.html
               http/tests/cache/link-prefetch-main-resource.html

        * loader/LinkLoader.cpp:
        (WebCore::LinkLoader::prefetchIfNeeded):
        * loader/ResourceLoadInfo.cpp:
        (WebCore::toResourceType):
        * loader/ResourceLoadInfo.h:
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::willSendRequestInternal):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):

2019-04-14  Dean Jackson  <dino@apple.com>

        Extract UTI mapping and allow for additions
        https://bugs.webkit.org/show_bug.cgi?id=196822
        <rdar://problem/49822339>

        Reviewed by Darin Adler

        Post landing feedback on minimizing String constructors.

        * platform/network/mac/UTIUtilities.mm:
        (WebCore::MIMETypeFromUTITree):
        (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):

2019-04-14  Don Olmstead  <don.olmstead@sony.com>

        [CMake] JavaScriptCore derived sources should only be referenced inside JavaScriptCore
        https://bugs.webkit.org/show_bug.cgi?id=196742

        Reviewed by Konstantin Tokarev.

        Don't set JavaScriptCore_SCRIPTS_DIR now that it is set within WebKitFS.

        * CMakeLists.txt:

2019-04-12  Antoine Quint  <graouts@apple.com>

        Provide a quirk to disable Pointer Events
        https://bugs.webkit.org/show_bug.cgi?id=196877
        <rdar://problem/49863470>

        Reviewed by Dean Jackson.

        Add a quirk to disable Pointer Events. We also opt a website that has compatibility issues with Pointer Events into this new quirk.

        * dom/PointerEvent.idl:
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldDisablePointerEventsQuirk const):
        * page/Quirks.h:
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::resolveElement):

2019-04-12  Wenson Hsieh  <wenson_hsieh@apple.com>

        Enable modern compatibility mode by default in WKWebView on some devices
        https://bugs.webkit.org/show_bug.cgi?id=196883
        <rdar://problem/49864527>

        Reviewed by Tim Horton.

        Add a new helper function to determine whether an app is pre-installed on iOS, for the purposes of ensuring
        compatibility with existing Apple apps that are not affected by linked-on-or-after. This involves all apps with
        a bundle ID that begins with "com.apple.".

        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::setApplicationBundleIdentifier):
        (WebCore::applicationBundleStartsWith):
        (WebCore::IOSApplication::isAppleApplication):

2019-04-12  Justin Fan  <justin_fan@apple.com>

        [Web GPU] Prevent narrowing conversions during Metal function calls on 32-bit platforms
        https://bugs.webkit.org/show_bug.cgi?id=196793

        Reviewed by Darin Adler.

        On 32-bit platforms, NSUInteger is 32-bit, which limits certain Web GPU parameters. 
        Ensure that valid parameters are properly converted to NSUInteger for Metal calls, regardless of platform.

        * platform/graphics/gpu/GPUBuffer.h:
        (WebCore::GPUBuffer::byteLength const):
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
        (WebCore::tryGetResourceAsBufferBinding):
        (WebCore::setBufferOnEncoder):
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::validateBufferUsage):
        (WebCore::GPUBuffer::tryCreate):
        (WebCore::GPUBuffer::GPUBuffer):
        (WebCore::GPUBuffer::setSubData):
        * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
        (WebCore::GPUCommandBuffer::copyBufferToBuffer):
        (WebCore::GPUCommandBuffer::copyBufferToTexture):
        (WebCore::GPUCommandBuffer::copyTextureToBuffer):
        * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
        (WebCore::GPURenderPassEncoder::drawIndexed):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::trySetInputStateForPipelineDescriptor):

2019-04-12  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed fix for non-unified build.

        * dom/ScriptedAnimationController.h:
        Add missing include from r244182.

2019-04-11  Ryosuke Niwa  <rniwa@webkit.org>

        WebThread should run at a higher priority than user initiated
        https://bugs.webkit.org/show_bug.cgi?id=196849
        <rdar://problem/46851062>

        Reviewed by Geoffrey Garen.

        Use QOS_CLASS_USER_INTERACTIVE on WebThread with -10 relative priority so that WebThread
        won't wait for other threads with priority 30-37 but does not content with the main thread.

        Also removed the call to pthread_attr_setschedparam which disables QoS.

        This improves the blocked time in StartWebThread from 2~3ms to 250μs while cold launching
        iBooks to an opened book.

        * platform/ios/wak/WebCoreThread.mm:
        (StartWebThread): Replaced 200 * 4096 by 800 * KB for a better readability.

2019-04-12  Ryosuke Niwa  <rniwa@webkit.org>

        Add CSS Shadow Parts as a feature under consideration
        https://bugs.webkit.org/show_bug.cgi?id=196835

        Reviewed by Antti Koivisto.

        This feature is under consideration.

        * features.json:

2019-04-12  Ross Kirsling  <ross.kirsling@sony.com>

        WebKit should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
        https://bugs.webkit.org/show_bug.cgi?id=196845

        Reviewed by Ryosuke Niwa.

        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::FontProxy::initialize):
        (WebCore::CanvasRenderingContext2DBase::FontProxy::fontMetrics const):
        (WebCore::CanvasRenderingContext2DBase::FontProxy::fontDescription const):
        (WebCore::CanvasRenderingContext2DBase::FontProxy::width const):
        (WebCore::CanvasRenderingContext2DBase::FontProxy::drawBidiText const):
        (WebCore::CanvasRenderingContext2DBase::beginCompositeLayer):
        (WebCore::CanvasRenderingContext2DBase::endCompositeLayer):
        Remove inline specifier to address linking errors (regardless of CMake platform).
        Doing this in a .cpp file interferes with symbol creation.

        * Modules/mediastream/MediaStreamTrack.cpp:
        * Modules/webvr/VREyeParameters.cpp:
        * Modules/webvr/VRFrameData.cpp:
        * Modules/webvr/VRPose.cpp:
        * accessibility/AccessibilityList.cpp:
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        * bindings/js/JSDOMConvertWebGL.cpp:
        * bindings/js/JSHistoryCustom.cpp:
        * bindings/js/JSIDBCursorWithValueCustom.cpp:
        * bindings/js/JSPerformanceObserverCustom.cpp:
        * bindings/js/WindowProxy.cpp:
        * platform/ColorData.gperf:
        * platform/mediastream/RealtimeMediaSourceSettings.cpp:
        * platform/network/DNSResolveQueue.cpp:
        * workers/service/ServiceWorkerClientQueryOptions.h:
        * workers/service/ServiceWorkerContainer.cpp:
        Add missing includes to address compiler errors on GTK.

2019-04-12  Zalan Bujtas  <zalan@apple.com>

        REGRESSION (r244098): [ Mac WK1 ] Layout Test fast/dynamic/paused-event-dispatch.html is Timing out
        https://bugs.webkit.org/show_bug.cgi?id=196789
        <rdar://problem/49855255>

        Reviewed by Tim Horton.

        Disable auto-sizing mode at the start of each test.

        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):

2019-04-12  Eric Carlson  <eric.carlson@apple.com>

        Update AudioSession route sharing policy
        https://bugs.webkit.org/show_bug.cgi?id=196776
        <rdar://problem/46501611>

        Reviewed by Jer Noble.

        No new tests, updated an API test.

        * platform/audio/AudioSession.cpp:
        (WebCore::convertEnumerationToString):
        * platform/audio/AudioSession.h:
        (WTF::LogArgument<WebCore::RouteSharingPolicy>::toString):
        (WTF::LogArgument<WebCore::AudioSession::CategoryType>::toString):
        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
        (MediaSessionManagerCocoa::updateSessionState):
        * platform/audio/ios/AudioSessionIOS.mm:
        (WebCore::AudioSession::setCategory):
        (WebCore::AudioSession::routeSharingPolicy const):
        * platform/audio/mac/AudioSessionMac.cpp:
        (WebCore::AudioSession::setCategory):

2019-04-12  Antoine Quint  <graouts@apple.com>

        Opt some websites into the simulated mouse events dispatch quirk when in modern compatibility mode
        https://bugs.webkit.org/show_bug.cgi?id=196830
        <rdar://problem/49124313>

        Reviewed by Wenson Hsieh.

        We add a new policy to determine whether simulated mouse events dispatch are allowed and use it to determine whether the
        simulated mouse events dispatch quirk can be used for a given website. We then check the domain name for the current page's
        document to see if it matches some known websites that require this quirk.

        We needed to add some calls into Quirks::shouldDispatchSimulateMouseEvents() where we used to only consult the RuntimeEnabledFeature
        flag to ensure we correctly created touch regions for simulated mouse events.

        * dom/EventNames.h:
        (WebCore::EventNames::isTouchRelatedEventType const):
        * dom/Node.cpp:
        (WebCore::Node::moveNodeToNewDocument):
        (WebCore::tryAddEventListener):
        (WebCore::tryRemoveEventListener):
        (WebCore::Node::defaultEventHandler):
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::simulatedMouseEventsDispatchPolicy const):
        (WebCore::DocumentLoader::setSimulatedMouseEventsDispatchPolicy):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::addEventListener):
        (WebCore::DOMWindow::removeEventListener):
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
        (WebCore::Quirks::shouldDispatchSimulateMouseEvents const): Deleted.
        * page/Quirks.h:

2019-04-11  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Wrong scrolling behavior for nested absolute position elements inside overflow scroll
        https://bugs.webkit.org/show_bug.cgi?id=196146

        Reviewed by Antti Koivisto.
        
        computeCoordinatedPositioningForLayer() failed to handle nested positions elements
        inside overflow scroll, because it only walked up to the first containing block of
        a nested position:absolute. We need to walk all the way up the ancestor layer chain,
        looking at containing block, scroller and composited ancestor relationships.

        Make this code easier to understand by writing it in terms of "is foo scrolled by bar", rather than
        trying to collapse all the logic into a single ancestor walk, which was really hard. This is a few
        more ancestor traversals, but we now only run this code if there's composited scrolling
        in the ancestor chain.

        Tests: scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html
               scrollingcoordinator/scrolling-tree/nested-absolute-in-overflow.html
               scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html
               scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::enclosingCompositedScrollingLayer):
        (WebCore::isScrolledByOverflowScrollLayer):
        (WebCore::isNonScrolledLayerInsideScrolledCompositedAncestor):
        (WebCore::RenderLayerCompositor::layerContainingBlockCrossesCoordinatedScrollingBoundary):
        (WebCore::collectStationaryLayerRelatedOverflowNodes):
        (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
        (WebCore::collectRelatedCoordinatedScrollingNodes):
        (WebCore::layerParentedAcrossCoordinatedScrollingBoundary): Deleted.

2019-04-12  Manuel Rego Casasnovas  <rego@igalia.com>

        [css-flex][css-grid] Fix synthesized baseline
        https://bugs.webkit.org/show_bug.cgi?id=196312

        Reviewed by Javier Fernandez.

        When a flex or grid container has no baseline,
        its baseline should be synthesized from the border edges.
        The same happens for flex and grid items.
        
        Right now we were using the content box in some cases
        and even using the margin box in a particular scenario.
        The patch fixes this.
        
        At the same time this is also fixing the baseline for
        inline flex/grid containers to make it interoperable with Firefox.
        Inline blocks have a special behavior per legacy reasons,
        which applies to inline flex/grid containers when they have no items;
        otherwise the items should be used to compute its baseline.
        See more at: https://github.com/w3c/csswg-drafts/issues/3416

        Note that we need to keep current behavior for buttons,
        as the flexbox spec doesn't apply to them.

        Tests: css3/flexbox/flexbox-baseline-margins.html
               fast/css-grid-layout/grid-baseline-margins-1.html
               fast/css-grid-layout/grid-baseline-margins-2.html
               imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-flexbox-001.html
               imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-grid-001.html
               imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-inline-block-001.html

        * rendering/RenderButton.cpp:
        (WebCore::synthesizedBaselineFromContentBox):
        (WebCore::RenderButton::baselinePosition const):
        * rendering/RenderButton.h:
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::synthesizedBaselineFromBorderBox):
        (WebCore::RenderFlexibleBox::baselinePosition const):
        (WebCore::RenderFlexibleBox::firstLineBaseline const):
        (WebCore::RenderFlexibleBox::inlineBlockBaseline const):
        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::baselinePosition const):
        (WebCore::RenderGrid::inlineBlockBaseline const):

2019-04-11  Simon Fraser  <simon.fraser@apple.com>

        Avoid doing positioned scrolling tree node work for layers not inside overflow:scroll
        https://bugs.webkit.org/show_bug.cgi?id=196848

        Reviewed by Zalan Bujtas.

        Maintain a bit on RenderLayer which says if a layer has a composited scrolling ancestor
        in the layer tree. We only need to do work related to making positioned scrolling tree nodes
        for layers which are layer tree descendants of overflow:scroll.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer):
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::outputPaintOrderTreeLegend):
        (WebCore::outputPaintOrderTreeRecursive):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
        (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
        (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):
        (WebCore::RenderLayerCompositor::fixedLayerIntersectsViewport const):
        (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):

2019-04-11  Zalan Bujtas  <zalan@apple.com>

        Try to fix Windows build.

        * page/PrintContext.cpp:
        (WebCore::PrintContext::computedPageMargin):

2019-04-11  Megan Gardner  <megan_gardner@apple.com>

        Update 'Save Image' to more clear instructions
        https://bugs.webkit.org/show_bug.cgi?id=196833
        <rdar://problem/47446845>

        Reviewed by Wenson Hsieh.

        Not testable, UI change only.

        * en.lproj/Localizable.strings:

2019-04-11  Zalan Bujtas  <zalan@apple.com>

        Add @page margin support
        https://bugs.webkit.org/show_bug.cgi?id=196680
        <rdar://problem/45217707>

        Reviewed by Tim Horton.

        This patch adds support for @page margin. This feature is currently behind a runtime flag and is off by default.
        We resolve the @page margin values in the WebProcess (currently no pseudo class is supported) and transfer them to the UIProcess through computedPagesCallback.
        UIProcess is responsible for applying these new values on the printer. We also re-compute the available width/height for the current printing context
        in the WebProcess if needed (see PrintInfo for current printer margins).

        Tests: printing/page-with-10mm-left-margin.html
               printing/page-with-zero-margin.html

        * page/PrintContext.cpp:
        (WebCore::PrintContext::computedPageMargin):
        (WebCore::PrintContext::computedPageSize):
        * page/PrintContext.h:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::pageAtRuleSupportEnabled const):
        (WebCore::RuntimeEnabledFeatures::setPageAtRuleSupportEnabled):

2019-04-11  Dean Jackson  <dino@apple.com>

        Extract UTI mapping and allow for additions
        https://bugs.webkit.org/show_bug.cgi?id=196822
        <rdar://problem/49822339>

        Reviewed by Tim Horton.

        Add an ADDITIONAL_SYSTEM_PREVIEW_TYPES macro to the list
        of accepted MIME types. And add a new helper to map
        MIME types to UTI types when the system was unable to
        find an existing type.

        * platform/MIMETypeRegistry.cpp:
        (WebCore::MIMETypeRegistry::systemPreviewMIMETypes):
        * platform/network/mac/UTIUtilities.mm:
        (WebCore::UTIFromUnknownMIMEType):
        (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):

2019-04-09  Ryosuke Niwa  <rniwa@webkit.org>

        [iOS] Moving backwards by word granularity does not work if the previous line was inside another block element
        https://bugs.webkit.org/show_bug.cgi?id=196670

        Reviewed by Wenson Hsieh.

        The bug was ultimately caused by two reasons:
         1. On iOS, previousWordPositionBoundary would identify a blank line as a word boundary.
         2. SimplifiedBackwardsTextIterator generates a new line character (\n) between two block elements.

        When moving backwards by word granularity, therefore, previousBoundary would encounter a new line created by (2)
        and then previousWordPositionBoundary would identify it as a word boundary.

        Fixed the bug (2) by adding the same check as TextIterator::exitNode has to avoid generating an extra new line
        character following an exiting new line character. Also added internals.rangeAsTextUsingBackwardsTextIterator
        to make SimplifiedBackwardsTextIterator directly testable in layout tests.

        This fix unveiled an unrelated bug when moving backwards with sentence granularity at the beginning of a line.
        In this case, WebKit was previously feeding ICU with the previous line's content followed by two new lines,
        which constituted a new sentence. However after the fix, ICU no longer detects a new sentence after the end
        of the prevous line. This patch, therefore, introduces a new optional argument to previousBoundary which forces
        the succeeding paragraph's content (i.e. the content of the line from which we're moving backwards with sentence
        granularity) to be fed to ICU. This fixes the bug that we were previously not being able to move backwards
        with sentence granularity at the beginning of a line as indicated by the new tests.

        Tests: editing/selection/extend-selection-backward-at-beginning-of-line-by-sentence-granularity.html
               editing/selection/extend-selection-backward-at-beginning-of-line-by-word-granularity.html
               editing/selection/move-selection-backward-at-beginning-of-line-by-sentence-granularity.html
               editing/selection/move-selection-backward-at-beginning-of-line-by-word-granularity.html
               editing/text-iterator/backwards-text-iterator-basic.html

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::previousBoundary): Fixed the bug that moving backwards with sentence granularity at
        the beginning of a line does not work like we did in VisibleUnits. See the description below. It's tested by
        an existing layout test accessibility/mac/text-marker-sentence-nav.html, which would fail without this fix.
        (WebCore::AXObjectCache::startCharacterOffsetOfSentence):
        * accessibility/AXObjectCache.h:
        (WebCore::CharacterOffset::isEqual const):
        * editing/TextIterator.cpp:
        (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Fixed the bug that we were generating two line
        lines between block elements. This fixes the bug that moving backwards with word granularity at the beginning
        of a line fails on iOS.
        (WebCore::plainTextUsingBackwardsTextIteratorForTesting): Added.
        * editing/TextIterator.h:
        * editing/VisibleUnits.cpp:
        (WebCore::previousBoundary): Added the code to extract the succeeding paragraph's content as context for ICU.
        This fixes the bug that moving backwards with sentence granularity at the beginning of a line fails.
        Limit the length of backwards iteration at the current position to avoid traversing backwards beyond
        the current position, and fixed a bug that an early return for the text node was not taking the suffix length
        into account when deciding whether next position resides in the starting container node or not.
        (WebCore::startSentenceBoundary):
        (WebCore::startOfSentence):
        * testing/Internals.cpp:
        (WebCore::Internals::rangeAsTextUsingBackwardsTextIterator): Added.
        * testing/Internals.h:
        * testing/Internals.idl:

2019-04-11  Wenson Hsieh  <wenson_hsieh@apple.com>

        Allow the MediaSource API to be enabled via website policy
        https://bugs.webkit.org/show_bug.cgi?id=196429
        <rdar://problem/48774333>

        Reviewed by Tim Horton.

        Add support in DocumentLoader for adjusting page settings using its per-site policies. See WebKit ChangeLog for
        more detail (in particular, the implementation of applyToDocumentLoader).

        Test: fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::applyPoliciesToSettings const):
        (WebCore::DocumentLoader::attachToFrame):
        * loader/DocumentLoader.h:

        Add an enum class for MediaSource policies; while we're at it, make all of these enum values 8 bits wide.

        (WebCore::DocumentLoader::mediaSourcePolicy const):
        (WebCore::DocumentLoader::setMediaSourcePolicy):

2019-04-11  Youenn Fablet  <youenn@apple.com>

        Support RTCDataChannel blob binaryType
        https://bugs.webkit.org/show_bug.cgi?id=196821

        Reviewed by Eric Carlson.

        Add support for receiving blobs.
        Default value is still left to 'arraybuffer' which is not spec compliant.
        Covered by rebased test.

        * Modules/mediastream/RTCDataChannel.cpp:
        (WebCore::RTCDataChannel::setBinaryType):
        (WebCore::RTCDataChannel::didReceiveRawData):

2019-04-11  Devin Rousso  <drousso@apple.com>

        Web Inspector: Timelines: can't reliably stop/start a recording
        https://bugs.webkit.org/show_bug.cgi?id=196778
        <rdar://problem/47606798>

        Reviewed by Timothy Hatcher.

        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
        (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
        It is possible to determine when programmatic capturing starts/stops in the frontend based
        on the state when the backend causes the state to change, such as if the state is "inactive"
        when the frontend is told that the backend has started capturing.

        * inspector/agents/InspectorCPUProfilerAgent.cpp:
        (WebCore::InspectorCPUProfilerAgent::stopTracking):
        * inspector/agents/InspectorMemoryAgent.cpp:
        (WebCore::InspectorMemoryAgent::stopTracking):
        Send an end timestamp to match other instruments.

2019-04-11  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r244158.

        Casued 8 inspector/timeline/ test failures.

        Reverted changeset:

        "Web Inspector: Timelines: can't reliably stop/start a
        recording"
        https://bugs.webkit.org/show_bug.cgi?id=196778
        https://trac.webkit.org/changeset/244158

2019-04-11  Pablo Saavedra  <psaavedra@igalia.com>

        [WPE] Build error with ENABLE_VIDEO=OFF after r244078
        https://bugs.webkit.org/show_bug.cgi?id=196811

        createGenericCue() is only defined when VIDEO_TRACK is enabled.

        Reviewed by Eric Carlson.

        * testing/Internals.cpp:
        (WebCore::Internals::createGenericCue):
        * testing/Internals.h:

2019-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Layout test accessibility/aria-hidden-false-works-in-subtrees.html fails after r184890
        https://bugs.webkit.org/show_bug.cgi?id=146718
        <rdar://problem/21722487>

        Reviewed by Joanmarie Diggs.

        Allow to get the text under element for nodes hidden in DOM but explicitly exposed to accessibility with
        aria-hidden="false".

        Fixes: accessibility/aria-hidden-false-works-in-subtrees.html

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::textUnderElement const):
        * accessibility/atk/WebKitAccessible.cpp:
        (roleIsTextType): Also consider ApplicationGroup role as text elements, so that <div>text</div> is equivalent to
        <div role="roup">test</div>.

2019-04-10  Said Abou-Hallawa  <sabouhallawa@apple.com>

        requestAnimationFrame should execute before the next frame
        https://bugs.webkit.org/show_bug.cgi?id=177484

        Reviewed by Simon Fraser.

        This change fixes these issues with animation timing:

        1. Calling the requestAnimationFrame callbacks would have happened when
           the DisplayLink fires. This may have happened even if the frame is
           missed and no display is committed.

        2. Style changes and layout triggered by script could trigger painting
           at more than 60fps. CoreAnimation commits could happen at more than
           60fps, although WindowServer will throttle those, and only some will
           be shown on the screen.

        This change introduces a new paint scheduling model where painting is
        driven by a "RenderingUpdateScheduler", which only triggers paints once
        per 16.7ms frame.

        Code that previously scheduled a compositing layer flush now schedules a
        "RenderingUpdate", and that update is driven by a DisplayRefreshMonitor
        callback. When the render happens, we service requestAnimationFrame callbacks,
        Web Animations, intersection observations and resize observations per the
        "Update the rendering" step of the HTML Event Loop specification:
        <https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering>.

        In the future, more rendering steps will be added to this code.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
        Fix layout tests by adding null check.

        * animation/DocumentAnimationScheduler.cpp: Removed.
        * animation/DocumentAnimationScheduler.h: Removed.
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::DocumentTimeline):
        (WebCore::DocumentTimeline::updateThrottlingState):
        (WebCore::DocumentTimeline::suspendAnimations):
        (WebCore::DocumentTimeline::resumeAnimations):
        (WebCore::DocumentTimeline::liveCurrentTime const):
        (WebCore::DocumentTimeline::currentTime):
        (WebCore::DocumentTimeline::cacheCurrentTime):
        (WebCore::DocumentTimeline::animationTimingDidChange):
        (WebCore::DocumentTimeline::scheduleAnimationResolution):
        (WebCore::DocumentTimeline::unscheduleAnimationResolution):
        (WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
        (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):
        (WebCore::DocumentTimeline::scheduleNextTick):
        (WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement):
        Simplify this function by handling the case of no-animations separately.

        (WebCore::DocumentTimeline::resolveAnimationsForElement):
        Simplify the loop and delete hasPendingAcceleratedAnimations because it
        is initialized to true and is not changed inside the loop.

        (WebCore::DocumentTimeline::scheduleAnimationResolutionIfNeeded): Deleted.
        (WebCore::DocumentTimeline::animationResolutionTimerFired): Deleted.
        * animation/DocumentTimeline.h:
        * dom/Document.cpp:
        (WebCore::Document::resolveStyle):
        There is no need to force update in resolveStyle(). notifyFlushRequired()
        will be called eventually which will scheduleRenderingUpdate().

        (WebCore::Document::prepareForDestruction):
        (WebCore::Document::updateAnimationsAndSendEvents):
        (WebCore::Document::serviceRequestAnimationFrameCallbacks):
        (WebCore::Document::windowScreenDidChange):
        (WebCore::Document::scheduleRenderingUpdate):
        (WebCore::Document::updateIntersectionObservations):
        (WebCore::Document::addResizeObserver):
        (WebCore::Document::updateResizeObservations):
        (WebCore::Document::scheduleForcedIntersectionObservationUpdate): Deleted.
        (WebCore::Document::scheduleResizeObservations): Deleted.
        (WebCore::Document::animationScheduler): Deleted.
        No need to schedule web-animations, intersection observations and resize
        observations updates separately. All of them will be updated through the
        "Update the rendering" step, i.e. Page::updateRendering().        

        * dom/Document.h:
        (WebCore::Document::numberOfIntersectionObservers const):
        * dom/ScriptedAnimationController.cpp:
        (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
        (WebCore::ScriptedAnimationController::scheduleAnimation):
        (WebCore::ScriptedAnimationController::animationTimerFired):
        (WebCore::ScriptedAnimationController::serviceScriptedAnimations): Deleted.
        (WebCore::ScriptedAnimationController::documentAnimationSchedulerDidFire): Deleted.
        * dom/ScriptedAnimationController.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::didLayout):
        (WebCore::FrameView::viewportContentsChanged):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layoutTimerFired):
        * page/IntersectionObserver.cpp:
        (WebCore::IntersectionObserver::observe):
        * page/Page.cpp:
        (WebCore::Page::Page):
        (WebCore::Page::layoutIfNeeded):
        (WebCore::Page::updateRendering):
        (WebCore::Page::renderingUpdateScheduler):
        (WebCore::Page::willDisplayPage): Deleted.
        (WebCore::Page::addDocumentNeedingIntersectionObservationUpdate): Deleted.
        (WebCore::Page::updateIntersectionObservations): Deleted.
        (WebCore::Page::scheduleForcedIntersectionObservationUpdate): Deleted.
        (WebCore::Page::hasResizeObservers const): Deleted.
        (WebCore::Page::gatherDocumentsNeedingResizeObservationCheck): Deleted.
        (WebCore::Page::checkResizeObservations): Deleted.
        (WebCore::Page::scheduleResizeObservations): Deleted.
        (WebCore::Page::notifyResizeObservers): Deleted.
        * page/Page.h:
        (WebCore::Page::setNeedsCheckResizeObservations): Deleted.
        (WebCore::Page::needsCheckResizeObservations const): Deleted.
        The IntersectionObserver and the ResizeObserver do not need to schedule
        their own timers. The RenderingUpdateScheduler will schedule the "Update
        the rendering" step in which these obverses will be served.

        * page/PageOverlayController.cpp:
        (WebCore::PageOverlayController::didChangeViewExposedRect):
        (WebCore::PageOverlayController::notifyFlushRequired):
        Force committing the layers to be 60 fps at maximum.

        * page/RenderingUpdateScheduler.cpp: Added.
        (WebCore::RenderingUpdateScheduler::RenderingUpdateScheduler):
        (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
        (WebCore::RenderingUpdateScheduler::isScheduled const):
        (WebCore::RenderingUpdateScheduler::startTimer):
        (WebCore::RenderingUpdateScheduler::clearScheduled):
        (WebCore::RenderingUpdateScheduler::createDisplayRefreshMonitor const):
        (WebCore::RenderingUpdateScheduler::windowScreenDidChange):
        (WebCore::RenderingUpdateScheduler::displayRefreshFired):
        (WebCore::RenderingUpdateScheduler::scheduleCompositingLayerFlush):
        * page/RenderingUpdateScheduler.h: Added.
        (WebCore::RenderingUpdateScheduler::create):
        * page/ResizeObserver.cpp:
        (WebCore::ResizeObserver::observe):
        (WebCore::ResizeObserver::scheduleObservations): Deleted.
        * page/ResizeObserver.h:
        (WebCore::ResizeObserver::hasActiveObservations const):
        * page/ios/ContentChangeObserver.h:
        * page/mac/ServicesOverlayController.mm:
        (WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
        * page/scrolling/ScrollingStateTree.cpp:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::scheduleLayerFlushNow):
        (WebCore::RenderLayerCompositor::layerTreeAsText):

2019-04-10  Ryosuke Niwa  <rniwa@webkit.org>

        Nullptr crash in CompositeEditCommand::moveParagraphs when root editable element goes away
        https://bugs.webkit.org/show_bug.cgi?id=193027

        Reviewed by Wenson Hsieh.

        Added an early exit when the root editable element (editing host in HTML5 spec terminology) is null
        during CompositeEditCommand::moveParagraphs. This could happen when the website does something crazy
        like removing contenteditable content attribute during DOM mutations or when the destination becomes
        disconnected (orphaned) from the document due to bugs elsewhere in the codebase.

        Test: editing/deleting/merge-paragraphs-null-root-editable-element-crash.html

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphs): Added an early exit.

2019-04-10  Devin Rousso  <drousso@apple.com>

        Web Inspector: save sheet should be anchored underneath the tab bar when detached
        https://bugs.webkit.org/show_bug.cgi?id=196722
        <rdar://problem/49613280>

        Reviewed by Timothy Hatcher.

        No web observable change.

        * inspector/InspectorFrontendClient.h:
        (WebCore::InspectorFrontendClient::changeSheetRect): Added.

        * inspector/InspectorFrontendClientLocal.h:
        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::changeSheetRect): Added.

        * inspector/InspectorFrontendHost.idl:
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::setSheetRect): Added.

        * testing/Internals.cpp:
        (WebCore::InspectorStubFrontend::setSheetRect): Added.

2019-04-10  Devin Rousso  <drousso@apple.com>

        Web Inspector: Inspector: lazily create the agent
        https://bugs.webkit.org/show_bug.cgi?id=195971
        <rdar://problem/49039645>

        Reviewed by Joseph Pecoraro.

        No change in functionality.

        * inspector/InspectorController.h:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::InspectorController):
        (WebCore::InspectorController::createLazyAgents):
        (WebCore::InspectorController::evaluateForTestInFrontend):
        (WebCore::InspectorController::ensureInspectorAgent):

2019-04-10  Megan Gardner  <megan_gardner@apple.com>

        Remove unneeded extern C
        https://bugs.webkit.org/show_bug.cgi?id=196786

        Reviewed by Tim Horton.

        No tests needed, just needs to compile.

        Removing staging hack for Reveal framework.

        * editing/cocoa/DictionaryLookup.mm:

2019-04-10  Devin Rousso  <drousso@apple.com>

        Web Inspector: REGRESSION: lazy agents used outside of frontend/instrumentation can be accessed before being created
        https://bugs.webkit.org/show_bug.cgi?id=196725
        <rdar://problem/49669810>

        Reviewed by Timothy Hatcher.

        Move the logic for creating the `InspectorPageAgent` and `InspectorDOMAgent` into separate
        functions so that callers into `InspectorController` can be guaranteed to have a valid
        instance of the agent.

        This doesn't interfere with the `Page.enable` command, as it doesn't clear any saved state.
        There is no `DOM.enable` command, so there's no issue there either.

        * inspector/InspectorController.h:
        (WebCore::InspectorController::pageAgent): Deleted.
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::createLazyAgents):
        (WebCore::InspectorController::inspect):
        (WebCore::InspectorController::hideHighlight):
        (WebCore::InspectorController::ensureDOMAgent): Added.
        (WebCore::InspectorController::ensurePageAgent): Added.

        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):

2019-04-10  Alex Christensen  <achristensen@webkit.org>

        Add SPI WKNavigationResponse._downloadAttribute
        https://bugs.webkit.org/show_bug.cgi?id=196755
        <rdar://49587365>

        Reviewed by Brady Eidson.

        Covered by an API test that validates the attribute is correctly sent through the FrameLoader to the API.
        When a user clicks on a link with a download attribute, the download attribute should be used as the suggested filename sometimes.
        The application needs this information after it has received the response in order to make fully informed decisions about downloads.
        In order to get this attribute to the decidePolicyForNavigationResponse, we need to store the attribute on the DocumentLoader
        from the FrameLoadRequest then send it from the DocumentLoader when the response is received.

        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::setDownloadAttribute):
        (WebCore::DocumentLoader::downloadAttribute const):
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkContentPolicy):
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::loadWithNavigationAction):
        (WebCore::FrameLoader::loadPostRequest):
        * loader/FrameLoader.h:
        (WebCore::FrameLoader::loadWithNavigationAction):
        * loader/FrameLoaderClient.h:

2019-04-10  Youenn Fablet  <youenn@apple.com>

        SWClientConnection should not double hop to fire some events
        https://bugs.webkit.org/show_bug.cgi?id=196735

        Reviewed by Alex Christensen.

        Some events, like postMessage in service workers is hopping from main thread to service worker thread to dispatch events.
        Some other events, like service worker state update, are hopping from main thread to service worker thread, then posting a task to dispatch events.
        This may create ordering problems.

        To fix the issue, we now hop to the service worker thread and dispatch the events.
        In addition, for documents, we post a task and do the whole service worker processing in it.
        This ensures that some tests, like whether there is a service worker container,
        or creation of a service worker are done consistently.

        Covered by unflaked test.

        * workers/service/SWClientConnection.cpp:
        (WebCore::SWClientConnection::updateRegistrationState):
        (WebCore::SWClientConnection::updateWorkerState):
        (WebCore::SWClientConnection::fireUpdateFoundEvent):
        (WebCore::SWClientConnection::notifyClientsOfControllerChange):
        * workers/service/ServiceWorker.cpp:
        (WebCore::ServiceWorker::updateState):
        * workers/service/ServiceWorker.h:
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::updateRegistrationState):
        (WebCore::ServiceWorkerContainer::fireUpdateFoundEvent):
        (WebCore::ServiceWorkerContainer::fireControllerChangeEvent):
        * workers/service/ServiceWorkerContainer.h:
        * workers/service/ServiceWorkerJob.cpp:
        (WebCore::ServiceWorkerJob::notifyFinished):
        Notify of the script URL in the error message.
        This will help diagnose flakiness issues.
        * workers/service/ServiceWorkerRegistration.cpp:
        (WebCore::ServiceWorkerRegistration::fireUpdateFoundEvent):
        * workers/service/ServiceWorkerRegistration.h:

2019-04-10  Devin Rousso  <drousso@apple.com>

        Web Inspector: Timelines: can't reliably stop/start a recording
        https://bugs.webkit.org/show_bug.cgi?id=196778
        <rdar://problem/47606798>

        Reviewed by Timothy Hatcher.

        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
        (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
        It is possible to determine when programmatic capturing starts/stops in the frontend based
        on the state when the backend causes the state to change, such as if the state is "inactive"
        when the frontend is told that the backend has started capturing.

        * inspector/agents/InspectorCPUProfilerAgent.cpp:
        (WebCore::InspectorCPUProfilerAgent::stopTracking):
        * inspector/agents/InspectorMemoryAgent.cpp:
        (WebCore::InspectorMemoryAgent::stopTracking):
        Send an end timestamp to match other instruments.

2019-04-10  Tim Horton  <timothy_horton@apple.com>

        Add modern API for overriding the page's specified viewport configuration
        https://bugs.webkit.org/show_bug.cgi?id=167734
        <rdar://problem/30331795>

        Reviewed by Simon Fraser.

        New API test: WebKit.OverrideViewportArguments

        * dom/Document.cpp:
        (WebCore::Document::updateViewportArguments):
        * dom/Document.h:
        (WebCore::Document::viewportArguments const):
        Make the viewportArguments() getter respect the overridden arguments.

        * dom/ViewportArguments.cpp:
        (WebCore::numericPrefix):
        (WebCore::findSizeValue):
        (WebCore::findScaleValue):
        (WebCore::findBooleanValue):
        (WebCore::parseViewportFitValue):
        (WebCore::viewportErrorMessage):
        (WebCore::reportViewportWarning):
        (WebCore::setViewportFeature):
        * dom/ViewportArguments.h:
        Make it possible to parse ViewportArguments without a Document, so
        that it can be used in the UI process. We only used the Document for
        two things: error reporting, and getting the state of one setting.
        Refactor error handling to use a passed-arund function, and add a
        variant of setViewportFeature() that doesn't take a Document.

2019-04-10  Justin Fan  <justin_fan@apple.com>

        [Web GPU] Indexed drawing and GPUCommandEncoder crash prevention
        https://bugs.webkit.org/show_bug.cgi?id=196758

        Reviewed by Dean Jackson.

        Test: webgpu/draw-indexed-triangles.html

        Implement GPURenderPassEncoder::setIndexBuffer and GPURenderPassEncoder::drawIndexed to enable indexed drawing.
        Disable GPUCommandEncoders with active pass encoders from being submitted or encoding blits. 

        Prevent active GPUCommandEncoders from being submitted or encoding blit commands:
        * Modules/webgpu/WebGPUCommandEncoder.cpp:
        (WebCore::WebGPUCommandEncoder::finish):
        * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
        (WebCore::GPUCommandBuffer::copyBufferToBuffer):
        (WebCore::GPUCommandBuffer::copyBufferToTexture):
        (WebCore::GPUCommandBuffer::copyTextureToBuffer):
        (WebCore::GPUCommandBuffer::copyTextureToTexture):

        Implement GPURenderPassEncoder::setIndexBuffer and GPURenderPassEncoder::drawIndexed:
        * Modules/webgpu/WebGPURenderPassEncoder.cpp:
        (WebCore::WebGPURenderPassEncoder::setIndexBuffer):
        (WebCore::WebGPURenderPassEncoder::setVertexBuffers): Remove unnecessary move operations.
        (WebCore::WebGPURenderPassEncoder::drawIndexed): Added.
        * Modules/webgpu/WebGPURenderPassEncoder.h:
        * Modules/webgpu/WebGPURenderPassEncoder.idl:
        * platform/graphics/gpu/GPUBuffer.h:
        (WebCore::GPUBuffer::isIndex const):
        * platform/graphics/gpu/GPUInputStateDescriptor.h:
        * platform/graphics/gpu/GPURenderPassEncoder.h: Cache the index buffer, as Metal does not set the index buffer separate from the draw call.
        * platform/graphics/gpu/GPURenderPipeline.h:
        (WebCore::GPURenderPipeline::indexFormat const):
        * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
        (WebCore::GPURenderPassEncoder::setIndexBuffer):
        (WebCore::GPURenderPassEncoder::setVertexBuffers):
        (WebCore::mtlPrimitiveTypeForGPUPrimitiveTopology):
        (WebCore::GPURenderPassEncoder::draw):
        (WebCore::mtlIndexTypeForGPUIndexFormat): Added.
        (WebCore::GPURenderPassEncoder::drawIndexed): Added.
        (WebCore::primitiveTypeForGPUPrimitiveTopology): Deleted.
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::GPURenderPipeline::tryCreate):
        (WebCore::GPURenderPipeline::GPURenderPipeline):

2019-04-09  Ryosuke Niwa  <rniwa@webkit.org>

        OfflineAudioDestinationNode::startRendering leaks OfflineAudioDestinationNode if offlineRender exists early
        https://bugs.webkit.org/show_bug.cgi?id=196759

        Reviewed by Eric Carlson.

        OfflineAudioDestinationNode::startRendering unconditionally ref's itself before invoking offlineRender() in a new thread.
        But offlineRender can early exit without ever calling deref() in the main thread, leading to the leak of
        OfflineAudioDestinationNode. Fixed the leak by always calling deref in the main thread after calling offlineRender().

        Also removed the debug assertion in offlineRender which always hits when we run the relevant test.

        Test: imported/w3c/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/current-time-block-size.html

        * Modules/webaudio/OfflineAudioDestinationNode.cpp:
        (WebCore::OfflineAudioDestinationNode::startRendering):
        (WebCore::OfflineAudioDestinationNode::offlineRender):
        (WebCore::OfflineAudioDestinationNode::notifyComplete): Merged into startRendering.
        * Modules/webaudio/OfflineAudioDestinationNode.h:

2019-04-10  Megan Gardner  <megan_gardner@apple.com>

        Fix text autoscrolling when typing in modern webkit
        https://bugs.webkit.org/show_bug.cgi?id=196718
        <rdar://problem/49225507>

        Reviewed by Tim Horton.

        Tests: fast/events/autoscroll-when-input-is-offscreen.html
               fast/events/autoscroll-with-software-keyboard.html

        We have been relying on UIKit to scroll editable text, but
        since we cannot give them enough information for them to always
        do the right thing, we should just do all the work in WebKit.
        This has the added benifit of fixing some tricky autoscrolling
        bugs that have cropped up recently.

        * editing/Editor.cpp:
        (WebCore::Editor::insertTextWithoutSendingTextEvent):
        (WebCore::Editor::revealSelectionAfterEditingOperation):
        We should be scrolling the main frame in WebKit. We have been relying on UIKit,
        but we cannot give them enough information to guarantee a correct scroll, so just
        do all the work in WebKit.
        * page/FrameView.cpp:
        (WebCore::FrameView::unobscuredContentRectExpandedByContentInsets const):
        Update to use the rect that is actually visible, accounting for the software keyboard.

2019-04-10  Ross Kirsling  <ross.kirsling@sony.com>

        WebCore should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
        https://bugs.webkit.org/show_bug.cgi?id=196762

        Reviewed by Ryosuke Niwa.

        * Modules/indexeddb/IDBCursor.h:
        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
        * Modules/websockets/WebSocketFrame.cpp:
        * accessibility/AccessibilityARIAGridRow.cpp:
        (WebCore::AccessibilityARIAGridRow::parentTable const):
        * accessibility/AccessibilityObject.cpp:
        * accessibility/AccessibilityRenderObject.cpp:
        * animation/CSSAnimation.cpp:
        * animation/DeclarativeAnimation.cpp:
        * bindings/js/DOMGCOutputConstraint.h:
        * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
        (WebCore::root):
        (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
        (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
        * bindings/js/JSDOMConvertNumbers.cpp:
        * bindings/js/JSDOMWindowCustom.cpp:
        * bindings/js/JSExtendableMessageEventCustom.cpp:
        * bindings/js/SerializedScriptValue.cpp:
        * css/CSSFontFaceSource.cpp:
        * css/CSSFontFaceSource.h:
        * css/MediaQueryMatcher.h:
        * css/parser/CSSPropertyParserHelpers.cpp:
        * dom/DocumentParser.cpp:
        * dom/EventPath.cpp:
        * dom/MouseEvent.h:
        * dom/SpectreGadget.cpp:
        * dom/SpectreGadget.h:
        * editing/ChangeListTypeCommand.cpp:
        * editing/EditAction.cpp:
        * editing/ReplaceSelectionCommand.cpp:
        * editing/TextGranularity.h:
        * html/HTMLFormControlsCollection.cpp:
        * html/HTMLImageElement.cpp:
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        * inspector/InspectorController.cpp:
        * inspector/agents/InspectorApplicationCacheAgent.cpp:
        * inspector/agents/InspectorCanvasAgent.cpp:
        * inspector/agents/WebHeapAgent.cpp:
        * inspector/agents/page/PageAuditAgent.cpp:
        * inspector/agents/page/PageConsoleAgent.cpp:
        * inspector/agents/page/PageNetworkAgent.cpp:
        * inspector/agents/worker/WorkerAuditAgent.cpp:
        * loader/CrossOriginAccessControl.h:
        * loader/CrossOriginPreflightResultCache.h:
        * loader/NavigationAction.cpp:
        * loader/ResourceLoadObserver.cpp:
        * page/FrameTree.cpp:
        * page/IntersectionObserver.cpp:
        * page/PageConfiguration.cpp:
        * page/PerformanceResourceTiming.cpp:
        * page/ResizeObservation.cpp:
        * page/UndoManager.cpp:
        * plugins/PluginData.cpp:
        * rendering/Grid.h:
        * rendering/GridBaselineAlignment.cpp:
        * rendering/GridBaselineAlignment.h:
        * rendering/GridLayoutFunctions.cpp:
        * rendering/GridLayoutFunctions.h:
        * rendering/GridTrackSizingAlgorithm.h:
        * rendering/RenderDeprecatedFlexibleBox.cpp:
        * rendering/RenderFlexibleBox.cpp:
        * rendering/RenderIFrame.cpp:
        * rendering/RenderLayerFilters.cpp:
        * rendering/TextDecorationPainter.cpp:
        * rendering/TextDecorationPainter.h:
        * rendering/TextPainter.cpp:
        * rendering/TextPainter.h:
        * rendering/style/StyleRareNonInheritedData.cpp:
        * rendering/style/StyleRareNonInheritedData.h:
        * rendering/svg/SVGRenderSupport.h:
        * rendering/updating/RenderTreeBuilder.cpp:
        * rendering/updating/RenderTreeBuilderSVG.cpp:
        * style/InlineTextBoxStyle.cpp:
        * style/InlineTextBoxStyle.h:
        * style/StylePendingResources.cpp:
        * svg/SVGMatrix.h:
        * svg/SVGViewSpec.h:
        * svg/SVGZoomAndPan.h:
        * workers/WorkerScriptLoader.cpp:
        * workers/WorkerScriptLoader.h:
        * workers/service/ServiceWorker.cpp:
        * workers/service/ServiceWorkerClientData.cpp:
        * workers/service/ServiceWorkerClients.cpp:
        * workers/service/ServiceWorkerClients.h:
        * workers/service/ServiceWorkerGlobalScope.cpp:
        * workers/service/ServiceWorkerJob.cpp:
        * workers/service/ServiceWorkerProvider.cpp:
        * workers/service/context/ServiceWorkerFetch.cpp:
        * workers/service/context/ServiceWorkerInspectorProxy.h:
        * workers/service/context/ServiceWorkerThread.cpp:
        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        * workers/service/server/SWServerJobQueue.cpp:
        * workers/service/server/SWServerToContextConnection.cpp:
        * workers/service/server/SWServerWorker.cpp:
        * workers/service/server/SWServerWorker.h:
        * worklets/Worklet.h:

2019-04-10  Antoine Quint  <graouts@apple.com>

        Enable Pointer Events on watchOS
        https://bugs.webkit.org/show_bug.cgi?id=196771
        <rdar://problem/49040909>

        Reviewed by Dean Jackson.

        * Configurations/FeatureDefines.xcconfig:

2019-04-10  Youenn Fablet  <youenn@apple.com>

        Delay initialization of quota users until the first quota request
        https://bugs.webkit.org/show_bug.cgi?id=196467

        Reviewed by Chris Dumez.

        Instead of triggering initialization of each user when being added,
        delay initialization until the first call to requestSpace with a non zero task size.
        This will make sure we do not load Cache API information in memory or check for
        IDB space until actually necessary.

        To implement that, move from a HashSet of being initialized users to a HashMap where the key is user and
        the value is the user initialization state.

        When removing a user, delay the call to processPendingRequest so that a synchronous call to addUser
        can be taken into consideration.

        This unflakes some Cache API tests as these tests do clear the Cache API and check for the clearing result.
        Clearing the caches triggers a removeUser/addUser dance which then triggers initialization of the Caches structure.

        Covered by existing tests.

        * storage/StorageQuotaManager.cpp:
        (WebCore::StorageQuotaManager::initializeUsersIfNeeded):
        (WebCore::StorageQuotaManager::askUserToInitialize):
        (WebCore::StorageQuotaManager::addUser):
        (WebCore::StorageQuotaManager::requestSpace):
        * storage/StorageQuotaManager.h:

2019-04-10  Philippe Normand  <pnormand@igalia.com>

        there is no vp8 support in youtube.com/html5 page with libwebkit2gtk 2.24 (MSE enabled)
        https://bugs.webkit.org/show_bug.cgi?id=196615

        Reviewed by Xabier Rodriguez-Calvar.

        Add vp8.0 and vp9.0 in supported mime-types if the corresponding video decoders are found.

        No new tests, existing web-platform-tests cover this change.

        * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
        (WebCore::GStreamerRegistryScanner::initialize):

2019-04-10  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Adaptive streaming playback broken with GStreamer < 1.12
        https://bugs.webkit.org/show_bug.cgi?id=196765

        Reviewed by Xabier Rodriguez-Calvar.

        Without the following patch in gst-plugins-bad, the uridownloader
        doesn't relay need-context messages to its parent, so in our case
        the player can't share its context with secondary webkitwebsrc
        elements and a RELEASE_ASSERT is hit in the WebProcess.

        So the workaround is to use again webkit+ protocol prefixes for
        GStreamer versions older than 1.12.

        https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/8cf858fb27919e1d631223375f81b98055623733

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::convertToInternalProtocol):
        (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
        (WebCore::MediaPlayerPrivateGStreamer::loadFull):
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
        (WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webKitWebSrcStart):
        (webKitWebSrcGetProtocols):
        (convertPlaybinURI):
        (webKitWebSrcSetUri):
        (CachedResourceStreamingClient::responseReceived):
        (webKitSrcWouldTaintOrigin):
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:

2019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        [ATK] Defer the emision of AtkObject::children-changed signal after layout is done
        https://bugs.webkit.org/show_bug.cgi?id=187948

        Reviewed by Michael Catanzaro.

        The signal AtkObject::children-changed is emitted from AXObjectCache::attachWrapper() and
        AXObjectCache::detachWrapper(). Both can be called in the middle of a layout, so we need to defer the emission
        of the signal after the layout is done, to avoid other atk entry points from being called at that point, since
        most of them update the backing store at the beginning.

        Fixes: accessibility/children-changed-sends-notification.html

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::performDeferredCacheUpdate): Call platformPerformDeferredCacheUpdate().
        * accessibility/AXObjectCache.h:
        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::wrapperParent): Helper to get the AtkObject parent of a given WebKitAccessible.
        (WebCore::AXObjectCache::detachWrapper): Add wrapper to m_deferredDetachedWrapperList.
        (WebCore::AXObjectCache::attachWrapper): Add object to m_deferredAttachedWrapperObjectList.
        (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate): Emit AtkObject::children-changed::add for objects
        in m_deferredAttachedWrapperObjectList and AtkObject::children-changed::remove for wrappers in m_deferredDetachedWrapperList.
        * accessibility/ios/AXObjectCacheIOS.mm:
        (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
        * accessibility/win/AXObjectCacheWin.cpp:
        (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
        * accessibility/wpe/AXObjectCacheWPE.cpp:
        (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):

2019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        [ATK] Test accessibility/insert-children-assert.html is crashing since added in r216980
        https://bugs.webkit.org/show_bug.cgi?id=172281
        <rdar://problem/37030990>

        Reviewed by Joanmarie Diggs.

        The crash happens because at some point the test tries to get the anonymous block text, getting the RenderText as
        first child and RenderFullScreen as last child and the latter doesn't have a node. This is because in atk we do
        things differently, we don't include the static text elements individually, but parent element uses
        textUnderElement() to get all the pieces together. We can just turn the asserts into actual nullptr checks.

        Fixes: accessibility/insert-children-assert.html

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::textUnderElement const):

2019-04-09  Keith Rollin  <krollin@apple.com>

        Unreviewed build maintenance -- update .xcfilelists.

        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:

2019-04-09  Zalan Bujtas  <zalan@apple.com>

        [AutoSizing] Avoid making text paragraphs scroll horizontally when there is a wide table
        https://bugs.webkit.org/show_bug.cgi?id=196743
        <rdar://problem/43897551>

        Reviewed by Tim Horton.

        This patch changes the auto size behavior by using fixed constraint (instead of a min/max pair) to compute the content height.
        Now with the initial containing block width is firmly set to auto-sizing width, the overflow content will not stretch the ICB. Instead it overflows the ICB
        and triggers scrolling the same way the non-auto-sizing mode does.

        * page/FrameView.cpp:
        (WebCore::FrameView::autoSizeIfEnabled):
        (WebCore::FrameView::enableAutoSizeMode):
        * page/FrameView.h:
        * testing/Internals.cpp:
        (WebCore::Internals::enableAutoSizeMode):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-04-09  Youenn Fablet  <youenn@apple.com>

        Close service worker database on network process suspension
        https://bugs.webkit.org/show_bug.cgi?id=196623
        <rdar://problem/48930869>

        Reviewed by Alex Christensen.

        Add suspend/resume support to SWServer.
        On suspend, close the service worker database and stop pushing for changes.
        On resume, push changes if needed.

        * workers/service/server/RegistrationDatabase.cpp:
        (WebCore::RegistrationDatabase::close):
        * workers/service/server/RegistrationDatabase.h:
        (WebCore::RegistrationDatabase::isClosed const): Deleted.
        * workers/service/server/RegistrationStore.cpp:
        (WebCore::RegistrationStore::closeDatabase):
        * workers/service/server/RegistrationStore.cpp:
        (WebCore::RegistrationStore::pushChangesToDatabase):
        (WebCore::RegistrationStore::clearAll):
        (WebCore::RegistrationStore::startSuspension):
        (WebCore::RegistrationStore::endSuspension):
        * workers/service/server/RegistrationStore.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::startSuspension):
        (WebCore::SWServer::endSuspension):
        * workers/service/server/SWServer.h:

2019-04-09  Justin Fan  <justin_fan@apple.com>

        [Web GPU] GPURenderPassEncoder updates: setBlendColor, setViewport, setScissorRect
        https://bugs.webkit.org/show_bug.cgi?id=196719

        Reviewed by Myles C. Maxfield.

        Implement setBlendColor, setViewport, and setScissorRect for GPURenderPassEncoder.

        Tests: webgpu/viewport-scissor-rect-triangle-strip.html, webgpu/blend-color-triangle-strip.html

        * Modules/webgpu/WebGPURenderPassEncoder.cpp:
        (WebCore::WebGPURenderPassEncoder::setBlendColor):
        (WebCore::WebGPURenderPassEncoder::setViewport):
        (WebCore::WebGPURenderPassEncoder::setScissorRect):
        * Modules/webgpu/WebGPURenderPassEncoder.h:
        * Modules/webgpu/WebGPURenderPassEncoder.idl:
        * platform/graphics/gpu/GPURenderPassEncoder.h:
        * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
        (WebCore::GPURenderPassEncoder::setBlendColor):
        (WebCore::GPURenderPassEncoder::setViewport):
        (WebCore::GPURenderPassEncoder::setScissorRect):

2019-04-09  Andy Estes  <aestes@apple.com>

        [Apple Pay] Add release logging to PaymentCoordinator
        https://bugs.webkit.org/show_bug.cgi?id=196738

        Reviewed by Alex Christensen.

        When allowed, log interactions with PaymentCoordinator to os_log to help diagnose Apple Pay bugs.

        The following information might be logged: names of functions called, merchant API versions,
        boolean results of canMakePayments(), boolean results of beginPaymentSession(), whether
        completePaymentSession() was called with a final state result, boolean results of
        shouldAllowApplePay(), whether a document has evaluated user agent scripts or is running
        user scripts, and whether a client supports unrestricted Apple Pay.

        * Modules/applepay/PaymentCoordinator.cpp:
        (WebCore::PaymentCoordinator::supportsVersion const):
        (WebCore::PaymentCoordinator::canMakePayments):
        (WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
        (WebCore::PaymentCoordinator::openPaymentSetup):
        (WebCore::PaymentCoordinator::beginPaymentSession):
        (WebCore::PaymentCoordinator::completeMerchantValidation):
        (WebCore::PaymentCoordinator::completeShippingMethodSelection):
        (WebCore::PaymentCoordinator::completeShippingContactSelection):
        (WebCore::PaymentCoordinator::completePaymentMethodSelection):
        (WebCore::PaymentCoordinator::completePaymentSession):
        (WebCore::PaymentCoordinator::abortPaymentSession):
        (WebCore::PaymentCoordinator::cancelPaymentSession):
        (WebCore::PaymentCoordinator::validateMerchant):
        (WebCore::PaymentCoordinator::didAuthorizePayment):
        (WebCore::PaymentCoordinator::didSelectPaymentMethod):
        (WebCore::PaymentCoordinator::didSelectShippingMethod):
        (WebCore::PaymentCoordinator::didSelectShippingContact):
        (WebCore::PaymentCoordinator::didCancelPaymentSession):
        (WebCore::PaymentCoordinator::shouldAllowApplePay const):
        (WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
        * Modules/applepay/PaymentCoordinatorClient.h:
        (WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
        * platform/Logging.h:
        * testing/MockPaymentCoordinator.h:

2019-04-09  John Wilander  <wilander@apple.com>

        Pick up Ad Click Attribution conversions in NetworkResourceLoader::willSendRedirectedRequest()
        https://bugs.webkit.org/show_bug.cgi?id=196558
        <rdar://problem/47650245>

        Reviewed by Youenn Fablet.

        Tests: http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html
               http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html
               http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html

        The existing API tests were expanded too.

        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
           Enhanced the use of AdClickAttribution::MaxEntropy.
        * loader/AdClickAttribution.cpp:
        (WebCore::AdClickAttribution::parseConversionRequest):
            New function to parse and validate URLs with a path starting with
            /.well-known/ad-click-attribution/.
        (WebCore::AdClickAttribution::toString const):
            Added output for the conversion priority for testing purposes.
        * loader/AdClickAttribution.h:
        (WebCore::AdClickAttribution::Campaign::isValid const):
        (WebCore::AdClickAttribution::Conversion::isValid const):
           Enhanced the use of AdClickAttribution::MaxEntropy.

2019-04-09  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Apple builds should use ICU_INCLUDE_DIRS
        https://bugs.webkit.org/show_bug.cgi?id=196720

        Reviewed by Konstantin Tokarev.

        * PlatformMac.cmake:

2019-04-09  Jer Noble  <jer.noble@apple.com>

        Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
        https://bugs.webkit.org/show_bug.cgi?id=196097

        Reviewed by Eric Carlson.

        Test: media/track/track-in-band-metadata-display-order.html

        Add a method in Internals to create a TextTrackCueGeneric (which can normally only be created
        by parsing an in-band media track). This requires adding IDL for TextTrackCueGeneric, and exporting
        TextTrackCueGeneric for testing.

        Drive-by fixes:

        Add runtime logging to MediaControlTextTrackContainerElement. This necessitates modifying the
        parentMediaElement() method to take a const Node*, and const_cast that constness away in order to return
        a HTMLMediaElement*

        TextTrackCue, VTTCue, TextTrackCueGeneric, and DataCue should all use the WTF TypeCasts macros to
        enable use of is<> and downcast<>.

        * Source/WebCore/CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * Sources.txt:
        * html/shadow/MediaControlElementTypes.cpp:
        (WebCore::parentMediaElement):
        * html/shadow/MediaControlElementTypes.h:
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
        (WebCore::MediaControlTextTrackContainerElement::logger const):
        (WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
        (WebCore::MediaControlTextTrackContainerElement::logChannel const):
        * html/shadow/MediaControlElements.h:
        * html/track/DataCue.h:
        (isType):
        * html/track/TextTrackCueGeneric.h:
        (isType):
        * html/track/TextTrackCueGeneric.idl: Added.
        * html/track/VTTCue.h:
        (isType):
        * testing/Internals.cpp:
        (WebCore::Internals::createGenericCue):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-04-09  Sihui Liu  <sihui_liu@apple.com>

        Remove unnecessary network process assertion for IDB close
        https://bugs.webkit.org/show_bug.cgi?id=196693

        Reviewed by Geoffrey Garen.

        We already took assertion at WebCore::SQLiteDatabase::close.

        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::create):
        (WebCore::IDBServer::IDBServer::IDBServer):
        (WebCore::IDBServer::m_quotaManagerGetter): Deleted.
        (WebCore::IDBServer::IDBServer::closeDatabase): Deleted.
        (WebCore::IDBServer::IDBServer::didCloseDatabase): Deleted.
        * Modules/indexeddb/server/IDBServer.h:
        (WebCore::IDBServer::IDBServer::create): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
        (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose):
        (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
        (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
        (WebCore::IDBServer::UniqueIDBDatabase::notifyServerAboutClose): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2019-04-09  Eike Rathke  <erack@redhat.com>

        Initialize trackTypeAsString for call to GST_INFO_OBJECT() in TrackType::Text
        https://bugs.webkit.org/show_bug.cgi?id=196350

        Reviewed by Xabier Rodriguez-Calvar.

        trackTypeAsString was uninitialized in the
        TrackPrivateBaseGStreamer::TrackType::Text case when calling
        GST_INFO_OBJECT().

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::enableTrack):

2019-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>

        [ATK] Cleanup WebKitAccessibleHyperlink
        https://bugs.webkit.org/show_bug.cgi?id=196602

        Reviewed by Michael Catanzaro.

        Cleanups:

         - Rename webkitAccessibleHyperlinkNew() as webkitAccessibleHyperlinkGetOrCreate() and move the code to get/set
           the object data here.
         - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
           struct are no longer leaked.
         - Remove all confusing core() functions and simply use webkitAccessibleGetAccessibilityObject().
         - Use nullptr instead of 0 and other coding style issues.

        * accessibility/atk/WebKitAccessibleHyperlink.cpp:
        (webkitAccessibleHyperlinkActionDoAction):
        (webkitAccessibleHyperlinkActionGetNActions):
        (webkitAccessibleHyperlinkActionGetDescription):
        (webkitAccessibleHyperlinkActionGetKeybinding):
        (webkitAccessibleHyperlinkActionGetName):
        (atk_action_interface_init):
        (webkitAccessibleHyperlinkGetURI):
        (webkitAccessibleHyperlinkGetObject):
        (rangeLengthForObject):
        (webkitAccessibleHyperlinkGetStartIndex):
        (webkitAccessibleHyperlinkGetEndIndex):
        (webkitAccessibleHyperlinkIsValid):
        (webkitAccessibleHyperlinkGetNAnchors):
        (webkitAccessibleHyperlinkIsSelectedLink):
        (webkitAccessibleHyperlinkGetProperty):
        (webkitAccessibleHyperlinkSetProperty):
        (webkit_accessible_hyperlink_class_init):
        (webkitAccessibleHyperlinkGetOrCreate):
        (core): Deleted.
        (atkActionInterfaceInit): Deleted.
        (getRangeLengthForObject): Deleted.
        (webkitAccessibleHyperlinkFinalize): Deleted.
        (webkitAccessibleHyperlinkClassInit): Deleted.
        (webkitAccessibleHyperlinkInit): Deleted.
        (webkitAccessibleHyperlinkGetType): Deleted.
        (webkitAccessibleHyperlinkNew): Deleted.
        (webkitAccessibleHyperlinkGetAccessibilityObject): Deleted.
        * accessibility/atk/WebKitAccessibleHyperlink.h:
        * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp:
        (webkitAccessibleHyperlinkImplGetHyperlink):
        (webkitAccessibleHyperlinkImplInterfaceInit):

2019-04-08  Simon Fraser  <simon.fraser@apple.com>

        Remove some iOS #ifdefs around sticky-related code
        https://bugs.webkit.org/show_bug.cgi?id=196726

        Reviewed by Zalan Bujtas.

        Now that async overflow scrolling can be enabled on macOS, RenderLayerCompositor::isAsyncScrollableStickyLayer()
        should not have iOS-only code.

        The answer to the FIXME in RenderLayerCompositor::computeStickyViewportConstraints is obvious: composited
        overflow:scroll can be the container for sticky. The assertion can be removed.

        * rendering/RenderLayer.cpp: Fix spacing in some logging.
        (WebCore::outputPaintOrderTreeRecursive):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
        (WebCore::RenderLayerCompositor::computeStickyViewportConstraints const):

2019-04-08  Don Olmstead  <don.olmstead@sony.com>

        [CMake][WinCairo] Separate copied headers into different directories
        https://bugs.webkit.org/show_bug.cgi?id=196655

        Reviewed by Michael Catanzaro.

        * CMakeLists.txt:
        * PlatformWin.cmake:

2019-04-08  Chris Fleizach  <cfleizach@apple.com>

        AX: Automatically compute accessibility labels for Apple Pay buttons
        https://bugs.webkit.org/show_bug.cgi?id=196661

        Reviewed by Joanmarie Diggs.

        Detect Apple Pay buttons and return a standard role and label for them based on their type.

        Test: accessibility/mac/apple-pay-labels.html
              accessibility/mac/apple-pay-session-v4.html

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::isControl const):
        * accessibility/AccessibilityNodeObject.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::applePayButtonDescription const):
        (WebCore::AccessibilityRenderObject::titleElementText const):
        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
        (WebCore::AccessibilityRenderObject::isApplePayButton const):
        (WebCore::AccessibilityRenderObject::applePayButtonType const):
        * accessibility/AccessibilityRenderObject.h:
        * en.lproj/Localizable.strings:
        * platform/LocalizedStrings.cpp:
        (WebCore::AXApplePayPlainLabel):
        (WebCore::AXApplePayBuyLabel):
        (WebCore::AXApplePaySetupLabel):
        (WebCore::AXApplePayDonateLabel):
        (WebCore::AXApplePayCheckOutLabel):
        (WebCore::AXApplePayBookLabel):
        (WebCore::AXApplePaySubscribeLabel):
        * platform/LocalizedStrings.h:

2019-04-08  Chris Fleizach  <cfleizach@apple.com>

        AX: Support API: accessibilityReplaceRange:withText
        https://bugs.webkit.org/show_bug.cgi?id=196636

        Reviewed by Daniel Bates.

        Support this platform API on mac to provide a way to replace a range of editable text.

        Test: accessibility/mac/replace-text-with-range.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::replaceTextInRange):
        * accessibility/AccessibilityObject.h:
        * accessibility/mac/AccessibilityObjectBase.mm:
        (WebCore::PlainTextRange::PlainTextRange):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):

2019-04-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Do not allow starting selection drags when selection views are not visible
        https://bugs.webkit.org/show_bug.cgi?id=196686
        <rdar://problem/49399192>

        Reviewed by Tim Horton.

        See WebKit ChangeLog for more details.

        Tests:  DragAndDropTests.CanDragImageWhenNotFirstResponder
                DragAndDropTests.DoNotPerformSelectionDragWhenNotFirstResponder

        * page/DragController.cpp:
        (WebCore::DragController::draggableElement const):

        Make this respect the case where m_dragSourceAction does not include DragSourceActionSelection. All the other
        drag source types are currently consulted in this method, with the exception of DragSourceActionSelection.

2019-04-08  Youenn Fablet  <youenn@apple.com>

        Add a test to check for the service worker process name
        https://bugs.webkit.org/show_bug.cgi?id=196621

        Reviewed by Chris Dumez.

        Add a service worker internal API to get process name.
        Covered by updated test.

        * WebCore.xcodeproj/project.pbxproj:
        * testing/ServiceWorkerInternals.cpp:
        (WebCore::ServiceWorkerInternals::processName const):
        * testing/ServiceWorkerInternals.h:
        * testing/ServiceWorkerInternals.idl:
        * testing/ServiceWorkerInternals.mm: Added.

2019-04-08  Yusuke Suzuki  <ysuzuki@apple.com>

        Unreviewed, speculative fix for build failure in old macOS after r243887
        https://bugs.webkit.org/show_bug.cgi?id=196475

        * dom/NodeList.h:

2019-04-08  Justin Fan  <justin_fan@apple.com>

        [Web GPU] Fix Web GPU experimental feature on iOS
        https://bugs.webkit.org/show_bug.cgi?id=196632

        Reviewed by Myles C. Maxfield.

        Add feature conditionals for iOS 11.
        Properly make Web GPU available on iOS 11+.

        * Configurations/FeatureDefines.xcconfig:
        * Configurations/WebKitTargetConditionals.xcconfig:

2019-04-08  Timothy Hatcher  <timothy@apple.com>

        Unreviewed build fix for iOSMac after r243893.
        https://bugs.webkit.org/show_bug.cgi?id=196707

        * dom/Element.cpp:
        (WebCore::parentCrossingFrameBoundaries): Remove ENABLE(POINTER_EVENTS) since computedTouchActions()
        no longer uses parentCrossingFrameBoundaries().

2019-04-08  Youenn Fablet  <youenn@apple.com>

        Lazily construct Navigator serviceWorker
        https://bugs.webkit.org/show_bug.cgi?id=196692

        Reviewed by Chris Dumez.

        Make NavigatorBase a ContextDestructionObserver.
        This allows to get the navigator script execution context.
        Use it when creating the navigator ServiceWorkerContainer object.
        For GC, introduce serviceWorkerIfAny which returns the container if created.
        No JS observable change of behavior.
        Covered by existing tests.

        * bindings/js/JSNavigatorCustom.cpp:
        (WebCore::JSNavigator::visitAdditionalChildren):
        * bindings/js/JSWorkerNavigatorCustom.cpp:
        (WebCore::JSWorkerNavigator::visitAdditionalChildren):
        * page/NavigatorBase.cpp:
        (WebCore::NavigatorBase::NavigatorBase):
        (WebCore::NavigatorBase::serviceWorkerIfAny):
        (WebCore::NavigatorBase::serviceWorker):
        * page/NavigatorBase.h:

2019-04-08  Antti Koivisto  <antti@apple.com>

        Update touch-action region on property changes
        https://bugs.webkit.org/show_bug.cgi?id=196608

        Reviewed by Simon Fraser.

        Test: pointerevents/ios/touch-action-region-dynamic.html

        * rendering/EventRegion.cpp:
        (WebCore::EventRegion::touchActionsForPoint const):

        Correctly return 'auto' when nothing is found from the regions (this code is not used yet).

        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::styleWillChange):

        React to 'touch-action' property changes, similarly to 'pointer-events'.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::invalidateEventRegion):

        Test if need to invalidate.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::setContentsNeedDisplay):
        (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):

        Call invalidateEventRegion explicitly instead of relying on compositing update. This ensures
        that we update the top level event region correctly when we have touch-actions.

2019-04-08  Javier Fernandez  <jfernandez@igalia.com>

        Implement white-space:break-spaces value
        https://bugs.webkit.org/show_bug.cgi?id=177327

        Reviewed by Myles Maxfield and Zalan Bujtas.

        Finally the CSS WG decided [1] to move back the 'break-spaces' value to
        the 'white-space' property. This makes the parsing logic easier than
        the previous approach of using the 'overflow-wrap' property.

        This new value prevents the white-space sequence to collapse and gives
        breaking opportunities after every preserved white-space.

        https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces

        Additionally, unlike 'pre-wrap', non-collapsible spaces or tabs at the
        end of a line cannot be hung or visually collapsed, since we want them
        to be preserved and broken.

        [1] https://github.com/w3c/csswg-drafts/pull/2841

        Tests: imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-003.html
               imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-009.html

        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): New mapping for CSSVaueBreakSpaces.
        (WebCore::CSSPrimitiveValue::operator WhiteSpace const): New value BreakSpaces for the Whitespace enum.
        * css/CSSProperties.json: new 'break-spaces' value for the 'white-space' property.
        * css/CSSValueKeywords.in: new break-spaces keyword
        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
        * rendering/SimpleLineLayout.cpp:  The SimpleLineLayut codepath must handle properly the new behavior of preserved whitespaces.
        (WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace const): Require that m_trailingWhitespaceWidth being greater than zero.
        (WebCore::SimpleLineLayout::LineState::hasWhitespaceFragments const): New function to detect former whitespae fragments that could be breaking opportunities.
        (WebCore::SimpleLineLayout::removeTrailingWhitespace): The 'break-spaces' feature forbids to remove any trailing whitespace.
        (WebCore::SimpleLineLayout::firstFragment): We have now leading whitespace sequences comming from the previous line.
        (WebCore::SimpleLineLayout::createLineRuns): We should revert some breaking opportunities if others were formerly found in the line.
        * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
        (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): New style fields to determine whether the break-space feature is being used. Also split out the break-all and breal-all values.
        * rendering/SimpleLineLayoutTextFragmentIterator.h:
        * rendering/line/BreakingContext.h: Different codepath but similar changes to properly handle the new behavior of preserved whitespace.
        (WebCore::BreakingContext::BreakingContext): New class field to determine whether there are some whitespace that may prevent the word ot be broken.
        (WebCore::BreakingContext::handleText): New line-breaking logic to implement the break-spaces behavior.
        (WebCore::BreakingContext::trailingSpacesHang): Cases where the preserved breakspaces should hand or overflow.
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::collapseWhiteSpace): With break-spaces collapsing whitespaces is not allowed.
        (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const): Add the WhiteSpace::BreakSpaces to this group.
        * rendering/style/RenderStyleConstants.h: A new constan added.

2019-04-08  Youenn Fablet  <youenn@apple.com>

        LibWebRTCMediaEndpoint does not need to hop to the signaling thread to gather stats
        https://bugs.webkit.org/show_bug.cgi?id=196697
        <rdar://problem/47477113>

        Reviewed by Eric Carlson.

        It is not thread safe to use m_backend in another thread than the main thread.
        It is not useful anymore to hop to the signaling thread to gather stats.
        No change of behavior.

        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::getStats):
        (WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging):

2019-04-08  Antoine Quint  <graouts@apple.com>

        [ Mac WK2 iOS Debug ] REGRESSION(r233667) Layout Test imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=195233
        <rdar://problem/48527231>

        Reviewed by Dean Jackson.

        We need to create the "main" document timeline (document.timeline) if it doesn't already exist and use its current time as a basis for any other DocumentTimeline instance.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::currentTime):

2019-04-08  Antoine Quint  <graouts@apple.com>

        [Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
        https://bugs.webkit.org/show_bug.cgi?id=196118
        <rdar://problem/46614137>

        Reviewed by Chris Dumez.

        Test: webanimations/js-wrapper-kept-alive.html

        We need to teach WebAnimation to keep its JS wrapper alive if it's relevant or could become relevant again by virtue of having a timeline.
        We also need to ensure that the new implementation of hasPendingActivity() does not interfere with the ability of pages to enter the page
        cache when running animations.

        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::canSuspendForDocumentSuspension const):
        (WebCore::WebAnimation::stop):
        (WebCore::WebAnimation::hasPendingActivity const):
        * animation/WebAnimation.h:

2019-04-08  Eric Liang  <ericliang@apple.com>

        AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
        https://bugs.webkit.org/show_bug.cgi?id=156774

        Reviewed by Chris Fleizach.

        Labelled SVGs without accessible descendants are exposed as AXImage rather than groups.

        Unlabelled equivalents are not exposed. Otherwise, SVGs with accessible descendants are exposed as AXGroup. 
        Also added back functionalities from last patch of determining whether a SVG element should be ignored.
        
        Test: accessibility/svg-shape-labelled.html

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
        * accessibility/AccessibilitySVGElement.cpp:
        (WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored const):

2019-04-08  Youenn Fablet  <youenn@apple.com>

        Make sure UniqueIDBDatabaseConnection unregisters itself even if its database is gone
        https://bugs.webkit.org/show_bug.cgi?id=196651

        Reviewed by Brady Eidson.

        In UniqueIDBDatabase methods, many operations are refing the transaction
        so that it stays alive until a quota check decision is made.
        This extends the lifetime of the transaction which may be lasting
        longer than its database that may be cleared without waiting for the quota check decisions.

        We therefore need to make sure that the transaction is cleaning itself correctly at destruction time.

        Make sure that the transaction is unregistering itself from its IDBServer.
        To do so, the transaction keeps a weak ref to the IDBServer.

        This is timing sensitive hence difficult to test.

        * Modules/indexeddb/server/IDBServer.h:
        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
        Like done below for UniqueIDBDatabaseConnection::didCommitTransaction,
        add a check to ensure that either the database is we are in an error case.
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

2019-04-08  Christopher Reid  <chris.reid@sony.com>

        Undefined Behavior: m_experimentalImageMenuEnabled isn't initialized in HTMLImageElement when SERVICE_CONTROLS is disabled
        https://bugs.webkit.org/show_bug.cgi?id=196664

        Reviewed by Ross Kirsling.

        No observable change in behavior.

        Initialize m_experimentalImageMenuEnabled regardless of ENABLE(SERVICE_CONTROLS)

        * html/HTMLImageElement.cpp:

2019-04-08  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r243943.

        Caused test262 failures.

        Reverted changeset:

        "[JSC] Filter DontEnum properties in
        ProxyObject::getOwnPropertyNames()"
        https://bugs.webkit.org/show_bug.cgi?id=176810
        https://trac.webkit.org/changeset/243943

2019-04-05  Sergio Villar Senin  <svillar@igalia.com>

        [GTK][WPE] outlook.live.com displays old-fashioned UI
        https://bugs.webkit.org/show_bug.cgi?id=196642

        Reviewed by Carlos Garcia Campos.

        The new good looking UI is shown as long as pretend we're a Mac in the UA.

        * platform/UserAgentQuirks.cpp:
        (WebCore::urlRequiresChromeBrowser):

2019-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        [ATK] Cleanup accessible wrapper base class
        https://bugs.webkit.org/show_bug.cgi?id=196601

        Reviewed by Mario Sanchez Prada.

        Cleanups:

         - Rename WebKitAccessibleWrapperAtk cpp and header as WebKitAccessible for consistency with the class name.
         - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
           struct are no longer leaked.
         - Move core object pointer to the private struct.
         - Remove confusing core() function and simply get the core object from the private struct.
         - Use nullptr instead of 0 and other coding style issues.
         - Rename cacheAndReturnAtkProperty as webkitAccessibleCacheAndReturnAtkProperty and use WebKitAccessible as
           instance parameter.
         - Make webkitAccessibleGetAccessibilityObject() return a reference, since we use a fallback object on detach it
           never returns nullptr.
         - Move objectFocusedAndCaretOffsetUnignored() to WebKitAccessibleUtil.

        * SourcesGTK.txt:
        * accessibility/atk/AXObjectCacheAtk.cpp:
        * accessibility/atk/WebKitAccessible.cpp: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp.
        (webkitAccessibleGetName):
        (webkitAccessibleGetDescription):
        (setAtkRelationSetFromCoreObject):
        (isRootObject):
        (webkitAccessibleGetParent):
        (webkitAccessibleGetNChildren):
        (webkitAccessibleRefChild):
        (webkitAccessibleGetIndexInParent):
        (webkitAccessibleGetAttributes):
        (atkRole):
        (webkitAccessibleGetRole):
        (webkitAccessibleRefStateSet):
        (webkitAccessibleRefRelationSet):
        (webkitAccessibleInit):
        (webkitAccessibleGetObjectLocale):
        (webkit_accessible_class_init):
        (interfaceMaskFromObject):
        (uniqueAccessibilityTypeName):
        (accessibilityTypeFromObject):
        (webkitAccessibleNew):
        (webkitAccessibleGetAccessibilityObject):
        (webkitAccessibleDetach):
        (webkitAccessibleIsDetached):
        (webkitAccessibleCacheAndReturnAtkProperty):
        * accessibility/atk/WebKitAccessible.h: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.h.
        * accessibility/atk/WebKitAccessibleHyperlink.cpp:
        (core):
        * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
        (core):
        (webkitAccessibleActionGetKeybinding):
        (webkitAccessibleActionGetName):
        * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
        (core):
        * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
        (core):
        (documentAttributeValue):
        * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
        (core):
        * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
        (core):
        * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
        (core):
        (webkitAccessibleImageGetImageDescription):
        * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
        (core):
        * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
        (core):
        * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
        (core):
        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
        (core):
        * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
        (core):
        * accessibility/atk/WebKitAccessibleUtil.cpp:
        (objectFocusedAndCaretOffsetUnignored):
        * accessibility/atk/WebKitAccessibleUtil.h:
        * editing/atk/FrameSelectionAtk.cpp:

2019-04-06  Antti Koivisto  <antti@apple.com>

        Combine event and touch action regions into a single class
        https://bugs.webkit.org/show_bug.cgi?id=196644
        <rdar://problem/49643614>

        Reviewed by Darin Adler.

        This patch replaces the existing TouchActionRegion class with the more general EventRegion class.
        It collects both the overall event region and the touch action regions. This avoids duplication
        and simplifies the code.

        The patch also adds serialization support for EventRegion, so touch-action regions gets passed
        to the UI process too.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::setEventRegion):
        (WebCore::GraphicsLayer::dumpProperties const):
        (WebCore::GraphicsLayer::setTouchActionRegion): Deleted.
        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::eventRegion const):
        (WebCore::GraphicsLayer::touchActionRegion const): Deleted.
        * platform/graphics/Region.cpp:
        (WebCore::operator<<):
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::setEventRegion):
        (WebCore::GraphicsLayerCA::setTouchActionRegion): Deleted.
        * platform/graphics/ca/GraphicsLayerCA.h:
        * platform/graphics/ca/PlatformCALayer.h:
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
        * rendering/EventRegion.cpp: Copied from Source/WebCore/rendering/TouchActionRegion.cpp.
        (WebCore::EventRegion::operator== const):
        (WebCore::EventRegion::unite):
        (WebCore::EventRegion::translate):
        (WebCore::EventRegion::uniteTouchActions):
        (WebCore::EventRegion::touchActionsForPoint const):
        (WebCore::operator<<):
        (WebCore::TouchActionRegion::unite): Deleted.
        (WebCore::TouchActionRegion::actionsForPoint const): Deleted.
        (WebCore::TouchActionRegion::translate): Deleted.
        * rendering/EventRegion.h: Copied from Source/WebCore/rendering/TouchActionRegion.h.
        (WebCore::EventRegion::isEmpty const):
        (WebCore::EventRegion::contains const):
        (WebCore::EventRegion::hasTouchActions const):
        (WebCore::EventRegion::encode const):
        (WebCore::EventRegion::decode):
        (WebCore::TouchActionRegion::isEmpty const): Deleted.
        (WebCore::TouchActionRegion::operator== const): Deleted.
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paint):
        * rendering/PaintInfo.h:
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::collectEventRegionForFragments):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateEventRegion):
        * rendering/RenderLayerModelObject.cpp:
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::paintFlow):
        * rendering/TouchActionRegion.cpp: Removed.
        * rendering/TouchActionRegion.h: Removed.

2019-04-05  Yongjun Zhang  <yongjun_zhang@apple.com>

        We should pass minimumEffectiveDeviceWidth to web process on new page creation.
        https://bugs.webkit.org/show_bug.cgi?id=196077
        <rdar://problem/49108202>

        Reviewed by Chris Dumez.

        If the page doesn't specify it requires to use the device width in viewport tag, we should try to scale down
        the page to fit the window width.

        Test: fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta.html

        * page/ViewportConfiguration.cpp:
        (WebCore::ViewportConfiguration::updateDefaultConfiguration): Also update the minimum layout size
            when the default configuration is changed.
        (WebCore::ViewportConfiguration::nativeWebpageParametersWithShrinkToFit): Make sure we fit the content
            to window width.

2019-04-05  Jer Noble  <jer.noble@apple.com>

        [Cocoa] Deactivate the audio session before the WebProcess suspends.
        https://bugs.webkit.org/show_bug.cgi?id=196658

        Reviewed by Eric Carlson.

        Test: platform/mac/media/audio-session-deactivated-when-suspended.html

        Deactivate the audio session when we are notified that the session will suspend.

        Drive-by fix: don't try to begin playback when the process is suspended.

        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
        (WebCore::PlatformMediaSessionManager::processWillSuspend):
        (WebCore::PlatformMediaSessionManager::processDidResume):
        * platform/audio/PlatformMediaSessionManager.h:
        (WebCore::PlatformMediaSessionManager::processIsSuspended const):
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setShouldDeactivateAudioSession):
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:
        * testing/Internals.cpp:
        (WebCore::Internals::processWillSuspend):
        (WebCore::Internals::processDidResume):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-04-05  Sihui Liu  <sihui_liu@apple.com>

        [iOS] Web process gets suspended while holding locked database files
        https://bugs.webkit.org/show_bug.cgi?id=196519
        <rdar://problem/49531797>

        Reviewed by Chris Dumez.

        Don't use DatabaseTracker singleton before it is initialized.

        * Modules/webdatabase/DatabaseTracker.cpp:
        (WebCore::DatabaseTracker::isInitialized):
        * Modules/webdatabase/DatabaseTracker.h:

2019-04-05  Ryosuke Niwa  <rniwa@webkit.org>

        Make WeakPtr<Element> possible and deploy it in form associated elements code
        https://bugs.webkit.org/show_bug.cgi?id=196626

        Reviewed by Antti Koivisto.

        Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.

        No new tests sine there should be no behavioral change.

        * dom/Element.h:
        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::FormAssociatedElement):
        (WebCore::FormAssociatedElement::insertedIntoAncestor):
        (WebCore::FormAssociatedElement::setForm):
        (WebCore::FormAssociatedElement::resetFormOwner):
        (WebCore::FormAssociatedElement::formAttributeChanged):
        * html/FormAssociatedElement.h:
        (WebCore::FormAssociatedElement::form const):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::asFormNamedItem):
        (WebCore::HTMLElement::asFormAssociatedElement):
        * html/HTMLElement.h:
        (WebCore::HTMLElement::asFormNamedItem): Deleted.
        * html/HTMLFormControlElement.h:
        * html/HTMLFormControlsCollection.cpp:
        (WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
        (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
        * html/HTMLFormControlsCollection.h:
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
        (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
        (WebCore::HTMLFormElement::registerImgElement):
        (WebCore::HTMLFormElement::defaultButton const):
        (WebCore::HTMLFormElement::resetDefaultButton):
        (WebCore::HTMLFormElement::matchesValidPseudoClass const):
        (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
        * html/HTMLFormElement.h:
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::HTMLImageElement):
        (WebCore::HTMLImageElement::insertedIntoAncestor):
        * html/HTMLImageElement.h:
        * html/HTMLInputElement.h:
        * html/HTMLMediaElement.h:
        * html/HTMLObjectElement.h:
        * html/HTMLPictureElement.h:
        * html/HTMLSlotElement.h:
        * svg/SVGElement.h:

2019-04-05  Caitlin Potter  <caitp@igalia.com>

        [JSC] Filter DontEnum properties in ProxyObject::getOwnPropertyNames()
        https://bugs.webkit.org/show_bug.cgi?id=176810

        Reviewed by Saam Barati.

        Previously, there was a comment here indicating uncertainty of whether it
        was necessary to filter DontEnum properties explicitly or not. It turns
        out that it was necessary in the case of JSC ProxyObjects.

        This patch adds DontEnum filtering for ProxyObjects, however we continue
        to explicitly filter them in JSDOMConvertRecord, which needs to use the
        property descriptor after filtering. This change prevents observably
        fetching the property descriptor twice per property.

        * bindings/js/JSDOMConvertRecord.h:

2019-04-05  Michael Catanzaro  <mcatanzaro@igalia.com>

        Unreviewed manual rollout of r243929
        https://bugs.webkit.org/show_bug.cgi?id=196626

        * dom/Element.h:
        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::FormAssociatedElement):
        (WebCore::FormAssociatedElement::insertedIntoAncestor):
        (WebCore::FormAssociatedElement::setForm):
        (WebCore::FormAssociatedElement::resetFormOwner):
        (WebCore::FormAssociatedElement::formAttributeChanged):
        * html/FormAssociatedElement.h:
        (WebCore::FormAssociatedElement::form const):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::asFormNamedItem): Deleted.
        (WebCore::HTMLElement::asFormAssociatedElement): Deleted.
        * html/HTMLElement.h:
        (WebCore::HTMLElement::asFormNamedItem):
        * html/HTMLFormControlElement.h:
        * html/HTMLFormControlsCollection.cpp:
        (WebCore:: const):
        (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
        * html/HTMLFormControlsCollection.h:
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
        (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
        (WebCore::HTMLFormElement::registerImgElement):
        (WebCore::HTMLFormElement::defaultButton const):
        (WebCore::HTMLFormElement::resetDefaultButton):
        (WebCore::HTMLFormElement::matchesValidPseudoClass const):
        (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
        * html/HTMLFormElement.h:
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::HTMLImageElement):
        (WebCore::HTMLImageElement::insertedIntoAncestor):
        * html/HTMLImageElement.h:
        * html/HTMLInputElement.h:
        * html/HTMLMediaElement.h:
        * html/HTMLObjectElement.h:
        * html/HTMLPictureElement.h:
        * html/HTMLSlotElement.h:
        * svg/SVGElement.h:

2019-04-05  Sihui Liu  <sihui_liu@apple.com>

        [iOS] Web process gets suspended while holding locked database files
        https://bugs.webkit.org/show_bug.cgi?id=196519
        <rdar://problem/49531797>

        Reviewed by Chris Dumez.

        We should close all databases and make sure not open new databases when web process is ready to suspend.

        * platform/sql/SQLiteDatabase.cpp:
        (WebCore::SQLiteDatabase::setIsDatabaseOpeningForbidden):
        (WebCore::SQLiteDatabase::open):
        * platform/sql/SQLiteDatabase.h:
        * platform/sql/SQLiteDatabaseTracker.cpp:
        (WebCore::SQLiteDatabaseTracker::setClient):
        (WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
        (WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
        (WebCore::SQLiteDatabaseTracker::hasTransactionInProgress):

2019-04-05  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r243833.
        https://bugs.webkit.org/show_bug.cgi?id=196645

        This change breaks build of WPE and GTK ports (Requested by
        annulen on #webkit).

        Reverted changeset:

        "[CMake][WTF] Mirror XCode header directories"
        https://bugs.webkit.org/show_bug.cgi?id=191662
        https://trac.webkit.org/changeset/243833

2019-04-05  David Kilzer  <ddkilzer@apple.com>

        REGRESSION(r243887): Try to fix Windows builds by including <wtf/IsoMalloc.h>

        Caused by:
            [WebCore] Put most of derived classes of ScriptWrappable into IsoHeap
            https://bugs.webkit.org/show_bug.cgi?id=196475

        * css/CSSComputedStyleDeclaration.h:
        * dom/DOMRectReadOnly.h:
        * dom/LiveNodeList.h:
        * dom/NodeIterator.h:
        * dom/TreeWalker.h:
        * fileapi/Blob.h:
        * fileapi/File.h:
        * fileapi/FileList.h:
        * html/CachedHTMLCollection.h:
        * html/HTMLFormElement.h:
        * html/HTMLNameCollection.h:
        * html/canvas/GPUBasedCanvasRenderingContext.h:
        * page/RemoteDOMWindow.h:

2019-04-05  Ryosuke Niwa  <rniwa@webkit.org>

        Make WeakPtr<Element> possible and deploy it in form associated elements code
        https://bugs.webkit.org/show_bug.cgi?id=196626

        Reviewed by Antti Koivisto.

        Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.

        No new tests sine there should be no behavioral change.

        * dom/Element.h:
        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::FormAssociatedElement):
        (WebCore::FormAssociatedElement::insertedIntoAncestor):
        (WebCore::FormAssociatedElement::setForm):
        (WebCore::FormAssociatedElement::resetFormOwner):
        (WebCore::FormAssociatedElement::formAttributeChanged):
        * html/FormAssociatedElement.h:
        (WebCore::FormAssociatedElement::form const):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::asFormNamedItem):
        (WebCore::HTMLElement::asFormAssociatedElement):
        * html/HTMLElement.h:
        (WebCore::HTMLElement::asFormNamedItem): Deleted.
        * html/HTMLFormControlElement.h:
        * html/HTMLFormControlsCollection.cpp:
        (WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
        (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
        * html/HTMLFormControlsCollection.h:
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
        (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
        (WebCore::HTMLFormElement::registerImgElement):
        (WebCore::HTMLFormElement::defaultButton const):
        (WebCore::HTMLFormElement::resetDefaultButton):
        (WebCore::HTMLFormElement::matchesValidPseudoClass const):
        (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
        * html/HTMLFormElement.h:
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::HTMLImageElement):
        (WebCore::HTMLImageElement::insertedIntoAncestor):
        * html/HTMLImageElement.h:
        * html/HTMLInputElement.h:
        * html/HTMLMediaElement.h:
        * html/HTMLObjectElement.h:
        * html/HTMLPictureElement.h:
        * html/HTMLSlotElement.h:
        * svg/SVGElement.h:

2019-04-05  Carlos Garcia Campos  <cgarcia@igalia.com>

        [ATK] Use a smart pointer for AccessibilityObject wrapper and remove GTK specific code
        https://bugs.webkit.org/show_bug.cgi?id=196593
        <rdar://problem/49599153>

        Reviewed by Michael Catanzaro.

        We have specific code for GTK to get/set the wrapper only because we don't use smart pointers. Also use
        WebKitAccessible as AccessibilityObjectWrapper instead of generic AtkObject, to enforce wrappers to be
        WebKitAccessible instances. This requires a few casts to AtkObject.

        * accessibility/AccessibilityObject.h:
        (WebCore::AccessibilityObject::setWrapper):
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::AXObjectCache::detachWrapper):
        (WebCore::AXObjectCache::attachWrapper):
        (WebCore::notifyChildrenSelectionChange):
        (WebCore::AXObjectCache::postPlatformNotification):
        (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
        (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
        (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
        * accessibility/atk/AccessibilityObjectAtk.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
        (webkitAccessibleComponentRefAccessibleAtPoint):
        * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
        (webkitAccessibleHypertextGetLink):
        (webkitAccessibleHypertextGetNLinks):
        * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
        (webkitAccessibleSelectionRefSelection):
        * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
        (webkitAccessibleTableRefAt):
        (webkitAccessibleTableGetColumnHeader):
        (webkitAccessibleTableGetRowHeader):
        (webkitAccessibleTableGetCaption):
        * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
        (convertToGPtrArray):
        (webkitAccessibleTableCellGetTable):
        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
        (accessibilityObjectLength):
        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
        (setAtkRelationSetFromCoreObject):
        (atkParentOfRootObject):
        (webkitAccessibleGetParent):
        (webkitAccessibleRefChild):
        (isTextWithCaret):
        * editing/atk/FrameSelectionAtk.cpp:
        (WebCore::emitTextSelectionChange):
        (WebCore::maybeEmitTextFocusChange):

2019-04-04  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] REGRESSION (r242687): Programmatic scroll of overflow scroll results in bad rendering
        https://bugs.webkit.org/show_bug.cgi?id=195584

        Reviewed by Zalan Bujtas.

        Push data to the scrolling tree about whether an overflow:scroll scroll was programmatic, by having
        RenderLayer::scrollToOffset() call into AsyncScrollingCoordinator::requestScrollPositionUpdate(),
        just as we do for frames.

        AsyncScrollingCoordinator::requestScrollPositionUpdate() is generalized to take any ScrollableArea.

        Fix an assumption in the ScrollingTree that we only care about programmatic scrolls on the root node.
        ScrollingTree::commitTreeState() no longer sets isHandlingProgrammaticScroll; instead,
        callers of ScrollingTreeScrollingNode::scrollTo() pass a ScrollType. Commit functions pass
        ScrollType::Programmatic when handling RequestedScrollPosition changes as necessary.

        Programmatic scrolls need to get to the scrolling tree in the UI process so that we update
        the tree's notion of scroll position, and trigger actual UIScrollView scrolls (layers may have
        already been put in the right locations, but the UI process needs to know that a scroll happened).
        However, we need to prevent notifications from programmatic scrolls getting back to the
        web process, because this causes jumpiness. This is done via an early return in
        RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll().

        Tests: scrollingcoordinator/ios/programmatic-overflow-scroll.html
               scrollingcoordinator/ios/programmatic-page-scroll.html

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingCoordinator.h:
        (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::commitTreeState):
        (WebCore::ScrollingTree::isHandlingProgrammaticScroll): Deleted.
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::isHandlingProgrammaticScroll const):
        (WebCore::ScrollingTree::setIsHandlingProgrammaticScroll):
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::scrollBy):
        (WebCore::ScrollingTreeScrollingNode::scrollTo):
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollToOffset):
        (WebCore::RenderLayer::scrollingNodeID const):
        * rendering/RenderLayer.h:
        * rendering/RenderMarquee.cpp:
        (WebCore::RenderMarquee::timerFired):

2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>

        Unreviewed, speculative fix for build failure
        https://bugs.webkit.org/show_bug.cgi?id=196475

        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:

2019-04-04  Ryosuke Niwa  <rniwa@webkit.org>

        Element::isFocusable() debug asserts too frequently
        https://bugs.webkit.org/show_bug.cgi?id=196634

        Reviewed by Geoffrey Garen.

        Remove the debug assertion for now.

        * dom/Element.cpp:
        (WebCore::Element::isFocusable const):

2019-04-04  Simon Fraser  <simon.fraser@apple.com>

        Have ScrollableArea store a ScrollType for the current scroll
        https://bugs.webkit.org/show_bug.cgi?id=196627

        Reviewed by Zalan Bujtas.

        RenderLayer had isInUserScroll() which is the opposite of ScrollableArea::inProgrammaticScroll(),
        so just have ScrollableArea store a ScrollType.

        RenderLayer's scrolling bottleneck, scrollToOffset(), now takes a ScrollType, and pushes
        it onto the base class.

        AsyncScrollingCoordinator::requestScrollPositionUpdate() can use the incoming scrollType (currently
        incorrect for iOS WK2 overflow) rather than deducing a user scroll from ScrollingLayerPositionAction.

        No behavior change.

        * page/FrameView.cpp:
        (WebCore::FrameView::setFrameRect):
        (WebCore::FrameView::topContentInsetDidChange):
        (WebCore::FrameView::updateLayoutViewport):
        (WebCore::FrameView::setScrollPosition):
        (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling const):
        (WebCore::FrameView::setWasScrolledByUser):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::LayoutScope::LayoutScope):
        (WebCore::LayoutScope::~LayoutScope):
        * page/ios/FrameIOS.mm:
        (WebCore::Frame::overflowScrollPositionChangedForNode):
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
        (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
        (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setScrollPosition):
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::ScrollableArea):
        * platform/ScrollableArea.h:
        (WebCore::ScrollableArea::currentScrollType const):
        (WebCore::ScrollableArea::setCurrentScrollType):
        (WebCore::ScrollableArea::setIsUserScroll): Deleted.
        (WebCore::ScrollableArea::inProgrammaticScroll const): Deleted.
        (WebCore::ScrollableArea::setInProgrammaticScroll): Deleted.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer):
        (WebCore::RenderLayer::scrollToXPosition):
        (WebCore::RenderLayer::scrollToYPosition):
        (WebCore::RenderLayer::scrollToOffset):
        (WebCore::RenderLayer::scrollTo):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateScrollOffset):
        * rendering/RenderMarquee.cpp:
        (WebCore::RenderMarquee::start):

2019-04-04  Shawn Roberts  <sroberts@apple.com>

        Unreviewed, rolling out r243868.

        Causing timeouts failures on several queues

        Reverted changeset:

        "[Web Animations] JS wrapper may be deleted while animation is
        yet to dispatch its finish event"
        https://bugs.webkit.org/show_bug.cgi?id=196118
        https://trac.webkit.org/changeset/243868

2019-04-04  Youenn Fablet  <youenn@apple.com>

        Pass storage quota parameters from UIProcess to NetworkProcess as part of WebsiteDataStore parameters
        https://bugs.webkit.org/show_bug.cgi?id=196543

        Reviewed by Alex Christensen.

        Add a default routine to compute a third party quota from a per origin quota.
        No change of behavior.

        * storage/StorageQuotaManager.h:
        (WebCore::StorageQuotaManager::defaultThirdPartyQuotaFromPerOriginQuota):
        (WebCore::StorageQuotaManager::defaultThirdPartyQuota):

2019-04-04  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r243807 and r243824.
        https://bugs.webkit.org/show_bug.cgi?id=196611

        Test added is a flaky timeout on iOS Simulator, 3 tests
        unskipped are flaky failures (Requested by ShawnRoberts on
        #webkit).

        Reverted changesets:

        "Blob type cannot be stored correctly in IDB when
        IDBObjectStore has autoIncrement and keyPath options"
        https://bugs.webkit.org/show_bug.cgi?id=196128
        https://trac.webkit.org/changeset/243807

        "Follow up fix for r243807: Use MarkedArgumentBuffer instead
        of Vector for JSValue"
        https://bugs.webkit.org/show_bug.cgi?id=196547
        https://trac.webkit.org/changeset/243824

2019-04-04  Simon Fraser  <simon.fraser@apple.com>

        Fix rare crash under collectRelatedCoordinatedScrollingNodes()
        https://bugs.webkit.org/show_bug.cgi?id=196610
        rdar://problem/49595426

        Reviewed by Zalan Bujtas.

        hasCompositedScrollableOverflow() doesn't check whether a layer is composited (it has
        to report the right status before layers have been created), so collectRelatedCoordinatedScrollingNodes()
        needs to check whether there's backing.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::collectRelatedCoordinatedScrollingNodes):

2019-04-04  Simon Fraser  <simon.fraser@apple.com>

        Move "inProgrammaticScroll" down to ScrollableArea
        https://bugs.webkit.org/show_bug.cgi?id=196614

        Reviewed by Zalan Bujtas.

        A future patch will need to update "inProgrammaticScroll" on RenderLayers, so push
        inProgrammaticScroll() down to ScrollableArea.

        ScrollableArea already has "isScrolledProgrammatically", which I rename to "scrollShouldClearLatchedState"
        to reduce confusion. It might be possible to remove this in future with some refactoring.

        Sadly we can no longer use SetForScope<> in FrameView after this change so add some manual save/restore code.

        * dom/Element.cpp:
        (WebCore::Element::setScrollLeft):
        (WebCore::Element::setScrollTop):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::completeWidgetWheelEvent):
        (WebCore::EventHandler::handleWheelEvent):
        * page/FrameView.cpp:
        (WebCore::FrameView::setFrameRect):
        (WebCore::FrameView::topContentInsetDidChange):
        (WebCore::FrameView::updateLayoutViewport):
        (WebCore::FrameView::setScrollPosition):
        (WebCore::FrameView::setWasScrolledByUser):
        * page/FrameView.h:
        * platform/ScrollView.h:
        (WebCore::ScrollView::inProgrammaticScroll const): Deleted.
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::ScrollableArea):
        * platform/ScrollableArea.h:
        (WebCore::ScrollableArea::inProgrammaticScroll const):
        (WebCore::ScrollableArea::setInProgrammaticScroll):
        (WebCore::ScrollableArea::scrollShouldClearLatchedState const):
        (WebCore::ScrollableArea::setScrollShouldClearLatchedState):
        (WebCore::ScrollableArea::isScrolledProgrammatically const): Deleted.
        (WebCore::ScrollableArea::setScrolledProgrammatically): Deleted.

2019-04-04  Sihui Liu  <sihui_liu@apple.com>

        Leak of UniqueIDBDatabase in network process running layout tests
        https://bugs.webkit.org/show_bug.cgi?id=196565
        <rdar://problem/49346139>

        Reviewed by Geoffrey Garen.

        UniqueIDBDatabase will null itself after it receives confirmation about connecton close from its clients, but it
        is possible that the web process to network process connection closes before servers gets the 
        confirmDidCloseFromServer. Therefore, we should let UniqueIDBDatabase forget connection when it receives a 
        conenctionClosedFromClient.

        No new test because this bug is caused by race between network receiving conenctionClosedFromClient and 
        receiving confirmDidCloseFromServer. This is testable by running some existing layout tests in a row with leak 
        option.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
        (WebCore::IDBServer::UniqueIDBDatabase::confirmDidCloseFromServer):

2019-04-04  Chris Dumez  <cdumez@apple.com>

        Unreviewed, fix iOS build with recent SDKs.

        * platform/gamepad/cocoa/GameControllerGamepad.mm:
        (WebCore::GameControllerGamepad::GameControllerGamepad):

2019-04-04  Eric Carlson  <eric.carlson@apple.com>

        [MediaStream] Host should be able to mute screen capture and camera/microphone independently
        https://bugs.webkit.org/show_bug.cgi?id=196555
        <rdar://problem/47303865>

        Reviewed by Youenn Fablet.

        Test: fast/mediastream/media-stream-page-muted.html

        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::MediaStream): Call setCaptureTracksMuted to pass page muted 
        state to tracks.
        (WebCore::MediaStream::startProducingData): Ditto.
        (WebCore::MediaStream::setCaptureTracksMuted): New.
        * Modules/mediastream/MediaStream.h:

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack): Call setMuted with page muted state.
        (WebCore::MediaStreamTrack::setMuted): Set muted according to page state and source type.
        (WebCore::MediaStreamTrack::pageMutedStateDidChange): Call setMuted.
        (WebCore::MediaStreamTrack::mediaState const): Update for new page state.
        * Modules/mediastream/MediaStreamTrack.h:

        * page/MediaProducer.h: Split capture muted state into two: camera/microphone and screen.

        * page/Page.h:
        (WebCore::Page::isMediaCaptureMuted const): Update for state changes.

        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::setCaptureTracksMuted): Deleted.
        (WebCore::MediaStreamPrivate::hasCaptureVideoSource const): Deleted.
        * platform/mediastream/MediaStreamPrivate.h:

        * platform/mediastream/RealtimeMediaSource.cpp:
        (WebCore::RealtimeMediaSource::setMuted): Log state.
        (WebCore::RealtimeMediaSource::notifyMutedChange): Call notifyMutedObservers on the
        next runloop so events aren't dispatched synchronously.

        * testing/Internals.cpp:
        (WebCore::Internals::setPageMuted): Add new state.

2019-04-04  Chris Dumez  <cdumez@apple.com>

        Unreviewed, update r243884 to use macros in Compiler.h instead.

        * platform/ios/LegacyTileGrid.mm:
        (WebCore::LegacyTileGrid::dropDistantTiles):

2019-04-04  Chris Fleizach  <cfleizach@apple.com>

        AX: Crash under WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored()
        https://bugs.webkit.org/show_bug.cgi?id=196600
        <rdar://problem/49572996>

        Reviewed by Joanmarie Diggs.

        Audit AX code to not dereference renderer before checking if it's null.
        Not clear how to reproduce at this time.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::webAreaIsPresentational):
        (WebCore::AccessibilityRenderObject::layoutCount const):
        (WebCore::AccessibilityRenderObject::widget const):

2019-04-04  Antti Koivisto  <antti@apple.com>

        Compute accurate regions for touch-action
        https://bugs.webkit.org/show_bug.cgi?id=196536
        <rdar://problem/49516022>

        Reviewed by Simon Fraser.

        Tests: pointerevents/ios/touch-action-region-basic.html
               pointerevents/ios/touch-action-region-layers.html
               pointerevents/ios/touch-action-region-pan-x-y.html

        - Use style system to compute effective touch-action without additional tree walks.
        - Compute touch-action region in a fake paint, at the same time with the event region.

        This patch doesn't yet use the computed region for anything except test output.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/StyleResolver.cpp:
        (WebCore::computeEffectiveTouchActions):
        (WebCore::StyleResolver::adjustRenderStyle):

        Update RenderStyle::effectiveTouchAction.

        * dom/Element.cpp:
        (WebCore::Element::computedTouchActions const):

        Just get it from the style.

        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::setEventRegion):
        (WebCore::GraphicsLayer::setTouchActionRegion):
        (WebCore::GraphicsLayer::dumpProperties const):
        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::touchActionRegion const):
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::setTouchActionRegion):
        * platform/graphics/ca/GraphicsLayerCA.h:
        * rendering/PaintInfo.h:
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::collectEventRegionForFragments):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateConfiguration):

        Need to do this for the top compositing layer too.

        (WebCore::RenderLayerBacking::updateEventRegion):

        Compute touch-action region too.
        As a basic optimization avoid doing any extra work if there are no elements with non-default touch-action property.

        * rendering/TouchActionRegion.cpp: Added.
        (WebCore::toIndex):
        (WebCore::toTouchAction):
        (WebCore::toString):
        (WebCore::TouchActionRegion::unite):
        (WebCore::TouchActionRegion::actionsForPoint const):
        (WebCore::TouchActionRegion::translate):
        (WebCore::operator<<):
        * rendering/TouchActionRegion.h: Added.

        Class for collecting and maintaining touch-action region.

        (WebCore::TouchActionRegion::isEmpty const):
        (WebCore::TouchActionRegion::operator== const):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::effectiveTouchActions const):
        (WebCore::RenderStyle::setEffectiveTouchActions):

        Implement as inherited property for efficiency (touch-action itself is non-inherited).

        * rendering/style/StyleRareInheritedData.cpp:
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator== const):
        * rendering/style/StyleRareInheritedData.h:

2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>

        Unreviewed, fix linking error because the build of RTCIceTransport.cpp is handled in Xcode project side accidentally
        https://bugs.webkit.org/show_bug.cgi?id=196475

        We did not have RTCIceTransport.cpp in Sources.txt.

        * WebCore.xcodeproj/project.pbxproj:

2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>

        [WebCore] Put most of derived classes of ScriptWrappable into IsoHeap
        https://bugs.webkit.org/show_bug.cgi?id=196475

        Reviewed by Saam Barati.

        This patch puts most of derived classes of ScriptWrappable into IsoHeap. We do not include derived classes of Event simply
        because Internal repository code also inherits it. After watching the result of this patch, we will try Event and its derived
        classes into IsoHeap too.

        This patch makes the following things IsoHeap-allocated. These classes are listed by using lldb python script.

            1. DOM collections (HTMLCollection etc.)
            2. WebAudio nodes
            3. IDB classes
            4. FileSystem API classes
            5. Canvas contexts
            6. WebRTC classses
            7. XMLHttpRequest related classes
            8. WebSocket related classes
            9. Worker and Worklet related classes
            10. Other misc classes

        * Modules/applepay/ApplePaySession.cpp:
        * Modules/applepay/ApplePaySession.h:
        * Modules/encryptedmedia/MediaKeySession.cpp:
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
        * Modules/entriesapi/DOMFileSystem.cpp:
        * Modules/entriesapi/DOMFileSystem.h:
        (WebCore::DOMFileSystem::createEntryForFile): Deleted.
        (WebCore::DOMFileSystem::name const): Deleted.
        * Modules/entriesapi/FileSystemDirectoryEntry.h:
        * Modules/entriesapi/FileSystemDirectoryReader.cpp:
        * Modules/entriesapi/FileSystemDirectoryReader.h:
        * Modules/entriesapi/FileSystemEntry.cpp:
        * Modules/entriesapi/FileSystemEntry.h:
        * Modules/entriesapi/FileSystemFileEntry.h:
        * Modules/geolocation/Geolocation.cpp:
        * Modules/geolocation/Geolocation.h:
        (WebCore::Geolocation::document const): Deleted.
        (WebCore::Geolocation::frame const): Deleted.
        (WebCore::Geolocation::resetIsAllowed): Deleted.
        (WebCore::Geolocation::isAllowed const): Deleted.
        (WebCore::Geolocation::isDenied const): Deleted.
        (WebCore::Geolocation::hasListeners const): Deleted.
        * Modules/indexeddb/IDBCursor.cpp:
        * Modules/indexeddb/IDBCursor.h:
        * Modules/indexeddb/IDBCursorWithValue.cpp:
        * Modules/indexeddb/IDBCursorWithValue.h:
        * Modules/indexeddb/IDBDatabase.cpp:
        * Modules/indexeddb/IDBDatabase.h:
        (WebCore::IDBDatabase::info const): Deleted.
        (WebCore::IDBDatabase::databaseConnectionIdentifier const): Deleted.
        (WebCore::IDBDatabase::connectionProxy): Deleted.
        (WebCore::IDBDatabase::isClosingOrClosed const): Deleted.
        * Modules/indexeddb/IDBKeyRange.cpp:
        * Modules/indexeddb/IDBKeyRange.h:
        (WebCore::IDBKeyRange::lower const): Deleted.
        (WebCore::IDBKeyRange::upper const): Deleted.
        (WebCore::IDBKeyRange::lowerOpen const): Deleted.
        (WebCore::IDBKeyRange::upperOpen const): Deleted.
        * Modules/indexeddb/IDBOpenDBRequest.cpp:
        * Modules/indexeddb/IDBOpenDBRequest.h:
        * Modules/indexeddb/IDBRequest.cpp:
        * Modules/indexeddb/IDBRequest.h:
        * Modules/indexeddb/IDBTransaction.cpp:
        * Modules/indexeddb/IDBTransaction.h:
        (WebCore::IDBTransaction::mode const): Deleted.
        (WebCore::IDBTransaction::info const): Deleted.
        (WebCore::IDBTransaction::database): Deleted.
        (WebCore::IDBTransaction::database const): Deleted.
        (WebCore::IDBTransaction::originalDatabaseInfo const): Deleted.
        (WebCore::IDBTransaction::isVersionChange const): Deleted.
        (WebCore::IDBTransaction::isReadOnly const): Deleted.
        (WebCore::IDBTransaction::isFinished const): Deleted.
        * Modules/mediarecorder/MediaRecorder.cpp:
        * Modules/mediarecorder/MediaRecorder.h:
        * Modules/mediasession/MediaRemoteControls.cpp:
        * Modules/mediasession/MediaRemoteControls.h:
        (WebCore::MediaRemoteControls::create): Deleted.
        (WebCore::MediaRemoteControls::previousTrackEnabled const): Deleted.
        (WebCore::MediaRemoteControls::nextTrackEnabled const): Deleted.
        * Modules/mediasource/MediaSource.cpp:
        * Modules/mediasource/MediaSource.h:
        * Modules/mediasource/SourceBuffer.cpp:
        * Modules/mediasource/SourceBuffer.h:
        * Modules/mediasource/SourceBufferList.cpp:
        * Modules/mediasource/SourceBufferList.h:
        * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
        * Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
        * Modules/mediastream/MediaDeviceInfo.cpp:
        * Modules/mediastream/MediaDeviceInfo.h:
        (WebCore::MediaDeviceInfo::label const): Deleted.
        (WebCore::MediaDeviceInfo::deviceId const): Deleted.
        (WebCore::MediaDeviceInfo::groupId const): Deleted.
        (WebCore::MediaDeviceInfo::kind const): Deleted.
        * Modules/mediastream/MediaDevices.cpp:
        * Modules/mediastream/MediaDevices.h:
        * Modules/mediastream/MediaStream.cpp:
        * Modules/mediastream/MediaStream.h:
        * Modules/mediastream/MediaStreamTrack.cpp:
        * Modules/mediastream/MediaStreamTrack.h:
        * Modules/mediastream/RTCDTMFSender.cpp:
        * Modules/mediastream/RTCDTMFSender.h:
        * Modules/mediastream/RTCDataChannel.cpp:
        * Modules/mediastream/RTCDataChannel.h:
        * Modules/mediastream/RTCIceCandidate.cpp:
        * Modules/mediastream/RTCIceCandidate.h:
        (WebCore::RTCIceCandidate::candidate const): Deleted.
        (WebCore::RTCIceCandidate::sdpMid const): Deleted.
        (WebCore::RTCIceCandidate::sdpMLineIndex const): Deleted.
        (WebCore::RTCIceCandidate::setCandidate): Deleted.
        * Modules/mediastream/RTCIceTransport.cpp:
        * Modules/mediastream/RTCIceTransport.h:
        (WebCore::RTCIceTransport::create): Deleted.
        (WebCore::RTCIceTransport::state const): Deleted.
        (WebCore::RTCIceTransport::setState): Deleted.
        (WebCore::RTCIceTransport::gatheringState const): Deleted.
        (WebCore::RTCIceTransport::setGatheringState): Deleted.
        (WebCore::RTCIceTransport::RTCIceTransport): Deleted.
        * Modules/mediastream/RTCPeerConnection.cpp:
        * Modules/mediastream/RTCPeerConnection.h:
        * Modules/mediastream/RTCRtpReceiver.cpp:
        * Modules/mediastream/RTCRtpReceiver.h:
        (WebCore::RTCRtpReceiver::create): Deleted.
        (WebCore::RTCRtpReceiver::setBackend): Deleted.
        (WebCore::RTCRtpReceiver::getParameters): Deleted.
        (WebCore::RTCRtpReceiver::getContributingSources const): Deleted.
        (WebCore::RTCRtpReceiver::getSynchronizationSources const): Deleted.
        (WebCore::RTCRtpReceiver::track): Deleted.
        (WebCore::RTCRtpReceiver::backend): Deleted.
        * Modules/mediastream/RTCRtpSender.cpp:
        * Modules/mediastream/RTCRtpSender.h:
        (WebCore::RTCRtpSender::track): Deleted.
        (WebCore::RTCRtpSender::trackId const): Deleted.
        (WebCore::RTCRtpSender::trackKind const): Deleted.
        (WebCore::RTCRtpSender::mediaStreamIds const): Deleted.
        (WebCore::RTCRtpSender::setMediaStreamIds): Deleted.
        (WebCore::RTCRtpSender::isStopped const): Deleted.
        (WebCore::RTCRtpSender::backend): Deleted.
        * Modules/mediastream/RTCRtpTransceiver.cpp:
        * Modules/mediastream/RTCRtpTransceiver.h:
        (WebCore::RTCRtpTransceiver::create): Deleted.
        (WebCore::RTCRtpTransceiver::sender): Deleted.
        (WebCore::RTCRtpTransceiver::receiver): Deleted.
        (WebCore::RTCRtpTransceiver::iceTransport): Deleted.
        (WebCore::RTCRtpTransceiver::backend): Deleted.
        * Modules/mediastream/RTCSessionDescription.cpp:
        * Modules/mediastream/RTCSessionDescription.h:
        (WebCore::RTCSessionDescription::type const): Deleted.
        (WebCore::RTCSessionDescription::sdp const): Deleted.
        (WebCore::RTCSessionDescription::setSdp): Deleted.
        * Modules/notifications/Notification.cpp:
        * Modules/notifications/Notification.h:
        * Modules/paymentrequest/PaymentRequest.cpp:
        * Modules/paymentrequest/PaymentRequest.h:
        * Modules/paymentrequest/PaymentResponse.cpp:
        * Modules/paymentrequest/PaymentResponse.h:
        * Modules/speech/SpeechSynthesisUtterance.cpp:
        * Modules/speech/SpeechSynthesisUtterance.h:
        * Modules/webaudio/AnalyserNode.cpp:
        * Modules/webaudio/AnalyserNode.h:
        * Modules/webaudio/AudioBasicInspectorNode.cpp:
        * Modules/webaudio/AudioBasicInspectorNode.h:
        * Modules/webaudio/AudioBasicProcessorNode.cpp:
        * Modules/webaudio/AudioBasicProcessorNode.h:
        * Modules/webaudio/AudioBufferSourceNode.cpp:
        * Modules/webaudio/AudioBufferSourceNode.h:
        * Modules/webaudio/AudioContext.cpp:
        * Modules/webaudio/AudioContext.h:
        * Modules/webaudio/AudioDestinationNode.cpp:
        * Modules/webaudio/AudioDestinationNode.h:
        * Modules/webaudio/AudioNode.cpp:
        * Modules/webaudio/AudioNode.h:
        * Modules/webaudio/AudioScheduledSourceNode.cpp:
        * Modules/webaudio/AudioScheduledSourceNode.h:
        * Modules/webaudio/BiquadFilterNode.cpp:
        * Modules/webaudio/BiquadFilterNode.h:
        * Modules/webaudio/ChannelMergerNode.cpp:
        * Modules/webaudio/ChannelMergerNode.h:
        * Modules/webaudio/ChannelSplitterNode.cpp:
        * Modules/webaudio/ChannelSplitterNode.h:
        * Modules/webaudio/ConvolverNode.cpp:
        * Modules/webaudio/ConvolverNode.h:
        * Modules/webaudio/DefaultAudioDestinationNode.cpp:
        * Modules/webaudio/DefaultAudioDestinationNode.h:
        * Modules/webaudio/DelayNode.cpp:
        * Modules/webaudio/DelayNode.h:
        * Modules/webaudio/DynamicsCompressorNode.cpp:
        * Modules/webaudio/DynamicsCompressorNode.h:
        * Modules/webaudio/GainNode.cpp:
        * Modules/webaudio/GainNode.h:
        * Modules/webaudio/MediaElementAudioSourceNode.cpp:
        * Modules/webaudio/MediaElementAudioSourceNode.h:
        * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
        * Modules/webaudio/MediaStreamAudioDestinationNode.h:
        * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
        * Modules/webaudio/MediaStreamAudioSourceNode.h:
        * Modules/webaudio/OfflineAudioContext.cpp:
        * Modules/webaudio/OfflineAudioContext.h:
        * Modules/webaudio/OfflineAudioDestinationNode.cpp:
        * Modules/webaudio/OfflineAudioDestinationNode.h:
        * Modules/webaudio/OscillatorNode.cpp:
        * Modules/webaudio/OscillatorNode.h:
        * Modules/webaudio/PannerNode.cpp:
        * Modules/webaudio/PannerNode.h:
        * Modules/webaudio/ScriptProcessorNode.cpp:
        * Modules/webaudio/ScriptProcessorNode.h:
        * Modules/webaudio/WaveShaperNode.cpp:
        * Modules/webaudio/WaveShaperNode.h:
        * Modules/webgpu/GPUCanvasContext.cpp:
        * Modules/webgpu/GPUCanvasContext.h:
        * Modules/websockets/WebSocket.cpp:
        * Modules/websockets/WebSocket.h:
        * Modules/webvr/VRDisplay.cpp:
        * Modules/webvr/VRDisplay.h:
        (WebCore::VRDisplay::isPresenting const): Deleted.
        (WebCore::VRDisplay::displayName const): Deleted.
        (WebCore::VRDisplay::displayId const): Deleted.
        (WebCore::VRDisplay::depthNear const): Deleted.
        (WebCore::VRDisplay::setDepthNear): Deleted.
        (WebCore::VRDisplay::depthFar const): Deleted.
        (WebCore::VRDisplay::setDepthFar): Deleted.
        (WebCore::VRDisplay::document): Deleted.
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * animation/CSSAnimation.cpp:
        * animation/CSSAnimation.h:
        * animation/CSSTransition.cpp:
        * animation/CSSTransition.h:
        * animation/DeclarativeAnimation.cpp:
        * animation/DeclarativeAnimation.h:
        * animation/WebAnimation.cpp:
        * animation/WebAnimation.h:
        * bindings/js/ScriptWrappable.h:
        * css/CSSComputedStyleDeclaration.cpp:
        * css/CSSComputedStyleDeclaration.h:
        * css/CSSStyleDeclaration.cpp:
        (): Deleted.
        * css/CSSStyleDeclaration.h:
        * css/DOMMatrix.h:
        * css/DOMMatrixReadOnly.cpp:
        * css/DOMMatrixReadOnly.h:
        * css/FontFaceSet.cpp:
        * css/FontFaceSet.h:
        * css/PropertySetCSSStyleDeclaration.cpp:
        * css/PropertySetCSSStyleDeclaration.h:
        * css/WebKitCSSMatrix.cpp:
        * css/WebKitCSSMatrix.h:
        * css/typedom/TypedOMCSSImageValue.cpp: Added.
        * css/typedom/TypedOMCSSImageValue.h:
        * css/typedom/TypedOMCSSNumericValue.cpp: Added.
        * css/typedom/TypedOMCSSNumericValue.h:
        * css/typedom/TypedOMCSSStyleValue.cpp: Added.
        * css/typedom/TypedOMCSSStyleValue.h:
        * css/typedom/TypedOMCSSUnitValue.cpp: Added.
        * css/typedom/TypedOMCSSUnitValue.h:
        * css/typedom/TypedOMCSSUnparsedValue.cpp: Added.
        * css/typedom/TypedOMCSSUnparsedValue.h:
        * dom/AbortController.cpp:
        * dom/AbortController.h:
        * dom/AbortSignal.cpp:
        * dom/AbortSignal.h:
        * dom/AllDescendantsCollection.cpp: Copied from Source/WebCore/xml/XMLHttpRequestEventTarget.h.
        * dom/AllDescendantsCollection.h:
        * dom/ChildNodeList.cpp:
        * dom/ChildNodeList.h:
        * dom/ClassCollection.cpp:
        * dom/ClassCollection.h:
        * dom/DOMImplementation.cpp:
        * dom/DOMImplementation.h:
        (WebCore::DOMImplementation::ref): Deleted.
        (WebCore::DOMImplementation::deref): Deleted.
        (WebCore::DOMImplementation::document): Deleted.
        (WebCore::DOMImplementation::hasFeature): Deleted.
        * dom/DOMPoint.h:
        * dom/DOMPointReadOnly.cpp:
        * dom/DOMPointReadOnly.h:
        * dom/DOMQuad.cpp:
        * dom/DOMQuad.h:
        * dom/DOMRect.h:
        * dom/DOMRectReadOnly.cpp: Copied from Source/WebCore/dom/DOMPointReadOnly.cpp.
        * dom/DOMRectReadOnly.h:
        * dom/DataTransferItemList.cpp:
        * dom/DataTransferItemList.h:
        (WebCore::DataTransferItemList::ref): Deleted.
        (WebCore::DataTransferItemList::deref): Deleted.
        (WebCore::DataTransferItemList::dataTransfer): Deleted.
        (WebCore::DataTransferItemList::hasItems const): Deleted.
        (WebCore::DataTransferItemList::items const): Deleted.
        * dom/DatasetDOMStringMap.cpp:
        * dom/DatasetDOMStringMap.h:
        * dom/DocumentParser.h:
        * dom/EventTarget.cpp:
        * dom/EventTarget.h:
        * dom/LiveNodeList.cpp:
        * dom/LiveNodeList.h:
        * dom/MessageChannel.cpp:
        * dom/MessagePort.cpp:
        * dom/MessagePort.h:
        * dom/NameNodeList.cpp:
        * dom/NameNodeList.h:
        * dom/NamedNodeMap.cpp:
        * dom/NamedNodeMap.h:
        (WebCore::NamedNodeMap::NamedNodeMap): Deleted.
        (WebCore::NamedNodeMap::element): Deleted.
        * dom/NodeIterator.cpp:
        * dom/NodeIterator.h:
        (WebCore::NodeIterator::detach): Deleted.
        (WebCore::NodeIterator::referenceNode const): Deleted.
        (WebCore::NodeIterator::pointerBeforeReferenceNode const): Deleted.
        * dom/NodeList.cpp: Copied from Source/WebCore/xml/XMLHttpRequestEventTarget.h.
        * dom/NodeList.h:
        * dom/NodeRareData.cpp:
        * dom/ScriptExecutionContext.cpp:
        * dom/SimulatedClick.cpp:
        * dom/StaticNodeList.cpp:
        * dom/StaticNodeList.h:
        * dom/TagCollection.cpp:
        * dom/TagCollection.h:
        * dom/TreeWalker.cpp:
        * dom/TreeWalker.h:
        (WebCore::TreeWalker::create): Deleted.
        (WebCore::TreeWalker::currentNode): Deleted.
        (WebCore::TreeWalker::currentNode const): Deleted.
        * fileapi/Blob.cpp:
        * fileapi/Blob.h:
        * fileapi/File.cpp:
        * fileapi/File.h:
        * fileapi/FileList.cpp:
        * fileapi/FileList.h:
        (WebCore::FileList::create): Deleted.
        (WebCore::FileList::length const): Deleted.
        (WebCore::FileList::isEmpty const): Deleted.
        (WebCore::FileList::files const): Deleted.
        (WebCore::FileList::file const): Deleted.
        (WebCore::FileList::FileList): Deleted.
        (WebCore::FileList::append): Deleted.
        (WebCore::FileList::clear): Deleted.
        * fileapi/FileReader.cpp:
        * fileapi/FileReader.h:
        * html/CachedHTMLCollection.h:
        * html/GenericCachedHTMLCollection.cpp:
        * html/GenericCachedHTMLCollection.h:
        * html/HTMLAllCollection.cpp:
        * html/HTMLAllCollection.h:
        * html/HTMLCollection.cpp:
        * html/HTMLCollection.h:
        * html/HTMLFormControlsCollection.cpp:
        * html/HTMLFormControlsCollection.h:
        * html/HTMLNameCollection.cpp:
        * html/HTMLNameCollection.h:
        * html/HTMLOptionsCollection.cpp:
        * html/HTMLOptionsCollection.h:
        * html/HTMLTableRowsCollection.cpp:
        * html/HTMLTableRowsCollection.h:
        * html/ImageBitmap.cpp:
        * html/ImageBitmap.h:
        (WebCore::ImageBitmap::isDetached const): Deleted.
        (WebCore::ImageBitmap::buffer): Deleted.
        (WebCore::ImageBitmap::originClean const): Deleted.
        * html/LabelsNodeList.cpp:
        * html/LabelsNodeList.h:
        * html/MediaController.cpp:
        * html/MediaController.h:
        * html/OffscreenCanvas.cpp:
        * html/OffscreenCanvas.h:
        * html/RadioNodeList.cpp:
        * html/RadioNodeList.h:
        * html/canvas/CanvasRenderingContext.cpp:
        * html/canvas/CanvasRenderingContext.h:
        * html/canvas/CanvasRenderingContext2D.cpp:
        * html/canvas/CanvasRenderingContext2D.h:
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        * html/canvas/CanvasRenderingContext2DBase.h:
        * html/canvas/GPUBasedCanvasRenderingContext.h:
        * html/canvas/ImageBitmapRenderingContext.cpp:
        * html/canvas/ImageBitmapRenderingContext.h:
        * html/canvas/OffscreenCanvasRenderingContext2D.cpp:
        * html/canvas/OffscreenCanvasRenderingContext2D.h:
        * html/canvas/PaintRenderingContext2D.cpp:
        * html/canvas/PaintRenderingContext2D.h:
        * html/canvas/PlaceholderRenderingContext.cpp:
        * html/canvas/PlaceholderRenderingContext.h:
        * html/canvas/WebGL2RenderingContext.cpp:
        * html/canvas/WebGL2RenderingContext.h:
        * html/canvas/WebGLRenderingContext.cpp:
        * html/canvas/WebGLRenderingContext.h:
        * html/canvas/WebGLRenderingContextBase.cpp:
        * html/canvas/WebGLRenderingContextBase.h:
        * html/track/AudioTrackList.h:
        * html/track/DataCue.cpp:
        * html/track/DataCue.h:
        * html/track/InbandDataTextTrack.cpp:
        * html/track/InbandDataTextTrack.h:
        * html/track/InbandGenericTextTrack.cpp:
        * html/track/InbandGenericTextTrack.h:
        * html/track/InbandTextTrack.cpp:
        * html/track/InbandTextTrack.h:
        * html/track/InbandWebVTTTextTrack.cpp:
        * html/track/InbandWebVTTTextTrack.h:
        * html/track/LoadableTextTrack.cpp:
        * html/track/LoadableTextTrack.h:
        * html/track/TextTrack.cpp:
        * html/track/TextTrack.h:
        * html/track/TextTrackCue.cpp:
        * html/track/TextTrackCue.h:
        * html/track/TextTrackCueGeneric.cpp:
        * html/track/TextTrackCueGeneric.h:
        * html/track/TextTrackList.cpp:
        * html/track/TextTrackList.h:
        * html/track/TrackListBase.cpp:
        * html/track/TrackListBase.h:
        * html/track/VTTCue.cpp:
        * html/track/VTTCue.h:
        * html/track/VideoTrackList.h:
        * loader/appcache/DOMApplicationCache.cpp:
        * loader/appcache/DOMApplicationCache.h:
        * page/AbstractDOMWindow.cpp:
        * page/AbstractDOMWindow.h:
        * page/BarProp.cpp:
        * page/BarProp.h:
        (WebCore::BarProp::create): Deleted.
        * page/DOMWindow.cpp:
        * page/DOMWindow.h:
        * page/EventSource.cpp:
        * page/EventSource.h:
        * page/History.cpp:
        * page/History.h:
        * page/Location.cpp:
        * page/Location.h:
        (WebCore::Location::create): Deleted.
        (WebCore::Location::toString const): Deleted.
        * page/Navigator.cpp:
        * page/Navigator.h:
        * page/Performance.cpp:
        * page/Performance.h:
        * page/RemoteDOMWindow.cpp:
        * page/RemoteDOMWindow.h:
        * page/Screen.cpp:
        * page/Screen.h:
        * page/VisualViewport.cpp:
        * page/VisualViewport.h:
        * plugins/DOMMimeTypeArray.cpp:
        * plugins/DOMMimeTypeArray.h:
        (WebCore::DOMMimeTypeArray::create): Deleted.
        * plugins/DOMPlugin.cpp:
        * plugins/DOMPlugin.h:
        (WebCore::DOMPlugin::create): Deleted.
        * plugins/DOMPluginArray.cpp:
        * plugins/DOMPluginArray.h:
        (WebCore::DOMPluginArray::create): Deleted.
        * storage/Storage.cpp:
        * storage/Storage.h:
        (WebCore::Storage::area const): Deleted.
        * workers/AbstractWorker.cpp:
        * workers/AbstractWorker.h:
        * workers/DedicatedWorkerGlobalScope.cpp:
        * workers/DedicatedWorkerGlobalScope.h:
        * workers/Worker.cpp:
        * workers/Worker.h:
        * workers/WorkerGlobalScope.cpp:
        * workers/WorkerGlobalScope.h:
        * workers/service/ServiceWorker.cpp:
        * workers/service/ServiceWorker.h:
        * workers/service/ServiceWorkerContainer.cpp:
        * workers/service/ServiceWorkerContainer.h:
        * workers/service/ServiceWorkerGlobalScope.cpp:
        * workers/service/ServiceWorkerGlobalScope.h:
        * workers/service/ServiceWorkerRegistration.cpp:
        * workers/service/ServiceWorkerRegistration.h:
        * worklets/PaintWorkletGlobalScope.cpp:
        * worklets/PaintWorkletGlobalScope.h:
        * worklets/Worklet.cpp:
        * worklets/Worklet.h:
        * worklets/WorkletGlobalScope.cpp:
        * worklets/WorkletGlobalScope.h:
        * xml/XMLHttpRequest.cpp:
        * xml/XMLHttpRequest.h:
        * xml/XMLHttpRequestEventTarget.h:
        * xml/XMLHttpRequestUpload.cpp:
        * xml/XMLHttpRequestUpload.h:
        * xml/XPathParser.cpp:

2019-04-04  Chris Dumez  <cdumez@apple.com>

        Unreviewed, fix iOS build with recent SDKs.

        std::ptr_fun() is deprecated.

        * platform/ios/LegacyTileGrid.mm:
        (WebCore::LegacyTileGrid::dropDistantTiles):

2019-04-04  Antoine Quint  <graouts@apple.com>

        [Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
        https://bugs.webkit.org/show_bug.cgi?id=196118
        <rdar://problem/46614137>

        Reviewed by Ryosuke Niwa.

        Test: webanimations/js-wrapper-kept-alive.html

        We need to teach WebAnimation to keep its JS wrapper alive if it's relevant or could become relevant again by virtue of having a timeline.

        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::stop): Drive-by fix for the missing superclass method call.
        (WebCore::WebAnimation::hasPendingActivity const):
        * animation/WebAnimation.h:

2019-04-04  Miguel Gomez  <magomez@igalia.com>

        [GTK][WPE] Use a timer to request the creation of pending tiles
        https://bugs.webkit.org/show_bug.cgi?id=196594

        Reviewed by Žan Doberšek.

        Use a timer to request pending tile creation, as calls to notifyFlushRequired() are discarded
        while inside a layer flush.

        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
        (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
        (WebCore::CoordinatedGraphicsLayer::requestPendingTileCreationTimerFired):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

2019-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        [ATK] Wrong index passed to AtkObject::children-changed::add signal in AXObjectCache::attachWrapper()
        https://bugs.webkit.org/show_bug.cgi?id=196538

        Reviewed by Michael Catanzaro.

        In most of the cases the parent is not found, probably because the child is not a direct descendant of the
        parent returned by parentObjectUnignored(). We need to handle the case of find() returning notFound.

        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::AXObjectCache::attachWrapper): Use -1 as the index when find() returns notFound.

2019-04-03  Timothy Hatcher  <timothy@apple.com>

        Update AutoFill field icons to be SVG instead of PNG images.
        https://bugs.webkit.org/show_bug.cgi?id=196557
        rdar://problem/48292514

        Reviewed by Tim Horton.

        * css/html.css:
        (input::-webkit-credentials-auto-fill-button):
        (input::-webkit-contacts-auto-fill-button):
        (input::-webkit-credit-card-auto-fill-button):

2019-04-03  Simon Fraser  <simon.fraser@apple.com>

        Simplify some "programmaticScroll" code paths
        https://bugs.webkit.org/show_bug.cgi?id=196589

        Reviewed by Zalan Bujtas.

        AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll() just returned early if programmaticScroll
        was true, so instead, just never call it. This means we can remove the "programmaticScroll" argument from 
        scheduleUpdateScrollPositionAfterAsyncScroll(). Also change some callers to use the ScrollType enum
        instead of a bool.

        Now, ThreadedScrollingTree::scrollingTreeNodeDidScroll() just returns early. Programmatic scrolls
        update state on the main thread before updating the scrolling tree, so this makes sense.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
        (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
        (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
        (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
        (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
        * page/scrolling/AsyncScrollingCoordinator.h:
        (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):
        (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::matchesUpdateType const):
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::operator<<):
        * page/scrolling/ScrollingCoordinator.h:
        (WebCore::ScrollingCoordinator::reconcileScrollingState):
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

2019-04-03  Youenn Fablet  <youenn@apple.com>

        Add logging and ASSERTs to investigate issue with VPModuleInitialize
        https://bugs.webkit.org/show_bug.cgi?id=196573

        Reviewed by Eric Carlson.

        Add some ASSERTs.
        No change of behavior.

        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
        (WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
        (WebCore::LibWebRTCProviderCocoa::createEncoderFactory):

2019-04-03  Simon Fraser  <simon.fraser@apple.com>

        Remove some redundant memebers from ScrollingStateFrameScrollingNode
        https://bugs.webkit.org/show_bug.cgi?id=196571

        Reviewed by Zalan Bujtas.

        m_requestedScrollPosition and m_requestedScrollPositionRepresentsProgrammaticScroll were
        duplicated on ScrollingStateFrameScrollingNode and ScrollingStateScrollingNode, so
        remove them from the derived class.

        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
        (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
        (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
        * page/scrolling/ScrollingStateFrameScrollingNode.h:

2019-04-03  Said Abou-Hallawa  <sabouhallawa@apple.com>

        REGRESSION (r220717): Assertion fires when animating an SVG rounded corner rect till it collapses
        https://bugs.webkit.org/show_bug.cgi?id=196518

        Reviewed by Simon Fraser.

        r220717 made RenderSVGRect clear its m_path in updateShapeFromElement().

        RenderSVGRect tries to optimize its layout and drawing if the rectangle
        is not rounded. So it uses the flag m_usePathFallback to know whether to
        use m_path or m_innerStrokeRect and m_outerStrokeRect. If the rectangle
        is rounded but its boundingSize is empty, m_path will be cleared,
        m_innerStrokeRect and m_outerStrokeRect will be recalculated but
        m_usePathFallback will not be reset to false. Therefore when calling 
        RenderSVGRect::isEmpty(), it will call RenderSVGShape::isEmpty() which
        will assert since m_path is null.

        Test: svg/animations/animate-rounded-corner-rect-zero-height.svg

        * rendering/svg/RenderSVGRect.cpp:
        (WebCore::RenderSVGRect::updateShapeFromElement):
        Reset m_usePathFallback to false once clearPath() is called.

2019-04-03  Ryosuke Niwa  <rniwa@webkit.org>

        Nullptr crash in InlineTextBox::selectionState via TextIndicator::createWithRange
        https://bugs.webkit.org/show_bug.cgi?id=196579

        Reviewed by Simon Fraser.

        Avoid crashing accessing the unengated optional's value in relese builds for now.

        Unfortunately, fixing the underlying cause of the selection states of RenderView & RenderObject
        getting out out of sync would require a significant re-architecturing of the whole selection
        repainting / state managing mechanism.

        * rendering/SelectionRangeData.h:
        (WebCore::SelectionRangeData::startPosition const):
        (WebCore::SelectionRangeData::endPosition const):

2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>

        -apple-trailing-word is needed for browser detection
        https://bugs.webkit.org/show_bug.cgi?id=196575

        Unreviewed.

        This is an unreviewed partial revert of r243819. Turns out there are some websites
        which use this property to do browser detection. So, we need to continue to parse
        the property, but we don't need the property to do anything.

        Test: fast/text/trailing-word-detection.html

        * Configurations/FeatureDefines.xcconfig:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator TrailingWord const):
        * css/CSSProperties.json:
        * css/CSSValueKeywords.in:
        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::trailingWord const):
        (WebCore::RenderStyle::setTrailingWord):
        (WebCore::RenderStyle::initialTrailingWord):
        * rendering/style/RenderStyleConstants.h:

2019-04-03  Don Olmstead  <don.olmstead@sony.com>

        [CMake][WTF] Mirror XCode header directories
        https://bugs.webkit.org/show_bug.cgi?id=191662

        Reviewed by Konstantin Tokarev.

        Use WTFFramework as a dependency and include frameworks/WTF.cmake for AppleWin internal
        builds.

        * CMakeLists.txt:
        * PlatformWin.cmake:

2019-04-03  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Remove SVG properties tear-off objects
        https://bugs.webkit.org/show_bug.cgi?id=191237

        Reviewed by Simon Fraser.

        This patch cleans the code from unused SVG sources and get rid off the
        remaining SVG properties tear-off objects. Here are more details:

        -- Remove the SVGAttributeAnimationController and move its code to the
           SVGAnimateElementBase. SVGAttributeAnimationController was introduced
           to allow animating the SVG properties whether they are backed by tear
           off objects or not. Since there will be no tear off objects anymore,
           one animation controller will be needed. But in this case, it will be
           better if we make SVGAnimateElementBase is the animation controller
           and make it manage the animator directly.

        -- Remove SVGAttributeRegistry, SVGAttributeOwnerProxy and the virtual
           function SVGElement::attributeOwnerProxy(). Remove also all the
           overriding functions attributeOwnerProxy() from all the SVGElements.

        -- Remove isKnownAttribute() from all the SVG header files except from 
           four classes: SVGURIReference, SVGFitToViewBox, SVGLangSpace
           and SVGExternalResourcesRequired.

        -- Remove all the SVG animated properties classifying functions from
           SVGElement. This is now handled by SVGPropertyRegistry.

        -- There is no need for the enum AnimatedPropertyType anymore. The SVG
           property accessor knows its type, knows how to access it and know what
           animator it should be created for it.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Element.cpp:
        (WebCore::Element::synchronizeAllAttributes const):
        (WebCore::Element::synchronizeAttribute const):
        (WebCore::Element::fastAttributeLookupAllowed const):
        These functions are surprisingly marked 'const'. They were calling 'const'
        functions in SVGElement and SVGElement was casting 'this' as non 'const'
        before calling the non 'const' functions through the non 'const' 'this'
        pointer. Change this by moving the casting to the Element functions.

        * rendering/svg/RenderSVGResourceGradient.cpp:
        (WebCore::RenderSVGResourceGradient::applyResource):
        * rendering/svg/RenderSVGResourcePattern.cpp:
        (WebCore::RenderSVGResourcePattern::applyResource):
        * svg/SVGAElement.h:
        * svg/SVGAltGlyphElement.h:
        * svg/SVGAnimateElementBase.cpp:
        (WebCore::SVGAnimateElementBase::SVGAnimateElementBase):
        (WebCore::SVGAnimateElementBase::animator const):
        (WebCore::SVGAnimateElementBase::hasInvalidCSSAttributeType const):
        (WebCore::SVGAnimateElementBase::isDiscreteAnimator const):
        (WebCore::SVGAnimateElementBase::setTargetElement):
        (WebCore::SVGAnimateElementBase::setAttributeName):
        (WebCore::SVGAnimateElementBase::resetAnimation):
        (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
        (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
        (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
        (WebCore::SVGAnimateElementBase::resetAnimatedType):
        (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
        (WebCore::SVGAnimateElementBase::applyResultsToTarget):
        (WebCore::SVGAnimateElementBase::clearAnimatedType):
        (WebCore::SVGAnimateElementBase::calculateDistance):
        (WebCore::SVGAnimateElementBase::attributeAnimationController): Deleted.
        (WebCore::SVGAnimateElementBase::determineAnimatedPropertyType const): Deleted.
        (WebCore::SVGAnimateElementBase::isAdditive const): Deleted.
        * svg/SVGAnimateElementBase.h:
        (WebCore::SVGAnimateElementBase::animatorIfExists const):
        (WebCore::SVGAnimateElementBase::attributeAnimationControllerIfExists const): Deleted.
        The order of the functions was changed to resemble the order of running
        the animation:
          -- Setting the animation range
          -- Starting the animation
          -- Progressing the animation
          -- Applying the the progressed animaVal() to the target element
          -- Stopping the animation

        * svg/SVGAnimateMotionElement.cpp:
        (WebCore::SVGAnimateMotionElement::calculateDistance):
        * svg/SVGAnimateMotionElement.h:
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
        (WebCore::SVGAnimationElement::shouldApplyAnimation): Deleted.
        * svg/SVGAnimationElement.h:
        (WebCore::SVGAnimationElement::attributeRegistry): Deleted.
        (WebCore::SVGAnimationElement::calculateDistance): Deleted.
        * svg/SVGAttributeAnimationController.cpp: Removed.
        * svg/SVGAttributeAnimationController.h: Removed.
        * svg/SVGAttributeAnimationControllerBase.cpp: Removed.
        * svg/SVGAttributeAnimationControllerBase.h: Removed.
        * svg/SVGCircleElement.h:
        * svg/SVGClipPathElement.h:
        * svg/SVGComponentTransferFunctionElement.h:
        * svg/SVGCursorElement.h:
        * svg/SVGDefsElement.h:
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::synchronizeAttribute):
        (WebCore::SVGElement::synchronizeAllAttributes):
        (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
        (WebCore::createAttributeNameToAnimatedPropertyTypeMap): Deleted.
        (WebCore::attributeNameToAnimatedPropertyTypeMap): Deleted.
        (WebCore::createCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Deleted.
        (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Deleted.
        (WebCore::SVGElement::animatedPropertyTypesForAttribute): Deleted.
        (WebCore::SVGElement::synchronizeAnimatedSVGAttribute const): Deleted.
        (WebCore::SVGElement::isAnimatableCSSProperty): Deleted.
        (WebCore::SVGElement::isPresentationAttributeWithSVGDOM): Deleted.
        * svg/SVGElement.h:
        (WebCore::SVGElement::attributeOwnerProxy const): Deleted.
        (WebCore::SVGElement::attributeRegistry): Deleted.
        (WebCore::SVGElement::synchronizeAttribute): Deleted.
        (WebCore::SVGElement::synchronizeAttributes): Deleted.
        (WebCore::SVGElement::animatedTypes const): Deleted.
        (WebCore::SVGElement::lookupAnimatedProperty const): Deleted.
        (WebCore::SVGElement::lookupOrCreateAnimatedProperty): Deleted.
        (WebCore::SVGElement::lookupOrCreateAnimatedProperties): Deleted.
        (WebCore::SVGElement::isKnownAttribute): Deleted.
        * svg/SVGEllipseElement.h:
        * svg/SVGExternalResourcesRequired.h:
        (WebCore::SVGExternalResourcesRequired::attributeRegistry): Deleted.
        (WebCore::SVGExternalResourcesRequired::attributeOwnerProxy): Deleted.
        * svg/SVGFEBlendElement.h:
        * svg/SVGFEColorMatrixElement.h:
        * svg/SVGFEComponentTransferElement.h:
        * svg/SVGFECompositeElement.h:
        * svg/SVGFEConvolveMatrixElement.h:
        * svg/SVGFEDiffuseLightingElement.h:
        * svg/SVGFEDisplacementMapElement.h:
        * svg/SVGFEDropShadowElement.h:
        * svg/SVGFEGaussianBlurElement.h:
        * svg/SVGFEImageElement.h:
        * svg/SVGFELightElement.h:
        * svg/SVGFEMergeNodeElement.h:
        * svg/SVGFEMorphologyElement.h:
        * svg/SVGFEOffsetElement.h:
        * svg/SVGFESpecularLightingElement.h:
        * svg/SVGFETileElement.h:
        * svg/SVGFETurbulenceElement.h:
        * svg/SVGFilterElement.h:
        * svg/SVGFilterPrimitiveStandardAttributes.h:
        (WebCore::SVGFilterPrimitiveStandardAttributes::attributeRegistry): Deleted.
        * svg/SVGFitToViewBox.h:
        (WebCore::SVGFitToViewBox::attributeRegistry): Deleted.
        * svg/SVGFontElement.h:
        * svg/SVGForeignObjectElement.h:
        * svg/SVGGElement.h:
        * svg/SVGGeometryElement.h:
        * svg/SVGGlyphRefElement.h:
        * svg/SVGGradientElement.cpp:
        (WebCore::SVGGradientElement::svgAttributeChanged):
        * svg/SVGGradientElement.h:
        (WebCore::SVGGradientElement::attributeRegistry): Deleted.
        (WebCore::SVGGradientElement::isKnownAttribute): Deleted.
        * svg/SVGGraphicsElement.h:
        (WebCore::SVGGraphicsElement::attributeRegistry): Deleted.
        * svg/SVGImageElement.h:
        * svg/SVGLineElement.h:
        * svg/SVGLinearGradientElement.h:
        * svg/SVGMPathElement.h:
        * svg/SVGMarkerElement.cpp:
        * svg/SVGMarkerElement.h:
        * svg/SVGMaskElement.h:
        * svg/SVGPathElement.h:
        * svg/SVGPatternElement.h:
        * svg/SVGPolyElement.h:
        * svg/SVGRadialGradientElement.h:
        * svg/SVGRectElement.h:
        * svg/SVGSVGElement.h:
        * svg/SVGScriptElement.h:
        * svg/SVGStopElement.h:
        * svg/SVGSwitchElement.h:
        * svg/SVGSymbolElement.h:
        * svg/SVGTRefElement.h:
        * svg/SVGTests.cpp:
        (WebCore::SVGTests::svgAttributeChanged):
        (WebCore::SVGTests::attributeRegistry): Deleted.
        (WebCore::SVGTests::isKnownAttribute): Deleted.
        * svg/SVGTests.h:
        * svg/SVGTextContentElement.cpp:
        * svg/SVGTextContentElement.h:
        (WebCore::SVGTextContentElement::attributeRegistry): Deleted.
        * svg/SVGTextPathElement.h:
        * svg/SVGTextPositioningElement.h:
        (WebCore::SVGTextPositioningElement::attributeRegistry): Deleted.
        * svg/SVGURIReference.cpp:
        (WebCore::SVGURIReference::SVGURIReference):
        (WebCore::SVGURIReference::attributeRegistry): Deleted.
        * svg/SVGURIReference.h:
        * svg/SVGUseElement.h:
        * svg/SVGViewElement.h:
        * svg/SVGViewSpec.cpp:
        (WebCore::SVGViewSpec::SVGViewSpec):
        * svg/SVGViewSpec.h:
        * svg/SVGZoomAndPanType.h:
        * svg/properties/SVGAnimatedListPropertyTearOff.h: Removed.
        * svg/properties/SVGAnimatedPropertyAnimator.h:
        * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
        * svg/properties/SVGAnimatedPropertyPairAnimator.h:
        * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
        * svg/properties/SVGAnimatedPropertyTearOff.h: Removed.
        * svg/properties/SVGAnimatedPropertyType.h: Removed.

        * svg/properties/SVGAnimationAdditiveFunction.h:
        (WebCore::SVGAnimationAdditiveFunction::animate):
        (WebCore::SVGAnimationAdditiveFunction::progress): Deleted.
        * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
        (WebCore::SVGAnimationLengthListFunction::animate):
        (WebCore::SVGAnimationNumberListFunction::animate):
        (WebCore::SVGAnimationPointListFunction::animate):
        (WebCore::SVGAnimationTransformListFunction::animate):
        (WebCore::SVGAnimationLengthListFunction::progress): Deleted.
        (WebCore::SVGAnimationNumberListFunction::progress): Deleted.
        (WebCore::SVGAnimationPointListFunction::progress): Deleted.
        (WebCore::SVGAnimationTransformListFunction::progress): Deleted.
        * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
        (WebCore::SVGAnimationAngleFunction::animate):
        (WebCore::SVGAnimationColorFunction::animate):
        (WebCore::SVGAnimationIntegerFunction::animate):
        (WebCore::SVGAnimationLengthFunction::animate):
        (WebCore::SVGAnimationNumberFunction::animate):
        (WebCore::SVGAnimationPathSegListFunction::animate):
        (WebCore::SVGAnimationRectFunction::animate):
        (WebCore::SVGAnimationAngleFunction::progress): Deleted.
        (WebCore::SVGAnimationColorFunction::progress): Deleted.
        (WebCore::SVGAnimationIntegerFunction::progress): Deleted.
        (WebCore::SVGAnimationLengthFunction::progress): Deleted.
        (WebCore::SVGAnimationNumberFunction::progress): Deleted.
        (WebCore::SVGAnimationPathSegListFunction::progress): Deleted.
        (WebCore::SVGAnimationRectFunction::progress): Deleted.
        * svg/properties/SVGAnimationDiscreteFunction.h:
        (WebCore::SVGAnimationDiscreteFunction::animate):
        (WebCore::SVGAnimationDiscreteFunction::progress): Deleted.
        * svg/properties/SVGAnimationFunction.h:
        (WebCore::SVGAnimationFunction::calculateDistance const):
        -- Rename the 'progress()' functions of SVGAttributeAnimator and SVGAnimationFunction
           to 'animate()'.
        -- Rename the argument 'percentage' of these function to 'progress'
        -- Make calculateDistance return Optional<float> so it does not have to
           return -1 in case of error.

        * svg/properties/SVGAttribute.h: Removed.
        * svg/properties/SVGAttributeAccessor.h: Removed.
        * svg/properties/SVGAttributeAnimator.h:
        (WebCore::SVGAttributeAnimator::calculateDistance const):
        * svg/properties/SVGAttributeOwnerProxy.cpp: Removed.
        * svg/properties/SVGAttributeOwnerProxy.h: Removed.
        * svg/properties/SVGAttributeOwnerProxyImpl.h: Removed.
        * svg/properties/SVGAttributeRegistry.h: Removed.
        * svg/properties/SVGLegacyAnimatedProperty.cpp: Removed.
        * svg/properties/SVGLegacyAnimatedProperty.h: Removed.
        * svg/properties/SVGLegacyProperty.h: Removed.
        * svg/properties/SVGListProperty.h: Removed.
        * svg/properties/SVGListPropertyTearOff.h: Removed.
        * svg/properties/SVGPrimitivePropertyAnimator.h:
        * svg/properties/SVGProperty.h:
        * svg/properties/SVGPropertyAnimator.h:
        * svg/properties/SVGPropertyTearOff.h: Removed.
        * svg/properties/SVGValuePropertyAnimator.h:
        * svg/properties/SVGValuePropertyListAnimator.h:

2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>

        Documents can be destroyed before their CSSFontFaceSet is destroyed
        https://bugs.webkit.org/show_bug.cgi?id=195830

        Reviewed by Darin Adler.

        CSSFontFaceSet has a raw pointer to its owning document. JS can keep the CSSFontFaceSet alive (by using FontFaceSet)
        and can destroy the document at any time. When the document is destroyed, the link between the two objects needs to
        be severed.

        Test: fast/text/font-face-set-destroy-document.html

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::CSSFontFace):
        * css/CSSFontFace.h:
        * css/CSSFontFaceSet.cpp:
        (WebCore::CSSFontFaceSet::CSSFontFaceSet):
        (WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):
        * css/CSSFontFaceSet.h:
        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::CSSFontSelector):
        (WebCore::CSSFontSelector::addFontFaceRule):
        * css/CSSFontSelector.h:
        * css/FontFace.cpp:
        (WebCore::FontFace::FontFace):

2019-04-03  Sihui Liu  <sihui_liu@apple.com>

        Follow up fix for r243807: Use MarkedArgumentBuffer instead of Vector for JSValue
        https://bugs.webkit.org/show_bug.cgi?id=196547

        Reviewed by Geoffrey Garen.

        JSValue in Vector could be garbage collected because GC doesn't know Vector memory on C++ heap.

        * bindings/js/JSIDBRequestCustom.cpp:
        (WebCore::JSIDBRequest::result const):

2019-04-03  Chris Dumez  <cdumez@apple.com>

        HTML fragment serialization should not strip whitespace from URL attribute values
        https://bugs.webkit.org/show_bug.cgi?id=196551

        Reviewed by Ryosuke Niwa.

        HTML fragment serialization should not strip whitespace from URL attribute values as per:
        - https://html.spec.whatwg.org/multipage/parsing.html#html-fragment-serialisation-algorithm

        WebKit was stripping such whitespace, Gecko and Blink are not. Align WebKit with other
        browser engines and the specification.

        No new tests, rebaselined existing test.

        * editing/MarkupAccumulator.cpp:
        (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):

2019-04-02  Ryosuke Niwa  <rniwa@webkit.org>

        Crash in HTMLCanvasElement::createContext2d after the element got adopted to a new document
        https://bugs.webkit.org/show_bug.cgi?id=196527

        Reviewed by Antti Koivisto.

        We need to update CanvasBase::m_scriptExecutionContext when HTMLCanvasElement moves from
        one document to another. Fixed the bug by making CanvasBase::scriptExecutionContext make
        a virtual function call instead of directly storing a raw pointer. In HTMLCanvasElement,
        we use Node::scriptExecutionContext(). Use ContextDestructionObserver in CustomPaintCanvas
        and OffscreenCanvas instead of a raw pointer.

        Unfortunately, no new tests since there is no reproducible test case.

        * html/CanvasBase.cpp:
        (WebCore::CanvasBase::CanvasBase):
        * html/CanvasBase.h:
        (WebCore::CanvasBase::scriptExecutionContext const):
        * html/CustomPaintCanvas.cpp:
        (WebCore::CustomPaintCanvas::CustomPaintCanvas):
        * html/CustomPaintCanvas.h:
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::HTMLCanvasElement):
        * html/HTMLCanvasElement.h:
        * html/OffscreenCanvas.cpp:
        (WebCore::OffscreenCanvas::OffscreenCanvas):
        * html/OffscreenCanvas.h:

2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>

        Remove support for -apple-trailing-word
        https://bugs.webkit.org/show_bug.cgi?id=196525

        Reviewed by Zalan Bujtas.

        This CSS property is nonstandard and not used.

        * Configurations/FeatureDefines.xcconfig:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::operator TrailingWord const): Deleted.
        * css/CSSProperties.json:
        * css/CSSValueKeywords.in:
        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::canUseForStyle):
        * rendering/SimpleLineLayoutCoverage.cpp:
        (WebCore::SimpleLineLayout::printReason):
        * rendering/SimpleLineLayoutCoverage.h:
        * rendering/line/BreakingContext.h:
        (WebCore::BreakingContext::BreakingContext):
        (WebCore::BreakingContext::lineBreak):
        (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
        (WebCore::BreakingContext::commitLineBreakClear):
        (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
        (WebCore::BreakingContext::handleBR):
        (WebCore::BreakingContext::handleFloat):
        (WebCore::BreakingContext::handleText):
        (WebCore::BreakingContext::handleEndOfLine):
        (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::push): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::update): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::renderer const): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::offset const): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::nextBreakablePosition const): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator const): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode const): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::get const): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::current const): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::historyLength const): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::moveTo): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::increment): Deleted.
        (WebCore::BreakingContext::InlineIteratorHistory::clear): Deleted.
        (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Deleted.
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::trailingWord const): Deleted.
        (WebCore::RenderStyle::setTrailingWord): Deleted.
        (WebCore::RenderStyle::initialTrailingWord): Deleted.
        * rendering/style/RenderStyleConstants.h:
        * rendering/style/StyleRareInheritedData.cpp:
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator== const):
        * rendering/style/StyleRareInheritedData.h:

2019-04-03  Youenn Fablet  <youenn@apple.com>

        Use makePendingActivity in DOMCache
        https://bugs.webkit.org/show_bug.cgi?id=196515

        Reviewed by Geoffrey Garen.

        No change of behavior, just modernizing the code.

        * Modules/cache/DOMCache.cpp:
        (WebCore::DOMCache::retrieveRecords):
        (WebCore::DOMCache::batchDeleteOperation):
        (WebCore::DOMCache::batchPutOperation):
        * Modules/cache/DOMCacheStorage.cpp:
        (WebCore::DOMCacheStorage::match):

2019-04-03  Chris Dumez  <cdumez@apple.com>

        [XML Parser] Insert the error message block when stopping parsing and an error occurred
        https://bugs.webkit.org/show_bug.cgi?id=196546

        Reviewed by Alexey Proskuryakov.

        Insert the error message block when stopping parsing and an error occurred. This is based
        on the following Blink commit:
        - https://chromium.googlesource.com/chromium/src.git/+/565958bc22e2d49fed7af144482c2bf4d416fec5

        No new tests, rebaselined existing test.

        * xml/parser/XMLDocumentParser.cpp:
        (WebCore::XMLDocumentParser::end):
        Avoid showing the error message block twice in some cases. No need to ever call
        insertErrorMessageBlock() if we're already stopped since stopParsing() already
        takes care of doing this.

        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::XMLDocumentParser::stopParsing):
        When XMLDocumentParser::stopParsing() is called to stop parsing, call
        insertErrorMessageBlock() to insert the <parsererror> element if an error
        occurred.

2019-04-03  Youenn Fablet  <youenn@apple.com>

        Clear WorkerCacheStorageConnection callbacks on WorkerGlobalScope termination
        https://bugs.webkit.org/show_bug.cgi?id=196521

        Reviewed by Alex Christensen.

        When the worker global scope is preparing for termination,
        all ActiveDOMObjects are stopped.
        At that time, the completion handlers related to
        WorkerCacheStorageConnection should be cleared to be able to free
        memory, and as they are now no-op anyway.

        We clear the completion handlers once the active DOM objects are stopped
        to limit the processing triggered by clearing them.

        Introducing a new Stopped error code to handle this case.
        Add an assertion so that this error does not surface to JS.

        Covered by existing tests.

        * Modules/cache/CacheStorageConnection.cpp:
        (WebCore::CacheStorageConnection::clearPendingRequests):
        * Modules/cache/CacheStorageConnection.h:
        * Modules/cache/DOMCacheEngine.cpp:
        (WebCore::DOMCacheEngine::errorToException):
        * Modules/cache/DOMCacheEngine.h:
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::prepareForTermination):
        (WebCore::WorkerGlobalScope::stopIndexedDatabase):

2019-04-03  Youenn Fablet  <youenn@apple.com>

        Adopt new VCP SPI
        https://bugs.webkit.org/show_bug.cgi?id=193357
        <rdar://problem/43656651>

        Reviewed by Eric Carlson.

        Covered by existing tests.

        * testing/Internals.cpp:
        (WebCore::Internals::supportsVCPEncoder):

2019-04-03  Chris Dumez  <cdumez@apple.com>

        Remove legacy webkitRequestAnimationFrame time quirk
        https://bugs.webkit.org/show_bug.cgi?id=196458
        <rdar://problem/49490207>

        Reviewed by Simon Fraser.

        Remove legacy webkitRequestAnimationFrame time quirk and log a deprecation
        warning whenever webkitRequestAnimationFrame is called.

        * dom/ScriptedAnimationController.cpp:
        (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::requestAnimationFrame):
        (WebCore::DOMWindow::webkitRequestAnimationFrame):

2019-04-03  Sihui Liu  <sihui_liu@apple.com>

        Blob type cannot be stored correctly in IDB when IDBObjectStore has autoIncrement and keyPath options
        https://bugs.webkit.org/show_bug.cgi?id=196128

        Reviewed by Geoffrey Garen.

        If a key is auto-generated, it should become a property of the value object. Network process would perform the 
        key injection by deserializing IDBValue into script value, setting the property, serializing the result and 
        storing it in a database record. But network process does not have a JSDOMGlobalObject, so it would fail to 
        deserialize types including Blob and File.

        To solve this issue, we move the key injection to web process and let network process store the original value 
        it gets. In this case, when web process asks for some value, network process should return key, value and key 
        path so that web process can decide whether it should perform a key injection before returning the result. Note
        that the auto-generated key would always be stored as the key in a ObjectStore record.

        Test: storage/indexeddb/modern/objectstore-autoincrement-types.html

        * Modules/indexeddb/IDBCursor.cpp:
        (WebCore::IDBCursor::setGetResult):
        * Modules/indexeddb/IDBCursor.h:
        (WebCore::IDBCursor::primaryKeyPath):
        * Modules/indexeddb/IDBGetAllResult.cpp:
        (WebCore::IDBGetAllResult::isolatedCopy):
        (WebCore::IDBGetAllResult::addKey):
        (WebCore::IDBGetAllResult::addValue):
        (WebCore::IDBGetAllResult::keys const):
        (WebCore::IDBGetAllResult::values const):
        (WebCore::IDBGetAllResult::allBlobFilePaths const):
        (WebCore::isolatedCopyOfVariant): Deleted.

        * Modules/indexeddb/IDBGetAllResult.h: Introduce an IDBKeyPath parameter. Also replace Variant with two Vectors,
        because we only needed to store either key or value before, and now the stored value could be incomplete.
        (WebCore::IDBGetAllResult::IDBGetAllResult):
        (WebCore::IDBGetAllResult::keyPath const):
        (WebCore::IDBGetAllResult::encode const):
        (WebCore::IDBGetAllResult::decode):

        * Modules/indexeddb/IDBGetResult.cpp:
        (WebCore::IDBGetResult::setValue):
        * Modules/indexeddb/IDBGetResult.h:
        (WebCore::IDBGetResult::IDBGetResult):
        (WebCore::IDBGetResult::keyPath const):
        * Modules/indexeddb/IDBObjectStore.cpp:
        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::setResult):
        (WebCore::IDBRequest::setResultToStructuredClone):
        * Modules/indexeddb/IDBRequest.h:
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::didGetAllRecordsOnServer):
        (WebCore::IDBTransaction::didGetRecordOnServer):
        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
        (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
        * Modules/indexeddb/server/MemoryIndex.cpp:
        (WebCore::IDBServer::MemoryIndex::getResultForKeyRange const):
        (WebCore::IDBServer::MemoryIndex::getAllRecords const):
        * Modules/indexeddb/server/MemoryIndexCursor.cpp:
        (WebCore::IDBServer::MemoryIndexCursor::currentData):
        * Modules/indexeddb/server/MemoryObjectStore.cpp:
        (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
        (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
        (WebCore::IDBServer::MemoryObjectStore::getAllRecords const):
        * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
        (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
        (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
        (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
        * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
        (WebCore::IDBServer::SQLiteIDBCursor::currentData):
        * Modules/indexeddb/server/SQLiteIDBCursor.h:

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Remove the key injection from network process. 
        UniqueIDBDatabase stores any value it gets from IDBClient.

        * Modules/indexeddb/shared/IDBResultData.cpp:
        (WebCore::IDBResultData::getResultRef):
        * Modules/indexeddb/shared/IDBResultData.h:

        * bindings/js/IDBBindingUtilities.cpp:
        (WebCore::injectIDBKeyIntoScriptValue): If property is read-only, set would fail and injectKeyIntoResult would
        return null, but we expect it to return result as long as the property value is the same as target. Therefore, 
        we can add an early return here.
        (WebCore::createKeyPathArray):

        (WebCore::generateIndexKeyForValue): We used to generate IndexKey from value stored in database but now the
        value gets stored does not include auto-generated key, as we remove the key injection from network process. In 
        this case if the IDBIndex has the same key path as the auto-generated key, IndexKey would be failed to create
        for it cannot extract auto-generated key from value. Since the auto-generated key would always be the key in 
        database record, we could use value of that key when we find a match in key path.

        (WebCore::deserializeIDBValueWithKeyInjection): If the key path in the result is single entry, the key is 
        probably auto-generated, so we could inject the result key into the result value unconditionally.

        * bindings/js/IDBBindingUtilities.h:
        * bindings/js/JSIDBCursorWithValueCustom.cpp:
        (WebCore::JSIDBCursorWithValue::value const):
        * bindings/js/JSIDBRequestCustom.cpp:
        (WebCore::JSIDBRequest::result const):

2019-04-03  Michael Catanzaro  <mcatanzaro@igalia.com>

        Get rid of HTMLInputElement::setEditingValue
        https://bugs.webkit.org/show_bug.cgi?id=196402

        Reviewed by Darin Adler.

        HTMLInputElement::setEditingValue is only used for Epiphany password autofill. We did it
        this way because that's what Chrome uses for autofill, but Apple uses
        HTMLInputElement::setValueForUser. Let's switch to that instead, then we can get rid of
        setEditingValue.

        This fixes logging into ting.com after username and password are autofilled by Epiphany.
        Before this change, the login would fail unless you first manually edit either the username
        or the password field.

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::setEditingValue): Deleted.
        * html/HTMLInputElement.h:
        * testing/Internals.cpp:
        (WebCore::Internals::setEditingValue): Deleted.
        * testing/Internals.h:
        * testing/Internals.idl:

2019-04-03  Pablo Saavedra  <psaavedra@igalia.com>

        Missing includes that were previously provided via UnifiedSources
        https://bugs.webkit.org/show_bug.cgi?id=196434

        Unreviewed build fix.

        * html/InputType.h:

2019-04-03  Wenson Hsieh  <wenson_hsieh@apple.com>

        Introduce and add plumbing for a website policy for meta viewport tag handling
        https://bugs.webkit.org/show_bug.cgi?id=196285

        Reviewed by Tim Horton.

        Add MetaViewportPolicy to DocumentLoader. See WebKit ChangeLog for more detail.

        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::metaViewportPolicy const):
        (WebCore::DocumentLoader::setMetaViewportPolicy):

2019-04-03  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Remote Inspector indicate callback should always happen on the main thread
        https://bugs.webkit.org/show_bug.cgi?id=196513
        <rdar://problem/49498284>

        Reviewed by Devin Rousso.

        * platform/ios/wak/WebCoreThreadSystemInterface.cpp:
        (InitWebCoreThreadSystemInterface):

2019-04-02  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r238266): Exchange 2013 Outlook Web Access displays partially blank page when creating new e-mail
        https://bugs.webkit.org/show_bug.cgi?id=196522
        rdar://problem/49472941

        Reviewed by Zalan Bujtas.

        In this content a layer is composited to clip descendants, and has negative z-order children,
        so we compute that it "paints into ancestor", and has a foreground layer. This combination doesn't
        make sense, and when the layer becomes scrollable, we end up with bad paint phases on layers, and
        fail to paint the contents.

        Fix by ensuring that a layer has its own backing store if it requires a foreground layer
        by virtue of having negative z-order children.

        Test: compositing/backing/foreground-layer-no-paints-into-ancestor.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):

2019-04-02  Timothy Hatcher  <timothy@apple.com>

        Cursor count badge reverts to Zero during Drag & Drop of multiple items.
        https://bugs.webkit.org/show_bug.cgi?id=196511

        Reviewed by Daniel Bates.

        * page/DragController.cpp:
        (WebCore::DragController::tryDocumentDrag): Don't set m_numberOfItemsToBeAccepted to
        zero when dragging to a non-file input element.

2019-04-02  Chris Dumez  <cdumez@apple.com>

        HTML Parser: Remove conditional parsing of <noembed> content
        https://bugs.webkit.org/show_bug.cgi?id=196514

        Reviewed by Geoffrey Garen.

        Our HTML Parser has raw text handling for <noembed> content only if plugins are runnable.
        However, the HTML specification doesn't ask such behavior [1], and it doesn't match to
        our HTML serializer. We should always handle it as raw text.

        Blink already made this change in https://chromium-review.googlesource.com/c/1477556.

        [1] https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments:noembed

        No new tests, updated existing test.

        * html/parser/HTMLParserOptions.cpp:
        (WebCore::HTMLParserOptions::HTMLParserOptions):
        * html/parser/HTMLParserOptions.h:
        * html/parser/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::updateStateFor):
        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::processStartTagForInBody):

2019-04-02  Chris Dumez  <cdumez@apple.com>

        XMLHttpRequestUpload's loadstart event not correct initialized
        https://bugs.webkit.org/show_bug.cgi?id=196174
        <rdar://problem/49191412>

        Reviewed by Alex Christensen.

        Align progress event firing with the XHR specification.

        No new tests, rebaselined existing tests.

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::createRequest):
        As per [1], the loadstart event fired on the XMLHttpRequestUpload object should use
        loaded=0 and total=`req’s body’s total bytes`.
        [1] https://xhr.spec.whatwg.org/#the-send()-method (step 11.2.)

        (WebCore::XMLHttpRequest::didSendData):
        As per [2], the progress / load / loadend should use loaded=transmitted and total=length.
        [2] https://xhr.spec.whatwg.org/#ref-for-process-request-end-of-body (steps 5, 6 and 7)

        (WebCore::XMLHttpRequest::didReceiveData):
        As per [3], we should fire the readystatechange event *before* the progress event.
        This is covered by web-platform-tests/xhr/send-response-event-order.htm which was failing
        differently after the other changes in this patch.
        [3] https://xhr.spec.whatwg.org/#ref-for-process-response (steps 9.4 and 9.5)

        (WebCore::XMLHttpRequest::dispatchErrorEvents):
        As per [4], in case of an error, we should fire the provided 'event' and 'loadend' with
        loaded=0 and total=0.
        [4] https://xhr.spec.whatwg.org/#request-error-steps (steps 7 and 8)

        * xml/XMLHttpRequestUpload.cpp:
        (WebCore::XMLHttpRequestUpload::dispatchProgressEvent):
        * xml/XMLHttpRequestUpload.h:
        Simplify XMLHttpRequestUpload. It no longer needs to store loaded / total as data
        members now that they are always passed by the call site. lengthComputable is set
        to !!total as [5] says to set it to true if length/total is not 0. 
        [5] https://xhr.spec.whatwg.org/#concept-event-fire-progress

2019-04-02  Devin Rousso  <drousso@apple.com>

        Web Inspector: Canvas: add support for showing WebGPU contexts
        https://bugs.webkit.org/show_bug.cgi?id=196413
        <rdar://problem/49438898>

        Reviewed by Timothy Hatcher.

        Tests: inspector/canvas/create-context-webgpu.html
               inspector/canvas/resolveCanvasContext-webgpu.html

        * Modules/webgpu/GPUCanvasContext.idl:
        * Modules/webgpu/GPUCanvasContext.h:
        (WebCore::GPUCanvasContext::canvas const): Added.
        * Modules/webgpu/GPUCanvasContext.cpp:
        (WebCore::GPUCanvasContext::create):

        * testing/InternalSettings.idl:
        * testing/InternalSettings.h:
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::setWebGPUEnabled): Added.

2019-04-02  Chris Dumez  <cdumez@apple.com>

        [WK2] Add support for Window's beforeprint / afterprint events
        https://bugs.webkit.org/show_bug.cgi?id=196478

        Reviewed by Alex Christensen.

        Add support for Window's beforeprint / afterprint events as per:
        - https://html.spec.whatwg.org/#dom-print

        Blink and Gecko already support this.

        Test: printing/printing-events.html

        * dom/EventNames.h:
        * html/HTMLAttributeNames.in:
        * html/HTMLBodyElement.cpp:
        (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
        * page/Page.cpp:
        (WebCore::dispatchPrintEvent):
        (WebCore::Page::dispatchBeforePrintEvent):
        (WebCore::Page::dispatchAfterPrintEvent):
        * page/Page.h:
        * page/WindowEventHandlers.idl:

2019-04-02  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Hover menus do not function on fidelity.com
        https://bugs.webkit.org/show_bug.cgi?id=196507
        <rdar://problem/49496520>

        Reviewed by Simon Fraser.

        fidelity.com has 400ms hover intent timer to bring up the main menus.

        Test: fast/events/touch/ios/content-observation/400ms-hover-intent.html

        * page/ios/ContentChangeObserver.cpp:

2019-04-02  Timothy Hatcher  <timothy@apple.com>

        NSAttributedString crashes when encoding text attachment cell for missing image.
        https://bugs.webkit.org/show_bug.cgi?id=196504
        rdar://problem/49161281

        Reviewed by Tim Horton.

        Clean up and fix a couple of errors and crashes in the missing image path of our
        attributed string converter.

        Fixes include:
        * Removed manual call to release on a RetainPtr, leading to autorelease pool crash.
        * No longer try to load an image that is missing on disk and has long been renamed.
        * No longer use a NSTextAttachmentCell in the Mac code path which can't be encoded
          for sending to the UIProcess, so it was pretty useless in the web content process.
        * Stopped using NSFileWrapper for the missing image so the attachment can contain the
          retina versions of the missing image.
        * Simplified bundle finding code, since WebCore is assumed to be loaded.
        * Fix leak of attachment by adding missing adoptNS().

        * editing/cocoa/HTMLConverter.mm:
        (HTMLConverter::_addAttachmentForElement): Unify and simplify missing image path.
        (_NSFirstPathForDirectoriesInDomains): Deleted.
        (_NSSystemLibraryPath): Deleted.
        (_webKitBundle): Deleted.

2019-04-02  Chris Dumez  <cdumez@apple.com>

        [Fetch API] Allow used body replacement in Request constructor
        https://bugs.webkit.org/show_bug.cgi?id=183703
        <rdar://problem/49425609>

        Reviewed by Youenn Fablet.

        Allow used body replacement in Request constructor as per:
        - https://github.com/whatwg/fetch/pull/675

        No new tests, rebaseline existing test.

        * Modules/fetch/FetchRequest.cpp:
        (WebCore::FetchRequest::initializeWith):

2019-04-02  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r243551.

        Seems to have broken file uploads to SoundCloud

        Reverted changeset:

        "XMLHttpRequestUpload's loadstart event not correct
        initialized"
        https://bugs.webkit.org/show_bug.cgi?id=196174
        https://trac.webkit.org/changeset/243551

2019-04-02  Justin Fan  <justin_fan@apple.com>

        [Web GPU] Implement blend states and color write mask for GPUColorStateDescriptor
        https://bugs.webkit.org/show_bug.cgi?id=196474

        Reviewed by Myles C. Maxfield.

        Blend states and color write masks must now be specified on GPUColorStateDescriptor instead of 
        relying on underlying MTLRenderPipelineColorAttachmentDescriptor defaults.

        Test: webgpu/blend-triangle-strip.html, webgpu/color-write-mask-triangle-strip.html

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/webgpu/GPUBlendDescriptor.idl: 
        * Modules/webgpu/GPUColorStateDescriptor.idl:
        * Modules/webgpu/GPUColorWriteBits.idl: 
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * platform/graphics/gpu/GPUBlendDescriptor.h:
        * platform/graphics/gpu/GPUColorStateDescriptor.h:
        * platform/graphics/gpu/GPUColorWriteBits.h:
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::mtlColorWriteMaskForGPUColorWriteFlags):
        (WebCore::mtlBlendOperationForGPUBlendOperation):
        (WebCore::mtlBlendFactorForGPUBlendFactor):
        (WebCore::setColorStatesForColorAttachmentArray):
        (WebCore::tryCreateMtlRenderPipelineState):
        (WebCore::trySetColorStatesForColorAttachmentArray): Deleted.

2019-04-02  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Ignore reconstructed renderers when checking for visibility change
        https://bugs.webkit.org/show_bug.cgi?id=196483
        <rdar://problem/49288174>

        Reviewed by Simon Fraser.

        This patch fixes the cases when the content gets reconstructed in a way that existing and visible elements gain
        new renderers within one style recalc. We failed to recognize such cases and ended up detecting the newly constructed renderers
        as "visible change" thereby triggering hover.

        Test: fast/events/touch/ios/content-observation/visible-content-gains-new-renderer.html

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::renderTreeUpdateDidStart):
        (WebCore::ContentChangeObserver::renderTreeUpdateDidFinish):
        (WebCore::ContentChangeObserver::reset):
        (WebCore::ContentChangeObserver::willDestroyRenderer):
        (WebCore::ContentChangeObserver::StyleChangeScope::StyleChangeScope):
        (WebCore::ContentChangeObserver::RenderTreeUpdateScope::RenderTreeUpdateScope):
        (WebCore::ContentChangeObserver::RenderTreeUpdateScope::~RenderTreeUpdateScope):
        * page/ios/ContentChangeObserver.h:
        (WebCore::ContentChangeObserver::visibleRendererWasDestroyed const):
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::updateRenderTree):
        (WebCore::RenderTreeUpdater::tearDownRenderers):

2019-04-02  Fujii Hironori  <Hironori.Fujii@sony.com>

        [CMake] WEBKIT_MAKE_FORWARDING_HEADERS shouldn't use POST_BUILD to copy generated headers
        https://bugs.webkit.org/show_bug.cgi?id=182757

        Reviewed by Don Olmstead.

        No new tests because no behavior changes.

        * PlatformWin.cmake: Do not use DERIVED_SOURCE_DIRECTORIES of
        WEBKIT_MAKE_FORWARDING_HEADERS. Added
        WebCore_PRIVATE_FRAMEWORK_HEADERS.
        * WebCoreMacros.cmake (GENERATE_DOM_NAMES): Added
        ${_namespace}ElementTypeHelpers.h to _outputfiles.

2019-04-02  Cathie Chen  <cathiechen@igalia.com>

        Update the status of ResizeObserver in features.json.
        https://bugs.webkit.org/show_bug.cgi?id=196443

        Reviewed by Rob Buis.

        * features.json:

2019-04-01  Ryosuke Niwa  <rniwa@webkit.org>

        Nullptr crash in Document::open after calling policyChecker().stopCheck()
        https://bugs.webkit.org/show_bug.cgi?id=196479

        Reviewed by Antti Koivisto.

        Added a missing nullptr check in Document::open after calling m_frame->loader().policyChecker().stopCheck()
        since it invokes m_willSubmitFormCompletionHandlers in WebKit2, and that could clear m_frame.

        Unfortunately, we don't have any reproducible test case.

        * dom/Document.cpp:
        (WebCore::Document::open):

2019-04-01  Timothy Hatcher  <timothy@apple.com>

        Unreviewed build fix.

        * crypto/mac/SerializedCryptoKeyWrapMac.mm:
        (WebCore::createAndStoreMasterKey): Add ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END
        around SecTrustedApplicationCreateFromPath call.

2019-04-01  Simon Fraser  <simon.fraser@apple.com>

        Remove some unused iOS scrolling-related code in Frame
        https://bugs.webkit.org/show_bug.cgi?id=196473

        Reviewed by Zalan Bujtas.

        This code has no callers.

        * page/Frame.cpp:
        (WebCore::Frame::Frame):
        (WebCore::Frame::scrollOverflowLayer): Deleted.
        (WebCore::Frame::overflowAutoScrollTimerFired): Deleted.
        (WebCore::Frame::startOverflowAutoScroll): Deleted.
        (WebCore::Frame::checkOverflowScroll): Deleted.
        * page/Frame.h:

2019-04-01  Chris Dumez  <cdumez@apple.com>

        Attr nodes are not cloned properly
        https://bugs.webkit.org/show_bug.cgi?id=196466

        Reviewed by Ryosuke Niwa.

        Attr nodes are not cloned properly according to:
        - https://dom.spec.whatwg.org/#concept-node-clone

        A cloned Attr node should retain its prefix and namespace.

        Both Gecko and Blink agree with the DOM specification here.

        No new tests, rebaselined existing test.

        * dom/Document.cpp:
        (WebCore::Document::importNode):

2019-04-01  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Remove the SVG tear off objects for SVGMatrix, SVGTransfrom, SVGTransformList and SVGAnimatedTransformList
        https://bugs.webkit.org/show_bug.cgi?id=196086

        Reviewed by Simon Fraser.

        The IDL changes:

        SVGTransform.idl:
            Remove the NewObject qualifier from matrix attribute. This matches 
            the specs: https://www.w3.org/TR/SVG11/coords.html#InterfaceSVGTransform.
            SVGTransform will internally hold an SVGMatrix. A change in this
            SVGMatrix will affect the container SVGTransform.

        SVGTransformList.idl:
            Remove the NewObject qualifier from consolidate() method. This matches
            the specs:
            https://www.w3.org/TR/SVG11/coords.html#__svg__SVGTransformList__consolidate
            The method consolidate() should return a reference to the first item
            in the list after consolidating it.

        Code changes:

        -- SVGMatrix is now a superclass of SVGValueProperty<AffineTransform>.
           No need for SVGMatrixValue since it was wrapper of AffineTransform.

        -- SVGTransformValue now holds a Ref<SVGMatrix> member in addition to the
           angle and the rotationCenter. Ref<SVGMatrix> is what SVGTransform.matrix
           will return. So a change in this matrix will change the owner SVGTransform.

        -- SVGTransform is now the owner of SVGMatrix via its SVGTransformValue.

        -- SVGTransformList is now a superclass of SVGValuePropertyList<SVGTransform>.
           It is responsible for parsing a String to items of SVGTransform.

        -- SVGAnimatedTransformList is now defined as SVGAnimatedPropertyList<
           SVGTransformList>.

        Note the ownership chain of these objects is the following:

        -- SVGAnimatedTransformList owns the SVGTransformList via its baseVal 
           and animVal members.

        -- SVGTransformList owns SVGTransform via its list of items

        -- SVGTransform owns SVGMatrix via its SVGTransformValue.

           So a change in SVGMatrix will propagate to the owner SVGElement through
           the following ownership chain:

           SVGMatrix
             |_ SVGTransfrom
                  |_ SVGTransformList
                       |_ SVGAmimatedTransformList
                            |_ SVGElement

        To get the mechanics of this change right, a new accessor, a new animator
        and animation functions are added for the SVGAnimatedTransformList.

        -- SVGViewSpec used to hold an SVGAnimatedTransformListAttribute for the
        member m_transform although this member should not be animated. See the
        comment in the old SVGViewSpec::transform(). This has been changed in this
        patch. SVGViewSpec now holds Ref<SVGTransformList> which matches the specs:
        https://www.w3.org/TR/SVG11/types.html#InterfaceSVGViewSpec.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * svg/SVGAnimateElementBase.cpp:
        (WebCore::SVGAnimateElementBase::attributeAnimationController):
        (WebCore::SVGAnimateElementBase::hasValidAttributeType const):
        (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
        (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
        (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
        * svg/SVGAnimateElementBase.h:
        (WebCore::SVGAnimateElementBase::animateRangeString const):
        * svg/SVGAnimateTransformElement.cpp:
        (WebCore::SVGAnimateTransformElement::animateRangeString const):
        * svg/SVGAnimateTransformElement.h:
                This change is needed because animating the transform attribute can be
        written as
            <animate ... from="translate(100)" to="translate(200)"/>
        or
            <animateTransform type="translate" from="100" to="200"/>"
        So we need to surround the animation range string with the type qualifier
        for animateTransform.

        * svg/SVGAnimatedTransformList.cpp: Removed.
        * svg/SVGAnimatedTransformList.h: Removed.
        * svg/SVGAnimatedType.h: Removed.
        * svg/SVGAnimatedTypeAnimator.cpp: Removed.
        * svg/SVGAnimatedTypeAnimator.h: Removed.
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::adjustForInheritance): Deleted.
        * svg/SVGAnimationElement.h:
        (WebCore::SVGAnimationElement::adjustForInheritance): Deleted.
        (WebCore::SVGAnimationElement::adjustFromToListValues): Deleted.
        (WebCore::SVGAnimationElement::animateDiscreteType): Deleted.
        These functions were used by SVGLegacyAttributeAnimationController.

        * svg/SVGAnimatorFactory.h: Removed.
        * svg/SVGExternalResourcesRequired.h:
        (WebCore::SVGExternalResourcesRequired::isKnownAttribute):
        * svg/SVGFEImageElement.h:
        * svg/SVGFEMorphologyElement.h:
        * svg/SVGFETileElement.h:
        * svg/SVGFitToViewBox.h:
        (WebCore::SVGFitToViewBox::isKnownAttribute):
        * svg/SVGGradientElement.cpp:
        (WebCore::SVGGradientElement::SVGGradientElement):
        (WebCore::SVGGradientElement::parseAttribute):
        (WebCore::SVGGradientElement::registerAttributes): Deleted.
        * svg/SVGGradientElement.h:
        (WebCore::SVGGradientElement::gradientTransform const):
        (WebCore::SVGGradientElement::gradientTransformAnimated):
        (WebCore::SVGGradientElement::isKnownAttribute):
        * svg/SVGGraphicsElement.cpp:
        (WebCore::SVGGraphicsElement::SVGGraphicsElement):
        (WebCore::SVGGraphicsElement::animatedLocalTransform const):
        (WebCore::SVGGraphicsElement::parseAttribute):
        (WebCore::SVGGraphicsElement::svgAttributeChanged):
        There is one attribute for this element which is "SVGNames::transformAttr"
        So there is no need to check for it twice.

        (WebCore::SVGGraphicsElement::registerAttributes): Deleted.
        * svg/SVGGraphicsElement.h:
        (WebCore::SVGGraphicsElement::transform const):
        (WebCore::SVGGraphicsElement::transformAnimated):
        (WebCore::SVGGraphicsElement::isKnownAttribute): Deleted.
        * svg/SVGLangSpace.cpp:
        (WebCore::SVGLangSpace::SVGLangSpace):
        (WebCore::SVGLangSpace::xmlspace const):
        (WebCore::SVGLangSpace::isKnownAttribute):
        (WebCore::SVGLangSpace::svgAttributeChanged):
        (WebCore::SVGLangSpace::registerAttributes): Deleted.
        * svg/SVGLangSpace.h:
        (WebCore::SVGLangSpace::xmllang const):
        (WebCore::SVGLangSpace::setXmllang):
        (WebCore::SVGLangSpace::setXmlspace):
        (WebCore::SVGLangSpace::attributeRegistry): Deleted.
        (WebCore::SVGLangSpace::isKnownAttribute): Deleted.
        * svg/SVGLegacyAttributeAnimationController.cpp: Removed.
        * svg/SVGLegacyAttributeAnimationController.h: Removed.
        * svg/SVGLinearGradientElement.cpp:
        (WebCore::setGradientAttributes):
        * svg/SVGMaskElement.h:
        * svg/SVGMatrix.h:
        (WebCore::SVGMatrix::create):
        (WebCore::SVGMatrix::a const):
        (WebCore::SVGMatrix::setA):
        (WebCore::SVGMatrix::b const):
        (WebCore::SVGMatrix::setB):
        (WebCore::SVGMatrix::c const):
        (WebCore::SVGMatrix::setC):
        (WebCore::SVGMatrix::d const):
        (WebCore::SVGMatrix::setD):
        (WebCore::SVGMatrix::e const):
        (WebCore::SVGMatrix::setE):
        (WebCore::SVGMatrix::f const):
        (WebCore::SVGMatrix::setF):
        (WebCore::SVGMatrix::multiply const):
        (WebCore::SVGMatrix::inverse const):
        (WebCore::SVGMatrix::translate const):
        (WebCore::SVGMatrix::scale const):
        (WebCore::SVGMatrix::scaleNonUniform const):
        (WebCore::SVGMatrix::rotate const):
        (WebCore::SVGMatrix::rotateFromVector const):
        (WebCore::SVGMatrix::flipX const):
        (WebCore::SVGMatrix::flipY const):
        (WebCore::SVGMatrix::skewX const):
        (WebCore::SVGMatrix::skewY const):
        * svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::SVGPatternElement):
        (WebCore::SVGPatternElement::parseAttribute):
        (WebCore::SVGPatternElement::svgAttributeChanged):
        (WebCore::SVGPatternElement::collectPatternAttributes const):
        (WebCore::SVGPatternElement::localCoordinateSpaceTransform const):
        (WebCore::SVGPatternElement::registerAttributes): Deleted.
        * svg/SVGPatternElement.h:
        * svg/SVGPoint.h:
        (WebCore::SVGPoint::matrixTransform const):
        * svg/SVGPolyElement.h:
        (WebCore::SVGPolyElement::isKnownAttribute): Deleted.
        * svg/SVGRadialGradientElement.cpp:
        (WebCore::setGradientAttributes):
        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::createSVGTransform):
        (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
        (WebCore::SVGSVGElement::viewBoxToViewTransform const):
        * svg/SVGTextElement.cpp:
        (WebCore::SVGTextElement::animatedLocalTransform const):
        * svg/SVGTransform.cpp: Removed.
        * svg/SVGTransform.h:
        (WebCore::SVGTransform::create):
        (WebCore::SVGTransform::~SVGTransform):
        (WebCore::SVGTransform::clone const):
        (WebCore::SVGTransform::type):
        (WebCore::SVGTransform::angle):
        (WebCore::SVGTransform::matrix):
        (WebCore::SVGTransform::setMatrix):
        (WebCore::SVGTransform::setTranslate):
        (WebCore::SVGTransform::setScale):
        (WebCore::SVGTransform::setRotate):
        (WebCore::SVGTransform::setSkewX):
        (WebCore::SVGTransform::setSkewY):
        (WebCore::SVGTransform::SVGTransform):
        * svg/SVGTransform.idl:
        * svg/SVGTransformList.h:
        * svg/SVGTransformList.idl:
        * svg/SVGTransformListValues.cpp: Removed.
        * svg/SVGTransformListValues.h: Removed.
        * svg/SVGTransformValue.cpp: Removed.
        * svg/SVGTransformValue.h:
        (WebCore::SVGTransformValue::SVGTransformValue):
        (WebCore::SVGTransformValue::operator=):
        (WebCore::SVGTransformValue::matrix const):
        (WebCore::SVGTransformValue::rotationCenter const):
        (WebCore::SVGTransformValue::isValid const):
        (WebCore::SVGTransformValue::setMatrix):
        (WebCore::SVGTransformValue::matrixDidChange):
        (WebCore::SVGTransformValue::translate const):
        (WebCore::SVGTransformValue::setTranslate):
        (WebCore::SVGTransformValue::scale const):
        (WebCore::SVGTransformValue::setScale):
        (WebCore::SVGTransformValue::setRotate):
        (WebCore::SVGTransformValue::setSkewX):
        (WebCore::SVGTransformValue::setSkewY):
        (WebCore::SVGTransformValue::valueAsString const):
        (WebCore::SVGTransformValue::prefixForTransfromType):
        (WebCore::SVGTransformValue::appendNumbers const):
        (WebCore::SVGTransformValue::appendMatrix const):
        (WebCore::SVGTransformValue::appendTranslate const):
        (WebCore::SVGTransformValue::appendScale const):
        (WebCore::SVGTransformValue::appendRotate const):
        (WebCore::SVGTransformValue::appendSkewX const):
        (WebCore::SVGTransformValue::appendSkewY const):
        (WebCore::SVGTransformValue::matrix): Deleted.
        * svg/SVGTransformable.cpp:
        (WebCore::SVGTransformable::parseAndSkipType):
        (WebCore::parseAndSkipType): Deleted.
        (WebCore::SVGTransformable::parseTransformAttribute): Deleted.
        The code of this function was moved to SVGTransformList::parse().

        * svg/SVGTransformable.h:
        There is no need for enum TransformParsingMode. It was used by 
        SVGViewSpec::parseViewSpec() to tell SVGTransformable::parseTransformAttribute()
        not to clear the list. SVGTransfromList now has two parse() functions:
        one public and the second is private. The public one clear the list
        before parsing the input String. The private one just does the parsing.
        SVGViewSpec::parseViewSpec() calls the private once since it is a friend
        of SVGTransfromList.

        * svg/SVGValue.h: Removed.
        * svg/SVGViewSpec.cpp:
        (WebCore::SVGViewSpec::SVGViewSpec):
        (WebCore::SVGViewSpec::reset):
        (WebCore::SVGViewSpec::parseViewSpec):
        (WebCore::SVGViewSpec::registerAttributes): Deleted.
        (WebCore::SVGViewSpec::transform): Deleted.
        * svg/SVGViewSpec.h:
        * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
        * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
        * svg/properties/SVGAnimatedPropertyImpl.h:
        * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Removed.
        * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
        (WebCore::SVGAnimationTransformListFunction::progress):
        * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
        * svg/properties/SVGAttributeRegistry.h:
        * svg/properties/SVGMatrixTearOff.h: Removed.
        * svg/properties/SVGPropertyAccessorImpl.h:
        * svg/properties/SVGPropertyOwnerRegistry.h:
        (WebCore::SVGPropertyOwnerRegistry::registerProperty):

2019-04-01  Devin Rousso  <drousso@apple.com>

        Web Inspector: DOMDebugger: breakpoints for attribute modifications still fire when breakpoints are disabled
        https://bugs.webkit.org/show_bug.cgi?id=196456
        <rdar://problem/49489747>

        Reviewed by Joseph Pecoraro.

        Test: inspector/dom-debugger/dom-breakpoints.html

        * inspector/agents/InspectorDOMDebuggerAgent.cpp:
        (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
        (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):

2019-04-01  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unable to copy and paste a PDF from Notes into Mail compose body
        https://bugs.webkit.org/show_bug.cgi?id=196442
        <rdar://problem/48573098>

        Reviewed by Tim Horton.

        Refactor some logic for inserting attachment elements upon paste or drop. Currently, we only prefer inserting
        content as attachment elements if the items are annotated with UIPreferredPresentationStyleAttachment. However,
        many data sources around the system (both first and third party) have not adopted this API, which makes it
        difficult to determine whether a given item provider should be treated as a file or not. In this bug in
        particular, no preferred presentation style is set, so we fail to handle the paste command by inserting an
        attachment element.

        However, most apps around the system that write file or attachment-like data to the pasteboard will at least
        offer a suggested name for the file, in the form of -[NSItemProvider suggestedName]. To address this, instead of
        relying solely on the preferredPresentationStyle, additionally take a suggested name as an indicator that the
        item is probably a file.

        In fact, Pasteboard::fileContentState already has similar logic to check for either a suggested file name or
        explicitly specified presentation style. We pull this out into a separate helper method on PasteboardItemInfo,
        and use it for both Pasteboard::fileContentState and prefersAttachmentRepresentation.

        Tests:  WKAttachmentTestsIOS.InsertPastedContactAsAttachment
                WKAttachmentTestsIOS.InsertPastedMapItemAsAttachment

        * editing/cocoa/WebContentReaderCocoa.mm:
        (WebCore::mimeTypeFromContentType):

        Work around <rdar://problem/49478229> by using the "text/vcard" MIME type to handle "public.vcard". CoreServices
        currently maps "public.vcard" to "text/directory" when using UTTypeCopyPreferredTagWithClass, despite the SPI
        -[NSURLFileTypeMappings MIMETypeForExtension:] returning "text/vcard" for a ".vcf" file.

        * platform/PasteboardItemInfo.h:
        (WebCore::PasteboardItemInfo::canBeTreatedAsAttachmentOrFile const):

        Add a helper method to determine whether the PasteboardItemInfo prefers to be represented as inline data, or an
        attachment, or neither. This differs slightly from the existing value of preferredPresentationStyle in that we
        consider having a suggested file name as a strong indicator that the item should be treated as an attachment,
        even if the presentation style is unspecified.

        * platform/cocoa/PasteboardCocoa.mm:
        (WebCore::Pasteboard::fileContentState):

        Use PasteboardItemInfo::canBeTreatedAsAttachmentOrFile().

        * platform/ios/PasteboardIOS.mm:
        (WebCore::prefersAttachmentRepresentation):

        Use PasteboardItemInfo::canBeTreatedAsAttachmentOrFile().

2019-04-01  Tim Horton  <timothy_horton@apple.com>

        Make UIWKDocumentContext rects per-character instead of per-word
        https://bugs.webkit.org/show_bug.cgi?id=196459

        Reviewed by Wenson Hsieh.

        No new tests; adjusted expected results of WebKit.DocumentEditingContext.

        * editing/TextIterator.cpp:
        (WebCore::CharacterIterator::CharacterIterator):
        * editing/TextIterator.h:
        (WebCore::CharacterIterator::atEnd const):
        (WebCore::CharacterIterator::text const):
        Add WEBCORE_EXPORT to some things.
        Introduce a CharacterIterator constructor that takes Positions, like one that TextIterator has.
        Move initializers to the header.

2019-04-01  Antti Koivisto  <antti@apple.com>

        Update event region when toggling pointer-events:none
        https://bugs.webkit.org/show_bug.cgi?id=195902
        <rdar://problem/48988384>

        Reviewed by Simon Fraser.

        Test: fast/scrolling/ios/event-region-pointer-events.html

        Normally paint invalidation requests compositing configuration update whenever anything that would
        affect event region changes. However mutating 'pointer-events' property does not cause paint invalidation.

        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::styleWillChange):

        Request compositing update explicitly from the containing layer.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::invalidateEventRegion):
        * rendering/RenderLayer.h:

2019-04-01  Chris Dumez  <cdumez@apple.com>

        Support "noreferrer" for window.open()
        https://bugs.webkit.org/show_bug.cgi?id=194533

        Reviewed by Geoffrey Garen.

        Support "noreferrer" for window.open() as per:
        - https://github.com/whatwg/html/pull/4331

        Tests: imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer.html
               http/wpt/html/browsers/the-window-object/window-open-noopener-webkit.html

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::createWindow):
        * page/WindowFeatures.cpp:
        (WebCore::setWindowFeature):
        * page/WindowFeatures.h:

2019-04-01  Said Abou-Hallawa  <sabouhallawa@apple.com>

        SVGMatrix.IDL methods do not conform to the specs
        https://bugs.webkit.org/show_bug.cgi?id=196263

        Reviewed by Simon Fraser.

        I think there was a misconception about these functions. The specs link
        is: https://www.w3.org/TR/SVG11/coords.html#InterfaceSVGMatrix.

        Notice that the specs does not state that the SVGMethod methods should
        raise the exception NO_MODIFICATION_ALLOWED_ERR if the object is read
        only. Notice setting the attribute 'a' for example may raise this
        exception. Therefore, I think the specs wanted to make these operations
        read-only. None of the methods should raise the exception
        NO_MODIFICATION_ALLOWED_ERR.

        In fact the SVG code was doing the right thing. For example SVGMatrix::scale()
        was calling SVGMatrixValue::scale() which was making a copy of itself,
        applying the scale on the copy and then returning the copy. When 
        SVGMatrix::scale() receives the copy of the SVGMatrixValue it creates and
        returns a new SVGMatrix object.

        * WebCore.xcodeproj/project.pbxproj:
        * svg/SVGMatrix.h:
        (WebCore::SVGMatrix::create):
        (WebCore::SVGMatrix::a const):
        (WebCore::SVGMatrix::b const):
        (WebCore::SVGMatrix::c const):
        (WebCore::SVGMatrix::d const):
        (WebCore::SVGMatrix::e const):
        (WebCore::SVGMatrix::f const):
        (WebCore::SVGMatrix::multiply const):
        (WebCore::SVGMatrix::inverse const):
        (WebCore::SVGMatrix::translate const):
        (WebCore::SVGMatrix::scale const):
        (WebCore::SVGMatrix::scaleNonUniform const):
        (WebCore::SVGMatrix::rotate const):
        (WebCore::SVGMatrix::rotateFromVector const):
        (WebCore::SVGMatrix::flipX const):
        (WebCore::SVGMatrix::flipY const):
        (WebCore::SVGMatrix::skewX const):
        (WebCore::SVGMatrix::skewY const):
        (WebCore::SVGMatrix::a): Deleted.
        (WebCore::SVGMatrix::b): Deleted.
        (WebCore::SVGMatrix::c): Deleted.
        (WebCore::SVGMatrix::d): Deleted.
        (WebCore::SVGMatrix::e): Deleted.
        (WebCore::SVGMatrix::f): Deleted.
        (WebCore::SVGMatrix::multiply): Deleted.
        (WebCore::SVGMatrix::inverse): Deleted.
        (WebCore::SVGMatrix::translate): Deleted.
        (WebCore::SVGMatrix::scale): Deleted.
        (WebCore::SVGMatrix::scaleNonUniform): Deleted.
        (WebCore::SVGMatrix::rotate): Deleted.
        (WebCore::SVGMatrix::rotateFromVector): Deleted.
        (WebCore::SVGMatrix::flipX): Deleted.
        (WebCore::SVGMatrix::flipY): Deleted.
        (WebCore::SVGMatrix::skewX): Deleted.
        (WebCore::SVGMatrix::skewY): Deleted.
        (WebCore::SVGMatrix::SVGMatrix): Deleted.
        * svg/SVGMatrix.idl:
        * svg/SVGMatrixValue.h: Removed.
        * svg/SVGTransform.cpp:
        (WebCore::SVGTransform::matrix):
        * svg/SVGTransformDistance.cpp:
        (WebCore::SVGTransformDistance::addToSVGTransform const):
        * svg/SVGTransformValue.h:
        (WebCore::SVGTransformValue::matrix const):
        (WebCore::SVGTransformValue::matrix):
        (WebCore::SVGTransformValue::svgMatrix): Deleted.
        (WebCore::operator==): Deleted.
        (WebCore::operator!=): Deleted.
        * svg/properties/SVGMatrixTearOff.h:
        * svg/properties/SVGPropertyTearOff.h:
        (WebCore::SVGPropertyTearOff::propertyReference const):

2019-04-01  Simon Fraser  <simon.fraser@apple.com>

        Plumb through a ScrollType value that indicates whether a scroll was a user or programmatic scroll
        https://bugs.webkit.org/show_bug.cgi?id=196424

        Reviewed by Zalan Bujtas.

        In preparation for fixing webkit.org/b/195584, we need to know if an overflow scroll
        is programmatic, so plumb through an enum value. The functions touched by this patch are
        only ever called for programmatic scrolls.

        * dom/Element.cpp:
        (WebCore::Element::scrollTo):
        (WebCore::Element::setScrollLeft):
        (WebCore::Element::setScrollTop):
        * platform/ScrollTypes.h:
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::setScrollLeft):
        (WebCore::RenderBox::setScrollTop):
        * rendering/RenderBox.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollToXPosition):
        (WebCore::RenderLayer::scrollToYPosition):
        * rendering/RenderLayer.h:
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::setScrollLeft):
        (WebCore::RenderListBox::setScrollTop):
        * rendering/RenderListBox.h:
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::setScrollLeft):
        (WebCore::RenderTextControlSingleLine::setScrollTop):
        * rendering/RenderTextControlSingleLine.h:

2019-04-01  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Refactor some logic for inserting pasted or dropped virtual card files as attachment elements
        https://bugs.webkit.org/show_bug.cgi?id=196435
        Work towards <rdar://problem/48573098>

        Reviewed by Darin Adler.

        Refactor some existing codepaths on iOS for inserting VCard files as attachment elements. Instead of using a
        separate readVirtualContactFile method for converting a vcard file or data into an attachment element (possibly
        accompanied by a link), use the existing readFilePaths WebContentReader method.

        To handle links which may accompany the attachment element, add a helper method in PasteboardIOS that reads a
        titled URL prior to inserting an attachment element, in the case of pasting or dropping a VCF.

        This means we no longer need to handle attachment reading in readPasteboardWebContentDataForType, so we can
        simply bail before reading "public.vcard" here and defer to reading other data types.

        Covered by existing API tests in WKAttachmentTests and DragAndDropTestsIOS.

        * editing/WebContentReader.h:
        * editing/cocoa/WebContentReaderCocoa.mm:
        (WebCore::WebContentReader::readVirtualContactFile): Deleted.
        * platform/Pasteboard.h:
        * platform/ios/PasteboardIOS.mm:
        (WebCore::Pasteboard::readPasteboardWebContentDataForType):
        (WebCore::readURLAlongsideAttachmentIfNecessary):
        (WebCore::prefersAttachmentRepresentation):
        (WebCore::Pasteboard::read):
        (WebCore::Pasteboard::readRespectingUTIFidelities):

2019-04-01  Antti Koivisto  <antti@apple.com>

        Trying to scroll the compose pane on gmail.com scrolls the message list behind
        https://bugs.webkit.org/show_bug.cgi?id=196426
        <rdar://problem/49402667>

        Reviewed by Darin Adler.

        Test: fast/scrolling/ios/event-region-visibility-hidden.html

        We fail to gather event region from desdendants of non-overflowing elements with 'visibility:hidden'.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject):

        Skip the subtree walk only if the current region covers the box already.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintList):

        Remove the (wrong) optimization, we bail out quickly on first renderer if possible so this is not high value.

2019-04-01  Emilio Cobos Álvarez  <emilio@crisal.io>

        Be less strict about closing blocks in attribute and functional pseudo-element selectors.
        https://bugs.webkit.org/show_bug.cgi?id=142167

        Reviewed by Antti Koivisto.

        This was also an issue for, e.g., "::slotted(foo", turns out.

        This matches Chromium, Firefox, and the spec:

        https://drafts.csswg.org/css-syntax/#parse-error:

        > Certain points in the parsing algorithm are said to be parse errors. The error
        > handling for parse errors is well-defined: user agents must either act as
        > described below when encountering such problems, or must abort processing at
        > the first error that they encounter for which they do not wish to apply the
        > rules described below.

        https://drafts.csswg.org/css-syntax/#consume-simple-block:

        > <EOF-token>
        >   This is a parse error. Return the block.

        Tests: web-platform-tests/dom/nodes/selectors.js (and probably others)

        * css/parser/CSSSelectorParser.cpp:
        (WebCore::CSSSelectorParser::consumeAttribute):
        (WebCore::CSSSelectorParser::consumePseudo):

2019-04-01  Pablo Saavedra  <psaavedra@igalia.com>

        Build failure after r243644 in GTK Linux 64-bit stable builds
        https://bugs.webkit.org/show_bug.cgi?id=196440

        Reviewed by Philippe Normand.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags):

2019-03-31  Manuel Rego Casasnovas  <rego@igalia.com>

        Scroll position gets reset when overflow:scroll is inside grid
        https://bugs.webkit.org/show_bug.cgi?id=196337
        <rdar://problem/49385784>

        Reviewed by Simon Fraser.

        Fix scroll position when there are changes inside a grid item with "overflow: scroll".

        Test: fast/css-grid-layout/grid-item-content-scroll-position.html

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::layoutBlock): Use beginUpdateScrollInfoAfterLayoutTransaction()
        and endAndCommitUpdateScrollInfoAfterLayoutTransaction().

2019-03-31  Ryosuke Niwa  <rniwa@webkit.org>

        Reduce the size of Node::deref by eliminating an explicit parentNode check
        https://bugs.webkit.org/show_bug.cgi?id=195776

        Reviewed by Darin Adler.

        Address post-commit review comments.

        * dom/Document.cpp:
        (WebCore::Document::removedLastRef):
        * dom/Node.cpp:
        (WebCore::Node::~Node):
        (WebCore::Node::removedLastRef):
        * dom/Node.h:
        (WebCore::Node::deref):
        (WebCore::Node::setParentNode):

2019-03-31  Sam Weinig  <weinig@apple.com>

        Remove more i386 specific configurations
        https://bugs.webkit.org/show_bug.cgi?id=196430

        Reviewed by Alexey Proskuryakov.

        * Configurations/FeatureDefines.xcconfig:
        ENABLE_WEB_AUTHN_macosx can now be enabled unconditionally on macOS.

2019-03-31  Andy Estes  <aestes@apple.com>

        [iOS] WebKit should consult the navigation response policy delegate before previewing a QuickLook document
        https://bugs.webkit.org/show_bug.cgi?id=196433
        <rdar://problem/49293305>

        Reviewed by Tim Horton.

        When ResourceLoader would encounter a response with a MIME type that QuickLook supports, the
        response would be implicitly allowed and a QuickLook preview would be generated. After
        generating, the client's navigation response policy delegate would be notified of the
        preview response, but not the underlying response. Notably, the preview response has a URL
        scheme of "x-apple-ql-id", does not include any underlying HTTP headers, and usually has a
        MIME type of "text/html" or "application/pdf" rather than the underlying response MIME type.

        To allow clients to make better navigation response policy decisions, this patch changes the
        above behavior for WKWebView clients that have linked against a version of WebKit that
        includes this change. Rather than notifying the client's navigation response policy delegate
        of the preview response, we notify the client of the underlying response. Only if the client
        responds with a policy of "allow" will the QuickLook preview response be loaded (without
        another call to the navigation response policy delegate).

        Non-WKWebView clients and clients that have linked against a version of WebKit that does not
        include this change will retain the original behavior.

        Covered by existing layout tests and new and existing API tests.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::shouldCreatePreviewLoaderForResponse const):
        (WebCore::SubresourceLoader::didReceiveResponse):
        * loader/ios/PreviewLoader.h:
        * loader/ios/PreviewLoader.mm:
        (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]):
        (-[WebPreviewLoader _loadPreviewIfNeeded]):
        (-[WebPreviewLoader connection:didReceiveData:lengthReceived:]):
        (-[WebPreviewLoader connectionDidFinishLoading:]):
        (-[WebPreviewLoader connection:didFailWithError:]):
        (WebCore::PreviewLoader::create):
        (WebCore::PreviewLoader::didReceiveResponse):
        (-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]): Deleted.
        (WebCore::PreviewLoader::shouldCreateForMIMEType): Deleted.
        * page/Settings.yaml:
        * platform/MIMETypeRegistry.cpp:
        (WebCore::MIMETypeRegistry::canShowMIMEType):
        * platform/network/ios/PreviewConverter.h:
        * platform/network/ios/PreviewConverter.mm:
        (WebCore::PreviewConverter::supportsMIMEType):

2019-03-29  Dean Jackson  <dino@apple.com>

        gl.readPixels with type gl.FLOAT does not work
        https://bugs.webkit.org/show_bug.cgi?id=171432
        <rdar://problem/31905150>

        Reviewed by Antoine Quint.

        Our validation code was identifying readPixels of
        type FLOAT as invalid, for three reasons:
        - we didn't support the FLOAT type at all.
        - we only allowed the combination of RGBA and
        UNSIGNED_BYTE in WebGL 1 [*].
        - if we had a framebuffer of format RGBA, we assumed
        we could only read into a Uint8 ArrayBuffer.

        [*] This bug isn't completely fixed, so I opened
        https://bugs.webkit.org/show_bug.cgi?id=196418

        Test: fast/canvas/webgl/readPixels-float.html

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::readPixels):
        - flip the logic in a conditional that was clearly wrong yet
          thankfully had no impact.
        - support type FLOAT when the relevant extension is enabled.
        - allow FLOAT as a valid type (see new bug above)
        - create a new macro for CHECK_COMPONENT_COUNT
        - update the existing macros to not be case statements,
          so that we can put logic in the switch.

2019-03-30  Antti Koivisto  <antti@apple.com>

        Try to fix Windows build.

        * platform/graphics/RoundedRect.cpp:
        (WebCore::approximateAsRegion):

2019-03-30  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: JSC Sampling Profiler thread not getting subtracted in CPU Usage Timeline
        https://bugs.webkit.org/show_bug.cgi?id=196419
        <rdar://problem/49444023>

        Reviewed by Devin Rousso.

        * page/ResourceUsageThread.cpp:
        (WebCore::ResourceUsageThread::addObserver):
        We forgot to call the function that would setup platform state
        allowing us to subtract out the sampling profiler thread.

2019-03-30  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Add iFrame elements to the list of "considered clickable" elements.
        https://bugs.webkit.org/show_bug.cgi?id=196410
        <rdar://problem/49436828>

        Reviewed by Simon Fraser.

        163.com constructs an iFrame to display the login pane on hover. This patch ensures that we take iFrames into account while observing for visible content change by considering iFrame elements "clickable".
        (While iFrames don't necessarily have clickable content, we can't just sit and wait until they are fully loaded.)

        Test: fast/events/touch/ios/content-observation/iframe-is-shown-on-hover.html

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::StyleChangeScope::isConsideredClickable const):

2019-03-30  Antti Koivisto  <antti@apple.com>

        Try to fix Windows build.

        * platform/graphics/Region.cpp:
        * platform/graphics/RoundedRect.cpp:

2019-03-30  Antti Koivisto  <antti@apple.com>

        Hit-testing of boxes over scrollers should account for border-radius
        https://bugs.webkit.org/show_bug.cgi?id=195374
        <rdar://problem/48649993>

        Reviewed by Simon Fraser.

        Test: fast/scrolling/ios/border-radious-event-region.html

        * page/Frame.h:
        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::dumpProperties const):

        Testing support.

        * platform/graphics/GraphicsLayerClient.h:
        * platform/graphics/RoundedRect.cpp:
        (WebCore::approximateAsRegion):

        Add a function to approximate RoundedRects as Regions.
        It cuts away rectangles from the corners following the corner shapes.
        More rectangles are cut for larger radii.

        * platform/graphics/RoundedRect.h:
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject):

        Use the new interface to get rounded corners right.
        In rectangle case this takes optimized paths.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::layerTreeAsText):
        * testing/Internals.cpp:
        (WebCore::toLayerTreeFlags):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-03-29  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Expand DOM timer observation to 350ms
        https://bugs.webkit.org/show_bug.cgi?id=196411
        <rdar://problem/49391144>

        Reviewed by Simon Fraser.

        imdb.com main page has 350ms hover intent timer to bring up the hover menus around the search bar.

        Test: fast/events/touch/ios/content-observation/350ms-hover-intent.html

        * page/ios/ContentChangeObserver.cpp:

2019-03-29  John Wilander  <wilander@apple.com>

        Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process
        https://bugs.webkit.org/show_bug.cgi?id=196407
        <rdar://problem/47859936>

        Reviewed by Brent Fulgham.

        Test: http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html

        This patch removes old code for the batching into "statistics updated" calls.
        Since the move of Resource Load Statistics to the network process, all such
        collection is done directly through dedicated calls to the network process.

        The remaining functionality was renamed to make it more clear, i.e.
        ResourceLoadObserver::notifyObserver() renamed to
        ResourceLoadObserver::updateCentralStatisticsStore().

        * loader/ResourceLoadObserver.cpp:
        (WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback):
        (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
        (WebCore::ResourceLoadObserver::logSubresourceLoading):
        (WebCore::ResourceLoadObserver::logWebSocketLoading):
        (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
        (WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):
        (WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
        (WebCore::ResourceLoadObserver::clearState):
        (WebCore::ResourceLoadObserver::setNotificationCallback): Deleted.
        (WebCore::ResourceLoadObserver::ResourceLoadObserver): Deleted.
        (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded): Deleted.
        (WebCore::ResourceLoadObserver::notifyObserver): Deleted.
        * loader/ResourceLoadObserver.h:
        * testing/Internals.cpp:
        (WebCore::Internals::notifyResourceLoadObserver):

2019-03-29  Chris Dumez  <cdumez@apple.com>

        Make someWindow.frames, .self, .window always return someWindow
        https://bugs.webkit.org/show_bug.cgi?id=195406

        Reviewed by Alex Christensen.

        Make someWindow.frames, .self, .window always return someWindow. Previously, they
        would return null when the window would lose its browsing context.

        This aligns our behavior with Firefox and the HTML specification:
        - https://github.com/whatwg/html/pull/4410

        Chrome has also recently aligned with Firefox and the HTML specification here so
        it makes sense for WebKit to follow.

        No new tests, rebaselined existing tests.

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::self const):
        (WebCore::JSDOMWindow::window const):
        (WebCore::JSDOMWindow::frames const):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::focus):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:

2019-03-29  Myles C. Maxfield  <mmaxfield@apple.com>

        Delete WebMetal implementation in favor of WebGPU
        https://bugs.webkit.org/show_bug.cgi?id=195418

        Reviewed by Dean Jackson.

        WebMetal was only ever intended to be a proof-of-concept, and was never intended to be shipped.
        Now that our WebGPU implementation is achieving good functionality, we're hitting conflicts
        because we have both implementations. We should delete the non-standard implementation in favor
        of the standards-based implementation.

        Deletes relevant tests.

        * CMakeLists.txt:
        * Configurations/FeatureDefines.xcconfig:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: Removed.
        * bindings/js/JSWebMetalRenderingContextCustom.cpp: Removed.
        * bindings/js/WebCoreBuiltinNames.h:
        * dom/Document.cpp:
        (WebCore::Document::getCSSCanvasContext):
        * dom/Document.h:
        * dom/Document.idl:
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::getContext):
        (WebCore::HTMLCanvasElement::isWebMetalType): Deleted.
        (WebCore::HTMLCanvasElement::createContextWebMetal): Deleted.
        (WebCore::HTMLCanvasElement::getContextWebMetal): Deleted.
        * html/HTMLCanvasElement.h:
        * html/HTMLCanvasElement.idl:
        * html/canvas/CanvasRenderingContext.h:
        (WebCore::CanvasRenderingContext::isWebGPU const):
        (WebCore::CanvasRenderingContext::isWebMetal const): Deleted.
        * html/canvas/WebMetalBuffer.cpp: Removed.
        * html/canvas/WebMetalBuffer.h: Removed.
        * html/canvas/WebMetalBuffer.idl: Removed.
        * html/canvas/WebMetalCommandBuffer.cpp: Removed.
        * html/canvas/WebMetalCommandBuffer.h: Removed.
        * html/canvas/WebMetalCommandBuffer.idl: Removed.
        * html/canvas/WebMetalCommandQueue.cpp: Removed.
        * html/canvas/WebMetalCommandQueue.h: Removed.
        * html/canvas/WebMetalCommandQueue.idl: Removed.
        * html/canvas/WebMetalComputeCommandEncoder.cpp: Removed.
        * html/canvas/WebMetalComputeCommandEncoder.h: Removed.
        * html/canvas/WebMetalComputeCommandEncoder.idl: Removed.
        * html/canvas/WebMetalComputePipelineState.cpp: Removed.
        * html/canvas/WebMetalComputePipelineState.h: Removed.
        * html/canvas/WebMetalComputePipelineState.idl: Removed.
        * html/canvas/WebMetalDepthStencilDescriptor.cpp: Removed.
        * html/canvas/WebMetalDepthStencilDescriptor.h: Removed.
        * html/canvas/WebMetalDepthStencilDescriptor.idl: Removed.
        * html/canvas/WebMetalDepthStencilState.cpp: Removed.
        * html/canvas/WebMetalDepthStencilState.h: Removed.
        * html/canvas/WebMetalDepthStencilState.idl: Removed.
        * html/canvas/WebMetalDrawable.cpp: Removed.
        * html/canvas/WebMetalDrawable.h: Removed.
        * html/canvas/WebMetalDrawable.idl: Removed.
        * html/canvas/WebMetalEnums.cpp: Removed.
        * html/canvas/WebMetalEnums.h: Removed.
        * html/canvas/WebMetalEnums.idl: Removed.
        * html/canvas/WebMetalFunction.cpp: Removed.
        * html/canvas/WebMetalFunction.h: Removed.
        * html/canvas/WebMetalFunction.idl: Removed.
        * html/canvas/WebMetalLibrary.cpp: Removed.
        * html/canvas/WebMetalLibrary.h: Removed.
        * html/canvas/WebMetalLibrary.idl: Removed.
        * html/canvas/WebMetalRenderCommandEncoder.cpp: Removed.
        * html/canvas/WebMetalRenderCommandEncoder.h: Removed.
        * html/canvas/WebMetalRenderCommandEncoder.idl: Removed.
        * html/canvas/WebMetalRenderPassAttachmentDescriptor.cpp: Removed.
        * html/canvas/WebMetalRenderPassAttachmentDescriptor.h: Removed.
        * html/canvas/WebMetalRenderPassAttachmentDescriptor.idl: Removed.
        * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.cpp: Removed.
        * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.h: Removed.
        * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.idl: Removed.
        * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.cpp: Removed.
        * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.h: Removed.
        * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.idl: Removed.
        * html/canvas/WebMetalRenderPassDescriptor.cpp: Removed.
        * html/canvas/WebMetalRenderPassDescriptor.h: Removed.
        * html/canvas/WebMetalRenderPassDescriptor.idl: Removed.
        * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.cpp: Removed.
        * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.h: Removed.
        * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.idl: Removed.
        * html/canvas/WebMetalRenderPipelineDescriptor.cpp: Removed.
        * html/canvas/WebMetalRenderPipelineDescriptor.h: Removed.
        * html/canvas/WebMetalRenderPipelineDescriptor.idl: Removed.
        * html/canvas/WebMetalRenderPipelineState.cpp: Removed.
        * html/canvas/WebMetalRenderPipelineState.h: Removed.
        * html/canvas/WebMetalRenderPipelineState.idl: Removed.
        * html/canvas/WebMetalRenderingContext.cpp: Removed.
        * html/canvas/WebMetalRenderingContext.h: Removed.
        * html/canvas/WebMetalRenderingContext.idl: Removed.
        * html/canvas/WebMetalSize.h: Removed.
        * html/canvas/WebMetalSize.idl: Removed.
        * html/canvas/WebMetalTexture.cpp: Removed.
        * html/canvas/WebMetalTexture.h: Removed.
        * html/canvas/WebMetalTexture.idl: Removed.
        * html/canvas/WebMetalTextureDescriptor.cpp: Removed.
        * html/canvas/WebMetalTextureDescriptor.h: Removed.
        * html/canvas/WebMetalTextureDescriptor.idl: Removed.
        * inspector/InspectorCanvas.cpp:
        (WebCore::InspectorCanvas::buildObjectForCanvas):
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::requestContent):
        (WebCore::contextAsScriptValue):
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setWebMetalEnabled): Deleted.
        (WebCore::RuntimeEnabledFeatures::webMetalEnabled const): Deleted.
        * platform/Logging.h:
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
        (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
        * platform/graphics/cocoa/WebMetalLayer.h: Removed.
        * platform/graphics/cocoa/WebMetalLayer.mm: Removed.
        * platform/graphics/gpu/legacy/GPULegacyBuffer.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyBuffer.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyCommandBuffer.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyCommandBuffer.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyCommandQueue.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyCommandQueue.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyComputeCommandEncoder.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyComputeCommandEncoder.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyComputePipelineState.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyComputePipelineState.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyDepthStencilDescriptor.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyDepthStencilDescriptor.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyDepthStencilState.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyDepthStencilState.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyDevice.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyDevice.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyDrawable.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyDrawable.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyEnums.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyFunction.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyFunction.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyLibrary.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyLibrary.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderCommandEncoder.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderCommandEncoder.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPassAttachmentDescriptor.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPassAttachmentDescriptor.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPassColorAttachmentDescriptor.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPassColorAttachmentDescriptor.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPassDepthAttachmentDescriptor.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPassDepthAttachmentDescriptor.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPassDescriptor.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPassDescriptor.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPipelineColorAttachmentDescriptor.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPipelineColorAttachmentDescriptor.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPipelineDescriptor.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPipelineDescriptor.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPipelineState.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyRenderPipelineState.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacySize.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyTexture.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyTexture.h: Removed.
        * platform/graphics/gpu/legacy/GPULegacyTextureDescriptor.cpp: Removed.
        * platform/graphics/gpu/legacy/GPULegacyTextureDescriptor.h: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyBufferMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyCommandBufferMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyCommandQueueMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyComputeCommandEncoderMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyComputePipelineStateMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyDepthStencilDescriptorMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyDepthStencilStateMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyDeviceMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyDrawableMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyFunctionMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyLibraryMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderCommandEncoderMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassAttachmentDescriptorMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassColorAttachmentDescriptorMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassDepthAttachmentDescriptorMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassDescriptorMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineColorAttachmentDescriptorMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineDescriptorMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineStateMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyTextureDescriptorMetal.mm: Removed.
        * platform/graphics/gpu/legacy/cocoa/GPULegacyTextureMetal.mm: Removed.
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setWebMetalEnabled): Deleted.
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:

2019-03-29  Devin Rousso  <drousso@apple.com>

        Web Inspector: add fast returns for instrumentation hooks that have no affect before a frontend is connected
        https://bugs.webkit.org/show_bug.cgi?id=196382
        <rdar://problem/49403417>

        Reviewed by Joseph Pecoraro.

        Ensure that all instrumentation hooks use `FAST_RETURN_IF_NO_FRONTENDS` or check that
        `developerExtrasEnabled`. There should be no activity to/from any inspector objects until
        developer extras are enabled.

        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
        (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
        (WebCore::InspectorInstrumentation::domContentLoadedEventFired):
        (WebCore::InspectorInstrumentation::loadEventFired):
        (WebCore::InspectorInstrumentation::frameDetachedFromParent):
        (WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
        (WebCore::InspectorInstrumentation::frameStartedLoading):
        (WebCore::InspectorInstrumentation::frameStoppedLoading):
        (WebCore::InspectorInstrumentation::frameScheduledNavigation):
        (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::frameWindowDiscardedImpl):
        (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
        (WebCore::InspectorInstrumentation::didFailLoadingImpl):
        (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
        (WebCore::InspectorInstrumentation::consoleCountImpl):
        (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
        (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):

        * inspector/agents/WebConsoleAgent.cpp:
        (WebCore::WebConsoleAgent::frameWindowDiscarded):

2019-03-29  Chris Dumez  <cdumez@apple.com>

        Set window.closed immediately when close() is invoked
        https://bugs.webkit.org/show_bug.cgi?id=195409

        Reviewed by Alex Christensen.

        Window.closed should return true if it is closing:
        - https://html.spec.whatwg.org/#dom-window-closed

        Window.close() sets the 'is closing' flag to true synchronously, as per:
        - https://html.spec.whatwg.org/#dom-window-close (step 3.1)

        No new tests, rebaselined existing tests.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::closed const):

2019-03-29  Zalan Bujtas  <zalan@apple.com>

        [Simple line layout] Turn off inline boxtree generation for multiline content
        https://bugs.webkit.org/show_bug.cgi?id=196404
        <rdar://problem/49234033>

        Reviewed by Simon Fraser.

        Currently simple line layout can't provide the correct line breaking context to the inline tree when the boxtree is
        generated using the simple line runs. This patch limits the generation of such trees to single lines. Multiline content will
        go through the "let's layout this content again" codepath.
        This patch fixes disappearing content on Questar.

        Test: fast/text/simple-line-layout-and-multiline-inlineboxtree.html

        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::canUseForLineBoxTree):

2019-03-29  Justin Fan  <justin_fan@apple.com>

        [Web GPU] Replace unsigned longs in WebGPU with uint64_t
        https://bugs.webkit.org/show_bug.cgi?id=196401

        Reviewed by Myles C. Maxfield.

        Unsigned long is not guaranteed to be 64 bits on all platforms. In addition, rowPitch is updated
        to u32 in the API and the implementation to match.

        No new tests. No new behavior.

        * Modules/webgpu/WebGPUBuffer.cpp:
        (WebCore::WebGPUBuffer::setSubData):
        * Modules/webgpu/WebGPUBuffer.h:
        * Modules/webgpu/WebGPUBufferBinding.h:
        * Modules/webgpu/WebGPUCommandEncoder.cpp:
        (WebCore::WebGPUCommandEncoder::copyBufferToBuffer):
        * Modules/webgpu/WebGPUCommandEncoder.h:
        * Modules/webgpu/WebGPUCommandEncoder.idl:
        * Modules/webgpu/WebGPURenderPassEncoder.cpp:
        (WebCore::WebGPURenderPassEncoder::setVertexBuffers):
        * Modules/webgpu/WebGPURenderPassEncoder.h:
        * platform/graphics/gpu/GPUBindGroupLayout.h:
        * platform/graphics/gpu/GPUBuffer.h:
        (WebCore::GPUBuffer::byteLength const):
        * platform/graphics/gpu/GPUBufferBinding.h:
        * platform/graphics/gpu/GPUBufferDescriptor.h:
        * platform/graphics/gpu/GPUCommandBuffer.h:
        * platform/graphics/gpu/GPURenderPassEncoder.h:
        * platform/graphics/gpu/GPUVertexAttributeDescriptor.h:
        * platform/graphics/gpu/GPUVertexInputDescriptor.h:
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::GPUBuffer):
        (WebCore::GPUBuffer::setSubData):
        * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
        (WebCore::GPUCommandBuffer::copyBufferToBuffer):
        * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
        (WebCore::GPURenderPassEncoder::setVertexBuffers):

2019-03-29  Wenson Hsieh  <wenson_hsieh@apple.com>

        REGRESSION (r243250): Text interactions are no longer suppressed when editing in some websites
        https://bugs.webkit.org/show_bug.cgi?id=196378
        <rdar://problem/49231299>

        Reviewed by Simon Fraser.

        Enabling async overflow scrolling by default in r243250 exposed an issue with hidden editable area detection
        heuristics. Currently, an empty value for RenderLayer::selfClipRect is used to determine whether the layer
        enclosing the editable element or form control is completely clipped by a parent (in other words, the clip rect
        is empty). With async overflow scrolling, the enclosing layer of the editable element (as seen in the websites
        affected by this bug) will now be a clipping root for painting, since it is composited. This means selfClipRect
        returns a non-empty rect despite the layer being entirely clipped, which negates the heuristic.

        To address this, we adjust the clipping heuristic to instead walk up the layer tree (crossing frame boundaries)
        and look for enclosing ancestors with overflow clip. For each layer we find with an overflow clip, compute the
        clip rect of the previous layer relative to the ancestor with overflow clip. If the clipping rect is empty, we
        know that the layer is hidden.

        This isn't a perfect strategy, since it may still report false negatives (reporting a layer as visible when it
        is not) in some cases. One such edge case is a series of overflow hidden containers, nested in such a way that
        each container is only partially clipped relative to its ancestor, but the deepest layer is completely clipped
        relative to the topmost layer. However, this heuristic is relatively cheap (entailing a layer tree walk at
        worst) and works for common use cases on the web without risking scenarios in which text selection that
        shouldn't be suppressed ends up becoming suppressed.

        Test: editing/selection/ios/hide-selection-in-textarea-with-transform.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::isTransparentOrFullyClippedRespectingParentFrames const):

2019-03-29  Takashi Komori  <Takashi.Komori@sony.com>

        [Curl] Add Server Trust Evaluation Support.
        https://bugs.webkit.org/show_bug.cgi?id=191646

        Reviewed by Fujii Hironori.

        Tests: http/tests/ssl/iframe-upgrade.https.html
               http/tests/ssl/mixedContent/insecure-websocket.html
               http/tests/ssl/upgrade-origin-usage.html

        * platform/network/curl/AuthenticationChallenge.h:
        * platform/network/curl/AuthenticationChallengeCurl.cpp:
        (WebCore::AuthenticationChallenge::AuthenticationChallenge):
        (WebCore::AuthenticationChallenge::protectionSpaceForPasswordBased):
        (WebCore::AuthenticationChallenge::protectionSpaceForServerTrust):
        (WebCore::AuthenticationChallenge::protectionSpaceFromHandle): Deleted.
        * platform/network/curl/CurlContext.cpp:
        (WebCore::CurlHandle::disableServerTrustEvaluation):
        * platform/network/curl/CurlContext.h:
        * platform/network/curl/CurlRequest.cpp:
        (WebCore::CurlRequest::setupTransfer):
        * platform/network/curl/CurlRequest.h:
        (WebCore::CurlRequest::disableServerTrustEvaluation):

2019-03-29  Ryosuke Niwa  <rniwa@webkit.org>

        Pasting a table from Confluence strip of table cell content
        https://bugs.webkit.org/show_bug.cgi?id=196390

        Reviewed by Antti Koivisto.

        The bug was ultimately caused by FrameView of the document we use to sanitize the pasteboard content
        having 0px by 0px dimension. This caused div with `overflow-x: auto` surrounding a table to have
        the height of 0px. Because StyledMarkupAccumulator::renderedTextRespectingRange uses TextIterator
        to serialize a text node and this div was an ancestor of the text node, TextIterator::handleTextNode
        ended up exiting early.

        Fixed the bug by giving FrameView, which is used to sanitize the content, a dimension of 800px by 600px.

        Using TextIteratorIgnoresStyleVisibility is not a great alternative since removing invisible content
        during paste is an important privacy feature.

        Test: editing/pasteboard/paste-content-with-overflow-auto-parent-across-origin.html

        * editing/markup.cpp:
        (WebCore::createPageForSanitizingWebContent):

2019-03-29  Antoine Quint  <graouts@apple.com>

        WebKitTestRunner crashes when running pointerevents/ios/touch-action-none-in-overflow-scrolling-touch.html
        https://bugs.webkit.org/show_bug.cgi?id=196345

        Reviewed by Dean Jackson.

        An enum used within a WTF::OptionSet needs to have only power-of-two values that are larger than 0.

        * platform/TouchAction.h:
        * rendering/style/StyleRareNonInheritedData.h:

2019-03-29  Michael Catanzaro  <mcatanzaro@igalia.com>

        HTMLInputElement::setEditingValue should not fail if renderer doesn't exist
        https://bugs.webkit.org/show_bug.cgi?id=195708

        Reviewed by Wenson Hsieh.

        HTMLInputElement::setEditingValue currently returns early if the element's renderer() is
        null. This is causing the Epiphany password manager to fail to remember passwords on
        https://www.geico.com/ except for navigations through page cache.

        This check was originally added to avoid some assertion, but I don't know which one, and
        there's definitely not any assertion hit nowadays in this case. Probably there are more
        guards checking if renderer() is null elsewhere in the code nowadays, closer to where it's
        really needed.

        Test: fast/forms/editing-value-null-renderer.html

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::setEditingValue):

2019-03-29  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rebaseline WPT test after r243638.

        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:

2019-03-28  Antoine Quint  <graouts@apple.com>

        All PointerEvent.isTrusted is always false.
        https://bugs.webkit.org/show_bug.cgi?id=196075
        <rdar://problem/49158778>

        Reviewed by Chris Dumez.

        Test: pointerevents/ios/pointer-events-is-trusted.html

        The constructors we were using for some PointerEvent::create() methods were using initializers which are expected to be used with JS APIs
        and thus generate untrusted events. We switch to using constructors using dedicated parameters which will set isTrusted to true.

        * dom/PointerEvent.cpp:
        (WebCore::PointerEvent::create):
        (WebCore::PointerEvent::createPointerCancelEvent):
        (WebCore::PointerEvent::PointerEvent):
        (WebCore::m_isPrimary):
        (WebCore::m_pointerType):
        * dom/PointerEvent.h:
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::cancelPointer):

2019-03-29  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] imxvpudecoder detection and handling
        https://bugs.webkit.org/show_bug.cgi?id=196346

        Reviewed by Xabier Rodriguez-Calvar.

        When the imxvpudecoder is used, the texture sampling of the
        directviv-uploaded texture returns an RGB value, so there's no need
        to convert it. This patch also includes a refactoring of the
        ImageRotation flag handling. The flag is now computed once only
        and stored in an instance variable.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
        (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
        (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
        (WebCore::MediaPlayerPrivateGStreamerBase::flushCurrentBuffer):
        (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
        (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
        (WebCore::MediaPlayerPrivateGStreamerBase::setVideoSourceOrientation):
        (WebCore::MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags):
        (WebCore::texMapFlagFromOrientation): Deleted.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

2019-03-29  Cathie Chen  <cathiechen@igalia.com>

        Implement ResizeObserver.
        https://bugs.webkit.org/show_bug.cgi?id=157743

        Reviewed by Simon Fraser.

        Tests: resize-observer/modify-frametree-in-callback.html
               resize-observer/multi-frames.html
               resize-observer/observe-element-from-other-frame.html
               Imported from WPT by https://bugs.webkit.org/show_bug.cgi?id=193821

        The data structure: Document has a ResizeObserver slot. ResizeObserver has a ResizeObservation slot.
        ResizeObservation is related to one Element and the last reported size.
        On the other hand, Element has a ResizeObservation slot.

        At the beginning of willDisplayPage, it will check resize observations for current page if:
        1. There is FrameView be layout and there are ResizeObservers in this page.
        2. m_resizeObserverTimer has been started by observe() or hasSkippedResizeObservers().
        During checkResizeObservations(), we'll gatherDocumentsNeedingResizeObservationCheck() first,
        then notifyResizeObservers() for each document. During notifyResizeObservers(), it will gather
        the m_activeObservations whose size changed and target element deeper than require depth.
        The size changed shallower observations are skipped observations which will be delivered
        in the next time. And an ErrorEvent will be reported.
        After gathering, deliverResizeObservations create entries and invoke the callbacks with them.

        The Element from other document could be observed.

        * CMakeLists.txt:
        * Configurations/FeatureDefines.xcconfig:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * dom/Document.cpp:
        (WebCore::Document::getParserLocation const):
        (WebCore::Document::addResizeObserver):
        (WebCore::Document::removeResizeObserver):
        (WebCore::Document::hasResizeObservers):
        (WebCore::Document::gatherResizeObservations): Gather m_activeObservations at depth and return the shallowest depth.
        (WebCore::Document::deliverResizeObservations): Deliver m_activeObservations, generate ResizeObserverEntries, and invoke the m_callbacks.
        (WebCore::Document::hasSkippedResizeObservations const): To determine if Document has the size changed but not delivered observations.
        (WebCore::Document::setHasSkippedResizeObservations):
        (WebCore::Document::scheduleResizeObservations):
        * dom/Document.h:
        * dom/Element.cpp:
        (WebCore::Element::~Element):
        (WebCore::Element::disconnectFromResizeObservers):
        (WebCore::Element::ensureResizeObserverData):
        (WebCore::Element::resizeObserverData):
        * dom/Element.h:
        * dom/ElementRareData.cpp:
        * dom/ElementRareData.h:
        (WebCore::ElementRareData::resizeObserverData):
        (WebCore::ElementRareData::setResizeObserverData):
        (WebCore::ElementRareData::useTypes const):
        * page/FrameView.cpp:
        (WebCore::FrameView::didLayout):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layoutTimerFired): We need to start a ResizeObserver timer here, because for WK1 this might not trigger flushCompositingChanges.
        * page/Page.cpp:
        (WebCore::Page::Page):
        (WebCore::Page::willDisplayPage):
        (WebCore::Page::hasResizeObservers const):
        (WebCore::Page::gatherDocumentsNeedingResizeObservationCheck): Gather the documents with resize observers.
        (WebCore::Page::checkResizeObservations): Gather documents then notifyResizeObservers for each document.
        (WebCore::Page::scheduleResizeObservations):
        (WebCore::Page::notifyResizeObservers): Gather m_activeObservations and deliver them. Report ErrorEvent if it has skipped observations.
        * page/Page.h:
        (WebCore::Page::setNeedsCheckResizeObservations): Page needs to check ResizeObservations if FrameView layout or m_resizeObserverTimer has been started.
        (WebCore::Page::needsCheckResizeObservations const):
        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::addMessage):
        (WebCore::getParserLocationForConsoleMessage): Deleted.
        * page/ResizeObservation.cpp: Added.
        (WebCore::ResizeObservation::create):
        (WebCore::ResizeObservation::ResizeObservation):
        (WebCore::ResizeObservation::~ResizeObservation):
        (WebCore::ResizeObservation::updateObservationSize):
        (WebCore::ResizeObservation::computeObservedSize const):
        (WebCore::ResizeObservation::computeTargetLocation const):
        (WebCore::ResizeObservation::computeContentRect const):
        (WebCore::ResizeObservation::elementSizeChanged const):
        (WebCore::ResizeObservation::targetElementDepth const):
        * page/ResizeObservation.h: Copied from Tools/DumpRenderTree/TestOptions.h.
        (WebCore::ResizeObservation::target const):
        * page/ResizeObserver.cpp: Added.
        (WebCore::ResizeObserver::create):
        (WebCore::ResizeObserver::ResizeObserver):
        (WebCore::ResizeObserver::~ResizeObserver):
        (WebCore::ResizeObserver::scheduleObservations):
        (WebCore::ResizeObserver::observe):
        (WebCore::ResizeObserver::unobserve):
        (WebCore::ResizeObserver::disconnect):
        (WebCore::ResizeObserver::targetDestroyed):
        (WebCore::ResizeObserver::gatherObservations):
        (WebCore::ResizeObserver::deliverObservations):
        (WebCore::ResizeObserver::removeTarget):
        (WebCore::ResizeObserver::removeAllTargets):
        (WebCore::ResizeObserver::removeObservation):
        (WebCore::ResizeObserver::hasPendingActivity const):
        (WebCore::ResizeObserver::activeDOMObjectName const):
        (WebCore::ResizeObserver::canSuspendForDocumentSuspension const):
        (WebCore::ResizeObserver::stop):
        * page/ResizeObserver.h: Added.
        (WebCore::ResizeObserver::hasObservations const):
        (WebCore::ResizeObserver::hasActiveObservations const):
        (WebCore::ResizeObserver::maxElementDepth):
        (WebCore::ResizeObserver::hasSkippedObservations const):
        (WebCore::ResizeObserver::setHasSkippedObservations):
        * page/ResizeObserver.idl: Copied from Tools/DumpRenderTree/TestOptions.h.
        * page/ResizeObserverCallback.h: Copied from Tools/DumpRenderTree/TestOptions.h.
        * page/ResizeObserverCallback.idl: Copied from Tools/DumpRenderTree/TestOptions.h.
        * page/ResizeObserverEntry.h: Copied from Tools/DumpRenderTree/TestOptions.h.
        (WebCore::ResizeObserverEntry::create):
        (WebCore::ResizeObserverEntry::target const):
        (WebCore::ResizeObserverEntry::contentRect const):
        (WebCore::ResizeObserverEntry::ResizeObserverEntry):
        * page/ResizeObserverEntry.idl: Copied from Tools/DumpRenderTree/TestOptions.h.
        * page/Settings.yaml:

2019-03-28  Chris Dumez  <cdumez@apple.com>

        Support <object>.contentWindow
        https://bugs.webkit.org/show_bug.cgi?id=195562

        Reviewed by Sam Weinig.

        Support <object>.contentWindow as per:
        - https://html.spec.whatwg.org/multipage/iframe-embed-object.html#dom-object-contentwindow

        No new tests, updated / rebaselined existing tests.

        * html/HTMLObjectElement.idl:

2019-03-28  Myles C. Maxfield  <mmaxfield@apple.com>

        FontFace constructor throws an exception when there is a name which starts with a number
        https://bugs.webkit.org/show_bug.cgi?id=196232
        <rdar://problem/49293978>

        Reviewed by Ryosuke Niwa.

        We were technically following the spec, but Chrome and Firefox are both consistent and it was making a website break.
        This is just a short-term fix until the underlying https://bugs.webkit.org/show_bug.cgi?id=196381 is fixed.

        Test: fast/text/font-face-family.html

        * css/FontFace.cpp:
        (WebCore::FontFace::setFamily):

2019-03-28  Justin Fan  <justin_fan@apple.com>

        [Web GPU] Replace 'unsigned long' with 'unsigned' when implementing u32 variables
        https://bugs.webkit.org/show_bug.cgi?id=194618
        <rdar://problem/48055796>

        Reviewed by Myles C. Maxfield.

        WebIDL for "unsigned" on 64-bit is "unsigned long". Update Web GPU to match.

        No new tests; no change in behavior.

        * Modules/webgpu/GPUBindGroupLayoutBinding.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.cpp:
        (WebCore::WHLSL::Metal::calculateVertexBufferIndex):
        * Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.h:
        * Modules/webgpu/WebGPUBindGroupBinding.h:
        * Modules/webgpu/WebGPUBindGroupDescriptor.cpp:
        (WebCore::validateBufferBindingType):
        (WebCore::WebGPUBindGroupDescriptor::tryCreateGPUBindGroupDescriptor const):
        * Modules/webgpu/WebGPUBuffer.cpp:
        (WebCore::WebGPUBuffer::setSubData):
        * Modules/webgpu/WebGPUBuffer.h:
        * Modules/webgpu/WebGPUBufferBinding.h:
        * Modules/webgpu/WebGPURenderPassEncoder.cpp:
        (WebCore::WebGPURenderPassEncoder::setVertexBuffers):
        (WebCore::WebGPURenderPassEncoder::draw):
        * Modules/webgpu/WebGPURenderPassEncoder.h:
        * platform/graphics/gpu/GPUBindGroupBinding.h:
        * platform/graphics/gpu/GPUBindGroupLayout.h:
        * platform/graphics/gpu/GPUBufferBinding.h:
        * platform/graphics/gpu/GPUExtent3D.h:
        * platform/graphics/gpu/GPULimits.h:
        * platform/graphics/gpu/GPURenderPassEncoder.h:
        * platform/graphics/gpu/GPUTextureDescriptor.h:
        * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
        (WebCore::GPUBindGroupLayout::tryCreate):
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
        (WebCore::GPUBindGroup::tryCreate):
        * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
        (WebCore::GPURenderPassEncoder::setVertexBuffers):
        (WebCore::GPURenderPassEncoder::draw):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::trySetInputStateForPipelineDescriptor):
        * platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
        (WebCore::storageModeForPixelFormatAndSampleCount):

2019-03-28  Ryosuke Niwa  <rniwa@webkit.org>

        getBoundingClientRect always returns empty rect on a collapsed range
        https://bugs.webkit.org/show_bug.cgi?id=196380

        Reviewed by Wenson Hsieh.

        The bug was caused by Range::boundingRect merging rects via FloatRect::unite which ignores empty rects.
        Use uniteIfNonZero instead to fix the bug. Note that we can't use uniteEvenIfEmpty because that would
        set x, y to always 0, 0 as we would end up merging any rect with the initial empty rect.

        Test: fast/dom/Range/getBoundingClientRect-on-collapsed-selection-range.html

        * dom/Range.cpp:
        (WebCore::Range::boundingRect const):

2019-03-28  Justin Fan  <justin_fan@apple.com>

        [Web GPU] Prototype compute pipeline with MSL
        https://bugs.webkit.org/show_bug.cgi?id=196107
        <rdar://problem/46289650>

        Reviewed by Myles Maxfield.

        Add GPUComputePassEncoder, GPUComputePipeline, and GPUComputePipelineDescriptor.
        Implement everything needed to prototype a compute pipeline in Web GPU using Metal shaders and bound resources.

        Test: webgpu/compute-squares.html

        Add files and symbols:
        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:

        Misc fixes:
        * Modules/webgpu/WHLSL/WHLSLNameResolver.h: Missing include.
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Missing include.
        * Modules/webgpu/WebGPUPipelineStageDescriptor.cpp: Added. Move pipeline stage validation logic here.
        (WebCore::WebGPUPipelineStageDescriptor::tryCreateGPUPipelineStageDescriptor const):
        * Modules/webgpu/WebGPURenderPipeline.cpp: Remove unnecessary include.
        * Modules/webgpu/WebGPURenderPipeline.h:
        * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp: Add missing inlcude.
        (WebCore::WebGPUPipelineStageDescriptor::tryCreateGPUPipelineStageDescriptor const): Moved to WebGPUPipelineStageDescriptor.cpp.
        * platform/graphics/gpu/GPUPipelineDescriptorBase.h: Add missing include.
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Add missing include.
        (WebCore::GPURenderPipeline::GPURenderPipeline): Remove unecessary ref of GPUPipelineLayout.
        * platform/text/mac/TextEncodingRegistryMac.mm: Carbon.h was causing ambiguous reference build errors in this file.

        Enable creating a GPUComputePassEncoder from a GPUCommandEncoder:
        * Modules/webgpu/WebGPUCommandEncoder.cpp:
        (WebCore::WebGPUCommandEncoder::beginRenderPass): No longer passing this WebGPUCommandEncoder to pass encoders.
        (WebCore::WebGPUCommandEncoder::beginComputePass): Added.
        * Modules/webgpu/WebGPUCommandEncoder.h:
        * Modules/webgpu/WebGPUCommandEncoder.idl:

        Add GPUComputePassEncoder:
        * Modules/webgpu/WebGPUComputePassEncoder.cpp: Added.
        (WebCore::WebGPUComputePassEncoder::create):
        (WebCore::WebGPUComputePassEncoder::WebGPUComputePassEncoder):
        (WebCore::WebGPUComputePassEncoder::setPipeline):
        (WebCore::WebGPUComputePassEncoder::dispatch):
        (WebCore::WebGPUComputePassEncoder::passEncoder):
        (WebCore::WebGPUComputePassEncoder::passEncoder const):
        * Modules/webgpu/WebGPUComputePassEncoder.h: Added.
        * Modules/webgpu/WebGPUComputePassEncoder.idl: Added.
        * platform/graphics/gpu/GPUComputePassEncoder.h: Added.
        (WebCore::GPUComputePassEncoder::~GPUComputePassEncoder):
        * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm: Added.
        (WebCore::GPUComputePassEncoder::tryCreate):
        (WebCore::GPUComputePassEncoder::GPUComputePassEncoder):
        (WebCore::GPUComputePassEncoder::setPipeline):
        (WebCore::GPUComputePassEncoder::dispatch): Use a default calculation for threadsPerThreadgroup while MSL is still an accepted shader format.
        (WebCore::GPUComputePassEncoder::platformPassEncoder const):
        (WebCore::GPUComputePassEncoder::useResource):
        (WebCore::GPUComputePassEncoder::setComputeBuffer):

        Add GPUComputePipeline:
        * Modules/webgpu/WebGPUComputePipeline.cpp: Added.
        (WebCore::WebGPUComputePipeline::create):
        (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
        * Modules/webgpu/WebGPUComputePipeline.h: Added.
        (WebCore::WebGPUComputePipeline::computePipeline const):
        * Modules/webgpu/WebGPUComputePipeline.idl: Added.
        * Modules/webgpu/WebGPUComputePipelineDescriptor.cpp: Added.
        (WebCore::WebGPUComputePipelineDescriptor::tryCreateGPUComputePipelineDescriptor const):
        * Modules/webgpu/WebGPUComputePipelineDescriptor.h: Added.
        * Modules/webgpu/WebGPUComputePipelineDescriptor.idl: Added.
        * platform/graphics/gpu/GPUComputePipeline.h: Added.
        (WebCore::GPUComputePipeline::platformComputePipeline const):
        * platform/graphics/gpu/GPUComputePipelineDescriptor.h: Added.
        (WebCore::GPUComputePipelineDescriptor::GPUComputePipelineDescriptor):
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: Added.
        (WebCore::tryCreateMtlComputeFunction):
        (WebCore::tryCreateMTLComputePipelineState):
        (WebCore::GPUComputePipeline::tryCreate):
        (WebCore::GPUComputePipeline::GPUComputePipeline):

        Enable creating a GPUComputePipeline from a GPUDevice:
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createComputePipeline const):
        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webgpu/WebGPUDevice.idl:
        * platform/graphics/gpu/GPUDevice.cpp:
        (WebCore::GPUDevice::tryCreateComputePipeline const):
        * platform/graphics/gpu/GPUDevice.h:

        No longer unnecessarily ref the WebGPUCommandEncoder when creating pass encoder:
        * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
        (WebCore::WebGPUProgrammablePassEncoder::setBindGroup):
        (WebCore::WebGPUProgrammablePassEncoder::WebGPUProgrammablePassEncoder): Deleted.
        (WebCore::WebGPUProgrammablePassEncoder::setBindGroup const): Deleted.
        * Modules/webgpu/WebGPUProgrammablePassEncoder.h:
        * Modules/webgpu/WebGPURenderPassEncoder.cpp:
        (WebCore::WebGPURenderPassEncoder::create):
        (WebCore::WebGPURenderPassEncoder::WebGPURenderPassEncoder):
        (WebCore::WebGPURenderPassEncoder::setPipeline):
        (WebCore::WebGPURenderPassEncoder::passEncoder):
        (WebCore::WebGPURenderPassEncoder::passEncoder const):
        * Modules/webgpu/WebGPURenderPassEncoder.h:

        Updates to GPUBindGroup and *setBindGroup for compute function arguments:
        * platform/graphics/gpu/GPUBindGroup.h:
        (WebCore::GPUBindGroup::vertexArgsBuffer const):
        (WebCore::GPUBindGroup::fragmentArgsBuffer const):
        (WebCore::GPUBindGroup::computeArgsBuffer const):
        (WebCore::GPUBindGroup::vertexArgsBuffer): Deleted. Const-qualified.
        (WebCore::GPUBindGroup::fragmentArgsBuffer): Ditto.
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
        (WebCore::tryGetResourceAsMTLSamplerState): Now just returns the MTLSamplerState to reduce reference churning.
        (WebCore::GPUBindGroup::tryCreate):
        (WebCore::GPUBindGroup::GPUBindGroup):
        (WebCore::tryGetResourceAsSampler): Renamed to tryGetResourceAsMTLSamplerState.

        Updates to GPUProgrammablePassEncoder and GPURenderPassEncoder:
        * platform/graphics/gpu/GPUProgrammablePassEncoder.h:
        (WebCore::GPUProgrammablePassEncoder::setVertexBuffer):
        (WebCore::GPUProgrammablePassEncoder::setFragmentBuffer):
        (WebCore::GPUProgrammablePassEncoder::setComputeBuffer): Added.
        * platform/graphics/gpu/GPURenderPassEncoder.h:
        (WebCore::GPURenderPassEncoder::~GPURenderPassEncoder):
        * platform/graphics/gpu/GPURenderPipeline.h:
        * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Remove unecessary include.
        (WebCore::GPUProgrammablePassEncoder::endPass): No longer virtual. Delegates shared behavior for derived classes.
        (WebCore::GPUProgrammablePassEncoder::setBindGroup):
        * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
        (WebCore::GPURenderPassEncoder::platformPassEncoder const):
        (WebCore::GPURenderPassEncoder::setPipeline):
        (WebCore::GPURenderPassEncoder::draw):
        (WebCore::GPURenderPassEncoder::useResource): These private overrides are called only by base after checking for encoder existence.
        (WebCore::GPURenderPassEncoder::setVertexBuffer): Ditto.
        (WebCore::GPURenderPassEncoder::setFragmentBuffer): Ditto.
        (WebCore::GPURenderPassEncoder::endPass): Deleted. Now handled by base class.

2019-03-27  Jiewen Tan  <jiewen_tan@apple.com>

        IDBRequest::dispatchEvent should check nullability of m_transaction before operations that rely on it to be non null
        https://bugs.webkit.org/show_bug.cgi?id=196319
        <rdar://problem/49355279>

        Reviewed by Alex Christensen.

        The test that triggers this crash is on Bug 196276.

        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::dispatchEvent):

2019-03-28  Ryosuke Niwa  <rniwa@webkit.org>

        Debug assert in DOMSelection::containsNode when node belongs to a different tree
        https://bugs.webkit.org/show_bug.cgi?id=196342

        Reviewed by Antti Koivisto.

        The assertion was wrong. It's possible for Range::compareBoundaryPoints to return WRONG_DOCUMENT_ERR
        when the node and the start container belong to two different trees.

        Return false in such a case for now since it's unclear (unspecified) what these methods on Selection
        should do with respect to shadow trees, preserving the current behavior of release builds.

        Test: editing/selection/containsNode-with-no-common-ancestor.html

        * page/DOMSelection.cpp:
        (WebCore::DOMSelection::containsNode const):

2019-03-28  Tim Horton  <timothy_horton@apple.com>

        Fix the !ENABLE(APPLE_PAY) build

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::shouldAllowUserAgentScripts const):

2019-03-28  Sihui Liu  <sihui_liu@apple.com>

        Crash at IDBDatabaseInfo::infoForExistingObjectStore and IDBDatabaseInfo::infoForExistingObjectStore
        https://bugs.webkit.org/show_bug.cgi?id=196120
        <rdar://problem/39869767>

        Reviewed by Ryosuke Niwa.

        No new tests because it is unclear how the crash happens. Added release logging to help debug.

        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):

2019-03-28  Devin Rousso  <drousso@apple.com>

        Web Inspector: Canvas: unbinding a canvas should always remove the agent as an observer
        https://bugs.webkit.org/show_bug.cgi?id=196324
        <rdar://problem/49357109>

        Reviewed by Matt Baker.

        No change in functionality.

        * html/CanvasBase.cpp:
        (WebCore::CanvasBase::notifyObserversCanvasChanged):
        (WebCore::CanvasBase::notifyObserversCanvasResized):
        (WebCore::CanvasBase::notifyObserversCanvasDestroyed):

        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::frameNavigated):
        (WebCore::InspectorCanvasAgent::bindCanvas):
        (WebCore::InspectorCanvasAgent::unbindCanvas):

2019-03-28  Alicia Boya García  <aboya@igalia.com>

        [MSE][GStreamer] Remove dead code in MediaPlayerPrivateGStreamer::doSeek()
        https://bugs.webkit.org/show_bug.cgi?id=196352

        Reviewed by Xabier Rodriguez-Calvar.

        MediaPlayerPrivateGStreamerMSE overrides doSeek() and seek(), so this
        branch is never reached.

        This patch does not introduce behavior changes.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::doSeek):

2019-03-28  Simon Fraser  <simon.fraser@apple.com>

        [macOS WK2] Overlays on instagram.com are shifted if you click on a photo after scrolling
        https://bugs.webkit.org/show_bug.cgi?id=196330
        rdar://problem/49100304

        Reviewed by Antti Koivisto.

        When we call ScrollingTree::applyLayerPositions() on the main thread after a flush,
        we need to ensure that the most recent version of the scrolling tree has been committed,
        because it has to have state (like requested scroll position and layout viewport rect)
        that match the layer flush.

        To fix this we have to have the main thread wait for the commit to complete, so
        ThreadedScrollingTree keeps track of a pending commit count, and uses a condition
        variable to allow the main thread to safely wait for it to reach zero.

        Tracing shows that this works as expected, and the main thread is never blocked for
        more than a few tens of microseconds.

        Also lock the tree mutex in ScrollingTree::handleWheelEvent(), since we enter the
        scrolling tree here and we don't want that racing with applyLayerPositions() on the
        main thread.

        Test: scrollingcoordinator/mac/fixed-scrolled-body.html

        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::handleWheelEvent):
        (WebCore::ScrollingTree::applyLayerPositions):
        * page/scrolling/ScrollingTree.h:
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::commitTreeState):
        (WebCore::ThreadedScrollingTree::incrementPendingCommitCount):
        (WebCore::ThreadedScrollingTree::decrementPendingCommitCount):
        (WebCore::ThreadedScrollingTree::waitForPendingCommits):
        (WebCore::ThreadedScrollingTree::applyLayerPositions):
        * page/scrolling/ThreadedScrollingTree.h:
        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
        (WebCore::ScrollingCoordinatorMac::commitTreeState):

2019-03-28  Zalan Bujtas  <zalan@apple.com>

        [SimpleLineLayout] Disable SLL when text-underline-position is not auto.
        https://bugs.webkit.org/show_bug.cgi?id=196338
        <rdar://problem/47975167>

        Reviewed by Daniel Bates.

        Disable simple line layout unconditionally on non-auto text-underline-position content. We don't support it yet.

        Test: fast/text/simple-line-layout-with-text-underline-position.html

        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::canUseForStyle):

2019-03-28  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>

        Silence lot of warnings when compiling with clang
        https://bugs.webkit.org/show_bug.cgi?id=196310

        Reviewed by Michael Catanzaro.

        No change in behavior.

        * accessibility/AccessibilityObject.h: add missing override
        clause.
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webKitWebSrcChangeState): add missing format string to log.
        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: add
        missing virtual destructor.
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
        add missing override clause and remove unused private member.

2019-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        [FreeType] Incorrect application of glyph positioning in the Y direction
        https://bugs.webkit.org/show_bug.cgi?id=161493

        Reviewed by Michael Catanzaro.

        Use the first glyph origin as the initial advance of every complex text run.

        * platform/graphics/cairo/FontCairo.cpp:
        (WebCore::FontCascade::drawGlyphs): Update the yOffset using the height advance.
        * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
        (WebCore::GraphicsContextImplCairo::drawGlyphs): Ditto.
        * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
        (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Set the initial advance.

2019-03-27  Ryosuke Niwa  <rniwa@webkit.org>

        [macOS] Select element doesn't show popup if select element had lost focus while popup was previosuly shown
        https://bugs.webkit.org/show_bug.cgi?id=196336

        Reviewed by Tim Horton.

        * rendering/RenderMenuList.cpp:
        (RenderMenuList::popupDidHide): Added a comment.

2019-03-27  Justin Fan  <justin_fan@apple.com>

        [Web GPU] Standardize Web GPU object reference counting and creation logic
        https://bugs.webkit.org/show_bug.cgi?id=196183

        Reviewed by Dean Jackson.

        Make getters return raw refs/pointers and provide const versions if necessary.
        All Web GPU objects are non-nullable, but become no-op if invalid, and descriptors are not moved unless needed.

        No new tests; no change in behavior.

        Getter updates and const qualifications:
        * Modules/webgpu/WebGPUAdapter.h:
        (WebCore::WebGPUAdapter::options const):
        * Modules/webgpu/WebGPUBindGroup.h:
        (WebCore::WebGPUBindGroup::bindGroup):
        (WebCore::WebGPUBindGroup::bindGroup const): Deleted.
        * Modules/webgpu/WebGPUBindGroupDescriptor.cpp:
        (WebCore::WebGPUBindGroupDescriptor::tryCreateGPUBindGroupDescriptor const):
        * Modules/webgpu/WebGPUBindGroupDescriptor.h:
        * Modules/webgpu/WebGPUBindGroupLayout.h:
        (WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
        * Modules/webgpu/WebGPUBuffer.h:
        (WebCore::WebGPUBuffer::buffer):
        (WebCore::WebGPUBuffer::buffer const):
        * Modules/webgpu/WebGPURenderPassDescriptor.cpp:
        (WebCore::WebGPURenderPassDescriptor::tryCreateGPURenderPassDescriptor const):
        * Modules/webgpu/WebGPURenderPassEncoder.cpp:
        (WebCore::WebGPURenderPassEncoder::setVertexBuffers):
        * Modules/webgpu/WebGPUSampler.h:
        (WebCore::WebGPUSampler::sampler const):
        * Modules/webgpu/WebGPUSwapChain.h:
        (WebCore::WebGPUSwapChain::swapChain):
        (WebCore::WebGPUSwapChain::swapChain const): Deleted.
        * Modules/webgpu/WebGPUTexture.h:
        (WebCore::WebGPUTexture::texture):
        (WebCore::WebGPUTexture::texture const): Deleted.
        * Modules/webgpu/WebGPUTextureView.h:
        (WebCore::WebGPUTextureView::texture):
        (WebCore::WebGPUTextureView::texture const): Deleted.
        * platform/graphics/gpu/GPUBindGroupBinding.h:
        * platform/graphics/gpu/GPUBindGroupDescriptor.h:
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
        (WebCore::tryGetResourceAsMTLSamplerState):

        Web GPU object creation logic:
        * Modules/webgpu/WebGPUCommandEncoder.cpp:
        (WebCore::WebGPUBufferCopyView::tryCreateGPUBufferCopyView const):
        (WebCore::WebGPUTextureCopyView::tryCreateGPUTextureCopyView const):
        (WebCore::WebGPUCommandEncoder::beginRenderPass):
        (WebCore::WebGPUCommandEncoder::copyBufferToBuffer):
        * Modules/webgpu/WebGPUCommandEncoder.h:
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createBuffer const):
        (WebCore::WebGPUDevice::createTexture const):
        (WebCore::WebGPUDevice::createPipelineLayout const):
        (WebCore::WebGPUDevice::createBindGroup const):
        (WebCore::WebGPUDevice::createShaderModule const):
        (WebCore::WebGPUDevice::createRenderPipeline const):
        (WebCore::WebGPUDevice::getQueue const):
        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webgpu/WebGPUPipelineLayout.cpp:
        (WebCore::WebGPUPipelineLayout::create):
        (WebCore::WebGPUPipelineLayout::WebGPUPipelineLayout):
        * Modules/webgpu/WebGPUPipelineLayout.h:
        (WebCore::WebGPUPipelineLayout::pipelineLayout):
        * Modules/webgpu/WebGPUPipelineLayoutDescriptor.cpp: 
        (WebCore::WebGPUPipelineLayoutDescriptor::tryCreateGPUPipelineLayoutDescriptor const):
        * Modules/webgpu/WebGPUPipelineLayoutDescriptor.h:
        * Modules/webgpu/WebGPUQueue.cpp:
        (WebCore::WebGPUQueue::create):
        (WebCore::WebGPUQueue::WebGPUQueue):
        (WebCore::WebGPUQueue::submit):
        * Modules/webgpu/WebGPUQueue.h:
        * Modules/webgpu/WebGPUShaderModule.cpp:
        (WebCore::WebGPUShaderModule::create):
        (WebCore::WebGPUShaderModule::WebGPUShaderModule):
        * Modules/webgpu/WebGPUShaderModule.h:
        (WebCore::WebGPUShaderModule::module const):
        * platform/graphics/gpu/GPUBuffer.h:
        * platform/graphics/gpu/GPUDevice.cpp:
        (WebCore::GPUDevice::tryCreateBuffer):
        (WebCore::GPUDevice::tryCreateTexture const):
        (WebCore::GPUDevice::tryCreateShaderModule const):
        (WebCore::GPUDevice::tryCreateRenderPipeline const):
        (WebCore::GPUDevice::tryGetQueue const):
        (WebCore::GPUDevice::createShaderModule const): Deleted.
        (WebCore::GPUDevice::createRenderPipeline const): Deleted.
        (WebCore::GPUDevice::getQueue const): Deleted.
        * platform/graphics/gpu/GPUDevice.h:
        * platform/graphics/gpu/GPUPipelineLayout.cpp:
        (WebCore::GPUPipelineLayout::create):
        (WebCore::GPUPipelineLayout::GPUPipelineLayout):
        * platform/graphics/gpu/GPUPipelineLayout.h:
        (WebCore::GPUPipelineLayout::bindGroupLayouts const):
        * platform/graphics/gpu/GPUPipelineLayoutDescriptor.h:
        * platform/graphics/gpu/GPURenderPipeline.h:
        * platform/graphics/gpu/GPUShaderModule.h:
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::tryCreate):
        (WebCore::GPUBuffer::GPUBuffer):
        (WebCore::GPUBuffer::setSubData):
        * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
        (WebCore::GPUCommandBuffer::tryCreate):
        * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
        (WebCore::GPUDevice::tryCreate):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::GPURenderPipeline::tryCreate):
        (WebCore::GPURenderPipeline::GPURenderPipeline):
        (WebCore::GPURenderPipeline::create): Deleted.
        * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:
        (WebCore::GPUShaderModule::tryCreate):
        (WebCore::GPUShaderModule::create): Deleted.

        Add WebGPUPipelineLayoutDescriptor.cpp to project:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        
2019-03-27  Shawn Roberts  <sroberts@apple.com>

        Unreviewed, rolling out r243346.

        Causing timeouts in animation tests across 10 builds

        Reverted changeset:

        "[Web Animations] JS wrapper may be deleted while animation is
        yet to dispatch its finish event"
        https://bugs.webkit.org/show_bug.cgi?id=196118
        https://trac.webkit.org/changeset/243346

2019-03-27  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Stop using the global _WKContentChange
        https://bugs.webkit.org/show_bug.cgi?id=196288
        <rdar://problem/49228081>

        Reviewed by Simon Fraser.

        This patch ensures that